Updating minified JavaScript files
authorWoltLab <woltlab@woltlab.com>
Thu, 1 Aug 2024 12:52:33 +0000 (12:52 +0000)
committerWoltLab <woltlab@woltlab.com>
Thu, 1 Aug 2024 12:52:33 +0000 (12:52 +0000)
wcfsetup/install/files/js/WCF.Combined.min.js
wcfsetup/install/files/js/WCF.Combined.tiny.min.js
wcfsetup/install/files/js/WoltLabSuite.Core.min.js
wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js

index 72a62c6d4f8fce636d5e462b1750c0d5c893d3a0..cb29f0c4db75cab65d18f8e3b105adfa581c5a4d 100755 (executable)
 // WCF.js
 (function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var t=jQuery.fn.data;jQuery.fn.data=function(e,i){var n,s,a,o=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(n in e)n.match(/ID$/)&&(s=e[n],delete e[n],e[n=n.replace(/ID$/,"-id")]=s);o[0]=e;break;case"string":e.match(/ID$/)&&(o[0]=e.replace(/ID$/,"-id"))}if(a=t.apply(this,o),void 0===e)for(n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},void 0===console.debug&&(console.debug=function(t){console.log(t)})}(),function(t){var e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),t.browser=t.browser||{},t.browser=$.extend(t.browser,s),t.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,t.browser.mozilla&&e.match(/trident/)&&(t.browser.mozilla=!1,t.browser.msie=!0),t.browser.iOS=/\((ipad|iphone|ipod);/.test(e),t.browser.iOS&&$("html").addClass("iOS"),t.browser.android=-1!==e.indexOf("android"),t.browser.iOS&&(t.fn.focus=function(t,e){return arguments.length>0?this.on("focus",null,t,e):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(t,e){return $.grep(t,(function(t,i){return e!==t}))},wcfEscapeID:function(t){return t.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(t){return!!$("#"+$.wcfEscapeID(t)).length},getLength:function(t){var e,i=0;for(e in t)t.hasOwnProperty(e)&&i++;return i}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(t){var e={},i={},n=!1;switch(this.is(":hidden")&&(e=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),t){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,e,["display","visibility"]),i},getOffsets:function(t){var e={},i={},n=!1;return this.is(":hidden")&&(e=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),i="offset"===t?this.offset():this.position(),n&&WCF.revertInlineCSS(this,e,["display","visibility"]),i},makePositioned:function(t,e){"absolute"!=t&&"fixed"!=t&&(t="absolute");var i=this.getOffsets("position");return this.css({position:t,left:i.left,margin:0,top:i.top}),e&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){var t,e,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;return t=0,e=this.get(0),document.selection?(this.focus(),(i=document.selection.createRange()).moveStart("character",-this.val().length),t=i.text.length):(e.selectionStart||"0"==e.selectionStart)&&(t=parseInt(e.selectionStart)),t},setCaret:function(t){var e,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;return e=this.get(0),this.focus(),document.selection?((i=document.selection.createRange()).moveStart("character",t),i.moveEnd("character",0),i.select()):(e.selectionStart||"0"==e.selectionStart)&&(e.selectionStart=t,e.selectionEnd=t),!0},wcfDropIn:function(t,e,i){return t||(t="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:t},i,e)},wcfDropOut:function(t,e,i){return t||(t="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:t},i,e)},wcfBlindIn:function(t,e,i){return t||(t="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:t},i,e)},wcfBlindOut:function(t,e,i){return t||(t="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:t},i,e)},wcfHighlight:function(t,e){return this.effect("highlight",t,600,e)},wcfFadeIn:function(t,e){return e&&parseInt(e)||(e=200),this.show(WCF.getEffect(this,"fade"),{},e,t)},wcfFadeOut:function(t,e){return e&&parseInt(e)||(e=200),this.hide(WCF.getEffect(this,"fade"),{},e,t)},cssAsNumber:function(t){if(this.length){var e=this.css(t);if(void 0!==e)return parseInt(e.replace(/px$/,""))}return 0},perfectScrollbar:function(t){var e=require("perfect-scrollbar");return this.each((function(){var i,n;return"object"==typeof t||void 0===t?(i=t,$(this).data("psID")||e.initialize(this,i)):"update"===(n=t)?e.update(this):"destroy"===n&&e.destroy(this),jQuery(this)}))}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(t,e){return-1!=$.inArray(t,e)},getEffect:function(t,e){return t.is("tr")?"highlight":e},getInlineCSS:function(t){var e,i,n,s={},a=t.attr("style");if(!a)return{};for(e=0,i=(a=a.split(";")).length;e<i;e++)""!=(n=$.trim(a[e]))&&(n=n.split(":"),s[$.trim(n[0])]=$.trim(n[1]));return s},revertInlineCSS:function(t,e,i){var n,s,a;for(n=0,s=i.length;n<s;n++)e[a=i[n]]?t.css(a,e[a]):t.css(a,"")},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},base64toBlob:function(t,e,i){var n,s,a,o,r,l,c;for(e=e||"",i=i||512,n=atob(t),s=[],a=0;a<n.length;a+=i){for(o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);c=new Uint8Array(r),s.push(c)}return new Blob(s,{type:e})},convertLegacyURL:function(t){return t.replace(/^index\.php\/(.*?)\/\?/,(function(t,e){var i,n,s,a=e.split(/([A-Z][a-z0-9]+)/),o="";for(i=0,n=a.length;i<n;i++)(s=a[i].trim()).length&&(o.length&&(o+="-"),o+=s.toLowerCase());return"index.php?"+o+"/&"}))}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(t){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(t,e){window.bc_wcfSimpleDropdown.init(t[0],e)},removeDropdown:function(t){window.bc_wcfSimpleDropdown.destroy(t)},initDropdownFragment:function(t,e){window.bc_wcfSimpleDropdown.initFragment(t[0],e[0])},registerCallback:function(t,e){window.bc_wcfSimpleDropdown.registerCallback(t,e)},_toggle:function(t,e){window.bc_wcfSimpleDropdown._toggle(t,e)},toggleDropdown:function(t,e){window.bc_wcfSimpleDropdown._toggle(null,t,null,e)},getDropdown:function(t){var e=window.bc_wcfSimpleDropdown.getDropdown(t);return e?$(e):null},getDropdownMenu:function(t){var e=window.bc_wcfSimpleDropdown.getDropdownMenu(t);return e?$(e):null},setAlignmentByID:function(t){window.bc_wcfSimpleDropdown.setAlignmentById(t)},setAlignment:function(t,e){window.bc_wcfSimpleDropdown.setAlignment(t[0],e[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(t){window.bc_wcfSimpleDropdown.close(t)},destroy:function(t){window.bc_wcfSimpleDropdown.destroy(t)}},WCF.Clipboard={init:function(t,e,i,n){require(["EventHandler","WoltLabSuite/Core/Controller/Clipboard"],(function(s,a){for(var o in a.setup({hasMarkedItems:e>0,pageClassName:t,pageObjectId:n}),i)i.hasOwnProperty(o)&&function(t){s.add("com.woltlab.wcf.clipboard",t,(function(e){null!==e.responseData&&i[t].hasOwnProperty(e.responseData.actionName)&&i[t][e.responseData.actionName].triggerEffect(e.responseData.objectIDs)}))}(o)}))},reload:function(){require(["WoltLabSuite/Core/Controller/Clipboard"],(function(t){t.reload()}))}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(t,e){$.isFunction(t)?(this._callback=t,this._interval=e,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(t){throw this._isExecuting=!1,t}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(t){this._interval=t,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(t){t.show()}))},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(t){t.hide()}))},updateIcon:function(t,e){}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(t){this._ajaxRequest=null,"jsonp"===(t=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},t)).dataType?require(["AjaxJsonp"],(function(e){e.send(t.url,t.success,t.failure,{parameterName:t.jsonp})})):require(["AjaxRequest"],function(e){this._ajaxRequest=new e({data:t.data,type:t.type,url:t.url,withCredentials:t.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===t.dataType?"application/json":"",autoAbort:t.autoAbortPrevious,ignoreError:t.suppressErrors,silent:!t.showLoadingOverlay,failure:t.failure,finalize:t.after,success:t.success}),t.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(t){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(t)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(t){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(t,e){require(["AjaxRequest"],function(i){null!==this._ajaxRequest&&this._ajaxRequest.setOption(t,e)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(t,e,i){},_success:function(t,e,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(t,e){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},t),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},e),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy((function(t,e){$(e).bind(this.options.eventName,$.proxy(this._handleEvent,this))}),this)))},_handleEvent:function(t){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(t.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(t,e,i){this._containerSelector=e,this._className=t,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(t,e){var i,n=$(e),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(t){var e=$(t.currentTarget);t.preventDefault(),e.data("confirmMessageHtml")||e.data("confirmMessage")?WCF.System.Confirmation.show(e.data("confirmMessageHtml")?e.data("confirmMessageHtml"):e.data("confirmMessage"),$.proxy(this._execute,this),{target:e},void 0,!!e.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(e),this._sendRequest(e))},_didTriggerEffect:function(t){},_execute:function(t,e){"cancel"!==t&&(WCF.LoadingOverlayHandler.updateIcon(e.target),this._sendRequest(e.target))},_sendRequest:function(t){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(t).data("objectID")]}),this.proxy.sendRequest()},_success:function(t,e,i){this._callback&&this._callback(t.objectIDs),this.triggerEffect(t.objectIDs)},setCallback:function(t){if("function"!=typeof t)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=t},triggerEffect:function(t){this._containers.forEach(function(e){var i,n=$("#"+e),s=n.find(this._buttonSelector);WCF.inArray(s.data("objectID"),t)&&(i=this,n.wcfBlindOut("up",(function(){var t=$(this).remove();i._containers.splice(i._containers.indexOf(t.wcfIdentify()),1),i._didTriggerEffect(t),s.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",s.data("eventName"),{button:s,container:t})})))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(t){var e,i,n;for(e in this._containers)i=$("#"+this._containers[e]),WCF.inArray(i.find(this._buttonSelector).data("objectID"),t)&&(i.has("ol").has("li").length?(i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i)):(n=this,i.wcfBlindOut("up",(function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))}))))}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(t,e,i){this._containerSelector=e,this._className=t,this._buttonSelector=i||".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy((function(t,e){var i=$(e),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))}),this))},_click:function(t){var e=$(t.currentTarget);t.preventDefault(),e.data("confirmMessageHtml")||e.data("confirmMessage")?WCF.System.Confirmation.show(e.data("confirmMessageHtml")?e.data("confirmMessageHtml"):e.data("confirmMessage"),$.proxy(this._execute,this),{target:e},void 0,!!e.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(e),this._sendRequest(e))},_execute:function(t,e){"cancel"!==t&&(WCF.LoadingOverlayHandler.updateIcon(e.target),this._sendRequest(e.target))},_sendRequest:function(t){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(t).data("objectID")]}),this.proxy.sendRequest()},_success:function(t,e,i){this.triggerEffect(t.objectIDs)},triggerEffect:function(t){var e,i,n;for(e in this._containers)n=(i=$("#"+this._containers[e])).find(this._buttonSelector),WCF.inArray(n.data("objectID"),t)&&(i.wcfHighlight(),this._toggleButton(i,n))},_toggleButton:function(t,e){var i="";const n=e[0].querySelector("fa-icon");"square"===n.name?(n.setIcon("square-check"),i=e.data("disableTitle")?e.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),e.attr("title",i)):(n.setIcon("square"),i=e.data("enableTitle")?e.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),e.attr("title",i)),t.toggleClass("disabled")}}),WCF.Date={},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(t,e){this._variables[t]=e},addObject:function(t){for(var e in t)this.add(e,t[e])},addDictionary:function(t){t.each($.proxy((function(t){this.add(t.key,t.value)}),this))},get:function(t){return this.isset(t)?this._variables[t]:null},isset:function(t){return this._variables.hasOwnProperty(t)},remove:function(t){delete this._variables[t]},each:function(t){var e;if($.isFunction(t))for(e in this._variables)t({key:e,value:this._variables[e]})},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(t,e){require(["Language"],(function(i){i.add(t,e)}))},addObject:function(t){require(["Language"],(function(e){e.addObject(t)}))},get:function(t,e){throw new Error('Call to deprecated WCF.Language.get("'+t+'")')}}),WCF.Number={round:function(t,e){return e=Math.pow(10,e||0),Math.round(t*e)/e}},WCF.String={addThousandsSeparator:function(t){return Number(t).toLocaleString(document.documentElement.lang)},escapeHTML:function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(t){return String(t).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(t,e){var i=e||2;return Number(t).toLocaleString(document.documentElement.lang,{maximumFractionDigits:i}).replace("-","−")},lcfirst:function(t){return String(t).substring(0,1).toLowerCase()+t.substring(1)},ucfirst:function(t){return String(t).substring(0,1).toUpperCase()+t.substring(1)},unescapeHTML:function(t){return String(t).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],(function(t){t.setup()}))},reload:function(){this.init()}},WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy((function(t,e){this._initButton(e)}),this))},_initButton:function(t){var e=$(t);e.data("isOpen")||$("#"+e.data("collapsibleContainer")).hide(),e.click($.proxy(this._toggle,this))},_toggle:function(t){var e=$(t.currentTarget),i=e.data("isOpen"),n=$("#"+$.wcfEscapeID(e.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy((function(){this._toggleImage(e)}),this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy((function(){this._toggleImage(e)}),this)),i=!0),e.data("isOpen",i),t.stopPropagation(),!1},_toggleImage:function(t){const e=t[0].querySelector("fa-icon");t.data("isOpen")?e.setIcon("chevron-down"):e.setIcon("chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(t){this._className=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(t){this._getContainers().each($.proxy((function(t,e){var i=$(e),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))}),this))},_initContainer:function(t){var e=this._getTarget(t),i=this._getButtonContainer(t),n=this._createButton(t,i);this._containerData[t]={button:n,buttonContainer:i,isOpen:this._containers[t].data("isOpen"),target:e},this._containers[t].data("isOpen")||$("#"+t).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(t){},_getButtonContainer:function(t){},_createButton:function(t,e){var i=elBySel(".jsStaticCollapsibleButton",e[0]);return null!==i&&i.parentNode===e[0]?(i.classList.remove("jsStaticCollapsibleButton"),i=$(i)):i=$(`<button type="button" class="collapsibleButton jsToolti" title="${WCF.Language.get("wcf.global.button.collapsible")}">\n\t\t\t\t<fa-icon size="16" name="chevron-down"></fa-icon>\n\t\t\t</button>`).prependTo(e),i.data("containerID",t).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(t){var e=$(t.currentTarget).data("containerID"),i=this._containerData[e].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(e)],parameters:$.extend(!0,{containerID:e,currentState:n,newState:s},this._getAdditionalParameters(e))}),this._proxy.sendRequest(),$("#"+e).toggleClass("jsCollapsed")},_exchangeIcon:function(t,e){e=e||"spinner",t[0].querySelector("fa-icon").setIcon(e)},_getObjectID:function(t){return $("#"+t).data("objectID")},_getAdditionalParameters:function(t){return{}},_updateContent:function(t,e,i){this._containerData[t].target.html(e)},_success:function(t,e,i){var n,s;t.returnValues.containerID&&(n=t.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!t.returnValues.isOpen,s=t.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(t.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(t){this._super(t),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(t){this._super(t),this._containerData[t].isOpen||(this._containerData[t].target.hide(),this._exchangeIcon(this._containerData[t].button,"chevron-right"))},_toggleContainer:function(t){var e=$(t.currentTarget).data("containerID"),i=this._containerData[e].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(e)],parameters:$.extend(!0,{containerID:e,currentState:n,newState:s},this._getAdditionalParameters(e))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[e].button,"open"===s?"chevron-down":"chevron-right"),"open"===s?this._containerData[e].target.show():this._containerData[e].target.hide(),$("#"+e).toggleClass("jsCollapsed"),this._containerData[e].isOpen="open"===s}}),WCF.User={userID:0,username:"",init:function(t,e){this.userID=t,this.username=e}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(t,e,i){var n,s,a;return!t.length||((n=t.getOffsets("offset").top)>(s=$(document).height())-(a=$(window).height())&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,(function(t,e,i,n,s){return-n*((e=e/s-1)*e*e*e-1)+i})),!1)}}),WCF.CloseOverlayHandler={addCallback:function(t,e){require(["Ui/CloseOverlay"],(function(i){i.add(t,e)}))},removeCallback:function(t){require(["Ui/CloseOverlay"],(function(e){e.remove(t)}))},forceExecution:function(){require(["Ui/CloseOverlay"],(function(t){t.execute()}))}},WCF.DOMNodeInsertedHandler={addCallback:function(t,e){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(t){t.add("__legacy__",e)}))},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(t){t.trigger()}))},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(t,e){if(this._bindListener(),this._callbacks.isset(t))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+t+"' is already bound to a callback"),!1;this._callbacks.add(t,e)},removeCallback:function(t){this._callbacks.isset(t)&&this._callbacks.remove(t)},_bindListener:function(){this._isListening||(window.MutationObserver?new MutationObserver(function(t){var e=!1;t.forEach(function(t){t.removedNodes.length&&(e=!0)}.bind(this)),e&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0}):$(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(t){this._isExecuting||(this._isExecuting=!0,this._callbacks.each((function(e){e.value(t)})),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(t,e){this._change(e),$(e).change($.proxy(this._handleChange,this))},_handleChange:function(t){this._change($(t.target))},_change:function(option){var disableOptions,enableOptions,isActive,$value,relevantDisableOptions,relevantEnableOptions,$index,$item;switch(option=$(option),disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions")),option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),disableOptions,enableOptions);break;case"radio":option.prop("checked")&&(isActive=!0,option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,disableOptions,enableOptions))}break;case"select":if($value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[],disableOptions.length>0)for($index in disableOptions)$item=disableOptions[$index],$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option);if(enableOptions.length>0)for($index in enableOptions)$item=enableOptions[$index],$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option);this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(t,e,i){var n,s,a,o;if(e.length>0)for(n=0,s=e.length;n<s;n++)a=e[n],$.wcfIsset(a)?this._enableOption(a,!t):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!t);if(i.length>0)for(n=0,s=i.length;n<s;n++)a=i[n],$.wcfIsset(a)?this._enableOption(a,t):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),t)},_enableOption:function(t,e){this._enableOptionElement($("#"+$.wcfEscapeID(t)),e)},_enableOptionElement:function(t,e){var i,n,s,a;"select"==(i=(t=$(t)).getTagName())||"input"==i&&("checkbox"==t.attr("type")||"file"==t.attr("type")||"radio"==t.attr("type"))?("input"===i&&"radio"===t[0].type&&t[0].checked||(e?t.enable():t.disable()),t.parents(".optionTypeBoolean:eq(0)")&&(n=t.wcfIdentify().replace(/\./g,"\\."),s=$("#"+n+"_no"),e?s.enable():s.disable(),(a=$("#"+n+"_never")).length&&(e?a.enable():a.disable()))):e?t.removeAttr("readonly"):t.attr("readonly",!0),e?t.closest("dl").removeClass("disabled"):t.closest("dl").addClass("disabled")},_enableOptions:function(t,e){for(var i=0,n=t.length;i<n;i++)this._enableOptionElement(t[i],e)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(t,e){if(this._bindListener(),this._callbacks.isset(t))return console.debug("[WCF.PageVisibilityHandler] identifier '"+t+"' is already bound to a callback"),!1;this._callbacks.add(t,e)},removeCallback:function(t){this._callbacks.isset(t)&&this._callbacks.remove(t)},_bindListener:function(){if(!this._isListening){var t=null;void 0!==document.hidden?(this._hiddenFieldName="hidden",t="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",t="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",t="webkitvisibilitychange"),null===t?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(t,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(t){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each((function(t){t.value(e)})),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(t,e,i){this._rowClassName=e,this._tableContainer=t,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+e,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var t,e;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(t=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(e=t[t.length-1].match(/\d+/g),this._options.updatePageNumber>0?e++:e--,window.location=window.location.href.replace(t[t.length-1],t[t.length-1][0]+"pageNo="+e)):window.location.reload():this._tableContainer.remove()},_remove:function(t){var e;$.getLength(t)?(e=$(t.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==e.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(t,e,i,n,s){null==e||$.isFunction(e)?(this._callback=e||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(t),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+t+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var t=this;new WCF.PeriodicalExecuter((function(e){t._list.is(":visible")&&t._clearList(!1),e.stop()}),250)},_keyDown:function(t){if(t.which===$.ui.keyCode.ENTER){var e=this._searchInput.parents(".dropdown");e.data("disableAutoFocus")?-1!==this._itemIndex&&t.preventDefault():(e.data("preventSubmit")||-1!==this._itemIndex)&&t.preventDefault()}},_keyUp:function(t){var e,i,n;switch(t.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(t)}if(""===(e=this._getSearchString(t)))this._clearList(!1);else if(e.length>=this._triggerLength){if(this._lastValue===e)return;this._lastValue=e,i={data:{excludedSearchValues:this._excludedSearchValues,searchString:e}},this._delay?(null!==this._timer&&this._timer.stop(),n=this,this._timer=new WCF.PeriodicalExecuter((function(){n._queryServer(i),n._timer.stop(),n._timer=null}),this._delay)):this._queryServer(i)}else this._clearList(!1)},_queryServer:function(t){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(t)}),this._proxy.sendRequest()},setDelay:function(t){this._delay=t},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(t){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(t){var e,i,n,s,a=$.trim(this._searchInput.val());if(this._commaSeperated){if((t.keyCode||t.which)==$.ui.keyCode.COMMA)return"";for(i=(e=a.split(",")).length,n=0;n<i;n++)e[n]=$.trim(e[n]);for(n=0;n<i;n++){if(s=e[n],!this._oldSearchString[n]){a=s;break}if(s!=this._oldSearchString[n]){a=s,this._caretAt=n;break}}this._oldSearchString=e}return a},_getParameters:function(t){return t},_success:function(t,e,i){var n,s,a;if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(t.returnValues))for(n in t.returnValues)s=t.returnValues[n],this._createListItem(s);else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",((t,e)=>{"dropdown"===t&&e===this._searchInput[0].parentElement.id||this._clearList()})),a=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.label)+"</span></li>").appendTo(this._list);return e.data("objectID",t.objectID).data("label",t.label).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_executeCallback:function(t){var e,i,n=!1,s=$(t.currentTarget);this._commaSeperated?(e=s.data("label"),this._oldSearchString[this._caretAt]=e,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(e.toLowerCase())+e.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(t){t&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(t){WCF.inArray(t,this._excludedSearchValues)||this._excludedSearchValues.push(t)},removeExcludedSearchValue:function(t){var e=$.inArray(t,this._excludedSearchValues);-1!=e&&this._excludedSearchValues.splice(e,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(t,e,i,n,s){this._includeUserGroups=i,this._super(t,e,n,s)},_getParameters:function(t){return t.data.includeUserGroups=this._includeUserGroups?1:0,t},_createListItem:function(t){var e,i,n=this._super(t),s=null;return t.icon?s=$(t.icon):this._includeUserGroups&&"group"===t.type&&(s=$('<fa-icon size="16" name="users"></fa-icon>')),s&&(e=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(e))),n.data("type",t.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(t,e){$.isFunction(e)?WCF.inArray(t,this._loaded)?setTimeout((function(){e()}),1):(this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+t+"' is invalid, aborting.")},setup:function(t,e){$.isFunction(e)?(this._setupCallbacks[t]||(this._setupCallbacks[t]=[]),this._setupCallbacks[t].push(e)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+t+"' is invalid, aborting.")},invoke:function(t){var e,i;if(this._setupCallbacks[t]){for(e=0,i=this._setupCallbacks[t].length;e<i;e++)this._setupCallbacks[t][e]();delete this._setupCallbacks[t]}if(this._loaded.push(t),this._callbacks[t]){for(e=0,i=this._callbacks[t].length;e<i;e++)this._callbacks[t][e]();delete this._callbacks[t]}},reset:function(t){var e=this._loaded.indexOf(t);-1!==e&&this._loaded.splice(e,1)}},WCF.System.ObjectStore={_objects:{},add:function(t,e){void 0===this._objects[t]&&(this._objects[t]=[]),this._objects[t].push(e)},invoke:function(t,e){if(this._objects[t])for(var i=0;i<this._objects[t].length;i++)e(this._objects[t][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(t,e){require(["WoltLabSuite/Core/Controller/Captcha"],function(i){try{i.add(t,e),this._registeredCaptchas.push(t)}catch(t){if(t instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(t){var e,i;if(-1===this._registeredCaptchas.indexOf(t))return e;i=require("WoltLabSuite/Core/Controller/Captcha");try{e=i.getData(t)}catch(e){console.debug('[WCF.System.Captcha] Unknow captcha id "'+t+'"')}return e},removeCallback:function(t){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.delete(t),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(t){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(t,e){this._cssClassNames=e||"",this._message=t||""},show:function(t,e,i,n){require(["Ui/Notification"],function(e){e.show(i||this._message,t,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(t,e,i,n,s){if("object"==typeof n){var a=$("<div />");a.append(n),n=a.html()}require(["Ui/Confirmation"],(function(a){a.show({legacyCallback:e,message:t,parameters:i,template:n||"",messageIsHtml:!0===s})}))}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var t=$("meta[name=viewport]");this._oldViewportSettings=t.attr("content"),t.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.PushNotification={_callbacks:{},addCallback:function(t,e){void 0===this._callbacks[t]&&(this._callbacks[t]=[]),this._callbacks[t].push(e)},executeCallbacks:function(t){var e,i;for(e in t.returnValues)if(void 0!==this._callbacks[e])for(i=0;i<this._callbacks[e].length;i++)this._callbacks[e][i](t.returnValues[e])}},WCF.System.Event={addListener:function(t,e,i){return window.__wcf_bc_eventHandler.add(t,e,i)},removeListener:function(t,e,i){return window.__wcf_bc_eventHandler.remove(t,e,i)},removeAllListeners:function(t,e){return window.__wcf_bc_eventHandler.removeAll(t,e)},fireEvent:function(t,e,i){window.__wcf_bc_eventHandler.fire(t,e,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(t,e,i,n,s){this._aborted=!1,this._actionName=t,this._callback=s||null,this._className=e,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(t){var e,i;null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy((function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()}),this),title:this._title})),this._aborted||(t.returnValues.template&&this._dialog.html(t.returnValues.template),this._dialog.find("progress").attr("value",t.returnValues.progress).text(t.returnValues.progress+"%").next("span").text(t.returnValues.progress+"%"),t.returnValues.progress<100?((e=t.returnValues.parameters||{}).loopCount=t.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:e}),this._proxy.sendRequest()):null!==this._callback?this._callback(this,t):(this._dialog[0].querySelector("fa-icon").setIcon("check"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed")),i=$('<div class="formSubmit" />').appendTo(this._dialog),$('<button type="button" class="button buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click((function(){t.returnValues.redirectURL?window.location=t.returnValues.redirectURL:window.location.reload()})),this._dialog.wcfDialog("render")))}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],_elementSelector:null,_quickOption:null,_dropDownIdToElementId:new Map,init:function(t){var e,i;if(this._elementSelector=t,$(t).length){for(this._setOptions(),e=0,i=this._options.length;e<i;e++)if(this._options[e].isQuickOption){this._quickOption=this._options[e].optionName;break}this.rebuild(),WCF.DOMNodeInsertedHandler.addCallback("WCF.InlineEditor"+this._elementSelector.hashCode(),$.proxy(this.rebuild,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},rebuild:function(){var t=$(this._elementSelector),e=this;t.each((function(t,i){var n,s=$(i),a=s.wcfIdentify();if(void 0===e._elements[a]){if(null===(n=e._getTriggerElement(s))||1!==n.length)return;n[0].addEventListener("keydown",(t=>{"Enter"===t.key&&(t.preventDefault(),n[0].dataset.isKeyboardClick="true",e._show(t))})),n.on("click",$.proxy(e._show,e)).data("elementID",a),n[0].dataset.requiresSynthethicClick=!0,e._quickOption&&n.disableSelection().data("optionName",e._quickOption).dblclick($.proxy(e._click,e)),e._elements[a]=s}}))},_closeAll:function(t,e){let i="";"dropdown"===t&&(i=this._dropDownIdToElementId.get(e||"")||""),Object.keys(this._elements).forEach((t=>{t!==i&&this._hide(t)}))},_setOptions:function(){this._options=[]},registerCallback:function(t){$.isFunction(t)&&this._callbacks.push(t)},_getTriggerElement:function(t){return null},_show:function(t){var e,i,n,s,a,o,r,l,c,h,u;for(t.preventDefault(),e=$(t.currentTarget).data("elementID"),i=null,this._dropdowns[e]||(this._triggerElements[e]=i=this._getTriggerElement(this._elements[e]).addClass("dropdownToggle"),(n=i[0].parentNode)&&"LI"===n.nodeName&&1===n.childElementCount||n&&n.classList.contains("contentInteractionButton")?n.classList.add("dropdown"):i.wrap('<span class="dropdown" />'),this._dropdowns[e]=$('<ul class="dropdownMenu" />').insertAfter(i)),this._dropdowns[e].empty(),this._dropDownIdToElementId.has(e)||(null===i&&(i=this._getTriggerElement(this._elements[e])),this._dropDownIdToElementId.set(i.parent().wcfIdentify(),e)),s=!1,a="",o=0,r=this._options.length;o<r;o++)"divider"===(l=this._options[o]).optionName?""!==a&&"divider"!==a&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[e]),a=l.optionName):(this._validate(e,l.optionName)||this._validateCallbacks(e,l.optionName))&&($("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[e]).data("elementID",e).data("optionName",l.optionName).data("isQuickOption",!!l.isQuickOption).click($.proxy(this._click,this)),s=!0,a=l.optionName);return s&&((c=this._dropdowns[e].children().last()).hasClass("dropdownDivider")&&c.remove(),h=null,u=0,this._dropdowns[e].children().each((function(t,e){var i=$(e);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?h=i:u++)})),!u)?(h.trigger("click"),this._triggerElements[e]&&WCF.Dropdown.close(this._triggerElements[e].parents(".dropdown").wcfIdentify()),!1):(null!==i&&WCF.Dropdown.initDropdown(i,t.originalEvent||t),!1)},_validate:function(t,e){return!1},_validateCallbacks:function(t,e){var i,n=this._callbacks.length;if(n)for(i=0;i<n;i++)if(this._callbacks[i].validate(this._elements[t],e))return!0;return!1},_success:function(t,e,i){this._updateData.length&&(this._updateState(t),this._updateData=[])},_updateState:function(t){},_click:function(t){var e=$(t.currentTarget),i=e.data("elementID"),n=e.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(t,e){return!1},_executeCallback:function(t,e){var i,n=this._callbacks.length;if(n)for(i=0;i<n;i++)if(this._callbacks[i].execute(this._elements[t],e))return!0;return!1},_hide:function(t){this._dropdowns[t]&&this._dropdowns[t].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(t,e,i,n){this._buttonSelector=t,this._fileListSelector=e,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var t;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),t=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(t[0],"role","button"),t.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",(function(){this.matches(":focus-visible")&&t[0].classList.add("active")})),this._fileUpload[0].addEventListener("blur",(function(){t[0].classList.remove("active")}))):(t=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(t[0],"role","button"),elAttr(t[0],"tabindex","0"),t.click($.proxy(this._showOverlay,this))),this._insertButton(t)},_insertButton:function(t){this._buttonSelector.prepend(t)},_removeButton:function(){var t=".uploadButton";this._supportsAJAXUpload||(t=".uploadFallbackButton"),this._buttonSelector.find(t).remove()},_upload:function(t,e,i,n){var s,a,o,r,l,c,h,u,d=null,p=[];if(void 0!==n)p=n;else if(e)p.push(e);else if(i){switch(s="",i.type){case"image/png":s=".png";break;case"image/jpeg":s=".jpg";break;case"image/gif":s=".gif";break;case"image/webp":s=".webp"}p.push({name:"pasted-from-clipboard"+s})}else p=this._fileUpload.prop("files");if(p.length){if(a=new FormData,d=this._createUploadMatrix(p),!this._uploadMatrix[d].length)return null;for(o=0,r=p.length;o<r;o++)this._uploadMatrix[d][o]&&(l=this._uploadMatrix[d][o].data("internalFileID"),i?a.append("__files["+l+"]",i,p[o].name):a.append("__files["+l+"]",p[o],p[o].name));for(h in a.append("actionName",this._options.action),a.append("className",this._className),c=this._getParameters())a.append("parameters["+h+"]",c[h]);u=this,$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:a,contentType:!1,processData:!1,success:function(t,e,i){u._success(d,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",(function(t){u._progress(d,t)}),!1),t},xhrFields:{withCredentials:!0}})}return d},_createUploadMatrix:function(t){var e,i,n,s,a;if(t.length){for(e=this._uploadMatrix.length,this._uploadMatrix[e]=[],i=0,n=t.length;i<n;i++)s=t[i],(a=this._initFile(s)).hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[e][i]=a);return e}return null},_success:function(t,e){},_error:function(t,e,i){},_progress:function(t,e){var i,n=Math.round(100*e.loaded/e.total);for(i in this._uploadMatrix[t])this._uploadMatrix[t][i].find("progress").attr("value",n)},_getParameters:function(){return{}},_initFile:function(t){return $("<li>"+t.name+" ("+t.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){var t,e,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),t=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(t),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(t),$('<input type="hidden" name="isFallback" value="1" />').appendTo(t),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(t),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(t),e=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+e[i]+'" />').appendTo(t);t.submit($.proxy((function(){var t={name:this._getFilename(),size:""},e=this._createUploadMatrix([t]),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(e)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(t){var e=$.parseJSON(this._iframe.contents().find("pre").html());this._success(t,e)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(t,e,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(t,e,i,n)},_upload:function(){var t,e,i,n,s,a,o,r=this._fileUpload.prop("files");for(t=0,e=r.length;t<e;t++)if(i=r[t],n=new FormData,s=this._createUploadMatrix(i),this._uploadMatrix[s].length){for(o in n.append("__files["+s+"]",i),n.append("actionName",this._options.action),n.append("className",this._className),a=this._getParameters())n.append("parameters["+o+"]",a[o]);this._sendRequest(s,n)}},_sendRequest:function(t,e){var i=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:e,contentType:!1,processData:!1,success:function(e,n,s){i._success(t,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",(function(e){i._progress(t,e)}),!1),e}})},_createUploadMatrix:function(t){var e=this._initFile(t);return e.hasClass("uploadFailed")?null:(e.data("filename",t.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=e,this._internalFileID-1)},_success:function(t,e){},_progress:function(t,e){var i=Math.round(100*e.loaded/e.total);this._uploadMatrix[t].find("progress").attr("value",i)},_showOverlay:function(){var t,e,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),t=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(t),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(t),$('<input type="hidden" name="isFallback" value="1" />').appendTo(t),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(t),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(t),e=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+e[i]+'" />').appendTo(t);t.submit($.proxy((function(){var t={name:this._getFilename(),size:""},e=this._createUploadMatrix(t),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(e)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(t){var e=$.parseJSON(this._iframe.contents().find("pre").html());this._success(t,e)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(t,e,i,n,s,a){var o,r,l;if(this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(t),this._container=$("#"+this._containerID),this._className=e,this._offset=i||0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,handle:"",helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{}),(o=$("#"+this._containerID+" .sortableList")).is("tbody")&&("li:not(.sortableNoSorting)"===this._options.items&&(this._options.items="tr:not(.sortableNoSorting)",this._options.toleranceElement=""),"clone"===this._options.helper&&(this._options.helper=this._tableRowHelper.bind(this),(r=o.prev("thead"))&&r.find("th").each((function(t,e){(e=$(e)).width(e.width())})))),s?o.sortable(this._options):o.nestedSortable(this._options),this._className){if(!(l=this._container.find(".formSubmit")).length&&!(l=this._container.next(".formSubmit")).length)return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(t,e){return e.children("td").each((function(t,e){(e=$(e)).width(e.width())})),e},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy((function(t,e){var i=$(e),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy((function(t,e){var i=$(e).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)}),this))}),this));var t=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:t}),this._proxy.sendRequest()},_success:function(t,e,i){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(t){var e=!1;require(["Environment"],function(t){"desktop"!==t.platform()&&(e=!0)}.bind(this)),e||(this._activeElementID="",this._identifier=t,require(["WoltLabSuite/Core/Controller/Popover"],function(e){e.init({attributeName:"legacy",className:t,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(t,e){this._activeElementID=t,this._popoverObj=e,this._loadContent()},_insertContent:function(t,e){this._popoverObj.setContent(this._identifier,t,e)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(t,e){if(this._itemList=$(t),this._searchInput=$(e),this._data={},this._itemList.length&&this._searchInput.length){if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",(function(){setTimeout((function(){i._onPaste()}),100)}))}this._searchInput.parents(".dropdown").data("preventSubmit",!0)}else console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(t){return null!==t||this._keyPress(null)},_keyPress:function(t){if(null===t||44===t.charCode||t.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&t.keyCode===$.ui.keyCode.ENTER){if(null!==t&&t.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var e=$.trim(this._searchInput.val());return t&&44===t.charCode&&(e=e.substring(0,this._searchInput.getCaret())),""===e||(this.addItem({objectID:0,label:e}),t&&44===t.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==t&&t.stopPropagation(),!1)}return!0},_onPaste:function(){var t,e,i,n=$.trim(this._searchInput.val());for(t=0,e=(n=n.split(",")).length;t<e;t++)""!==(i=$.trim(n[t]))&&this.addItem({objectID:0,label:i});this._searchInput.val("")},load:function(t){},_click:function(t){var e=$(t.currentTarget),i=e.data("objectID"),n=e.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),e.remove(),t.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(t){return!(!this._data[t.objectID]||0===t.objectID&&this._allowCustomInput)||($('<li class="badge">'+WCF.String.escapeHTML(t.label)+"</li>").data("objectID",t.objectID).data("label",t.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(t.label),this._addItem(t.objectID,t.label),!0)},clearList:function(){this._itemList.children("li").each($.proxy((function(t,e){var i=$(e);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))}),this))},_submit:function(){this._keyDown(null)},_addItem:function(t,e){this._data[t]=e},_removeItem:function(t,e){delete this._data[t]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(t,e,i,n,s,a){require(["WoltLabSuite/Core/Language/Chooser"],(function(o){o.init(t,e,i,n,s,a)}))}}),WCF.Style={},jQuery.fn.extend({wcfDialog:function(t){var e=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var s,a=i.identify(this[0]);"close"===t?n.close(a):"render"===t?n.rebuild(a):"option"===t?3===e.length&&("title"===e[1]&&"string"==typeof e[2]?n.setTitle(a,e[2]):0===e[1].indexOf("on")?n.setCallback(a,e[1],e[2]):"closeConfirmMessage"===e[1]&&null===e[2]&&n.setCallback(a,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),s=1===e.length&&"object"==typeof e[0]?e[0]:{},n.openStatic(a,null,s),s.hasOwnProperty("title")&&n.setTitle(a,s.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var t,e,i=$(this._items.get(0)).outerHeight();for(this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy((function(t,e){$(e).show().css({height:i,left:(this._width+this.options.itemGap)*t,width:this._width})}),this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element),t=0;t<this._count;t++)e=$('<li><a><fa-icon size="16" name="circle"></fa-icon></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList),0==t&&e.find("fa-icon")[0].setIcon("circle",!0);this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var t=$(this._items.get(0)).css("height","auto").outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy((function(t,e){$(e).css({left:(this._width+this.options.itemGap)*t,width:this._width})}),this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var t=this;this._timer=new WCF.PeriodicalExecuter((function(){t.moveTo(null)}),1e3*this.options.cycleInterval)}},_click:function(t){this.moveTo($(t.currentTarget).data("index")),this._resetTimer()},moveTo:function(t){this._index=null===t?this._index+1:t,this._index==this._count&&(this._index=0),this._buttonList[0].querySelectorAll("fa-icon").forEach((t=>t.setIcon("circle",!1))),$(this._buttonList.find("fa-icon").get(this._index))[0].setIcon("circle",!0),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(t){return this._items[t]?this._items[t]:null}}),jQuery.fn.extend({datepicker:function(t){var e=this[0],i=Array.prototype.slice.call(arguments,1);switch(t){case"destroy":window.__wcf_bc_datePicker.destroy(e);break;case"getDate":return window.__wcf_bc_datePicker.getDate(e);case"option":if("onClose"===i[0])return i.length>1?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(e,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(e,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+t+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(t){var e=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],(function(n,s){var a=s.getTabMenu(n.identify(e));null!==a&&a[t].apply(a,i)}))}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(t){this._api=new t(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(t){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:t})}.bind(this),callbackSwitch:function(t){this._trigger("switched",void 0,{activePage:t})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(t,e){if("activePage"==t&&e!=this.options[t]&&e>0&&e<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:e});i||void 0!==i?this._api.switchPage(e):this._trigger("notSwitched",void 0,{activePage:e})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var t=this;$(".jsCategory").each((function(e,i){var n,s=$(i).data("parentCategoryID",null).change($.proxy(t._updateSelection,t));t._categories[s.val()]=s,n=[],s.parents("li").find(".jsChildCategory").each((function(e,i){var a=$(i).data("parentCategoryID",s.val()).change($.proxy(t._updateSelection,t));t._categories[a.val()]=a,n.push(a.val()),a.is(":checked")&&s.prop("checked","checked")})),s.data("childCategoryIDs",n)}))},_updateSelection:function(t){var e,i,n,s=$(t.currentTarget),a=s.data("parentCategoryID");if(s.is(":checked"))null!==a&&this._categories[a].prop("checked","checked");else if(null===a)for(i=0,n=(e=s.data("childCategoryIDs")).length;i<n;i++)this._categories[e[i]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(t){this._list=$("#"+t),this._buildStructure(),this._list.find("input:checked").each((function(){$(this).trigger("change")})),this._list.children("li").length<2&&this._list.addClass("flexibleCategoryListDisabled")},_buildStructure:function(){var t=this;this._list.find(".jsCategory").each((function(e,i){var n=$(i).change(t._updateSelection.bind(t)),s=parseInt(n.val()),a=[];n.parents("li:eq(0)").find(".jsChildCategory").each((function(e,i){var s,o,r=$(i);r.data("parentCategory",n).change(t._updateSelection.bind(t)),s=parseInt(r.val()),a.push(r),o=[],r.parents("li:eq(0)").find(".jsSubChildCategory").each((function(e,i){var n=$(i);n.data("parentCategory",r).change(t._updateSelection.bind(t)),o.push(n)})),t._categories[s]=o})),t._categories[s]=a}))},_updateSelection:function(t){var e,i,n,s,a,o,r,l=$(t.currentTarget),c=parseInt(l.val()),h=l.data("parentCategory");if(l.is(":checked"))h&&(h.prop("checked","checked"),(h=h.data("parentCategory"))&&h.prop("checked","checked"));else{if(this._categories[c])for(e=0,i=this._categories[c].length;e<i;e++)if((n=this._categories[c][e]).prop("checked",!1),s=parseInt(n.val()),this._categories[s])for(a=0,o=this._categories[s].length;a<o;a++)this._categories[s][a].prop("checked",!1);if(h){for(r=parseInt(h.val()),e=0,i=this._categories[r].length;e<i;e++)if(this._categories[r][e].prop("checked"))return;if(h=h.data("parentCategory"))for(r=parseInt(h.val()),e=0,i=this._categories[r].length;e<i;e++)if(this._categories[r][e].prop("checked"))return}}}}),WCF.Condition={},WCF.Notice={}; })(this);
 
-// WCF.ACL.js
-(function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:null,_containerElements:{},_objectID:0,_objectTypeID:null,_options:{},_proxy:null,_search:null,_values:{group:{},user:{}},init:function(e,t,s,a,i,n,o){var r,c,l,h,p,u;this._objectID=a||0,this._objectTypeID=t,this._categoryName=s,void 0===i&&(i=!0),this._values={group:{},user:{}},this._aclValuesFieldName=o||"aclValues",this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._container=$(e).hide().addClass("aclContainer"),r=this._container.children("dd"),c=$('<ul class="aclList containerList" />').appendTo(r),l=$('<input type="text" class="long" placeholder="'+WCF.Language.get("wcf.acl.search."+(i?"":"user.")+"description")+'" />').appendTo(r),h=$('<ul class="aclPermissionList containerList" />').hide().appendTo(r),elData(h[0],"grant",WCF.Language.get("wcf.acl.option.grant")),elData(h[0],"deny",WCF.Language.get("wcf.acl.option.deny")),this._containerElements={aclList:c,permissionList:h,searchInput:l},this._search=new WCF.Search.User(l,$.proxy(this.addObject,this),i),(p=this._container.parents("form:eq(0)")).submit($.proxy(this.submit,this)),(u=p.find("input[type=reset]:eq(0)")).length&&u.click($.proxy(this._reset,this)),n?this._success(n):this._loadACL()},_reset:function(){this._values={group:{},user:{}},this._containerElements.aclList.empty(),this._containerElements.searchInput.val(""),this._containerElements.permissionList.hide().find("input[type=checkbox]").prop("checked",!1)},_loadACL:function(){this._proxy.setOption("data",{actionName:"loadAll",className:"wcf\\data\\acl\\option\\ACLOptionAction",parameters:{categoryName:this._categoryName,objectID:this._objectID,objectTypeID:this._objectTypeID}}),this._proxy.sendRequest()},addObject:function(e){var t=this._createListItem(e.objectID,e.label,e.type);this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),t.addClass("active"),this._search.addExcludedSearchValue(e.label),this._containerElements.permissionList.find("input[type=checkbox]").prop("checked",!1),this._containerElements.searchInput.val(""),this._containerElements.permissionList.show(),WCF.DOMNodeInsertedHandler.execute()},_createListItem:function(e,t,s){var a=$('<li><fa-icon size="16" name="'+("group"===s?"users":"user")+'" solid></fa-icon> <span class="aclLabel">'+t+"</span></li>").appendTo(this._containerElements.aclList);return a.data("objectID",e).data("type",s).data("label",t).click($.proxy(this._click,this)),$('<button type="button" title="'+WCF.Language.get("wcf.global.button.delete")+'"><fa-icon size="16" name="xmark" solid></fa-icon></button>').click($.proxy(this._removeItem,this)).appendTo(a),a},_removeItem:function(e){var t,s,a;this._savePermissions(),s=(t=$(e.currentTarget).parent()).data("type"),a=t.data("objectID"),this._search.removeExcludedSearchValue(t.data("label")),t.remove(),this._values[s][a]&&delete this._values[s][a],this._selectFirstEntry()},_selectFirstEntry:function(){var e=this._containerElements.aclList.children("li:eq(0)");e.length?this._select(e,!1):this._reset()},_success:function(e,t,s){var a,i,n,o,r,c,l,h,p,u;if($.getLength(e.returnValues.options)){for(i in a={},e.returnValues.options)n=e.returnValues.options[i],o=$("<li><span>"+n.label+"</span></li>").data("optionID",i).data("optionName",n.optionName),r=$('<input type="checkbox" id="grant'+i+'" />').appendTo(o).wrap('<label for="grant'+i+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),c=$('<input type="checkbox" id="deny'+i+'" />').appendTo(o).wrap('<label for="deny'+i+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />'),r.data("type","grant").data("optionID",i).change($.proxy(this._change,this)),c.data("type","deny").data("optionID",i).change($.proxy(this._change,this)),a[n.categoryName]||(a[n.categoryName]=[]),""===n.categoryName?o.appendTo(this._containerElements.permissionList):a[n.categoryName].push(o);if($.getLength(a))for(l in a)for(h=a[l],e.returnValues.categories[l]&&$('<li class="aclCategory">'+e.returnValues.categories[l]+"</li>").appendTo(this._containerElements.permissionList),p=0,u=h.length;p<u;p++)h[p].appendTo(this._containerElements.permissionList);this._parseData(e,"group"),this._parseData(e,"user"),this._container.show(),require(["WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager"],(function(e){e.checkDependencies()})),this._selectFirstEntry()}},_parseData:function(e,t){if($.getLength(e.returnValues[t].option)){for(var s in e.returnValues[t].label)this._createListItem(s,e.returnValues[t].label[s],t),this._search.addExcludedSearchValue(e.returnValues[t].label[s]);this._values[t]=e.returnValues[t].option,WCF.DOMNodeInsertedHandler.execute()}},_click:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._select(t,!0)},_select:function(e,t){t&&this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),e.addClass("active"),this._setupPermissions(e.data("type"),e.data("objectID"))},_change:function(e){var t=$(e.currentTarget),s=t.data("optionID"),a=t.data("type");t.is(":checked")&&("deny"===a?$("#grant"+s).prop("checked",!1):$("#deny"+s).prop("checked",!1))},_setupPermissions:function(e,t){if(this._containerElements.permissionList.find("input[type='checkbox']").prop("checked",!1),this._values[e]&&this._values[e][t])for(var s in this._values[e][t])1==this._values[e][t][s]?$("#grant"+s).prop("checked",!0).trigger("change"):$("#deny"+s).prop("checked",!0).trigger("change");this._containerElements.permissionList.show()},_savePermissions:function(){var e,t,s=this._containerElements.aclList.find("li.active");s.length&&(e=s.data("objectID"),t=s.data("type"),this._values[t][e]={},this._containerElements.permissionList.find("input[type='checkbox']").each(function(s,a){var i=$(a),n="deny"===i.data("type")?0:1,o=i.data("optionID");i.is(":checked")?(this._values[t][e][o]=n,i.prop("checked",!1)):this._values[t]&&this._values[t][e]&&this._values[t][e][o]&&this._values[t][e][o]==n&&delete this._values[t][e][o]}.bind(this)))},submit:function(e){this._savePermissions(),this._save("group"),this._save("user")},_save:function(e){var t,s,a,i;if($.getLength(this._values[e]))for(s in t=this._container.parents("form:eq(0)"),this._values[e])for(i in a=this._values[e][s])$('<input type="hidden" name="'+this._aclValuesFieldName+"["+e+"]["+s+"]["+i+']" value="'+a[i]+'" />').appendTo(t)},getData:function(){return this._savePermissions(),this._values}}); })(this);
-
-// WCF.Attachment.js
-(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_options:{},_pendingDragAndDrop:void 0,_sourceElement:void 0,init:function(t,e,i,n,a,s,o,r,l){if(this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:o}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(n),this._tmpHash=a,this._parentObjectID=parseInt(s),this._editorId=r,this._options=$.extend(!0,this._options,l||{}),this._pendingDragAndDrop=new Map,this._sourceElement=document.getElementById(r),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),this._fileListSelector.children("li").addClass("formAttachmentListItem"),WCF.System.Event.addListener("WoltLabSuite/Core/Ui/Object/Action","delete",(t=>this._onDelete(t))),this._makeSortable(),this._insertAllButton=$('<button type="button" class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</button>").hide(),null!==this._sourceElement){this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),require(["WoltLabSuite/Core/Component/Ckeditor","WoltLabSuite/Core/Component/Ckeditor/Event"],(({getCkeditor:t},{listenToCkeditor:e})=>{const n=()=>{"com.woltlab.wcf.user.signature"!==i&&this._fileListSelector[0].querySelectorAll('li:not(.uploadFailed) .jsObjectAction[data-object-action="delete"]').forEach((t=>{delete t.dataset.confirmMessage,t.click()}))};e(this._sourceElement).reset((()=>{this._reset()})).uploadAttachment((t=>{this._editorUpload(t)})).discardRecoveredData((()=>{n()})).collectMetaData((t=>{this._tmpHash&&(t.metaData.tmpHash=this._tmpHash)}));const a=t(this._sourceElement);a?""===a.getHtml()&&n():e(this._sourceElement).ready((({ckeditor:t})=>{""===t.getHtml()&&n()}))}));const t=this._fileListSelector[0].closest("form");t&&t.addEventListener("submit",(()=>{const e=t.querySelector('input[name="tmpHash"]');e&&(e.value=this._tmpHash)}));var c=WCF.System.Event.addListener("com.woltlab.wcf.ckeditor5","sync_"+this._tmpHash,this._sync.bind(this));WCF.System.Event.addListener("com.woltlab.wcf.ckeditor5","destroy_"+this._editorId,function(){WCF.System.Event.removeListener("com.woltlab.wcf.ckeditor5","sync_"+this._tmpHash,c)}.bind(this))}},_editorUpload:function(t){t.promise=new Promise((e=>{this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0),this._upload(void 0,t.file,void 0,(i=>{this._pendingDragAndDrop.set(i,((i,n)=>{0===i?t.abortController.abort():e({attachmentId:i,url:n})}))}))}))},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t,e=this._buttonSelector.next("small.innerError"),i=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,n=this._fileUpload?this._fileUpload.prop("files").length:0;return i<=0||i<n?(t=i<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,i),e.length||(e=$('<small class="innerError" />').insertAfter(this._buttonSelector)),e.html(t),!1):(e.remove(),!0)},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._sourceElement&&t.button&&this._removeAttachmentFromEditor(t.button.data("objectID"))},_upload:function(t,e,i,n){var a=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(s,o,r,l){var c,d,h,u;l.show(),c=[],e?c.push(e):i?c.push(s.blobToFile(i,"pasted-from-clipboard")):c=this._fileUpload.prop("files"),d=Promise.resolve(c),this._options.autoScale&&this._options.autoScale.enable&&(h=this._buttonSelector.data("maxSize"),u=new r,d=Array.prototype.reduce.call(c,function(t,e){return t.then(function(t){var i,n;return-1===["image/png","image/jpeg","image/webp"].indexOf(e.type)?(t.push(e),t):(i=new Promise((function(t,i){setTimeout((function(){t(e)}),1e4)})),n=u.loadFile(e).then(function(t){var n,a,s=t.exif,r=this._options.autoScale.maxWidth,l=this._options.autoScale.maxHeight,c=this._options.autoScale.quality;return window.devicePixelRatio>=2&&(n=window.screen.width*window.devicePixelRatio,a=window.screen.height*window.devicePixelRatio,n-10<t.image.width&&t.image.width<n+10&&a-10<t.image.height&&(r=Math.min(r,window.screen.width))),u.resize(t.image,r,l,c,e.size>h,i).then(function(t){if(void 0===t)return e;var i=this._options.autoScale.fileType;return("keep"===this._options.autoScale.fileType||o.containsTransparentPixels(t))&&(i=e.type),u.saveFile({exif:s,image:t},e.name,i,c)}.bind(this)).then((function(t){return t.size>e.size?(console.debug('[WCF.Attachment] File size of "'+e.name+'" increased, uploading untouched image.'),e):t}))}.bind(this)).catch((function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+e.name+'":',t),e})),Promise.race([i,n]).then((function(e){return t.push(e),t})))}.bind(this))}.bind(this),Promise.resolve([]))),d.then(function(e){var i=void 0;return this._validateLimit()&&(i=a(t,void 0,void 0,e)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof n&&n(i),i}.bind(this)).catch((function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)})).finally(l.hide)}.bind(this),(function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)}))},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><fa-icon size="64" name="spinner"></fa-icon><div><div><p>'+WCF.String.escapeHTML(t.name)+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e[0].querySelector("fa-icon").setIcon("ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_success:function(t,e){var i,n,a,s,o,r,l,c,d,h,u;for(n in this._uploadMatrix[t]){if(!this._uploadMatrix[t].hasOwnProperty(n))continue;(a=this._uploadMatrix[t][n]).find("progress").remove(),s=a.data("filename"),o=a.data("internalFileID");let m=0,p="";e.returnValues&&e.returnValues.attachments[o]?(i=e.returnValues.attachments[o],elData(a[0],"object-id",i.attachmentID),a.addClass("jsObjectActionObject"),i.tinyURL?(a.find("fa-icon").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),a.data("height",i.height),a.data("width",i.width),elData(a[0],"is-image",i.isImage)):a[0].querySelector("fa-icon").setIcon(i.iconName),(r=$('<a href=""></a>')).text(s).attr("href",i.url),p=i.url,r[0].target="_blank",0!=i.isImage&&r.addClass("jsImageViewer").attr("title",s),a.find("p").empty().append(r),a.find("small").append(i.formattedFilesize),l=a.find("ul").addClass("buttonGroup"),c=$('<li><button type="button" class="button small jsObjectAction" data-object-action="delete" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</button></li>"),l.append(c),a.data("objectID",i.attachmentID),m=i.attachmentID,this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><button type="button" class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</button></li>").appendTo(l),$('<li><button type="button" class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</button></li>").appendTo(l)):$('<li><button type="button" class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</button></li>").appendTo(l)),this._triggerSync("new",{html:a[0].outerHTML}),this._registerEditorButtons(a[0])):(a[0].querySelector("fa-icon").setIcon("ban"),d="",e.returnValues&&e.returnValues.errors[o]?"uploadFailed"===(d=(h=e.returnValues.errors[o]).errorType)&&h.additionalData.phpLimitExceeded&&(d="uploadPhpLimit"):d="uploadFailed",a.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+d)+"</small>")),a.addClass("uploadFailed"));const f=this._pendingDragAndDrop.get(t);void 0!==f&&(f(m,p),this._pendingDragAndDrop.delete(t)),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),a.hasClass("uploadFailed")||((u=a.find(".jsButtonAttachmentInsertThumbnail")).length||(u=a.find(".jsButtonAttachmentInsertFull")),u.trigger("click")))}this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){const e=parseInt(t.currentTarget.dataset.objectId),i=t.currentTarget.dataset.url||"";require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:t})=>{t(this._sourceElement).insertAttachment({attachmentId:e,url:i})}))},_insertAll:function(){var t,e,i,n;for(i=0,n=this._fileListSelector[0].childNodes.length;i<n;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(t){this._fileListSelector.find("li").each((function(e,i){var n=$(i);const a=i.querySelector('fa-icon[name="spinner"]');if(a){n.addClass("uploadFailed"),a.setIcon("ban");let e=WCF.Language.get("wcf.attachment.upload.error.uploadFailed");t.responseJSON&&t.responseJSON.message?e=t.responseJSON.message:413==t.status&&(e=WCF.Language.get("wcf.attachment.upload.error.http413")),n.find("div > div").append($('<small class="innerError">'+e+"</small>"))}}))},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var t=[];this._fileListSelector.children("li:not(.uploadFailed)").each((function(e,i){t.push($(i).data("objectID"))})),t.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:t,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){if(!t.objectElement.classList.contains("formAttachmentListItem"))return;const e=t.objectElement.dataset.objectId,i=this._fileListSelector[0].querySelector(`.formAttachmentListItem[data-object-id="${e}"]`);null!==i&&i.remove(),this._removeLimitError({}),this._removeAttachmentFromEditor(e)},_sync:function(t){if(t.source!==this){if("new"!==t.type)throw new Error("Unexpected type '"+t.type+"'");this._syncNew(t.data)}},_syncNew:function(t){require(["Dom/Util"],function(e){var i=e.createFragmentFromHtml(t.html),n=elBySel("li",i);n.id="",this._registerEditorButtons(n),this._fileListSelector[0].appendChild(n),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5","sync_"+this._tmpHash,{source:this,type:t,data:e})},_removeAttachmentFromEditor(t){require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(this._sourceElement).removeAttachment({attachmentId:parseInt(t)})}))}}); })(this);
-
 // WCF.ColorPicker.js
 (function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({init:function(o){this.colorPickers=[],require(["WoltLabSuite/Core/Ui/Color/Picker"],(c=>{const r=document.querySelectorAll(o);r.length?r.forEach((o=>{this.colorPickers.push(new c(o))})):console.debug("[WCF.ColorPicker] Selector does not match any element, aborting.")}))},setCallbackSubmit:function(o){this.colorPickers.forEach((c=>{c.setCallbackSubmit(o)}))},hsvToRgb:function(o,c,r){return window.__wcf_bc_colorUtil.hsvToRgb(o,c,r)},rgbToHsv:function(o,c,r){return window.__wcf_bc_colorUtil.rgbToHsv(o,c,r)},hexToRgb:function(o){return window.__wcf_bc_colorUtil.hexToRgb(o)},rgbToHex:function(o,c,r){return window.__wcf_bc_colorUtil.rgbToHex(o,c,r)}}),void 0===window.__wcf_bc_colorUtil&&require(["ColorUtil"],(function(o){})),"function"==typeof window.__wcf_bc_colorPickerInit&&window.__wcf_bc_colorPickerInit(); })(this);
 
 // WCF.ImageViewer.js
-(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var e=$("a.jsImageViewer");e.length&&e.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(e){e.ctrlKey||(e.preventDefault(),e.stopPropagation(),$(e.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(e.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy((function(e,i){i.complete&&this._checkImageSize({currentTarget:i})}),this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(e){var i,t=$(e.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((i=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<i.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_messageSignature:null,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._messageSignature=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(e){if(null!=e.state&&"imageViewer"===e.state.name&&e.state.container===this._eventNamespace)return this.open(e),void this.showImage(e.state.image);this.close(e)}.bind(this))},open:function(e,i){if(e&&e.preventDefault(),this._isOpen)return!1;if(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e&&"popstate"===e.type||window.history.pushState({name:"imageViewer"},"",""),this._messageSignature=null,this.options.staticViewer){i&&(this._messageSignature=document.getElementById(i).closest(".messageSignature")),this._active=-1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=null;var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,i),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy((function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()}),this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),require(["Ui/Screen"],(function(e){e.pageOverlayOpen()})),!0},close:function(e){if(e&&e.preventDefault(),e&&"popstate"===e.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],(function(e){e.pageOverlayClose()})),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy((function(){var e=this._active+1;e==this._items&&(e=0),this.showImage(e)}),this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("pause"),!0)},stopSlideshow:function(e){return!!this._slideshowEnabled&&(this._timer.stop(),e&&this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("play"),this._slideshowEnabled=!1,!0)},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,(()=>{window.setTimeout((()=>this._renderImage()),0)}))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(e){switch(e.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var i=this._ui.header.find("h1 > a");1==i.length?window.location=i.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(e,i,t){var s,a,n,h,o;this._container.addClass("open"),s=null,e&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!i&&!t&&this.startSlideshow()),i?this._ui.imageList.children("li").each($.proxy((function(e,t){var s=$(t);if(s.data("objectID")==i)return s.trigger("click"),this.moveToImage(s.data("index")),!1}),this)):t?(a=[],$(this.options.imageSelector).each(function(e,i){i.closest(".messageSignature")===this._messageSignature&&a.push(i)}.bind(this)),n=0,a.forEach((function(e,i){e.id===t&&(n=i)})),h=this._ui.imageList.children("li:eq("+n+")"),-1!==this._active&&(o=!1,this._active!=h.data("index")&&(o=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(o=!0),o&&(this._active=-1)),h.trigger("click"),this.moveToImage(h.data("index"))):null!==s&&s.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(e){this.showImage($(e.currentTarget).data("index"),!0)},showImage:function(e,i){var t,s,a,n,h,o;return this._active!=e&&(this.stopSlideshow(i||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=e,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"",""),t=this._images[e],this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active"),s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a,n=this._active,this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy((function(){this._imageOnLoad(n,a)}),this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL),h=WCF.String.escapeHTML(t.image.title),t.image.link&&(h='<a href="'+t.image.link+'">'+h+"</a>"),this._ui.header.find("h1").html(h),this.options.staticViewer||(o=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(o='<a href="'+t.series.link+'">'+o+"</a>"),this._ui.header.find("h2").html(o)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full[0].querySelector("a").href=t.image.fullURL?t.image.fullURL:t.image.url,this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0)},_imageOnLoad:function(e,i){e==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[i].addClass("active"),this.options.staticViewer&&this._renderImage(i,null),this.startSlideshow())},_renderImage:function(e,i,t){var s,a,n,h,o,l,r=!0;i||(e=this._activeImage,i=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},r=!1),t.height-=22,t.width-=20,(s=this._ui.images[e]).prop("src")!==i.image.url&&s.prop("src",i.image.url),r&&s[0].complete&&s.trigger("load"),this.options.staticViewer&&!i.image.height&&s[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=i.image.url,i.image.height=a.height||s[0].naturalHeight,i.image.width=a.width||s[0].naturalWidth):(s.css({height:"auto",width:"auto"}),i.image.height=s[0].height,i.image.width=s[0].width)),n=i.image.height,h=i.image.width,o=0,n>t.height&&(o=t.height/n,n=t.height,h=Math.floor(h*o)),h>t.width&&(o=t.width/h,h=t.width,n=Math.floor(n*o)),l=Math.floor((t.width-h)/2),this._ui.images[e].css({height:n+"px",left:l+10+"px",marginTop:-1*Math.round(n/2)+"px",width:h+"px"})},_initUI:function(){var e,i,t,s,a,n,h,o;return!this._didInit&&(this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body),e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious"><fa-icon size="24" name="angles-left"></fa-icon></span><div><ul /></div><span class="wcfImageViewerButtonNext"><fa-icon size="24" name="angles-right"></fa-icon></span></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><fa-icon size="32" name="angle-left"></fa-icon></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><fa-icon size="32" name="play"></fa-icon></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><fa-icon size="32" name="angle-right"></fa-icon></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><fa-icon size="32" name="expand"></fa-icon></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><a href="#" target="_blank"><fa-icon size="32" name="arrow-up-right-from-square"></fa-icon></a></li>').appendTo(t),this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")})),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")}))],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy((function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))}),this)),$(`<button type="button" class="wcfImageViewerButtonClose jsTooltip" title="${WCF.Language.get("wcf.global.button.close")}">\n\t\t\t<fa-icon size="48" name="xmark"></fa-icon>\n\t\t</button>`).appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(e){e.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0)},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var e=this;this._ui.imageContainer.swipe({swipeLeft:function(i){e._container.hasClass("maximized")&&e._nextImage(i)},swipeRight:function(i){e._container.hasClass("maximized")&&e._previousImage(i)},tap:function(i,t){switch(t.tagName){case"DIV":case"IMG":e._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active"),this._ui.slideshow.enlarge[0].querySelector("fa-icon").setIcon("compress"),this._renderImage(null,void 0,null)},_next:function(e,i){if(this._ui.buttonNext.hasClass("pointer")){null==i&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(i||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(e,i){this._ui.buttonPrevious.hasClass("pointer")&&(null==i&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(i||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(e){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),e&&(e.preventDefault(),e.stopPropagation()))},_previousImage:function(e){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),e&&(e.preventDefault(),e.stopPropagation()))},moveToImage:function(e){var i,t=(e-3)*this._thumbnailWidth,s=t+5*this._thumbnailWidth,a=this._thumbnailOffset,n=this._thumbnailOffset+this._thumbnailContainerWidth,h=!1;if((t<a||s>n)&&(h=!0),h)if(i=0,t<a){for(;t<a;)i++,a-=this._thumbnailWidth;this._previous(null,i)}else{for(;s>n;)i++,n+=this._thumbnailWidth;this._next(null,i)}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var e=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=e?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(e){var i,t,s,a,n,h;for(this.options.staticViewer&&(this._images=[],this._ui.imageList.empty()),i=0,t=e.length;i<t;i++)s=e[i],(a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList)).data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this)),(n=a.children("img")).get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n)):(h=this,n.on("load",(function(){var e=$(this);e.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(e)}))),s.listItem=a,this._images.push(s)},_fixThumbnailDimensions:function(e){var i,t,s,a=new Image;a.src=e.prop("src"),(i=a.height)==(t=a.width)?i=t=80:i<t?(s=80/t,t=80,i*=s):(s=80/i,i=80,t*=s),e.css({height:i+"px",width:t+"px"})},_loadNextImages:function(e){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:e&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var e=[];return $(this.options.imageSelector).each(function(i,t){var s,a;t.closest(".messageSignature")===this._messageSignature&&((a=(s=$(t)).find("> img, .attachmentThumbnailImage > img").first()).length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),e.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:a.prop("src")},user:null}))}.bind(this)),this._items=e.length,e},_success:function(e,i,t){var s,a;e.returnValues.items&&(this._items=e.returnValues.items),s=this._initUI(),this._createThumbnails(e.returnValues.images),a=e.returnValues.targetImageID?e.returnValues.targetImageID:0,this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
+(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var e=$("a.jsImageViewer");e.length&&e.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(e){e.ctrlKey||(e.preventDefault(),e.stopPropagation(),$(e.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(e.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy((function(e,i){i.complete&&this._checkImageSize({currentTarget:i})}),this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(e){var i,t=$(e.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((i=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<i.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_messageSignature:null,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._messageSignature=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(e){if(null!=e.state&&"imageViewer"===e.state.name&&e.state.container===this._eventNamespace)return this.open(e),void this.showImage(e.state.image);this.close(e)}.bind(this))},open:function(e,i){if(e&&e.preventDefault(),this._isOpen)return!1;if(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e&&"popstate"===e.type||window.history.pushState({name:"imageViewer"},"",""),this._messageSignature=null,this.options.staticViewer){i&&(this._messageSignature=document.getElementById(i).closest(".messageSignature")),this._active=-1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=null;var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,i),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy((function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()}),this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),require(["Ui/Screen"],(function(e){e.pageOverlayOpen()})),!0},close:function(e){if(e&&e.preventDefault(),e&&"popstate"===e.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],(function(e){e.pageOverlayClose()})),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy((function(){var e=this._active+1;e==this._items&&(e=0),this.showImage(e)}),this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("pause"),!0)},stopSlideshow:function(e){return!!this._slideshowEnabled&&(this._timer.stop(),e&&this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("play"),this._slideshowEnabled=!1,!0)},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,(()=>{window.setTimeout((()=>this._renderImage()),0)}))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(e){switch(e.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var i=this._ui.header.find("h1 > a");1==i.length?window.location=i.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(e,i,t){var s,a,n,h,o;this._container.addClass("open"),s=null,e&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!i&&!t&&this.startSlideshow()),i?this._ui.imageList.children("li").each($.proxy((function(e,t){var s=$(t);if(s.data("objectID")==i)return s.trigger("click"),this.moveToImage(s.data("index")),!1}),this)):t?(a=[],$(this.options.imageSelector).each(function(e,i){i.closest(".messageSignature")===this._messageSignature&&a.push(i)}.bind(this)),n=0,a.forEach((function(e,i){e.id===t&&(n=i)})),h=this._ui.imageList.children("li:eq("+n+")"),-1!==this._active&&(o=!1,this._active!=h.data("index")&&(o=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(o=!0),o&&(this._active=-1)),h.trigger("click"),this.moveToImage(h.data("index"))):null!==s&&s.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(e){this.showImage($(e.currentTarget).data("index"),!0)},showImage:function(e,i){var t,s,a,n,h,o;return this._active!=e&&(this.stopSlideshow(i||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=e,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"",""),t=this._images[e],this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active"),s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a,n=this._active,this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy((function(){this._imageOnLoad(n,a)}),this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL),h=WCF.String.escapeHTML(t.image.title),t.image.link&&(h='<a href="'+t.image.link+'">'+h+"</a>"),this._ui.header.find("h1").html(h),this.options.staticViewer||(o=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(o='<a href="'+t.series.link+'">'+o+"</a>"),this._ui.header.find("h2").html(o)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full[0].querySelector("a").href=t.image.fullURL?t.image.fullURL:t.image.url,this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0)},_imageOnLoad:function(e,i){e==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[i].addClass("active"),this.options.staticViewer&&this._renderImage(i,null),this.startSlideshow())},_renderImage:function(e,i,t){var s,a,n,h,o,l,r=!0;i||(e=this._activeImage,i=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},r=!1),t.height-=22,t.width-=20,(s=this._ui.images[e]).prop("src")!==i.image.url&&s.prop("src",i.image.url),r&&s[0].complete&&s.trigger("load"),this.options.staticViewer&&!i.image.height&&s[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=i.image.url,i.image.height=a.height||s[0].naturalHeight,i.image.width=a.width||s[0].naturalWidth):(s.css({height:"auto",width:"auto"}),i.image.height=s[0].height,i.image.width=s[0].width)),n=i.image.height,h=i.image.width,o=0,n>t.height&&(o=t.height/n,n=t.height,h=Math.floor(h*o)),h>t.width&&(o=t.width/h,h=t.width,n=Math.floor(n*o)),l=Math.floor((t.width-h)/2),this._ui.images[e].css({height:n+"px",left:l+10+"px",marginTop:-1*Math.round(n/2)+"px",width:h+"px"})},_initUI:function(){var e,i,t,s,a,n,h,o;return!this._didInit&&(this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body),e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious"><fa-icon size="24" name="angles-left"></fa-icon></span><div><ul /></div><span class="wcfImageViewerButtonNext"><fa-icon size="24" name="angles-right"></fa-icon></span></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><fa-icon size="32" name="angle-left"></fa-icon></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><fa-icon size="32" name="play"></fa-icon></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><fa-icon size="32" name="angle-right"></fa-icon></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><fa-icon size="32" name="expand"></fa-icon></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><a href="#" target="_blank"><fa-icon size="32" name="arrow-up-right-from-square"></fa-icon></a></li>').appendTo(t),this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")})),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")}))],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy((function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))}),this)),$(`<button type="button" class="wcfImageViewerButtonClose jsTooltip" title="${WCF.Language.get("wcf.global.button.close")}">\n\t\t\t<fa-icon size="48" name="xmark"></fa-icon>\n\t\t</button>`).appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(e){e.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0)},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var e=this;this._ui.imageContainer.swipe({swipeLeft:function(i){e._container.hasClass("maximized")&&e._nextImage(i)},swipeRight:function(i){e._container.hasClass("maximized")&&e._previousImage(i)},tap:function(i,t){switch(t.tagName){case"DIV":case"IMG":e._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active"),this._ui.slideshow.enlarge[0].querySelector("fa-icon").setIcon("compress"),this._renderImage(null,void 0,null)},_next:function(e,i){if(this._ui.buttonNext.hasClass("pointer")){null==i&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(i||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(e,i){this._ui.buttonPrevious.hasClass("pointer")&&(null==i&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(i||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(e){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),e&&(e.preventDefault(),e.stopPropagation()))},_previousImage:function(e){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),e&&(e.preventDefault(),e.stopPropagation()))},moveToImage:function(e){var i,t=(e-3)*this._thumbnailWidth,s=t+5*this._thumbnailWidth,a=this._thumbnailOffset,n=this._thumbnailOffset+this._thumbnailContainerWidth,h=!1;if((t<a||s>n)&&(h=!0),h)if(i=0,t<a){for(;t<a;)i++,a-=this._thumbnailWidth;this._previous(null,i)}else{for(;s>n;)i++,n+=this._thumbnailWidth;this._next(null,i)}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var e=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=e?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(e){var i,t,s,a,n,h;for(this.options.staticViewer&&(this._images=[],this._ui.imageList.empty()),i=0,t=e.length;i<t;i++)s=e[i],(a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList)).data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this)),(n=a.children("img")).get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n)):(h=this,n.on("load",(function(){var e=$(this);e.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(e)}))),s.listItem=a,this._images.push(s)},_fixThumbnailDimensions:function(e){var i,t,s,a=new Image;a.src=e.prop("src"),(i=a.height)==(t=a.width)?i=t=80:i<t?(s=80/t,t=80,i*=s):(s=80/i,i=80,t*=s),e.css({height:i+"px",width:t+"px"})},_loadNextImages:function(e){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:e&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var e=[];return $(this.options.imageSelector).each(function(i,t){var s,a;if(t.closest(".messageSignature")!==this._messageSignature)return;(a=(s=$(t)).find("> img, .attachmentThumbnailImage > img").first()).length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail"));let n="";if(0===a.length){const e=s[0].closest(".attachment__item");if(null!==e){const i=e.querySelector("woltlab-core-file"),t=i?.thumbnails.find((e=>"tiny"===e.identifier));n=t.link}}else n=a.prop("src");e.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:n},user:null})}.bind(this)),this._items=e.length,e},_success:function(e,i,t){var s,a;e.returnValues.items&&(this._items=e.returnValues.items),s=this._initUI(),this._createThumbnails(e.returnValues.images),a=e.returnValues.targetImageID?e.returnValues.targetImageID:0,this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
 
 // WCF.Label.js
-(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList={},WCF.Label.ACPList.Connect=Class.extend({init:function(){var t=$("#connect .structuredList li");t.length&&t.each($.proxy((function(t,e){$(e).find('input[type="checkbox"]').click($.proxy(this._click,this))}),this))},_click:function(t){var e,i=$(t.currentTarget);if(i.is(":checked"))for(e=(i=i.parents("li")).data("depth");;){if(!(i=i.next()).length)return!0;if(i.data("depth")<=e)return!0;i.find('input[type="checkbox"]').prop("checked","checked")}}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,i,n){var o,a,s,l;if(this._container=null,this._groups={},this._showWithoutSelection=!0===n,this._initContainers(e),$.getLength(t))for(o in t)(a=this._groups[o])&&WCF.Dropdown.getDropdownMenu(a.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy((function(e,i){var n=$(i),a=n.data("labelID")||0;a&&t[o]==a&&this._selectLabel(n,!0)}),this));for(s in this._containers)void 0===(l=this._containers[s]).data("labelID")&&l.data("labelID",0);this._container=$(e),i?$(i).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function e(t){t.addEventListener("wheel",(function(t){t.preventDefault()}),{passive:!1})}$(t).find(".labelChooser").each($.proxy((function(t,i){var n,o,a,s,l=$(i),r=l.data("groupID");this._groups[r]||(n=l.wcfIdentify(),null===(o=WCF.Dropdown.getDropdownMenu(n))&&(WCF.Dropdown.initDropdown(l.find(".dropdownToggle")),o=WCF.Dropdown.getDropdownMenu(n)),a=o,"div"==o.getTagName()&&o.children(".scrollableDropdownMenu").length&&(a=$("<ul />").appendTo(o),o=o.children(".scrollableDropdownMenu")),this._groups[r]=l,o.children("li").data("groupID",r).click($.proxy(this._click,this)),l.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(a),this._showWithoutSelection&&e($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(a).click($.proxy(this._click,this))[0]),l.data("forceSelection")||((s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(a)).click($.proxy(this._click,this)),e(s[0])))}),this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t,e,i=this._container.find(".formSubmit");for(t in i.find('input[type="hidden"]').each((function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()})),this._groups)(e=this._groups[t]).data("labelID")&&$('<input type="hidden" name="labelIDs['+t+']" value="'+e.data("labelID")+'" />').appendTo(i)},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:null,init:function(t,e,i,n,o){this._super(e,i,n,o),this._labelGroupsToCategories=t,this._updateLabelGroups(),$("#categoryID").change($.proxy(this._updateLabelGroups,this))},_updateLabelGroups:function(){var t,e,i;if($(".labelChooser").each((function(t,e){$(e).parents("dl:eq(0)").hide()})),t=parseInt($("#categoryID").val()),this._labelGroupsToCategories[t])for(e=0,i=this._labelGroupsToCategories[t].length;e<i;e++)$("#labelGroup"+this._labelGroupsToCategories[t][e]).parents("dl:eq(0)").show()},_submit:function(){for(var t in this._groups)this._groups[t].is(":visible")||delete this._groups[t];this._super()}}); })(this);
+(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,i,o){var a,n,s,l;if(this._container=null,this._groups={},this._showWithoutSelection=!0===o,this._initContainers(e),$.getLength(t))for(a in t)(n=this._groups[a])&&WCF.Dropdown.getDropdownMenu(n.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy((function(e,i){var o=$(i),n=o.data("labelID")||0;n&&t[a]==n&&this._selectLabel(o,!0)}),this));for(s in this._containers)void 0===(l=this._containers[s]).data("labelID")&&l.data("labelID",0);this._container=$(e),i?$(i).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function e(t){t.addEventListener("wheel",(function(t){t.preventDefault()}),{passive:!1})}$(t).find(".labelChooser").each($.proxy((function(t,i){var o,a,n,s,l=$(i),r=l.data("groupID");this._groups[r]||(o=l.wcfIdentify(),null===(a=WCF.Dropdown.getDropdownMenu(o))&&(WCF.Dropdown.initDropdown(l.find(".dropdownToggle")),a=WCF.Dropdown.getDropdownMenu(o)),n=a,"div"==a.getTagName()&&a.children(".scrollableDropdownMenu").length&&(n=$("<ul />").appendTo(a),a=a.children(".scrollableDropdownMenu")),this._groups[r]=l,a.children("li").data("groupID",r).click($.proxy(this._click,this)),l.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(n),this._showWithoutSelection&&e($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(n).click($.proxy(this._click,this))[0]),l.data("forceSelection")||((s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(n)).click($.proxy(this._click,this)),e(s[0])))}),this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t,e,i=this._container.find(".formSubmit");for(t in i.find('input[type="hidden"]').each((function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()})),this._groups)(e=this._groups[t]).data("labelID")&&$('<input type="hidden" name="labelIDs['+t+']" value="'+e.data("labelID")+'" />').appendTo(i)},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:null,init:function(t,e,i,o,a){this._super(e,i,o,a),this._labelGroupsToCategories=t,this._updateLabelGroups(),$("#categoryID").change($.proxy(this._updateLabelGroups,this))},_updateLabelGroups:function(){var t,e,i;if($(".labelChooser").each((function(t,e){$(e).parents("dl:eq(0)").hide()})),t=parseInt($("#categoryID").val()),this._labelGroupsToCategories[t])for(e=0,i=this._labelGroupsToCategories[t].length;e<i;e++)$("#labelGroup"+this._labelGroupsToCategories[t][e]).parents("dl:eq(0)").show()},_submit:function(){for(var t in this._groups)this._groups[t].is(":visible")||delete this._groups[t];this._super()}}); })(this);
 
 // WCF.Location.js
 (function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition((function(e){t(e.coords.latitude,e.coords.longitude)}),(function(){t(void 0,void 0)}),{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy((function(){e.open(this._map,t)}),this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t,e,o,s,i=null,a=null,n=null,r=null;for(t in this._markers)o=(e=this._markers[t]).getPosition().lat(),s=e.getPosition().lng(),null===i?(i=a=o,n=r=s):(i>o?i=o:a<o&&(a=o),n>o?n=o:r<s&&(r=s));this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(i,n),new google.maps.LatLng(a,r)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy((function(t){t.infoWindow&&t.infoWindow.open(this._map,t)}),this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng()||(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),0))},_success:function(t,e,o){var s,i;if(t.returnValues&&t.returnValues.markers)for(s in t.returnValues.markers)i=t.returnValues.markers[s],this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a,n=$(i),r=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);return n.append($("<p />").append(r)),a=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",n.get(0)),r.data("marker",a),a},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){var e,o,s,i;for(void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t),e=[],o=0,s=this._markers.length;o<s;o++)(i=this._markers[o]).draggable||(i.setVisible(t),t&&e.push(i));this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy((function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null}),this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){var o,s,i;if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){for(s in o=0,t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),i=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy((function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))}),this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy((function(t){null!==t&&$(this._searchInput).val(t)}),this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},(function(e,o){o==google.maps.GeocoderStatus.OK?t(i?e:e[0].formatted_address):t(null)}))}}; })(this);
 
 // WCF.Message.js
-(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each((function(t,i){$(i).find(e._buttonSelector).click($.proxy(e._click,e))}))},_click:function(e){var t,i=$(e.currentTarget);e.preventDefault(),i.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(i.data("confirmMessage"),(function(e){"cancel"!==e&&t._sendRequest(i)}),void 0,void 0,!0)):this._sendRequest(i)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("beforeunload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),this._ckeditorApi=void 0,require(["WoltLabSuite/Core/Component/Ckeditor"],(e=>{this._ckeditorApi=e}))):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){e.preventDefault();var t=this._getMessage();if(null!==t){if(0===t.trim().length){const e=this._textarea[0].parentElement.querySelector(".innerError");return e&&e.remove(),void elInnerError(this._getCkeditor().element,WCF.Language.get("wcf.global.form.error.empty"))}return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1}console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each((function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))})),{data:{message:e},options:t}},_getMessage:function(){const e=this._getCkeditor();return void 0===e?null:e.getHtml()},_getCkeditor(e){return this._ckeditorApi.getCkeditorById(e||this._messageFieldID)},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){var t,i;return null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._previewButton.html(this._previewButtonLabel).enable(),(t=this._textarea.parent().children("small.innerError").empty()).length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent())),i="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage,e.returnValues.realErrorMessage&&(i=e.returnValues.realErrorMessage),t.html(i),!1)}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&"messageFieldID"!==t&&"previewButtonID"!==t&&(i[t]=this._options[t]);return i},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){var t,i,s,n;for(this._messageFieldID="",this._textarea=null,t="",i=null,s=0,n=this._options.messageFields.length;s<n;s++)if(t=this._options.messageFields[s],i=elById(t),this._getCkeditor(t).isVisible()){this._messageFieldID=t,this._textarea=$(i);break}if(""===this._messageFieldID)throw new Error("Unable to identify the active message field.");this._super(e)},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&-1===["messageFields","messageFieldID","previewButtonID"].indexOf(t)&&(i[t]=this._options[t]);return i},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('<li class="dropdownDivider" />').appendTo(s),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,i){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=i||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var i;if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");i=parseInt(RegExp.$1)}else i=parseInt(t.activeTab.tab.data("smileyCategoryID"));i&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[i]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[i])))},_success:function(e,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+s+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:i||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({init:function(e,t,i,s,n,a,o){require(["WoltLabSuite/Core/Ui/Message/Quote"],(r=>{new r.default(e,t,i,s,n,a,o)}))}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){const t=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:i})=>{i(t).insertQuote({author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}))}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){var i,s;for(i in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers)this._handlers.hasOwnProperty(i)&&(s=t[i]||[],this._handlers[i].updateFullQuoteObjectIDs(s))},insertQuotes:function(e,t,i){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,i="showQuotes";this._count?(void 0===(t=e.get(i))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(i,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(i)):e.remove(i),this._hasTemplate=!1}.bind(this))},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){var t,i,s;null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e),t=$('<div class="formSubmit" />').appendTo(this._dialog),this._supportPaste&&(this._buttons.insert=$('<button type="button" class="button buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$('<button type="button" class="button">'+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0,i=this._dialog.find(".jsInsertQuote"),this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(s=this,this._dialog.find("input.jsRemoveQuote").each((function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})))},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,i=$(e.currentTarget),s=i.parent("li").attr("data-quote-id");i.prop("checked")?this._removeOnSubmit.push(s):-1!==(t=this._removeOnSubmit.indexOf(s))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.wcfDialog("close"),window.setTimeout((()=>{this._dialog.find("input.jsCheckbox:checked").each($.proxy((function(e,t){this._insertQuote(null,t)}),this))}),0)},_insertQuote:function(e,t){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");const l=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(l).insertQuote({author:a,content:s,isText:r,link:o})})),this._removeOnSubmit.push(i.data("quote-id")),null!==e&&require(["WoltLabSuite/Core/Environment"],function(e){var t=function(){this._dialog.wcfDialog("close")}.bind(this);"ios"===e.platform()?window.setTimeout(t,100):t()}.bind(this))},_removeSelected:function(){var e,t,i;if(this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),e=[],this._dialog.find("input.jsCheckbox:checked").each((function(t,i){e.push($(i).parents("li").attr("data-quote-id"))})),e.length){for(i in t=[],this._handlers)this._handlers.hasOwnProperty(i)&&t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){var e,t,i;if(this._supportPaste&&this._removeOnSubmit.length>0)for(e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;t<i;t++)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e,t=[];for(e in this._handlers)this._handlers.hasOwnProperty(e)&&t.push(e);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:t.length>0,objectTypes:t}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,i,s,n,a,o;e.preventDefault(),i=(t=$(e.currentTarget)).prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode(),void 0===this._cache[n]?(a=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),a=!0):this._dialog.empty(),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",i).appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+i+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(i))),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[n]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,i,s,n,a,o,r,l,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),h=this.element.find("> div, > fieldset");if(u.length==h.length){for(e=this.element.data("preselect"),h.each((function(t,i){if(null!==elBySel(".innerError",i))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t<u.length;t++){i=$(u[t]),s=$(h[t]),void 0===(n=i.data("name"))&&(void 0!==(a=i.children("a").prop("href"))&&a.match(/#([a-zA-Z_-]+)$/)&&(n=RegExp.$1),void 0===n&&(n=i.wcfIdentify())),this._tabs.push({container:s,name:n,tab:i}),this._tabsByName[n]=t,(o=i.children("a").data("index",t).on("mousedown",this._showTab.bind(this)).on("touchstart",this._showTab.bind(this))).attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",s[0].id);const r=u[t].querySelector("span:not(.icon)");r&&o[0].setAttribute("aria-labelledby",$(r).wcfIdentify()),o.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(e===n||!0===e&&0===t)&&o.trigger("mousedown")}if(!0===e&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click"),void 0!==(r=this.element.data("collapsible"))&&(this.options.collapsible=r),l=elData(this.element[0],"wysiwyg-container-id")){const e=document.getElementById(l);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({listenToCkeditor:t})=>{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}))}))}}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,i){var s,n,a,o,r,l=null===e?t:$(e.currentTarget).data("index");for(i=!this.options.collapsible||!0===i,s=null,n=0;n<this._tabs.length;n++){if(a=this._tabs[n],n==l){if(!a.tab.hasClass("active")){a.tab.addClass("active"),a.container.addClass("active"),s=a,a.tab.children("a").attr("aria-expanded",!0),o=a.container[0],null===elBySel(".messageTabMenuContent.active",o)&&null!==elBySel(".messageTabMenuContent",o)&&null!==(r=elBySel("nav > ul > li[data-name] > a",o))&&$(r).trigger("mousedown");continue}if(!0===i)continue}a.tab.removeClass("active"),a.container.removeClass("active"),a.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==s&&this._trigger("show",{},{activeTab:s}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
+(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each((function(t,i){$(i).find(e._buttonSelector).click($.proxy(e._click,e))}))},_click:function(e){var t,i=$(e.currentTarget);e.preventDefault(),i.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(i.data("confirmMessage"),(function(e){"cancel"!==e&&t._sendRequest(i)}),void 0,void 0,!0)):this._sendRequest(i)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("beforeunload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),this._ckeditorApi=void 0,require(["WoltLabSuite/Core/Component/Ckeditor"],(e=>{this._ckeditorApi=e}))):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){e.preventDefault();var t=this._getMessage();if(null!==t){if(0===t.trim().length){const e=this._textarea[0].parentElement.querySelector(".innerError");return e&&e.remove(),void elInnerError(this._getCkeditor().element,WCF.Language.get("wcf.global.form.error.empty"))}return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1}console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each((function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))})),{data:{message:e},options:t}},_getMessage:function(){const e=this._getCkeditor();return void 0===e?null:e.getHtml()},_getCkeditor(e){return this._ckeditorApi.getCkeditorById(e||this._messageFieldID)},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){var t,i;return null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._previewButton.html(this._previewButtonLabel).enable(),(t=this._textarea.parent().children("small.innerError").empty()).length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent())),i="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage,e.returnValues.realErrorMessage&&(i=e.returnValues.realErrorMessage),t.html(i),!1)}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&"messageFieldID"!==t&&"previewButtonID"!==t&&(i[t]=this._options[t]);return i},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){var t,i,s,n;for(this._messageFieldID="",this._textarea=null,t="",i=null,s=0,n=this._options.messageFields.length;s<n;s++)if(t=this._options.messageFields[s],i=elById(t),this._getCkeditor(t).isVisible()){this._messageFieldID=t,this._textarea=$(i);break}if(""===this._messageFieldID)throw new Error("Unable to identify the active message field.");this._super(e)},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&-1===["messageFields","messageFieldID","previewButtonID"].indexOf(t)&&(i[t]=this._options[t]);return i},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('<li class="dropdownDivider" />').appendTo(s),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,i){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=i||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var i;if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");i=parseInt(RegExp.$1)}else i=parseInt(t.activeTab.tab.data("smileyCategoryID"));i&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[i]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[i])))},_success:function(e,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+s+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:i||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({init:function(e,t,i,s,n,a,o){require(["WoltLabSuite/Core/Ui/Message/Quote"],(r=>{new r.default(e,t,i,s,n,a,o)}))}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){const t=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:i})=>{i(t).insertQuote({author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}))}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){var i,s;for(i in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers)this._handlers.hasOwnProperty(i)&&(s=t[i]||[],this._handlers[i].updateFullQuoteObjectIDs(s))},insertQuotes:function(e,t,i){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,i="showQuotes";this._count?(void 0===(t=e.get(i))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(i,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(i)):e.remove(i),this._hasTemplate=!1}.bind(this))},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){var t,i,s;null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e),t=$('<div class="formSubmit" />').appendTo(this._dialog),this._supportPaste&&(this._buttons.insert=$('<button type="button" class="button buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$('<button type="button" class="button">'+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0,i=this._dialog.find(".jsInsertQuote"),this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(s=this,this._dialog.find("input.jsRemoveQuote").each((function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})))},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,i=$(e.currentTarget),s=i.parent("li").attr("data-quote-id");i.prop("checked")?this._removeOnSubmit.push(s):-1!==(t=this._removeOnSubmit.indexOf(s))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.wcfDialog("close"),window.setTimeout((()=>{this._dialog.find("input.jsCheckbox:checked").each($.proxy((function(e,t){this._insertQuote(null,t)}),this))}),0)},_insertQuote:function(e,t){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");const l=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(l).insertQuote({author:a,content:s,isText:r,link:o})})),this._removeOnSubmit.push(i.data("quote-id")),null!==e&&require(["WoltLabSuite/Core/Environment"],function(e){var t=function(){this._dialog.wcfDialog("close")}.bind(this);"ios"===e.platform()?window.setTimeout(t,100):t()}.bind(this))},_removeSelected:function(){var e,t,i;if(this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),e=[],this._dialog.find("input.jsCheckbox:checked").each((function(t,i){e.push($(i).parents("li").attr("data-quote-id"))})),e.length){for(i in t=[],this._handlers)this._handlers.hasOwnProperty(i)&&t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){var e,t,i;if(this._supportPaste&&this._removeOnSubmit.length>0)for(e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;t<i;t++)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e,t=[];for(e in this._handlers)this._handlers.hasOwnProperty(e)&&t.push(e);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:t.length>0,objectTypes:t}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,i,s,n,a,o;e.preventDefault(),i=(t=$(e.currentTarget)).prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode(),void 0===this._cache[n]?(a=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),a=!0):this._dialog.empty(),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",i).appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+i+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(i))),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[n]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,i,s,n,a,o,r,l,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),h=this.element.find("> div, > fieldset");if(u.length==h.length){for(e=this.element.data("preselect"),h.each((function(t,i){if(null!==elBySel(".innerError",i))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t<u.length;t++){i=$(u[t]),s=$(h[t]),void 0===(n=i.data("name"))&&(void 0!==(a=i.children("a").prop("href"))&&a.match(/#([a-zA-Z_-]+)$/)&&(n=RegExp.$1),void 0===n&&(n=i.wcfIdentify())),this._tabs.push({container:s,name:n,tab:i}),this._tabsByName[n]=t,(o=i.children("a").data("index",t).on("mousedown",this._showTab.bind(this)).on("touchstart",this._showTab.bind(this))).attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",s[0].id);const r=u[t].querySelector("span:not(.icon)");r&&o[0].setAttribute("aria-labelledby",$(r).wcfIdentify()),o.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(e===n||!0===e&&0===t)&&o.trigger("mousedown")}if(!0===e&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click"),void 0!==(r=this.element.data("collapsible"))&&(this.options.collapsible=r),l=elData(this.element[0],"wysiwyg-container-id")){const e=document.getElementById(l);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({listenToCkeditor:t})=>{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}))}))}}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,i){var s,n,a,o,r,l=null===e?t:$(e.currentTarget).data("index");for(i=!this.options.collapsible||!0===i,s=null,n=0;n<this._tabs.length;n++){if(a=this._tabs[n],n==l){if(!a.tab.hasClass("active")){a.tab.addClass("active"),a.container.addClass("active"),s=a,a.tab.children("a").attr("aria-expanded",!0),o=a.container[0],null===elBySel(".messageTabMenuContent.active",o)&&null!==elBySel(".messageTabMenuContent",o)&&null!==(r=elBySel("nav > ul > li[data-name] > a",o))&&$(r).trigger("mousedown");continue}if(!0===i)continue}a.tab.removeClass("active"),a.container.removeClass("active"),a.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==s&&this._trigger("show",{},{activeTab:s}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
 
 // WCF.User.js
-(function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{var e,i;const s=Array.from(this._tab[0].querySelectorAll("textarea")).find((e=>{if(void 0===t(e))return!1;const i={api:{throwError:elInnerError},valid:!0};return WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5",`validate_${e.id}`,i),!1===i.valid}));s?s.parentElement.scrollIntoView({behavior:"smooth"}):(this._actionName="save",e=/values\[([a-zA-Z0-9._-]+)\]/,i={},this._tab.find("input, textarea, select").each((function(s,a){var n,o,r,c=$(a),l=null;switch(c.getTagName()){case"input":if(("radio"===(n=c.attr("type"))||"checkbox"===n)&&!c.prop("checked"))return;break;case"textarea":let e=t(a);void 0!==e&&(l=e.getHtml())}o=c.attr("name"),e.test(o)&&(r=RegExp.$1,null===l&&(l=c.val()),"checkbox"===c.attr("type")&&/\[\]$/.test(o)?(Array.isArray(i[r])||(i[r]=[]),i[r].push(l)):i[r]=l)})),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:i}}),this._proxy.sendRequest())}))},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html((function(s,a){return!0!==e&&(i._cachedTemplate=a),t.returnValues.template})),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup((function(t){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1}))},_destroyEditor:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{this._tab[0].querySelectorAll("textarea").forEach((e=>{const i=t(e);i?.destroy()}))}))}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsMarkAllAsConfirmed").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),(function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})}))})),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$(`<button type="button" class="notificationItemMarkAsConfirmed jsTooltip" title="${WCF.Language.get("wcf.global.button.markAsRead")}">\n\t\t\t\t\t\t<fa-icon size="24" name="check"></fa-icon>\n\t\t\t\t\t</button>`).appendTo(i).click($.proxy(this._markAsConfirmed,this)))}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="htmlContent messageSignatureConstraints"></div></section>').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button type="button" class="button small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")),s[0].querySelector("fa-icon").setIcon("circle-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")),s[0].querySelector("fa-icon").setIcon("circle-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")),s[0].querySelector("fa-icon").setIcon("circle"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")),s[0].querySelector("fa-icon").setIcon("ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change((function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()})),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('<img src="'+t+'" class="userAvatarImage" alt="" />').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('<small class="innerError"></span>'),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy((function(t,e){var i,s,a=$(e);a.addClass("pointer"),i=a.data("objectType"),s=a.data("objectID"),void 0===this._buttons[i]&&(this._buttons[i]={}),this._buttons[i][s]=a.click($.proxy(this._click,this))}),this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("<div>"+t.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change((function(t){1==$(t.currentTarget).val()?s.enable():s.disable()})),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i[0].querySelector("fa-icon").setIcon("bookmark",!0),e.data("isSubscribed",!0),e.addClass("active");else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i[0].querySelector("fa-icon").setIcon("bookmark"),e.data("isSubscribed",!1),e.removeClass("active")),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this);
+(function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{var e,i;const s=Array.from(this._tab[0].querySelectorAll("textarea")).find((e=>{if(void 0===t(e))return!1;const i={api:{throwError:elInnerError},valid:!0};return WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5",`validate_${e.id}`,i),!1===i.valid}));s?s.parentElement.scrollIntoView({behavior:"smooth"}):(this._actionName="save",e=/values\[([a-zA-Z0-9._-]+)\]/,i={},this._tab.find("input, textarea, select").each((function(s,a){var n,o,r,c=$(a),l=null;switch(c.getTagName()){case"input":if(("radio"===(n=c.attr("type"))||"checkbox"===n)&&!c.prop("checked"))return;break;case"textarea":let e=t(a);void 0!==e&&(l=e.getHtml())}o=c.attr("name"),e.test(o)&&(r=RegExp.$1,null===l&&(l=c.val()),"checkbox"===c.attr("type")&&/\[\]$/.test(o)?(Array.isArray(i[r])||(i[r]=[]),i[r].push(l)):i[r]=l)})),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:i}}),this._proxy.sendRequest())}))},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html((function(s,a){return!0!==e&&(i._cachedTemplate=a),t.returnValues.template})),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup((function(t){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1}))},_destroyEditor:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{this._tab[0].querySelectorAll("textarea").forEach((e=>{const i=t(e);i?.destroy()}))}))}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsMarkAllAsConfirmed").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),(function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})}))})),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$(`<button type="button" class="notificationItemMarkAsConfirmed jsTooltip" title="${WCF.Language.get("wcf.global.button.markAsRead")}">\n\t\t\t\t\t\t<fa-icon size="24" name="check"></fa-icon>\n\t\t\t\t\t</button>`).appendTo(i).click($.proxy(this._markAsConfirmed,this)))}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="htmlContent messageSignatureConstraints"></div></section>').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button type="button" class="button small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")),s[0].querySelector("fa-icon").setIcon("circle-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")),s[0].querySelector("fa-icon").setIcon("circle-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")),s[0].querySelector("fa-icon").setIcon("circle"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")),s[0].querySelector("fa-icon").setIcon("ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change((function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()})),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('<img src="'+t+'" class="userAvatarImage" alt="" />').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('<small class="innerError"></span>'),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy((function(t,e){var i,s,a=$(e);a.addClass("pointer"),i=a.data("objectType"),s=a.data("objectID"),void 0===this._buttons[i]&&(this._buttons[i]={}),this._buttons[i][s]=a.click($.proxy(this._click,this))}),this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("<div>"+t.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change((function(t){1==$(t.currentTarget).val()?s.enable():s.disable()})),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i[0].querySelector("fa-icon").setIcon("bookmark",!0),e.data("isSubscribed",!0),e.addClass("active");else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i[0].querySelector("fa-icon").setIcon("bookmark"),e.data("isSubscribed",!1),e.removeClass("active")),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this);
 
 // WCF.Moderation.js
 (function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:null,_languageItem:"",_proxy:null,_queueID:0,_redirectURL:"",init:function(e,t,i){this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=i,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this))):console.debug("[WCF.Moderation.Management] Missing class name, aborting."):console.debug("[WCF.Moderation.Management] Missing button selector, aborting.")},_click:function(e){var t=$(e.currentTarget).wcfIdentify(),i="";this._confirmationTemplate[t]&&(i=this._confirmationTemplate[t]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,t)),$.proxy((function(e,i,o){if("confirm"===e){var n={actionName:t,className:this._className,objectIDs:[this._queueID]};this._confirmationTemplate[t]&&(n.parameters={},$(o).find("input, textarea").each((function(e,t){var i=$(t),o=i.val();"input"===i.getTagName()&&"checkbox"===i.attr("type")&&(i.is(":checked")||(o=null)),null!==o&&(n.parameters[i.attr("name")]=o)}))),this._proxy.setOption("data",n),this._proxy.sendRequest(),$(this._buttonSelector).disable()}}),this),{},i)},_success:function(e,t,i){var o=new WCF.System.Notification(WCF.Language.get("wcf.global.success")),n=this;o.show((function(){window.location=n._redirectURL}))}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(document).on("dblclick",".moderationList .new .columnAvatar",$.proxy(this._dblclick,this))},_dblclick:function(e){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[$(e.currentTarget).parents(".moderationQueueEntry:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(e,t,i){$(".moderationList .new").each((function(t,i){var o=$(i);WCF.inArray(o.data("queueID"),e.objectIDs)&&(o.removeClass("new"),o.find(".columnAvatar").off("dblclick"))}))}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".markAllAsReadButton").click($.proxy(this._click,this))},_click:function(e){e.preventDefault(),this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_success:function(e,t,i){$("#outstandingModeration .badgeUpdate").remove();var o=$(".moderationList");o.find(".new").removeClass("new"),o.find(".columnAvatar").off("dblclick")}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#enableContent, #removeContent",this._className="wcf\\data\\moderation\\queue\\ModerationQueueActivationAction",this._super(e,t,"wcf.moderation.activation.{actionName}.confirmMessage")}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_objectType:"",init:function(e,t){this._objectType=e,this._buttonSelector=t,this._buttons={},this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var e=this;$(this._buttonSelector).each(((t,i)=>{var o=$(i),n=o.wcfIdentify();e._buttons[n]||(e._buttons[n]=o,require(["WoltLabSuite/Core/Ui/Moderation/Report"],(({registerLegacyButton:e})=>{e(i,this._objectType)})))}))}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(e,t,i){this._buttonSelector="#removeContent, #removeReport, #changeJustifiedStatus",this._className="wcf\\data\\moderation\\queue\\ModerationQueueReportAction",this._super(e,t,"wcf.moderation.report.{actionName}.confirmMessage"),this._confirmationTemplate.removeContent=$('<div class="section"><dl><dt><label for="message">'+WCF.Language.get("wcf.moderation.report.removeContent.reason")+'</label></dt><dd><textarea name="message" id="message" cols="40" rows="3" /></dd></dl></div>'),this._confirmationTemplate.removeReport=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"> '+WCF.Language.get("wcf.moderation.report.removeReport.markAsJustified")+"</label></dd></dl></div>"),this._confirmationTemplate.changeJustifiedStatus=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"'+(i?' checked="checked"':"")+"> "+WCF.Language.get("wcf.moderation.report.changeJustifiedStatus.markAsJustified")+"</label></dd></dl></div>")},_success:function(e,t,i){"changeJustifiedStatus"===e.actionName?(new WCF.System.Notification).show((()=>{window.location.reload()})):this._super(e,t,i)}}); })(this);
index dffeae938b4de4a33ede7e12079eef11dcbd843c..7d9ec40a201fba67f633800b2c72f06fdb4b2d74 100644 (file)
 // WCF.js
 (function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var t=jQuery.fn.data;jQuery.fn.data=function(e,i){var n,s,a,o=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(n in e)n.match(/ID$/)&&(s=e[n],delete e[n],e[n=n.replace(/ID$/,"-id")]=s);o[0]=e;break;case"string":e.match(/ID$/)&&(o[0]=e.replace(/ID$/,"-id"))}if(a=t.apply(this,o),void 0===e)for(n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},void 0===console.debug&&(console.debug=function(t){console.log(t)})}(),function(t){var e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),t.browser=t.browser||{},t.browser=$.extend(t.browser,s),t.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,t.browser.mozilla&&e.match(/trident/)&&(t.browser.mozilla=!1,t.browser.msie=!0),t.browser.iOS=/\((ipad|iphone|ipod);/.test(e),t.browser.iOS&&$("html").addClass("iOS"),t.browser.android=-1!==e.indexOf("android"),t.browser.iOS&&(t.fn.focus=function(t,e){return arguments.length>0?this.on("focus",null,t,e):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(t,e){return $.grep(t,(function(t,i){return e!==t}))},wcfEscapeID:function(t){return t.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(t){return!!$("#"+$.wcfEscapeID(t)).length},getLength:function(t){var e,i=0;for(e in t)t.hasOwnProperty(e)&&i++;return i}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(t){var e={},i={},n=!1;switch(this.is(":hidden")&&(e=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),t){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,e,["display","visibility"]),i},getOffsets:function(t){var e={},i={},n=!1;return this.is(":hidden")&&(e=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),i="offset"===t?this.offset():this.position(),n&&WCF.revertInlineCSS(this,e,["display","visibility"]),i},makePositioned:function(t,e){"absolute"!=t&&"fixed"!=t&&(t="absolute");var i=this.getOffsets("position");return this.css({position:t,left:i.left,margin:0,top:i.top}),e&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){var t,e,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;return t=0,e=this.get(0),document.selection?(this.focus(),(i=document.selection.createRange()).moveStart("character",-this.val().length),t=i.text.length):(e.selectionStart||"0"==e.selectionStart)&&(t=parseInt(e.selectionStart)),t},setCaret:function(t){var e,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;return e=this.get(0),this.focus(),document.selection?((i=document.selection.createRange()).moveStart("character",t),i.moveEnd("character",0),i.select()):(e.selectionStart||"0"==e.selectionStart)&&(e.selectionStart=t,e.selectionEnd=t),!0},wcfDropIn:function(t,e,i){return t||(t="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:t},i,e)},wcfDropOut:function(t,e,i){return t||(t="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:t},i,e)},wcfBlindIn:function(t,e,i){return t||(t="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:t},i,e)},wcfBlindOut:function(t,e,i){return t||(t="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:t},i,e)},wcfHighlight:function(t,e){return this.effect("highlight",t,600,e)},wcfFadeIn:function(t,e){return e&&parseInt(e)||(e=200),this.show(WCF.getEffect(this,"fade"),{},e,t)},wcfFadeOut:function(t,e){return e&&parseInt(e)||(e=200),this.hide(WCF.getEffect(this,"fade"),{},e,t)},cssAsNumber:function(t){if(this.length){var e=this.css(t);if(void 0!==e)return parseInt(e.replace(/px$/,""))}return 0},perfectScrollbar:function(t){var e=require("perfect-scrollbar");return this.each((function(){var i,n;return"object"==typeof t||void 0===t?(i=t,$(this).data("psID")||e.initialize(this,i)):"update"===(n=t)?e.update(this):"destroy"===n&&e.destroy(this),jQuery(this)}))}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(t,e){return-1!=$.inArray(t,e)},getEffect:function(t,e){return t.is("tr")?"highlight":e},getInlineCSS:function(t){var e,i,n,s={},a=t.attr("style");if(!a)return{};for(e=0,i=(a=a.split(";")).length;e<i;e++)""!=(n=$.trim(a[e]))&&(n=n.split(":"),s[$.trim(n[0])]=$.trim(n[1]));return s},revertInlineCSS:function(t,e,i){var n,s,a;for(n=0,s=i.length;n<s;n++)e[a=i[n]]?t.css(a,e[a]):t.css(a,"")},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},base64toBlob:function(t,e,i){var n,s,a,o,r,l,c;for(e=e||"",i=i||512,n=atob(t),s=[],a=0;a<n.length;a+=i){for(o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);c=new Uint8Array(r),s.push(c)}return new Blob(s,{type:e})},convertLegacyURL:function(t){return t.replace(/^index\.php\/(.*?)\/\?/,(function(t,e){var i,n,s,a=e.split(/([A-Z][a-z0-9]+)/),o="";for(i=0,n=a.length;i<n;i++)(s=a[i].trim()).length&&(o.length&&(o+="-"),o+=s.toLowerCase());return"index.php?"+o+"/&"}))}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(t){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(t,e){window.bc_wcfSimpleDropdown.init(t[0],e)},removeDropdown:function(t){window.bc_wcfSimpleDropdown.destroy(t)},initDropdownFragment:function(t,e){window.bc_wcfSimpleDropdown.initFragment(t[0],e[0])},registerCallback:function(t,e){window.bc_wcfSimpleDropdown.registerCallback(t,e)},_toggle:function(t,e){window.bc_wcfSimpleDropdown._toggle(t,e)},toggleDropdown:function(t,e){window.bc_wcfSimpleDropdown._toggle(null,t,null,e)},getDropdown:function(t){var e=window.bc_wcfSimpleDropdown.getDropdown(t);return e?$(e):null},getDropdownMenu:function(t){var e=window.bc_wcfSimpleDropdown.getDropdownMenu(t);return e?$(e):null},setAlignmentByID:function(t){window.bc_wcfSimpleDropdown.setAlignmentById(t)},setAlignment:function(t,e){window.bc_wcfSimpleDropdown.setAlignment(t[0],e[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(t){window.bc_wcfSimpleDropdown.close(t)},destroy:function(t){window.bc_wcfSimpleDropdown.destroy(t)}},WCF.Clipboard={init:function(){},reload:function(){}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(t,e){$.isFunction(t)?(this._callback=t,this._interval=e,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(t){throw this._isExecuting=!1,t}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(t){this._interval=t,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(t){t.show()}))},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(t){t.hide()}))},updateIcon:function(t,e){}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(t){this._ajaxRequest=null,"jsonp"===(t=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},t)).dataType?require(["AjaxJsonp"],(function(e){e.send(t.url,t.success,t.failure,{parameterName:t.jsonp})})):require(["AjaxRequest"],function(e){this._ajaxRequest=new e({data:t.data,type:t.type,url:t.url,withCredentials:t.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===t.dataType?"application/json":"",autoAbort:t.autoAbortPrevious,ignoreError:t.suppressErrors,silent:!t.showLoadingOverlay,failure:t.failure,finalize:t.after,success:t.success}),t.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(t){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(t)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(t){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(t,e){require(["AjaxRequest"],function(i){null!==this._ajaxRequest&&this._ajaxRequest.setOption(t,e)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(t,e,i){},_success:function(t,e,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(t,e){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},t),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},e),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy((function(t,e){$(e).bind(this.options.eventName,$.proxy(this._handleEvent,this))}),this)))},_handleEvent:function(t){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(t.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(t,e,i){this._containerSelector=e,this._className=t,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(t,e){var i,n=$(e),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(t){var e=$(t.currentTarget);t.preventDefault(),e.data("confirmMessageHtml")||e.data("confirmMessage")?WCF.System.Confirmation.show(e.data("confirmMessageHtml")?e.data("confirmMessageHtml"):e.data("confirmMessage"),$.proxy(this._execute,this),{target:e},void 0,!!e.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(e),this._sendRequest(e))},_didTriggerEffect:function(t){},_execute:function(t,e){"cancel"!==t&&(WCF.LoadingOverlayHandler.updateIcon(e.target),this._sendRequest(e.target))},_sendRequest:function(t){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(t).data("objectID")]}),this.proxy.sendRequest()},_success:function(t,e,i){this._callback&&this._callback(t.objectIDs),this.triggerEffect(t.objectIDs)},setCallback:function(t){if("function"!=typeof t)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=t},triggerEffect:function(t){this._containers.forEach(function(e){var i,n=$("#"+e),s=n.find(this._buttonSelector);WCF.inArray(s.data("objectID"),t)&&(i=this,n.wcfBlindOut("up",(function(){var t=$(this).remove();i._containers.splice(i._containers.indexOf(t.wcfIdentify()),1),i._didTriggerEffect(t),s.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",s.data("eventName"),{button:s,container:t})})))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(){},_buttonSelector:"",_callback:{},_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_didTriggerEffect:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},setCallback:function(){}}),WCF.Action.Toggle=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},triggerEffect:function(){},_toggleButton:function(){}}),WCF.Date={},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(t,e){this._variables[t]=e},addObject:function(t){for(var e in t)this.add(e,t[e])},addDictionary:function(t){t.each($.proxy((function(t){this.add(t.key,t.value)}),this))},get:function(t){return this.isset(t)?this._variables[t]:null},isset:function(t){return this._variables.hasOwnProperty(t)},remove:function(t){delete this._variables[t]},each:function(t){var e;if($.isFunction(t))for(e in this._variables)t({key:e,value:this._variables[e]})},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(t,e){require(["Language"],(function(i){i.add(t,e)}))},addObject:function(t){require(["Language"],(function(e){e.addObject(t)}))},get:function(t,e){throw new Error('Call to deprecated WCF.Language.get("'+t+'")')}}),WCF.Number={round:function(t,e){return e=Math.pow(10,e||0),Math.round(t*e)/e}},WCF.String={addThousandsSeparator:function(t){return Number(t).toLocaleString(document.documentElement.lang)},escapeHTML:function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(t){return String(t).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(t,e){var i=e||2;return Number(t).toLocaleString(document.documentElement.lang,{maximumFractionDigits:i}).replace("-","−")},lcfirst:function(t){return String(t).substring(0,1).toLowerCase()+t.substring(1)},ucfirst:function(t){return String(t).substring(0,1).toUpperCase()+t.substring(1)},unescapeHTML:function(t){return String(t).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],(function(t){t.setup()}))},reload:function(){this.init()}},WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy((function(t,e){this._initButton(e)}),this))},_initButton:function(t){var e=$(t);e.data("isOpen")||$("#"+e.data("collapsibleContainer")).hide(),e.click($.proxy(this._toggle,this))},_toggle:function(t){var e=$(t.currentTarget),i=e.data("isOpen"),n=$("#"+$.wcfEscapeID(e.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy((function(){this._toggleImage(e)}),this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy((function(){this._toggleImage(e)}),this)),i=!0),e.data("isOpen",i),t.stopPropagation(),!1},_toggleImage:function(t){const e=t[0].querySelector("fa-icon");t.data("isOpen")?e.setIcon("chevron-down"):e.setIcon("chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(t){this._className=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(t){this._getContainers().each($.proxy((function(t,e){var i=$(e),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))}),this))},_initContainer:function(t){var e=this._getTarget(t),i=this._getButtonContainer(t),n=this._createButton(t,i);this._containerData[t]={button:n,buttonContainer:i,isOpen:this._containers[t].data("isOpen"),target:e},this._containers[t].data("isOpen")||$("#"+t).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(t){},_getButtonContainer:function(t){},_createButton:function(t,e){var i=elBySel(".jsStaticCollapsibleButton",e[0]);return null!==i&&i.parentNode===e[0]?(i.classList.remove("jsStaticCollapsibleButton"),i=$(i)):i=$(`<button type="button" class="collapsibleButton jsToolti" title="${WCF.Language.get("wcf.global.button.collapsible")}">\n\t\t\t\t<fa-icon size="16" name="chevron-down"></fa-icon>\n\t\t\t</button>`).prependTo(e),i.data("containerID",t).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(t){var e=$(t.currentTarget).data("containerID"),i=this._containerData[e].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(e)],parameters:$.extend(!0,{containerID:e,currentState:n,newState:s},this._getAdditionalParameters(e))}),this._proxy.sendRequest(),$("#"+e).toggleClass("jsCollapsed")},_exchangeIcon:function(t,e){e=e||"spinner",t[0].querySelector("fa-icon").setIcon(e)},_getObjectID:function(t){return $("#"+t).data("objectID")},_getAdditionalParameters:function(t){return{}},_updateContent:function(t,e,i){this._containerData[t].target.html(e)},_success:function(t,e,i){var n,s;t.returnValues.containerID&&(n=t.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!t.returnValues.isOpen,s=t.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(t.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(t){this._super(t),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(t){this._super(t),this._containerData[t].isOpen||(this._containerData[t].target.hide(),this._exchangeIcon(this._containerData[t].button,"chevron-right"))},_toggleContainer:function(t){var e=$(t.currentTarget).data("containerID"),i=this._containerData[e].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(e)],parameters:$.extend(!0,{containerID:e,currentState:n,newState:s},this._getAdditionalParameters(e))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[e].button,"open"===s?"chevron-down":"chevron-right"),"open"===s?this._containerData[e].target.show():this._containerData[e].target.hide(),$("#"+e).toggleClass("jsCollapsed"),this._containerData[e].isOpen="open"===s}}),WCF.User={userID:0,username:"",init:function(t,e){this.userID=t,this.username=e}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(t,e,i){var n,s,a;return!t.length||((n=t.getOffsets("offset").top)>(s=$(document).height())-(a=$(window).height())&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,(function(t,e,i,n,s){return-n*((e=e/s-1)*e*e*e-1)+i})),!1)}}),WCF.CloseOverlayHandler={addCallback:function(t,e){require(["Ui/CloseOverlay"],(function(i){i.add(t,e)}))},removeCallback:function(t){require(["Ui/CloseOverlay"],(function(e){e.remove(t)}))},forceExecution:function(){require(["Ui/CloseOverlay"],(function(t){t.execute()}))}},WCF.DOMNodeInsertedHandler={addCallback:function(t,e){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(t){t.add("__legacy__",e)}))},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(t){t.trigger()}))},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(t,e){if(this._bindListener(),this._callbacks.isset(t))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+t+"' is already bound to a callback"),!1;this._callbacks.add(t,e)},removeCallback:function(t){this._callbacks.isset(t)&&this._callbacks.remove(t)},_bindListener:function(){this._isListening||(window.MutationObserver?new MutationObserver(function(t){var e=!1;t.forEach(function(t){t.removedNodes.length&&(e=!0)}.bind(this)),e&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0}):$(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(t){this._isExecuting||(this._isExecuting=!0,this._callbacks.each((function(e){e.value(t)})),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){},_initOptions:function(){},_initOption:function(){},_handleChange:function(){},_change:function(){},_execute:function(){},_enableOption:function(){},_enableOptionElement:function(){},_enableOptions:function(){}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(t,e){if(this._bindListener(),this._callbacks.isset(t))return console.debug("[WCF.PageVisibilityHandler] identifier '"+t+"' is already bound to a callback"),!1;this._callbacks.add(t,e)},removeCallback:function(t){this._callbacks.isset(t)&&this._callbacks.remove(t)},_bindListener:function(){if(!this._isListening){var t=null;void 0!==document.hidden?(this._hiddenFieldName="hidden",t="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",t="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",t="webkitvisibilitychange"),null===t?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(t,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(t){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each((function(t){t.value(e)})),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(t,e,i){this._rowClassName=e,this._tableContainer=t,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+e,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var t,e;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(t=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(e=t[t.length-1].match(/\d+/g),this._options.updatePageNumber>0?e++:e--,window.location=window.location.href.replace(t[t.length-1],t[t.length-1][0]+"pageNo="+e)):window.location.reload():this._tableContainer.remove()},_remove:function(t){var e;$.getLength(t)?(e=$(t.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==e.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(t,e,i,n,s){null==e||$.isFunction(e)?(this._callback=e||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(t),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+t+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var t=this;new WCF.PeriodicalExecuter((function(e){t._list.is(":visible")&&t._clearList(!1),e.stop()}),250)},_keyDown:function(t){if(t.which===$.ui.keyCode.ENTER){var e=this._searchInput.parents(".dropdown");e.data("disableAutoFocus")?-1!==this._itemIndex&&t.preventDefault():(e.data("preventSubmit")||-1!==this._itemIndex)&&t.preventDefault()}},_keyUp:function(t){var e,i,n;switch(t.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(t)}if(""===(e=this._getSearchString(t)))this._clearList(!1);else if(e.length>=this._triggerLength){if(this._lastValue===e)return;this._lastValue=e,i={data:{excludedSearchValues:this._excludedSearchValues,searchString:e}},this._delay?(null!==this._timer&&this._timer.stop(),n=this,this._timer=new WCF.PeriodicalExecuter((function(){n._queryServer(i),n._timer.stop(),n._timer=null}),this._delay)):this._queryServer(i)}else this._clearList(!1)},_queryServer:function(t){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(t)}),this._proxy.sendRequest()},setDelay:function(t){this._delay=t},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(t){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(t){var e,i,n,s,a=$.trim(this._searchInput.val());if(this._commaSeperated){if((t.keyCode||t.which)==$.ui.keyCode.COMMA)return"";for(i=(e=a.split(",")).length,n=0;n<i;n++)e[n]=$.trim(e[n]);for(n=0;n<i;n++){if(s=e[n],!this._oldSearchString[n]){a=s;break}if(s!=this._oldSearchString[n]){a=s,this._caretAt=n;break}}this._oldSearchString=e}return a},_getParameters:function(t){return t},_success:function(t,e,i){var n,s,a;if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(t.returnValues))for(n in t.returnValues)s=t.returnValues[n],this._createListItem(s);else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",((t,e)=>{"dropdown"===t&&e===this._searchInput[0].parentElement.id||this._clearList()})),a=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.label)+"</span></li>").appendTo(this._list);return e.data("objectID",t.objectID).data("label",t.label).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_executeCallback:function(t){var e,i,n=!1,s=$(t.currentTarget);this._commaSeperated?(e=s.data("label"),this._oldSearchString[this._caretAt]=e,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(e.toLowerCase())+e.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(t){t&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(t){WCF.inArray(t,this._excludedSearchValues)||this._excludedSearchValues.push(t)},removeExcludedSearchValue:function(t){var e=$.inArray(t,this._excludedSearchValues);-1!=e&&this._excludedSearchValues.splice(e,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(t,e,i,n,s){this._includeUserGroups=i,this._super(t,e,n,s)},_getParameters:function(t){return t.data.includeUserGroups=this._includeUserGroups?1:0,t},_createListItem:function(t){var e,i,n=this._super(t),s=null;return t.icon?s=$(t.icon):this._includeUserGroups&&"group"===t.type&&(s=$('<fa-icon size="16" name="users"></fa-icon>')),s&&(e=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(e))),n.data("type",t.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(t,e){$.isFunction(e)?WCF.inArray(t,this._loaded)?setTimeout((function(){e()}),1):(this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+t+"' is invalid, aborting.")},setup:function(t,e){$.isFunction(e)?(this._setupCallbacks[t]||(this._setupCallbacks[t]=[]),this._setupCallbacks[t].push(e)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+t+"' is invalid, aborting.")},invoke:function(t){var e,i;if(this._setupCallbacks[t]){for(e=0,i=this._setupCallbacks[t].length;e<i;e++)this._setupCallbacks[t][e]();delete this._setupCallbacks[t]}if(this._loaded.push(t),this._callbacks[t]){for(e=0,i=this._callbacks[t].length;e<i;e++)this._callbacks[t][e]();delete this._callbacks[t]}},reset:function(t){var e=this._loaded.indexOf(t);-1!==e&&this._loaded.splice(e,1)}},WCF.System.ObjectStore={_objects:{},add:function(t,e){void 0===this._objects[t]&&(this._objects[t]=[]),this._objects[t].push(e)},invoke:function(t,e){if(this._objects[t])for(var i=0;i<this._objects[t].length;i++)e(this._objects[t][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(t,e){require(["WoltLabSuite/Core/Controller/Captcha"],function(i){try{i.add(t,e),this._registeredCaptchas.push(t)}catch(t){if(t instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(t){var e,i;if(-1===this._registeredCaptchas.indexOf(t))return e;i=require("WoltLabSuite/Core/Controller/Captcha");try{e=i.getData(t)}catch(e){console.debug('[WCF.System.Captcha] Unknow captcha id "'+t+'"')}return e},removeCallback:function(t){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.delete(t),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(t){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(t,e){this._cssClassNames=e||"",this._message=t||""},show:function(t,e,i,n){require(["Ui/Notification"],function(e){e.show(i||this._message,t,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(t,e,i,n,s){if("object"==typeof n){var a=$("<div />");a.append(n),n=a.html()}require(["Ui/Confirmation"],(function(a){a.show({legacyCallback:e,message:t,parameters:i,template:n||"",messageIsHtml:!0===s})}))}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var t=$("meta[name=viewport]");this._oldViewportSettings=t.attr("content"),t.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.PushNotification={_callbacks:{},addCallback:function(t,e){void 0===this._callbacks[t]&&(this._callbacks[t]=[]),this._callbacks[t].push(e)},executeCallbacks:function(t){var e,i;for(e in t.returnValues)if(void 0!==this._callbacks[e])for(i=0;i<this._callbacks[e].length;i++)this._callbacks[e][i](t.returnValues[e])}},WCF.System.Event={addListener:function(t,e,i){return window.__wcf_bc_eventHandler.add(t,e,i)},removeListener:function(t,e,i){return window.__wcf_bc_eventHandler.remove(t,e,i)},removeAllListeners:function(t,e){return window.__wcf_bc_eventHandler.removeAll(t,e)},fireEvent:function(t,e,i){window.__wcf_bc_eventHandler.fire(t,e,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:{},_className:"",_dialog:{},_proxy:{},_title:"",init:function(){},_success:function(){}}),WCF.InlineEditor=Class.extend({_callbacks:{},_dropdowns:{},_elements:{},_notification:{},_options:{},_proxy:{},_triggerElements:{},_updateData:{},init:function(){},_closeAll:function(){},_setOptions:function(){},registerCallback:function(){},_getTriggerElement:function(){},_show:function(){},_validate:function(){},_validateCallbacks:function(){},_success:function(){},_updateState:function(){},_click:function(){},_execute:function(){},_executeCallback:function(){},_hide:function(){}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(t,e,i,n){this._buttonSelector=t,this._fileListSelector=e,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var t;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),t=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(t[0],"role","button"),t.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",(function(){this.matches(":focus-visible")&&t[0].classList.add("active")})),this._fileUpload[0].addEventListener("blur",(function(){t[0].classList.remove("active")}))):(t=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(t[0],"role","button"),elAttr(t[0],"tabindex","0"),t.click($.proxy(this._showOverlay,this))),this._insertButton(t)},_insertButton:function(t){this._buttonSelector.prepend(t)},_removeButton:function(){var t=".uploadButton";this._supportsAJAXUpload||(t=".uploadFallbackButton"),this._buttonSelector.find(t).remove()},_upload:function(t,e,i,n){var s,a,o,r,l,c,u,h,d=null,_=[];if(void 0!==n)_=n;else if(e)_.push(e);else if(i){switch(s="",i.type){case"image/png":s=".png";break;case"image/jpeg":s=".jpg";break;case"image/gif":s=".gif";break;case"image/webp":s=".webp"}_.push({name:"pasted-from-clipboard"+s})}else _=this._fileUpload.prop("files");if(_.length){if(a=new FormData,d=this._createUploadMatrix(_),!this._uploadMatrix[d].length)return null;for(o=0,r=_.length;o<r;o++)this._uploadMatrix[d][o]&&(l=this._uploadMatrix[d][o].data("internalFileID"),i?a.append("__files["+l+"]",i,_[o].name):a.append("__files["+l+"]",_[o],_[o].name));for(u in a.append("actionName",this._options.action),a.append("className",this._className),c=this._getParameters())a.append("parameters["+u+"]",c[u]);h=this,$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:a,contentType:!1,processData:!1,success:function(t,e,i){h._success(d,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",(function(t){h._progress(d,t)}),!1),t},xhrFields:{withCredentials:!0}})}return d},_createUploadMatrix:function(t){var e,i,n,s,a;if(t.length){for(e=this._uploadMatrix.length,this._uploadMatrix[e]=[],i=0,n=t.length;i<n;i++)s=t[i],(a=this._initFile(s)).hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[e][i]=a);return e}return null},_success:function(t,e){},_error:function(t,e,i){},_progress:function(t,e){var i,n=Math.round(100*e.loaded/e.total);for(i in this._uploadMatrix[t])this._uploadMatrix[t][i].find("progress").attr("value",n)},_getParameters:function(){return{}},_initFile:function(t){return $("<li>"+t.name+" ("+t.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){var t,e,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),t=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(t),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(t),$('<input type="hidden" name="isFallback" value="1" />').appendTo(t),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(t),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(t),e=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+e[i]+'" />').appendTo(t);t.submit($.proxy((function(){var t={name:this._getFilename(),size:""},e=this._createUploadMatrix([t]),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(e)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(t){var e=$.parseJSON(this._iframe.contents().find("pre").html());this._success(t,e)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(t,e,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(t,e,i,n)},_upload:function(){var t,e,i,n,s,a,o,r=this._fileUpload.prop("files");for(t=0,e=r.length;t<e;t++)if(i=r[t],n=new FormData,s=this._createUploadMatrix(i),this._uploadMatrix[s].length){for(o in n.append("__files["+s+"]",i),n.append("actionName",this._options.action),n.append("className",this._className),a=this._getParameters())n.append("parameters["+o+"]",a[o]);this._sendRequest(s,n)}},_sendRequest:function(t,e){var i=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:e,contentType:!1,processData:!1,success:function(e,n,s){i._success(t,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",(function(e){i._progress(t,e)}),!1),e}})},_createUploadMatrix:function(t){var e=this._initFile(t);return e.hasClass("uploadFailed")?null:(e.data("filename",t.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=e,this._internalFileID-1)},_success:function(t,e){},_progress:function(t,e){var i=Math.round(100*e.loaded/e.total);this._uploadMatrix[t].find("progress").attr("value",i)},_showOverlay:function(){var t,e,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),t=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(t),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(t),$('<input type="hidden" name="isFallback" value="1" />').appendTo(t),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(t),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(t),e=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+e[i]+'" />').appendTo(t);t.submit($.proxy((function(){var t={name:this._getFilename(),size:""},e=this._createUploadMatrix(t),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(e)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(t){var e=$.parseJSON(this._iframe.contents().find("pre").html());this._success(t,e)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:{},_notification:{},_offset:0,_options:{},_proxy:{},_structure:{},init:function(){},_tableRowHelper:function(){},_submit:function(){},_success:function(){}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(t){var e=!1;require(["Environment"],function(t){"desktop"!==t.platform()&&(e=!0)}.bind(this)),e||(this._activeElementID="",this._identifier=t,require(["WoltLabSuite/Core/Controller/Popover"],function(e){e.init({attributeName:"legacy",className:t,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(t,e){this._activeElementID=t,this._popoverObj=e,this._loadContent()},_insertContent:function(t,e){this._popoverObj.setContent(this._identifier,t,e)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(t,e){if(this._itemList=$(t),this._searchInput=$(e),this._data={},this._itemList.length&&this._searchInput.length){if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",(function(){setTimeout((function(){i._onPaste()}),100)}))}this._searchInput.parents(".dropdown").data("preventSubmit",!0)}else console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(t){return null!==t||this._keyPress(null)},_keyPress:function(t){if(null===t||44===t.charCode||t.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&t.keyCode===$.ui.keyCode.ENTER){if(null!==t&&t.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var e=$.trim(this._searchInput.val());return t&&44===t.charCode&&(e=e.substring(0,this._searchInput.getCaret())),""===e||(this.addItem({objectID:0,label:e}),t&&44===t.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==t&&t.stopPropagation(),!1)}return!0},_onPaste:function(){var t,e,i,n=$.trim(this._searchInput.val());for(t=0,e=(n=n.split(",")).length;t<e;t++)""!==(i=$.trim(n[t]))&&this.addItem({objectID:0,label:i});this._searchInput.val("")},load:function(t){},_click:function(t){var e=$(t.currentTarget),i=e.data("objectID"),n=e.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),e.remove(),t.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(t){return!(!this._data[t.objectID]||0===t.objectID&&this._allowCustomInput)||($('<li class="badge">'+WCF.String.escapeHTML(t.label)+"</li>").data("objectID",t.objectID).data("label",t.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(t.label),this._addItem(t.objectID,t.label),!0)},clearList:function(){this._itemList.children("li").each($.proxy((function(t,e){var i=$(e);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))}),this))},_submit:function(){this._keyDown(null)},_addItem:function(t,e){this._data[t]=e},_removeItem:function(t,e){delete this._data[t]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(t,e,i,n,s,a){require(["WoltLabSuite/Core/Language/Chooser"],(function(o){o.init(t,e,i,n,s,a)}))}}),WCF.Style={},jQuery.fn.extend({wcfDialog:function(t){var e=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var s,a=i.identify(this[0]);"close"===t?n.close(a):"render"===t?n.rebuild(a):"option"===t?3===e.length&&("title"===e[1]&&"string"==typeof e[2]?n.setTitle(a,e[2]):0===e[1].indexOf("on")?n.setCallback(a,e[1],e[2]):"closeConfirmMessage"===e[1]&&null===e[2]&&n.setCallback(a,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),s=1===e.length&&"object"==typeof e[0]?e[0]:{},n.openStatic(a,null,s),s.hasOwnProperty("title")&&n.setTitle(a,s.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var t,e,i=$(this._items.get(0)).outerHeight();for(this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy((function(t,e){$(e).show().css({height:i,left:(this._width+this.options.itemGap)*t,width:this._width})}),this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element),t=0;t<this._count;t++)e=$('<li><a><fa-icon size="16" name="circle"></fa-icon></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList),0==t&&e.find("fa-icon")[0].setIcon("circle",!0);this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var t=$(this._items.get(0)).css("height","auto").outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy((function(t,e){$(e).css({left:(this._width+this.options.itemGap)*t,width:this._width})}),this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var t=this;this._timer=new WCF.PeriodicalExecuter((function(){t.moveTo(null)}),1e3*this.options.cycleInterval)}},_click:function(t){this.moveTo($(t.currentTarget).data("index")),this._resetTimer()},moveTo:function(t){this._index=null===t?this._index+1:t,this._index==this._count&&(this._index=0),this._buttonList[0].querySelectorAll("fa-icon").forEach((t=>t.setIcon("circle",!1))),$(this._buttonList.find("fa-icon").get(this._index))[0].setIcon("circle",!0),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(t){return this._items[t]?this._items[t]:null}}),jQuery.fn.extend({datepicker:function(t){var e=this[0],i=Array.prototype.slice.call(arguments,1);switch(t){case"destroy":window.__wcf_bc_datePicker.destroy(e);break;case"getDate":return window.__wcf_bc_datePicker.getDate(e);case"option":if("onClose"===i[0])return i.length>1?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(e,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(e,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+t+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(t){var e=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],(function(n,s){var a=s.getTabMenu(n.identify(e));null!==a&&a[t].apply(a,i)}))}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(t){this._api=new t(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(t){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:t})}.bind(this),callbackSwitch:function(t){this._trigger("switched",void 0,{activePage:t})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(t,e){if("activePage"==t&&e!=this.options[t]&&e>0&&e<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:e});i||void 0!==i?this._api.switchPage(e):this._trigger("notSwitched",void 0,{activePage:e})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){},_updateSelection:function(){}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:{},_categories:{},init:function(){},_buildStructure:function(){},_updateSelection:function(){}}),WCF.Condition={},WCF.Notice={}; })(this);
 
-// WCF.ACL.js
-(function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:{},_containerElements:{},_objectID:0,_objectTypeID:{},_options:{},_proxy:{},_search:{},_values:{},init:function(){},_reset:function(){},_loadACL:function(){},addObject:function(){},_createListItem:function(){},_removeItem:function(){},_selectFirstEntry:function(){},_success:function(){},_parseData:function(){},_click:function(){},_select:function(){},_change:function(){},_setupPermissions:function(){},_savePermissions:function(){},submit:function(){},_save:function(){}}); })(this);
-
-// WCF.Attachment.js
-(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_options:{},_pendingDragAndDrop:void 0,_sourceElement:void 0,init:function(t,e,i,n,a,s,o,r,l){if(this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:o}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(n),this._tmpHash=a,this._parentObjectID=parseInt(s),this._editorId=r,this._options=$.extend(!0,this._options,l||{}),this._pendingDragAndDrop=new Map,this._sourceElement=document.getElementById(r),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),this._fileListSelector.children("li").addClass("formAttachmentListItem"),WCF.System.Event.addListener("WoltLabSuite/Core/Ui/Object/Action","delete",(t=>this._onDelete(t))),this._makeSortable(),this._insertAllButton=$('<button type="button" class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</button>").hide(),null!==this._sourceElement){this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),require(["WoltLabSuite/Core/Component/Ckeditor","WoltLabSuite/Core/Component/Ckeditor/Event"],(({getCkeditor:t},{listenToCkeditor:e})=>{const n=()=>{"com.woltlab.wcf.user.signature"!==i&&this._fileListSelector[0].querySelectorAll('li:not(.uploadFailed) .jsObjectAction[data-object-action="delete"]').forEach((t=>{delete t.dataset.confirmMessage,t.click()}))};e(this._sourceElement).reset((()=>{this._reset()})).uploadAttachment((t=>{this._editorUpload(t)})).discardRecoveredData((()=>{n()})).collectMetaData((t=>{this._tmpHash&&(t.metaData.tmpHash=this._tmpHash)}));const a=t(this._sourceElement);a?""===a.getHtml()&&n():e(this._sourceElement).ready((({ckeditor:t})=>{""===t.getHtml()&&n()}))}));const t=this._fileListSelector[0].closest("form");t&&t.addEventListener("submit",(()=>{const e=t.querySelector('input[name="tmpHash"]');e&&(e.value=this._tmpHash)}));var c=WCF.System.Event.addListener("com.woltlab.wcf.ckeditor5","sync_"+this._tmpHash,this._sync.bind(this));WCF.System.Event.addListener("com.woltlab.wcf.ckeditor5","destroy_"+this._editorId,function(){WCF.System.Event.removeListener("com.woltlab.wcf.ckeditor5","sync_"+this._tmpHash,c)}.bind(this))}},_editorUpload:function(t){t.promise=new Promise((e=>{this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0),this._upload(void 0,t.file,void 0,(i=>{this._pendingDragAndDrop.set(i,((i,n)=>{0===i?t.abortController.abort():e({attachmentId:i,url:n})}))}))}))},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t,e=this._buttonSelector.next("small.innerError"),i=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,n=this._fileUpload?this._fileUpload.prop("files").length:0;return i<=0||i<n?(t=i<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,i),e.length||(e=$('<small class="innerError" />').insertAfter(this._buttonSelector)),e.html(t),!1):(e.remove(),!0)},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._sourceElement&&t.button&&this._removeAttachmentFromEditor(t.button.data("objectID"))},_upload:function(t,e,i,n){var a=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(s,o,r,l){var c,d,h,u;l.show(),c=[],e?c.push(e):i?c.push(s.blobToFile(i,"pasted-from-clipboard")):c=this._fileUpload.prop("files"),d=Promise.resolve(c),this._options.autoScale&&this._options.autoScale.enable&&(h=this._buttonSelector.data("maxSize"),u=new r,d=Array.prototype.reduce.call(c,function(t,e){return t.then(function(t){var i,n;return-1===["image/png","image/jpeg","image/webp"].indexOf(e.type)?(t.push(e),t):(i=new Promise((function(t,i){setTimeout((function(){t(e)}),1e4)})),n=u.loadFile(e).then(function(t){var n,a,s=t.exif,r=this._options.autoScale.maxWidth,l=this._options.autoScale.maxHeight,c=this._options.autoScale.quality;return window.devicePixelRatio>=2&&(n=window.screen.width*window.devicePixelRatio,a=window.screen.height*window.devicePixelRatio,n-10<t.image.width&&t.image.width<n+10&&a-10<t.image.height&&(r=Math.min(r,window.screen.width))),u.resize(t.image,r,l,c,e.size>h,i).then(function(t){if(void 0===t)return e;var i=this._options.autoScale.fileType;return("keep"===this._options.autoScale.fileType||o.containsTransparentPixels(t))&&(i=e.type),u.saveFile({exif:s,image:t},e.name,i,c)}.bind(this)).then((function(t){return t.size>e.size?(console.debug('[WCF.Attachment] File size of "'+e.name+'" increased, uploading untouched image.'),e):t}))}.bind(this)).catch((function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+e.name+'":',t),e})),Promise.race([i,n]).then((function(e){return t.push(e),t})))}.bind(this))}.bind(this),Promise.resolve([]))),d.then(function(e){var i=void 0;return this._validateLimit()&&(i=a(t,void 0,void 0,e)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof n&&n(i),i}.bind(this)).catch((function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)})).finally(l.hide)}.bind(this),(function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)}))},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><fa-icon size="64" name="spinner"></fa-icon><div><div><p>'+WCF.String.escapeHTML(t.name)+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e[0].querySelector("fa-icon").setIcon("ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_success:function(t,e){var i,n,a,s,o,r,l,c,d,h,u;for(n in this._uploadMatrix[t]){if(!this._uploadMatrix[t].hasOwnProperty(n))continue;(a=this._uploadMatrix[t][n]).find("progress").remove(),s=a.data("filename"),o=a.data("internalFileID");let m=0,p="";e.returnValues&&e.returnValues.attachments[o]?(i=e.returnValues.attachments[o],elData(a[0],"object-id",i.attachmentID),a.addClass("jsObjectActionObject"),i.tinyURL?(a.find("fa-icon").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),a.data("height",i.height),a.data("width",i.width),elData(a[0],"is-image",i.isImage)):a[0].querySelector("fa-icon").setIcon(i.iconName),(r=$('<a href=""></a>')).text(s).attr("href",i.url),p=i.url,r[0].target="_blank",0!=i.isImage&&r.addClass("jsImageViewer").attr("title",s),a.find("p").empty().append(r),a.find("small").append(i.formattedFilesize),l=a.find("ul").addClass("buttonGroup"),c=$('<li><button type="button" class="button small jsObjectAction" data-object-action="delete" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</button></li>"),l.append(c),a.data("objectID",i.attachmentID),m=i.attachmentID,this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><button type="button" class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</button></li>").appendTo(l),$('<li><button type="button" class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</button></li>").appendTo(l)):$('<li><button type="button" class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</button></li>").appendTo(l)),this._triggerSync("new",{html:a[0].outerHTML}),this._registerEditorButtons(a[0])):(a[0].querySelector("fa-icon").setIcon("ban"),d="",e.returnValues&&e.returnValues.errors[o]?"uploadFailed"===(d=(h=e.returnValues.errors[o]).errorType)&&h.additionalData.phpLimitExceeded&&(d="uploadPhpLimit"):d="uploadFailed",a.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+d)+"</small>")),a.addClass("uploadFailed"));const f=this._pendingDragAndDrop.get(t);void 0!==f&&(f(m,p),this._pendingDragAndDrop.delete(t)),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),a.hasClass("uploadFailed")||((u=a.find(".jsButtonAttachmentInsertThumbnail")).length||(u=a.find(".jsButtonAttachmentInsertFull")),u.trigger("click")))}this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){const e=parseInt(t.currentTarget.dataset.objectId),i=t.currentTarget.dataset.url||"";require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:t})=>{t(this._sourceElement).insertAttachment({attachmentId:e,url:i})}))},_insertAll:function(){var t,e,i,n;for(i=0,n=this._fileListSelector[0].childNodes.length;i<n;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(t){this._fileListSelector.find("li").each((function(e,i){var n=$(i);const a=i.querySelector('fa-icon[name="spinner"]');if(a){n.addClass("uploadFailed"),a.setIcon("ban");let e=WCF.Language.get("wcf.attachment.upload.error.uploadFailed");t.responseJSON&&t.responseJSON.message?e=t.responseJSON.message:413==t.status&&(e=WCF.Language.get("wcf.attachment.upload.error.http413")),n.find("div > div").append($('<small class="innerError">'+e+"</small>"))}}))},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var t=[];this._fileListSelector.children("li:not(.uploadFailed)").each((function(e,i){t.push($(i).data("objectID"))})),t.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:t,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){if(!t.objectElement.classList.contains("formAttachmentListItem"))return;const e=t.objectElement.dataset.objectId,i=this._fileListSelector[0].querySelector(`.formAttachmentListItem[data-object-id="${e}"]`);null!==i&&i.remove(),this._removeLimitError({}),this._removeAttachmentFromEditor(e)},_sync:function(t){if(t.source!==this){if("new"!==t.type)throw new Error("Unexpected type '"+t.type+"'");this._syncNew(t.data)}},_syncNew:function(t){require(["Dom/Util"],function(e){var i=e.createFragmentFromHtml(t.html),n=elBySel("li",i);n.id="",this._registerEditorButtons(n),this._fileListSelector[0].appendChild(n),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5","sync_"+this._tmpHash,{source:this,type:t,data:e})},_removeAttachmentFromEditor(t){require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(this._sourceElement).removeAttachment({attachmentId:parseInt(t)})}))}}); })(this);
-
 // WCF.ColorPicker.js
 (function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({init:function(){},hsvToRgb:function(o,n,c){return window.__wcf_bc_colorUtil.hsvToRgb(o,n,c)},rgbToHsv:function(o,n,c){return window.__wcf_bc_colorUtil.rgbToHsv(o,n,c)},hexToRgb:function(o){return window.__wcf_bc_colorUtil.hexToRgb(o)},rgbToHex:function(o,n,c){return window.__wcf_bc_colorUtil.rgbToHex(o,n,c)}}); })(this);
 
 // WCF.ImageViewer.js
-(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var e=$("a.jsImageViewer");e.length&&e.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(e){e.ctrlKey||(e.preventDefault(),e.stopPropagation(),$(e.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(e.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy((function(e,i){i.complete&&this._checkImageSize({currentTarget:i})}),this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(e){var i,t=$(e.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((i=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<i.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_messageSignature:null,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._messageSignature=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(e){if(null!=e.state&&"imageViewer"===e.state.name&&e.state.container===this._eventNamespace)return this.open(e),void this.showImage(e.state.image);this.close(e)}.bind(this))},open:function(e,i){if(e&&e.preventDefault(),this._isOpen)return!1;if(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e&&"popstate"===e.type||window.history.pushState({name:"imageViewer"},"",""),this._messageSignature=null,this.options.staticViewer){i&&(this._messageSignature=document.getElementById(i).closest(".messageSignature")),this._active=-1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=null;var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,i),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy((function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()}),this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),require(["Ui/Screen"],(function(e){e.pageOverlayOpen()})),!0},close:function(e){if(e&&e.preventDefault(),e&&"popstate"===e.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],(function(e){e.pageOverlayClose()})),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy((function(){var e=this._active+1;e==this._items&&(e=0),this.showImage(e)}),this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("pause"),!0)},stopSlideshow:function(e){return!!this._slideshowEnabled&&(this._timer.stop(),e&&this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("play"),this._slideshowEnabled=!1,!0)},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,(()=>{window.setTimeout((()=>this._renderImage()),0)}))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(e){switch(e.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var i=this._ui.header.find("h1 > a");1==i.length?window.location=i.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(e,i,t){var s,a,n,h,o;this._container.addClass("open"),s=null,e&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!i&&!t&&this.startSlideshow()),i?this._ui.imageList.children("li").each($.proxy((function(e,t){var s=$(t);if(s.data("objectID")==i)return s.trigger("click"),this.moveToImage(s.data("index")),!1}),this)):t?(a=[],$(this.options.imageSelector).each(function(e,i){i.closest(".messageSignature")===this._messageSignature&&a.push(i)}.bind(this)),n=0,a.forEach((function(e,i){e.id===t&&(n=i)})),h=this._ui.imageList.children("li:eq("+n+")"),-1!==this._active&&(o=!1,this._active!=h.data("index")&&(o=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(o=!0),o&&(this._active=-1)),h.trigger("click"),this.moveToImage(h.data("index"))):null!==s&&s.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(e){this.showImage($(e.currentTarget).data("index"),!0)},showImage:function(e,i){var t,s,a,n,h,o;return this._active!=e&&(this.stopSlideshow(i||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=e,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"",""),t=this._images[e],this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active"),s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a,n=this._active,this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy((function(){this._imageOnLoad(n,a)}),this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL),h=WCF.String.escapeHTML(t.image.title),t.image.link&&(h='<a href="'+t.image.link+'">'+h+"</a>"),this._ui.header.find("h1").html(h),this.options.staticViewer||(o=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(o='<a href="'+t.series.link+'">'+o+"</a>"),this._ui.header.find("h2").html(o)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full[0].querySelector("a").href=t.image.fullURL?t.image.fullURL:t.image.url,this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0)},_imageOnLoad:function(e,i){e==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[i].addClass("active"),this.options.staticViewer&&this._renderImage(i,null),this.startSlideshow())},_renderImage:function(e,i,t){var s,a,n,h,o,l,r=!0;i||(e=this._activeImage,i=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},r=!1),t.height-=22,t.width-=20,(s=this._ui.images[e]).prop("src")!==i.image.url&&s.prop("src",i.image.url),r&&s[0].complete&&s.trigger("load"),this.options.staticViewer&&!i.image.height&&s[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=i.image.url,i.image.height=a.height||s[0].naturalHeight,i.image.width=a.width||s[0].naturalWidth):(s.css({height:"auto",width:"auto"}),i.image.height=s[0].height,i.image.width=s[0].width)),n=i.image.height,h=i.image.width,o=0,n>t.height&&(o=t.height/n,n=t.height,h=Math.floor(h*o)),h>t.width&&(o=t.width/h,h=t.width,n=Math.floor(n*o)),l=Math.floor((t.width-h)/2),this._ui.images[e].css({height:n+"px",left:l+10+"px",marginTop:-1*Math.round(n/2)+"px",width:h+"px"})},_initUI:function(){var e,i,t,s,a,n,h,o;return!this._didInit&&(this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body),e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious"><fa-icon size="24" name="angles-left"></fa-icon></span><div><ul /></div><span class="wcfImageViewerButtonNext"><fa-icon size="24" name="angles-right"></fa-icon></span></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><fa-icon size="32" name="angle-left"></fa-icon></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><fa-icon size="32" name="play"></fa-icon></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><fa-icon size="32" name="angle-right"></fa-icon></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><fa-icon size="32" name="expand"></fa-icon></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><a href="#" target="_blank"><fa-icon size="32" name="arrow-up-right-from-square"></fa-icon></a></li>').appendTo(t),this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")})),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")}))],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy((function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))}),this)),$(`<button type="button" class="wcfImageViewerButtonClose jsTooltip" title="${WCF.Language.get("wcf.global.button.close")}">\n\t\t\t<fa-icon size="48" name="xmark"></fa-icon>\n\t\t</button>`).appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(e){e.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0)},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var e=this;this._ui.imageContainer.swipe({swipeLeft:function(i){e._container.hasClass("maximized")&&e._nextImage(i)},swipeRight:function(i){e._container.hasClass("maximized")&&e._previousImage(i)},tap:function(i,t){switch(t.tagName){case"DIV":case"IMG":e._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active"),this._ui.slideshow.enlarge[0].querySelector("fa-icon").setIcon("compress"),this._renderImage(null,void 0,null)},_next:function(e,i){if(this._ui.buttonNext.hasClass("pointer")){null==i&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(i||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(e,i){this._ui.buttonPrevious.hasClass("pointer")&&(null==i&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(i||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(e){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),e&&(e.preventDefault(),e.stopPropagation()))},_previousImage:function(e){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),e&&(e.preventDefault(),e.stopPropagation()))},moveToImage:function(e){var i,t=(e-3)*this._thumbnailWidth,s=t+5*this._thumbnailWidth,a=this._thumbnailOffset,n=this._thumbnailOffset+this._thumbnailContainerWidth,h=!1;if((t<a||s>n)&&(h=!0),h)if(i=0,t<a){for(;t<a;)i++,a-=this._thumbnailWidth;this._previous(null,i)}else{for(;s>n;)i++,n+=this._thumbnailWidth;this._next(null,i)}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var e=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=e?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(e){var i,t,s,a,n,h;for(this.options.staticViewer&&(this._images=[],this._ui.imageList.empty()),i=0,t=e.length;i<t;i++)s=e[i],(a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList)).data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this)),(n=a.children("img")).get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n)):(h=this,n.on("load",(function(){var e=$(this);e.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(e)}))),s.listItem=a,this._images.push(s)},_fixThumbnailDimensions:function(e){var i,t,s,a=new Image;a.src=e.prop("src"),(i=a.height)==(t=a.width)?i=t=80:i<t?(s=80/t,t=80,i*=s):(s=80/i,i=80,t*=s),e.css({height:i+"px",width:t+"px"})},_loadNextImages:function(e){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:e&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var e=[];return $(this.options.imageSelector).each(function(i,t){var s,a;t.closest(".messageSignature")===this._messageSignature&&((a=(s=$(t)).find("> img, .attachmentThumbnailImage > img").first()).length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),e.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:a.prop("src")},user:null}))}.bind(this)),this._items=e.length,e},_success:function(e,i,t){var s,a;e.returnValues.items&&(this._items=e.returnValues.items),s=this._initUI(),this._createThumbnails(e.returnValues.images),a=e.returnValues.targetImageID?e.returnValues.targetImageID:0,this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
+(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var e=$("a.jsImageViewer");e.length&&e.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(e){e.ctrlKey||(e.preventDefault(),e.stopPropagation(),$(e.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(e.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy((function(e,i){i.complete&&this._checkImageSize({currentTarget:i})}),this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(e){var i,t=$(e.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((i=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<i.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_messageSignature:null,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._messageSignature=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(e){if(null!=e.state&&"imageViewer"===e.state.name&&e.state.container===this._eventNamespace)return this.open(e),void this.showImage(e.state.image);this.close(e)}.bind(this))},open:function(e,i){if(e&&e.preventDefault(),this._isOpen)return!1;if(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e&&"popstate"===e.type||window.history.pushState({name:"imageViewer"},"",""),this._messageSignature=null,this.options.staticViewer){i&&(this._messageSignature=document.getElementById(i).closest(".messageSignature")),this._active=-1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=null;var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,i),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy((function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()}),this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),require(["Ui/Screen"],(function(e){e.pageOverlayOpen()})),!0},close:function(e){if(e&&e.preventDefault(),e&&"popstate"===e.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],(function(e){e.pageOverlayClose()})),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy((function(){var e=this._active+1;e==this._items&&(e=0),this.showImage(e)}),this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("pause"),!0)},stopSlideshow:function(e){return!!this._slideshowEnabled&&(this._timer.stop(),e&&this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("play"),this._slideshowEnabled=!1,!0)},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,(()=>{window.setTimeout((()=>this._renderImage()),0)}))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(e){switch(e.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var i=this._ui.header.find("h1 > a");1==i.length?window.location=i.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(e,i,t){var s,a,n,h,o;this._container.addClass("open"),s=null,e&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!i&&!t&&this.startSlideshow()),i?this._ui.imageList.children("li").each($.proxy((function(e,t){var s=$(t);if(s.data("objectID")==i)return s.trigger("click"),this.moveToImage(s.data("index")),!1}),this)):t?(a=[],$(this.options.imageSelector).each(function(e,i){i.closest(".messageSignature")===this._messageSignature&&a.push(i)}.bind(this)),n=0,a.forEach((function(e,i){e.id===t&&(n=i)})),h=this._ui.imageList.children("li:eq("+n+")"),-1!==this._active&&(o=!1,this._active!=h.data("index")&&(o=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(o=!0),o&&(this._active=-1)),h.trigger("click"),this.moveToImage(h.data("index"))):null!==s&&s.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(e){this.showImage($(e.currentTarget).data("index"),!0)},showImage:function(e,i){var t,s,a,n,h,o;return this._active!=e&&(this.stopSlideshow(i||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=e,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"",""),t=this._images[e],this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active"),s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a,n=this._active,this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy((function(){this._imageOnLoad(n,a)}),this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL),h=WCF.String.escapeHTML(t.image.title),t.image.link&&(h='<a href="'+t.image.link+'">'+h+"</a>"),this._ui.header.find("h1").html(h),this.options.staticViewer||(o=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(o='<a href="'+t.series.link+'">'+o+"</a>"),this._ui.header.find("h2").html(o)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full[0].querySelector("a").href=t.image.fullURL?t.image.fullURL:t.image.url,this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0)},_imageOnLoad:function(e,i){e==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[i].addClass("active"),this.options.staticViewer&&this._renderImage(i,null),this.startSlideshow())},_renderImage:function(e,i,t){var s,a,n,h,o,l,r=!0;i||(e=this._activeImage,i=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},r=!1),t.height-=22,t.width-=20,(s=this._ui.images[e]).prop("src")!==i.image.url&&s.prop("src",i.image.url),r&&s[0].complete&&s.trigger("load"),this.options.staticViewer&&!i.image.height&&s[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=i.image.url,i.image.height=a.height||s[0].naturalHeight,i.image.width=a.width||s[0].naturalWidth):(s.css({height:"auto",width:"auto"}),i.image.height=s[0].height,i.image.width=s[0].width)),n=i.image.height,h=i.image.width,o=0,n>t.height&&(o=t.height/n,n=t.height,h=Math.floor(h*o)),h>t.width&&(o=t.width/h,h=t.width,n=Math.floor(n*o)),l=Math.floor((t.width-h)/2),this._ui.images[e].css({height:n+"px",left:l+10+"px",marginTop:-1*Math.round(n/2)+"px",width:h+"px"})},_initUI:function(){var e,i,t,s,a,n,h,o;return!this._didInit&&(this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body),e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious"><fa-icon size="24" name="angles-left"></fa-icon></span><div><ul /></div><span class="wcfImageViewerButtonNext"><fa-icon size="24" name="angles-right"></fa-icon></span></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><fa-icon size="32" name="angle-left"></fa-icon></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><fa-icon size="32" name="play"></fa-icon></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><fa-icon size="32" name="angle-right"></fa-icon></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><fa-icon size="32" name="expand"></fa-icon></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><a href="#" target="_blank"><fa-icon size="32" name="arrow-up-right-from-square"></fa-icon></a></li>').appendTo(t),this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")})),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")}))],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy((function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))}),this)),$(`<button type="button" class="wcfImageViewerButtonClose jsTooltip" title="${WCF.Language.get("wcf.global.button.close")}">\n\t\t\t<fa-icon size="48" name="xmark"></fa-icon>\n\t\t</button>`).appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(e){e.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0)},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var e=this;this._ui.imageContainer.swipe({swipeLeft:function(i){e._container.hasClass("maximized")&&e._nextImage(i)},swipeRight:function(i){e._container.hasClass("maximized")&&e._previousImage(i)},tap:function(i,t){switch(t.tagName){case"DIV":case"IMG":e._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active"),this._ui.slideshow.enlarge[0].querySelector("fa-icon").setIcon("compress"),this._renderImage(null,void 0,null)},_next:function(e,i){if(this._ui.buttonNext.hasClass("pointer")){null==i&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(i||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(e,i){this._ui.buttonPrevious.hasClass("pointer")&&(null==i&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(i||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(e){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),e&&(e.preventDefault(),e.stopPropagation()))},_previousImage:function(e){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),e&&(e.preventDefault(),e.stopPropagation()))},moveToImage:function(e){var i,t=(e-3)*this._thumbnailWidth,s=t+5*this._thumbnailWidth,a=this._thumbnailOffset,n=this._thumbnailOffset+this._thumbnailContainerWidth,h=!1;if((t<a||s>n)&&(h=!0),h)if(i=0,t<a){for(;t<a;)i++,a-=this._thumbnailWidth;this._previous(null,i)}else{for(;s>n;)i++,n+=this._thumbnailWidth;this._next(null,i)}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var e=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=e?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(e){var i,t,s,a,n,h;for(this.options.staticViewer&&(this._images=[],this._ui.imageList.empty()),i=0,t=e.length;i<t;i++)s=e[i],(a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList)).data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this)),(n=a.children("img")).get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n)):(h=this,n.on("load",(function(){var e=$(this);e.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(e)}))),s.listItem=a,this._images.push(s)},_fixThumbnailDimensions:function(e){var i,t,s,a=new Image;a.src=e.prop("src"),(i=a.height)==(t=a.width)?i=t=80:i<t?(s=80/t,t=80,i*=s):(s=80/i,i=80,t*=s),e.css({height:i+"px",width:t+"px"})},_loadNextImages:function(e){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:e&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var e=[];return $(this.options.imageSelector).each(function(i,t){var s,a;if(t.closest(".messageSignature")!==this._messageSignature)return;(a=(s=$(t)).find("> img, .attachmentThumbnailImage > img").first()).length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail"));let n="";if(0===a.length){const e=s[0].closest(".attachment__item");if(null!==e){const i=e.querySelector("woltlab-core-file"),t=i?.thumbnails.find((e=>"tiny"===e.identifier));n=t.link}}else n=a.prop("src");e.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:n},user:null})}.bind(this)),this._items=e.length,e},_success:function(e,i,t){var s,a;e.returnValues.items&&(this._items=e.returnValues.items),s=this._initUI(),this._createThumbnails(e.returnValues.images),a=e.returnValues.targetImageID?e.returnValues.targetImageID:0,this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
 
 // WCF.Label.js
-(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList={},WCF.Label.ACPList.Connect=Class.extend({init:function(){},_click:function(){}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,i,n){var a,o,s,l;if(this._container=null,this._groups={},this._showWithoutSelection=!0===n,this._initContainers(e),$.getLength(t))for(a in t)(o=this._groups[a])&&WCF.Dropdown.getDropdownMenu(o.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy((function(e,i){var n=$(i),o=n.data("labelID")||0;o&&t[a]==o&&this._selectLabel(n,!0)}),this));for(s in this._containers)void 0===(l=this._containers[s]).data("labelID")&&l.data("labelID",0);this._container=$(e),i?$(i).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function e(t){t.addEventListener("wheel",(function(t){t.preventDefault()}),{passive:!1})}$(t).find(".labelChooser").each($.proxy((function(t,i){var n,a,o,s,l=$(i),r=l.data("groupID");this._groups[r]||(n=l.wcfIdentify(),null===(a=WCF.Dropdown.getDropdownMenu(n))&&(WCF.Dropdown.initDropdown(l.find(".dropdownToggle")),a=WCF.Dropdown.getDropdownMenu(n)),o=a,"div"==a.getTagName()&&a.children(".scrollableDropdownMenu").length&&(o=$("<ul />").appendTo(a),a=a.children(".scrollableDropdownMenu")),this._groups[r]=l,a.children("li").data("groupID",r).click($.proxy(this._click,this)),l.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(o),this._showWithoutSelection&&e($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(o).click($.proxy(this._click,this))[0]),l.data("forceSelection")||((s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(o)).click($.proxy(this._click,this)),e(s[0])))}),this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t,e,i=this._container.find(".formSubmit");for(t in i.find('input[type="hidden"]').each((function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()})),this._groups)(e=this._groups[t]).data("labelID")&&$('<input type="hidden" name="labelIDs['+t+']" value="'+e.data("labelID")+'" />').appendTo(i)},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:{},init:function(){},_updateLabelGroups:function(){},_submit:function(){}}); })(this);
+(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,i,n){var a,o,s,l;if(this._container=null,this._groups={},this._showWithoutSelection=!0===n,this._initContainers(e),$.getLength(t))for(a in t)(o=this._groups[a])&&WCF.Dropdown.getDropdownMenu(o.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy((function(e,i){var n=$(i),o=n.data("labelID")||0;o&&t[a]==o&&this._selectLabel(n,!0)}),this));for(s in this._containers)void 0===(l=this._containers[s]).data("labelID")&&l.data("labelID",0);this._container=$(e),i?$(i).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function e(t){t.addEventListener("wheel",(function(t){t.preventDefault()}),{passive:!1})}$(t).find(".labelChooser").each($.proxy((function(t,i){var n,a,o,s,l=$(i),r=l.data("groupID");this._groups[r]||(n=l.wcfIdentify(),null===(a=WCF.Dropdown.getDropdownMenu(n))&&(WCF.Dropdown.initDropdown(l.find(".dropdownToggle")),a=WCF.Dropdown.getDropdownMenu(n)),o=a,"div"==a.getTagName()&&a.children(".scrollableDropdownMenu").length&&(o=$("<ul />").appendTo(a),a=a.children(".scrollableDropdownMenu")),this._groups[r]=l,a.children("li").data("groupID",r).click($.proxy(this._click,this)),l.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(o),this._showWithoutSelection&&e($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(o).click($.proxy(this._click,this))[0]),l.data("forceSelection")||((s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(o)).click($.proxy(this._click,this)),e(s[0])))}),this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t,e,i=this._container.find(".formSubmit");for(t in i.find('input[type="hidden"]').each((function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()})),this._groups)(e=this._groups[t]).data("labelID")&&$('<input type="hidden" name="labelIDs['+t+']" value="'+e.data("labelID")+'" />').appendTo(i)},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:{},init:function(){},_updateLabelGroups:function(){},_submit:function(){}}); })(this);
 
 // WCF.Location.js
 (function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition((function(e){t(e.coords.latitude,e.coords.longitude)}),(function(){t(void 0,void 0)}),{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy((function(){e.open(this._map,t)}),this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t,e,o,s,i=null,a=null,n=null,r=null;for(t in this._markers)o=(e=this._markers[t]).getPosition().lat(),s=e.getPosition().lng(),null===i?(i=a=o,n=r=s):(i>o?i=o:a<o&&(a=o),n>o?n=o:r<s&&(r=s));this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(i,n),new google.maps.LatLng(a,r)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy((function(t){t.infoWindow&&t.infoWindow.open(this._map,t)}),this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng()||(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),0))},_success:function(t,e,o){var s,i;if(t.returnValues&&t.returnValues.markers)for(s in t.returnValues.markers)i=t.returnValues.markers[s],this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a,n=$(i),r=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);return n.append($("<p />").append(r)),a=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",n.get(0)),r.data("marker",a),a},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){var e,o,s,i;for(void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t),e=[],o=0,s=this._markers.length;o<s;o++)(i=this._markers[o]).draggable||(i.setVisible(t),t&&e.push(i));this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy((function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null}),this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){var o,s,i;if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){for(s in o=0,t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),i=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy((function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))}),this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy((function(t){null!==t&&$(this._searchInput).val(t)}),this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},(function(e,o){o==google.maps.GeocoderStatus.OK?t(i?e:e[0].formatted_address):t(null)}))}}; })(this);
 
 // WCF.Message.js
-(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("beforeunload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,n,i,a,s,o;e.preventDefault(),n=(t=$(e.currentTarget)).prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):n,a=n.hashCode(),void 0===this._cache[a]?(s=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),s=!0):this._dialog.empty(),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",n).appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+n+"']"+i+"[/url]").appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+n+'">'+WCF.String.escapeHTML(i)+"</a>").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(n))),this._cache[a]=this._dialog.html(),s?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[a]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,n,i,a,s,o,l,c,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),r=this.element.find("> div, > fieldset");if(u.length==r.length){for(e=this.element.data("preselect"),r.each((function(t,n){if(null!==elBySel(".innerError",n))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t<u.length;t++){n=$(u[t]),i=$(r[t]),void 0===(a=n.data("name"))&&(void 0!==(s=n.children("a").prop("href"))&&s.match(/#([a-zA-Z_-]+)$/)&&(a=RegExp.$1),void 0===a&&(a=n.wcfIdentify())),this._tabs.push({container:i,name:a,tab:n}),this._tabsByName[a]=t,(o=n.children("a").data("index",t).on("mousedown",this._showTab.bind(this)).on("touchstart",this._showTab.bind(this))).attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",i[0].id);const l=u[t].querySelector("span:not(.icon)");l&&o[0].setAttribute("aria-labelledby",$(l).wcfIdentify()),o.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(e===a||!0===e&&0===t)&&o.trigger("mousedown")}if(!0===e&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click"),void 0!==(l=this.element.data("collapsible"))&&(this.options.collapsible=l),c=elData(this.element[0],"wysiwyg-container-id")){const e=document.getElementById(c);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({listenToCkeditor:t})=>{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}))}))}}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,n){var i,a,s,o,l,c=null===e?t:$(e.currentTarget).data("index");for(n=!this.options.collapsible||!0===n,i=null,a=0;a<this._tabs.length;a++){if(s=this._tabs[a],a==c){if(!s.tab.hasClass("active")){s.tab.addClass("active"),s.container.addClass("active"),i=s,s.tab.children("a").attr("aria-expanded",!0),o=s.container[0],null===elBySel(".messageTabMenuContent.active",o)&&null!==elBySel(".messageTabMenuContent",o)&&null!==(l=elBySel("nav > ul > li[data-name] > a",o))&&$(l).trigger("mousedown");continue}if(!0===n)continue}s.tab.removeClass("active"),s.container.removeClass("active"),s.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==i&&this._trigger("show",{},{activeTab:i}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
+(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("beforeunload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,n,i,a,s,o;e.preventDefault(),n=(t=$(e.currentTarget)).prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):n,a=n.hashCode(),void 0===this._cache[a]?(s=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),s=!0):this._dialog.empty(),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",n).appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+n+"']"+i+"[/url]").appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+n+'">'+WCF.String.escapeHTML(i)+"</a>").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(n))),this._cache[a]=this._dialog.html(),s?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[a]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,n,i,a,s,o,l,c,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),r=this.element.find("> div, > fieldset");if(u.length==r.length){for(e=this.element.data("preselect"),r.each((function(t,n){if(null!==elBySel(".innerError",n))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t<u.length;t++){n=$(u[t]),i=$(r[t]),void 0===(a=n.data("name"))&&(void 0!==(s=n.children("a").prop("href"))&&s.match(/#([a-zA-Z_-]+)$/)&&(a=RegExp.$1),void 0===a&&(a=n.wcfIdentify())),this._tabs.push({container:i,name:a,tab:n}),this._tabsByName[a]=t,(o=n.children("a").data("index",t).on("mousedown",this._showTab.bind(this)).on("touchstart",this._showTab.bind(this))).attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",i[0].id);const l=u[t].querySelector("span:not(.icon)");l&&o[0].setAttribute("aria-labelledby",$(l).wcfIdentify()),o.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(e===a||!0===e&&0===t)&&o.trigger("mousedown")}if(!0===e&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click"),void 0!==(l=this.element.data("collapsible"))&&(this.options.collapsible=l),c=elData(this.element[0],"wysiwyg-container-id")){const e=document.getElementById(c);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({listenToCkeditor:t})=>{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}))}))}}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,n){var i,a,s,o,l,c=null===e?t:$(e.currentTarget).data("index");for(n=!this.options.collapsible||!0===n,i=null,a=0;a<this._tabs.length;a++){if(s=this._tabs[a],a==c){if(!s.tab.hasClass("active")){s.tab.addClass("active"),s.container.addClass("active"),i=s,s.tab.children("a").attr("aria-expanded",!0),o=s.container[0],null===elBySel(".messageTabMenuContent.active",o)&&null!==elBySel(".messageTabMenuContent",o)&&null!==(l=elBySel("nav > ul > li[data-name] > a",o))&&$(l).trigger("mousedown");continue}if(!0===n)continue}s.tab.removeClass("active"),s.container.removeClass("active"),s.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==i&&this._trigger("show",{},{activeTab:i}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
 
 // WCF.User.js
-(function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var n=$(s).wcfIdentify();e===n?this._hasContent[n]=!0:(this._hasContent[n]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button type="button" class="button small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this);
+(function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var n=$(s).wcfIdentify();e===n?this._hasContent[n]=!0:(this._hasContent[n]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button type="button" class="button small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this);
 
 // WCF.Moderation.js
 (function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:{},init:function(){},_dblclick:function(){},_success:function(){}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:{},init:function(){},_click:function(){},_success:function(){}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_success:function(){}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_objectType:"",init:function(t,e){this._objectType=t,this._buttonSelector=e,this._buttons={},this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var t=this;$(this._buttonSelector).each(((e,n)=>{var o=$(n),i=o.wcfIdentify();t._buttons[i]||(t._buttons[i]=o,require(["WoltLabSuite/Core/Ui/Moderation/Report"],(({registerLegacyButton:t})=>{t(n,this._objectType)})))}))}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_success:function(){}}); })(this);
index 07608bd501df30d598153db711c36d7ff635404a..9ea64be2d6726a5b3ae106f77a4b1629edac5600 100644 (file)
@@ -1,2 +1,2 @@
-var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__createBinding,__addDisposableResource,__disposeResources,_self,Prism,__setModuleDefault,Reflect;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,(function(t,o){!i&&hasProp(e,o)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,i){var n,o,r,a,s,l,c,d,u,p,m=t&&t.split("/"),h=x.map,f=h&&h["*"];if(e&&(l=(e=e.split("/")).length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),function(e){var t,i,n=e.length;for(t=0;t<n;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&h&&(m||f)){e:for(r=(o=e.split("/")).length;r>0;r-=1){if(s=o.slice(0,r).join("/"),m)for(a=m.length;a>0;a-=1)if((n=getOwn(h,m.slice(0,a).join("/")))&&(n=getOwn(n,s))){c=n,d=r;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),p=r)}!c&&u&&(c=u,d=p),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(x.pkgs,e)||e}function i(e){var t,i,n,o;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}t-=1,(i=(n=queue.shift())[0])in C||i in k||(i in T?v.apply(undef,n):k[i]=n)}e&&(o=getOwn(x.shim,e)||{},v(e,o.deps||[],o.exportsFn))}function n(e,n){var o=function(t,r,a,s){var l,c;if(n&&i(),"string"==typeof t){if(y[t])return y[t](e);if(!((l=_(t,e,!0).id)in C))throw new Error("Not loaded: "+l);return C[l]}return t&&!Array.isArray(t)&&(c=t,t=undef,Array.isArray(r)&&(t=r,r=a,a=s),n)?o.config(c)(t,r,a):(r=r||function(){return slice.call(arguments,0)},F.then((function(){return i(),v(undef,t||[],r,a,e)})))};return o.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,o.nameToUrl=function(e,t,i){var n,r,a,s,l,c,d=getOwn(x.pkgs,e);if(d&&(e=d),c=getOwn(B,e))return o.nameToUrl(c,t,i);if(urlRegExp.test(e))s=e+(t||"");else{for(n=x.paths,a=(r=e.split("/")).length;a>0;a-=1)if(l=getOwn(n,r.slice(0,a).join("/"))){Array.isArray(l)&&(l=l[0]),r.splice(0,a,l);break}s=r.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+s}return x.urlArgs&&!/^blob\:/.test(s)?s+x.urlArgs(e,s):s},o.toUrl=function(i){var n,r=i.lastIndexOf("."),a=i.split("/")[0];return-1!==r&&(!("."===a||".."===a)||r>1)&&(n=i.substring(r,i.length),i=i.substring(0,r)),o.nameToUrl(t(i,e),n,!0)},o.defined=function(t){return _(t,e,!0).id in C},o.specified=function(t){return(t=_(t,e,!0).id)in C||t in T},o}function o(e,t,i){e&&(C[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(L,t.map,t.deps)),t.finished=!0,t.resolve(i)}function r(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function a(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=L.execCb(i,e.factory,e.values,C[i])}catch(t){return r(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=C[i])):M.splice(M.indexOf(e),1),o(i,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||a(this))}function l(e,t){var i={};return i.promise=new Promise((function(t,n){i.resolve=t,i.reject=function(t){e||M.splice(M.indexOf(i),1),n(t)}})),i.map=e?t||_(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=s,i.map.pr&&(i.deps=[_(i.map.pr)]),i}function c(e,t){var i;return e?(i=e in T&&T[e])||(i=T[e]=l(e,t)):(i=l(),M.push(i)),i}function d(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(q+=1),i.requireModules=[t]),r(e,i))}}function u(e,t,i,n){i.depMax+=1,w(e,t).then((function(e){i.depFinished(e,n)}),d(i,e.id)).catch(d(i,i.map.id))}function p(e,t,a){e.load(t.n,n(a),function(e){function t(t){n||o(e,c(e),t)}var n;return t.error=function(t){r(c(e),t)},t.fromText=function(t,o){var a,s=c(e),l=_(_(e).n),d=l.id;n=!0,s.factory=function(e,t){return t},o&&(t=o),hasProp(x.config,e)&&(x.config[d]=x.config[e]);try{b.exec(t)}catch(e){(a=new Error("fromText eval for "+d+" failed: "+e)).requireType="fromtexteval",r(s,a)}i(d),s.deps=[l],u(l,null,s,s.deps.length)},t}(t.id),x)}function m(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function h(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach((function(n){var o=n.id,r=!hasProp(y,o)&&c(o,n);!r||r.finished||i[o]||(hasProp(t,o)?e.deps.forEach((function(t,i){t.id===o&&e.depFinished(C[o],i)})):h(r,t,i))})),i[n]=!0}function f(e){var t,i,n,o=[],a=1e3*x.waitSeconds,s=a&&j+a<(new Date).getTime();if(0===P&&(e?e.finished||h(e,{},{}):M.length&&M.forEach((function(e){h(e,{},{})}))),s){for(i in T)(n=T[i]).finished||o.push(n.map.id);(t=new Error("Timeout for modules: "+o)).requireModules=o,t.requireType="timeout",o.forEach((function(e){r(c(e),t)}))}else(P||M.length)&&(E||(E=!0,setTimeout((function(){E=!1,f()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&O[e.dynaId]||(O[e.dynaId]=!0,b.onError(e))})),e}var b,v,_,w,y,E,S,L,C=obj(),k=obj(),x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},I=obj(),M=[],T=obj(),D=obj(),A=obj(),P=0,j=(new Date).getTime(),q=0,O=obj(),N=obj(),B=obj(),F=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;N[t]||(N[t]=!0,c(e.id),importScripts(t),i(e.id))}:function(e){var t,n=e.id,o=e.url;N[o]||(N[o]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",n),t.type=x.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,P+=1,t.addEventListener("load",(function(){P-=1,i(n)}),!1),t.addEventListener("error",(function(){var e,i,o;P-=1,(i=getOwn(x.paths,n))&&Array.isArray(i)&&i.length>1?(t.parentNode.removeChild(t),i.shift(),(o=c(n)).map=_(n),o.map.url=b.nameToUrl(n),S(o.map)):((e=new Error("Load failed: "+n+": "+t.src)).requireModules=[n],e.requireType="scripterror",r(c(n),e))}),!1),t.src=o,x.onNodeCreated&&x.onNodeCreated(t,x,n,o),10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},w=function(e,t){var i,n,o=e.id,r=x.shim[o];if(o in k)i=k[o],delete k[o],v.apply(undef,i);else if(!(o in T))if(e.pr){if(!(n=getOwn(B,o)))return w(_(e.pr)).then((function(i){var n=e.prn?e:_(o,t,!0),r=n.id,a=getOwn(x.shim,r);return r in A||(A[r]=!0,a&&a.deps?b(a.deps,(function(){p(i,n,t)})):p(i,n,t)),c(r).promise}));e.url=b.nameToUrl(n),S(e)}else r&&r.deps?b(r.deps,(function(){S(e)})):S(e);return c(o).promise},_=function(e,i,n){if("string"!=typeof e)return e;var o,r,a,s,l,c,d=e+" & "+(i||"")+" & "+!!n;return s=(a=m(e))[0],e=a[1],!s&&d in I?I[d]:(s&&(o=(s=t(s,i,n))in C&&C[s]),s?o&&o.normalize?(e=o.normalize(e,function(e){return function(i){return t(i,e,!0)}}(i)),c=!0):e=-1===e.indexOf("!")?t(e,i,n):e:(s=(a=m(e=t(e,i,n)))[0],e=a[1],r=b.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&c},s||(I[d]=l),l)},y={require:function(e){return n(e)},exports:function(e){var t=C[e];return void 0!==t?t:C[e]={}},module:function(e,t){return{id:e,uri:t||"",exports:y.exports(e),config:function(){return getOwn(x.config,e)||{}}}}},v=function(e,t,i,n,r){if(e){if(e in D)return;D[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(i=t,t=[]),t=t?slice.call(t,0):null,n||(hasProp(x,"defaultErrback")?x.defaultErrback&&(n=x.defaultErrback):n=g),n&&s.promise.catch(n),r=r||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),s.factory=i,s.deps=t,s.depending=!0,t.forEach((function(i,n){var o;t[n]=o=_(i,r,!0),"require"===(i=o.id)?s.values[n]=y.require(e):"exports"===i?(s.values[n]=y.exports(e),s.usingExports=!0):"module"===i?s.values[n]=s.cjsModule=y.module(e,s.map.url):void 0===i?s.values[n]=void 0:u(o,r,s,n)})),s.depending=!1,s.depCount===s.depMax&&a(s)):e&&o(e,s,i),j=(new Date).getTime(),e||f(s),s.promise},(b=n(null,!0)).config=function(t){var i,n,o,r;return t.context&&t.context!==e?(i=getOwn(contexts,t.context))?i.req.config(t):newContext(t.context).config(t):(I=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(n=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+n}),o=x.shim,r={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){r[t]?(x[t]||(x[t]={}),mixin(x[t],e,!0,!0)):x[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(B[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),o[t]=e})),x.shim=o),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(x.paths[t]=e.location),x.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&b(t.deps,t.callback),b)},b.onError=function(e){throw e},L={id:e,defined:C,waiting:k,config:x,deferreds:T,req:b,execCb:function(e,t,i,n){return t.apply(n,i)}},contexts[e]=L,b}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{"focus-trap":"3rdParty/focus-trap/focus-trap.umd.min","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min","reflect-metadata":"3rdParty/reflect-metadata",tabbable:"3rdParty/focus-trap/index.umd.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn","@googlemaps/markerclusterer":"3rdParty/googlemaps/markerclusterer/index.umd","@ckeditor/ckeditor5-inspector":"3rdParty/ckeditor/ckeditor5-inspector/inspector","@woltlab/editor":"3rdParty/ckeditor/ckeditor5.bundle","ckeditor5-translation":"3rdParty/ckeditor/translations"},packages:[{name:"codemirror",location:"3rdParty/codemirror",main:"lib/codemirror"}],shim:{"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){var i;e.elAttr=function(e,t,i){if(void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var o=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(o,n),o},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,i){if(t="data-"+t,void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,i){var n,o,r,a=e.parentNode;if(null===a)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return o=e,(n=a).classList.contains("inputAddon")&&(n=a.parentElement,o=a),null!==(r=o.nextElementSibling)&&"SMALL"===r.nodeName&&r.classList.contains("innerError")||(""===t?r=null:((r=elCreate("small")).className="innerError",n.insertBefore(r,o.nextSibling))),""===t?null!==r&&(a.removeChild(r),r=null):r[i?"innerHTML":"textContent"]=t,r},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i],i)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,i){var n;return function(){var o=this,r=arguments;clearTimeout(n),n=setTimeout((function(){n=null,i||e.apply(o,r)}),t),i&&!n&&e.apply(o,r)}},Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),i=0,function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}(),e.addEventListener("popstate",(function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})),e.String.prototype.hashCode=function(){var e,t,i=0;if(this.length)for(e=0,t=this.length;e<t;e++)i=(i<<5)-i+this.charCodeAt(e),i&=i;return i},Object.defineProperty(e,"SECURITY_TOKEN",{configurable:!1,get(){const e=t.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[i,n]=e.split(/=/,2);return decodeURIComponent(n.trim())}})}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==i&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(i,n){return e[i]=t?t(i,n):n}}var i="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(n){e(t(i,t(n)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(i,t(module.exports))):e(t(i))}((function(e){var t,i,n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])};__extends=function(e,t){function i(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},__assign=Object.assign||function(e){var t,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__rest=function(e,t){var i,n,o={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]]);return o},__decorate=function(e,t,i,n){var o,r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,i,s):o(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},__param=function(e,t){return function(i,n){t(i,n,e)}},__esDecorate=function(e,t,i,n,o,r){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}var s,l,c,d,u,p=n.kind,m="getter"===p?"get":"setter"===p?"set":"value",h=!t&&e?n.static?e:e.prototype:null,f=t||(h?Object.getOwnPropertyDescriptor(h,n.name):{}),g=!1;for(l=i.length-1;l>=0;l--){for(d in c={},n)c[d]="access"===d?{}:n[d];for(d in n.access)c.access[d]=n.access[d];if(c.addInitializer=function(e){if(g)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(e||null))},u=(0,i[l])("accessor"===p?{get:f.get,set:f.set}:f[m],c),"accessor"===p){if(void 0===u)continue;if(null===u||"object"!=typeof u)throw new TypeError("Object expected");(s=a(u.get))&&(f.get=s),(s=a(u.set))&&(f.set=s),(s=a(u.init))&&o.unshift(s)}else(s=a(u))&&("field"===p?o.unshift(s):f[m]=s)}h&&Object.defineProperty(h,n.name,f),g=!0},__runInitializers=function(e,t,i){var n,o=arguments.length>2;for(n=0;n<t.length;n++)i=o?t[n].call(e,i):t[n].call(e);return o?i:void 0},__propKey=function(e){return"symbol"==typeof e?e:"".concat(e)},__setFunctionName=function(e,t,i){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:i?"".concat(i," ",t):t})},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},__generator=function(e,t){function i(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}var n,o,r,a,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},__exportStar=function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||__createBinding(t,e,i)},__createBinding=Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var i,n,o,r,a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,i,n,o,r,a,s;for(e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(n=Array(e),o=0,t=0;t<i;t++)for(a=0,s=(r=arguments[t]).length;a<s;a++,o++)n[o]=r[a];return n},__spreadArray=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,i){function n(e){c[e]&&(l[e]=function(t){return new Promise((function(i,n){d.push([e,t,i,n])>1||o(e,t)}))})}function o(e,t){try{(i=c[e](t)).value instanceof __await?Promise.resolve(i.value.v).then(r,a):s(d[0][2],i)}catch(e){s(d[0][3],e)}var i}function r(e){o("next",e)}function a(e){o("throw",e)}function s(e,t){e(t),d.shift(),d.length&&o(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=i.apply(e,t||[]),d=[];return l={},n("next"),n("throw"),n("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,o){i[t]=e[t]?function(i){return(n=!n)?{value:__await(e[t](i)),done:!1}:o?o(i):i}:o}var i,n;return i={},t("next"),t("throw",(function(e){throw e})),t("return"),i[Symbol.iterator]=function(){return this},i},__asyncValues=function(e){function t(t){i[t]=e[t]&&function(i){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(i=e[t](i)).done,i.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),i={},t("next"),t("throw"),t("return"),i[Symbol.asyncIterator]=function(){return this},i)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var i,n;if(e&&e.__esModule)return e;if(i={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(i,e,n);return t(i,e),i},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},__classPrivateFieldSet=function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i},__classPrivateFieldIn=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__addDisposableResource=function(e,t,i){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:i})}else i&&e.stack.push({async:!0});return t},i="function"==typeof SuppressedError?SuppressedError:function(e,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=e,n.suppressed=t,n},__disposeResources=function(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function i(){for(var n,o;e.stack.length;){n=e.stack.pop();try{if(o=n.dispose&&n.dispose.call(n.value),n.async)return Promise.resolve(o).then(i,(function(e){return t(e),i()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__esDecorate",__esDecorate),e("__runInitializers",__runInitializers),e("__propKey",__propKey),e("__setFunctionName",__setFunctionName),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__spreadArray",__spreadArray),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateObject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet),e("__classPrivateFieldIn",__classPrivateFieldIn),e("__addDisposableResource",__addDisposableResource),e("__disposeResources",__disposeResources)})),define("WoltLabSuite/Core/Ajax/Status",["require","exports"],(function(e,t){"use strict";function i(){return void 0===o&&(o=new n),o}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0;class n{_activeRequests=0;_overlay;_timer=null;constructor(){this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("woltlab-core-loading-indicator");e.size=48,this._overlay.append(e),document.body.append(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._overlay.classList.remove("active"))}}let o;t.show=function(){i().show()},t.hide=function(){i().hide()}})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function i(e){return r(e)}function n(e,...t){const r=i(e=e||{});for(let i=0,a=t.length;i<a;i++){const a=t[i];a&&Object.keys(a).forEach((t=>{Array.isArray(a[t])||"object"!=typeof a[t]?r[t]=a[t]:o(a[t])?r[t]=n(e[t],a[t]):r[t]=a[t]}))}return r}function o(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.getXsrfToken=t.enableLegacyInheritance=t.debounce=t.stringToBool=t.getStoragePrefix=t.triggerEvent=t.serialize=t.getUuid=t.getType=t.isPlainObject=t.inherit=t.extend=t.convertLegacyUrl=t.clone=void 0;const r=function(e){return"object"==typeof e&&(Array.isArray(e)||o(e))?a(e):e},a=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((i=>t[i]=r(e[i]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=i,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const i=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,n=i.length;e<n;e++){const n=i[e].trim();n.length&&(t.length&&(t+="-"),t+=n.toLowerCase())}return`index.php?${t}/&`}))},t.extend=n,t.inherit=function(e,t,i){if(null==e)throw new TypeError("The constructor must not be undefined or null.");if(null==t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=n(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),i||{})},t.isPlainObject=o,t.getType=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1")},t.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,i){if(null===t)return"";const n=[];return Object.keys(t).forEach((o=>{const r=i?i+"["+o+"]":o,a=t[o];"object"==typeof a?n.push(e(a,r)):n.push(encodeURIComponent(r)+"="+encodeURIComponent(a))})),n.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const i=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(i)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,i={isImmediate:!1}){let n;return function(...o){const r=i.isImmediate&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout((()=>{n=void 0,i.isImmediate||e.apply(this,o)}),t),r&&e.apply(this,o)}},t.enableLegacyInheritance=function(e){console.error("Relying on the legacy inheritance is no longer supported. Please migrate your code to use ES6 classes and inheritance.",e)},t.getXsrfToken=function(){const e=document.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[t,i]=e.split(/=/,2);return decodeURIComponent(i.trim())}})),define("WoltLabSuite/Core/CallbackList",["require","exports"],(function(e,t){"use strict";return class{_callbacks=new Map;add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){null===e?this._callbacks.forEach(((e,i)=>{e.forEach(t)})):this._callbacks.get(e)?.forEach(t)}}})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,i,n){"use strict";const o=new((n=i.__importDefault(n)).default);let r=!1;return{add:o.add.bind(o),remove:o.remove.bind(o),trigger(){if(!r)try{r=!0,o.forEach(null,(e=>e()))}finally{r=!1}}}})),define("WoltLabSuite/Core/Language",["require","exports"],(function(e,t){"use strict";function i(e,t={}){return window.WoltLabLanguage.getPhrase(e,t)}function n(e,t){window.WoltLabLanguage.registerPhrase(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.addObject=t.add=t.get=t.registerPhrase=t.getPhrase=void 0,t.getPhrase=i,t.registerPhrase=n,t.get=function(e,t={}){return i(e,t)},t.add=function(e,t){n(e,t)},t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{n(e,t)}))}})),define("WoltLabSuite/Core/Component/Dialog/Controls",["require","exports","tslib","../../Language"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogControls=void 0,n=i.__importStar(n);class o{#e;constructor(e){this.#e=e}asAlert(e){const t={cancel:void 0,extra:void 0,isAlert:!0,primary:e?.primary||n.get("wcf.dialog.button.primary")};return this.#e.attachControls(t),this.#e}asConfirmation(e){const t={cancel:"",extra:void 0,isAlert:!0,primary:e?.primary||n.get("wcf.dialog.button.primary.confirm")};return this.#e.attachControls(t),this.#e}asPrompt(e){const t={cancel:"",extra:e?.extra,isAlert:!1,primary:e?.primary||n.get("wcf.dialog.button.primary.submit")};return this.#e.attachControls(t),this.#e}withoutControls(){return this.#e}}t.DialogControls=o,t.default=o})),define("WoltLabSuite/Core/StringUtil",["require","exports"],(function(e,t){"use strict";function i(e,t){const i=t?-t:2;return e.toLocaleString(document.documentElement.lang,{maximumFractionDigits:i}).replace("-","−")}function n(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCase=t.shortUnit=t.unescapeHTML=t.ucfirst=t.lcfirst=t.formatNumeric=t.escapeRegExp=t.escapeHTML=t.addThousandsSeparator=void 0,t.addThousandsSeparator=function(e){return e.toLocaleString(document.documentElement.lang)},t.escapeHTML=function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=i,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=n,t.unescapeHTML=function(e){return String(e).replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},t.shortUnit=function(e){let t="";return e>=1e6?((e/=1e6)>10&&(e=Math.floor(e)),t="M"):e>=1e3&&((e/=1e3)>10&&(e=Math.floor(e)),t="k"),i(e,-1)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=n(e)),e))).join(""):e}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,i,n){"use strict";function o(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let n,o=e;const r=i+"Sibling";for(;null!==o&&o!==t;){if(null!==o[i+"ElementSibling"])return!1;if(o[r])for(n=o[r];n;){if(""!==n.textContent.trim())return!1;n=n[r]}o=o.parentNode}return!0}n=i.__importStar(n);let r=0;const a={createFragmentFromHtml(e){const t=document.createElement("div");a.setInnerHtml(t,e);const i=document.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId(){let e;do{e="wcf"+r++}while(null!==document.getElementById(e));return e},escapeAttributeSelector:e=>e.replace(/(["\\])/g,"\\$1"),identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=a.getUniqueId(),e.id=t),t},outerHeight(e,t){t=t||window.getComputedStyle(e);let i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom,i},outerWidth(e,t){t=t||window.getComputedStyle(e);let i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight,i},outerDimensions(e){const t=window.getComputedStyle(e);return{height:a.outerHeight(e,t),width:a.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let i=!1;Object.keys(t).forEach((n=>{/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":"")}))},styleAsInt(e,t){const i=e.getPropertyValue(t);return null===i?0:parseInt(i,10)},setInnerHtml(e,t){let i;e.innerHTML=t,i=e instanceof HTMLTemplateElement?e.content:e;const n=i.querySelectorAll("script");for(let e=0,t=n.length;e<t;e++){const t=n[e],o=document.createElement("script");t.src?o.src=t.src:o.textContent=t.textContent,i.appendChild(o),t.remove()}},insertHtml(e,t,i){const n=document.createElement("template");a.setInnerHtml(n,e);const o=document.importNode(n.content,!0);switch(i){case"append":t.appendChild(o);break;case"after":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'after'.");t.parentNode.insertBefore(o,t.nextSibling);break;case"prepend":t.insertBefore(o,t.firstChild);break;case"before":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'before'.");t.parentNode.insertBefore(o,t);break;default:throw new Error("Unknown insert method '"+i+"'.")}},contains:(e,t)=>e.contains(t),getDataAttributes(e,t,i,o){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),i=!0===i,o=!0===o;const r={};for(let a=0,s=e.attributes.length;a<s;a++){const s=e.attributes[a];if(0===s.name.indexOf(t)){let e=s.name.replace(new RegExp("^"+t),"");if(i){const t=e.split("-");e="";for(let i=0,r=t.length;i<r;i++)e.length&&(o&&"id"===t[i]?t[i]="ID":t[i]=n.ucfirst(t[i])),e+=t[i]}r[e]=s.value}}return r},unwrapChildNodes(e){if(null===e.parentNode)throw new Error("The element has no parent.");const t=e.parentNode;for(;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);e.remove()},replaceElement(e,t){if(null===e.parentNode)throw new Error("The old element has no parent.");for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),e.remove()},isAtNodeStart:(e,t)=>o(e,t,"previous"),isAtNodeEnd:(e,t)=>o(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){a.isHidden(e)?a.show(e):a.hide(e)},innerError(e,t,i){const n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=n,r=e;o.classList.contains("inputAddon")&&(o=n.parentElement,r=n);let a=r.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=document.createElement("small"),a.className="innerError",o.insertBefore(a,r.nextSibling))),""===t?null!==a&&(a.remove(),a=null):i?a.innerHTML=t:a.textContent=t,a},innerSuccess(e,t,i){const n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerSuccess")||(""===t?o=null:(o=document.createElement("small"),o.className="innerSuccess",n.insertBefore(o,e.nextSibling))),""===t?null!==o&&(o.remove(),o=null):i?o.innerHTML=t:o.textContent=t,o},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=a,a})),define("WoltLabSuite/Core/Ajax/Error",["require","exports","tslib","../Component/Dialog","../Core","../Language","../StringUtil"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerGlobalRejectionHandler=t.InvalidJson=t.ExpectedJson=t.StatusNotOk=t.ConnectionError=t.ApiError=void 0,o=i.__importStar(o),r=i.__importStar(r);class s extends Error{name="ApiError"}t.ApiError=s;class l extends s{originalError;constructor(e){let t="Unknown error";e instanceof Error&&(t=e.message),super(t),this.name="ConnectionError",this.originalError=e}}t.ConnectionError=l;class c extends s{response;constructor(e){super("The API request returned a status code outside of the 200-299 range."),this.name="StatusNotOk",this.response=e}}t.StatusNotOk=c;class d extends s{response;constructor(e){super("The API did not return a JSON response."),this.name="ExpectedJson",this.response=e}}t.ExpectedJson=d;class u extends s{response;constructor(e){super("Failed to decode the JSON response from the API."),this.name="InvalidJson",this.response=e}}t.InvalidJson=u;let p=!1;t.registerGlobalRejectionHandler=function(){p||(window.addEventListener("unhandledrejection",(e=>{e.reason instanceof s&&(e.preventDefault(),async function(e){const t=await async function(e){let t="",i="";if(e instanceof l)i=e.originalError instanceof TypeError?r.get("wcf.global.error.ajax.network",{message:e.message}):e.message;else if(e instanceof u)i=await e.response.clone().text();else if(e instanceof d||e instanceof c){let n;try{n=await e.response.clone().json()}catch(t){i=await e.response.clone().text()}if(n&&o.isPlainObject(n)&&Object.keys(n).length>0)n.returnValues&&n.returnValues.description&&(t+=`<br><p>Description:</p><p>${n.returnValues.description}</p>`),n.file&&n.line&&(t+=`<br><p>File:</p><p>${n.file} in line ${n.line}</p>`),n.exception?t+=`<br>Exception: <div style="white-space: pre;">${(0,a.escapeHTML)(n.exception)}</div>`:n.stacktrace?t+=`<br><p>Stacktrace:</p><p>${n.stacktrace}</p>`:n.exceptionID&&(t+=`<br><p>Exception ID: <code>${n.exceptionID}</code></p>`),i=n.message,n.previous&&n.previous.forEach((e=>{t+=`<hr><p>${e.message}</p>`,t+=`<br><p>Stacktrace</p><p>${e.stacktrace}</p>`}));else if(void 0===n){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=i,e}}if(!i||"undefined"===i){if(!window.ENABLE_DEBUG_MODE)return"";i="fetch() failed without a response body. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${i}</p>${t}</div>`}(e);if(t instanceof HTMLIFrameElement){const e=(0,n.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(r.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else""!==t&&(0,n.dialogFactory)().fromHtml(t).asAlert().show(r.get("wcf.global.error.title"))}(e.reason))})),p=!0)}})),define("WoltLabSuite/Core/Ajax/Backend",["require","exports","tslib","./Status","./Error","../Core"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0,n=i.__importStar(n);class a{url;constructor(e){this.url=e}get(){return new c(this.url,0)}post(e){return new l(this.url,1,e)}}let s=!1;window.addEventListener("beforeunload",(()=>s=!0));class l{#t;#i;#n;#o;#r=!0;#a=!1;constructor(e,t,i){this.#t=e,this.#i=t,this.#n=i}getAbortController(){return void 0===this.#o&&(this.#o=new AbortController),this.#o}disableLoadingIndicator(){return this.#r=!1,this}allowCaching(){return this.#a=!0,this}async fetchAsJson(){const e=await this.#s({headers:{accept:"application/json"}});if(void 0===e)return;const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new o.ExpectedJson(e);let i;try{i=await e.json()}catch(t){throw new o.InvalidJson(e)}return i}async fetchAsResponse(){return this.#s()}async#s(t={}){(0,o.registerGlobalRejectionHandler)();const a=(0,r.extend)({headers:{"X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":(0,r.getXsrfToken)()},mode:"same-origin",credentials:"same-origin",cache:this.#a?"default":"no-store",redirect:"error"},t);1===this.#i?(a.method="POST",this.#n&&(this.#n instanceof FormData?(a.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8",a.body=this.#n):(a.headers["Content-Type"]="application/json; charset=UTF-8",a.body=JSON.stringify(this.#n)))):a.method="GET",this.#o&&(a.signal=this.#o.signal);const l=this.#r;l&&n.show();try{const t=await fetch(this.#t,a);if(!t.ok)throw new o.StatusNotOk(t);return"yes"===t.headers.get("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke())),t}catch(e){if(e instanceof o.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new o.ConnectionError(e)}finally{l&&n.hide()}}}class c extends l{allowCaching(){return super.allowCaching(),this}}t.prepareRequest=function(e){return new a(e)}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function i(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(n))}let n={editorAutosave:!0,editorInspector:!1,eventLogging:!1};const o={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(o).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){n.editorAutosave=!e&&!n.editorAutosave,i(),window.console.log("%c\tEditor autosave "+(n.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEditorInspector(e){n.editorInspector=!!e||!n.editorInspector,i(),window.console.log("%c\tEditor inspector "+(n.editorInspector?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){n.eventLogging=!!e||!n.eventLogging,i(),window.console.log("%c\tEvent logging "+(n.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=o,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(n=JSON.parse(e))}catch(e){}n.editorAutosave||o.toggleEditorAutosave(!0),n.editorInspector&&o.toggleEditorInspector(!0),n.eventLogging&&o.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>n.editorAutosave,editorInspector:()=>n.editorInspector,eventLog(e,t){n.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return o})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,i,n,o){"use strict";function r(e,t){"string"!=typeof t&&(t=void 0);const i=a.get(e);void 0!==i&&(void 0===t?a.delete(e):i.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,n=i.__importStar(n),o=i.__importDefault(o);const a=new Map;t.add=function(e,t,i){if("function"!=typeof i)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let o=a.get(e);void 0===o&&(o=new Map,a.set(e,o));let r=o.get(t);void 0===r&&(r=new Map,o.set(t,r));const s=n.getUuid();return r.set(s,i),s},t.fire=function(e,t,i){o.default._internal_.eventLog(e,t),i=i||{},a.get(e)?.get(t)?.forEach((e=>e(i)))},t.remove=function(e,t,i){a.get(e)?.get(t)?.delete(i)},t.removeAll=r,t.removeAllBySuffix=function(e,t){const i=a.get(e);if(void 0===i)return;const n=-1*(t="_"+t).length;i.forEach(((i,o)=>{o.substr(n)===t&&r(e,o)}))}})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports"],(function(e,t){"use strict";return class{_fieldId;_field;constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,i,n,o){"use strict";function r(){!0!==p?(p=!0,m=!1,o.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),p=!1,m&&r()):m=!0}function a(){const e=[];d.forEach(((t,i)=>{const o=document.getElementById(i);if(null===o)return void e.push(i);let r=!0;var a;t.forEach((e=>{var t;e.checkDependency()||(t=o,n.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&n.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,i=e.getAttribute("max");i&&(t.set("max",i),e.removeAttribute("max"));const n=e.getAttribute("maxlength");n&&(t.set("maxlength",n),e.removeAttribute("maxlength"));const o=e.getAttribute("min");o&&(t.set("min",o),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),r=!1)})),r&&(a=o,n.default.show(a),s.delete(a),a.classList.contains("tabMenuContent")&&a.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===a.dataset.name&&n.default.show(e)})),a.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==a&&!n.default.isHidden(t);)t=t.parentNode;if(t===a&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),r()}Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=t.isHiddenByDependencies=t.checkDependencies=t.checkContainers=t.addDependency=t.addContainerCheckCallback=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let p=!1,m=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");o.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=n.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>a())):e.addEventListener("change",(()=>a())))}))},t.checkContainers=r,t.checkDependencies=a,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((i=>{i.contains(e)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,i)=>{t.contains(document.getElementById(i))&&d.delete(i),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))}})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterForm=t.registerForm=t.registerField=t.hasForm=t.hasField=t.getForm=t.getField=t.getData=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const c=new Map,d=new Map;t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const i=e.getData();if(!(i instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(i)})),Promise.all(t).then((e=>e.reduce(((e,t)=>n.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof r.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const i=t.getId();if(s(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");c.get(e).set(i,t),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");o.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),a.unregister(e),o.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}})),define("WoltLabSuite/Core/Component/FormBuilder/Setup",["require","exports","tslib","../../Ajax/Backend","../../Dom/Util","../../Form/Builder/Manager"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderSetup=void 0,o=i.__importStar(o),r=i.__importStar(r);class a{async fromEndpoint(t){const a=await(0,n.prepareRequest)(t).get().fetchAsJson(),{dialogFactory:s}=await new Promise(((t,i)=>{e(["../Dialog"],t,i)})).then(i.__importStar),l=s().fromHtml(a.dialog).asPrompt();return new Promise((e=>{l.addEventListener("validate",(i=>{const s=r.getData(a.formId).then((async i=>{i instanceof Promise&&(i=await i);const s=await(0,n.prepareRequest)(t).post(i).fetchAsJson();return"dialog"in s?(r.unregisterForm(a.formId),o.setInnerHtml(l.content,s.dialog),!1):(l.addEventListener("primary",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!0,result:s.result})})),!0)}));i.detail.push(s)})),l.addEventListener("afterClose",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!1,result:void 0})})),l.show(a.title)}))}}t.FormBuilderSetup=a,t.default=a})),define("WoltLabSuite/Core/Component/Dialog/Setup",["require","exports","tslib","./Controls","../../Dom/Util","../FormBuilder/Setup"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogSetup=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r);class a{fromElement(e){e instanceof HTMLTemplateElement&&(e=e.content.cloneNode(!0));const t=document.createElement("woltlab-core-dialog");return t.content.append(e),e instanceof HTMLElement&&(e.hidden=!1),new n.default(t)}fromId(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find the element identified by '${e}'.`);return this.fromElement(t)}fromHtml(e){const t=o.createFragmentFromHtml(e);if(0===t.childElementCount&&""===t.textContent.trim())throw new TypeError("The provided HTML string was empty.");return this.fromElement(t)}usingFormBuilder(){return new r.default}withoutContent(){const e=document.createElement("woltlab-core-dialog");return new n.default(e)}}t.DialogSetup=a,t.default=a})),define("WoltLabSuite/Core/Helper/PageOverlay",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPageOverlayContainer=t.releasePageOverlayContainer=t.adoptPageOverlayContainer=void 0;const i=document.createElement("div");i.id="pageOverlayContainer";const n=[];t.adoptPageOverlayContainer=function(e){n.push(e),e.append(i)},t.releasePageOverlayContainer=function(e){if(!n.includes(e))throw new Error("Cannot release the page overlay from a container that (no longer) adopts it.",{cause:{element:e}});const t=n.indexOf(e);if(0===t)throw new Error("Cannot release the page overlay, there is no previous owner.",{cause:{element:e}});t!==n.length-1?n.splice(t,1):(n.pop(),n[n.length-1].append(i))},t.getPageOverlayContainer=function(){return i}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core"],(function(e,t,i,n){"use strict";function o(e){return r(e).mql.matches}function r(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");m.has(e)&&(e=m.get(e)),p.has(e)&&(e=p.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(a),s.set(e,t),e!==t.mql.media&&m.set(t.mql.media,e)),t}function a(e){const t=r(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()})),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setDialogContainer=t.pageOverlayIsActive=t.pageOverlayClose=t.pageOverlayOpen=t.scrollEnable=t.scrollDisable=t.is=t.remove=t.on=void 0,n=i.__importStar(n);const s=new Map;let l,c=0,d=0,u=0;const p=new Map(Object.entries({"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: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),m=new Map;t.on=function(e,t){const i=n.getUuid(),o=r(e);return"function"==typeof t.match&&o.callbacksMatch.set(i,t.match),"function"==typeof t.unmatch&&o.callbacksUnmatch.set(i,t.unmatch),"function"==typeof t.setup&&(o.mql.matches?t.setup():o.callbacksSetup.set(i,t.setup)),i},t.remove=function(e,t){const i=r(e);i.callbacksMatch.delete(t),i.callbacksUnmatch.delete(t),i.callbacksSetup.delete(t)},t.is=o,t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.removeProperty("position"),e.style.removeProperty("top")),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){}})),define("WoltLabSuite/Core/Element/woltlab-core-dialog",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Language","../Ui/Screen"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogElement=void 0,n=i.__importDefault(n),r=i.__importStar(r);const s=document.createElement("div");class l extends HTMLElement{#l;#e;#c;#d;constructor(){super(),this.#l=document.createElement("div"),this.#e=document.createElement("dialog"),this.#d=document.createElement("div")}show(e){if(0===e.trim().length)throw new Error("Cannot open the modal dialog without a title.");this.#d.textContent=e,this.open||(null===s.parentElement&&document.getElementById("content").append(s),this.parentElement!==s&&s.append(this),this.#e.showModal(),(0,o.adoptPageOverlayContainer)(this.#e),(0,a.scrollDisable)())}close(){this.#e.close(),this.#u()}#u(){if(null===this.parentNode)return;const e=new CustomEvent("afterClose");this.dispatchEvent(e),(0,o.releasePageOverlayContainer)(this.#e),(0,a.scrollEnable)(),this.remove()}get dialog(){return this.#e}get content(){return this.#l}get open(){return this.#e.open}get incomplete(){return this.hasAttribute("incomplete")}set incomplete(e){e?this.setAttribute("incomplete",""):this.removeAttribute("incomplete")}attachControls(e){if(void 0!==this.#c)throw new Error("There is already a form control attached to this dialog.");void 0!==e.extra&&void 0===e.cancel&&(e.cancel="");const t=document.createElement("woltlab-core-dialog-control");t.primary=e.primary,void 0!==e.cancel&&(t.cancel=e.cancel),void 0!==e.extra&&(t.extra=e.extra),this.#c=document.createElement("form"),this.#c.method="dialog",this.#c.classList.add("dialog__form"),this.#l.insertAdjacentElement("beforebegin",this.#c),this.#c.append(this.#l,t),e.isAlert&&(void 0===e.cancel?this.#e.setAttribute("role","alert"):this.#e.setAttribute("role","alertdialog")),this.#c.addEventListener("submit",(e=>{if(this.incomplete)return void e.preventDefault();const t=new CustomEvent("validate",{cancelable:!0,detail:[]});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():t.detail.length>0?(e.preventDefault(),this.incomplete=!0,Promise.all(t.detail).then((e=>{this.incomplete=!1,e.some((e=>!1===e))||(this.#p(),this.#m()&&this.close())}))):this.#m()||(e.preventDefault(),this.#p())})),this.#e.addEventListener("close",(()=>{""===this.#e.returnValue||this.#p(),this.#u()})),t.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this.#m()&&this.close()})),void 0!==e.extra&&t.addEventListener("extra",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)}))}#p(){const e=new CustomEvent("primary");this.dispatchEvent(e)}connectedCallback(){if(null!==this.#e.parentElement)return;let e;const t=this.#e.getAttribute("role");"alert"!==t&&"alertdialog"!==t&&(e=document.createElement("button"),e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialog__closeButton","jsTooltip"),e.title=r.get("wcf.dialog.button.close"),e.addEventListener("click",(()=>{if(this.#m()){const e=new CustomEvent("cancel",{cancelable:!1});this.dispatchEvent(e),this.close()}})));const i=document.createElement("div");i.classList.add("dialog__header"),this.#d.classList.add("dialog__title"),i.append(this.#d),e&&i.append(e);const o=document.createElement("div");o.classList.add("dialog__document"),o.setAttribute("role","document"),o.append(i),this.#l.classList.add("dialog__content"),this.#c?o.append(this.#c):o.append(this.#l),this.#e.append(o),this.#e.classList.add("dialog"),this.#e.setAttribute("aria-labelledby",n.default.identify(this.#d)),this.#e.addEventListener("cancel",(e=>{const t=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():this.#m()?this.#u():e.preventDefault()})),this.#e.addEventListener("mousedown",(e=>{if(e.target===this.#e){const e=new CustomEvent("backdrop",{cancelable:!0});if(this.dispatchEvent(e),e.defaultPrevented)return;this.#m()&&this.close()}})),this.append(this.#e)}#m(){const e=new CustomEvent("close",{cancelable:!0});return this.dispatchEvent(e),!1===e.defaultPrevented}}t.WoltlabCoreDialogElement=l,window.customElements.define("woltlab-core-dialog",l),t.default=l})),define("WoltLabSuite/Core/Element/woltlab-core-dialog-control",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogControlElement=void 0,n=i.__importStar(n);class o extends HTMLElement{#h;#f;#g;set primary(e){this.setAttribute("primary",e)}get primary(){let e=this.getAttribute("primary");return e||(e=n.get("wcf.dialog.button.primary")),e}set cancel(e){void 0===e?this.removeAttribute("cancel"):this.setAttribute("cancel",e)}get cancel(){let e=this.getAttribute("cancel");if(null!==e)return""===e&&(e=n.get("wcf.global.confirmation.cancel")),e}set extra(e){void 0===e?this.removeAttribute("extra"):this.setAttribute("extra",e)}get extra(){const e=this.getAttribute("extra");if(null!==e)return e}connectedCallback(){const e=this.closest("woltlab-core-dialog");this.classList.add("dialog__control"),this.hasAttribute("primary")||this.setAttribute("primary",""),void 0===this.#g&&(this.#g=document.createElement("button"),this.#g.type="submit",this.#g.value="primary",this.#g.autofocus=!0,this.#g.classList.add("button","buttonPrimary","dialog__control__button","dialog__control__button--primary"),this.#g.textContent=this.primary,this.append(this.#g),new MutationObserver((()=>{this.#g.disabled=e.incomplete})).observe(e,{attributeFilter:["incomplete"]}),e.incomplete&&(this.#g.disabled=!0)),void 0===this.#h&&void 0!==this.cancel&&(this.#h=document.createElement("button"),this.#h.type="button",this.#h.value="cancel",this.#h.classList.add("button","dialog__control__button","dialog__control__button--cancel"),this.#h.textContent=this.cancel,this.#h.addEventListener("click",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e)})),this.append(this.#h),e.addEventListener("backdrop",(e=>{e.preventDefault(),this.#h.click()}))),void 0===this.#f&&void 0!==this.extra&&(this.#f=document.createElement("button"),this.#f.type="button",this.#f.value="extra",this.#f.classList.add("button","dialog__control__button","dialog__control__button--extra"),this.#f.textContent=this.extra,this.#f.addEventListener("click",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)})),this.append(this.#f))}}t.WoltlabCoreDialogControlElement=o,window.customElements.define("woltlab-core-dialog-control",o),t.default=o})),define("WoltLabSuite/Core/Component/Dialog",["require","exports","./Dialog/Setup","../Element/woltlab-core-dialog","../Element/woltlab-core-dialog-control"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dialogFactory=void 0,t.dialogFactory=function(){return new i.DialogSetup}})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Language","../Component/Dialog","../StringUtil"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);let c=!1,d=!1;return class{_options;_data;_xhr;constructor(e){this._options=o.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),c||(c=!0,window.addEventListener("beforeunload",(()=>d=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||n.show(),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.responseType&&this._xhr.setRequestHeader("Accept",this._options.responseType),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=o.clone(this._options),i=this._xhr;if(i.onload=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200&&i.status<300||304===i.status?204===i.status?this._success(i,t):t.responseType&&this.getContentType(i)!==t.responseType?this._failure(i,t):this._success(i,t):this._failure(i,t))},i.onerror=()=>{this._failure(i,t)},this._options.progress&&(i.onprogress=this._options.progress),this._options.uploadProgress&&(i.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==o.getType(e)&&(e=o.serialize(e)),i.send(e)}else i.send()}abortPrevious(){void 0!==this._xhr&&(this._xhr.abort(),this._xhr=void 0,this._options.silent||n.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==o.getType(e)&&(e=o.extend(this._data,e)),this._options.data=e}_success(t,o){if(o.silent||n.hide(),"function"==typeof o.success){let n=null;if("application/json"===this.getContentType(t)){try{n=JSON.parse(t.responseText)}catch(e){return void this._failure(t,o)}n&&n.returnValues&&void 0!==n.returnValues.template&&(n.returnValues.template=n.returnValues.template.trim()),"yes"===t.getResponseHeader("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke()))}o.success(n||{},t.responseText,t,o.data)}this._finalize(t,o)}_failure(e,t){if(d)return;t.silent||n.hide();let i=null;try{i=JSON.parse(e.responseText)}catch(e){}let o=!0;if("function"==typeof t.failure&&(o=!1!==t.failure(i||{},e.responseText||"",e,t.data)),!0!==t.ignoreError&&o){const t=this.getErrorHtml(i,e);if(t instanceof HTMLIFrameElement){const e=(0,s.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(a.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else t&&(0,s.dialogFactory)().fromHtml(t).asAlert().show(a.get("wcf.global.error.title"))}this._finalize(e,t)}getErrorHtml(e,t){let i,n="";if(null!==e&&Object.keys(e).length>0)e.returnValues&&e.returnValues.description&&(n+=`<br><p>Description:</p><p>${e.returnValues.description}</p>`),e.file&&e.line&&(n+=`<br><p>File:</p><p>${e.file} in line ${e.line}</p>`),e.extraInformation&&(n+="<br>",n+=e.extraInformation.map((([e,t])=>`<p>${e}: <code>${t.toString()}</code></p>`)).join("")),e.exception?n+=`<br>Exception: <div style="white-space: pre;">${(0,l.escapeHTML)(e.exception)}</div>`:e.stacktrace?n+=`<br><p>Stacktrace:</p><pre>${e.stacktrace}</pre>`:e.exceptionID&&(n+=`<br><p>Exception ID: <code>${e.exceptionID}</code></p>`),i=e.message,e.previous&&e.previous.forEach((e=>{n+=`<hr><p>${e.message}</p>`,n+=`<br><p>Stacktrace</p><pre>${e.stacktrace}</pre>`}));else{if(t.getResponseHeader("content-type")?.startsWith("text/html")){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=t.responseText,e}i=t.responseText}if(!i||"undefined"===i){if(!window.ENABLE_DEBUG_MODE)return null;i="XMLHttpRequest failed without a responseText. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${i}</p>${n}</div>`}_finalize(e,t){"function"==typeof t.finalize&&t.finalize(e),this._xhr===e&&(this._xhr=void 0),r.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}getContentType(e){const t=e.getResponseHeader("content-type");return null===t?null:t.split(";",1)[0].trim()}}})),define("WoltLabSuite/Core/Ajax/DboAction",["require","exports","tslib","./Error","./Status","../Core"],(function(e,t,i,n,o,r){"use strict";async function a(e){const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new n.ExpectedJson(e);let i;try{i=await e.json()}catch(t){throw new n.InvalidJson(e)}return i}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.DboAction=void 0,o=i.__importStar(o),r=i.__importStar(r);class l{#b;#v;#_=[];#n={};#r=!0;#w;constructor(e,t){this.#b=e,this.#v=t}static prepare(e,t){return void 0===s&&(s=!1,window.addEventListener("beforeunload",(()=>{s=!0}))),new l(e,t)}getAbortController(){return void 0===this.#w&&(this.#w=new AbortController),this.#w}objectIds(e){return this.#_=e,this}payload(e){return this.#n=e,this}disableLoadingIndicator(){return this.#r=!1,this}async dispatch(){(0,n.registerGlobalRejectionHandler)();const t=window.WSC_API_URL+"index.php?ajax-proxy/&t="+r.getXsrfToken(),l={actionName:this.#b,className:this.#v};this.#_&&(l.objectIDs=this.#_),this.#n&&(l.parameters=this.#n);const c={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":r.getXsrfToken(),Accept:"application/json"},body:r.serialize(l),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error"};this.#w&&(c.signal=this.#w.signal);const d=this.#r;d&&o.show();try{const o=await fetch(t,c);if(!o.ok)throw new n.StatusNotOk(o);const r=await a(o);return"yes"===o.headers.get("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke())),r.returnValues}catch(e){if(e instanceof n.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new n.ConnectionError(e)}finally{d&&o.hide()}}}t.DboAction=l,t.default=l,t.handleValidationErrors=async function(e,t){if(!(e instanceof n.StatusNotOk))throw e;const i=e.response.clone();try{const e=await a(i);if(function(e){return"code"in e&&"returnValues"in e}(e)&&412===e.code&&!0===t(e.returnValues))return}catch{}throw e}})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request","./Core","./Ajax/DboAction","./Ajax/DboAction"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.dboAction=t.getRequestObject=t.apiOnce=t.api=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r);const s=new WeakMap;t.api=function(e,t,i,r){"object"!=typeof t&&(t={});let a=s.get(e);if(void 0===a){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),t.withCredentials=!0),a=new n.default(t),s.set(e,a)}let l=null,c=null;return"function"==typeof i&&(l=a.getOption("success"),a.setOption("success",i)),"function"==typeof r&&(c=a.getOption("failure"),a.setOption("failure",r)),a.setData(t),a.sendRequest(),null!==l&&a.setOption("success",l),null!==c&&a.setOption("failure",c),a},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),e.withCredentials=!0),new n.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!s.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return s.get(e)},t.dboAction=function(e,t){return r.default.prepare(e,t)},Object.defineProperty(t,"handleValidationErrors",{enumerable:!0,get:function(){return a.handleValidationErrors}})})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,n=i.__importStar(n);class o{_invocations=0;_isBusy=!1;_url;constructor(e){this._url=e}invoke(){this._isBusy||(this._isBusy=!0,n.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let r;t.setUrl=function(e){r||(r=new o(e))},t.invoke=function(){r?r.invoke():console.error("The background queue has not been initialized yet.")}})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,n=i.__importStar(n);const o=document.documentElement.lang,r=new Intl.DateTimeFormat(o,{dateStyle:"long"}),a=new Intl.DateTimeFormat(o,{hour:"numeric",minute:"numeric"}),s=new Intl.DateTimeFormat(o,{year:"numeric",day:"numeric",month:"long",hour:"numeric",minute:"numeric"});t.formatDate=function(e){return r.format(e)},t.formatTime=function(e){return a.format(e)},t.formatDateTime=function(e){return s.format(e)},t.format=function(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let i="";for(let o=0,r=t.length;o<r;o++){let a;switch(t[o]){case"s":a=e.getSeconds().toString().padStart(2,"0");break;case"i":a=e.getMinutes().toString().padStart(2,"0");break;case"a":a=e.getHours()>11?"pm":"am";break;case"g":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString(),a=a.padStart(2,"0");break}case"A":a=e.getHours()>11?"PM":"AM";break;case"G":a=e.getHours().toString();break;case"H":a=e.getHours().toString().padStart(2,"0");break;case"d":a=e.getDate().toString().padStart(2,"0");break;case"j":a=e.getDate().toString();break;case"l":a=n.get("__days")[e.getDay()];break;case"D":a=n.get("__daysShort")[e.getDay()];break;case"S":a="";break;case"m":a=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":a=(e.getMonth()+1).toString();break;case"F":a=n.get("__months")[e.getMonth()];break;case"M":a=n.get("__monthsShort")[e.getMonth()];break;case"y":a=e.getFullYear().toString().slice(-2);break;case"Y":a=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();a=t>0?"-":"+",t=Math.abs(t),a+=(~~(t/60)).toString().padStart(2,"0"),a+=":",a+=(t%60).toString().padStart(2,"0");break}case"r":a=e.toString();break;case"U":a=Math.round(e.getTime()/1e3).toString();break;case"\\":a="",o+1<r&&(a=t[++o]);break;default:a=t[o]}i+=a}return i},t.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)},t.getTimeElement=function(e){const t=document.createElement("woltlab-core-date-time");return t.date=e,e.getTime()>Date.now()&&(t.static=!0),t},t.getTimezoneDate=function(e,t){const i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const n=[];for(let o=0;o<e.childElementCount;o++)r.get(t)(e.children[o],i)&&n.push(e.children[o]);return n}function n(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");let o=e.parentNode;for(;o instanceof Element;){if(o===n)return null;if(r.get(t)(o,i))return o;o=o.parentNode}return null}function o(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&r.get(i)(e[t],n)?e[t]:null}Object.defineProperty(t,"__esModule",{value:!0}),t.prevByTag=t.prevByClass=t.prevBySel=t.prev=t.nextByTag=t.nextByClass=t.nextBySel=t.next=t.parentByTag=t.parentByClass=t.parentBySel=t.childrenByTag=t.childrenByClass=t.childrenBySel=t.childByTag=t.childByClass=t.childBySel=void 0;const r=new Map([[0,()=>!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]]);t.childBySel=function(e,t){return i(e,1,t)[0]||null},t.childByClass=function(e,t){return i(e,2,t)[0]||null},t.childByTag=function(e,t){return i(e,3,t)[0]||null},t.childrenBySel=function(e,t){return i(e,1,t)},t.childrenByClass=function(e,t){return i(e,2,t)},t.childrenByTag=function(e,t){return i(e,3,t)},t.parentBySel=function(e,t,i){return n(e,1,t,i)},t.parentByClass=function(e,t,i){return n(e,2,t,i)},t.parentByTag=function(e,t,i){return n(e,3,t,i)},t.next=function(e){return o(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return o(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return o(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return o(e,"nextElementSibling",3,t)},t.prev=function(e){return o(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return o(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return o(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return o(e,"previousElementSibling",3,t)}})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.touch=t.platform=t.browser=t.setup=void 0;let i="other",n="desktop",o=!1;t.setup=function(){if("object"==typeof window.chrome)i="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,n=e.length;t<n;t++){const n=e[t];0===n.indexOf("-ms-")?i="microsoft":0===n.indexOf("-moz-")?i="firefox":"firefox"!==i&&0===n.indexOf("-webkit-")&&(i="safari")}}const e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("crios")?(i="chrome",n="ios"):/(?:iphone|ipad|ipod)/.test(e)?(i="safari",n="ios"):-1!==e.indexOf("android")?n="android":-1!==e.indexOf("iemobile")&&(i="microsoft",n="windows"),"desktop"!==n||-1===e.indexOf("mobile")&&-1===e.indexOf("tablet")||(n="mobile"),o="ontouchstart"in window||"msMaxTouchPoints"in window.navigator&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(i="safari",n="ios")},t.browser=function(){return i},t.platform=function(){return n},t.touch=function(){return o}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language","../Environment"],(function(e,t,i,n,o,r,a,s){"use strict";function l(e,t,i,n,o,r,a){let s="auto",l="auto",c=!0,d=50;const u=document.getElementById("pageHeaderPanel");if(null!==u){const e=window.getComputedStyle(u).position;d="fixed"===e||"static"===e?u.offsetHeight:0}if(a)if("top"===e){const e=n.top-r;s=o-e,e-t.height<d&&(c=!1)}else l=n.top+i.height+r,l+t.height>o&&(c=!1);else{const a=n.top+window.scrollY;if("top"===e){const{clientHeight:e}=document.body;s=e-a+r,e-(s+t.height)<window.scrollY+d&&(c=!1)}else l=a+i.height+r,l+t.height-window.scrollY>o&&(c=!1)}return{align:e,bottom:s,top:l,result:c}}function c(e,t,i,n,o){let r="auto",a="auto",s=!0;return"left"===e?(r=n.left,r+t.width>o&&(s=!1)):"right"===e?n.left+i.width<t.width?s=!1:(a=o-(n.left+i.width),a<0&&(s=!1)):(r=n.left+i.width/2-t.width/2,r=~~r,(r<0||r+t.width>o)&&(s=!1)),{align:e,left:r,right:a,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s),t.set=function(e,t,i){let d;i=n.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},i||{}),Array.isArray(i.pointerClassNames)&&i.pointerClassNames.length===(i.pointer?1:2)||(i.pointerClassNames=[]),-1===["left","right","center"].indexOf(i.horizontal)&&(i.horizontal="left"),"bottom"!==i.vertical&&(i.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(i.allowFlip)&&(i.allowFlip="both"),"none"===window.getComputedStyle(e).display&&(d=e.style.getPropertyValue("display"),e.style.setProperty("display","block")),r.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const u=r.default.outerDimensions(e),p=r.default.outerDimensions(i.refDimensionsElement instanceof HTMLElement?i.refDimensionsElement:t),m=t.getBoundingClientRect(),h=window.innerHeight,f=document.body.clientWidth;let g=null,b=!1;if("center"===i.horizontal&&(b=!0,g=c(i.horizontal,u,p,m,f),g.result||("both"===i.allowFlip||"horizontal"===i.allowFlip?i.horizontal="left":g.result=!0)),"rtl"===a.get("wcf.global.pageDirection")&&(i.horizontal="left"===i.horizontal?"right":"left"),null===g||!g.result){const e=g;if(g=c(i.horizontal,u,p,m,f),!g.result&&("both"===i.allowFlip||"horizontal"===i.allowFlip)){const t=c("left"===i.horizontal?"right":"left",u,p,m,f);if(t.result)g=t;else if(b)g=e;else if(u.width===f)g={align:"left",left:0,result:!0,right:0};else if(u.width<f){const e=f-(m.left+p.width),t=m.left<=e;g={align:t?"left":"right",left:t?0:"auto",result:!0,right:t?"auto":0}}}}const v="fixed"===window.getComputedStyle(e).position,_=g.left,w=g.right;let y=l(i.vertical,u,p,m,h,i.verticalOffset,v);if(!y.result&&("both"===i.allowFlip||"vertical"===i.allowFlip)){const e=l("top"===i.vertical?"bottom":"top",u,p,m,h,i.verticalOffset,v);if(e.result)y=e;else if("desktop"!==s.platform())if(u.height===h)y={align:"top",bottom:0,result:!0,top:0};else if(u.height<h){const e=h-(m.top+p.height),t=m.top<=e;y={align:t?"top":"bottom",bottom:t?0:"auto",result:!0,top:t?"auto":0}}}const E=y.bottom,S=y.top;if(i.pointer){const t=o.childrenByClass(e,"elementPointer")[0]||null;if(null===t)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===g.align?(t.classList.add("center"),t.classList.remove("left","right")):(t.classList.add(g.align),t.classList.remove("center"),t.classList.remove("left"===g.align?"right":"left")),"top"===y.align?t.classList.add("flipVertical"):t.classList.remove("flipVertical")}else 2===i.pointerClassNames.length&&(e.classList["auto"===S?"add":"remove"](i.pointerClassNames[0]),e.classList["auto"===_?"add":"remove"](i.pointerClassNames[1]));r.default.setStyles(e,{bottom:"auto"===E?E:Math.round(E).toString()+"px",left:"auto"===_?_:Math.ceil(_).toString()+"px",right:"auto"===w?w:Math.floor(w).toString()+"px",top:"auto"===S?S:Math.round(S).toString()+"px"}),r.default.show(e),e.style.removeProperty("visibility"),void 0!==d&&(""===d?e.style.removeProperty("display"):e.style.setProperty("display",d))}})),define("WoltLabSuite/Core/Ui/CloseOverlay",["require","exports","tslib","../CallbackList"],(function(e,t,i,n){"use strict";function o(e,t){s.add(e,t),c||(document.body.addEventListener("click",(()=>{a(l.Document)})),c=!0)}function r(e){s.remove(e)}function a(e,t){s.forEach(null,(i=>i(e,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.remove=t.add=t.Origin=void 0;const s=new((n=i.__importDefault(n)).default);var l;!function(e){e.Document="document",e.DropDown="dropdown",e.Search="search"}(l||(t.Origin=l={}));let c=!1;t.add=o,t.remove=r,t.execute=a;const d={add:o,remove:r,execute:a};t.default=d})),function(e,t){var i,n;"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("tabbable",["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,i=e.tabbable,t(n=e.tabbable={}),n.noConflict=function(){return e.tabbable=i,n})}(this,(function(e){"use strict";var t=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],i=t.join(","),n="undefined"==typeof Element,o=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!n&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},a=function e(t,i){var n,o;return void 0===i&&(i=!0),""===(o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert"))||"true"===o||i&&t&&e(t.parentNode)},s=function(e,t,n){if(a(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(i));return t&&o.call(e,i)&&r.unshift(e),r.filter(n)},l=function e(t,n,r){var s,l,c,d,u,p,m,h;for(s=[],l=Array.from(t);l.length;)c=l.shift(),a(c,!1)||("SLOT"===c.tagName?(u=e((d=c.assignedElements()).length?d:c.children,!0,r),r.flatten?s.push.apply(s,u):s.push({scopeParent:c,candidates:u})):(o.call(c,i)&&r.filter(c)&&(n||!t.includes(c))&&s.push(c),p=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),m=!a(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c)),p&&m?(h=e(!0===p?c.children:p.children,!0,r),r.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})):l.unshift.apply(l,c.children)));return s},c=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},d=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,i=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===i||"true"===i}(e))&&!c(e)?0:e.tabIndex},u=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return"INPUT"===e.tagName},m=function(e){var t=e.getBoundingClientRect(),i=t.width,n=t.height;return 0===i&&0===n},h=function(e,t){return!(t.disabled||a(t)||function(e){return p(e)&&"hidden"===e.type}(t)||function(e,t){var i,n,a,s,l=t.displayCheck,c=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;if(i=o.call(e,"details>summary:first-of-type")?e.parentElement:e,o.call(i,"details:not([open]) *"))return!0;if(l&&"full"!==l&&"legacy-full"!==l){if("non-zero-area"===l)return m(e)}else{if("function"==typeof c){for(n=e;e;){if(a=e.parentElement,s=r(e),a&&!a.shadowRoot&&!0===c(a))return m(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=n}if(function(e){var t,i,n,o,a,s,l,c=e&&r(e),d=null===(t=c)||void 0===t?void 0:t.host,u=!1;if(c&&c!==e)for(u=!!(null!==(i=d)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(d)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&d;)u=!(null===(s=d=null===(a=c=r(d))||void 0===a?void 0:a.host)||void 0===s||null===(l=s.ownerDocument)||void 0===l||!l.contains(d));return u}(e))return!e.getClientRects().length;if("legacy-full"!==l)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){var t,i,n;if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(i=0;i<t.children.length;i++)if("LEGEND"===(n=t.children.item(i)).tagName)return!!o.call(t,"fieldset[disabled] *")||!n.contains(e);return!0}t=t.parentElement}return!1}(t))},f=function(e,t){return!(function(e){return function(e){return p(e)&&"radio"===e.type}(e)&&!function(e){var t,i,n,o;if(!e.name)return!0;if(i=e.form||r(e),n=function(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')},"undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}return o=function(e,t){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===t)return e[i]}(t,e.form),!o||o===e}(e)}(t)||d(t)<0||!h(e,t))},g=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},b=function e(t){var i=[],n=[];return t.forEach((function(t,o){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var i=d(e);return i<0&&t&&!c(e)?0:i}(a,r),l=r?e(t.candidates):a;0===s?r?i.push.apply(i,l):i.push(a):n.push({documentOrder:o,tabIndex:s,item:t,isScope:r,content:l})})),n.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(i)},v=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,h.bind(null,t))},e.getTabIndex=d,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,v)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,i)&&f(t,e)},e.tabbable=function(e,t){var i;return i=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:f.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):s(e,t.includeContainer,f.bind(null,t)),b(i)},Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){var i,n;"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define("focus-trap",["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,i=e.focusTrap,t(n=e.focusTrap={},e.tabbable),n.noConflict=function(){return e.focusTrap=i,n})}(this,(function(e,t){"use strict";function i(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)),n}function n(e){var t,n;for(t=1;t<arguments.length;t++)n=null!=arguments[t]?arguments[t]:{},t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}));return e}function o(e,t,i){return(t=function(e){var t=function(e,t){var i,n;if("object"!=typeof e||null===e)return e;if(void 0!==(i=e[Symbol.toPrimitive])){if("object"!=typeof(n=i.call(e,"string")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},a=function(e){return r(e)&&!e.shiftKey},s=function(e){return r(e)&&e.shiftKey},l=function(e){return setTimeout(e,0)},c=function(e,t){var i=-1;return e.every((function(e,n){return!t(e)||(i=n,!1)})),i},d=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return"function"==typeof e?e.apply(void 0,i):e},u=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},p=[];e.createFocusTrap=function(e,i){var o,m=(null==i?void 0:i.document)||document,h=(null==i?void 0:i.trapStack)||p,f=n({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:a,isKeyBackward:s},i),g={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b=function(e,t,i){return e&&void 0!==e[t]?e[t]:f[i||t]},v=function(e,t){var i="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return g.containerGroups.findIndex((function(t){var n=t.container,o=t.tabbableNodes;return n.contains(e)||(null==i?void 0:i.includes(n))||o.find((function(t){return t===e}))}))},_=function(e){var t,i,n,o,r=f[e];if("function"==typeof r){for(t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];r=r.apply(void 0,i)}if(!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}if(o=r,"string"==typeof r&&!(o=m.querySelector(r)))throw new Error("`".concat(e,"` as selector refers to no known node"));return o},w=function(){var e,i=_("initialFocus");if(!1===i)return!1;if(void 0!==i&&t.isFocusable(i,f.tabbableOptions)||(i=v(m.activeElement)>=0?m.activeElement:(e=g.tabbableGroups[0])&&e.firstTabbableNode||_("fallbackFocus")),!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},y=function(){if(g.containerGroups=g.containers.map((function(e){var i=t.tabbable(e,f.tabbableOptions),n=t.focusable(e,f.tabbableOptions),o=i.length>0?i[0]:void 0,r=i.length>0?i[i.length-1]:void 0,a=n.find((function(e){return t.isTabbable(e)})),s=n.slice().reverse().find((function(e){return t.isTabbable(e)})),l=!!i.find((function(e){return t.getTabIndex(e)>0}));return{container:e,tabbableNodes:i,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:o,lastTabbableNode:r,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=i.indexOf(e);return r<0?o?n.slice(n.indexOf(e)+1).find((function(e){return t.isTabbable(e)})):n.slice(0,n.indexOf(e)).reverse().find((function(e){return t.isTabbable(e)})):i[r+(o?1:-1)]}}})),g.tabbableGroups=g.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),g.tabbableGroups.length<=0&&!_("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(g.containerGroups.find((function(e){return e.posTabIndexesFound}))&&g.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},E=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!f.preventScroll}),g.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(w()))},S=function(e){var t=_("setReturnFocus",e);return t||!1!==t&&e},L=function(e){var i,n,o,a,s,l,d,p,m,h=e.target,b=e.event,w=e.isBackward,E=void 0!==w&&w;return h=h||u(b),y(),i=null,g.tabbableGroups.length>0?(o=(n=v(h,b))>=0?g.containerGroups[n]:void 0,n<0?i=E?g.tabbableGroups[g.tabbableGroups.length-1].lastTabbableNode:g.tabbableGroups[0].firstTabbableNode:E?(a=c(g.tabbableGroups,(function(e){var t=e.firstTabbableNode;return h===t})),a<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h,!1))&&(a=n),a>=0?(s=0===a?g.tabbableGroups.length-1:a-1,l=g.tabbableGroups[s],i=t.getTabIndex(h)>=0?l.lastTabbableNode:l.lastDomTabbableNode):r(b)||(i=o.nextTabbableNode(h,!1))):(d=c(g.tabbableGroups,(function(e){var t=e.lastTabbableNode;return h===t})),d<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h))&&(d=n),d>=0?(p=d===g.tabbableGroups.length-1?0:d+1,m=g.tabbableGroups[p],i=t.getTabIndex(h)>=0?m.firstTabbableNode:m.firstDomTabbableNode):r(b)||(i=o.nextTabbableNode(h)))):i=_("fallbackFocus"),i},C=function(e){var t=u(e);v(t,e)>=0||(d(f.clickOutsideDeactivates,e)?o.deactivate({returnFocus:f.returnFocusOnDeactivate}):d(f.allowOutsideClick,e)||e.preventDefault())},k=function(e){var i,n,o,r,a,s=u(e),l=v(s,e)>=0;l||s instanceof Document?l&&(g.mostRecentlyFocusedNode=s):(e.stopImmediatePropagation(),n=!0,g.mostRecentlyFocusedNode?t.getTabIndex(g.mostRecentlyFocusedNode)>0?(o=v(g.mostRecentlyFocusedNode),(r=g.containerGroups[o].tabbableNodes).length>0&&(a=r.findIndex((function(e){return e===g.mostRecentlyFocusedNode})),a>=0&&(f.isKeyForward(g.recentNavEvent)?a+1<r.length&&(i=r[a+1],n=!1):a-1>=0&&(i=r[a-1],n=!1)))):g.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return t.getTabIndex(e)>0}))}))||(n=!1):n=!1,n&&(i=L({target:g.mostRecentlyFocusedNode,isBackward:f.isKeyBackward(g.recentNavEvent)})),E(i||g.mostRecentlyFocusedNode||w())),g.recentNavEvent=void 0},x=function(e){if(("Escape"===(null==(t=e)?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode))&&!1!==d(f.escapeDeactivates,e))return e.preventDefault(),void o.deactivate();var t;(f.isKeyForward(e)||f.isKeyBackward(e))&&function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.recentNavEvent=e,(t=L({event:e,isBackward:i}))&&(r(e)&&e.preventDefault(),E(t))}(e,f.isKeyBackward(e))},I=function(e){var t=u(e);v(t,e)>=0||d(f.clickOutsideDeactivates,e)||d(f.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},M=function(){if(g.active)return function(e,t){var i,n;e.length>0&&(i=e[e.length-1])!==t&&i.pause(),-1===(n=e.indexOf(t))||e.splice(n,1),e.push(t)}(h,o),g.delayInitialFocusTimer=f.delayInitialFocus?l((function(){E(w())})):E(w()),m.addEventListener("focusin",k,!0),m.addEventListener("mousedown",C,{capture:!0,passive:!1}),m.addEventListener("touchstart",C,{capture:!0,passive:!1}),m.addEventListener("click",I,{capture:!0,passive:!1}),m.addEventListener("keydown",x,{capture:!0,passive:!1}),o},T=function(){if(g.active)return m.removeEventListener("focusin",k,!0),m.removeEventListener("mousedown",C,!0),m.removeEventListener("touchstart",C,!0),m.removeEventListener("click",I,!0),m.removeEventListener("keydown",x,!0),o},D="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===g.mostRecentlyFocusedNode}))}))&&E(w())})):void 0,A=function(){D&&(D.disconnect(),g.active&&!g.paused&&g.containers.map((function(e){D.observe(e,{subtree:!0,childList:!0})})))};return(o={get active(){return g.active},get paused(){return g.paused},activate:function(e){var t,i,n,o;return g.active?this:(t=b(e,"onActivate"),i=b(e,"onPostActivate"),(n=b(e,"checkCanFocusTrap"))||y(),g.active=!0,g.paused=!1,g.nodeFocusedBeforeActivation=m.activeElement,null==t||t(),o=function(){n&&y(),M(),A(),null==i||i()},n?(n(g.containers.concat()).then(o,o),this):(o(),this))},deactivate:function(e){var t,i,r,a,s,c;return g.active?(t=n({onDeactivate:f.onDeactivate,onPostDeactivate:f.onPostDeactivate,checkCanReturnFocus:f.checkCanReturnFocus},e),clearTimeout(g.delayInitialFocusTimer),g.delayInitialFocusTimer=void 0,T(),g.active=!1,g.paused=!1,A(),function(e,t){var i=e.indexOf(t);-1!==i&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}(h,o),i=b(t,"onDeactivate"),r=b(t,"onPostDeactivate"),a=b(t,"checkCanReturnFocus"),s=b(t,"returnFocus","returnFocusOnDeactivate"),null==i||i(),c=function(){l((function(){s&&E(S(g.nodeFocusedBeforeActivation)),null==r||r()}))},s&&a?(a(S(g.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)):this},pause:function(e){if(g.paused||!g.active)return this;var t=b(e,"onPause"),i=b(e,"onPostPause");return g.paused=!0,null==t||t(),T(),A(),null==i||i(),this},unpause:function(e){if(!g.paused||!g.active)return this;var t=b(e,"onUnpause"),i=b(e,"onPostUnpause");return g.paused=!1,null==t||t(),y(),M(),A(),null==i||i(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return g.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),g.active&&y(),A(),this}}).updateContainerElements(e),o},Object.defineProperty(e,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Helper/Selector",["require","exports"],(function(e,t){"use strict";function i(e){for(const[t,i]of a.entries()){e.matches(t)&&n(e,i);const o=e.querySelectorAll(t);for(const e of o)n(e,i)}}function n(e,t){for(const i of t)i(e)}function o(e,t){a.has(e)||a.set(e,[]),a.get(e).push(t),i(document.body),void 0===r&&(r=new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&i(e)})),r.observe(document,{subtree:!0,childList:!0}))}let r;Object.defineProperty(t,"__esModule",{value:!0}),t.wheneverFirstSeen=t.wheneverSeen=void 0;const a=new Map;t.wheneverSeen=o,t.wheneverFirstSeen=function(e,t){const i=new WeakSet;o(e,(e=>{i.has(e)||(i.add(e),t(e))}))}})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util","../Helper/PageOverlay","focus-trap","../Helper/Selector"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";function m(e,t,i){const n=i?"minDate":"maxDate";let o=(e.dataset[n]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(o))o=new Date(o).getTime().toString();else if("now"===o)o=t.getTime().toString();else if(/^\d{1,3}$/.exec(o)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~o*(i?-1:1)),o=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(o)){if(o=RegExp.$1,null===document.getElementById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}-\d{2}-\d{2}T/.test(o)?new Date(o).getTime().toString():new Date(i?1902:2038,0,1).getTime().toString();e.dataset[n]=o}function h(e){let t=D.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function f(e){e.stopPropagation(),function(){if(null!==H)return;H=document.createElement("div"),H.className="datePicker",H.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");H.appendChild(e),B=document.createElement("button"),B.type="button",B.className="previous jsTooltip",B.title=a.get("wcf.date.datePicker.previousMonth"),B.setAttribute("aria-label",a.get("wcf.date.datePicker.previousMonth")),B.innerHTML='<fa-icon name="arrow-left" solid></fa-icon>',B.addEventListener("click",(()=>R.previousMonth())),e.appendChild(B);const t=document.createElement("span");e.appendChild(t),O=document.createElement("select"),O.className="month jsTooltip",O.title=a.get("wcf.date.datePicker.month"),O.setAttribute("aria-label",a.get("wcf.date.datePicker.month")),O.addEventListener("change",w),t.appendChild(O);let i="";const n=new Intl.DateTimeFormat(document.documentElement.lang,{month:"long"});for(let e=0;e<12;e++)i+=`<option value="${e}">${n.format(new Date(2e3,e,15))}</option>`;O.innerHTML=i,U=document.createElement("select"),U.className="year jsTooltip",U.title=a.get("wcf.date.datePicker.year"),U.setAttribute("aria-label",a.get("wcf.date.datePicker.year")),U.addEventListener("change",y),t.appendChild(U),N=document.createElement("button"),N.type="button",N.className="next jsTooltip",N.title=a.get("wcf.date.datePicker.nextMonth"),N.setAttribute("aria-label",a.get("wcf.date.datePicker.nextMonth")),N.innerHTML='<fa-icon name="arrow-right" solid></fa-icon>',N.addEventListener("click",(()=>R.nextMonth())),e.appendChild(N),P=document.createElement("ul"),H.appendChild(P);const o=document.createElement("li");o.className="weekdays",P.appendChild(o);const r=new Intl.DateTimeFormat(document.documentElement.lang,{weekday:"short"}),s=new Date,l=s.getDay()-x;for(let e=0;e<7;e++){const t=e-l,i=new Date((new Date).setDate(s.getDate()+t)),n=document.createElement("span");n.textContent=r.format(i),o.appendChild(n)}for(let e=0;e<6;e++){const e=document.createElement("li");P.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",E),A.push(t),e.appendChild(t)}}F=document.createElement("footer"),H.appendChild(F),j=document.createElement("select"),j.className="hour",j.title=a.get("wcf.date.datePicker.hour"),j.setAttribute("aria-label",a.get("wcf.date.datePicker.hour")),j.addEventListener("change",_);const c=new Date(2e3,0,1),p=new Intl.DateTimeFormat(document.documentElement.lang,{hour:"numeric"});let m="";for(let e=0;e<24;e++){c.setHours(e);let t=p.formatToParts(c);const i=t.some((e=>"dayPeriod"===e.type));2!==t.length||i||(t=t.filter((e=>"literal"!==e.type))),m+=`<option value="${e}">${t.map((e=>e.value)).join("")}</option>`}j.innerHTML=m,F.appendChild(j),F.appendChild(document.createTextNode(" : ")),q=document.createElement("select"),q.className="minute",q.title=a.get("wcf.date.datePicker.minute"),q.setAttribute("aria-label",a.get("wcf.date.datePicker.minute")),q.addEventListener("change",_),m="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;m+=`<option value="${e}">${t}</option>`}q.innerHTML=m,F.appendChild(q),(0,d.getPageOverlayContainer)().appendChild(H),L=(0,u.createFocusTrap)(H,{allowOutsideClick:!0,escapeDeactivates:()=>(g(),!1)})}();const t=e.currentTarget,i="INPUT"===t.nodeName?t:t.previousElementSibling;if(i===D)return void g();const o=i.closest(".dialogContent");null!==o&&(n.stringToBool(o.dataset.hasDatepickerScrollListener||"")||(o.addEventListener("scroll",b),o.dataset.hasDatepickerScrollListener="1")),D=i;const r=I.get(D),l=D.dataset.value;let c;l?(c=new Date(parseInt(l,10)),"Invalid Date"===c.toString()&&(c=new Date)):c=new Date,T=h("minDate"),T.getTime()>c.getTime()&&(c=T),M=h("maxDate"),D.dataset.maxDate&&M.getTime()<c.getTime()&&(c=M),r.isDateTime?(j.value=c.getHours().toString(),q.value=c.getMinutes().toString(),H.classList.add("datePickerTime")):H.classList.remove("datePickerTime"),H.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),function(e,t,i){v(e,t,i);let n="";for(let e=T.getFullYear(),t=M.getFullYear();e<=t;e++)n+=`<option value="${e}">${e}</option>`;U.innerHTML=n,U.value=i.toString(),O.value=t.toString(),H.classList.add("active")}(c.getDate(),c.getMonth(),c.getFullYear()),C=()=>{s.set(H,D)},C(),window.addEventListener("scroll",C,{passive:!1}),D.nextElementSibling.setAttribute("aria-expanded","true"),L.activate()}function g(){if(null===H||!H.classList.contains("active"))return;H.classList.remove("active");const e=I.get(D);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:D}),void 0!==C&&(window.removeEventListener("scroll",C),C=void 0),D.nextElementSibling.setAttribute("aria-expanded","false"),D=null,L.deactivate()}function b(e){if(null===D)return;const t=e.currentTarget,i=c.default.offset(D),n=c.default.offset(t);i.top+D.clientHeight<=n.top||i.top>=n.top+t.offsetHeight||i.left<=n.left||i.left>=n.left+t.offsetWidth?g():s.set(H,D)}function v(e,t,i){const n=void 0!==e,r=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||P.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof i&&(i=parseInt(i||"0",10)),r||i){let a=0!==i;const s=document.createDocumentFragment();s.appendChild(P),r||(t=parseInt(P.dataset.month,10)),i||(i=parseInt(P.dataset.year,10));let l=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(l<T?(i=T.getFullYear(),t=T.getMonth(),e=T.getDate(),O.value=t.toString(),U.value=i.toString(),a=!0):l>M&&(i=M.getFullYear(),t=M.getMonth(),e=M.getDate(),O.value=t.toString(),U.value=i.toString(),a=!0),l=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");l.getDay()!==x;)l.setDate(l.getDate()-1);c.default.show(A[35].parentNode);const d=new Date(T.getFullYear(),T.getMonth(),T.getDate());for(let e=0;e<42;e++){if(35===e&&l.getMonth()!==t){c.default.hide(A[35].parentNode);break}const i=A[e];i.textContent=l.getDate().toString();const n=l.getMonth()===t;n?i.classList.remove("otherMonth"):i.classList.add("otherMonth");let r=!0;(l<d||l>M)&&(r=!1),r?i.classList.remove("disabled"):i.classList.add("disabled"),n&&r&&(i.href="#",i.setAttribute("role","button"),i.tabIndex=0,i.title=o.formatDate(l),i.setAttribute("aria-label",o.formatDate(l))),l.setDate(l.getDate()+1)}if(P.dataset.month=t.toString(),P.dataset.year=i.toString(),H.insertBefore(s,F),!n&&(l=new Date(i,t,e),l.getDate()!==e)){for(;l.getMonth()!==t;)l.setDate(l.getDate()-1);e=l.getDate()}if(a){for(let e=0;e<12;e++){const t=O.children[e];t.disabled=i===T.getFullYear()&&+t.value<T.getMonth()||i===M.getFullYear()&&+t.value>M.getMonth()}const e=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),N.classList[e<M?"add":"remove"]("active");const n=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");n.setDate(n.getDate()-1),B.classList[n>T?"add":"remove"]("active")}}if(e){for(let t=0;t<37;t++){const i=A[t];let n=+i.textContent===e;(i.classList.contains("otherMonth")||i.classList.contains("disabled"))&&(n=!1),n?i.classList.add("active"):i.classList.remove("active")}P.dataset.day=e.toString()}_()}function _(){const e=I.get(D);let t;n.stringToBool(D.dataset.empty||"")||(t=e.isDateTime?new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day,+j.value,+q.value):new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day),R.setDate(D,t))}function w(e){v(void 0,+e.currentTarget.value)}function y(e){v(void 0,void 0,+e.currentTarget.value)}function E(e){e.preventDefault();const t=e.currentTarget;t.classList.contains("otherMonth")||t.classList.contains("disabled")||(D.dataset.empty="false",v(+t.textContent),I.get(D).isDateTime||g())}function S(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&I.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importDefault(c);let L,C,k=!1,x=0;const I=new Map;let M,T,D=null;const A=[];let P,j,q,O,N,B,F,U,H=null;const R={init(){k||(k=!0,x=parseInt(a.get("wcf.date.firstDayOfTheWeek"),10),(0,p.wheneverSeen)('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)',(e=>{const t=new Date;e.classList.add("inputDatePicker"),e.readOnly=!0;const i="datetime"===e.getAttribute("type"),r=i&&n.stringToBool(e.dataset.timeOnly||""),s=n.stringToBool(e.dataset.disableClear||""),l=i&&n.stringToBool(e.dataset.ignoreTimezone||""),c=e.classList.contains("birthday");e.dataset.isDateTime=i?"true":"false",e.dataset.isTimeOnly=r?"true":"false";let d=null,u=e.value;u||(u=e.getAttribute("value")||"");const p=/^\d+-\d+-\d+$/.test(u);if(u){if(r){d=new Date;const e=u.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||p){let e=new Date(u).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const i=Math.floor(e/60).toString(),n=(e%60).toString();t+=2===i.length?i:"0"+i,t+=":",t+=2===n.length?n:"0"+n,c||p?u+="T00:00:00"+t:u=u.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(u)}const t=d.getTime();isNaN(t)?u="":(e.dataset.value=t.toString(),u=r?o.formatTime(d):i?o.formatDateTime(d):o.formatDate(d))}const h=0===u.length;if(c?(e.dataset.minDate="120",e.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(e.min&&(e.dataset.minDate=e.min),e.max&&(e.dataset.maxDate=e.max)),m(e,t,!0),m(e,t,!1),(e.dataset.minDate||"")===(e.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+e.id+"').");e.type="text",e.value=u,e.dataset.empty=h?"true":"false";const g=e.dataset.placeholder||"";g&&(e.placeholder=g);const b=document.createElement("input");b.id=e.id+"DatePicker",b.name=e.name,b.type="hidden",null!==d&&(b.value=r?o.format(d,"H:i"):l?o.format(d,"Y-m-dTH:i:s"):o.format(d,i?"c":"Y-m-d")),e.parentNode.insertBefore(b,e),e.removeAttribute("name"),e.addEventListener("click",f);const v=document.createElement("div");v.className="inputAddon inputAddonDatePicker";const _=document.createElement("button");_.type="button",_.className="inputSuffix button jsTooltip",_.title=r?a.getPhrase("wcf.date.datePicker.time"):a.getPhrase("wcf.date.datePicker"),_.setAttribute("aria-haspopup","true"),_.setAttribute("aria-expanded","false"),_.addEventListener("click",(t=>{e.disabled||f(t)})),v.appendChild(_);let w=document.createElement("fa-icon");r?w.setIcon("clock"):w.setIcon("calendar"),_.appendChild(w),e.parentNode.insertBefore(v,e),v.insertBefore(e,_);let y=null;s||(y=document.createElement("button"),y.type="button",y.className="inputSuffix button jsTooltip",y.title=r?a.getPhrase("wcf.date.datePicker.time.clear"):a.getPhrase("wcf.date.datePicker.clear"),y.addEventListener("click",(()=>{e.disabled||R.clear(e)})),h&&(y.hidden=!0),v.appendChild(y),w=document.createElement("fa-icon"),w.setIcon("xmark"),y.appendChild(w));const E=["tiny","short","medium","long"];let S=!1;for(let t=0;t<4;t++)e.classList.contains(E[t])&&(S=!0);S||e.classList.add("short"),new MutationObserver((()=>{e.disabled?(_.classList.add("disabled"),y?.classList.add("disabled")):(_.classList.remove("disabled"),y?.classList.remove("disabled"))})).observe(e,{attributeFilter:["disabled"]}),e.disabled&&(_.classList.add("disabled"),y?.classList.add("disabled")),I.set(e,{clearButton:y,shadow:b,disableClear:s,isDateTime:i,isEmpty:h,isTimeOnly:r,ignoreTimezone:l,onClose:null})})),l.default.add("WoltLabSuite/Core/Date/Picker",(()=>g())))},previousMonth(){"0"===O.value?(O.value="11",U.value=(+U.value-1).toString()):O.value=(+O.value-1).toString(),v(void 0,+O.value,+U.value)},nextMonth(){"11"===O.value?(O.value="0",U.value=(+U.value+1).toString()):O.value=(+O.value+1).toString(),v(void 0,+O.value,+U.value)},getDate(e){const t=(e=S(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=S(e);const i=I.get(e);e.dataset.value=t.getTime().toString();let n,r="";i.isDateTime?i.isTimeOnly?(n=o.formatTime(t),r="H:i"):i.ignoreTimezone?(n=o.formatDateTime(t),r="Y-m-dTH:i:s"):(n=o.formatDateTime(t),r="c"):(n=o.formatDate(t),r="Y-m-d"),e.value=n,i.shadow.value=o.format(t,r),i.disableClear||(i.clearButton.hidden=!1)},getValue(e){e=S(e);const t=I.get(e);return t?t.shadow.value:""},clear(e){e=S(e);const t=I.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||(t.clearButton.hidden=!0),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=S(e);const t=I.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),i.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",f),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,I.delete(e)},setCloseCallback(e,t){e=S(e),I.get(e).onClose=t}};return window.__wcf_bc_datePicker=R,R})),define("WoltLabSuite/Core/Form/XsrfToken",["require","exports","../Core","../Helper/Selector"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=(0,i.getXsrfToken)();(0,n.wheneverFirstSeen)(".xsrfTokenInput",(t=>{(function(e){return"INPUT"===e.nodeName})(t)&&(t.value=e,t.classList.add("xsrfTokenInputHandled"))}))}})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./CloseOverlay","focus-trap","../Helper/PageOverlay"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);let m,h=null;const f=new Map;let g=!1;const b=new WeakMap,v=new Map;let _;const w=["onBeforeClose","onClose","onShow"],y=["number","password","search","tel","text","url"],E={setup(){m=document.createElement("div"),m.classList.add("dialogOverlay"),m.setAttribute("aria-hidden","true"),m.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),m.addEventListener("wheel",(e=>{e.target===m&&e.preventDefault()}),{passive:!1});let e=!1;new MutationObserver((()=>{"true"===m.getAttribute("aria-hidden")?((0,p.releasePageOverlayContainer)(m),e=!1):e||((0,p.adoptPageOverlayContainer)(m),e=!0)})).observe(m,{attributes:!0,attributeFilter:["aria-hidden"]}),document.getElementById("content").appendChild(m),_=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName){const e=f.get(h);return!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!1))}}return!0},r.on("screen-xs",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),this._initStaticDialogs(),o.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{f.forEach((e=>{n.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const i=document.getElementById(t);null!==i&&(i.classList.remove("jsStaticDialogContent"),i.dataset.isStaticDialog="true",a.default.hide(i),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(i.id,null,{title:i.dataset.title||""})})))}}))},open(t,o){let r=b.get(t);if(r&&n.isPlainObject(r))return this.openStatic(r.id,void 0===o?null:o);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!n.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(r={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),a.default.show(c)}else if(null===s.source)s.source=o;else if("function"==typeof s.source)s.source();else if(n.isPlainObject(s.source)){if("string"!=typeof o||""===o.trim())return new Promise(((t,i)=>{e(["../Ajax"],t,i)})).then(i.__importStar).then((e=>{const i=s.source;e.api(this,i.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof i.after&&i.after(f.get(l).content,e))}))})),{};s.source=o}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,a.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return b.set(t,r),v.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,o,a){this.isOpen(t)||r.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||r.scrollDisable()),f.has(t)?this._updateDialog(t,o):((a=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},a||{})).closable||(a.backdropCloseOnClick=!1),a.closeConfirmMessage&&(a.onBeforeClose=t=>{new Promise(((t,i)=>{e(["./Confirmation"],t,i)})).then(i.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:a.closeConfirmMessage||""})}))}),this._createDialog(t,o,a));const c=f.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{c.content.querySelector("input, textarea")?.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const i=f.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const n=i.dialog.querySelector(".dialogTitle");n&&(n.textContent=t)},setCallback(e,t,i){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const n=f.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof i&&null!==i)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof i+"' given).");n[t]=i},removeCallback(e,t){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const i=f.get(e);if(void 0===i)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");i[t]=void 0},_createDialog(e,t,i){let n=null;if(null===t&&(n=document.getElementById(e),null===n))throw new Error("Expected either a HTML string or an existing element id.");const o=document.createElement("div");o.classList.add("dialogContainer"),o.setAttribute("aria-hidden","true"),o.setAttribute("role","dialog"),o.dataset.id=e;const r=document.createElement("header");o.appendChild(r);const s=a.default.getUniqueId();o.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,l.id=s,r.appendChild(l),i.closable){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialogCloseButton","jsTooltip"),e.title=i.closeButtonLabel,e.setAttribute("aria-label",i.closeButtonLabel),e.addEventListener("click",(()=>this._close())),r.appendChild(e)}new ResizeObserver((()=>{if("false"===o.getAttribute("aria-hidden")){const e=Math.floor(o.getBoundingClientRect().width/2);o.style.setProperty("--translate-x",`-${e}px`)}})).observe(o);const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),i.disableContentPadding&&c.classList.add("dialogContentNoPadding"),o.appendChild(c),c.addEventListener("wheel",(e=>{let t,i,n,o=!1,r=e.target;for(;;){if(t=r.clientHeight,i=r.scrollHeight,t<i){if(n=r.scrollTop,e.deltaY<0&&n>0){o=!0;break}if(e.deltaY>0&&n+t<i){o=!0;break}}if(!r||r===c)break;r=r.parentNode}o||e.preventDefault()}),{passive:!1}),null===n)if("string"==typeof t)d=document.createElement("div"),d.id=e,a.default.setInnerHtml(d,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");{const i=[];let n;for(let e=0,o=t.childNodes.length;e<o;e++)n=t.childNodes[e],n.nodeType===Node.ELEMENT_NODE&&i.push(n);"DIV"!==i[0].nodeName||i.length>1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=i[0]}}else d=n;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&a.default.show(d);const p=(0,u.createFocusTrap)(o,{allowOutsideClick:!0,escapeDeactivates:()=>(f.get(e).closable&&E.close(e),!1),fallbackFocus:o});f.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,closable:i.closable,content:d,dialog:o,focusTrap:p,header:r,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow,submitButton:null,inputFields:new Set}),m.insertBefore(o,m.firstChild),"function"==typeof i.onSetup&&i.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const i=f.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&&a.default.setInnerHtml(i.content,t),n.stringToBool(i.dialog.getAttribute("aria-hidden"))){d.default.execute(),i.closable&&n.stringToBool(m.getAttribute("aria-hidden"))&&window.addEventListener("keyup",_),i.dialog.parentNode.insertBefore(i.dialog,i.dialog.parentNode.firstChild),i.dialog.setAttribute("aria-hidden","false"),m.setAttribute("aria-hidden","false"),m.setAttribute("close-on-click",i.backdropCloseOnClick?"true":"false"),h=e;const t=i.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),t&&t.removeAttribute("inert"),"function"==typeof i.onShow&&i.onShow(i.content),n.stringToBool(i.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:i.content,id:e})}this.rebuild(e),o.default.trigger(),i.focusTrap.activate()},rebuild(e){const t=this._getDialogId(e),i=f.get(t);if(void 0===i)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(n.stringToBool(i.dialog.getAttribute("aria-hidden")))return;const o=i.content.parentNode,r=i.content.querySelector(".formSubmit");let s=0;null!==r?(o.classList.add("dialogForm"),r.classList.add("dialogFormSubmit"),s+=a.default.outerHeight(r),s-=1,o.style.setProperty("margin-bottom",`${s}px`,"")):(o.classList.remove("dialogForm"),o.style.removeProperty("margin-bottom")),s+=a.default.outerHeight(i.header);const l=window.innerHeight*(g?1:.8)-s;if(o.style.setProperty("max-height",~~l+"px",""),""===i.dialog.style.getPropertyValue("--translate-x")){const e=Math.floor(i.dialog.getBoundingClientRect().width/2);i.dialog.style.setProperty("--translate-x",`-${e}px`)}const c=v.get(t);if(void 0!==c&&"function"==typeof c._dialogSubmit){const e=i.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),n=i.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===n)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",i.content));if(i.submitButton!==n){i.submitButton=n,n.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const o=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let r;for(let t=0,n=e.length;t<n;t++)r=e[t],i.inputFields.has(r)||(-1!==y.indexOf(r.type)?(i.inputFields.add(r),r.addEventListener("keydown",o)):console.warn("Unsupported input type.",r))}}},_submit(e){const t=f.get(e);let i=!0;if(t.inputFields.forEach((e=>{e.required&&(""===e.value.trim()?(a.default.innerError(e,s.get("wcf.global.form.error.empty")),e.closest("dl")?.classList.add("formError"),i=!1):(a.default.innerError(e,!1),e.closest("dl")?.classList.remove("formError")))})),i){const t=v.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(){const e=f.get(h);return void 0===e||!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!0))},_closeOnBackdrop(e){e.target===m&&(n.stringToBool(m.getAttribute("close-on-click"))?(e.preventDefault(),this._close()):e.preventDefault())},close(e){e=this._getDialogId(e);let t=f.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");try{t.focusTrap.deactivate()}catch(e){const t="Your focus-trap must have at least one container with at least one tabbable node in it at all times";if(e.message!==t)throw e}t.dialog.setAttribute("aria-hidden","true");const i=document.activeElement;i.closest(".dialogContainer")===t.dialog&&i.blur(),"function"==typeof t.onClose&&t.onClose(e),h=null;for(let e=0;e<m.childElementCount;e++){const t=m.children[e];if(t.classList.contains("dialogContainer")&&!n.stringToBool(t.getAttribute("aria-hidden"))){h=t.dataset.id||"";break}}r.pageOverlayClose(),null===h?(m.setAttribute("aria-hidden","true"),m.dataset.closeOnClick="false",t.closable&&window.removeEventListener("keyup",_)):(t=f.get(h),m.dataset.closeOnClick=t.backdropCloseOnClick?"true":"false"),"desktop"!==l.platform()&&r.scrollEnable()},getDialog(e){return f.get(this._getDialogId(e))},isOpen(e){const t=this.getDialog(e);return void 0!==t&&"false"===t.dialog.getAttribute("aria-hidden")},destroy(e){if("object"!=typeof e)throw new TypeError("Expected the callback object as parameter.");if(b.has(e)){const t=b.get(e).id;this.isOpen(t)&&this.close(t),f.has(t)&&(f.get(t).dialog.remove(),f.delete(t)),b.delete(e)}},_getDialogId(e){if("object"==typeof e){const t=b.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:()=>({})};return E})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay","../../Helper/PageOverlay","../../Helper/Selector"],(function(e,t,i,n,o,r,a,s,l,c,d){"use strict";function u(e){const t=e.currentTarget,i=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,n=i.length;e<n;e++){const n=i[e],o=a.default.identify(n),r=a.default.offset(n),s=a.default.offset(t);r.top+n.clientHeight<=s.top||r.top>=s.top+t.offsetHeight||r.left<=s.left||r.left>=s.left+t.offsetWidth?L.toggleDropdown(o):L.setAlignment(_.get(o),w.get(o))}}function p(){_.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(o.stringToBool(e.dataset.isOverlayDropdownButton||""))L.setAlignment(e,w.get(t));else{const i=w.get(e.id);o.stringToBool(i.dataset.dropdownIgnorePageScroll||"")||L.close(t)}}))}function m(e,t){b.forEach(e,(i=>{i(e,t)}))}function h(e,t,i,n){if(null!==e){e.preventDefault(),e.stopPropagation();const i=e.currentTarget;t=i.dataset.target,void 0===n&&e instanceof MouseEvent&&(o.stringToBool(i.dataset.isKeyboardClick||"")?delete i.dataset.isKeyboardClick:n=!0)}S=!0;try{l.default.execute(l.Origin.DropDown,t)}finally{S=!1}let a=_.get(t),s=!1;if(void 0!==a){let i,l;if(e&&(i=e.currentTarget,l=i.parentNode,l!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,_.set(t,l))),void 0===n&&(i=a.closest(".dropdownToggle"),i||(i=a.querySelector(".dropdownToggle"),!i&&a.id&&(i=document.querySelector('[data-target="'+a.id+'"]'))),i&&o.stringToBool(i.dataset.dropdownLazyInit||"")&&(n=!0)),o.stringToBool(a.dataset.dropdownPreventToggle||"")&&a.classList.contains("dropdownOpen")&&(s=!0),""===a.dataset.isOverlayDropdownButton){const e=r.parentByClass(a,"dialogContent");a.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",u)}}return E="",_.forEach(((e,r)=>{const a=w.get(r);if(e.classList.contains("dropdownOpen"))if(s)E=t;else{e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),m(r,"close")}else if(r===t&&a.childElementCount>0){E=t,e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen");const s=e.querySelector(".dropdownToggle");s&&s.setAttribute("aria-expanded","true");const l=a.childElementCount>0?a.children[0]:null;if(l&&o.stringToBool(l.dataset.scrollToActive||"")){delete l.dataset.scrollToActive;let e=null;for(let t=0,i=l.childElementCount;t<i;t++)if(l.children[t].classList.contains("active")){e=l.children[t];break}e&&(l.scrollTop=Math.max(e.offsetTop+e.clientHeight-a.clientHeight,0))}const c=a.querySelector(".scrollableDropdownMenu");null!==c&&c.classList[c.scrollHeight>c.clientHeight?"add":"remove"]("forceScrollbar"),m(r,"open");let d=null;if(!n){a.setAttribute("role","menu"),a.tabIndex=-1,a.removeEventListener("keydown",g),a.addEventListener("keydown",g);const e=Array.from(a.querySelectorAll("li")).filter((e=>e.clientHeight>0));d=e.find((e=>e.classList.contains("active")))||e[0]||null,e.forEach((e=>{e.setAttribute("role","menuitem"),e.tabIndex=-1}))}L.setAlignment(e,a,i),null!==d&&d.focus()}})),null===e}function f(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):h(e)))}function g(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const i=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||i.reverse();let n=null;const o=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let r=i.indexOf(t);"End"!==e.key&&"Home"!==e.key||(r=-1);for(let e=r+1;e<i.length;e++)if(o(i[e])){n=i[e];break}null===n&&(n=i.find(o)||null),null!==n&&n.focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();let i=t;1!==i.childElementCount||"SPAN"!==i.children[0].nodeName&&"A"!==i.children[0].nodeName||(i=i.children[0]);const n=_.get(E),r=n.querySelector(".dropdownToggle"),a=n.dataset.a11yMouseEvent||"click";o.triggerEvent(i,a),r&&r.focus()}else if("Escape"===e.key||"Tab"===e.key){e.preventDefault();const t=_.get(E);let i=t.querySelector(".dropdownToggle");null!==i||t.classList.contains("dropdown")||(i=t),h(null,E),i&&i.focus()}}n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);const b=new n.default;let v=!1;const _=new Map,w=new Map;let y,E="",S=!1;const L={setup(){v||(v=!0,y=document.createElement("div"),y.className="dropdownMenuContainer",(0,c.getPageOverlayContainer)().append(y),l.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>L.closeAll())),(0,d.wheneverFirstSeen)(".dropdownToggle",(e=>L.init(e,!1))),document.addEventListener("scroll",p),window.bc_wcfSimpleDropdown=this)},init(e,t){if(L.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const i=r.parentByClass(e,"dropdown");if(null===i)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a parent with .dropdown.");const n=r.nextByClass(e,"dropdownMenu");if(null===n)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a menu as next sibling.");y.appendChild(n);const s=a.default.identify(i);if(!_.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",h),e.addEventListener("keydown",f),_.set(s,i),w.set(s,n),/^wcf\d+$/.test(s)||(n.dataset.source=s),n.childElementCount&&n.children[0].classList.contains("scrollableDropdownMenu"))){const e=n.children[0];e.dataset.scrollToActive="true";let t=null,i=null;e.addEventListener("wheel",(n=>{null===t&&(t=e.clientHeight),null===i&&(i=e.scrollHeight),(n.deltaY<0&&0===e.scrollTop||n.deltaY>0&&e.scrollTop+t===i)&&n.preventDefault()}),{passive:!1})}return e.dataset.target=s,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",o.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){L.setup();const i=a.default.identify(e);_.has(i)||(_.set(i,e),y.appendChild(t),w.set(i,t))},registerCallback(e,t){b.add(e,t)},getDropdown:e=>_.get(e),getDropdownMenu:e=>w.get(e),toggleDropdown(e,t,i){h(null,e,t,i)},setAlignment(e,t,i){const n=e.querySelector(".dropdownToggle"),o=null!==n?n.parentNode:null;let r;o&&o.classList.contains("inputAddonTextarea")&&(r=n),s.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=_.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const i=w.get(e);L.setAlignment(t,i)},isOpen(e){const t=w.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t,i){const n=w.get(e);void 0===n||n.classList.contains("dropdownOpen")||L.toggleDropdown(e,i,t)},close(e){const t=_.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),w.get(e).classList.remove("dropdownOpen"))},closeAll(){S||_.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen")){e.classList.remove("dropdownOpen"),w.get(t).classList.remove("dropdownOpen");const i=e.querySelector(".dropdownToggle");i&&i.setAttribute("aria-expanded","false"),m(t,"close")}}))},destroy(e){if(!_.has(e))return!1;try{L.close(e),w.get(e)?.remove()}catch(e){}return w.delete(e),_.delete(e),!0},_toggle:(e,t,i,n)=>h(e,t,i,n)};return L})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,i,n){"use strict";function o(e){if(!r.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return r.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleDropdown=t.registerCallback=t.getDropdownMenu=t.init=void 0,n=i.__importDefault(n);const r=new Map;let a=0;t.init=function(e,t){if(r.has(e))return;const i=document.createElement("div");i.id="reusableDropdownGhost"+a++,n.default.initFragment(i,t),r.set(e,i.id)},t.getDropdownMenu=function(e){return n.default.getDropdownMenu(o(e))},t.registerCallback=function(e,t){n.default.registerCallback(o(e),t)},t.toggleDropdown=function(e,t){n.default.toggleDropdown(o(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Container",["require","exports","tslib","focus-trap","../../Screen","../../CloseOverlay","../../../Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuContainer=void 0,r=i.__importDefault(r),a=i.__importDefault(a);class s{container=document.createElement("div");content=document.createElement("div");focusTrap=void 0;provider;constructor(e){this.provider=e,this.container.hidden=!0;const t=a.default.identify(this.provider.getMenuButton());r.default.add(`WoltLabSuite/Core/Ui/PageMenu/Container-${t}`,(()=>{this.container.hidden||this.close()}))}open(){r.default.execute(),this.buildElements(),0===this.content.childElementCount&&this.content.append(this.provider.getContent()),this.provider.getMenuButton().setAttribute("aria-expanded","true"),(0,o.pageOverlayOpen)(),(0,o.scrollDisable)(),this.container.hidden=!1,this.provider.wakeup(),this.getFocusTrap().activate()}close(){this.provider.getMenuButton().setAttribute("aria-expanded","false"),(0,o.pageOverlayClose)(),(0,o.scrollEnable)(),this.container.hidden=!0,this.getFocusTrap().deactivate(),this.provider.sleep()}toggle(){this.container.hidden?this.open():this.close()}getContent(){return this.content}buildElements(){this.container.classList.contains("pageMenuContainer")||(this.container.classList.add("pageMenuContainer"),this.container.hidden=!0,this.container.addEventListener("click",(e=>{e.target===this.container&&this.close()})),this.content.classList.add("pageMenuContent"),this.content.addEventListener("click",(e=>{e.stopPropagation()})),this.container.append(this.content),document.body.append(this.container))}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,n.createFocusTrap)(this.content,{allowOutsideClick:!0})),this.focusTrap}}t.PageMenuContainer=s,t.default=s})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","./Container","../../../Language","../../../Dom/Util","../../Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuMain=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);class s{container;mainMenu;mainMenuButton;menuItemBadges=new Map;menuItemProvider;observer;constructor(e){this.mainMenu=document.querySelector(".mainMenu"),this.menuItemProvider=e,this.mainMenuButton=document.querySelector(".pageHeaderMenuMobile"),this.mainMenuButton.addEventListener("click",(e=>{e.stopPropagation(),this.container.toggle()})),this.container=new n.default(this),this.observer=new MutationObserver((e=>{let t=!1;e.forEach((e=>{(e.addedNodes.length>0||e.removedNodes.length>0||"characterData"===e.type)&&(t=!0)})),t&&this.refreshUnreadIndicator()})),this.watchForChanges()}enable(){this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars")}getContent(){const e=document.createElement("div");e.classList.add("pageMenuMainContainer"),e.addEventListener("scroll",(()=>this.updateOverflowIndicator(e)),{passive:!0}),e.append(this.buildMainMenu());const t=this.buildLanguageMenu();t&&e.append(t);const i=this.buildFooterMenu();i&&e.append(i);const n=new ResizeObserver((()=>this.updateOverflowIndicator(e)));Array.from(e.children).forEach((e=>{n.observe(e)}));const o=document.createDocumentFragment();return o.append(e),o}getMenuButton(){return this.mainMenuButton}sleep(){this.watchForChanges()}wakeup(){this.observer.disconnect(),this.refreshUnreadIndicator()}watchForChanges(){this.observer.observe(this.mainMenu,{childList:!0,subtree:!0})}buildMainMenu(){const e=this.mainMenu.querySelector(".boxMenu"),t=this.buildMenu(e);return t.setAttribute("aria-label",window.PAGE_TITLE),t.setAttribute("role","navigation"),this.showActiveMenuItem(t),t}showActiveMenuItem(e){const t=e.querySelector('.pageMenuMainItemLink[aria-current="page"]');if(t){let e=t;for(;e&&e.parentElement;)if(e=e.parentElement.closest(".pageMenuMainItemList"),e){e.hidden=!1;const t=e.previousElementSibling;t?.setAttribute("aria-expanded","true")}const i=t.nextElementSibling;i&&(i.setAttribute("aria-expanded","true"),i.nextElementSibling.hidden=!1)}}buildLanguageMenu(){const e=a.getDropdownMenu("pageLanguageContainer");if(void 0===e)return null;const t=[],i=new Map;Array.from(e.children).forEach((e=>{const n=e.dataset.languageCode,o=e.querySelector("span").textContent.trim(),r=e.querySelector("img.iconFlag")||void 0;i.set(n,e.querySelector("a")),t.push({active:!1,children:[],counter:0,depth:1,identifier:n,title:o,icon:r})}));const n=document.createElement("fa-icon");n.setIcon("language"),n.size=24;const r=[{active:!1,children:t,counter:0,depth:0,identifier:"language",title:o.get("wcf.user.language"),icon:n}],s=document.createElement("nav");return s.classList.add("pageMenuMainNavigation","pageMenuMainNavigationLanguage"),s.append(this.buildMenuItemList(r,!0)),s.querySelectorAll(".pageMenuMainItemList .pageMenuMainItemLabel[data-identifier]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const n=e.dataset.identifier;i.get(n)?.click()}))})),s}buildFooterMenu(){const e=document.querySelector('.box[data-box-identifier="com.woltlab.wcf.FooterMenu"]');if(null===e)return null;const t=e.querySelector(".boxMenu"),i=this.buildMenu(t);i.classList.add("pageMenuMainNavigationFooter");const n=e.querySelector("nav").getAttribute("aria-label");return i.setAttribute("aria-label",n),i}buildMenu(e){const t=this.menuItemProvider.getMenuItems(e),i=document.createElement("nav");return i.classList.add("pageMenuMainNavigation"),i.append(this.buildMenuItemList(t,!1)),i}buildMenuItemList(e,t){const i=document.createElement("ul");return i.classList.add("pageMenuMainItemList"),e.filter((e=>!(!t&&!e.link&&0===e.children.length))).forEach((e=>{i.append(this.buildMenuItem(e,t))})),i}buildMenuItem(e,t){const i=document.createElement("li");if(i.dataset.depth=e.depth.toString(),i.classList.add("pageMenuMainItem"),e.link){const t=document.createElement("a");if(t.classList.add("pageMenuMainItemLink"),t.href=e.link,t.textContent=e.title,e.active&&t.setAttribute("aria-current","page"),e.identifier&&(t.dataset.identifier=e.identifier),e.openInNewWindow&&(t.target="_blank"),e.counter>0){const i=document.createElement("span");i.classList.add("pageMenuMainItemCounter","badge","badgeUpdate"),i.setAttribute("aria-hidden","true"),i.textContent=e.counter.toString(),null!==e.identifier&&this.menuItemBadges.set(e.identifier,i),t.append(i)}i.append(t)}else{const n=document.createElement("a");if(n.classList.add("pageMenuMainItemLabel"),n.href="#",e.icon){n.append(e.icon);const t=document.createElement("span");t.textContent=e.title,n.append(t)}else n.textContent=e.title;e.identifier&&(n.dataset.identifier=e.identifier),t&&"language"!==e.identifier||(n.addEventListener("click",(e=>{e.preventDefault(),n.nextElementSibling.click()})),n.setAttribute("aria-hidden","true")),i.append(n)}if(e.children.length){i.classList.add("pageMenuMainItemExpandable");const n=r.default.getUniqueId(),a=document.createElement("button");a.type="button",a.classList.add("pageMenuMainItemToggle"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",n),a.innerHTML='<fa-icon size="24" name="angle-down"></fa-icon>';let s=e.title;e.link&&(s=o.get("wcf.menu.page.button.toggle",{title:e.title})),a.setAttribute("aria-label",s);const l=this.buildMenuItemList(e.children,t);l.id=n,l.hidden=!0,a.addEventListener("click",(()=>{this.toggleList(a,l)})),l.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.toggleList(a,l))})),i.append(a,l)}return i}toggleList(e,t){t.hidden?(e.setAttribute("aria-expanded","true"),t.hidden=!1):(e.setAttribute("aria-expanded","false"),t.hidden=!0,document.activeElement!==e&&e.focus())}refreshUnreadIndicator(){null!==this.mainMenu.querySelector(".boxMenuLinkOutstandingItems")?this.mainMenu.classList.add("pageMenuMobileButtonHasContent"):this.mainMenu.classList.remove("pageMenuMobileButtonHasContent"),this.menuItemProvider.getMenuItems(this.mainMenu).forEach((e=>this.refreshUnreadBage(e)))}refreshUnreadBage(e){if(null!==e.identifier){const t=this.menuItemBadges.get(e.identifier);t&&(0===e.counter?(t.remove(),this.menuItemBadges.delete(e.identifier)):parseInt(t.textContent,10)!==e.counter&&(t.textContent=e.counter.toString()))}e.children.forEach((e=>this.refreshUnreadBage(e)))}updateOverflowIndicator(e){e.clientHeight<e.scrollHeight?(e.scrollTop>0?e.classList.add("pageMenuMainContainerOverflowTop"):e.classList.remove("pageMenuMainContainerOverflowTop"),e.clientHeight+e.scrollTop<e.scrollHeight?e.classList.add("pageMenuMainContainerOverflowBottom"):e.classList.remove("pageMenuMainContainerOverflowBottom")):e.classList.remove("pageMenuMainContainerOverflowTop","pageMenuMainContainerOverflowBottom")}}t.PageMenuMain=s,t.default=s})),define("WoltLabSuite/Core/Ui/User/Menu/Manager",["require","exports","tslib","../../Alignment","../../CloseOverlay","../../../Event/Handler","../../../Dom/Util","../../Screen","../../../Helper/PageOverlay"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e){o.default.execute();const t=p(e);t.open();const i=e.getPanelButton();i.querySelector("a").setAttribute("aria-expanded","true"),i.classList.add("open"),d(t.getElement(),i)}function d(e,t){if(n.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==a.default.getFixedParent(t)){const{top:i,height:n}=t.getBoundingClientRect();e.style.setProperty("top",`${i+n}px`)}}function u(e){if(!g.has(e))return;const t=e.getPanelButton();t.classList.contains("open")&&(p(e).close(),t.classList.remove("open"),t.querySelector("a").setAttribute("aria-expanded","false"))}function p(e){if(!g.has(e)){const t=e.getView(),i=t.getElement();m().append(i),i.addEventListener("shouldClose",(()=>u(e))),g.set(e,t)}return g.get(e)}function m(){return void 0===h&&(h=document.createElement("div"),h.classList.add("dropdownMenuContainer"),(0,l.getPageOverlayContainer)().append(h)),h}let h;Object.defineProperty(t,"__esModule",{value:!0}),t.registerProvider=t.getContainer=t.getUserMenuProviders=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s);const f=new Set,g=new Map;t.getUserMenuProviders=function(){return f},t.getContainer=m,t.registerProvider=function(e){0===f.size&&(o.default.add("WoltLabSuite/Ui/User/Menu",(()=>{f.forEach((e=>u(e)))})),r.add("com.woltlab.wcf.UserMenuMobile","more",(e=>{f.forEach((t=>{e.identifier===t.getIdentifier()&&c(t)}))})),window.addEventListener("resize",(()=>{f.forEach((e=>{const t=e.getPanelButton();t.classList.contains("open")&&d(p(e).getElement(),t)}))}),{passive:!0}),s.on("screen-md-down",{match(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))},setup(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))}})),function(e){f.add(e);const t=e.getPanelButton();t.addEventListener("click",(i=>{i.preventDefault(),i.stopPropagation(),t.classList.contains("open")?u(e):c(e)}))}(e)}})),define("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",["require","exports","tslib","../../CloseOverlay","./Manager","focus-trap","../../Alignment","../../../Dom/Util"],(function(e,t,i,n,o,r,a,s){"use strict";function l(){u.deactivate(),d.hidden=!0,c.classList.remove("open"),p.setAttribute("aria-expanded","false")}let c,d,u,p;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.getElement=void 0,n=i.__importDefault(n),a=i.__importStar(a),s=i.__importDefault(s),t.getElement=function(){return d};let m=!1;t.setup=function(){m||(c=document.getElementById("userMenu"),d=c.querySelector(".userMenu"),p=c.querySelector("a"),n.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",(()=>l())),(0,o.getContainer)().append(d),d.addEventListener("click",(e=>e.stopPropagation())),c.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.hidden?d.hidden&&(n.default.execute(),d.hidden=!1,c.classList.add("open"),p.setAttribute("aria-expanded","true"),u.activate(),function(e,t){if(a.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==s.default.getFixedParent(t)){const{top:i,height:n}=t.getBoundingClientRect();e.style.setProperty("top",`${i+n}px`)}}(d,c)):l()})),u=(0,r.createFocusTrap)(d,{allowOutsideClick:!0,escapeDeactivates:()=>(l(),!1),fallbackFocus:d}),m=!0)}})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","./Container","../../../Language","../../User/Menu/Manager","../../../Dom/Util","../../User/Menu/ControlPanel","../../../Event/Handler","../../Screen"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasValidUserMenu=t.PageMenuUser=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),l=i.__importStar(l);class d{activeTab=void 0;container;legacyUserPanels=new Map;observer;userMenuProviders=new Map;tabOrigins=new Map;tabPanels=new Map;tabs=[];userMenu;userMenuButton;constructor(){this.userMenu=document.querySelector(".userPanel"),this.userMenuButton=document.querySelector(".pageHeaderUserMobile"),this.userMenuButton.addEventListener("click",(t=>{t.stopPropagation(),e.then((()=>this.container.toggle()))})),this.container=new n.default(this);const e=new Promise((e=>{"complete"===document.readyState?e():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&e()}))}));(0,c.on)("screen-lg",{match:()=>this.detachViewsFromPanel(),unmatch:()=>this.detachViewsFromPanel()}),this.observer=new MutationObserver((()=>{this.refreshTabUnreadIndicators()}))}enable(){this.userMenuButton.setAttribute("aria-expanded","false"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.userMenuButton.setAttribute("aria-expanded","false")}getContent(){const e=document.createDocumentFragment();return e.append(this.buildTabMenu()),e}getMenuButton(){return this.userMenuButton}sleep(){this.activeTab&&this.closeTab(this.activeTab),this.detachViewsFromPanel(),this.refreshUnreadIndicator()}wakeup(){this.activeTab?this.openTab(this.activeTab):this.isInMaintenanceMode()?this.openTab(this.tabs[0]):this.openNotifications(),this.refreshTabUnreadIndicators(),this.refreshUnreadIndicator()}isInMaintenanceMode(){return"wcf"===document.body.dataset.application&&"offline"===document.body.dataset.template}openNotifications(){const e=this.tabs.find((e=>"userNotifications"===e.dataset.origin));if(!e)throw new Error("Unable to find the notifications tab.");this.openTab(e)}openTab(e){this.closeActiveTab(),e.setAttribute("aria-selected","true"),e.tabIndex=0;const t=this.tabPanels.get(e);t.hidden=!1,document.activeElement!==e&&e.focus(),this.attachViewToPanel(e),this.activeTab=e,this.observer.observe(t,{attributeFilter:["data-is-unread"],childList:!0,subtree:!0})}closeActiveTab(){this.activeTab&&(this.closeTab(this.activeTab),this.activeTab=void 0)}closeTab(e){e.setAttribute("aria-selected","false"),e.tabIndex=-1,this.tabPanels.get(e).hidden=!0;const t=this.legacyUserPanels.get(e);t&&t.close(),this.observer.disconnect(),this.refreshTabUnreadIndicators()}attachViewToPanel(e){const t=e.dataset.origin,i=this.tabPanels.get(e);if("userMenu"===t){const e=(0,s.getElement)();e.hidden=!1,0===i.childElementCount&&(this.tabOrigins.set(i,e.parentElement),i.append(e))}else if(0===i.childElementCount){const t=this.userMenuProviders.get(e);if(t){const e=t.getView(),n=e.getElement();this.tabOrigins.set(i,n.parentElement),i.append(n),e.open()}else{const t=this.legacyUserPanels.get(e);t.open();const{top:n}=i.getBoundingClientRect();t.getDropdown().getContainer()[0].style.setProperty("--offset-top",`${n}px`)}}}detachViewsFromPanel(){this.tabPanels.forEach(((e,t)=>{if(e.childElementCount){const i=this.tabOrigins.get(e);if(i)if("userMenu"===t.dataset.origin){const t=e.children[0];t.hidden=!0,i.append(t)}else{const e=this.userMenuProviders.get(t);if(e){const t=e.getView().getElement();t.hidden=!0,i.append(t)}}}}))}keydown(e){const t=e.currentTarget;if("Enter"===e.key||" "===e.key)return e.preventDefault(),void this.openTab(t);if(!["ArrowLeft","ArrowRight","End","Home"].includes(e.key))return;e.preventDefault();const i=this.tabs.indexOf(t),n=this.tabs.length-1;let o;o="ArrowLeft"===e.key?0===i?n:i-1:"ArrowRight"===e.key?i===n?0:i+1:"End"===e.key?n:0,this.tabs[o].focus()}buildTabMenu(){const e=document.createElement("div");e.classList.add("pageMenuUserTabContainer");const t=document.createElement("div");return t.classList.add("pageMenuUserTabList"),t.setAttribute("role","tablist"),t.setAttribute("aria-label",o.get("wcf.menu.user")),e.append(t),this.buildControlPanelTab(t,e),(0,r.getUserMenuProviders)().forEach((i=>{const[n,o]=this.buildTab(i);t.append(n),e.append(o),this.tabs.push(n),this.tabPanels.set(n,o),this.userMenuProviders.set(n,i)})),this.buildLegacyTabs(t,e),e}buildTab(e){const t=e.getPanelButton(),i=t.querySelector("a");let n=i.querySelector("fa-icon")?.outerHTML;void 0===n&&(n='<fa-icon size="32" name="question"></fa-icon>');const o={icon:n,label:i.dataset.title||i.title,origin:t.id};return this.buildTabComponents(o)}buildControlPanelTab(e,t){const i=document.getElementById("userMenu"),n=i.querySelector("a"),o={icon:this.userMenuButton.querySelector(".userAvatarImage").outerHTML,label:n.dataset.title||n.title,origin:i.id},[r,a]=this.buildTabComponents(o);e.append(r),t.append(a),this.tabs.push(r),this.tabPanels.set(r,a)}buildLegacyTabs(e,t){const i=document.querySelector(".userPanelItems"),n={panels:[]};l.fire("com.woltlab.wcf.pageMenu","legacyMenu",n),Array.from(i.children).filter((e=>void 0!==n.panels.find((t=>t.element===e)))).map((e=>{const t=e.querySelector("a");return{icon:t.querySelector(".icon").outerHTML,label:t.dataset.title||t.title,origin:e.id}})).forEach((i=>{const[o,r]=this.buildTabComponents(i);e.append(o),t.append(r),this.tabs.push(o),this.tabPanels.set(o,r);const a=n.panels.find((e=>e.element.id===i.origin));this.legacyUserPanels.set(o,a.api)}))}buildTabComponents(e){const t=a.default.getUniqueId(),i=a.default.getUniqueId(),n=document.createElement("button");n.type="button",n.classList.add("pageMenuUserTab"),n.dataset.hasUnreadContent="false",n.dataset.origin=e.origin,n.id=t,n.setAttribute("aria-controls",i),n.setAttribute("aria-selected","false"),n.setAttribute("role","tab"),n.tabIndex=-1,n.setAttribute("aria-label",e.label),n.innerHTML=e.icon,n.addEventListener("click",(e=>{e.preventDefault(),this.openTab(n)})),n.addEventListener("keydown",(e=>this.keydown(e)));const o=document.createElement("div");return o.classList.add("pageMenuUserTabPanel"),o.id=i,o.hidden=!0,o.setAttribute("aria-labelledby",t),o.setAttribute("role","tabpanel"),o.tabIndex=0,[n,o]}refreshUnreadIndicator(){null!==this.userMenu.querySelector(".badge.badgeUpdate")?this.userMenu.classList.add("pageMenuMobileButtonHasContent"):this.userMenu.classList.remove("pageMenuMobileButtonHasContent")}refreshTabUnreadIndicators(){this.userMenuProviders.forEach(((e,t)=>{e.hasUnreadContent()?t.dataset.hasUnreadContent="true":t.dataset.hasUnreadContent="false"}))}}t.PageMenuUser=d,t.hasValidUserMenu=function(){return document.getElementById("topMenu").classList.contains("userPanelLoggedIn")},t.default=d})),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","focus-trap","../Core","../Dom/Change/Listener","../Dom/Util","../Environment","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen","../Language"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h){"use strict";function f(){N=!0,g(),b(),F&&(H=new u.PageMenuMain(W),H.enable(),(0,p.hasValidUserMenu)()&&(R=new p.PageMenuUser,R.enable())),c.default.add("WoltLabSuite/Core/Ui/Mobile",v),r.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{g(),b()})),document.addEventListener("scroll",(()=>E()),{passive:!0})}function g(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const i=document.createElement("button");i.type="button",i.innerHTML='<fa-icon size="24" name="ellipsis-vertical"></fa-icon>',i.classList.add("dropdownLabel"),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),v(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(i,e.firstChild)}))}function b(){document.querySelectorAll(".message").forEach((e=>{if(U.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const i=e.querySelector(".messageQuickOptions");if(i&&t.childElementCount){i.classList.add("active");let n=i.querySelector(".messageQuickOptionsMobile");null===n&&(n=document.createElement("li"),n.innerHTML=`\n            <button type="button" aria-label="${h.get("wcf.global.button.more")}">\n              <fa-icon name="ellipsis-vertical"></fa-icon>\n            </button>\n          `,n.classList.add("messageQuickOptionsMobile"),i.append(n)),n.querySelector("button").addEventListener("click",(n=>{n.stopPropagation(),S(e,i,t)}))}}U.add(e)}))}function v(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),N&&q&&E()}function _(){V=!0}function w(){V=!1,z.forEach((function(e){e.classList.remove("open")}))}function y(){z.forEach((function(e){e.addEventListener("mousedown",(function(t){V&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),V=!0}function E(){q?.classList.remove("dropdownOpen")}function S(e,t,i){if(null===q)q=document.createElement("ul"),q.className="dropdownMenu",d.init("com.woltlab.wcf.jsMobileNavigation",q);else if(q.classList.contains("dropdownOpen")&&(E(),j.deactivate(),j=void 0,O===e))return;q.innerHTML="",c.default.execute(),x(i);const o=i.previousElementSibling;if(o&&o.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",q.appendChild(e),x(o)}l.set(q,t,{horizontal:"right",allowFlip:"vertical"}),q.classList.add("dropdownOpen"),O=e,j=(0,n.createFocusTrap)(q,{allowOutsideClick:!0,escapeDeactivates:()=>(S(e,t,i),!1),setReturnFocus:t}),j.activate()}function L(){B=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(t=>{B&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const i=e.parentElement,n=t.target;i.contains(n)||n===i||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}),{passive:!1})}))}function C(){B=!0}function k(){B=!1}function x(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const i=e.querySelector("span:not(.icon)");t.innerHTML=`<a href="#">${i.textContent}</a>`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():o.triggerEvent(e,"click"),E()})),q.appendChild(t)}))}function I(){c.default.execute(),N=!0,F&&(H.enable(),R?.enable())}function M(){$&&A($,".messageGroupLink")}function T(){c.default.execute(),N=!1,F&&(H.disable(),R?.disable())}function D(){$&&P($),q&&E()}function A(e,t){Array.from(e).forEach((e=>{const i=e.parentElement;let n=i.querySelector(".mobileLinkShadow");if(null===n){const o=e.querySelector(t);o.href&&(n=document.createElement("a"),n.className="mobileLinkShadow",n.href=o.href,n.setAttribute("aria-labelledby",a.default.identify(o)),i.appendChild(n),i.classList.add("mobileLinkShadowContainer"))}}))}function P(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeShadow=t.rebuildShadow=t.disableShadow=t.disable=t.enableShadow=t.enable=t.setup=void 0,o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c),d=i.__importStar(d),m=i.__importStar(m),h=i.__importStar(h);let j,q=null,O=null,N=!1,B=!1,F=!1;const U=new WeakSet;let H,R,W,V=!1,$=null;const z=[];t.setup=function(e,t){F=e,W=t,document.querySelectorAll(".boxesSidebarLeft").forEach((e=>{z.push(e)})),s.touch()&&document.documentElement.classList.add("touch"),"desktop"!==s.platform()&&document.documentElement.classList.add("mobile");const i=document.querySelector(".messageGroupList");i&&($=i.getElementsByClassName("messageGroup")),m.on("screen-md-down",{match:I,unmatch:T,setup:f}),m.on("screen-sm-down",{match:M,unmatch:D,setup:M}),m.on("screen-md-down",{match:_,unmatch:w,setup:y}),!s.touch()||"ios"!==s.platform()&&"android"!==s.platform()||m.on("screen-lg",{match:C,unmatch:k,setup:L})},t.enable=I,t.enableShadow=M,t.disable=T,t.disableShadow=D,t.rebuildShadow=A,t.removeShadow=P})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language","../../Ui/Screen"],(function(e,t,i,n,o,r){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==g?(e>=b?(m.classList.contains("initiallyHidden")&&m.classList.remove("initiallyHidden"),m.setAttribute("aria-hidden","false")):m.setAttribute("aria-hidden","true"),l(),-1!==g&&h.classList[e<g?"remove":"add"]("scrolledDown"),g=-1):v()}function s(e){e.preventDefault(),document.getElementById("top").scrollIntoView({behavior:"smooth"})}function l(){const e=Array.from(p.children).find((e=>"false"===e.getAttribute("aria-hidden")));p.classList[e?"add":"remove"]("active"),e?h.classList.add("pageActionHasContextButtons"):h.classList.remove("pageActionHasContextButtons")}function c(){if(f)return;f=!0,h=document.createElement("div"),h.className="pageAction",p=document.createElement("div"),p.className="pageActionButtons",h.appendChild(p),m=function(){const e=document.createElement("button");return e.type="button",e.classList.add("button","buttonPrimary","pageActionButtonToTop","initiallyHidden","jsTooltip"),e.title=o.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='<fa-icon size="32" name="angle-up" solid></fa-icon>',e.addEventListener("click",s),e}(),h.appendChild(m),document.body.appendChild(h);const e=n.debounce(a,100);window.addEventListener("scroll",(()=>{-1===g&&(g=window.pageYOffset,window.setTimeout((()=>{a(),g=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==g&&(g=-1)}),{passive:!0}),r.on("screen-sm-down",{match(){b=50},unmatch(){b=300},setup(){b=50}}),a()}function d(e){const t=u.get(e);t&&(t.parentElement.setAttribute("aria-hidden","true"),l())}Object.defineProperty(t,"__esModule",{value:!0}),t.show=t.hide=t.remove=t.get=t.has=t.add=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);const u=new Map;let p,m,h,f=!1,g=-1,b=300;const v=n.debounce((()=>{g=-1}),50);t.setup=c,t.add=function(e,t,i){c();const n=document.createElement("div");n.className="pageActionButton",n.dataset.name=e,n.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),n.appendChild(t);let o=null;i&&(o=u.get(i)||null,o&&(o=o.parentElement)),!o&&p.childElementCount&&(o=p.children[0]),o||(o=p.firstChild),p.insertBefore(n,o),h.classList.remove("scrolledDown"),u.set(e,t),n.offsetParent,n.setAttribute("aria-hidden","false"),l()},t.has=function(e){return u.has(e)},t.get=function(e){return u.get(e)},t.remove=function(e){const t=u.get(e);if(void 0!==t){const i=t.parentElement,o=()=>{try{n.stringToBool(i.getAttribute("aria-hidden"))&&(p.removeChild(i),u.delete(e)),i.removeEventListener("transitionend",o)}catch(e){}};i.addEventListener("transitionend",o),d(e)}},t.hide=d,t.show=function(e){const t=u.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),h.classList.remove("scrolledDown"),l()}}})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler","WoltLabSuite/Core/Ui/CloseOverlay"],(function(e,t,i,n,o,r,a,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s);class l{container;containers=new Map;isLegacy=!1;store=null;tabs=new Map;constructor(e){this.container=e}validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=n.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;n.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=o.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const i=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+i+"') exists more than once.");const n=this.containers.get(t);if(void 0===n)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+i+"').");if(n.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+i+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+t+"'] (tab menu id: '"+i+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+i+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEach((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(){this.tabs.forEach((e=>{const t=e.children[0];if(t.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let e=!1;t.addEventListener("touchstart",(()=>{e=!0})),t.addEventListener("touchmove",(()=>{e=!1})),t.addEventListener("touchend",(t=>{e&&(e=!1,t.preventDefault(),this._onClick(t))}))}}));let e=null;const t=l.getIdentifierFromHash();let i;if(""!==t&&(i=this.tabs.get(t),i)){const t=this.container.parentElement;t?.classList.contains("tabMenuContainer")&&(e=this.container)}if(!i){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){i||o.default.isHidden(e)||e.previousElementSibling&&!o.default.isHidden(e.previousElementSibling)||(i=e)})):"string"==typeof e&&"false"!==e&&(i=this.tabs.get(e))}i&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,i,!0));const n=this.container.dataset.store;if(n){const e=document.createElement("input");e.type="hidden",e.name=n,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}return e}select(t,n,o){if(t=t?t.toString():"",!(n=n||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((i=>{e===t&&(n=i),e++}))}if(!n)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||n.dataset.name||"";const r=this.getActiveTab();let c=null;if(r){const e=r.dataset.name;if(e===t)return;o||a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:r,tabName:e}),r.classList.remove("active"),c=this.containers.get(r.dataset.name||""),c.classList.remove("active"),c.classList.add("hidden"),this.isLegacy&&(r.classList.remove("ui-state-active"),c.classList.remove("ui-state-active"))}n.classList.add("active");const d=this.containers.get(t);if(d.classList.add("active"),d.classList.remove("hidden"),this.isLegacy&&(n.classList.add("ui-state-active"),d.classList.add("ui-state-active")),this.store&&(this.store.value=t),!o){a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:n,activeName:t,previous:r,previousName:r?r.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(n),oldTab:e(r),newPanel:e(d),oldPanel:e(c)});let i=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?i+=window.location.hash:i+="#"+t,window.history.replaceState(void 0,"",i)}s.default.execute(),new Promise(((t,i)=>{e(["../TabMenu"],t,i)})).then(i.__importStar).then((e=>{e.scrollToTab(n)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||o.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const i=e.children[0];/#([^#]+)$/.exec(i.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,i,n){"use strict";function o(){null!==l&&window.clearTimeout(l),l=window.setTimeout((()=>{for(const e of a)e();window.removeEventListener("scroll",o),a=[],r=void 0,l=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,n=i.__importDefault(n);let r,a=[],s=null,l=null;t.element=function(e,t,i="smooth"){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(a.length>0&&e!==r)throw new Error("Cannot scroll to element, a concurrent request is running.");if(t&&a.push(t),void 0!==r)return;r=e,window.addEventListener("scroll",o);let l=n.default.offset(e).top;if(null===s){s=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;s="fixed"===t||"static"===t?e.offsetHeight:0}}s>0&&(l<=s?l=0:l-=s);const c=window.pageYOffset;window.scrollTo({left:0,top:l,behavior:i}),window.setTimeout((()=>{c===window.pageYOffset&&o()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=o.default.identify(e);if(_.has(t))return;let i=new r.default(e);if(!i.validate())return;const n=i.init();if(_.set(t,i),n instanceof HTMLElement){const e=f(n.parentNode.id);e&&(i=e,i.select(n.id,void 0,!0))}const a=document.querySelector("#"+t+" > nav > ul");a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===a?(a.classList.add("active"),b=a):(a.classList.remove("active"),b=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){i=null,h(e)}let i=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{if(!t.defaultPrevented)for(const i of e.querySelectorAll("input, select, textarea"))if(!i.checkValidity()){t.preventDefault();const e=f(i.closest(".tabMenuContainer").id),n=i.closest(".tabMenuContent");return e.select(n.dataset.name||""),void l.element(i,(()=>{i.reportValidity()}))}}))}}))}function d(){_.forEach((e=>{let t=!1;e.getContainers().forEach((i=>{t||null===i.querySelector(".formError")||(t=!0,e.select(i.id))}))}))}function u(e){v=!0,_.forEach((t=>{const i=t.getActiveTab();e?h(i.closest(".menu, .tabMenu")):g(i)}))}function p(){v=!1}function m(e,t,i,n,o,r){(r||t>0)&&(t-=15),i!==(t=t<0?0:Math.min(t,n-o))&&(e.classList.add("enableAnimation"),i<t?e.firstElementChild.style.setProperty("margin-left",i-t+"px",""):e.style.setProperty("padding-left",i-t+"px",""),setTimeout((()=>{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function h(e){if(!v)return;const t=e.clientWidth,i=e.querySelector("ul"),n=i.scrollLeft,o=i.scrollWidth,r=n>0;let a=e.querySelector(".tabMenuOverlayLeft");r?(null===a&&(a=document.createElement("button"),a.type="button",a.innerHTML='<fa-icon size="24" name="angle-left"></fa-icon>',a.className="tabMenuOverlayLeft",a.addEventListener("click",(()=>{const e=i.clientWidth;m(i,i.scrollLeft-~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");const s=t+n<o;let l=e.querySelector(".tabMenuOverlayRight");s?(null===l&&(l=document.createElement("button"),l.type="button",l.innerHTML='<fa-icon size="24" name="angle-right"></fa-icon>',l.className="tabMenuOverlayRight",l.addEventListener("click",(()=>{const e=i.clientWidth;m(i,i.scrollLeft+~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function f(e){return _.get(e)}function g(e){if(!v)return;const t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,o=t.scrollWidth;if(i===o)return;const r=e.offsetLeft;let a=!1;r<n&&(a=!0);let s=!1;if(!a){const t=i-(r-n);let o=e.clientWidth;null!==e.nextElementSibling&&(s=!0,o+=20),t<o&&(a=!0)}a&&m(t,r,n,o,i,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToTab=t.getTabMenu=t.setup=t.selectErroneousTabs=void 0,n=i.__importDefault(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);let b=null,v=!1;const _=new Map;t.selectErroneousTabs=d,t.setup=function(){c(),d(),n.default.add("WoltLabSuite/Core/Ui/TabMenu",c),a.default.add("WoltLabSuite/Core/Ui/TabMenu",(()=>{b&&(b.classList.remove("active"),b=null)})),s.on("screen-sm-down",{match(){u(!1)},unmatch:p,setup(){u(!0)}}),window.addEventListener("hashchange",(()=>{const e=r.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&_.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=r.default.getIdentifierFromHash();e&&window.setTimeout((()=>{const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const i=t.parentNode;let n=i.offsetTop-50;if(n<0&&(n=0),e>n){let e=o.default.offset(i).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=f,t.scrollToTab=g})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Environment","../Helper/PageOverlay","../Helper/Selector","./Alignment"],(function(e,t,i,n,o,r,a){"use strict";function s(e){const t=e.currentTarget;let i=t.title.trim();""!==i&&(t.dataset.tooltip=i,t.setAttribute("aria-label",i),t.removeAttribute("title")),i=t.dataset.tooltip||"",u.style.removeProperty("top"),u.style.removeProperty("left"),i.length?(u.classList.add("active"),d.textContent=i,a.set(u,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):u.classList.remove("active")}function l(){u.classList.remove("active")}let c,d,u;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),a=i.__importStar(a),t.setup=function(){"desktop"===n.platform()&&(u=document.createElement("div"),u.id="balloonTooltip",u.classList.add("balloonTooltip"),u.addEventListener("transitionend",(()=>{u.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{u.style.removeProperty(e)}))})),d=document.createElement("span"),d.id="balloonTooltipText",u.appendChild(d),c=document.createElement("span"),c.classList.add("elementPointer"),c.appendChild(document.createElement("span")),u.appendChild(c),(0,o.getPageOverlayContainer)().append(u),(0,r.wheneverSeen)(".jsTooltip",(e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),e.addEventListener("click",l))})),window.addEventListener("scroll",l))}})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o);class r{activeElement;description;elements=new Map;input;submitButton;init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const i=e.dataset.link;t=i?e=>{window.location.href=i.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((i=>{i.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,o.default.open(this);const i=e.dataset.pages||"0";this.input.value=i,this.input.max=i,this.input.select(),this.description.textContent=n.get("wcf.page.jumpTo.description").replace(/#pages#/,i)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),o.default.close(this)}_dialogSetup(){const e=`<dl>\n        <dt><label for="jsPaginationPageNo">${n.get("wcf.page.jumpTo")}</label></dt>\n                <dd>\n          <input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny">\n          <small></small>\n        </dd>\n      </dl>\n      <div class="formSubmit">\n        <button type="button" class="button buttonPrimary">${n.get("wcf.global.button.submit")}</button>\n      </div>`;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:n.get("wcf.global.page.pagination")},source:e}}}let a=null;t.init=function(e,t){(null===a&&(a=new r),a).init(e,t)}})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,i,n,o){"use strict";function r(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.activeElement,i=document.createElement("div");i.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",i),i.appendChild(e);const n=document.createElement("button");n.type="button",n.title=o.get("wcf.global.form.password.button.show"),n.classList.add("button","inputSuffix","jsTooltip"),n.setAttribute("aria-hidden","true"),i.appendChild(n);const r=document.createElement("fa-icon");r.setIcon("eye"),n.appendChild(r),n.addEventListener("click",(()=>{a(e,n,r)})),e.form?.addEventListener("submit",(()=>{"password"!==e.type&&a(e,n,r)})),t===e&&e.focus()}(e)}))}function a(e,t,i){"password"===e.type?(i.setIcon("eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.hide"),e.type="text"):(i.setIcon("eye"),t.dataset.tooltip=o.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new WeakSet;t.setup=function(){r(),n.default.add("WoltLabSuite/Core/Ui/Password",(()=>r()))}})),define("WoltLabSuite/Core/Ui/Empty",["require","exports","tslib","../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((e=>{e.classList.remove("jsReloadPageWhenEmpty"),r.observe(e,{childList:!0})}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n);const r=new MutationObserver((e=>{e.forEach((e=>{const t=e.target;(0===t.childElementCount||Array.from(t.children).every((e=>"ignore"===e.dataset.reloadPageWhenEmpty)))&&window.location.reload()}))}));t.setup=function(){o(),n.default.add("WoltLabSuite/Core/Ui/Empty",(()=>o()))}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,i,n,o,r){"use strict";function a(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r);class s{_active=!1;parameters;confirmButton;_content;dialog;text;callbackCancel;callbackConfirm;constructor(){this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.type="button",this.confirmButton.dataset.type="submit",this.confirmButton.classList.add("button","buttonPrimary"),this.confirmButton.textContent=o.get("wcf.global.confirmation.confirm"),e.appendChild(this.confirmButton);const t=document.createElement("button");t.type="button",t.classList.add("button"),t.textContent=o.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{r.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,r.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,r.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){window.setTimeout((()=>{this.confirmButton.blur(),this.confirmButton.focus()}),1)}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:o.get("wcf.global.confirmation.title")}}}_dialogSubmit(){this._confirm()}}let l;t.show=function(e){if(!a().active){if((e=n.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");a().open(e)}},t.getContentElement=function(){return a().content}})),define("WoltLabSuite/Core/Ui/Object/Action",["require","exports","tslib","../../Ajax","../../Event/Handler","../Confirmation","../../Language","../../StringUtil","../../Dom/Change/Listener"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(`${d} ${u} ${p}`).forEach((e=>{m.has(e)||(e.addEventListener("click",(e=>function(e){function t(){n.apiOnce({data:{actionName:l,className:c,objectIDs:[p],parameters:m},success:e=>function(e,t){"reload"===e.dataset.objectActionSuccess?window.location.reload():o.fire("WoltLabSuite/Core/Ui/Object/Action",e.dataset.objectAction,{containerElement:e.closest(d),data:t,objectElement:e.closest(u)})}(i,e)})}e.preventDefault();const i=e.currentTarget,l=i.dataset.objectAction;let c=i.closest(d).dataset.objectActionClassName;i.dataset.objectActionClassName&&(c=i.dataset.objectActionClassName);let p=i.closest(u).dataset.objectId;i.dataset.objectId&&(p=i.dataset.objectId);const m={};Object.entries(i.dataset).forEach((([e,t])=>{let i=/^objectActionParameterData(.+)/.exec(e);if(i)Object.prototype.hasOwnProperty.call(m,"data")||(m.data={}),m.data[s.lcfirst(i[1])]=t;else if(i=/^objectActionParameter(.+)/.exec(e),i){const e=s.lcfirst(i[1]);if("data"===e)throw new Error("Additional object action parameters may not use 'data' as key.");m[e]=t}})),i.dataset.confirmMessage?r.show({confirm:t,message:a.get(i.dataset.confirmMessage),messageIsHtml:!0}):t()}(e))),m.add(e))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importDefault(l);const d=".jsObjectActionContainer[data-object-action-class-name]",u=".jsObjectActionObject[data-object-id]",p=".jsObjectAction[data-object-action]",m=new Set;t.setup=function(){c(),l.default.add("WoltLabSuite/Core/Ui/Action",(()=>c()))}})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";function m(){return f||(f=new h),f}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),p=i.__importStar(p);class h{containers=new Map;editors=new Map;editorDropdowns=new Map;itemData=new WeakMap;knownCheckboxes=new WeakSet;pageClassNames=[];pageObjectId=0;reloadPageOnSuccess=new Map;setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),r.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=a.default.identify(e);let i=this.containers.get(t);if(void 0===i){const n=e.querySelector(".jsClipboardMarkAll");null!==n&&(n.dataset.containerId=t,n.addEventListener("click",(e=>this.markAll(e)))),i={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:n,markedObjectIds:new Set},this.containers.set(t,i)}Array.from(i.checkboxes).forEach((e=>{this.knownCheckboxes.has(e)||(e.dataset.containerId=t,null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e))}))}))}loadMarkedItems(){n.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,i="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,i);const n=[],o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type;Array.from(r.checkboxes).forEach((e=>{const o=~~e.dataset.objectId;i?e.checked||(e.checked=!0,r.markedObjectIds.add(o),n.push(o)):e.checked&&(e.checked=!1,r.markedObjectIds.delete(o),n.push(o)),this.setParentAsMarked(e,i);const a=t.closest(".jsClipboardObject");null!==a&&(i?a.classList.add("jsMarked"):a.classList.remove("jsMarked"))})),this.saveState(a,n,i)}mark(e){const t=e instanceof Event?e.currentTarget:e,i=~~t.dataset.objectId,n=t.checked,o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type,s=t.closest(".jsClipboardObject");n?(r.markedObjectIds.add(i),s.classList.add("jsMarked")):(r.markedObjectIds.delete(i),s.classList.remove("jsMarked")),null!==r.markAll&&(r.markAll.checked=!Array.from(r.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(r.markAll,n)),this.setParentAsMarked(t,t.checked),this.saveState(a,[i],n)}saveState(e,t,i){n.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=i.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:i,responseData:null})}const i=e.currentTarget,n=this.itemData.get(i);if(n.url)return void(window.location.href=n.url);const r="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"";let a=!0;if(o.isPlainObject(n.parameters)&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(r.length){const e="string"==typeof n.internalData.template?n.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const i=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[i]=e.value);break;case"SELECT":t[i]=e.value;break;case"TEXTAREA":t[i]=e.value.trim()}})),this.executeProxyAction(i,n,t)},message:r,template:e})}else this.executeProxyAction(i,n)}else r.length&&(a=!1,c.show({confirm:t,message:r}));a&&t()}executeProxyAction(e,t,i={}){const r="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],a={data:i};o.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{a[e]=t})),n.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:r,parameters:a},(i=>{if("unmarkAll"!==t.actionName){const n=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",n,{data:t,listItem:e,responseData:i});const o=this.reloadPageOnSuccess.get(n);if(o&&o.includes(i.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;n.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=o.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const i=e.element.dataset.type,n=Array.isArray(t[i])?t[i]:[];this.rebuildMarkings(e,n)}));const i=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{i.includes(t)||(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let n=!1,o=this.editors.get(e),r=this.editorDropdowns.get(e);void 0===o?(n=!0,o=document.createElement("a"),o.className="dropdownToggle",o.textContent=t.label,this.editors.set(e,o),r=document.createElement("ol"),r.className="dropdownMenu",this.editorDropdowns.set(e,r)):(o.textContent=t.label,r.innerHTML=""),Object.values(t.items).forEach((t=>{const i=document.createElement("li"),n=document.createElement("span");n.textContent=t.label,i.appendChild(n),r.appendChild(i),i.dataset.type=e,i.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(i,t)}));const a=document.createElement("li");a.classList.add("dropdownDivider"),r.appendChild(a);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),r.appendChild(s),-1!==i.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):(u.add(t,o),n=!0)}if(n){const e=o.parentElement;e.classList.add("dropdown"),e.appendChild(r),d.default.init(o)}}))}rebuildMarkings(e,t){let i=!0;if(Array.from(e.checkboxes).forEach((e=>{const n=e.closest(".jsClipboardObject"),o=t.includes(~~e.dataset.objectId);o||(i=!1),e.checked=o,o?n.classList.add("jsMarked"):n.classList.remove("jsMarked"),this.setParentAsMarked(e,o)})),null!==e.markAll){e.markAll.checked=i,this.setParentAsMarked(e.markAll,i);const t=e.markAll.closest(".columnMark")?.parentNode;t&&(i?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const i=e.parentElement;"checkbox"===i.getAttribute("role")&&i.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),p.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),p.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let f;t.setup=function(e){m().setup(e)},t.reload=function(){m().reload()},t.hideEditor=function(e){m().hideEditor(e)},t.showEditor=function(){m().showEditor()},t.unmark=function(e,t){m().unmark(e,t)}})),define("WoltLabSuite/Core/Ui/Object/Action/Handler",["require","exports","tslib","../../../Event/Handler","../../../Controller/Clipboard"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=i.__importStar(n),o=i.__importStar(o),t.default=class{objectAction;constructor(e,t,i){this.objectAction=i,n.add("WoltLabSuite/Core/Ui/Object/Action",e,(e=>this.handleObjectAction(e))),document.querySelectorAll(".jsClipboardContainer[data-type]").forEach((e=>{n.add("com.woltlab.wcf.clipboard",e.dataset.type,(e=>{null!==e.responseData&&-1!==t.indexOf(e.responseData.actionName)&&this.handleClipboardAction(e)}))}))}handleClipboardAction(e){const t=e.listItem.dataset.type;document.querySelectorAll(`.jsClipboardContainer[data-type="${t}"] .jsClipboardObject`).forEach((t=>{const i=t.dataset.objectId;e.responseData.objectIDs.forEach((n=>{~~n==~~i&&this.objectAction({containerElement:t.closest(".jsObjectActionContainer"),data:e.responseData,objectElement:t})}))}))}handleObjectAction(e){this.objectAction(e),o.reload()}}})),define("WoltLabSuite/Core/Ui/Object/Action/Delete",["require","exports","tslib","./Handler"],(function(e,t,i,n){"use strict";function o(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="delete"]');if(!t||t.dataset.objectActionHandler)return;const i=e.objectElement.querySelector(".jsObjectActionObjectChildren");i&&Array.from(i.children).forEach((t=>{e.objectElement.insertAdjacentElement("beforebegin",t)})),e.objectElement.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),t.setup=function(){new n.default("delete",["delete"],o)}})),define("WoltLabSuite/Core/Ui/Object/Action/Toggle",["require","exports","tslib","../../../Language","./Handler"],(function(e,t,i,n,o){"use strict";function r(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="toggle"]');if(!t||t.dataset.objectActionHandler)return;const i="FA-ICON"===t.nodeName?t:t.querySelector("fa-icon");if(i)if("square"===i.name){i.setIcon("square-check");const e=t.dataset.disableTitle||n.get("wcf.global.button.disable");t.title=e}else{i.setIcon("square");const e=t.dataset.enableTitle||n.get("wcf.global.button.enable");t.title=e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),t.setup=function(){new o.default("toggle",["enable","disable"],r)}})),define("WoltLabSuite/Core/Ui/Search",["require","exports","tslib","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Simple","./Screen","../Environment","../Dom/Util"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";function d(){r.default.execute(r.Origin.Search),f.classList.add("searchBarOpen"),y?.parentElement.classList.add("open"),m||o.set(b,w,{horizontal:"right"}),b.style.setProperty("top",`${g.clientHeight}px`,""),_.focus(),window.setTimeout((()=>{const e=_.value.length;_.selectionStart=e,_.selectionEnd=e}),1)}function u(){if(!f.classList.contains("searchBarOpen")&&!b.classList.contains("open"))return;f.classList.remove("searchBarOpen"),b.classList.remove("open"),y?.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{b.style.removeProperty(e)})),"ios"===l.platform()&&(s.scrollEnable(),void 0!==p&&(document.body.scrollTop=p,p=void 0)),m&&_.blur();const e=document.getElementById("pageHeaderSearchMobile");e&&(e.setAttribute("aria-expanded","false"),e.querySelector("fa-icon").setIcon("magnifying-glass"));const t=b.querySelector(".pageHeaderSearchType");a.default.close(t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);let p,m=!1;const h=document.body.classList.contains("wcfAcp"),f=document.getElementById("pageHeader"),g=document.getElementById("pageHeaderPanel"),b=document.getElementById("pageHeaderSearch");let v;const _=document.getElementById("pageHeaderSearchInput"),w=document.getElementById("topMenu"),y=document.getElementById("userPanelSearchButton");t.init=function(){h&&null===b||(function(){b.addEventListener("click",(e=>e.stopPropagation()));const e=document.querySelector(".pageHeaderSearchType"),t=(0,c.identify)(e);a.default.getDropdownMenu(t).addEventListener("click",(e=>{e.stopPropagation(),a.default.close(t)})),y?.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),f.classList.contains("searchBarOpen")?u():d()})),r.default.add("WoltLabSuite/Core/Ui/Search",((e,t)=>{if(e!==r.Origin.Search){if(e===r.Origin.DropDown){if(document.getElementById("pageHeaderSearchTypeSelect").dataset.target===t)return;if(_.parentElement.id===t)return}u(),v?.setAttribute("aria-expanded","false")}}))}(),s.on("screen-md-down",{match(){m=!0},unmatch(){m=!1,p=void 0},setup(){m=!0,function(){const e=document.getElementById("pageHeaderSearchMobile");v=e,e.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"true"===e.getAttribute("aria-expanded")?u():("ios"===l.platform()&&(p=document.body.scrollTop,s.scrollDisable()),d(),b.style.setProperty("top",`${f.offsetHeight}px`,""),b.classList.add("open"),_.focus(),"ios"===l.platform()&&(document.body.scrollTop=0),e.setAttribute("aria-expanded","true"),e.querySelector("fa-icon").setIcon("xmark"))})),b.addEventListener("click",(e=>{e.stopPropagation(),e.target===b&&(e.preventDefault(),u())}))}()}}),n.add("com.woltlab.wcf.Search","close",(()=>u())))}})),define("WoltLabSuite/Core/LazyLoader",["require","exports"],(function(e,t){"use strict";function i(e){void 0!==r.get(e)&&window.cancelAnimationFrame(r.get(e)),r.set(e,window.requestAnimationFrame((()=>{for(const t of o.keys())if(e.matches(t)||null!==e.querySelector(t)){for(const e of o.get(t))a.then((()=>e()));o.delete(t)}r.delete(e)})))}let n;Object.defineProperty(t,"__esModule",{value:!0}),t.whenFirstSeen=void 0;const o=new Map,r=new Map,a=new Promise((e=>{"loading"===document.readyState?document.addEventListener("readystatechange",(()=>e()),{once:!0}):e()}));t.whenFirstSeen=function(e,t){o.has(e)||o.set(e,[]),o.get(e).push(t),i(document.body),void 0===n&&(n=new MutationObserver((e=>{if(0!==o.size)for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&i(e)}))),n.observe(document,{subtree:!0,childList:!0})}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(e=e||self).PerfectScrollbar=t()}(this,(function(){"use strict";function e(e){return getComputedStyle(e)}function t(e,t){var i,n;for(i in t)"number"==typeof(n=t[i])&&(n+="px"),e.style[i]=n;return e}function i(e){var t=document.createElement("div");return t.className=e,t}function n(e,t){if(!v)throw new Error("No element matching method supported");return v.call(e,t)}function o(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function r(e,t){return Array.prototype.filter.call(e.children,(function(e){return n(e,t)}))}function a(e,t){var i=e.element.classList,n=_.state.scrolling(t);i.contains(n)?clearTimeout(w[t]):i.add(n)}function s(e,t){w[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(_.state.scrolling(t))}),e.settings.scrollingThreshold)}function l(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function c(e,t,i,n,o){var r;if(void 0===n&&(n=!0),void 0===o&&(o=!1),"top"===t)r=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");r=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,i,n,o){var r,c=i[0],d=i[1],u=i[2],p=i[3],m=i[4],h=i[5];void 0===n&&(n=!0),void 0===o&&(o=!1),r=e.element,e.reach[p]=null,r[u]<1&&(e.reach[p]="start"),r[u]>e[c]-e[d]-1&&(e.reach[p]="end"),t&&(r.dispatchEvent(l("ps-scroll-"+p)),t<0?r.dispatchEvent(l("ps-scroll-"+m)):t>0&&r.dispatchEvent(l("ps-scroll-"+h)),n&&function(e,t){a(e,t),s(e,t)}(e,p)),e.reach[p]&&(t||o)&&r.dispatchEvent(l("ps-"+p+"-reach-"+e.reach[p]))}(e,i,r,n,o)}function d(e){return parseInt(e,10)||0}function u(e){var i=e.element,n=Math.floor(i.scrollTop),a=i.getBoundingClientRect();e.containerWidth=Math.round(a.width),e.containerHeight=Math.round(a.height),e.contentWidth=i.scrollWidth,e.contentHeight=i.scrollHeight,i.contains(e.scrollbarXRail)||(r(i,_.element.rail("x")).forEach((function(e){return o(e)})),i.appendChild(e.scrollbarXRail)),i.contains(e.scrollbarYRail)||(r(i,_.element.rail("y")).forEach((function(e){return o(e)})),i.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=p(e,d(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=d((e.negativeScrollAdjustment+i.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=p(e,d(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=d(n*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,i){var n,o={width:i.railXWidth},r=Math.floor(e.scrollTop);i.isRtl?o.left=i.negativeScrollAdjustment+e.scrollLeft+i.containerWidth-i.contentWidth:o.left=e.scrollLeft,i.isScrollbarXUsingBottom?o.bottom=i.scrollbarXBottom-r:o.top=i.scrollbarXTop+r,t(i.scrollbarXRail,o),n={top:r,height:i.railYHeight},i.isScrollbarYUsingRight?i.isRtl?n.right=i.contentWidth-(i.negativeScrollAdjustment+e.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth-9:n.right=i.scrollbarYRight-e.scrollLeft:i.isRtl?n.left=i.negativeScrollAdjustment+e.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:n.left=i.scrollbarYLeft+e.scrollLeft,t(i.scrollbarYRail,n),t(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),t(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}(i,e),e.scrollbarXActive?i.classList.add(_.state.active("x")):(i.classList.remove(_.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,i.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?i.classList.add(_.state.active("y")):(i.classList.remove(_.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,i.scrollTop=0)}function p(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 m(e,t){function i(t){t.touches&&t.touches[0]&&(t[c]=t.touches[0].pageY),b[h]=v+y*(t[c]-w),a(e,f),u(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function n(){s(e,f),e[g].classList.remove(_.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",i)}function o(t,o){v=b[h],o&&t.touches&&(t[c]=t.touches[0].pageY),w=t[c],y=(e[l]-e[r])/(e[d]-e[m]),o?e.event.bind(e.ownerDocument,"touchmove",i):(e.event.bind(e.ownerDocument,"mousemove",i),e.event.once(e.ownerDocument,"mouseup",n),t.preventDefault()),e[g].classList.add(_.state.clicking),t.stopPropagation()}var r=t[0],l=t[1],c=t[2],d=t[3],p=t[4],m=t[5],h=t[6],f=t[7],g=t[8],b=e.element,v=null,w=null,y=null;e.event.bind(e[p],"mousedown",(function(e){o(e)})),e.event.bind(e[p],"touchstart",(function(e){o(e,!0)}))}var h,f,g,b,v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),_={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},w={x:null,y:null},y=function(e){this.element=e,this.handlers={}},E={isEmpty:{configurable:!0}};return y.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,{passive:!1})},y.prototype.unbind=function(e,t){var i=this;this.handlers[e]=this.handlers[e].filter((function(n){return!(!t||n===t)||(i.element.removeEventListener(e,n,!1),!1)}))},y.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},E.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(y.prototype,E),(h=function(){this.eventElements=[]}).prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new y(e),this.eventElements.push(t)),t},h.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},h.prototype.unbind=function(e,t,i){var n=this.eventElement(e);n.unbind(t,i),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)},h.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},h.prototype.once=function(e,t,i){var n=this.eventElement(e),o=function(e){n.unbind(t,o),i(e)};n.bind(t,o)},f={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},g={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var i=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=i*e.containerHeight,u(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var i=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=i*e.containerWidth,u(e),t.stopPropagation()}))},"drag-thumb":function(e){m(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),m(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(i){var o,r,a,s;if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&(n(t,":hover")||n(e.scrollbarX,":focus")||n(e.scrollbarY,":focus"))){if(o=document.activeElement?document.activeElement:e.ownerDocument.activeElement){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(n(s=o,"input,[contenteditable]")||n(s,"select,[contenteditable]")||n(s,"textarea,[contenteditable]")||n(s,"button,[contenteditable]"))return}switch(r=0,a=0,i.which){case 37:r=i.metaKey?-e.contentWidth:i.altKey?-e.containerWidth:-30;break;case 38:a=i.metaKey?e.contentHeight:i.altKey?e.containerHeight:30;break;case 39:r=i.metaKey?e.contentWidth:i.altKey?e.containerWidth:30;break;case 40:a=i.metaKey?-e.contentHeight:i.altKey?-e.containerHeight:-30;break;case 32:a=i.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:a=e.containerHeight;break;case 34:a=-e.containerHeight;break;case 36:a=e.contentHeight;break;case 35:a=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==r||e.settings.suppressScrollY&&0!==a||(t.scrollTop-=a,t.scrollLeft+=r,u(e),function(i,n){var o,r=Math.floor(t.scrollTop);if(0===i){if(!e.scrollbarYActive)return!1;if(0===r&&n>0||r>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}if(o=t.scrollLeft,0===n){if(!e.scrollbarXActive)return!1;if(0===o&&i<0||o>=e.contentWidth-e.containerWidth&&i>0)return!e.settings.wheelPropagation}return!0}(r,a)&&i.preventDefault())}}))},wheel:function(t){function i(i){var o,r=function(e){var t=e.deltaX,i=-1*e.deltaY;return void 0!==t&&void 0!==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),e.shiftKey?[-i,-t]:[t,i]}(i),a=r[0],s=r[1];(function(t,i,o){var r,a,s,l;if(!f.isWebKit&&n.querySelector("select:focus"))return!0;if(!n.contains(t))return!1;for(r=t;r&&r!==n;){if(r.classList.contains(_.element.consuming))return!0;if(a=e(r),o&&a.overflowY.match(/(scroll|auto)/)&&(s=r.scrollHeight-r.clientHeight)>0&&(r.scrollTop>0&&o<0||r.scrollTop<s&&o>0))return!0;if(i&&a.overflowX.match(/(scroll|auto)/)&&(l=r.scrollWidth-r.clientWidth)>0&&(r.scrollLeft>0&&i<0||r.scrollLeft<l&&i>0))return!0;r=r.parentNode}return!1})(i.target,a,s)||(o=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?n.scrollTop-=s*t.settings.wheelSpeed:n.scrollTop+=a*t.settings.wheelSpeed,o=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(a?n.scrollLeft+=a*t.settings.wheelSpeed:n.scrollLeft-=s*t.settings.wheelSpeed,o=!0):(n.scrollTop-=s*t.settings.wheelSpeed,n.scrollLeft+=a*t.settings.wheelSpeed),u(t),o=o||function(e,i){var o=Math.floor(n.scrollTop),r=0===n.scrollTop,a=o+n.offsetHeight===n.scrollHeight,s=0===n.scrollLeft,l=n.scrollLeft+n.offsetWidth===n.scrollWidth;return!(Math.abs(i)>=Math.abs(e)?r&&i>0||a&&i<0:s&&e>0||l&&e<0)||!t.settings.wheelPropagation}(a,s),o&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault()))}var n=t.element;void 0!==window.onwheel?t.event.bind(n,"wheel",i):void 0!==window.onmousewheel&&t.event.bind(n,"mousewheel",i)},touch:function(t){function i(e,i){l.scrollTop-=i,l.scrollLeft-=e,u(t)}function n(e){return e.targetTouches?e.targetTouches[0]:e}function o(e){return!(e.pointerType&&"pen"===e.pointerType&&0===e.buttons||(!e.targetTouches||1!==e.targetTouches.length)&&(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function r(e){if(o(e)){var t=n(e);c.pageX=t.pageX,c.pageY=t.pageY,d=(new Date).getTime(),null!==m&&clearInterval(m)}}function a(r){var a,s,u,m,h,g;if(o(r)){if(u=(s={pageX:(a=n(r)).pageX,pageY:a.pageY}).pageX-c.pageX,m=s.pageY-c.pageY,function(t,i,n){var o,r,a,s;if(!l.contains(t))return!1;for(o=t;o&&o!==l;){if(o.classList.contains(_.element.consuming))return!0;if(r=e(o),n&&r.overflowY.match(/(scroll|auto)/)&&(a=o.scrollHeight-o.clientHeight)>0&&(o.scrollTop>0&&n<0||o.scrollTop<a&&n>0))return!0;if(i&&r.overflowX.match(/(scroll|auto)/)&&(s=o.scrollWidth-o.clientWidth)>0&&(o.scrollLeft>0&&i<0||o.scrollLeft<s&&i>0))return!0;o=o.parentNode}return!1}(r.target,u,m))return;i(u,m),c=s,(g=(h=(new Date).getTime())-d)>0&&(p.x=u/g,p.y=m/g,d=h),function(e,i){var n=Math.floor(l.scrollTop),o=l.scrollLeft,r=Math.abs(e),a=Math.abs(i);if(a>r){if(i<0&&n===t.contentHeight-t.containerHeight||i>0&&0===n)return 0===window.scrollY&&i>0&&f.isChrome}else if(r>a&&(e<0&&o===t.contentWidth-t.containerWidth||e>0&&0===o))return!0;return!0}(u,m)&&r.preventDefault()}}function s(){t.settings.swipeEasing&&(clearInterval(m),m=setInterval((function(){t.isInitialized?clearInterval(m):p.x||p.y?Math.abs(p.x)<.01&&Math.abs(p.y)<.01?clearInterval(m):t.element?(i(30*p.x,30*p.y),p.x*=.8,p.y*=.8):clearInterval(m):clearInterval(m)}),10))}var l,c,d,p,m;(f.supportsTouch||f.supportsIePointer)&&(l=t.element,c={},d=0,p={},m=null,f.supportsTouch?(t.event.bind(l,"touchstart",r),t.event.bind(l,"touchmove",a),t.event.bind(l,"touchend",s)):f.supportsIePointer&&(window.PointerEvent?(t.event.bind(l,"pointerdown",r),t.event.bind(l,"pointermove",a),t.event.bind(l,"pointerup",s)):window.MSPointerEvent&&(t.event.bind(l,"MSPointerDown",r),t.event.bind(l,"MSPointerMove",a),t.event.bind(l,"MSPointerUp",s))))}},(b=function(n,o){var r,a,s,l,c,p,m,f=this;if(void 0===o&&(o={}),"string"==typeof n&&(n=document.querySelector(n)),!n||!n.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(r in this.element=n,n.classList.add(_.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},o)this.settings[r]=o[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null,a=function(){return n.classList.add(_.state.focus)},s=function(){return n.classList.remove(_.state.focus)},this.isRtl="rtl"===e(n).direction,!0===this.isRtl&&n.classList.add(_.rtl),this.isNegativeScroll=(p=n.scrollLeft,null,n.scrollLeft=-1,m=n.scrollLeft<0,n.scrollLeft=p,m),this.negativeScrollAdjustment=this.isNegativeScroll?n.scrollWidth-n.clientWidth:0,this.event=new h,this.ownerDocument=n.ownerDocument||document,this.scrollbarXRail=i(_.element.rail("x")),n.appendChild(this.scrollbarXRail),this.scrollbarX=i(_.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null,l=e(this.scrollbarXRail),this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=d(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=d(l.borderLeftWidth)+d(l.borderRightWidth),t(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=d(l.marginLeft)+d(l.marginRight),t(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=i(_.element.rail("y")),n.appendChild(this.scrollbarYRail),this.scrollbarY=i(_.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null,c=e(this.scrollbarYRail),this.scrollbarYRight=parseInt(c.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=d(c.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var i=e(t);return d(i.width)+d(i.paddingLeft)+d(i.paddingRight)+d(i.borderLeftWidth)+d(i.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=d(c.borderTopWidth)+d(c.borderBottomWidth),t(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=d(c.marginTop)+d(c.marginBottom),t(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:n.scrollLeft<=0?"start":n.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:n.scrollTop<=0?"start":n.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return g[e](f)})),this.lastScrollTop=Math.floor(n.scrollTop),this.lastScrollLeft=n.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return f.onScroll(e)})),u(this)}).prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,t(this.scrollbarXRail,{display:"block"}),t(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=d(e(this.scrollbarXRail).marginLeft)+d(e(this.scrollbarXRail).marginRight),this.railYMarginHeight=d(e(this.scrollbarYRail).marginTop)+d(e(this.scrollbarYRail).marginBottom),t(this.scrollbarXRail,{display:"none"}),t(this.scrollbarYRail,{display:"none"}),u(this),c(this,"top",0,!1,!0),c(this,"left",0,!1,!0),t(this.scrollbarXRail,{display:""}),t(this.scrollbarYRail,{display:""}))},b.prototype.onScroll=function(e){this.isAlive&&(u(this),c(this,"top",this.element.scrollTop-this.lastScrollTop),c(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},b.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},b.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")},b})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Form/XsrfToken","./Language","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password","./Ui/Empty","./Ui/Object/Action","./Ui/Object/Action/Delete","./Ui/Object/Action/Toggle","./Ui/Search","./LazyLoader","./Helper/PageOverlay","perfect-scrollbar"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f,g,b,v,_,w,y,E,S,L,C){"use strict";function k(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importDefault(u),p=i.__importDefault(p),m=i.__importStar(m),h=i.__importStar(h),f=i.__importStar(f),g=i.__importStar(g),b=i.__importStar(b),v=i.__importStar(v),_=i.__importStar(_),w=i.__importStar(w),y=i.__importStar(y),E=i.__importStar(E),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=l,t.setup=function(t){t=n.extend({colorScheme:"light",enableMobileMenu:!0,pageMenuMainProvider:void 0},t),c.setup(),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),(0,C.adoptPageOverlayContainer)(document.body),s.setup(),o.default.init(),p.default.setup(),m.setup(t.enableMobileMenu,t.pageMenuMainProvider),f.setup(),u.default.setup(),g.setup(),v.setup(),_.setup(),w.setup(),y.setup(),E.setup(),(0,S.init)(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===s.browser()&&(window.onbeforeunload=()=>{});let l=0;l=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(l),window.jQuery((()=>{h.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==s.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),window.requestAnimationFrame((()=>{const e=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.setProperty("--scrollbar-width",`${e}px`)})),k(),a.default.add("WoltLabSuite/Core/Bootstrap",(()=>k)),t.dynamicColorScheme&&new Promise(((t,i)=>{e(["./Controller/Style/ColorScheme"],t,i)})).then(i.__importStar).then((({setup:e})=>{e()})),(0,L.whenFirstSeen)("[data-report-content]",(()=>{new Promise(((t,i)=>{e(["./Ui/Moderation/Report"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,L.whenFirstSeen)("woltlab-core-pagination",(()=>{new Promise(((t,i)=>{e(["./Ui/Pagination/JumpToPage"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,L.whenFirstSeen)("woltlab-core-google-maps",(()=>{new Promise(((t,i)=>{e(["./Component/GoogleMaps/woltlab-core-google-maps"],t,i)})).then(i.__importStar)})),(0,L.whenFirstSeen)("[data-google-maps-geocoding]",(()=>{new Promise(((t,i)=>{e(["./Component/GoogleMaps/Geocoding"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes){if(!(e instanceof HTMLElement))continue;if(null===e.querySelector(".g-recaptcha-bubble-arrow"))continue;const t=e.querySelector("iframe");if(!t)continue;const i="a-"+t.name.split("-")[1],n=document.querySelector(`iframe[name="${i}"]`);n&&(n.closest("woltlab-core-dialog")&&((0,C.getPageOverlayContainer)().append(e),e.classList.add("g-recaptcha-container")))}})).observe(document.body,{childList:!0})}})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.ajaxApi=t.setContent=t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent);const e=document.createElement("span");e.className="elementPointer",e.appendChild(document.createElement("span")),this.popover.appendChild(e),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((i=>{const n=r.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;i.dataset.cacheId=a,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(i);a.childElementCount||(a=r.default.createFragmentFromHtml("<p>"+i+"</p>")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}resetCache(e,t){const i=`${e}-${t}`;this.cache.has(i)&&this.cache.set(i,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},i,i)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{pointer:!0,vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)},t.resetCache=function(e,t){l().resetCache(e,t)}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){for(let e=0,t=a.length;e<t;e++){const t=a[e];s.has(t)||(t.addEventListener("click",r,{once:!0}),s.add(t))}}function r(e){e.preventDefault();const t=e.currentTarget;t.classList.remove("ignoredUserMessage"),s.delete(t),window.getSelection().removeAllRanges()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importDefault(n);const a=document.getElementsByClassName("ignoredUserMessage"),s=new Set;t.init=function(){o(),n.default.add("WoltLabSuite/Core/Ui/User/Ignore",o)}})),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["require","exports","tslib","../../../Environment","../../../Language","../../Screen"],(function(e,t,i,n,o,r){"use strict";function a(){f=!0,"safari"===n.browser()?window.setTimeout(c,1e3):window.requestAnimationFrame((()=>c()))}function s(){f=!1}function l(e){g=Math.min(g+e,0),m.style.setProperty("margin-left",`${g}px`,"")}function c(){if(!f)return;b=[],v=[];const e=h.clientWidth,t=h.scrollWidth;!p&&t>e&&(u=document.createElement("a"),u.className="mainMenuShowNext",u.href="#",u.innerHTML='<fa-icon size="32" name="angle-right" solid></fa-icon>',u.setAttribute("aria-hidden","true"),u.addEventListener("click",(e=>{e.preventDefault(),function(){if(v.length){const e=v.slice(0,3).pop();l(h.clientWidth-(e.offsetLeft+e.clientWidth)),h.lastElementChild===e&&u.classList.remove("active"),p.classList.add("active")}}()})),h.insertAdjacentElement("beforebegin",u),p=document.createElement("a"),p.className="mainMenuShowPrevious",p.href="#",p.innerHTML='<fa-icon size="32" name="angle-left" solid></fa-icon>',p.setAttribute("aria-hidden","true"),p.addEventListener("click",(e=>{e.preventDefault(),function(){if(b.length){const e=b.slice(-3)[0];l(-1*e.offsetLeft),h.firstElementChild===e&&p.classList.remove("active"),u.classList.add("active")}}()})),h.insertAdjacentElement("afterend",p)),(t>e||g<0)&&Array.from(h.children).forEach((t=>{const i=t.offsetLeft;i<0?b.push(t):i+t.clientWidth>e&&v.push(t)})),p?.classList[b.length?"add":"remove"]("active"),u?.classList[v.length?"add":"remove"]("active")}function d(){m.addEventListener("transitionend",c),new ResizeObserver((()=>{m.style.setProperty("margin-left","0px",""),g=0,c()})).observe(h),a(),h.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const i=document.createElement("button");i.type="button",i.className="visuallyHidden",i.setAttribute("aria-label",o.get("wcf.global.button.showMenu")),e.insertBefore(i,t.nextSibling);let n=!1;i.addEventListener("click",(()=>{n=!n,t.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-label",o.get(n?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);let u,p,m,h,f=!1,g=0,b=[],v=[];t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");h=e,m=t,r.on("screen-lg",{match:a,unmatch:s,setup:d})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class i{userId;username;link;constructor(e,t,i){this.userId=e,this.username=t,this.link=i}}let n;return{getLink:()=>n.link,init(e,t,o){if(n)throw new Error("User has already been initialized.");n=new i(e,t,o)},get userId(){return n.userId},get username(){return n.username}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importDefault(s),l=i.__importDefault(l);class c{enableAll=!1;constructor(){"all"===window.sessionStorage.getItem(`${r.getStoragePrefix()}user-consent`)&&(this.enableAll=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){this.enableAll?this.enableAllExternalMedia():(0,n.wheneverFirstSeen)(".jsButtonMessageUserConsentEnable",(e=>{e.addEventListener("click",(e=>this.click(e)))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),l.default.userId?o.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${r.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){if(e.dataset.target)document.getElementById(e.dataset.target).hidden=!1;else{const t=atob(e.dataset.payload);s.default.insertHtml(t,e,"before")}e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let d;t.init=function(){d||(d=new c)}})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function i(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyElementTextToClipboard=t.copyTextToClipboard=void 0,t.copyTextToClipboard=i,t.copyElementTextToClipboard=async function(e){return i(e.textContent.replace(/\u200B/g,"").replace(/\u00A0/g," "))}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","../Helper/PageOverlay","../Language"],(function(e,t,i,n){"use strict";function o(){clearTimeout(s),a.classList.remove("active"),null!==c&&c(),l=!1}Object.defineProperty(t,"__esModule",{value:!0}),t.show=void 0;let r,a,s,l=!1,c=null,d=!1;t.show=function(e,t,u){l||(l=!0,d||(d=!0,a=document.createElement("div"),a.id="systemNotification",r=document.createElement("p"),r.addEventListener("click",o),a.appendChild(r),(0,i.getPageOverlayContainer)().appendChild(a)),c="function"==typeof t?t:null,r.className=u||"success",r.textContent=(0,n.getPhrase)(e||"wcf.global.success"),a.classList.add("active"),s=window.setTimeout(o,2e3))}})),define("WoltLabSuite/Core/Ui/Message/Share/Providers",["require","exports"],(function(e,t){"use strict";function i(e){n.add(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getShareProviders=t.addShareProviders=t.addShareProvider=void 0;const n=new Set;t.addShareProvider=i,t.addShareProviders=function(e){e.forEach((e=>i(e)))},t.getShareProviders=function(){return n}})),define("WoltLabSuite/Core/Ui/Message/Share/Dialog",["require","exports","tslib","../../../Dom/Traverse","../../../Clipboard","../../Notification","../../../StringUtil","../../../Dom/Change/Listener","./Providers","../../../Component/Dialog","WoltLabSuite/Core/Language","../../../Event/Handler"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";function p(e,t){return`\n    <dl>\n      <dt>${(0,d.getPhrase)(e)}</dt>\n      <dd>\n        <div class="inputAddon">\n          <input type="text" class="long" readonly value="${a.escapeHTML(t)}">\n          <button type="button" class="inputSuffix button jsTooltip shareDialogCopyButton" title="${(0,d.getPhrase)("wcf.message.share.copy")}">\n            <fa-icon name="copy"></fa-icon>\n          </button>\n        </div>\n      </dd>\n    </dl>\n  `}function m(e){e.preventDefault();const t=e.currentTarget,i=f(t),s=function(){const e=Array.from((0,l.getShareProviders)()).map((e=>{const[t,i,n]=e;return`\n      <li>\n        <button type="button" class="button small messageShareProvider" title="${i}" aria-label="${i}" data-identifier="${t}">\n          ${n}\n        </button>\n      </li>\n    `})).join("\n");return e?`<ul class="inlineList">${e}</ul>`:""}();let m="";s&&(m=`\n        <dl class="messageShareButtons jsMessageShareButtons" data-url="${a.escapeHTML(i)}">\n          <dt>${(0,d.getPhrase)("wcf.message.share.socialMedia")}</dt>\n          <dd>${s}</dd>\n        </dl>\n      `);let h="";_&&(h=`\n        <dl>\n          <dt></dt>\n          <dd>\n              <button type="button" class="button shareDialogNativeButton" data-url="${a.escapeHTML(i)}" data-title="${a.escapeHTML(t.dataset.linkTitle||"")}">\n                ${(0,d.getPhrase)("wcf.message.share.nativeShare")}\n              </button>\n          </dd>\n        </dl>\n      `);const v=`\n      <div class="shareContentDialog">\n        ${function(e){let t=p("wcf.message.share.permalink",f(e));return function(e){const t={bbcodes:[]},i=new CustomEvent("share:bbcodes",{cancelable:!0,detail:t}),n=f(e);return e.dispatchEvent(i),i.defaultPrevented?t.bbcodes:e.dataset.bbcode?[["wcf.message.share.permalink.bbcode",e.dataset.bbcode]]:n&&e.dataset.linkTitle?[["wcf.message.share.permalink.bbcode",`[url='${n}']${e.dataset.linkTitle}[/url]`]]:[]}(e).forEach((([e,i])=>{t+=p(e,i)})),function(e){const t={permalinkHtml:[]},i=new CustomEvent("share:permalink-html",{cancelable:!0,detail:t}),n=f(e);return e.dispatchEvent(i),i.defaultPrevented?t.permalinkHtml:n&&e.dataset.linkTitle?[["wcf.message.share.permalink.html",`<a href="${a.escapeHTML(n)}">${a.escapeHTML(e.dataset.linkTitle)}</a>`]]:[]}(e).forEach((([e,i])=>{t+=p(e,i)})),t}(t)}\n        ${m}\n        ${h}\n      </div>\n    `,w=(0,c.dialogFactory)().fromHtml(v).withoutControls();w.content.querySelectorAll(".shareDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,i=n.prevBySel(t,'input[type="text"]');await o.copyTextToClipboard(i.value),r.show((0,d.getPhrase)("wcf.message.share.copy.success"))}(e))))),_&&w.content.querySelector(".shareDialogNativeButton").addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,i={url:t.dataset.url};t.dataset.title&&(i.title=t.dataset.title),await window.navigator.share(i)}(e))),s&&function(e,t){const i={facebook:{selector:'.messageShareProvider[data-identifier="Facebook"]',share(){g("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{selector:'.messageShareProvider[data-identifier="Reddit"]',share(){g("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{selector:'.messageShareProvider[data-identifier="Twitter"]',share(){g("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{selector:'.messageShareProvider[data-identifier="LinkedIn"]',share(){g("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{selector:'.messageShareProvider[data-identifier="Pinterest"]',share(){g("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{selector:'.messageShareProvider[data-identifier="XING"]',share(){g("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{selector:'.messageShareProvider[data-identifier="WhatsApp"]',share(){window.location.href="https://api.whatsapp.com/send?text="+b()+"%20"+t}}};u.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:i,pageDescription:b(),pageUrl:t}),Object.values(i).forEach((t=>{e.querySelector(t.selector)?.addEventListener("click",(()=>t.share()))}))}(w.content,i),w.show((0,d.getPhrase)("wcf.message.share"))}function h(){document.querySelectorAll(".shareButton, .wsShareButton").forEach((e=>{v.has(e)||(e.addEventListener("click",(e=>m(e))),v.add(e))}))}function f(e){return e instanceof HTMLAnchorElement?e.href:e.dataset.link}function g(e,t,i,n){window.open(t.replace("{pageURL}",n).replace("{text}",b()+(i?`%20${n}`:"")),e,"height=600,width=600")}function b(){const e=document.querySelector('meta[property="og:title"]');return null!==e?encodeURIComponent(e.content):""}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),u=i.__importStar(u);const v=new WeakSet,_=void 0!==window.navigator.share;t.setup=function(){h(),s.default.add("WoltLabSuite/Core/Ui/Message/Share/Dialog",(()=>h()))}})),define("WoltLabSuite/Core/Ui/Feed/Dialog",["require","exports","tslib","../Dialog","../../StringUtil","../../Language","../../Clipboard","../Notification"],(function(e,t,i,n,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),t.setup=function(){document.querySelectorAll("a.rssFeed").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget,i=t.href,l=i.replace(/(\\?|&)at=[^&]*&?/,"$1").replace(/(\?|&)$/,"");n.default.openStatic("feedLinkDialog",`\n<p class="info">${r.get("wcf.global.rss.accessToken.info")}</p>\n<dl>\n  <dt>${r.get("wcf.global.rss.withoutAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${o.escapeHTML(l)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </button>\n    </div>\n  </dd>\n</dl>\n<dl>\n  <dt>${r.get("wcf.global.rss.withAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${o.escapeHTML(i)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </a>\n    </div>\n  </dd>\n</dl>\n`,{onShow(e){e.querySelectorAll(".feedLinkDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget.parentNode.querySelector('input[type="text"]');await a.copyTextToClipboard(t.value),s.show(r.get("wcf.global.rss.copy.success"))}(e)))))},title:t.title||r.get("wcf.global.button.rss")})}(e)))}))}})),define("WoltLabSuite/Core/Ui/Page/Menu/Main/Frontend",["require","exports"],(function(e,t){"use strict";function i(e,t){const n=e.querySelector(".boxMenuLink"),o=n.querySelector(".boxMenuLinkTitle").textContent;let r=0;const a=n.querySelector(".boxMenuLinkOutstandingItems");a&&(r=parseInt(a.textContent.replace(/[^0-9]/,""),10));const s=e.querySelector("ol");let l=[];if(s instanceof HTMLOListElement){let e=t;e<3&&(e=t+1),l=Array.from(s.children).map((t=>i(t,e)))}const c=n.getAttribute("href");let d,u;return c&&"#"!==c&&(d=n.href,"_blank"===n.target&&(u=!0)),{active:e.classList.contains("active"),children:l,counter:r,depth:t,identifier:n.parentElement.dataset.identifier,link:d,openInNewWindow:u,title:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.UiPageMenuMainFrontend=void 0;class n{getMenuItems(e){return Array.from(e.children).map((e=>i(e,0)))}}t.UiPageMenuMainFrontend=n,t.default=n})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Controller/Popover","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent","./Ui/Message/Share/Dialog","./Ui/Message/Share/Providers","./Ui/Feed/Dialog","./User","./Ui/Page/Menu/Main/Frontend","./LazyLoader","./Ajax/Backend"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),u=i.__importStar(u),p=i.__importDefault(p),m=i.__importDefault(m),t.setup=function(t){t.backgroundQueue.url=window.WSC_API_URL+t.backgroundQueue.url.substr(window.WCF_PATH.length),o.setup({dynamicColorScheme:t.dynamicColorScheme,enableMobileMenu:!0,pageMenuMainProvider:new m.default}),s.init(),t.styleChanger&&new Promise(((t,i)=>{e(["./Controller/Style/Changer"],t,i)})).then(i.__importStar).then((e=>{e.setup()})),t.enableUserPopover&&(r.init({className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user"}),r.init({attributeName:"data-user-id",className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user.deprecated"})),void 0!==t.executeCronjobs&&(0,f.prepareRequest)(t.executeCronjobs).get().disableLoadingIndicator().fetchAsResponse().catch((()=>{})),n.setUrl(t.backgroundQueue.url),(Math.random()<.1||t.backgroundQueue.force)&&n.invoke(),a.init(),l.init(),t.shareButtonProviders&&(0,d.addShareProviders)(t.shareButtonProviders),c.setup(),p.default.userId&&u.setup(),(0,h.whenFirstSeen)("woltlab-core-reaction-summary",(()=>{new Promise(((t,i)=>{e(["./Ui/Reaction/SummaryDetails"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,h.whenFirstSeen)("woltlab-core-comment",(()=>{new Promise(((t,i)=>{e(["./Component/Comment/woltlab-core-comment"],t,i)})).then(i.__importStar)})),(0,h.whenFirstSeen)("woltlab-core-comment-response",(()=>{new Promise(((t,i)=>{e(["./Component/Comment/Response/woltlab-core-comment-response"],t,i)})).then(i.__importStar)}))}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(e>359)throw new TypeError("Hue cannot be larger than 359°");t/=100,i/=100;const n=(1-Math.abs(2*i-1))*t,o=n*(1-Math.abs(e/60%2-1)),r=i-n/2,[a,s,l]=0<=e&&e<60&&[n,o,0]||60<=e&&e<120&&[o,n,0]||120<=e&&e<180&&[0,n,o]||180<=e&&e<240&&[0,o,n]||240<=e&&e<300&&[o,0,n]||300<=e&&e<360&&[n,0,o];return{r:Math.round(255*(a+r)),g:Math.round(255*(s+r)),b:Math.round(255*(l+r))}}function n(e,t,i){const n={r:0,g:0,b:0},o=Math.floor(e/60),r=e/60-o,a=(i/=100)*(1-(t/=100)),s=i*(1-t*r),l=i*(1-t*(1-r));if(0==t)n.r=n.g=n.b=i;else switch(o){case 1:n.r=s,n.g=i,n.b=a;break;case 2:n.r=a,n.g=i,n.b=l;break;case 3:n.r=a,n.g=s,n.b=i;break;case 4:n.r=l,n.g=a,n.b=i;break;case 5:n.r=i,n.g=a,n.b=s;break;case 0:case 6:n.r=i,n.g=l,n.b=a}return{r:Math.round(255*n.r),g:Math.round(255*n.g),b:Math.round(255*n.b)}}function o(e,t,i){let n,o;e/=255,t/=255,i/=255;const r=Math.max(e,t,i),a=Math.min(e,t,i),s=r-a;if(n=0,r!==a){switch(r){case e:n=(t-i)/s*60;break;case t:n=60*(2+(i-e)/s);break;case i:n=60*(4+(e-t)/s)}n<0&&(n+=360)}const l=(r+a)/2;return o=0===s?0:s/(1-Math.abs(2*l-1)),{h:Math.round(n),s:Math.round(100*o),l:Math.round(100*l)}}function r(e,t,i){let n,o;e/=255,t/=255,i/=255;const r=Math.max(Math.max(e,t),i),a=Math.min(Math.min(e,t),i),s=r-a;if(n=0,r!==a){switch(r){case e:n=(t-i)/s*60;break;case t:n=60*(2+(i-e)/s);break;case i:n=60*(4+(e-t)/s)}n<0&&(n+=360)}return o=0===r?0:s/r,{h:Math.round(n),s:Math.round(100*o),v:Math.round(100*r)}}function a(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function s(e){if(e<0||e>255)throw new Error(`Invalid RGB component value '${e}' given.`);return e.toString(16).padStart(2,"0").toUpperCase()}function l(e,t,i){if(void 0===t){const n=/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString());if(!n)throw new Error("Invalid RGB data given.");e=+n[1],t=+n[2],i=+n[3]}return s(e)+s(t)+s(i)}function c(e){if(e<0||e>1)throw new Error(`Invalid alpha value '${e}' given.`);return Math.round(255*e).toString(16).padStart(2,"0").toUpperCase()}function d(e,t,i,n){if(void 0===t){const t=e;return l(t.r,t.g,t.b)+c(t.a)}return l(e,t,i)+c(n)}function u(e){return`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}function p(){let e=document.getElementById("jsColorUtilColorChecker");return null===e&&(e=document.createElement("span"),e.id="jsColorUtilColorChecker",document.body.appendChild(e)),e}function m(e){const t=p();return t.style.color="",t.style.color=e,""!==t.style.color}function h(e){if(!m(e))throw new Error(`Given string '${e}' is no valid color.`);const t=p();t.style.color=e;const i=window.getComputedStyle(t).color,n=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/.exec(i);if(n)return{r:+n[1],g:+n[2],b:+n[3],a:1};{const e=/^rgba\((\d+), ?(\d+), ?(\d+), ?([0-9.]+)\)$/.exec(i);if(e)return{r:+e[1],g:+e[2],b:+e[3],a:+e[4]}}throw new Error(`Cannot process color '${e}'.`)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringToRgba=t.isValidColor=t.rgbaToString=t.rgbaToHex=t.rgbToHex=t.hexToRgb=t.rgbToHsv=t.rgbToHsl=t.hsvToRgb=t.hslToRgb=void 0,t.hslToRgb=i,t.hsvToRgb=n,t.rgbToHsl=o,t.rgbToHsv=r,t.hexToRgb=a,t.rgbToHex=l,t.rgbaToHex=d,t.rgbaToString=u,t.isValidColor=m,t.stringToRgba=h,window.__wcf_bc_colorUtil={hexToRgb:a,hslToRgb:i,hsvToRgb:n,isValidColor:m,rgbaToHex:d,rgbaToString:u,rgbToHex:l,rgbToHsv:r,rgbToHsl:o,stringToRgba:h}})),define("WoltLabSuite/Core/Dictionary",["require","exports"],(function(e,t){"use strict";class i{_dictionary=new Map;set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,i=e.length;t<i;t++)e[t].forEach(((e,t)=>this.set(t,e)))}toObject(){const e={};return this._dictionary.forEach(((t,i)=>e[i]=t)),e}static fromObject(e){const t=new i;return Object.keys(e).forEach((i=>{t.set(i,e[i])})),t}get size(){return this._dictionary.size}}return i})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,i,n){"use strict";function o(e){return a.has(e)?"."+a.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,n=i.__importStar(n);const r=new Map(Object.entries({zip:"zipper",rar:"zipper",tar:"zipper",gz:"zipper",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",webp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"lines",doc:"word",docx:"word",odt:"word"})),a=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt","public.jpeg":"jpeg","public.png":"png","com.compuserve.gif":"gif","org.webmproject.webp":"webp"}));t.formatFilesize=function(e,t=2){let i="Byte";return e>=1e3&&(e/=1e3,i="kB"),e>=1e3&&(e/=1e3,i="MB"),e>=1e3&&(e/=1e3,i="GB"),e>=1e3&&(e/=1e3,i="TB"),n.formatNumeric(e,-t)+" "+i},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const i=e.substr(t+1);if(r.has(i))return r.get(i)}return""},t.getExtensionByMimeType=o,t.blobToFile=function(e,t){const i=o(e.type);return new File([e],t+i,{type:e.type})}})),define("WoltLabSuite/Core/List",["require","exports"],(function(e,t){"use strict";return class{_set=new Set;add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=void 0,t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let i=e.toString().split("e"),n=i[1]?+i[1]-t:-t;return i=(e=Math.round(+`${i[0]}e${n}`)).toString().split("e"),n=i[1]?+i[1]+t:t,+`${i[0]}e${n}`}})),define("WoltLabSuite/Core/ObjectMap",["require","exports"],(function(e,t){"use strict";return class{_map=new WeakMap;set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function i(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");n.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const n=new Map;t.add=i,t.addObject=function(e){Object.keys(e).forEach((t=>i(t,e[t])))},t.get=function(e){return!!n.has(e)&&n.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,i,n){this.type=e,this.content=t,this.alias=i,this.length=0|(n||"").length}function i(e,t,i,n){var o,r;return e.lastIndex=t,(o=e.exec(i))&&n&&o[1]&&(r=o[1].length,o.index+=r,o[0]=o[0].slice(r)),o}function n(e,o,s,l,c,d){var u,p,h,f,g,b,v,_,w,y,E,S,L,C,k,x,I,M,T,D,A,P,j,q,O;for(u in s)if(s.hasOwnProperty(u)&&s[u])for(p=s[u],p=Array.isArray(p)?p:[p],h=0;h<p.length;++h){if(d&&d.cause==u+","+h)return;for(g=(f=p[h]).inside,b=!!f.lookbehind,v=!!f.greedy,_=f.alias,v&&!f.pattern.global&&(w=f.pattern.toString().match(/[imsuy]*$/)[0],f.pattern=RegExp(f.pattern.source,w+"g")),y=f.pattern||f,E=l.next,S=c;E!==o.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){if(L=E.value,o.length>e.length)return;if(!(L instanceof t)){if(C=1,v){if(!(k=i(y,S,e,b))||k.index>=e.length)break;for(x=k.index,I=k.index+k[0].length,M=S,M+=E.value.length;x>=M;)M+=(E=E.next).value.length;if(S=M-=E.value.length,E.value instanceof t)continue;for(T=E;T!==o.tail&&(M<I||"string"==typeof T.value);T=T.next)C++,M+=T.value.length;C--,L=e.slice(S,M),k.index-=S}else if(!(k=i(y,0,L,b)))continue;x=k.index,D=k[0],A=L.slice(0,x),P=L.slice(x+D.length),j=S+L.length,d&&j>d.reach&&(d.reach=j),q=E.prev,A&&(q=r(o,q,A),S+=A.length),a(o,q,C),E=r(o,q,new t(u,g?m.tokenize(D,g):D,_,D)),P&&r(o,E,P),C>1&&(O={cause:u+","+h,reach:j},n(e,o,s,E.prev,S,O),d&&O.reach>d.reach&&(d.reach=O.reach))}}}}function o(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function r(e,t,i){var n=t.next,o={value:i,prev:t,next:n};return t.next=o,n.prev=o,e.length++,o}function a(e,t,i){var n,o=t.next;for(n=0;n<i&&o!==e.tail;n++)o=o.next;t.next=o,o.prev=t,e.length-=n}function s(){m.manual||m.highlightAll()}var l,c,d=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,u=0,p={},m={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(i){return i instanceof t?new t(i.type,e(i.content),i.alias):Array.isArray(i)?i.map(e):i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++u}),e.__id},clone:function e(t,i){var n,o,r;switch(i=i||{},m.util.type(t)){case"Object":if(o=m.util.objId(t),i[o])return i[o];for(r in n={},i[o]=n,t)t.hasOwnProperty(r)&&(n[r]=e(t[r],i));return n;case"Array":return o=m.util.objId(t),i[o]?i[o]:(n=[],i[o]=n,t.forEach((function(t,o){n[o]=e(t,i)})),n);default:return t}},getLanguage:function(e){for(;e;){var t=d.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(d,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){var e,t,i;if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(n){if(e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(n.stack)||[])[1])for(i in t=document.getElementsByTagName("script"))if(t[i].src==e)return t[i];return null}},isActive:function(e,t,i){for(var n,o="no-"+t;e;){if((n=e.classList).contains(t))return!0;if(n.contains(o))return!1;e=e.parentElement}return!!i}},languages:{plain:p,plaintext:p,text:p,txt:p,extend:function(e,t){var i,n=m.util.clone(m.languages[e]);for(i in t)n[i]=t[i];return n},insertBefore:function(e,t,i,n){var o,r,a,s,l;for(a in o=(n=n||m.languages)[e],r={},o)if(o.hasOwnProperty(a)){if(a==t)for(s in i)i.hasOwnProperty(s)&&(r[s]=i[s]);i.hasOwnProperty(a)||(r[a]=o[a])}return l=n[e],n[e]=r,m.languages.DFS(m.languages,(function(t,i){i===l&&t!=e&&(this[t]=r)})),r},DFS:function e(t,i,n,o){var r,a,s,l;for(a in o=o||{},r=m.util.objId,t)t.hasOwnProperty(a)&&(i.call(t,a,t[a],n||a),s=t[a],"Object"!==(l=m.util.type(s))||o[r(s)]?"Array"!==l||o[r(s)]||(o[r(s)]=!0,e(s,i,a,o)):(o[r(s)]=!0,e(s,i,null,o)))}},plugins:{},highlightAll:function(e,t){m.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,i){var n,o,r={callback:i,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};for(m.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),m.hooks.run("before-all-elements-highlight",r),n=0;o=r.elements[n++];)m.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,i,n){function o(e){s.highlightedCode=e,m.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,m.hooks.run("after-highlight",s),m.hooks.run("complete",s),n&&n.call(s.element)}var r,a,s,l,c=m.util.getLanguage(t),d=m.languages[c];if(m.util.setLanguage(t,c),(r=t.parentElement)&&"pre"===r.nodeName.toLowerCase()&&m.util.setLanguage(r,c),a=t.textContent,s={element:t,language:c,grammar:d,code:a},m.hooks.run("before-sanity-check",s),(r=s.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!s.code)return m.hooks.run("complete",s),void(n&&n.call(s.element));m.hooks.run("before-highlight",s),s.grammar?i&&e.Worker?((l=new Worker(m.filename)).onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):o(m.highlight(s.code,s.grammar,s.language)):o(m.util.encode(s.code))},highlight:function(e,i,n){var o={code:e,grammar:i,language:n};if(m.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=m.tokenize(o.code,o.grammar),m.hooks.run("after-tokenize",o),t.stringify(m.util.encode(o.tokens),o.language)},tokenize:function(e,t){var i,a,s=t.rest;if(s){for(i in s)t[i]=s[i];delete t.rest}return r(a=new o,a.head,e),n(e,a,t,a.head,0),function(e){for(var t=[],i=e.head.next;i!==e.tail;)t.push(i.value),i=i.next;return t}(a)},hooks:{all:{},add:function(e,t){var i=m.hooks.all;i[e]=i[e]||[],i[e].push(t)},run:function(e,t){var i,n,o=m.hooks.all[e];if(o&&o.length)for(i=0;n=o[i++];)n(t)}},Token:t};return e.Prism=m,t.stringify=function e(t,i){var n,o,r,a,s;if("string"==typeof t)return t;if(Array.isArray(t))return n="",t.forEach((function(t){n+=e(t,i)})),n;for(s in o={type:t.type,content:e(t.content,i),tag:"span",classes:["token",t.type],attributes:{},language:i},(r=t.alias)&&(Array.isArray(r)?Array.prototype.push.apply(o.classes,r):o.classes.push(r)),m.hooks.run("wrap",o),a="",o.attributes)a+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},e.document?((l=m.util.currentScript())&&(m.filename=l.src,l.hasAttribute("data-manual")&&(m.manual=!0)),m.manual||("loading"===(c=document.readyState)||"interactive"===c&&l&&l.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),m):e.addEventListener?(m.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var i=JSON.parse(t.data),n=i.language,o=i.code,r=i.immediateClose;e.postMessage(m.highlight(o,m.languages[n],n)),r&&e.close()}),!1),m):m}(_self),"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),define("prism/prism",(function(){})),window.Prism=window.Prism||{},window.Prism.manual=!0,define("WoltLabSuite/Core/Prism",["prism/prism"],(function(){return window.Prism.hooks.add("wrap",(e=>{e.classes=e.classes.map((e=>`prism-${e}`))})),Prism})),define("WoltLabSuite/Core/Template",["require","exports"],(function(e,t){"use strict";return window.WoltLabTemplate})),define("WoltLabSuite/Core/Upload",["require","exports","tslib","./Ajax/Request","./Core","./Dom/Change/Listener","./Language"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),class{_button=document.createElement("p");_buttonContainer;_fileElements=[];_fileUpload=document.createElement("input");_internalFileId=0;_multiFileUploadIds=[];_options;_target;constructor(e,t,i){if(!(i=i||{}).className)throw new Error("Missing class name.");this._options=o.extend({action:"upload",multiple:!1,acceptableFiles:null,name:"__files[]",singleFileRequests:!1,url:`index.php?ajax-upload/&t=${o.getXsrfToken()}`},i),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url);const n=document.getElementById(e);if(null===n)throw new Error(`Element id '${e}' is unknown.`);this._buttonContainer=n;const r=document.getElementById(t);if(null===r)throw new Error(`Element id '${t}' is unknown.`);if(this._target=r,i.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName&&"TBODY"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._createButton()}_createButton(){this._fileUpload=document.createElement("input"),this._fileUpload.type="file",this._fileUpload.name=this._options.name,this._options.multiple&&(this._fileUpload.multiple=!0),null!==this._options.acceptableFiles&&(this._fileUpload.accept=this._options.acceptableFiles.join(",")),this._fileUpload.addEventListener("change",(e=>this._upload(e))),this._button=document.createElement("p"),this._button.className="button uploadButton",this._button.setAttribute("role","button"),this._fileUpload.addEventListener("focus",(()=>{this._fileUpload.matches(":focus-visible")&&this._button.classList.add("active")})),this._fileUpload.addEventListener("blur",(()=>{this._button.classList.remove("active")}));const e=document.createElement("span");e.textContent=a.get("wcf.global.button.upload"),this._button.appendChild(e),this._button.insertAdjacentElement("afterbegin",this._fileUpload),this._insertButton(),r.default.trigger()}_createFileElement(e){const t=document.createElement("progress");let i;switch(t.max=100,this._target.nodeName){case"OL":case"UL":return i=document.createElement("li"),i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i;case"TBODY":return this._createFileTableRow(e);default:return i=document.createElement("p"),i.appendChild(t),this._target.appendChild(i),i}}_createFileElements(e){if(!e.length)return null;const t=[];Array.from(e).forEach((e=>{const i=this._createFileElement(e);i.classList.contains("uploadFailed")||(i.dataset.filename=e.name,i.dataset.internalFileId=(this._internalFileId++).toString(),t.push(i))}));const i=this._fileElements.length;return this._fileElements.push(t),r.default.trigger(),i}_createFileTableRow(e){throw new Error("Has to be implemented in subclass.")}_failure(e,t,i,n,o){return!0}_getParameters(){return{}}_getFormData(){return{}}_insertButton(){this._buttonContainer.insertAdjacentElement("afterbegin",this._button)}_progress(e,t){const i=Math.round(t.loaded/t.total*100);this._fileElements[e].forEach((e=>{const t=e.querySelector("progress");t&&(t.value=i)}))}_removeButton(){this._button.remove(),r.default.trigger()}_success(e,t,i,n,o){}_upload(e,t,i){this._target.querySelectorAll(".uploadFailed").forEach((e=>e.remove()));let n=null,o=[];if(t)o.push(t);else if(i){let e="";switch(i.type){case"image/jpeg":e="jpg";break;case"image/gif":e="gif";break;case"image/png":e="png";break;case"image/webp":e="webp"}o.push({name:`pasted-from-clipboard.${e}`})}else o=Array.from(this._fileUpload.files);return o.length&&this.validateUpload(o)&&(this._options.singleFileRequests?(n=[],o.forEach((e=>{const t=this._uploadFiles([e],i);1!==o.length&&this._multiFileUploadIds.push(t),n.push(t)}))):n=this._uploadFiles(o,i)),this._removeButton(),this._createButton(),n}validateUpload(e){return!0}_uploadFiles(e,t){function i(e,t){null!==e&&(t=t||"",Object.entries(e).forEach((([e,n])=>{if("object"==typeof n)i(n,0===t.length?e:`${t}[${e}]`);else{const i=0===t.length?e:`${t}[${e}]`;r.append(i,n)}})))}const o=this._createFileElements(e);if(!this._fileElements[o].length)return null;const r=new FormData;for(let i=0,n=e.length;i<n;i++)if(this._fileElements[o][i]){const n=this._fileElements[o][i].dataset.internalFileId;t?r.append(`__files[${n}]`,t,e[i].name):r.append(`__files[${n}]`,e[i])}return r.append("actionName",this._options.action),r.append("className",this._options.className),"upload"===this._options.action&&r.append("interfaceName","wcf\\data\\IUploadAction"),i(this._getParameters(),"parameters"),i(this._getFormData()),new n.default({data:r,contentType:!1,failure:this._failure.bind(this,o),silent:!0,success:this._success.bind(this,o),uploadProgress:this._progress.bind(this,o),url:this._options.url,withCredentials:!0}).sendRequest(),o}hasPendingUploads(){return void 0!==this._fileElements.find((e=>e.find((e=>null!==e.querySelector("progress")))))}uploadBlob(e){return this._upload(null,null,e)}uploadFile(e){return this._upload(null,e)}}})),define("WoltLabSuite/Core/prism-meta",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={markup:{title:"Markup",file:"markup"},html:{title:"HTML",file:"markup"},xml:{title:"XML",file:"markup"},svg:{title:"SVG",file:"markup"},mathml:{title:"MathML",file:"markup"},ssml:{title:"SSML",file:"markup"},atom:{title:"Atom",file:"markup"},rss:{title:"RSS",file:"markup"},css:{title:"CSS",file:"css"},clike:{title:"C-like",file:"clike"},javascript:{title:"JavaScript",file:"javascript"},abap:{title:"ABAP",file:"abap"},abnf:{title:"ABNF",file:"abnf"},actionscript:{title:"ActionScript",file:"actionscript"},ada:{title:"Ada",file:"ada"},agda:{title:"Agda",file:"agda"},al:{title:"AL",file:"al"},antlr4:{title:"ANTLR4",file:"antlr4"},apacheconf:{title:"Apache Configuration",file:"apacheconf"},apex:{title:"Apex",file:"apex"},apl:{title:"APL",file:"apl"},applescript:{title:"AppleScript",file:"applescript"},aql:{title:"AQL",file:"aql"},arduino:{title:"Arduino",file:"arduino"},arff:{title:"ARFF",file:"arff"},armasm:{title:"ARM Assembly",file:"armasm"},arturo:{title:"Arturo",file:"arturo"},asciidoc:{title:"AsciiDoc",file:"asciidoc"},aspnet:{title:"ASP.NET (C#)",file:"aspnet"},asm6502:{title:"6502 Assembly",file:"asm6502"},asmatmel:{title:"Atmel AVR Assembly",file:"asmatmel"},autohotkey:{title:"AutoHotkey",file:"autohotkey"},autoit:{title:"AutoIt",file:"autoit"},avisynth:{title:"AviSynth",file:"avisynth"},"avro-idl":{title:"Avro IDL",file:"avro-idl"},awk:{title:"AWK",file:"awk"},bash:{title:"Bash",file:"bash"},sh:{title:"Shell",file:"bash"},shell:{title:"Shell",file:"bash"},basic:{title:"BASIC",file:"basic"},batch:{title:"Batch",file:"batch"},bbcode:{title:"BBcode",file:"bbcode"},bbj:{title:"BBj",file:"bbj"},bicep:{title:"Bicep",file:"bicep"},birb:{title:"Birb",file:"birb"},bison:{title:"Bison",file:"bison"},bnf:{title:"BNF",file:"bnf"},bqn:{title:"BQN",file:"bqn"},brainfuck:{title:"Brainfuck",file:"brainfuck"},brightscript:{title:"BrightScript",file:"brightscript"},bro:{title:"Bro",file:"bro"},bsl:{title:"BSL (1C:Enterprise)",file:"bsl"},c:{title:"C",file:"c"},csharp:{title:"C#",file:"csharp"},cpp:{title:"C++",file:"cpp"},cfscript:{title:"CFScript",file:"cfscript"},chaiscript:{title:"ChaiScript",file:"chaiscript"},cil:{title:"CIL",file:"cil"},cilkc:{title:"Cilk/C",file:"cilkc"},cilkcpp:{title:"Cilk/C++",file:"cilkcpp"},clojure:{title:"Clojure",file:"clojure"},cmake:{title:"CMake",file:"cmake"},cobol:{title:"COBOL",file:"cobol"},coffeescript:{title:"CoffeeScript",file:"coffeescript"},concurnas:{title:"Concurnas",file:"concurnas"},csp:{title:"Content-Security-Policy",file:"csp"},cooklang:{title:"Cooklang",file:"cooklang"},coq:{title:"Coq",file:"coq"},crystal:{title:"Crystal",file:"crystal"},"css-extras":{title:"CSS Extras",file:"css-extras"},csv:{title:"CSV",file:"csv"},cue:{title:"CUE",file:"cue"},cypher:{title:"Cypher",file:"cypher"},d:{title:"D",file:"d"},dart:{title:"Dart",file:"dart"},dataweave:{title:"DataWeave",file:"dataweave"},dax:{title:"DAX",file:"dax"},dhall:{title:"Dhall",file:"dhall"},diff:{title:"Diff",file:"diff"},django:{title:"Django/Jinja2",file:"django"},"dns-zone-file":{title:"DNS zone file",file:"dns-zone-file"},docker:{title:"Docker",file:"docker"},dot:{title:"DOT (Graphviz)",file:"dot"},ebnf:{title:"EBNF",file:"ebnf"},editorconfig:{title:"EditorConfig",file:"editorconfig"},eiffel:{title:"Eiffel",file:"eiffel"},ejs:{title:"EJS",file:"ejs"},elixir:{title:"Elixir",file:"elixir"},elm:{title:"Elm",file:"elm"},etlua:{title:"Embedded Lua templating",file:"etlua"},erb:{title:"ERB",file:"erb"},erlang:{title:"Erlang",file:"erlang"},"excel-formula":{title:"Excel Formula",file:"excel-formula"},fsharp:{title:"F#",file:"fsharp"},factor:{title:"Factor",file:"factor"},false:{title:"False",file:"false"},"firestore-security-rules":{title:"Firestore security rules",file:"firestore-security-rules"},flow:{title:"Flow",file:"flow"},fortran:{title:"Fortran",file:"fortran"},ftl:{title:"FreeMarker Template Language",file:"ftl"},gml:{title:"GameMaker Language",file:"gml"},gap:{title:"GAP (CAS)",file:"gap"},gcode:{title:"G-code",file:"gcode"},gdscript:{title:"GDScript",file:"gdscript"},gedcom:{title:"GEDCOM",file:"gedcom"},gettext:{title:"gettext",file:"gettext"},gherkin:{title:"Gherkin",file:"gherkin"},git:{title:"Git",file:"git"},glsl:{title:"GLSL",file:"glsl"},gn:{title:"GN",file:"gn"},"linker-script":{title:"GNU Linker Script",file:"linker-script"},go:{title:"Go",file:"go"},"go-module":{title:"Go module",file:"go-module"},gradle:{title:"Gradle",file:"gradle"},graphql:{title:"GraphQL",file:"graphql"},groovy:{title:"Groovy",file:"groovy"},haml:{title:"Haml",file:"haml"},handlebars:{title:"Handlebars",file:"handlebars"},mustache:{title:"Mustache",file:"handlebars"},haskell:{title:"Haskell",file:"haskell"},haxe:{title:"Haxe",file:"haxe"},hcl:{title:"HCL",file:"hcl"},hlsl:{title:"HLSL",file:"hlsl"},hoon:{title:"Hoon",file:"hoon"},http:{title:"HTTP",file:"http"},hpkp:{title:"HTTP Public-Key-Pins",file:"hpkp"},hsts:{title:"HTTP Strict-Transport-Security",file:"hsts"},ichigojam:{title:"IchigoJam",file:"ichigojam"},icon:{title:"Icon",file:"icon"},"icu-message-format":{title:"ICU Message Format",file:"icu-message-format"},idris:{title:"Idris",file:"idris"},ignore:{title:".ignore",file:"ignore"},gitignore:{title:".gitignore",file:"ignore"},hgignore:{title:".hgignore",file:"ignore"},npmignore:{title:".npmignore",file:"ignore"},inform7:{title:"Inform 7",file:"inform7"},ini:{title:"Ini",file:"ini"},io:{title:"Io",file:"io"},j:{title:"J",file:"j"},java:{title:"Java",file:"java"},javadoc:{title:"JavaDoc",file:"javadoc"},javadoclike:{title:"JavaDoc-like",file:"javadoclike"},javastacktrace:{title:"Java stack trace",file:"javastacktrace"},jexl:{title:"Jexl",file:"jexl"},jolie:{title:"Jolie",file:"jolie"},jq:{title:"JQ",file:"jq"},jsdoc:{title:"JSDoc",file:"jsdoc"},"js-extras":{title:"JS Extras",file:"js-extras"},json:{title:"JSON",file:"json"},json5:{title:"JSON5",file:"json5"},jsonp:{title:"JSONP",file:"jsonp"},jsstacktrace:{title:"JS stack trace",file:"jsstacktrace"},"js-templates":{title:"JS Templates",file:"js-templates"},julia:{title:"Julia",file:"julia"},keepalived:{title:"Keepalived Configure",file:"keepalived"},keyman:{title:"Keyman",file:"keyman"},kotlin:{title:"Kotlin",file:"kotlin"},kts:{title:"Kotlin Script",file:"kotlin"},kumir:{title:"KuMir (КуМир)",file:"kumir"},kusto:{title:"Kusto",file:"kusto"},latex:{title:"LaTeX",file:"latex"},tex:{title:"TeX",file:"latex"},context:{title:"ConTeXt",file:"latex"},latte:{title:"Latte",file:"latte"},less:{title:"Less",file:"less"},lilypond:{title:"LilyPond",file:"lilypond"},liquid:{title:"Liquid",file:"liquid"},lisp:{title:"Lisp",file:"lisp"},livescript:{title:"LiveScript",file:"livescript"},llvm:{title:"LLVM IR",file:"llvm"},log:{title:"Log file",file:"log"},lolcode:{title:"LOLCODE",file:"lolcode"},lua:{title:"Lua",file:"lua"},magma:{title:"Magma (CAS)",file:"magma"},makefile:{title:"Makefile",file:"makefile"},markdown:{title:"Markdown",file:"markdown"},"markup-templating":{title:"Markup templating",file:"markup-templating"},mata:{title:"Mata",file:"mata"},matlab:{title:"MATLAB",file:"matlab"},maxscript:{title:"MAXScript",file:"maxscript"},mel:{title:"MEL",file:"mel"},mermaid:{title:"Mermaid",file:"mermaid"},metafont:{title:"METAFONT",file:"metafont"},mizar:{title:"Mizar",file:"mizar"},mongodb:{title:"MongoDB",file:"mongodb"},monkey:{title:"Monkey",file:"monkey"},moonscript:{title:"MoonScript",file:"moonscript"},n1ql:{title:"N1QL",file:"n1ql"},n4js:{title:"N4JS",file:"n4js"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",file:"nand2tetris-hdl"},naniscript:{title:"Naninovel Script",file:"naniscript"},nasm:{title:"NASM",file:"nasm"},neon:{title:"NEON",file:"neon"},nevod:{title:"Nevod",file:"nevod"},nginx:{title:"nginx",file:"nginx"},nim:{title:"Nim",file:"nim"},nix:{title:"Nix",file:"nix"},nsis:{title:"NSIS",file:"nsis"},objectivec:{title:"Objective-C",file:"objectivec"},ocaml:{title:"OCaml",file:"ocaml"},odin:{title:"Odin",file:"odin"},opencl:{title:"OpenCL",file:"opencl"},openqasm:{title:"OpenQasm",file:"openqasm"},oz:{title:"Oz",file:"oz"},parigp:{title:"PARI/GP",file:"parigp"},parser:{title:"Parser",file:"parser"},pascal:{title:"Pascal",file:"pascal"},pascaligo:{title:"Pascaligo",file:"pascaligo"},psl:{title:"PATROL Scripting Language",file:"psl"},pcaxis:{title:"PC-Axis",file:"pcaxis"},peoplecode:{title:"PeopleCode",file:"peoplecode"},perl:{title:"Perl",file:"perl"},php:{title:"PHP",file:"php"},phpdoc:{title:"PHPDoc",file:"phpdoc"},"php-extras":{title:"PHP Extras",file:"php-extras"},"plant-uml":{title:"PlantUML",file:"plant-uml"},plsql:{title:"PL/SQL",file:"plsql"},powerquery:{title:"PowerQuery",file:"powerquery"},powershell:{title:"PowerShell",file:"powershell"},processing:{title:"Processing",file:"processing"},prolog:{title:"Prolog",file:"prolog"},promql:{title:"PromQL",file:"promql"},properties:{title:".properties",file:"properties"},protobuf:{title:"Protocol Buffers",file:"protobuf"},pug:{title:"Pug",file:"pug"},puppet:{title:"Puppet",file:"puppet"},pure:{title:"Pure",file:"pure"},purebasic:{title:"PureBasic",file:"purebasic"},purescript:{title:"PureScript",file:"purescript"},python:{title:"Python",file:"python"},qsharp:{title:"Q#",file:"qsharp"},q:{title:"Q (kdb+ database)",file:"q"},qml:{title:"QML",file:"qml"},qore:{title:"Qore",file:"qore"},r:{title:"R",file:"r"},racket:{title:"Racket",file:"racket"},cshtml:{title:"Razor C#",file:"cshtml"},jsx:{title:"React JSX",file:"jsx"},tsx:{title:"React TSX",file:"tsx"},reason:{title:"Reason",file:"reason"},regex:{title:"Regex",file:"regex"},rego:{title:"Rego",file:"rego"},renpy:{title:"Ren'py",file:"renpy"},rescript:{title:"ReScript",file:"rescript"},rest:{title:"reST (reStructuredText)",file:"rest"},rip:{title:"Rip",file:"rip"},roboconf:{title:"Roboconf",file:"roboconf"},robotframework:{title:"Robot Framework",file:"robotframework"},ruby:{title:"Ruby",file:"ruby"},rust:{title:"Rust",file:"rust"},sas:{title:"SAS",file:"sas"},sass:{title:"Sass (Sass)",file:"sass"},scss:{title:"Sass (SCSS)",file:"scss"},scala:{title:"Scala",file:"scala"},scheme:{title:"Scheme",file:"scheme"},"shell-session":{title:"Shell session",file:"shell-session"},smali:{title:"Smali",file:"smali"},smalltalk:{title:"Smalltalk",file:"smalltalk"},smarty:{title:"Smarty",file:"smarty"},sml:{title:"SML",file:"sml"},solidity:{title:"Solidity (Ethereum)",file:"solidity"},"solution-file":{title:"Solution file",file:"solution-file"},soy:{title:"Soy (Closure Template)",file:"soy"},sparql:{title:"SPARQL",file:"sparql"},"splunk-spl":{title:"Splunk SPL",file:"splunk-spl"},sqf:{title:"SQF: Status Quo Function (Arma 3)",file:"sqf"},sql:{title:"SQL",file:"sql"},squirrel:{title:"Squirrel",file:"squirrel"},stan:{title:"Stan",file:"stan"},stata:{title:"Stata Ado",file:"stata"},iecst:{title:"Structured Text (IEC 61131-3)",file:"iecst"},stylus:{title:"Stylus",file:"stylus"},supercollider:{title:"SuperCollider",file:"supercollider"},swift:{title:"Swift",file:"swift"},systemd:{title:"Systemd configuration file",file:"systemd"},"t4-templating":{title:"T4 templating",file:"t4-templating"},"t4-cs":{title:"T4 Text Templates (C#)",file:"t4-cs"},"t4-vb":{title:"T4 Text Templates (VB)",file:"t4-vb"},tap:{title:"TAP",file:"tap"},tcl:{title:"Tcl",file:"tcl"},tt2:{title:"Template Toolkit 2",file:"tt2"},textile:{title:"Textile",file:"textile"},toml:{title:"TOML",file:"toml"},tremor:{title:"Tremor",file:"tremor"},trickle:{title:"trickle",file:"tremor"},troy:{title:"troy",file:"tremor"},turtle:{title:"Turtle",file:"turtle"},twig:{title:"Twig",file:"twig"},typescript:{title:"TypeScript",file:"typescript"},typoscript:{title:"TypoScript",file:"typoscript"},unrealscript:{title:"UnrealScript",file:"unrealscript"},uorazor:{title:"UO Razor Script",file:"uorazor"},uri:{title:"URI",file:"uri"},v:{title:"V",file:"v"},vala:{title:"Vala",file:"vala"},vbnet:{title:"VB.Net",file:"vbnet"},velocity:{title:"Velocity",file:"velocity"},verilog:{title:"Verilog",file:"verilog"},vhdl:{title:"VHDL",file:"vhdl"},vim:{title:"vim",file:"vim"},"visual-basic":{title:"Visual Basic",file:"visual-basic"},vba:{title:"VBA",file:"visual-basic"},warpscript:{title:"WarpScript",file:"warpscript"},wasm:{title:"WebAssembly",file:"wasm"},"web-idl":{title:"Web IDL",file:"web-idl"},wgsl:{title:"WGSL",file:"wgsl"},wiki:{title:"Wiki markup",file:"wiki"},wolfram:{title:"Wolfram language",file:"wolfram"},mathematica:{title:"Mathematica",file:"wolfram"},nb:{title:"Mathematica Notebook",file:"wolfram"},wren:{title:"Wren",file:"wren"},xeora:{title:"Xeora",file:"xeora"},"xml-doc":{title:"XML doc (.net)",file:"xml-doc"},xojo:{title:"Xojo (REALbasic)",file:"xojo"},xquery:{title:"XQuery",file:"xquery"},yaml:{title:"YAML",file:"yaml"},yang:{title:"YANG",file:"yang"},zig:{title:"Zig",file:"zig"}}})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=void 0,t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let i,n=document.createElement("span");for(;i=t.nextNode();){const t=i,o=t.data.split(/\r?\n/);for(let i=0,r=o.length;i<r;i++){const r=o[i];i>=1&&(n.appendChild(document.createTextNode("\n")),yield n,n=document.createElement("span"));let a=document.createTextNode(r),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(a),a=e,s=s.parentNode}n.appendChild(a)}}yield n}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper"],(function(e,t,i,n,o,r,a,s){"use strict";async function l(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s);class c{static chunkSize=50;container;codeContainer;language;constructor(e){this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e)))?.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new c(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("button");t.type="button",t.innerHTML='<fa-icon size="24" name="copy"></fa-icon>',t.classList.add("jsTooltip"),t.title=n.get("wcf.message.bbcode.code.copy");const i=async()=>{await o.copyElementTextToClipboard(this.codeContainer),r.show(n.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",(()=>i())),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");const t=(await new Promise(((t,i)=>{e(["../prism-meta"],t,i)})).then(i.__importStar)).default;if(!t[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((i,n)=>{e(["prism/components/prism-"+t[this.language].file],i,n)})).then(i.__importStar),await l();const n=a.default.languages[this.language];if(!n)throw new Error(`Invalid language '${this.language}' given.`);const o=document.createElement("div");o.innerHTML=a.default.highlight(this.codeContainer.textContent,n,this.language),await l();const r=this.codeContainer.querySelectorAll(".codeBoxLine > span"),d=s.splitIntoLines(o);for(let e=0,t=r.length;e<t;e+=c.chunkSize){await l();const i=Math.min(e+c.chunkSize,t);for(let t=e;t<i;t++){const e=r[t],i=d.next().value;e.parentNode.replaceChild(i,e)}}this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}}return c})),define("WoltLabSuite/Core/Bbcode/Collapsible",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(e.classList.toggle("collapsed")){if(t.forEach((e=>{const t=e.dataset.titleExpand,i=e.querySelector("fa-icon");i?(i.setIcon("up-right-and-down-left-from-center"),e.title=t):e.textContent=t})),i instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse,i=e.querySelector("fa-icon");i?(i.setIcon("down-left-and-up-right-to-center"),e.title=t):e.textContent=t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),n=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,n){t.forEach((n=>{n.classList.add("jsToggleButtonEnabled"),n.addEventListener("click",(n=>i(e,t,n))),n.addEventListener("keydown",(n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),i(e,t))}))})),0!==n.scrollTop&&(n.scrollTop=0,i(e,t)),n.addEventListener("scroll",(()=>{n.scrollTop=0,e.classList.contains("collapsed")&&i(e,t)}))}(e,t,n),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenToCkeditor=t.dispatchToCkeditor=void 0;class i{#y;constructor(e){this.#y=e}collectMetaData(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#y.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#y.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#y.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#y.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class n{#y;constructor(e){this.#y=e}bbcode(e){return this.#y.addEventListener("ckeditor5:bbcode",(t=>{const i=e(t.detail);if(!0===i)t.preventDefault();else if(!1!==i)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#y.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#y.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#y.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#y.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#y.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#y.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#y.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#y.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#y.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#y.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#y.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#y.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#y.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#y.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#y.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new i(e)},t.listenToCkeditor=function(e){return new n(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,i){"use strict";function n(e,t,n){const o={abortController:n,file:t};return(0,i.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:i})=>{e({"data-attachment-id":t.toString(),urls:{default:i}})}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{if(!o.attachment)return;const r=function(e){const t=document.querySelector(`.messageTabMenu[data-wysiwyg-container-id="${e.id}"]`);if(!t)return[];const i=t.querySelector(".formAttachmentContent > .formAttachmentList");return i?Array.from(i.querySelectorAll('.formAttachmentListItem[data-is-image="1"]')).map((e=>parseInt(e.dataset.objectId))):[]}(e);t.woltlabAttachment={inlineImageIds:r,resolveAttachmentUrl(e,t){let i="";return t&&(i="&thumbnail=1"),`${window.WSC_API_URL}index.php?attachment/${e}/${i}`}},t.woltlabUpload={uploadImage:(t,i)=>n(e,t,i),uploadOther:t=>n(e,t)},(0,i.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,i.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:i})=>{""===i?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(`<img src="${i}" class="woltlabAttachment" data-attachment-id="${t.toString()}">`)}))}(e),function(e){(0,i.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)}))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,i;if(e&&e.__esModule)return e;if(t={},null!=e)for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&__createBinding(t,e,i);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,i){"use strict";function n(e,t,n){const o={abortController:n,file:t};return(0,i.dispatchToCkeditor)(e).uploadMedia(o),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(t){(0,i.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:i})=>{e.woltlabMedia={resolveMediaUrl(e,t){let i="";return"original"!==t&&(i=`&thumbnail=${t}`),`${window.WSC_API_URL}index.php?media/${e}/${i}`}},!i.attachment&&i.media&&(e.woltlabUpload={uploadImage:(e,i)=>n(t,e,i),uploadOther:e=>n(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,i)=>{e(["../../Media/Manager/Editor"],t,i)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Ajax/Backend","../../Dom/Util","./Event"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,o.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){if(e.length>24)return[];const t=new URL(window.WSC_API_URL+"index.php?editor-get-mention-suggestions/");return t.searchParams.set("query",e),(await(0,i.prepareRequest)(t.toString()).get().allowCaching().disableLoadingIndicator().fetchAsJson()).map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'<fa-icon name="users"></fa-icon>',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,n.createFragmentFromHtml)(`\n            <span class="ckeditor5__mention">${e.icon} ${e.text}</span>\n          `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,n.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:n,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,i.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'</p><p><br data-cke-filler="true"></p><p>')).split("\n\n").map((e=>`<p>${e=e.replaceAll("\n","<br>")}</p>`)).join("")),n=(0,i.escapeHTML)(n),r=(0,i.escapeHTML)(r),e.insertHtml(`<woltlab-quote data-author="${n}" data-link="${r}">${o}</woltlab-quote>\n    <p><br data-cke-filler="true"></p>`)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,i,n,o,r){"use strict";function a(e){return`${(0,i.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeAutosave=t.setupRestoreDraft=t.deleteDraft=void 0,t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let i;try{const e=window.localStorage.getItem(a(t));null!==e&&(i=JSON.parse(e))}catch{return void s(t)}if(void 0===i)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=i.timestamp)return;const c=e.data.get();if(c===i.html)return;e.data.set(i.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n    <div class="ckeditor5__restoreDraft__question">\n      ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.editor.restoreDraft"))}\n    </div>\n    <div class="ckeditor5__restoreDraft__buttons">\n      <button type="button" class="button buttonPrimary small" data-type="submit">\n        ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.dialog.button.primary.restore"))}\n      </button>\n      <button type="button" class="button small" data-type="cancel">\n        ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.dialog.button.cancel"))}\n      </button>\n      <button type="button" class="button small" data-type="preview">\n        ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.editor.restoreDraft.preview"))}\n      </button>\n    </div>\n  `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const m=(e,t,i)=>{i&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n    <button type="button" class="ck ck-button">\n      ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.editor.restoreDraft.restoreOrDiscard"))}\n    </button>\n  `,e}(),i=e.ui.view.toolbar.element,r=Array.from(i.children);r.forEach((e=>e.hidden=!0)),i.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,i){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let i,n;try{i=window.localStorage.getItem(t)}catch{return}if(null!==i){try{n=JSON.parse(i)}catch{}if(void 0===n||n.timestamp<e)try{localStorage.removeItem(t)}catch{}}}))}(),t.autosave={save:t=>(function(e,t,i){if(""===i)return void s(t);const n={html:i,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(n)),(0,r.dispatchToCkeditor)(e).autosave(n)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,i,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(i))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(i)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=void 0;class n{#E;#S="|";#L=[];#C=[];#k={};constructor(e){this.#E=e}#x(){this.#E.undo?this.#C.push("undo","redo"):this.#L.push("Undo")}#I(){this.#C.push("bold","italic")}#M(){const e=[];this.#E.heading?e.push("heading"):this.#L.push("Heading"),this.#E.underline?e.push("underline"):this.#L.push("Underline"),this.#E.strikethrough?e.push("strikethrough"):this.#L.push("Strikethrough"),e.push(this.#S),this.#E.mark?e.push("highlight"):this.#L.push("Highlight"),this.#E.fontColor?e.push("fontColor"):this.#L.push("FontColor"),this.#E.fontFamily?e.push("fontFamily"):this.#L.push("FontFamily"),this.#E.fontSize?e.push("fontSize"):this.#L.push("FontSize"),e.push(this.#S),this.#E.subscript?e.push("subscript"):this.#L.push("Subscript"),this.#E.superscript?e.push("superscript"):this.#L.push("Superscript"),0!==e.length&&e.push(this.#S,"removeFormat"),e.length>0&&(this.#C.push({label:"woltlabToolbarGroup_format",items:e}),this.#k.format={icon:"ellipsis;false",label:(0,i.getPhrase)("wcf.editor.button.group.format")})}#T(){this.#E.list?(this.#C.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#k.list={icon:"list;false",label:(0,i.getPhrase)("wcf.editor.button.group.list")}):this.#L.push("List")}#D(){this.#E.alignment?this.#C.push("alignment"):this.#L.push("Alignment")}#A(){this.#E.link?this.#C.push("link"):this.#L.push("Link","LinkImage")}#P(){this.#E.image?(this.#C.push("insertImage"),this.#E.attachment||this.#L.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#E.link&&this.#L.push("LinkImage")}#j(){this.#E.codeBlock?this.#C.push("codeBlock"):this.#L.push("CodeBlock","WoltlabCodeBlock"),this.#E.code?this.#C.push("code"):this.#L.push("Code","WoltlabCode")}#q(){this.#E.table?this.#C.push("insertTable"):this.#L.push("Table","TableToolbar"),this.#E.quoteBlock?this.#C.push("blockQuote"):this.#L.push("BlockQuote","WoltlabBlockQuote"),this.#E.spoiler?this.#C.push("spoiler"):this.#L.push("WoltlabSpoiler"),this.#E.html?this.#C.push("htmlEmbed"):this.#L.push("HtmlEmbed","WoltlabHtmlEmbed")}#O(){this.#C.push(this.#S)}#N(){this.#E.media||this.#L.push("WoltlabMedia")}#B(){this.#E.mention||this.#L.push("Mention","WoltlabMention")}#F(){let e=!1;return this.#C.filter((t=>"string"==typeof t&&t===this.#S?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#L.length>0||this.#C.length>0)throw new Error("Cannot build the configuration twice.");this.#x(),this.#O(),this.#O(),this.#I(),this.#A(),this.#M(),this.#O(),this.#T(),this.#D(),this.#O(),this.#P(),this.#j(),this.#q(),this.#O(),this.#N(),this.#B()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:n}=window.CKEDITOR_TRANSLATIONS[t];return n.Author=(0,i.getPhrase)("wcf.ckeditor.quote.author"),n.Filename=(0,i.getPhrase)("wcf.ckeditor.code.fileName"),n["Line number"]=(0,i.getPhrase)("wcf.ckeditor.code.lineNumber"),n.Quote=(0,i.getPhrase)("wcf.ckeditor.quote"),n["Quote from %0"]=(0,i.getPhrase)("wcf.ckeditor.quoteFrom"),n.Spoiler=(0,i.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,i.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,i.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,i.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,i.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#L,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#F(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#k,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new n(e);return t.build(),t.toConfig()}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e,t){e.editing.view.document.on("enter",((e,n)=>{if(n.isSoft)return;n.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,i.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";function o(e,t){const i=e.closest("p");if(null===i)return;const n=document.createElement("figure");n.classList.add("image",t),n.append(e),i.insertAdjacentElement("beforebegin",n),""===i.innerHTML&&i.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&n.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const i=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const i=e.childNodes[0];i instanceof HTMLBRElement&&"true"!==i.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,i=e.length;t<i;t++){const n=e[t];let o=0;for(;t+o+1<i;){const i=e[t+o+1];if(n.nextElementSibling!==i)break;o++}if(0===o)n.remove();else{const i=o+1,n=Math.ceil(i/2);e.slice(t,t+n).forEach((e=>{e.remove()})),t+=o}}}(i),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,n=i.__importDefault(n),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a <textarea>.");e.value=r(e.value)}})),define("WoltLabSuite/Core/Component/Ckeditor/Keyboard",["require","exports","./Event"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSubmitShortcut=void 0,t.setupSubmitShortcut=function(e){const t=e.element.closest("form, .message, .jsOuterEditorContainer");if(null===t)return;const n=t.querySelector(".formSubmit");if(null===n)return;const o=n.querySelector('input[type="submit"], button[data-type="save"], button[accesskey="s"]');if(null===o)return;o.removeAttribute("accesskey");const r=function(e){return t=>{if("KeyS"!==t.code)return;let i;i=window.navigator.platform.startsWith("Mac")?t.ctrlKey&&t.altKey:t.altKey&&!t.ctrlKey,i&&(t.preventDefault(),t.stopPropagation(),e.click())}}(o);t.addEventListener("keydown",r),(0,i.listenToCkeditor)(e.element).destroy((()=>{t.removeEventListener("keydown",r)}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Layer",["require","exports","../../Helper/PageOverlay"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const n=["ck-body-wrapper","ck-inspector-wrapper","ck-inspector-portal"];let o=!1;t.setup=function(){o||(o=!0,new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)if(e instanceof HTMLElement)for(const t of n)e.classList.contains(t)&&(0,i.getPageOverlayContainer)().append(e)})).observe(document.body,{childList:!0}))}})),define("WoltLabSuite/Core/Component/Ckeditor",["require","exports","tslib","./Ckeditor/Attachment","./Ckeditor/Media","./Ckeditor/Mention","./Ckeditor/Quote","./Ckeditor/Autosave","./Ckeditor/Configuration","./Ckeditor/Event","./Ckeditor/SubmitOnEnter","./Ckeditor/Normalizer","../Ui/Scroll","../Devtools","./Ckeditor/Keyboard","./Ckeditor/Layer","../Environment"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f,g){"use strict";function*b(e,t,i){if(e.is("element",t)&&Object.entries(i).every((([t,i])=>!!e.hasAttribute(t)&&String(e.getAttribute(t))===i.toString())))yield e;else for(const n of e.getChildren())n.is("element")&&(yield*b(n,t,i))}function v(e,t){for(const i of e)if("string"==typeof i){if(i===t)return!0}else if(v(i.items,t))return!0;return!1}function _(e){return w.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getCkeditorById=t.getCkeditor=t.setupCkeditor=void 0,m=i.__importDefault(m);const w=new WeakMap;class y{#U;#E;constructor(e,t){this.#U=e,this.#E=t}async destroy(){(0,c.dispatchToCkeditor)(this.sourceElement).destroy(),await this.#U.destroy()}discardDraft(){this.#E.autosave&&(0,s.deleteDraft)(this.#E.autosave)}focus(){const e=this.#U.ui.element,{bottom:t,top:i}=e.getBoundingClientRect(),n=window.innerHeight;let o=!1;(i>0&&i<n||t>0&&t<n)&&(o=!0),o?this.#U.editing.view.focus():(0,p.element)(e,(()=>{this.#U.editing.view.focus()}))}getHtml(){return this.#U.data.get()}insertHtml(e){e=(0,u.normalizeLegacyHtml)(e),this.#U.model.change((t=>{const i=this.#U.data.processor.toView(e),n=this.#U.data.toModel(i),o=this.#U.model.insertContent(n);t.setSelection(o.end),this.focus()}))}insertText(e){const t=document.createElement("div");t.textContent=e,this.insertHtml(t.innerHTML)}isVisible(){return 0!==this.#U.ui.element.clientWidth}setHtml(e,t=!0){e=(0,u.normalizeLegacyHtml)(e),this.#U.model.change((i=>{let n=this.#U.model.createRangeIn(this.#U.model.document.getRoot());const o=this.#U.data.processor.toView(e),r=this.#U.data.toModel(o);n=this.#U.model.insertContent(r,n),i.setSelection(n.end),t&&this.focus()}))}removeAll(e,t){this.#U.model.change((i=>{const n=b(this.#U.model.document.getRoot(),e,t);for(const e of n)i.remove(e)}))}reset(){if(this.setHtml("",!1),(0,c.dispatchToCkeditor)(this.sourceElement).reset({ckeditor:this}),"safari"===(0,g.browser)()&&!(0,g.touch)()){const e=this.#U.ui.element;e.focus(),window.setTimeout((()=>{e.blur()}),0)}}get element(){return this.#U.ui.element}get features(){return this.#E}get sourceElement(){return this.#U.sourceElement}}t.setupCkeditor=async function(t,p,g,b,_){if(w.has(t))throw new TypeError(`Cannot initialize the editor for '${t.id}' twice.`);(0,f.setup)();const{create:E,CKEditor5:S}=await new Promise(((t,i)=>{e(["@woltlab/editor"],t,i)})).then(i.__importStar);await new Promise((e=>{window.requestAnimationFrame(e)})),function(e,t){(0,c.dispatchToCkeditor)(e).setupFeatures({features:t}),t.autosave&&!1===m.default._internal_.editorAutosave()&&(t.autosave=""),Object.freeze(t)}(t,p),p.attachment&&(0,n.setup)(t),p.media&&(0,o.setup)(t),(0,r.setup)(t),p.quoteBlock&&(0,a.setup)(t);const L=function(e,t,i,n,o){const r=(0,l.createConfigurationFor)(t);r.codeBlock={languages:n},r.woltlabBbcode=i,""!==t.autosave&&(0,s.initializeAutosave)(e,r,t.autosave),(0,c.dispatchToCkeditor)(e).setupConfiguration({configuration:r,features:t,modules:o});const a=r.toolbar;for(let{name:e}of i)e=`woltlabBbcode_${e}`,v(a,e)||a.push(e);return r}(t,p,g,b,S);_&&(L.licenseKey=_),(0,u.normalizeLegacyMessage)(t);const C=await E(t,L),k=new y(C,p);return p.autosave&&(0,s.setupRestoreDraft)(C,p.autosave),w.set(t,k),(0,c.dispatchToCkeditor)(t).ready({ckeditor:k}),p.submitOnEnter&&(0,d.setup)(C,k),""===k.getHtml()&&(0,c.dispatchToCkeditor)(t).discardRecoveredData(),(0,h.setupSubmitShortcut)(k),function(e,t){e.model.document.on("change:data",(()=>{(0,c.dispatchToCkeditor)(t).changeData()}))}(C,t),window.ENABLE_DEBUG_MODE&&window.ENABLE_DEVELOPER_TOOLS&&m.default._internal_.editorInspector()&&new Promise(((t,i)=>{e(["@ckeditor/ckeditor5-inspector"],t,i)})).then(i.__importStar).then((e=>{e.default.attach(C)})),k},t.getCkeditor=_,t.getCkeditorById=function(e,t=!0){const i=document.getElementById(e);if(null!==i)return _(i);if(t)throw new Error(`Unable to find an element with the id '${e}'.`)}})),define("WoltLabSuite/Core/Component/Confirmation/Custom",["require","exports","tslib","../Dialog","../../Language"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationCustom=void 0,o=i.__importStar(o),t.ConfirmationCustom=class{#H;constructor(e){this.#H=e}async message(e){if(""===e.trim())throw new Error("An empty message for the delete confirmation was provided. Please use `defaultMessage()` if you do not want to provide a custom message.");const t=(0,n.dialogFactory)().fromHtml(`<p>${e}</p>`).asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return t.show(this.#H),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async withFormElements(e){const t=(0,n.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e(t),t.show(this.#H),new Promise((e=>{t.addEventListener("primary",(()=>{e({result:!0,dialog:t})})),t.addEventListener("cancel",(()=>{e({result:!1,dialog:t})}))}))}async withoutMessage(){const e=(0,n.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e.show(this.#H),new Promise((t=>{e.addEventListener("primary",(()=>t(!0))),e.addEventListener("cancel",(()=>t(!1)))}))}}})),define("WoltLabSuite/Core/Component/Confirmation",["require","exports","tslib","./Dialog","../Language","../Dom/Util","./Confirmation/Custom"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.confirmationFactory=void 0,r=i.__importStar(r);class s{custom(e){return new a.ConfirmationCustom(e)}async delete(e){const t=`<p>${(0,o.getPhrase)("wcf.dialog.confirmation.cannotBeUndone")}</p>`,i=(0,n.dialogFactory)().fromHtml(t).asConfirmation({primary:(0,o.getPhrase)("wcf.dialog.button.primary.delete")});let r;return r=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.delete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.delete",{title:e}),i.show(r),new Promise((e=>{i.addEventListener("primary",(()=>e(!0))),i.addEventListener("cancel",(()=>e(!1)))}))}async restore(e){const t=(0,n.dialogFactory)().withoutContent().asConfirmation();let i;return i=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.restore.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.restore",{title:e}),t.show(i),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async softDelete(e,t=!1){let i;if(i=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.softDelete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.softDelete",{title:e}),t)return this.withReason(i,!0);const r=(0,n.dialogFactory)().withoutContent().asConfirmation();return r.show(i),new Promise((e=>{r.addEventListener("primary",(()=>{e({result:!0})})),r.addEventListener("cancel",(()=>{e({result:!1})}))}))}async withReason(e,t){const i=(0,n.dialogFactory)().withoutContent().asConfirmation(),a=r.getUniqueId(),s=(0,o.getPhrase)(t?"wcf.dialog.confirmation.reason.optional":"wcf.dialog.confirmation.reason"),l=document.createElement("dl");l.innerHTML=`\n      <dt><label for="${a}">${s}</label></dt>\n      <dd><textarea id="${a}" cols="40" rows="3"></textarea></dd>\n    `;const c=l.querySelector("textarea");return i.content.append(l),i.show(e),new Promise((e=>{i.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),i.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map,n={add(e,t){if(i.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()},setupDialog(e,t){let i;return e.addEventListener("validate",(e=>{n.has(t)&&(i=n.getData(t),n.delete(t),i instanceof Promise&&(e.detail.push(new Promise((e=>{i.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==i?i instanceof Promise?i.then((e=>{t(e)})):t(i):t({})}))}))}};return n})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=void 0,t.promiseMutex=function(e){let t=!1;return function(...i){return!t&&(t=!0,e(...i).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return e===s||e===l||e===c}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),i(n.error)})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function r(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");let r=t;for(let e=2;e<r.length&&255===r[e];){const t=2+(r[e+2]<<8|r[e+3]);if(r[e+1]===a.APP1){let o="";for(let t=e+4;0!==r[t]&&t<r.length;t++)o+=String.fromCharCode(r[t]);if(i(o)){const i=r.slice(0,e),o=r.slice(e+t);r=n(i,o)}else e+=t}else e+=t}return new Blob([r],{type:e.type})}Object.defineProperty(t,"__esModule",{value:!0}),t.setExifData=t.removeExifData=t.getExifBytesFromJpeg=void 0;const a={SOI:216,APP0:224,APP1:225,APP2:226,APP3:227,APP4:228,APP5:229,APP6:230,APP7:231,APP8:232,APP9:233,APP10:234,APP11:235,APP12:236,APP13:237,APP14:238,COM:254},s="Exif",l="http://ns.adobe.com/xap/1.0/",c="http://ns.adobe.com/xmp/extension/";t.getExifBytesFromJpeg=async function(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);let r=new Uint8Array(0);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");for(let e=2;e<t.length&&255===t[e];){const o=2+(t[e+2]<<8|t[e+3]);if(t[e+1]===a.APP1){let a="";for(let i=e+4;0!==t[i]&&i<t.length;i++)a+=String.fromCharCode(t[i]);i(a)&&(r=n(r,t.slice(e,o+e)))}e+=o}return r},t.removeExifData=r,t.setExifData=async function(e,t){e=await r(e);const i=await o(e);let s=2;255===i[2]&&i[3]===a.APP0&&(s+=2+(i[4]<<8|i[5]));const l=n(i.slice(0,s),t,i.slice(s));return new Blob([l],{type:e.type})}})),define("WoltLabSuite/Core/Image/ImageUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsTransparentPixels=void 0,t.containsTransparentPixels=function(e){const t=e.getContext("2d");if(!t)throw new Error("Unable to get canvas context.");const i=t.getImageData(0,0,e.width,e.height);for(let e=3,t=i.data.length;e<t;e+=4)if(255!==i.data[e])return!0;return!1}})),define("WoltLabSuite/Core/Image/Resizer",["require","exports","tslib","../FileUtil","./ExifUtil","pica"],(function(e,t,i,n,o,r){"use strict";n=i.__importStar(n),o=i.__importStar(o);const a=new((r=i.__importDefault(r)).default)({features:["js","wasm","ww"]}),s="image/jpeg";return class{maxWidth=800;maxHeight=600;quality=.8;fileType=s;setMaxWidth(e){return null==e&&(e=800),this.maxWidth=e,this}setMaxHeight(e){return null==e&&(e=600),this.maxHeight=e,this}setQuality(e){return null==e&&(e=.8),this.quality=e,this}setFileType(e){return null==e&&(e=s),this.fileType=e,this}async saveFile(e,t,i=this.fileType,r=this.quality){const s=/(.+)(\..+?)$/.exec(t);let l=await a.toBlob(e.image,i,r);return"image/jpeg"===i&&void 0!==e.exif&&(l=await o.setExifData(l,e.exif)),n.blobToFile(l,s[1])}async loadFile(e){let t=Promise.resolve(void 0),i=e;"image/jpeg"===e.type&&(t=o.getExifBytesFromJpeg(e),i=await o.removeExifData(i));const n=new Promise(((e,t)=>{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),t(n.error)})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[r,a]=await Promise.all([t,n]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,r){const s=document.createElement("canvas");if(window.createImageBitmap&&(await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965");const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);s.width=Math.floor(e.width*d),s.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const p={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,p)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,i,n,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=i.toString(),m.appendChild(h)),function(e,t,i,n,c,d){function m(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",m),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),b.appendChild(n);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),n.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===i&&(g.innerHTML=o.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===i){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),i.append(t),e.appendChild(i)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const _=t.closest("form");if(null!==_){_.addEventListener("submit",l);let t=p.get(_);void 0===t&&(t=[],p.set(_,t)),t.push(e)}}(t,h,i,n,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid  input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const n=d.get(e),o=r.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(n.languageId!==t){const o=p.get(e);if(n.languageId){const e=n.callbacks.get("beforeSelect");e&&e(n.element),o.set(n.languageId,n.element.value)}if(0===t?p.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=a,n.buttonLabel.querySelector("fa-icon")?.remove(),t){n.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),n.buttonLabel.append(e)}else n.buttonLabel.classList.remove("active");n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=r.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),a=p.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!a.get(t));const n=e.querySelector("span");if(n.querySelector("fa-icon")?.remove(),i){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),n.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=p.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,i,n){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,i,n,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const i=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),i&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const r=t instanceof HTMLElement;s(e,n,r)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let b;(a||i.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,i,n)},t.registerCallback=function(e,t,i){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const i=p.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),p.set(e,n),void s(e,0,!0);p.set(e,n),i.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const i=t.buttonLabel.parentElement;n.default.hide(i),i.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const i=t.buttonLabel.parentElement;n.default.show(i),i.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!i.isEnabled)return!0;const n=p.get(e),o=r.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,i,n,o){"use strict";function r(e){(0,o.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,o.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),t.init=function(e,t,i,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected <textarea class="wysiwygTextarea" /> for id '${e}'.`);n.init(e,t,i,o),n.registerCallback(e,"select",r),n.registerCallback(e,"submit",a),n.registerCallback(e,"beforeSelect",a)}})),define("WoltLabSuite/Core/Media/Clipboard",["require","exports","tslib","../Controller/Clipboard","../Ui/Notification","../Ui/Dialog","../Event/Handler","../Language","../Ajax"],(function(e,t,i,n,o,r,a,s,l){"use strict";let c;Object.defineProperty(t,"__esModule",{value:!0}),t.setMediaManager=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l);let d=!1;const u=new class{_ajaxSetup(){return{data:{className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(e){switch(e.actionName){case"getSetCategoryDialog":r.open(this,e.returnValues.template);break;case"setCategory":r.close(this),o.show(),n.reload()}}_dialogSetup(){return{id:"mediaSetCategoryDialog",options:{onSetup:e=>{e.querySelector("button").addEventListener("click",(t=>{t.preventDefault();var i;i=~~e.querySelector('select[name="categoryID"]').value,l.api(u,{actionName:"setCategory",objectIDs:p,parameters:{categoryID:i}}),t.currentTarget.disabled=!0}))},title:s.get("wcf.media.setCategory")},source:null}}};let p=[];t.init=function(e,t,i){d||(n.setup({hasMarkedItems:t,pageClassName:e}),a.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",(e=>function(e){const t=e.data.parameters.objectIDs;switch(e.data.actionName){case"com.woltlab.wcf.media.delete":null!==e.responseData&&c.clipboardDeleteMedia(t);break;case"com.woltlab.wcf.media.insert":c.clipboardInsertMedia(t);break;case"com.woltlab.wcf.media.setCategory":p=t,l.api(u,{actionName:"getSetCategoryDialog"})}}(e))),d=!0),c=i},t.setMediaManager=function(e){c=e}})),define("WoltLabSuite/Core/Media/Upload",["require","exports","tslib","../Upload","../Core","../Dom/Util","../Language","../User","../Date/Util","../FileUtil","../Dom/Change/Listener","../Event/Handler"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u);class p extends n.default{_categoryId=null;_elementTagSize;_mediaManager;constructor(e,t,i){super(e,t,o.extend({className:"wcf\\data\\media\\MediaAction",multiple:!!i.mediaManager,singleFileRequests:!0},i||{})),i=i||{},this._elementTagSize=144,this._options.elementTagSize&&(this._elementTagSize=this._options.elementTagSize),this._mediaManager=null,this._options.mediaManager&&(this._mediaManager=this._options.mediaManager,delete this._options.mediaManager)}_createFileElement(e){let t;if("OL"===this._target.nodeName||"UL"===this._target.nodeName)t=document.createElement("li");else{if("TBODY"===this._target.nodeName){const i=this._target.getElementsByTagName("TR")[0],n=this._target.parentNode.parentNode;return"none"===n.style.getPropertyValue("display")?(t=i,n.style.removeProperty("display"),document.getElementById(this._target.dataset.noItemsInfo).remove()):(t=i.cloneNode(!0),t.removeAttribute("id"),r.identify(t)),Array.from(t.getElementsByTagName("TD")).forEach((t=>{if(t.classList.contains("columnMark"))t.querySelectorAll("[data-object-id]").forEach((e=>r.hide(e)));else if(t.classList.contains("columnIcon"))t.querySelectorAll("[data-object-id]").forEach((e=>r.hide(e))),t.querySelector(".mediaEditButton").classList.add("jsMediaEditButton"),t.querySelector(".jsObjectAction[data-object-action='delete']").dataset.confirmMessage=a.get("wcf.media.delete.confirmMessage",{title:e.name});else if(t.classList.contains("columnFilename")){let i=t.querySelector("img");i||(i=t.querySelector("fa-icon"));const n=document.createElement("span");n.innerHTML='<fa-icon size="48" name="spinner"></fa-icon>',n.classList.add("mediaThumbnail"),r.replaceElement(i,n);const o=t.querySelectorAll(".box48 > div > p");o[0].textContent=e.name;let a=o[1].getElementsByTagName("A")[0];a||(a=document.createElement("a"),o[1].getElementsByTagName("SMALL")[0].appendChild(a)),a.setAttribute("href",s.default.getLink()),a.textContent=s.default.username}else t.classList.contains("columnUploadTime")?(t.innerHTML="",t.appendChild(l.getTimeElement(new Date))):t.classList.contains("columnFilesize")?t.textContent=c.formatFilesize(e.size):t.classList.contains("columnDownloads")?t.textContent="0":t.innerHTML=""})),r.prepend(t,this._target),t}t=document.createElement("p")}const i=document.createElement("div");i.classList.add("mediaThumbnail"),t.appendChild(i);const n=document.createElement("fa-icon");n.size=144,n.setIcon("spinner"),i.appendChild(n);const o=document.createElement("div");o.className="mediaInformation",t.appendChild(o);const u=document.createElement("p");u.className="mediaTitle",u.textContent=e.name,o.appendChild(u);const p=document.createElement("progress");return p.max=100,o.appendChild(p),r.prepend(t,this._target),d.trigger(),t}_getParameters(){const e={elementTagSize:this._elementTagSize};if(this._mediaManager){e.imagesOnly=this._mediaManager.getOption("imagesOnly");const t=this._mediaManager.getCategoryId();t&&(e.categoryID=t)}return o.extend(super._getParameters(),e)}_replaceFileIcon(e,t,i){if(t.elementTag)e.outerHTML=t.elementTag;else if(t.tinyThumbnailType){const n=document.createElement("img");n.src=t.tinyThumbnailLink,n.alt="",n.style.setProperty("width",`${i}px`),n.style.setProperty("height",`${i}px`),r.replaceElement(e,n)}else{let i=c.getIconNameByFilename(t.filename);i=i?`file-${i}`:"file",e.setIcon(i,!1)}}_success(e,t){const i=this._fileElements[e];i.forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if("TR"===e.tagName)if(n)e.dataset.objectId=n.mediaID.toString(),e.querySelectorAll("[data-object-id]").forEach((e=>{e.dataset.objectId=n.mediaID.toString(),e.style.removeProperty("display")})),e.querySelector(".columnMediaID").textContent=n.mediaID.toString(),this._replaceFileIcon(e.querySelector(".columnFilename fa-icon"),n,48);else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename});const o=document.createElement("button");o.type="button",o.classList.add("jsTooltip"),o.title=a.get("wcf.global.button.delete"),o.addEventListener("click",(()=>{o.closest(".mediaFile").remove(),u.fire("com.woltlab.wcf.media.upload","removedErroneousUploadRow")}));const s=e.querySelector("fa-icon");s.setIcon("xmark"),s.insertAdjacentElement("beforebegin",o),o.append(s),e.classList.add("uploadFailed");const l=e.querySelectorAll(".columnFilename .box48 > div > p")[1];r.innerError(l,a.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})),l.remove()}else if(e.querySelector(".mediaInformation progress").remove(),n){const t=e.querySelector(".mediaThumbnail fa-icon");this._replaceFileIcon(t,n,144),e.classList.add("jsClipboardObject","mediaFile","jsObjectActionObject"),e.dataset.objectId=n.mediaID.toString(),this._mediaManager&&(this._mediaManager.setupMediaElement(n,e),this._mediaManager.addMedia(n,e))}else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename}),e.querySelector(".mediaThumbnail fa-icon").setIcon("xmark"),e.classList.add("uploadFailed","pointer","jsTooltip"),e.title=a.get("wcf.global.button.delete"),e.addEventListener("click",(()=>e.remove())),e.querySelector(".mediaInformation .mediaTitle").textContent=a.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})}d.trigger()})),u.fire("com.woltlab.wcf.media.upload","success",{files:i,isMultiFileUpload:-1!==this._multiFileUploadIds.indexOf(e),media:t.returnValues.media,upload:this,uploadId:e})}}return p})),define("WoltLabSuite/Core/Media/Replace",["require","exports","tslib","../Core","./Upload","../Language","../Dom/Util","../Ui/Notification","../Dom/Change/Listener"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);class c extends o.default{_mediaID;constructor(e,t,i,o){super(t,i,n.extend(o,{action:"replaceFile"})),this._mediaID=e}_createButton(){super._createButton(),this._button.classList.add("small"),this._button.querySelector("span").textContent=r.get("wcf.media.button.replaceFile")}_createFileElement(){return this._target}_getFormData(){return{objectIDs:[this._mediaID]}}_success(e,t){this._fileElements[e].forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if(n)n.isImage&&(this._target.innerHTML=n.smallThumbnailTag),document.getElementById("mediaFilename").textContent=n.filename,document.getElementById("mediaFilesize").textContent=n.formattedFilesize,n.isImage&&(document.getElementById("mediaImageDimensions").textContent=n.imageDimensions),document.getElementById("mediaUploader").innerHTML=n.userLinkElement,this._options.mediaEditor.updateData(n),a.default.innerError(this._buttonContainer,""),s.show();else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename}),a.default.innerError(this._buttonContainer,r.get("wcf.media.upload.error."+n.errorType,{filename:n.filename}))}l.trigger()}))}}return c})),define("WoltLabSuite/Core/Media/Editor",["require","exports","tslib","../Ui/Notification","../Ui/Dialog","../Language/Chooser","../Language/Input","../Dom/Util","../Dom/Traverse","../Dom/Change/Listener","../Language","../Ajax","./Replace"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c),d=i.__importStar(d),u=i.__importStar(u),p=i.__importDefault(p),class{_availableLanguageCount=1;_categoryIds=[];_dialogs=new Map;_callbackObject;_media=null;_oldCategoryId=0;constructor(e){if(this._callbackObject=e||{},this._callbackObject._editorClose&&"function"!=typeof this._callbackObject._editorClose)throw new TypeError("Callback object has no function '_editorClose'.");if(this._callbackObject._editorSuccess&&"function"!=typeof this._callbackObject._editorSuccess)throw new TypeError("Callback object has no function '_editorSuccess'.")}_ajaxSetup(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(){n.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),o.close(`mediaEditor_${this._media.mediaID}`),this._media=null}_close(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()}_initEditor(e,t){this._availableLanguageCount=~~t.returnValues.availableLanguageCount,this._categoryIds=t.returnValues.categoryIDs.map((e=>~~e)),t.returnValues.mediaData&&(this._media=t.returnValues.mediaData);const i=this._media,n=i.mediaID;setTimeout((()=>{if(this._availableLanguageCount>1&&r.setLanguageId(`mediaEditor_${n}_languageID`,i.languageID||window.LANGUAGE_ID),this._categoryIds.length){const t=e.querySelector("select[name=categoryID]");i.categoryID?t.value=i.categoryID.toString():t.value="0"}const t=e.querySelector("input[name=title]"),o=e.querySelector("input[name=altText]"),l=e.querySelector("textarea[name=caption]");if(this._availableLanguageCount>1&&i.isMultilingual?(document.getElementById(`altText_${n}`)&&a.setValues(`altText_${n}`,i.altText||{}),document.getElementById(`caption_${n}`)&&a.setValues(`caption_${n}`,i.caption||{}),a.setValues(`title_${n}`,i.title||{})):(t.value=i.title?i.title[i.languageID||window.LANGUAGE_ID]:"",o&&(o.value=i.altText?i.altText[i.languageID||window.LANGUAGE_ID]:""),l&&(l.value=i.caption?i.caption[i.languageID||window.LANGUAGE_ID]:"")),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");t.addEventListener("change",(e=>this._updateLanguageFields(e))),this._updateLanguageFields(null,t)}o&&o.addEventListener("keypress",(e=>this._keyPress(e))),t.addEventListener("keypress",(e=>this._keyPress(e))),e.querySelector("button[data-type=submit]").addEventListener("click",(()=>this._saveData())),document.activeElement.blur(),document.getElementById(`mediaEditor_${n}`).parentNode.scrollTop=0;const d=e.querySelector(".mediaManagerMediaReplaceButton");let u=e.querySelector(".mediaThumbnail");u||(u=document.createElement("div"),e.appendChild(u)),new p.default(n,s.identify(d),s.identify(u),{mediaEditor:this}),c.default.trigger()}),200)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._saveData())}_saveData(){const e=o.getDialog(`mediaEditor_${this._media.mediaID}`).content,t=e.querySelector("select[name=categoryID]"),i=e.querySelector("input[name=altText]"),n=e.querySelector("textarea[name=caption]"),c=e.querySelector("input[name=captionEnableHtml]"),p=e.querySelector("input[name=title]");let m=!1;const h=!!i&&l.childByClass(i.parentNode,"innerError"),f=!!n&&l.childByClass(n.parentNode,"innerError"),g=l.childByClass(p.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~t.value,-1===this._categoryIds.indexOf(this._media.categoryID)&&(this._media.categoryID=0)),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");this._media.isMultilingual=~~t.checked,this._media.languageID=this._media.isMultilingual?null:r.getLanguageId(`mediaEditor_${this._media.mediaID}_languageID`)}else this._media.languageID=window.LANGUAGE_ID;this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual?(i&&!a.validate(i.id,!0)&&(m=!0,h||s.innerError(i,d.get("wcf.global.form.error.multilingual"))),n&&!a.validate(n.id,!0)&&(m=!0,f||s.innerError(n,d.get("wcf.global.form.error.multilingual"))),a.validate(p.id,!0)||(m=!0,g||s.innerError(p,d.get("wcf.global.form.error.multilingual"))),this._media.altText=i?this.mapToI18nValues(a.getValues(i.id)):"",this._media.caption=n?this.mapToI18nValues(a.getValues(n.id)):"",this._media.title=this.mapToI18nValues(a.getValues(p.id))):(this._media.altText[this._media.languageID]=i?i.value:"",this._media.caption[this._media.languageID]=n?n.value:"",this._media.title[this._media.languageID]=p.value),this._media.captionEnableHtml=c?~~c.checked:0;const b={allowAll:~~document.getElementById(`mediaEditor_${this._media.mediaID}_aclAllowAll`).checked,group:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[group][]"]`)).map((e=>~~e.value)),user:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[user][]"]`)).map((e=>~~e.value))};m||(h&&h.remove(),f&&f.remove(),g&&g.remove(),u.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{aclValues:b,altText:this._media.altText,caption:this._media.caption,data:{captionEnableHtml:this._media.captionEnableHtml,categoryID:this._media.categoryID,isMultilingual:this._media.isMultilingual,languageID:this._media.languageID},title:this._media.title}}))}mapToI18nValues(e){const t={};return e.forEach(((e,i)=>t[i]=e)),t}_updateLanguageFields(e,t){e&&(t=e.currentTarget);const i=this._media.mediaID,n=document.getElementById(`mediaEditor_${i}_languageIDContainer`).parentNode;t.checked?(a.enable(`title_${i}`),document.getElementById(`caption_${i}`)&&a.enable(`caption_${i}`),document.getElementById(`altText_${i}`)&&a.enable(`altText_${i}`),s.hide(n)):(a.disable(`title_${i}`),document.getElementById(`caption_${i}`)&&a.disable(`caption_${i}`),document.getElementById(`altText_${i}`)&&a.disable(`altText_${i}`),s.show(n))}edit(e){let t,i=0;if("object"==typeof e?(t=e,i=t.mediaID):(t={mediaID:e},i=e),null!==this._media)throw new Error(`Cannot edit media with id ${i} while editing media with id '${this._media.mediaID}'.`);this._media=t,this._dialogs.has(`mediaEditor_${i}`)||this._dialogs.set(`mediaEditor_${i}`,{_dialogSetup:()=>({id:`mediaEditor_${i}`,options:{backdropCloseOnClick:!1,onClose:()=>this._close(),title:d.get("wcf.media.edit")},source:{after:(e,t)=>this._initEditor(e,t),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[i]}}})}),o.open(this._dialogs.get(`mediaEditor_${i}`))}updateData(e){this._callbackObject._editorSuccess&&this._callbackObject._editorSuccess(e,void 0,!1)}}})),define("WoltLabSuite/Core/Notification/Handler",["require","exports","tslib","../Ajax","../Core","../Event/Handler"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poll=t.enableNotifications=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);class a{allowNotification;icon;inactiveSince=0;lastRequestTimestamp=window.TIME_NOW;requestTimer=void 0;constructor(e){e=o.extend({icon:""},e),this.icon=e.icon,this.prepareNextRequest(),document.addEventListener("visibilitychange",(e=>this.onVisibilityChange(e))),window.addEventListener("storage",(()=>this.onStorage())),this.onVisibilityChange(),"Notification"in window&&"granted"===Notification.permission&&(this.allowNotification=!0)}enableNotifications(){this.allowNotification=!0}onVisibilityChange(e){e&&!document.hidden&&(Date.now()-this.inactiveSince)/6e4>4&&(this.resetTimer(),this.dispatchRequest()),this.inactiveSince=document.hidden?Date.now():0}getNextDelay(){if(0===this.inactiveSince)return 5;const e=~~((Date.now()-this.inactiveSince)/6e4);return e<15?5:e<30?10:15}resetTimer(){this.requestTimer&&(window.clearTimeout(this.requestTimer),this.requestTimer=void 0)}prepareNextRequest(){this.resetTimer(),this.requestTimer=window.setTimeout((()=>this.dispatchRequest()),6e4*this.getNextDelay())}dispatchRequest(){const e={};r.fire("com.woltlab.wcf.notification","beforePoll",e),e.lastRequestTimestamp=this.lastRequestTimestamp,n.api(this,{parameters:e})}onStorage(){let e,t;this.prepareNextRequest();let i=!1;try{e=window.localStorage.getItem(o.getStoragePrefix()+"notification"),t=window.localStorage.getItem(o.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),t=JSON.parse(t)}catch(e){i=!0}i||r.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:t})}_ajaxSuccess(e){const t=e.returnValues.keepAliveData,i=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks({returnValues:t});let n=!1;try{window.localStorage.setItem(o.getStoragePrefix()+"notification",JSON.stringify(i)),window.localStorage.setItem(o.getStoragePrefix()+"keepAliveData",JSON.stringify(t))}catch(e){n=!0,window.console.log(e)}n||this.prepareNextRequest(),this.lastRequestTimestamp=e.returnValues.lastRequestTimestamp,r.fire("com.woltlab.wcf.notification","afterPoll",i),this.showNotification(i)}showNotification(e){if(this.allowNotification&&"object"==typeof e.notification&&"string"==typeof e.notification.message){let t;const i=document.createElement("div");i.innerHTML=e.notification.message,i.querySelectorAll("img").forEach((e=>{e.replaceWith(document.createTextNode(e.alt))}));try{t=new window.Notification(e.notification.title,{body:i.textContent,icon:this.icon})}catch(e){if(e instanceof Error&&"TypeError"===e.name)return;throw e}t.onclick=()=>{window.focus(),t.close(),window.location.href=e.notification.link}}}_ajaxSetup(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}let s;t.setup=function(e){s||(s=new a(e))},t.enableNotifications=function(){s.enableNotifications()},t.poll=function(){s?.dispatchRequest()}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Ui/Suggestion",["require","exports","tslib","../Ajax","../Core","./Dropdown/Simple"],(function(e,t,i,n,o,r){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),class{ajaxPayload;callbackSelect;dropdownMenu=null;excludedSearchValues;element;threshold;value="";constructor(e,t){const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id.");if(this.element=i,this.ajaxPayload=o.extend({actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},t.ajax),"function"!=typeof t.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this.callbackSelect=t.callbackSelect,this.excludedSearchValues=new Set(Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[]),this.threshold=void 0===t.threshold?3:t.threshold,this.element.addEventListener("click",(e=>e.preventDefault())),this.element.addEventListener("keydown",(e=>this.keyDown(e))),this.element.addEventListener("keyup",(e=>this.keyUp(e)))}addExcludedValue(e){this.excludedSearchValues.add(e)}removeExcludedValue(e){this.excludedSearchValues.delete(e)}isActive(){return null!==this.dropdownMenu&&r.default.isOpen(this.element.id)}keyDown(e){if(!this.isActive())return!0;if(-1===["ArrowDown","ArrowUp","Enter","Escape"].indexOf(e.key))return!0;let t,i=0;const n=this.dropdownMenu.childElementCount;for(;i<n&&(t=this.dropdownMenu.children[i],!t.classList.contains("active"));)i++;if("Enter"===e.key)r.default.close(this.element.id),this.select(void 0,t);else if("Escape"===e.key){if(!r.default.isOpen(this.element.id))return!0;r.default.close(this.element.id)}else{let o=0;"ArrowUp"===e.key?o=(0===i?n:i)-1:"ArrowDown"===e.key&&(o=i+1,o===n&&(o=0)),o!==i&&(t.classList.remove("active"),this.dropdownMenu.children[o].classList.add("active"))}return e.preventDefault(),!1}select(e,t){e instanceof MouseEvent&&(t=e.currentTarget.parentNode);const i=t.children[0];this.callbackSelect(this.element.id,{objectId:+(i.dataset.objectId||0),value:t.textContent||"",type:i.dataset.type||""}),e instanceof MouseEvent&&this.element.focus()}keyUp(e){const t=e.currentTarget.value.trim();if(this.value!==t){if(t.length<this.threshold)return null!==this.dropdownMenu&&r.default.close(this.element.id),void(this.value=t);this.value=t,n.api(this,{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:t}}})}}_ajaxSetup(){return{data:this.ajaxPayload}}_ajaxSuccess(e){null===this.dropdownMenu?(this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="dropdownMenu",r.default.initFragment(this.element,this.dropdownMenu)):this.dropdownMenu.innerHTML="",Array.isArray(e.returnValues)&&e.returnValues.length>0?(e.returnValues.forEach(((e,t)=>{const i=document.createElement("a");e.icon?(i.className="box16",i.innerHTML=`${e.icon} <span></span>`,i.children[1].textContent=e.label):i.textContent=e.label,i.dataset.objectId=e.objectID.toString(),e.type&&(i.dataset.type=e.type),i.addEventListener("click",(e=>this.select(e)));const n=document.createElement("li");0===t&&(n.className="active"),n.appendChild(i),this.dropdownMenu.appendChild(n)})),r.default.open(this.element.id,!0)):r.default.close(this.element.id)}}})),define("WoltLabSuite/Core/Ui/ItemList",["require","exports","tslib","../Core","../Dom/Traverse","../Language","./Suggestion","./Dropdown/Simple","../Dom/Util"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e){const t=y.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems}function d(e){const t=y.get(e);c(e)?(l.default.show(t.element),l.default.hide(t.limitReached),t.list.dataset.acceptsNewItems="true"):(l.default.hide(t.element),l.default.show(t.limitReached),t.list.dataset.acceptsNewItems="false")}function u(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?b(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}function p(e){if("Enter"===e.key){e.preventDefault();const t=e.currentTarget;if(y.get(t.id).options.restricted)return;const i=t.value.trim();i.length&&g(t.id,{objectId:0,value:i})}}function m(e){const t=e.currentTarget;if(y.get(t.id).options.restricted)return;let i=t.value;i.includes(",")&&(i=i.replace(/,/g,""),i.length?g(t.id,{objectId:0,value:i}):t.value=i)}function h(e){e.preventDefault();const t=e.clipboardData.getData("text/plain"),i=e.currentTarget,n=i.id,o=+i.maxLength;t.split(/,/).forEach((e=>{e=e.trim(),-1!==o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&c(n)&&g(n,{objectId:0,value:e})}))}function f(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}function g(e,t){const i=y.get(e),n=document.createElement("li");n.className="item";const o=document.createElement("span");if(o.className="content",o.dataset.objectId=t.objectId.toString(),t.type&&(o.dataset.type=t.type),o.textContent=t.value,n.appendChild(o),!i.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",b),n.appendChild(e)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||d(e);let r=v(i);"function"==typeof i.options.callbackChange&&(null===r&&(r=w(e)),i.options.callbackChange(e,r))}function b(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const i=e.parentElement.dataset.elementId||"",n=y.get(i);e.children[0].textContent&&n.suggestion.removeExcludedValue(e.children[0].textContent),e.remove(),t||n.element.focus(),d(i);let o=v(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=w(i)),n.options.callbackChange(i,o))}function v(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);const t=w(e.element.id);return e.shadow.value=w(e.element.id).map((e=>e.value)).join(","),t}function _(e){const t=e.currentTarget,i=y.get(t.id);if(i.options.restricted)return;const n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||g(t.id,{objectId:0,value:n}))}function w(e){const t=y.get(e);if(!t)throw new Error("Element id '"+e+"' is unknown.");const i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:+(e.dataset.objectId||""),value:e.textContent.trim(),type:e.dataset.type})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importDefault(s),l=i.__importDefault(l);const y=new Map;t.init=function(e,t,i){const d=document.getElementById(e);if(null===d)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(y.has(e)){const t=y.get(e);Object.keys(t).forEach((e=>{const i=t[e];i instanceof Element&&i.parentNode&&i.remove()})),s.default.destroy(e),y.delete(e)}const b=n.extend({ajax:{actionName:"getSearchResultList",className:"",parameters:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},i),v=o.parentByTag(d,"FORM");if(null!==v)if(b.isCSV)v.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}}));else{if(!b.submitFieldName.length&&"function"!=typeof b.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");v.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}const t=w(e);b.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=b.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,v.appendChild(t)})):b.callbackSubmit(v,t)}))}const E=function(e,t){const i=e.parentElement,n=document.createElement("ol");n.className="inputItemList"+(e.disabled?" disabled":""),n.dataset.acceptsNewItems="true",n.dataset.elementId=e.id,n.addEventListener("click",(t=>{t.target===n&&e.focus()}));const o=document.createElement("li");o.className="input",n.appendChild(o),e.addEventListener("input",m),e.addEventListener("keydown",u),e.addEventListener("keypress",p),e.addEventListener("keyup",f),e.addEventListener("paste",h);const a=e===document.activeElement;a&&e.blur(),e.addEventListener("blur",_),i.insertBefore(n,e),o.appendChild(e),a&&window.setTimeout((()=>{e.focus()}),1),-1!==t.maxLength&&(e.maxLength=t.maxLength);const s=document.createElement("span");s.className="inputItemListLimitReached",s.textContent=r.get("wcf.global.form.input.maxItems"),l.default.hide(s),o.appendChild(s);let c=null;const d=[];if(t.isCSV&&(c=document.createElement("input"),c.className="itemListInputShadow",c.type="hidden",c.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(c,n),e.value.split(",").forEach((e=>{(e=e.trim())&&d.push(e)})),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentNode.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,limitReached:s,list:n,shadow:c,values:d}}(d,b),S=new a.default(e,{ajax:b.ajax,callbackSelect:g,excludedSearchValues:b.excludedSearchValues});y.set(e,{dropdownMenu:null,element:E.element,limitReached:E.limitReached,list:E.list,listItem:E.element.parentElement,options:b,shadow:E.shadow,suggestion:S}),t=b.callbackSetupValues?b.callbackSetupValues():E.values.length?E.values:t,Array.isArray(t)&&t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),g(e,t)}))},t.getValues=w,t.setValues=function(e,t){const i=y.get(e);if(!i)throw new Error("Element id '"+e+"' is unknown.");o.childrenByClass(i.list,"item").forEach((e=>{b(e,!0)})),t.forEach((t=>{g(e,t)}))}})),define("WoltLabSuite/Core/Ui/Pagination",["require","exports"],(function(e,t){"use strict";return class{#R;#W;#V;constructor(e,t){"function"==typeof t.callbackSwitch&&(this.#R=t.callbackSwitch),"function"==typeof t.callbackShouldSwitch&&(this.#W=t.callbackShouldSwitch),this.#V=document.createElement("woltlab-core-pagination"),this.#V.count=t.maxPage,this.#V.page=t.activePage,e.append(this.#V),this.#$()}#$(){this.#V.addEventListener("switchPage",(e=>{void 0===this.#W||!1!==this.#W(e.detail)?this.#R&&this.#R(e.detail):e.preventDefault()}))}getActivePage(){return this.#V.page}getElement(){return this.#V.parentElement}getMaxPage(){return this.#V.count}switchPage(e,t){if(t instanceof MouseEvent){t.preventDefault();const e=t.currentTarget;if(e&&e.dataset.tooltip){const t=document.getElementById("balloonTooltip");if(t){const i=new Event("mouseleave",{bubbles:!0,cancelable:!0});e.dispatchEvent(i),t.style.removeProperty("top"),t.style.removeProperty("bottom")}}}if((e=~~e)>0&&this.#V.page!==e&&e<=this.#V.count){if(void 0!==this.#W&&!this.#W(e))return;this.#V.jumpToPage(e),void 0!==this.#R&&this.#R(e)}}}})),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["require","exports","https://connect.facebook.net/en_US/sdk.js"],(function(e,t){"use strict";return FB.init({version:"v7.0"}),FB})),define("WoltLabSuite/Core/Component/Comment/GuestDialog",["require","exports","tslib","../../Controller/Captcha","../../Language","../Dialog"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showGuestDialog=void 0,n=i.__importDefault(n),t.showGuestDialog=function(e){const t="commentAdd",i=(0,r.dialogFactory)().fromHtml(e).asPrompt();i.show((0,o.getPhrase)("wcf.comment.guestDialog.title"));const a=i.content.querySelector("input[name=username]");return i.incomplete=""===a.value.trim(),a.addEventListener("input",(()=>{i.incomplete=""===a.value.trim()})),i.addEventListener("afterClose",(()=>{n.default.has(t)&&n.default.delete(t)})),new Promise((e=>{const o=n.default.setupDialog(i,t);i.addEventListener("primary",(()=>{const t={data:{username:a.value}};o.then((i=>{e({...t,...i})}))})),i.addEventListener("cancel",(()=>{e(void 0)}))}))}})),define("WoltLabSuite/Core/Component/Comment/Add",["require","exports","tslib","../../Ajax","../../Ui/Scroll","../../Ui/Notification","../../Language","../../Event/Handler","../../Dom/Util","./GuestDialog","../../Core","../Ckeditor","../Ckeditor/Event"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentAdd=void 0,o=i.__importStar(o),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),d=i.__importStar(d),t.CommentAdd=class{#z;#l;#G;#Y;#X;#Q;#K;#J;#U;constructor(e,t,i,n){this.#z=e,this.#l=this.#z.querySelector(".commentAdd__content"),this.#G=this.#z.querySelector(".commentAdd__editor"),this.#Y=this.#z.querySelector(".wysiwygTextarea"),this.#X=t,this.#Q=i,this.#K=this.#z.querySelector(".commentAdd__placeholder"),this.#J=n,this.#Z()}#Z(){this.#K.addEventListener("click",(e=>{this.#l.classList.contains("commentAdd__content--collapsed")&&(e.preventDefault(),this.#l.classList.remove("commentAdd__content--collapsed"),this.#z.classList.remove("commentAdd--collapsed"),this.#K.hidden=!0,this.#G.hidden=!1,this.#ee())})),this.#z.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#te()})),(0,p.listenToCkeditor)(this.#Y).setupFeatures((({features:e})=>{e.heading=!1,e.quoteBlock=!1,e.spoiler=!1,e.table=!1}))}#ee(){window.setTimeout((()=>{o.element(this.#z,(()=>{this.#ie().focus()}))}),0)}#ne(){this.#z.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#ie().getHtml();if(""===e)return this.#oe(this.#ie().element,(0,a.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#ie(),message:e,valid:!0};return s.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#te(e={}){if(!this.#ne())return;this.#re();const t=this.#ae();let i;s.fire("com.woltlab.wcf.ckeditor5","submit_text",t.data);try{i=await(0,n.dboAction)("addComment","wcf\\data\\comment\\CommentAction").payload(d.extend(t,e)).disableLoadingIndicator().dispatch()}catch(e){return void await(0,n.handleValidationErrors)(e,(e=>(this.#oe(this.#ie().element,e.errorType),this.#se(),!0)))}if(i.guestDialog){const e=await(0,c.showGuestDialog)(i.guestDialog);void 0===e?this.#se():this.#te(e)}else this.#J(i.template),r.show((0,a.getPhrase)("wcf.global.success.add")),this.#le(),this.#se()}#ie(){return void 0===this.#U&&(this.#U=(0,u.getCkeditor)(this.#Y)),this.#U}#re(){if(this.#l.classList.contains("commentAdd__content--loading"))return;const e=document.createElement("div");e.className="commentAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#l.classList.add("commentAdd__content--loading"),this.#l.appendChild(e)}#oe(e,t){l.default.innerError(e,"empty"===t?(0,a.getPhrase)("wcf.global.form.error.empty"):t)}#ae(){return{data:{message:this.#ie().getHtml(),objectID:this.#Q,objectTypeID:this.#X}}}#le(){this.#ie().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#l.classList.add("commentAdd__content--collapsed"),this.#z.classList.add("commentAdd--collapsed"),this.#G.hidden=!0,this.#K.hidden=!1}#se(){this.#l.classList.remove("commentAdd__content--loading");const e=this.#l.querySelector(".commentAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Component/Comment/Response/Add",["require","exports","tslib","../../../Dom/Util","../../../Language","../../../Event/Handler","../../../Ui/Scroll","../../../Ajax","../../../Core","../../../Ui/Notification","../../../Ajax/Error","../GuestDialog","../../Ckeditor","../../Ckeditor/Event"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentResponseAdd=void 0,n=i.__importDefault(n),r=i.__importStar(r),a=i.__importStar(a),l=i.__importStar(l),c=i.__importStar(c),t.CommentResponseAdd=class{container;#l;#Y;#J;#ce=new Map;#U;#de;constructor(e,t){this.container=e,this.#l=this.container.querySelector(".commentResponseAdd__content"),this.#Y=this.container.querySelector(".wysiwygTextarea"),this.#J=t,this.#Z()}#Z(){this.container.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#te()})),(0,m.listenToCkeditor)(this.#Y).setupFeatures((({features:e})=>{e.heading=!1,e.quoteBlock=!1,e.spoiler=!1,e.table=!1}))}show(e){this.#de&&this.#ce.set(this.#de,this.#ue()),this.#pe(this.#ce.get(e)||""),this.#de=e,this.container.hidden=!1}#ne(){this.container.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#ie().getHtml();if(""===e)return this.#oe(this.#ie().element,(0,o.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#ie(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#te(e={}){if(!this.#ne())return;this.#re();const t=this.#ae();let i;r.fire("com.woltlab.wcf.ckeditor","submit_text",t.data);try{i=await(0,s.dboAction)("addResponse","wcf\\data\\comment\\CommentAction").objectIds([this.#de]).payload(l.extend(t,e)).disableLoadingIndicator().dispatch()}catch(e){if(!(e instanceof d.StatusNotOk))throw e;{const t=await e.response.clone().json();412===t.code&&t.returnValues&&this.#oe(this.#ie().element,t.returnValues.errorType)}return void this.#se()}if(i.guestDialog){const e=await(0,u.showGuestDialog)(i.guestDialog);void 0===e?this.#se():this.#te(e)}else this.#J(this.#de,i.template),c.show((0,o.getPhrase)("wcf.global.success.add")),this.#le(),this.#se()}#le(){this.#ie().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#ce.delete(this.#de),this.container.hidden=!0}#oe(e,t){n.default.innerError(e,"empty"===t?(0,o.getPhrase)("wcf.global.form.error.empty"):t)}#ie(){return void 0===this.#U&&(this.#U=(0,p.getCkeditor)(this.#Y)),this.#U}#ue(){return this.#ie().getHtml()}#pe(e){this.#ie().setHtml(e);const t=this.#Y.parentElement.querySelector(".innerError");null!==t&&t.remove(),this.#ee()}#ee(){window.setTimeout((()=>{a.element(this.container,(()=>{this.#ie().focus()}))}),0)}#ae(){return{data:{message:this.#ue()}}}#re(){if(this.#l.classList.contains("commentResponseAdd__content--loading"))return;const e=document.createElement("div");e.className="commentResponseAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#l.classList.add("commentResponseAdd__content--loading"),this.#l.appendChild(e)}#se(){this.#l.classList.remove("commentResponseAdd__content--loading");const e=this.#l.querySelector(".commentResponseAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Ui/Reaction/Handler",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../Alignment","../CloseOverlay","../Screen","focus-trap"],(function(e,t,i,n,o,r,a,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c);const u=Object.values(window.REACTION_TYPES);return class{activeButton=void 0;_cache=new Map;focusTrap=void 0;_containers=new Map;_options;_objects=new Map;_objectType;_popoverCurrentObjectId=0;_popover;_popoverContent;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._popover=null,this._popoverContent=null,this._options=o.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},t),this.initReactButtons(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/Handler-${e}`,(()=>this.initReactButtons())),l.default.add("WoltLabSuite/Core/Ui/Reaction/Handler",(()=>this._closePopover()))}initReactButtons(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=a.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,objectId:n,element:t};this._containers.set(i,o),this._initReactButton(t,o);const r=this._objects.get(n)||[];r.push(o),this._objects.set(n,r),e=!0})),e&&r.default.trigger()}_initReactButton(e,t){if(this._options.isSingleItem?t.reactButton=document.querySelector(this._options.buttonSelector):t.reactButton=e.querySelector(this._options.buttonSelector),null!==t.reactButton){if(1===u.length){const e=u[0];t.reactButton.title=e.title,t.reactButton.querySelector(".invisible").textContent=e.title}t.reactButton.setAttribute("role","button"),u.length>1&&(t.reactButton.setAttribute("aria-haspopup","true"),t.reactButton.setAttribute("aria-expanded","false")),t.reactButton.addEventListener("click",(e=>{this._toggleReactPopover(t.objectId,t.reactButton,e)})),t.reactButton.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleReactPopover(t.objectId,t.reactButton,null))}))}}_updateReactButton(e,t){this._objects.get(e).forEach((e=>{null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),e.reactButton.dataset.reactionTypeId=t.toString()):(e.reactButton.dataset.reactionTypeId="0",e.reactButton.classList.remove("active")))}))}_markReactionAsActive(){let e=null;for(const t of this._objects.get(this._popoverCurrentObjectId))null!==t.reactButton&&(e=~~t.reactButton.dataset.reactionTypeId);if(null===e)throw new Error("Unable to find react button for current popover.");const t=this._getPopover();t.querySelectorAll(".reactionTypeButton.active").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-selected")}));const i=t.querySelector(".reactionPopoverContent");if(e){const n=t.querySelector(`.reactionTypeButton[data-reaction-type-id="${e}"]`);n.classList.add("active"),n.setAttribute("aria-selected","true"),0==~~n.dataset.isAssignable&&a.default.show(n),this._scrollReactionIntoView(i,n)}else c.is("screen-xs")&&(t.classList.contains("inverseOrder")?i.scrollTop=0:i.scrollTop=i.scrollHeight-i.clientHeight)}_scrollReactionIntoView(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2}_toggleReactPopover(e,t,i){if(null!==i&&(i.preventDefault(),i.stopPropagation()),1===u.length){const t=u[0];this._popoverCurrentObjectId=e,this._react(t.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover()}_openReactPopover(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,s.set(this._getPopover(),t,{pointer:!0,horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:c.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");const i=this._getPopover();"auto"===i.style.getPropertyValue("bottom")?i.classList.add("inverseOrder"):i.classList.remove("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),i.classList.remove("forceHide"),i.classList.add("active"),this.activeButton=t,u.length>1&&this.activeButton.setAttribute("aria-expanded","true"),this.getFocusTrap().activate()}_getPopover(){if(null==this._popover){this._popover=document.createElement("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=document.createElement("div"),this._popoverContent.className="reactionPopoverContent";const e=document.createElement("ul");e.className="reactionTypeButtonList",this._getSortedReactionTypes().forEach((t=>{const i=document.createElement("li");i.tabIndex=0,i.setAttribute("role","button"),i.className="reactionTypeButton jsTooltip",i.dataset.reactionTypeId=t.reactionTypeID.toString(),i.dataset.title=t.title,i.dataset.isAssignable=t.isAssignable.toString(),i.title=t.title;const n=document.createElement("span");n.className="reactionTypeButtonTitle",n.innerHTML=t.title,i.innerHTML=t.renderedIcon,i.appendChild(n),i.addEventListener("click",(()=>this._react(t.reactionTypeID))),i.addEventListener("keydown",(e=>this.keydown(e))),t.isAssignable||a.default.hide(i),e.appendChild(i)})),this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",(()=>this._rebuildOverflowIndicator()),{passive:!0}),this._popover.appendChild(this._popoverContent);const t=document.createElement("span");t.className="elementPointer",t.appendChild(document.createElement("span")),this._popover.appendChild(t),document.body.appendChild(this._popover),r.default.trigger()}return this._popover}keydown(e){if("Enter"===e.key||" "===e.key){e.preventDefault();const t=this.activeButton,i=~~e.currentTarget.dataset.reactionTypeId;this._react(i),t.focus()}}_rebuildOverflowIndicator(){const e=this._popoverContent;e.scrollTop>0?e.classList.add("overflowTop"):e.classList.remove("overflowTop"),e.scrollTop+e.clientHeight<e.scrollHeight?e.classList.add("overflowBottom"):e.classList.remove("overflowBottom")}_getSortedReactionTypes(){return u.sort(((e,t)=>e.showOrder-t.showOrder))}_closePopover(){if(0!==this._popoverCurrentObjectId){const e=this._getPopover();e.classList.remove("active"),e.querySelectorAll('.reactionTypeButton[data-is-assignable="0"]').forEach((e=>a.default.hide(e))),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach((e=>{e.reactButton.closest("nav").style.cssText=""})),u.length>1&&this.activeButton.setAttribute("aria-expanded","false"),this.activeButton=void 0,this._popoverCurrentObjectId=0,this.getFocusTrap().deactivate()}}_react(e){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=e,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters}),this._closePopover())}_ajaxSuccess(e){const t=~~e.returnValues.objectID,i=new Map;Object.entries(e.returnValues.reactions).forEach((([e,t])=>{i.set(parseInt(e),t)}));const n=document.querySelector(`woltlab-core-reaction-summary[object-type="${this._objectType}"][object-id="${t}"]`);n?.setData(i,e.returnValues.reactionTypeID),this._updateReactButton(t,e.returnValues.reactionTypeID)}_ajaxSetup(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,d.createFocusTrap)(this._popover,{allowOutsideClick:!0,escapeDeactivates:()=>(this._closePopover(),!1),preventScroll:!0})),this.focusTrap}}})),define("WoltLabSuite/Core/Component/Comment/List",["require","exports","tslib","../../Ajax","../../Dom/Change/Listener","../../Dom/Util","../../Helper/Selector","../../Language","./Add","./Response/Add","../../Ui/Scroll","../../Ui/Reaction/Handler"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=i.__importDefault(o),r=i.__importDefault(r),d=i.__importStar(d),u=i.__importDefault(u);class p{#z;#me;constructor(e){this.#z=e,this.#he(),this.#fe(),this.#ge(),this.#be(),this.#ve(),this.#_e()}#_e(){"true"===this.#z.dataset.enableReactions&&(new u.default("com.woltlab.wcf.comment",{containerSelector:`#${this.#z.id} .commentList__item`,buttonSelector:".comment__button--react"}),new u.default("com.woltlab.wcf.comment.response",{containerSelector:`#${this.#z.id} .commentResponseList__item`,buttonSelector:".commentResponse__button--react"}))}#ve(){window.addEventListener("hashchange",(()=>{this.#we()})),this.#we()}#we(){const e=window.location.hash.match(/^#(?:[^/]+\/)?comment(\d+)(?:\/response(\d+))?/);if(e){const t=this.#z.querySelector(`.commentList__item[data-comment-id="${e[1]}"]`);if(t)if(e[2]){const i=this.#z.querySelector(`.commentResponseList__item[data-response-id="${e[2]}"]`);i?this.#ye(i,!0):this.#Ee(t,parseInt(e[2]))}else this.#ye(t,!0);else this.#Se(parseInt(e[1]),e[2]?parseInt(e[2]):0)}}async#Se(e,t){let i,o=this.#z.querySelector(".commentPermalink");o&&o.remove(),o=document.createElement("div"),o.classList.add("commentList__item","commentPermalink","commentPermalink--loading"),o.innerHTML='<woltlab-core-loading-indicator size="48" hide-text></woltlab-core-loading-indicator>',this.#z.querySelector(".commentList")?.prepend(o);try{i=await(0,n.dboAction)("loadComment","wcf\\data\\comment\\CommentAction").objectIds([e]).payload({responseID:t,objectTypeID:this.#z.dataset.objectTypeId}).dispatch()}catch(e){return void await(0,n.handleValidationErrors)(e,(()=>(o.remove(),!0)))}const{template:a,response:s}=i;r.default.insertHtml(a,o,"before"),o.remove();const l=this.#z.querySelector(`.commentList__item[data-comment-id="${e}"]`);if(l.classList.add("commentPermalink"),s){const e=document.createElement("div");e.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),e.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',l.querySelector(".commentResponseList").prepend(e),this.#Le(s)}else this.#ye(l,!0)}#Le(e){const t=this.#z.querySelector(".commentResponsePermalink");r.default.insertHtml(e,t,"before");const i=t.previousElementSibling;t.classList.add("commentResponsePermalink"),t.remove(),this.#ye(i,!0)}async#Ee(e,t){let i,o=e.querySelector(".commentResponsePermalink");o&&o.remove(),o=document.createElement("div"),o.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),o.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',e.querySelector(".commentResponseList").prepend(o);try{i=await(0,n.dboAction)("loadResponse","wcf\\data\\comment\\CommentAction").payload({responseID:t,objectTypeID:this.#z.dataset.objectTypeId}).dispatch()}catch(e){return void await(0,n.handleValidationErrors)(e,(()=>(o.remove(),!0)))}this.#Le(i.template)}#ye(e,t=!1){d.element(e,(()=>{t&&(e.classList.contains("comment__highlight__target")&&e.classList.remove("comment__highlight__target"),e.classList.add("comment__highlight__target"))}))}#be(){"true"===this.#z.dataset.canAdd&&(new l.CommentAdd(this.#z.querySelector(".commentAdd"),parseInt(this.#z.dataset.objectTypeId),parseInt(this.#z.dataset.objectId),(e=>{this.#Ce(e)})),this.#me=new c.CommentResponseAdd(this.#z.querySelector(".commentResponseAdd"),((e,t)=>{this.#ke(e,t)})))}#he(){(0,a.wheneverFirstSeen)("woltlab-core-comment",(e=>{this.#z.contains(e)&&(e.addEventListener("reply",(()=>{this.#xe(e,e.commentId)})),e.addEventListener("delete",(()=>{e.parentElement?.remove()})),this.#Ie(e.parentElement))}))}#fe(){(0,a.wheneverFirstSeen)("woltlab-core-comment-response",(e=>{this.#z.contains(e)&&e.addEventListener("delete",(()=>{e.parentElement?.remove()}))}))}#Ie(e){const t=e.querySelectorAll(".commentResponse").length,i=parseInt(e.dataset.responses);if(t<i){const n=(0,s.getPhrase)("wcf.comment.response.more",{count:i-t});if(e.querySelector(".commentLoadNextResponses"))e.querySelector(".commentLoadNextResponses__button").textContent=n;else{const t=document.createElement("div");t.classList.add("commentResponseList__item","commentLoadNextResponses"),e.querySelector(".commentResponseList").append(t);const i=document.createElement("button");i.type="button",i.classList.add("button","small","commentLoadNextResponses__button"),i.textContent=n,t.append(i),i.addEventListener("click",(()=>{this.#Me(e)}))}}else e.querySelector(".commentLoadNextResponses")?.remove()}async#Me(e,t=!1){e.querySelector(".commentLoadNextResponses__button").disabled=!0;const i=await(0,n.dboAction)("loadResponses","wcf\\data\\comment\\response\\CommentResponseAction").payload({data:{commentID:e.dataset.commentId,lastResponseTime:e.dataset.lastResponseTime,lastResponseID:e.dataset.lastResponseId,loadAllResponses:t?1:0}}).dispatch(),a=r.default.createFragmentFromHtml(i.template);a.querySelectorAll(".commentResponseList__item").forEach((t=>{e.querySelector(`.commentResponseList__item[data-response-id="${t.dataset.responseId}"]`)?.remove()})),e.querySelector(".commentResponseList").insertBefore(a,e.querySelector(".commentLoadNextResponses")),o.default.trigger(),e.dataset.lastResponseTime=i.lastResponseTime.toString(),e.dataset.lastResponseId=i.lastResponseID.toString(),this.#Ie(e)}#ge(){if(this.#Te<this.#De&&!this.#z.querySelector(".commentLoadNext")){const e=document.createElement("div");e.classList.add("commentList__item","commentLoadNext"),this.#z.querySelector(".commentList").append(e);const t=document.createElement("button");t.type="button",t.classList.add("button","small","commentLoadNext__button"),t.textContent=(0,s.getPhrase)("wcf.comment.more"),e.append(t),t.addEventListener("click",(()=>{this.#Ae()}))}}async#Ae(){const e=this.#z.querySelector(".commentLoadNext__button");e.disabled=!0;const t=await(0,n.dboAction)("loadComments","wcf\\data\\comment\\CommentAction").payload({data:{objectID:this.#z.dataset.objectId,objectTypeID:this.#z.dataset.objectTypeId,lastCommentTime:this.#z.dataset.lastCommentTime}}).dispatch(),i=r.default.createFragmentFromHtml(t.template);i.querySelectorAll(".commentList__item").forEach((e=>{this.#z.querySelector(`.commentList__item[data-comment-id="${e.dataset.commentId}"]`)?.remove()})),this.#z.querySelector(".commentList").insertBefore(i,this.#z.querySelector(".commentLoadNext")),o.default.trigger(),this.#z.dataset.lastCommentTime=t.lastCommentTime.toString(),this.#Te<this.#De?e.disabled=!1:this.#z.querySelector(".commentLoadNext").hidden=!0}#xe(e,t){e.parentElement.append(this.#me.container),this.#me.show(t)}#Ce(e){const t=this.#z.querySelector(".commentAdd").parentElement;r.default.insertHtml(e,t,"after"),o.default.trigger();const i=t.nextElementSibling;window.setTimeout((()=>{d.element(i)}),100)}#ke(e,t){const i=this.#z.querySelector(`.commentList__item[data-comment-id="${e}"]`);let n=i.querySelector(".commentResponseList");if(!n){const e=document.createElement("div");e.classList.add("comment__responses"),i.append(e),n=document.createElement("div"),n.classList.add("commentResponseList"),n.dataset.responses="1",e.append(n)}r.default.insertHtml(t,n,"append"),o.default.trigger();const a=n.firstElementChild;window.setTimeout((()=>{d.element(a)}),100)}get#Te(){return this.#z.querySelectorAll(".comment").length}get#De(){return parseInt(this.#z.dataset.comments)}}t.setup=function(e){const t=document.getElementById(e);t?new p(t):console.debug(`Unable to find the container identified by '${e}'`)}})),define("WoltLabSuite/Core/Component/Comment/woltlab-core-comment",["require","exports","tslib","../../Ajax","../../Dom/Util","../../Ui/Dropdown/Simple","../../Ui/Notification","../Confirmation","../../Ui/Scroll","../../Event/Handler","../../Language","../Ckeditor"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentElement=void 0,o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),l=i.__importStar(l),c=i.__importStar(c);class p extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".comment__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#Pe()}));const t=this.menu.querySelector(".comment__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#je()}));const i=this.menu.querySelector(".comment__option--edit");i?.addEventListener("click",(e=>{e.preventDefault(),this.#qe()}))}const e=this.querySelector(".comment__button--reply");e?.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("reply"))}))}async#Pe(){await(0,n.dboAction)("enable","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).dispatch(),this.querySelector(".comment__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".comment__option--enable").hidden=!0)}async#je(){await(0,s.confirmationFactory)().delete()&&(await(0,n.dboAction)("delete","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).dispatch(),a.show(),this.dispatchEvent(new CustomEvent("delete")))}async#qe(){this.menu.querySelector(".comment__option--edit").hidden=!0;const{template:e}=await(0,n.dboAction)("beginEdit","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).dispatch();this.#Oe(e)}#Oe(e){this.querySelector(".htmlContent").hidden=!0,o.default.insertHtml(e,this.#G,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#Ne()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#Be()})),c.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#Fe}`,(e=>{e.cancel=!0,this.#Ne()})),window.setTimeout((()=>{l.element(this)}),250)}async#Ne(){const e={data:{message:(0,u.getCkeditorById)(this.#Fe).getHtml()}};if(!this.#Ue(e))return;let t;c.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#Fe}`,e),this.#r();try{t=await(0,n.dboAction)("save","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).payload(e).dispatch()}catch(e){return await(0,n.handleValidationErrors)(e,(({errorType:e})=>(o.default.innerError(document.getElementById(this.#Fe),e),!0))),void this.#He()}o.default.setInnerHtml(this.querySelector(".htmlContent"),t.message),this.#He(),this.#Be(),a.show()}#r(){let e=this.querySelector(".comment__loading");e||(e=document.createElement("div"),e.classList.add("comment__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".comment__message").append(e)),this.#G.hidden=!0,e.hidden=!1}#He(){this.#G.hidden=!1;const e=this.querySelector(".comment__loading");e&&(e.hidden=!0)}#Ue(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,u.getCkeditorById)(this.#Fe);if(""===t.getHtml())return o.default.innerError(t.element,(0,d.getPhrase)("wcf.global.form.error.empty")),!1;const i={api:this,parameters:e,valid:!0};return c.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#Fe}`,i),i.valid}#Be(){(0,u.getCkeditorById)(this.#Fe).destroy(),this.#G.remove(),this.menu.querySelector(".comment__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#G(){let e=this.querySelector(".comment__editor");return e||(e=document.createElement("div"),e.classList.add("comment__editor"),this.querySelector(".comment__message").append(e)),e}get commentId(){return parseInt(this.getAttribute("comment-id"))}get menu(){let e=r.default.getDropdownMenu(`commentOptions${this.commentId}`);return void 0===e&&(e=this.querySelector(".comment__menu .dropdownMenu")||void 0),e}get#Fe(){return`commentEditor${this.commentId}`}}t.WoltlabCoreCommentElement=p,window.customElements.define("woltlab-core-comment",p),t.default=p})),define("WoltLabSuite/Core/Ui/Search/Input",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),class{activeItem=void 0;ajaxPayload;autoFocus;callbackDropdownInit=void 0;callbackSelect=void 0;delay;dropdownContainerId="";element;excludedSearchValues=new Set;list=void 0;lastValue="";minLength;noResultPlaceholder;preventSubmit;request=void 0;suppressErrors;timerDelay=void 0;constructor(e,t){if(this.element=e,!(this.element instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this.element.nodeName||"search"!==this.element.type&&"text"!==this.element.type)throw new Error('Expected an input[type="text"].');t=o.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:void 0,callbackSelect:void 0,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1,suppressErrors:!1},t),this.ajaxPayload=t.ajax,this.autoFocus=t.autoFocus,this.callbackDropdownInit=t.callbackDropdownInit,this.callbackSelect=t.callbackSelect,this.delay=t.delay,t.excludedSearchValues.forEach((e=>{this.addExcludedSearchValues(e)})),this.minLength=t.minLength,this.noResultPlaceholder=t.noResultPlaceholder,this.preventSubmit=t.preventSubmit,this.suppressErrors=t.suppressErrors||!1,this.element.autocomplete="off",this.element.addEventListener("keydown",(e=>this.keydown(e))),this.element.addEventListener("keyup",(e=>this.keyup(e)))}addExcludedSearchValues(e){this.excludedSearchValues.add(e)}removeExcludedSearchValues(e){this.excludedSearchValues.delete(e)}keydown(e){(this.activeItem&&a.default.isOpen(this.dropdownContainerId)||this.preventSubmit)&&"Enter"===e.key&&e.preventDefault(),["ArrowUp","ArrowDown","Escape"].includes(e.key)&&e.preventDefault()}keyup(e){if(this.activeItem||!this.autoFocus)if(a.default.isOpen(this.dropdownContainerId)){if("ArrowUp"===e.key)return e.preventDefault(),this.keyboardPreviousItem();if("ArrowDown"===e.key)return e.preventDefault(),this.keyboardNextItem();if("Enter"===e.key)return e.preventDefault(),this.keyboardSelectItem()}else this.activeItem=void 0;if("Escape"===e.key)return void a.default.close(this.dropdownContainerId);const t=this.element.value.trim();this.lastValue!==t&&(this.lastValue=t,t.length<this.minLength?this.dropdownContainerId&&(a.default.close(this.dropdownContainerId),this.activeItem=void 0):this.delay?(this.timerDelay&&window.clearTimeout(this.timerDelay),this.timerDelay=window.setTimeout((()=>{this.search(t)}),this.delay)):this.search(t))}search(e){this.request&&this.request.abortPrevious(),this.request=n.api(this,this.getParameters(e))}getParameters(e){return{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:e}}}}keyboardNextItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.nextElementSibling&&(e=this.activeItem.nextElementSibling)),this.activeItem=e||this.list.children[0],this.activeItem.classList.add("active")}keyboardPreviousItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.previousElementSibling&&(e=this.activeItem.previousElementSibling)),this.activeItem=e||this.list.children[this.list.childElementCount-1],this.activeItem.classList.add("active")}keyboardSelectItem(){this.selectItem(this.activeItem)}clickSelectItem(e){this.selectItem(e.currentTarget)}selectItem(e){this.callbackSelect&&!this.callbackSelect(e)?this.element.value="":this.element.value=e.dataset.label||"",this.activeItem=void 0,a.default.close(this.dropdownContainerId)}_ajaxSuccess(e){let t=!1;if(this.list?this.list.innerHTML="":(this.list=document.createElement("ul"),this.list.className="dropdownMenu",t=!0,"function"==typeof this.callbackDropdownInit&&this.callbackDropdownInit(this.list)),"object"==typeof e.returnValues){const t=this.clickSelectItem.bind(this);Object.keys(e.returnValues).forEach((i=>{const n=this.createListItem(e.returnValues[i]);n.addEventListener("click",t),this.list.appendChild(n)}))}if(t){this.element.insertAdjacentElement("afterend",this.list);const e=this.element.parentElement;a.default.initFragment(e,this.list),this.dropdownContainerId=r.default.identify(e)}if(this.dropdownContainerId)if(this.activeItem=void 0,this.list.childElementCount||this.handleEmptyResult()){a.default.open(this.dropdownContainerId,!0,this.element);const e=this.list.childElementCount?this.list.children[0]:void 0;this.autoFocus&&e&&~~(e.dataset.objectId||"")&&(this.activeItem=e,this.activeItem.classList.add("active"))}else a.default.close(this.dropdownContainerId)}handleEmptyResult(){if(!this.noResultPlaceholder)return!1;const e=document.createElement("li");e.className="dropdownText";const t=document.createElement("span");return t.textContent=this.noResultPlaceholder,e.appendChild(t),this.list.appendChild(e),!0}createListItem(e){const t=document.createElement("li");t.dataset.objectId=e.objectID.toString(),t.dataset.label=e.label;const i=document.createElement("span");return i.textContent=e.label,t.appendChild(i),t}_ajaxSetup(){return{data:this.ajaxPayload,silent:this.suppressErrors,ignoreError:this.suppressErrors}}}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding/Suggestion",["require","exports","tslib","../../../Ui/Search/Input"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n);class o extends n.default{#Re;constructor(e,t,i){super(e,t),this.#Re=i}search(e){this.#Re.geocode({address:e},((e,t)=>{if(t===google.maps.GeocoderStatus.OK){const t={actionName:"",objectIDs:[],returnValues:{}};e.forEach((e=>{t.returnValues[e.formatted_address]={label:e.formatted_address,objectID:e.formatted_address}})),this._ajaxSuccess(t)}}))}}t.setup=function(e,t,i){new o(e,{callbackSelect:i},t)}})),define("WoltLabSuite/Core/Component/GoogleMaps/woltlab-core-google-maps",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreGoogleMapsElement=void 0;let i=!1;const n=new Promise((e=>{window.woltlab_core_google_maps_callback=e}));class o extends HTMLElement{#We;#Ve;#$e;#ze=!1;#Re;constructor(){super(),this.#Ve=new Promise((e=>{this.#$e=e}))}connectedCallback(){this.hidden||this.#Ge()}attributeChangedCallback(e,t,i){"hidden"===e&&null===i&&this.#Ge()}static get observedAttributes(){return["hidden"]}#Ge(){this.#ze||(this.#ne(),this.#ze=!0,(e=>{if(!i){const t=document.createElement("script");t.src="https://maps.googleapis.com/maps/api/js?"+(e?`key=${e}&`:"")+"callback=woltlab_core_google_maps_callback",document.head.appendChild(t),i=!0}return n})(this.apiKey).then((()=>{this.hasAttribute("access-user-location")?navigator.geolocation.getCurrentPosition((e=>{this.setAttribute("lat",e.coords.latitude.toString()),this.setAttribute("lng",e.coords.longitude.toString()),this.#Ye()}),(()=>{this.#Ye()})):this.#Ye()})))}#Ye(){this.#We=new google.maps.Map(this,{zoom:this.zoom,center:{lat:this.lat,lng:this.lng}}),this.#Xe(),this.#$e&&(this.#$e(),this.#$e=void 0)}async#Xe(){await this.#Ve;const e=this.bounds;e&&this.#We.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.southWest.latitude,e.southWest.longitude),new google.maps.LatLng(e.northEast.latitude,e.northEast.longitude)))}#ne(){if(!this.apiKey)throw new TypeError("Must provide an api key.")}get apiKey(){return this.getAttribute("api-key")||""}async getMap(){return await this.#Ve,this.#We}get lat(){return this.getAttribute("lat")?parseFloat(this.getAttribute("lat")):0}get lng(){return this.getAttribute("lng")?parseFloat(this.getAttribute("lng")):0}get zoom(){return this.getAttribute("zoom")?parseInt(this.getAttribute("zoom")):13}get bounds(){return this.getAttribute("bounds")?JSON.parse(this.getAttribute("bounds")):null}async getGeocoder(){return await this.#Ve,void 0===this.#Re&&(this.#Re=new google.maps.Geocoder),this.#Re}}t.WoltlabCoreGoogleMapsElement=o,window.customElements.define("woltlab-core-google-maps",o),t.default=o})),define("WoltLabSuite/Core/Component/GoogleMaps/Marker",["require","exports","./woltlab-core-google-maps"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDraggableMarker=t.addMarker=void 0,t.addMarker=async function(e,t,i,n,o){const r=await e.getMap(),a=new google.maps.Marker({map:r,position:new google.maps.LatLng(t,i),title:n});o&&r.setCenter(a.getPosition())},t.addDraggableMarker=async function(e,t,i){const n=await e.getMap();void 0===t&&(t=e.lat),void 0===i&&(i=e.lng);const o=new google.maps.Marker({map:n,position:new google.maps.LatLng(t,i),draggable:!0,clickable:!1});return n.setCenter(o.getPosition()),o}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding",["require","exports","../../Helper/Selector","./Geocoding/Suggestion","./Marker","./woltlab-core-google-maps"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;class r{#y;#We;#Qe;#Ke;constructor(e,t){this.#y=e,this.#We=t,this.#Z(),this.#We.getGeocoder().then((t=>{this.#y.hasAttribute("data-google-maps-marker")&&this.#Je(),e.value&&this.#Ze(e.value),(0,n.setup)(this.#y,t,(e=>(this.#Ze(e.dataset.label),!0)))}))}#Z(){this.#y.addEventListener("geocoding:move-marker",(e=>{this.#et(e.detail.latitude,e.detail.longitude)})),this.#y.addEventListener("geocoding:resolve",(e=>{this.#We.getGeocoder().then((t=>{const i=new google.maps.LatLng(e.detail.latitude,e.detail.longitude);t.geocode({location:i},((t,i)=>{i===google.maps.GeocoderStatus.OK&&e.detail.callback(t[0].formatted_address)}))}))})),this.#y.addEventListener("geocoding:reset-marker",(()=>{this.#Ke&&this.#et(this.#Ke.lat(),this.#Ke.lng())}))}async#Je(){this.#Qe=await(0,o.addDraggableMarker)(this.#We),this.#Ke=this.#Qe.getPosition(),this.#Qe.addListener("dragend",(()=>{this.#We.getGeocoder().then((e=>{e.geocode({location:this.#Qe.getPosition()},((e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#y.value=e[0].formatted_address,this.#tt(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}))}))}async#et(e,t){const i=new google.maps.LatLng(e,t);this.#Qe?.setPosition(i),(await this.#We.getMap()).setCenter(i),this.#tt(e,t)}async#Ze(e){(await this.#We.getGeocoder()).geocode({address:e},(async(e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#Qe?.setPosition(e[0].geometry.location),(await this.#We.getMap()).setCenter(e[0].geometry.location),this.#tt(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}#tt(e,t){this.#y.dataset.googleMapsLat=e.toString(),this.#y.dataset.googleMapsLng=t.toString();const i=this.#y.dataset.googleMapsGeocodingStore;null!=i&&this.#y.form&&this.#it(i,e,t)}#it(e,t,i){const n=e+"coordinates";let o=this.#y.form.querySelector(`input[name="${n}"]`);o||(o=document.createElement("input"),o.type="hidden",o.name=n,this.#y.form.append(o)),o.value=`${t},${i}`}}t.setup=function(){(0,i.wheneverFirstSeen)("[data-google-maps-geocoding]",(e=>{const t=document.getElementById(e.dataset.googleMapsGeocoding);new r(e,t)}))}})),define("WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader",["require","exports","tslib","../../Ajax","../Dialog","../../Dom/Util","@googlemaps/markerclusterer","./woltlab-core-google-maps"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=i.__importDefault(r);class s{#We;#nt;#ot;#rt;#at;#st;#_=[];constructor(e,t,i){this.#We=e,this.#nt=t,this.#ot=i,this.#rt=new a.MarkerClusterer({map:e}),this.#lt()}async#lt(){this.#We.getBounds()&&await this.#ct(),this.#We.addListener("idle",(()=>{this.#ct()}))}async#ct(){const e=this.#We.getBounds().getNorthEast(),t=this.#We.getBounds().getSouthWest();this.#dt(e,t)&&(await(0,n.dboAction)("getMapMarkers",this.#nt).payload({...this.#ot,excludedObjectIDs:JSON.stringify(this.#_),eastLongitude:e.lng(),northLatitude:e.lat(),southLatitude:t.lat(),westLongitude:t.lng()}).dispatch()).markers.forEach((e=>{this.#ut(e)}))}#ut(e){const t=new google.maps.Marker({map:this.#We,position:new google.maps.LatLng(e.latitude,e.longitude),title:e.title});if(this.#rt.addMarker(t),e.infoWindow){const i=document.createElement("div");r.default.setInnerHtml(i,e.infoWindow);const n=new google.maps.InfoWindow({content:i});if(t.addListener("click",(()=>{n.open(this.#We,t)})),e.dialog){let t;n.addListener("domready",(()=>{const n=i.querySelector(".jsButtonShowDialog");n?.addEventListener("click",(()=>{t||(t=(0,o.dialogFactory)().fromHtml(e.dialog).withoutControls()),t.show(n.dataset.title||n.textContent)}))}))}}e.objectID&&this.#_.push(e.objectID),e.objectIDs&&this.#_.push(...e.objectIDs)}#dt(e,t){return!(this.#at&&this.#at.lat()>=e.lat()&&this.#at.lng()>=e.lng()&&this.#st.lat()<=t.lat()&&this.#st.lng()<=t.lng()||(this.#at=e,this.#st=t,0))}}t.setup=async function(e,t,i){const n=await e.getMap();new s(n,t,i)}})),define("WoltLabSuite/Core/Component/User/List",["require","exports","tslib","../../Ajax","../../Ui/Pagination","../Dialog","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserList=void 0,o=i.__importDefault(o),a=i.__importDefault(a),t.UserList=class{#pt;#mt;#ht=1;#ft=0;#e;constructor(e,t){this.#pt=e,this.#mt=t}open(){this.#ht=1,this.#gt(this.#ht)}#bt(e,t){e&&(this.#ht=e);const i=this.#vt();if(a.default.setInnerHtml(i.content,t),i.show(this.#mt),this.#ft>1){const e=i.content.querySelector(".jsPagination");null!==e&&new o.default(e,{activePage:this.#ht,maxPage:this.#ft,callbackSwitch:e=>{this.#gt(e)}})}}async#gt(e){if(0!==this.#ft&&(e<1||e>this.#ft))throw new RangeError(`pageNo must be between 1 and ${this.#ft} (${e} given).`);this.#pt.parameters.pageNo=e;const t=await(0,n.dboAction)("getGroupedUserList",this.#pt.className).payload(this.#pt.parameters).dispatch();t.pageCount&&(this.#ft=t.pageCount),this.#bt(e,t.template)}#vt(){return void 0===this.#e&&(this.#e=(0,r.dialogFactory)().withoutContent().withoutControls()),this.#e}}})),define("WoltLabSuite/Core/Controller/Moderation/AssignUser",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","../../Component/Dialog","../../Language","../../Ui/Notification"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){e.addEventListener("click",(0,i.promiseMutex)((()=>async function(e){const{ok:t,result:i}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(e);var a;t&&(function(e){const t=document.getElementById("moderationAssignedUser");if(null===e)t.textContent=(0,o.getPhrase)("wcf.moderation.assignedUser.nobody");else{const i=document.createElement("a");i.href=e.link,i.dataset.objectId=e.userID.toString(),i.classList.add("userLink"),i.innerHTML=e.username,t.innerHTML="",t.append(i)}}(i.assignee),a=i.status,document.getElementById("moderationQueueStatus").textContent=a,(0,r.show)())}(e.dataset.url))))}})),define("WoltLabSuite/Core/Controller/Notice/Dismiss",["require","exports","tslib","../../Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),t.setup=function(){document.querySelectorAll(".jsDismissNoticeButton").forEach((e=>{e.addEventListener("click",(e=>function(e){const t=e.currentTarget;n.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[t.dataset.objectId]},success:()=>{t.parentElement.remove()}})}(e)))}))}})),define("WoltLabSuite/Core/Controller/Style/ColorScheme",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=document.querySelector('meta[name="theme-color"]');e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{document.documentElement.dataset.colorScheme=t.matches?"dark":"light",e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor")}))}})),define("WoltLabSuite/Core/Controller/User/Profile",["require","exports","../../Component/User/List"],(function(e,t,i){"use strict";function n(e,t,n){const o=document.getElementById(t);if(o){let t;o.addEventListener("click",(()=>{void 0===t&&(t=new i.UserList({className:n,parameters:{userID:e}},o.dataset.dialogTitle)),t.open()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){!function(e){n(e,"followingAll","wcf\\data\\user\\follow\\UserFollowingAction")}(e),function(e){n(e,"followerAll","wcf\\data\\user\\follow\\UserFollowAction")}(e),function(e){n(e,"visitorAll","wcf\\data\\user\\profile\\visitor\\UserProfileVisitorAction")}(e)}})),define("WoltLabSuite/Core/Form/Builder/Dialog",["require","exports","tslib","../../Core","../../Ui/Dialog","../../Ajax","./Manager"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),class{_actionName;_className;_dialogContent;_dialogId;_formId;_options;_additionalSubmitButtons;constructor(e,t,i,n){this.init(e,t,i,n)}init(e,t,i,r){if(this._dialogId=e,this._className=t,this._actionName=i,this._options=n.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:/\w+\\data\\/.test(this._className)},r),this._options.dialog=n.extend(this._options.dialog||{},{onClose:()=>this._dialogOnClose()}),o.default.getDialog(this._dialogId))throw new Error(`The dialogId ${this._dialogId} is already in use.`);this._formId="",this._dialogContent=""}_ajaxSetup(){const e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+n.getXsrfToken(),e.withCredentials=!0),e}_ajaxSuccess(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");!function(e){if(void 0===e.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.formId)throw new Error("Missing form id in return data.")}(e.returnValues),this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&void 0!==(t=e.returnValues).dialog&&void 0!==t.formId){if(e.returnValues.formId!==this._formId)throw new Error("Mismatch between form ids: expected '"+this._formId+"' but got '"+e.returnValues.formId+"'.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog)}else this.destroy(),"function"==typeof this._options.successCallback&&this._options.successCallback(e.returnValues||{});break;default:throw new Error("Cannot handle action '"+e.actionName+"'.")}var t}_closeDialog(){o.default.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()}_dialogOnClose(){this._options.destroyOnClose&&this.destroy()}_dialogSetup(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}}_dialogSubmit(){this.getData().then((e=>this._submitForm(e)))}_openDialogContent(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;const i=o.default.open(this,this._dialogContent),r=i.content.querySelector("button[data-type=cancel]");null===r||n.stringToBool(r.dataset.hasEventListener||"")||(r.addEventListener("click",(()=>this._closeDialog())),r.dataset.hasEventListener="1"),this._additionalSubmitButtons=Array.from(i.content.querySelectorAll(':not(.formSubmit) button[type="submit"]')),this._additionalSubmitButtons.forEach((e=>{e.addEventListener("click",(()=>{this._additionalSubmitButtons.forEach((t=>{t.dataset.isClicked=t===e?"1":"0"})),setTimeout((()=>o.default.submit(this._dialogId)),0)}))}))}_submitForm(e){const t=o.default.getDialog(this).content.querySelector("button[data-type=submit]");"function"==typeof this._options.onSubmit?this._options.onSubmit(e,t):"string"==typeof this._options.submitActionName&&(t.disabled=!0,this._additionalSubmitButtons.forEach((e=>e.disabled=!0)),r.api(this,{actionName:this._options.submitActionName,parameters:{data:e,formId:this._formId}}))}destroy(e=!1){""!==this._formId&&(a.hasForm(this._formId)&&a.unregisterForm(this._formId),!0!==e&&o.default.destroy(this))}getData(){if(""===this._formId)throw new Error("Form has not been requested yet.");return a.getData(this._formId)}open(){o.default.getDialog(this._dialogId)?o.default.open(this):r.api(this)}}})),define("WoltLabSuite/Core/Helper/Dom/View",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomView=void 0,n=i.__importDefault(n);class o{#_t;constructor(e){this.#_t=this.#wt(e)}get root(){return this.#_t}#wt(e){if(e instanceof HTMLElement)return e;if("string"==typeof e&&(e=n.default.createFragmentFromHtml(e)),1===e.children.length)return e.children[0];const t=document.createElement("div");return t.append(e),t}}t.DomView=o,t.default=o})),function(e){!function(t){function i(e,t){return function(i,n){"function"!=typeof e[i]&&Object.defineProperty(e,i,{configurable:!0,writable:!0,value:n}),t&&t(i,n)}}var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=i(e);void 0===n.Reflect?n.Reflect=e:o=i(n.Reflect,o),function(e){function t(e,t,i){var n,o=q.get(e);if(d(o)){if(!i)return;o=new P,q.set(e,o)}if(d(n=o.get(t))){if(!i)return;n=new P,o.set(t,n)}return n}function i(e,t,o){var r;return!!n(e,t,o)||!u(r=y(t))&&i(e,r,o)}function n(e,i,n){var o=t(i,n,!1);return!d(o)&&!!o.has(e)}function o(e,t,i){var a;return n(e,t,i)?r(e,t,i):u(a=y(t))?void 0:o(e,a,i)}function r(e,i,n){var o=t(i,n,!1);if(!d(o))return o.get(e)}function a(e,i,n,o){t(n,o,!0).set(e,i)}function s(e,t){var i,n,o,r,a,c,d,u,p=l(e,t),m=y(e);if(null===m)return p;if((i=s(m,t)).length<=0)return p;if(p.length<=0)return i;for(n=new j,o=[],r=0,a=p;r<a.length;r++)c=a[r],n.has(c)||(n.add(c),o.push(c));for(d=0,u=i;d<u.length;d++)c=u[d],n.has(c)||(n.add(c),o.push(c));return o}function l(e,i){var n,o,r,a,s=[],l=t(e,i,!1);if(d(l))return s;for(n=function(e){var t,i=v(e,k);if(!g(i))throw new TypeError;if(!p(t=i.call(e)))throw new TypeError;return t}(l.keys()),o=0;;){if(!(r=_(n)))return s.length=o,s;a=r.value;try{s[o]=a}catch(e){try{w(n)}finally{throw e}}o++}}function c(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function d(e){return void 0===e}function u(e){return null===e}function p(e){return"object"==typeof e?null!==e:"function"==typeof e}function m(e,t){var i,n,o;switch(c(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}if(i=3===t?"string":5===t?"number":"default",void 0!==(n=v(e,C))){if(p(o=n.call(e,i)))throw new TypeError;return o}return function(e,t){var i,n,o,r;if("string"===t){if(g(i=e.toString)&&!p(n=i.call(e)))return n;if(g(o=e.valueOf)&&!p(n=o.call(e)))return n}else{if(g(o=e.valueOf)&&!p(n=o.call(e)))return n;if(g(r=e.toString)&&!p(n=r.call(e)))return n}throw new TypeError}(e,"default"===i?"number":i)}function h(e){var t=m(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function f(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function g(e){return"function"==typeof e}function b(e){return"function"==typeof e}function v(e,t){var i=e[t];if(null!=i){if(!g(i))throw new TypeError;return i}}function _(e){var t=e.next();return!t.done&&t}function w(e){var t=e.return;t&&t.call(e)}function y(e){var t,i,n,o=Object.getPrototypeOf(e);return"function"!=typeof e||e===D||o!==D||null==(i=(t=e.prototype)&&Object.getPrototypeOf(t))||i===Object.prototype||"function"!=typeof(n=i.constructor)||n===e?o:n}function E(e){return e.__=void 0,delete e.__,e}var S=Object.prototype.hasOwnProperty,L="function"==typeof Symbol,C=L&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",k=L&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",x="function"==typeof Object.create,I={__proto__:[]}instanceof Array,M=!x&&!I,T={create:x?function(){return E(Object.create(null))}:I?function(){return E({__proto__:null})}:function(){return E({})},has:M?function(e,t){return S.call(e,t)}:function(e,t){return t in e},get:M?function(e,t){return S.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},D=Object.getPrototypeOf(Function),A="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,P=A||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){function e(e,t){return e}function t(e,t){return t}function i(e,t){return[e,t]}var n={},o=[],r=function(){function e(e,t,i){this._index=0,this._keys=e,this._values=t,this._selector=i}return e.prototype["@@iterator"]=function(){return this},e.prototype[k]=function(){return this},e.prototype.next=function(){var e,t=this._index;return t>=0&&t<this._keys.length?(e=this._selector(this._keys[t],this._values[t]),t+1>=this._keys.length?(this._index=-1,this._keys=o,this._values=o):this._index++,{value:e,done:!1}):{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=o,this._values=o),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=o,this._values=o),{value:e,done:!0}},e}();return function(){function o(){this._keys=[],this._values=[],this._cacheKey=n,this._cacheIndex=-2}return Object.defineProperty(o.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),o.prototype.has=function(e){return this._find(e,!1)>=0},o.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},o.prototype.set=function(e,t){var i=this._find(e,!0);return this._values[i]=t,this},o.prototype.delete=function(e){var t,i,o=this._find(e,!1);if(o>=0){for(t=this._keys.length,i=o+1;i<t;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=n,this._cacheIndex=-2),!0}return!1},o.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=n,this._cacheIndex=-2},o.prototype.keys=function(){return new r(this._keys,this._values,e)},o.prototype.values=function(){return new r(this._keys,this._values,t)},o.prototype.entries=function(){return new r(this._keys,this._values,i)},o.prototype["@@iterator"]=function(){return this.entries()},o.prototype[k]=function(){return this.entries()},o.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},o}()}():Map,j=A||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new P}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[k]=function(){return this.keys()},e}():Set,q=new(A||"function"!=typeof WeakMap?function(){function e(){var e;do{e="@@WeakMap@@"+n()}while(T.has(r,e));return r[e]=!0,e}function t(e,t){if(!S.call(e,a)){if(!t)return;Object.defineProperty(e,a,{value:T.create()})}return e[a]}function i(e,t){for(var i=0;i<t;++i)e[i]=255*Math.random()|0;return e}function n(){var e,t,n,r,a=(r=o,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(r)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(r)):i(new Uint8Array(r),r):i(new Array(r),r));for(a[6]=79&a[6]|64,a[8]=191&a[8]|128,e="",t=0;t<o;++t)4!==t&&6!==t&&8!==t||(e+="-"),(n=a[t])<16&&(e+="0"),e+=n.toString(16).toLowerCase();return e}var o=16,r=T.create(),a=e();return function(){function i(){this._key=e()}return i.prototype.has=function(e){var i=t(e,!1);return void 0!==i&&T.has(i,this._key)},i.prototype.get=function(e){var i=t(e,!1);return void 0!==i?T.get(i,this._key):void 0},i.prototype.set=function(e,i){return t(e,!0)[this._key]=i,this},i.prototype.delete=function(e){var i=t(e,!1);return void 0!==i&&delete i[this._key]},i.prototype.clear=function(){this._key=e()},i}()}():WeakMap);e("decorate",(function(e,t,i,n){if(d(i)){if(!f(e))throw new TypeError;if(!b(t))throw new TypeError;return function(e,t){var i,n;for(i=e.length-1;i>=0;--i)if(!d(n=(0,e[i])(t))&&!u(n)){if(!b(n))throw new TypeError;t=n}return t}(e,t)}if(!f(e))throw new TypeError;if(!p(t))throw new TypeError;if(!p(n)&&!d(n)&&!u(n))throw new TypeError;return u(n)&&(n=void 0),function(e,t,i,n){var o,r;for(o=e.length-1;o>=0;--o)if(!d(r=(0,e[o])(t,i,n))&&!u(r)){if(!p(r))throw new TypeError;n=r}return n}(e,t,i=h(i),n)})),e("metadata",(function(e,t){return function(i,n){if(!p(i))throw new TypeError;if(!d(n)&&!function(e){switch(c(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;a(e,t,i,n)}})),e("defineMetadata",(function(e,t,i,n){if(!p(i))throw new TypeError;return d(n)||(n=h(n)),a(e,t,i,n)})),e("hasMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),i(e,t,n)})),e("hasOwnMetadata",(function(e,t,i){if(!p(t))throw new TypeError;return d(i)||(i=h(i)),n(e,t,i)})),e("getMetadata",(function(e,t,i){if(!p(t))throw new TypeError;return d(i)||(i=h(i)),o(e,t,i)})),e("getOwnMetadata",(function(e,t,i){if(!p(t))throw new TypeError;return d(i)||(i=h(i)),r(e,t,i)})),e("getMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),s(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),l(e,t)})),e("deleteMetadata",(function(e,i,n){var o,r;if(!p(i))throw new TypeError;return d(n)||(n=h(n)),!d(o=t(i,n,!1))&&!!o.delete(e)&&(o.size>0||((r=q.get(i)).delete(n),r.size>0||q.delete(i),!0))}))}(o)}()}(Reflect||(Reflect={})),define("reflect-metadata",(function(){})),define("WoltLabSuite/Core/Helper/Dom/Element",["require","exports","./View","reflect-metadata"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomElementList=t.DomElement=void 0,t.DomElement=function(e,t){return function(n,o){if(!(n instanceof i.DomView))throw new Error("@DomElement() is only supported on `DomView`");const{nullable:r,type:a}=Object.assign({nullable:!1,type:Reflect.getMetadata("design:type",n,o)},t);Object.defineProperty(n,o,{configurable:!0,get(){const t=this.root.querySelector(e);if(null===t){if(r)return null;throw new Error(`Unable to find an element with the selector '${e}'.`)}if(!(t instanceof a))throw new Error(`Expected an element of type '${a.name}' but found '${t.nodeName}'.`);return t}})}},t.DomElementList=function(e,t){return function(n,o){if(!(n instanceof i.DomView))throw new Error("@DomElementList() is only supported on `DomView`");if(Reflect.getMetadata("design:type",n,o).prototype!==Array.prototype)throw new Error("The type must be an array of elements.");const{type:r}=t;Object.defineProperty(n,o,{configurable:!0,get(){const t=Array.from(this.root.querySelectorAll(e));for(const e of t)if(!(e instanceof r))throw new Error(`Expected an element of type '${r.name}' but found '${e.nodeName}'.`);return t}})}}})),define("WoltLabSuite/Core/Media/List/Upload",["require","exports","tslib","../Upload","../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_createButton(){super._createButton();const e=this._button.querySelector("span"),t=document.createTextNode(" ");e.insertBefore(t,e.childNodes[0]);const i=document.createElement("fa-icon");i.setIcon("upload"),e.insertBefore(i,e.childNodes[0])}_getParameters(){return this._options.categoryId?o.extend(super._getParameters(),{categoryID:this._options.categoryId}):super._getParameters()}}return r})),define("WoltLabSuite/Core/Media/Manager/Search",["require","exports","tslib","../../Dom/Traverse","../../Language","../../Ajax","../../Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),class{_cancelButton;_input;_mediaManager;_searchContainer;_searchMode=!1;constructor(e){this._mediaManager=e;const t=e.getDialog();this._searchContainer=t.querySelector(".mediaManagerSearch"),this._input=t.querySelector(".mediaManagerSearchField"),this._input.addEventListener("keypress",(e=>this._keyPress(e))),this._cancelButton=t.querySelector(".mediaManagerSearchCancelButton"),this._cancelButton.addEventListener("click",(()=>this._cancelSearch()))}_ajaxSetup(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\media\\MediaAction",interfaceName:"wcf\\data\\ISearchAction"}}}_ajaxSuccess(e){this._mediaManager.setMedia(e.returnValues.media||{},e.returnValues.template||"",{pageCount:e.returnValues.pageCount||0,pageNo:e.returnValues.pageNo||0}),this._mediaManager.getDialog().querySelector(".dialogContent").scrollTop=0}_cancelSearch(){this._searchMode&&(this._searchMode=!1,this.resetSearch(),this._mediaManager.resetMedia())}_hideStringThresholdError(){const e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e&&a.default.hide(e)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._input.value.length>=this._mediaManager.getOption("minSearchLength")?(this._hideStringThresholdError(),this.search()):this._showStringThresholdError())}_showStringThresholdError(){let e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e?a.default.show(e):(e=document.createElement("p"),e.className="innerInfo",e.textContent=o.get("wcf.media.search.info.searchStringThreshold",{minSearchLength:this._mediaManager.getOption("minSearchLength")}),this._input.parentNode.insertAdjacentElement("afterend",e))}hideSearch(){a.default.hide(this._searchContainer)}resetSearch(){this._input.value=""}showSearch(){a.default.show(this._searchContainer)}search(e){"number"!=typeof e&&(e=1);let t=this._input.value;t&&this._input.value.length<this._mediaManager.getOption("minSearchLength")?(this._showStringThresholdError(),t=""):this._hideStringThresholdError(),this._searchMode=!0,r.api(this,{parameters:{categoryID:this._mediaManager.getCategoryId(),imagesOnly:this._mediaManager.getOption("imagesOnly"),mode:this._mediaManager.getMode(),pageNo:e,searchString:t}})}}})),define("WoltLabSuite/Core/Media/Manager/Base",["require","exports","tslib","../../Core","../../Language","../../Permission","../../Dom/Change/Listener","../../Event/Handler","../../Dom/Traverse","../../Dom/Util","../../Ui/Dialog","../../Controller/Clipboard","../../Ui/Pagination","../../Ui/Notification","../../StringUtil","./Search","../Upload","../Editor","../Clipboard"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f,g,b,v){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),p=i.__importDefault(p),m=i.__importStar(m),h=i.__importStar(h),f=i.__importDefault(f),g=i.__importDefault(g),b=i.__importDefault(b),v=i.__importStar(v);let _=0;return class{_forceClipboard=!1;_hadInitiallyMarkedItems=!1;_id;_listItems=new Map;_media=new Map;_mediaCategorySelect;_mediaEditor=null;_mediaManagerMediaList=null;_pagination=null;_search=null;_upload=null;_options;constructor(e){this._options=n.extend({dialogTitle:o.get("wcf.media.manager"),imagesOnly:!1,minSearchLength:3},e),this._id="mediaManager"+_++,r.get("admin.content.cms.canManageMedia")&&(this._mediaEditor=new b.default(this)),a.add("WoltLabSuite/Core/Media/Manager",(()=>this._addButtonEventListeners())),s.add("com.woltlab.wcf.media.upload","success",(e=>this._openEditorAfterUpload(e)))}_addButtonEventListeners(){this._mediaManagerMediaList&&r.get("admin.content.cms.canManageMedia")&&l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaEditButton");t&&(t.classList.remove("jsMediaEditButton"),t.addEventListener("click",(e=>this._editMedia(e))))}))}_categoryChange(){this._search.search()}_click(e){e?.preventDefault(),d.open(this)}_dialogClose(){(r.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.hideEditor("com.woltlab.wcf.media")}_dialogInit(e,t){Object.entries(t.returnValues.media||{}).forEach((([e,t])=>{this._media.set(~~e,t)})),this._initPagination(~~t.returnValues.pageCount),this._hadInitiallyMarkedItems=t.returnValues.hasMarkedItems>0}_dialogSetup(){return{id:this._id,options:{onClose:()=>this._dialogClose(),onShow:()=>this._dialogShow(),title:this._options.dialogTitle},source:{after:(e,t)=>this._dialogInit(e,t),data:{actionName:"getManagementDialog",className:"wcf\\data\\media\\MediaAction",parameters:{mode:this.getMode(),imagesOnly:this._options.imagesOnly}}}}}_dialogShow(){if(this._mediaManagerMediaList)v.setMediaManager(this);else{const e=this.getDialog();this._mediaManagerMediaList=e.querySelector(".mediaManagerMediaList"),this._mediaCategorySelect=e.querySelector(".mediaManagerCategoryList > select"),this._mediaCategorySelect&&this._mediaCategorySelect.addEventListener("change",(()=>this._categoryChange()));const t=l.childrenByTag(this._mediaManagerMediaList,"LI");if(t.forEach((e=>{this._listItems.set(~~e.dataset.objectId,e)})),r.get("admin.content.cms.canManageMedia")){const e=d.getDialog(this).dialog.querySelector(".mediaManagerMediaUploadButton");this._upload=new g.default(c.identify(e),c.identify(this._mediaManagerMediaList),{mediaManager:this}),s.add("WoltLabSuite/Core/Ui/Object/Action","delete",(e=>this.removeMedia(~~e.objectElement.dataset.objectId)))}r.get("admin.content.cms.canManageMedia")||this._forceClipboard?v.init("menuManagerDialog-"+this.getMode(),!!this._hadInitiallyMarkedItems,this):this._removeClipboardCheckboxes(),this._search=new f.default(this),t.length||this._search.hideSearch()}(r.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.showEditor()}_editMedia(e){if(!r.get("admin.content.cms.canManageMedia"))throw new Error("You are not allowed to edit media files.");d.close(this);const t=e.currentTarget;this._mediaEditor.edit(this._media.get(~~t.dataset.objectId))}_editorClose(){d.open(this)}_editorSuccess(e,t,i=!0){if(this._mediaCategorySelect){const i=~~this._mediaCategorySelect.value;if(i){const n=~~e.categoryID;t==n||t!=i&&n!=i||this._search.search()}}i&&d.open(this),this._media.set(~~e.mediaID,e);const n=this._listItems.get(~~e.mediaID),o=n.querySelector(".mediaTitle");e.isMultilingual?e.title&&e.title[window.LANGUAGE_ID]?o.textContent=e.title[window.LANGUAGE_ID]:o.textContent=e.filename:e.title&&e.title[e.languageID]?o.textContent=e.title[e.languageID]:o.textContent=e.filename;const r=n.querySelector(".mediaThumbnail");r.innerHTML=e.elementTag;const a=r.querySelector("img");a&&(a.src+=`&refresh=${Date.now()}`)}_initPagination(e,t){if(void 0===t&&(t=1),e>1){const i=document.createElement("div");i.className="paginationBottom jsPagination";const n=d.getDialog(this).content.querySelector(".jsPagination");n.insertAdjacentElement("beforebegin",i),n.remove(),this._pagination=new p.default(i,{activePage:t,callbackSwitch:e=>this._search.search(e),maxPage:e})}else this._pagination&&c.hide(this._pagination.getElement())}_removeClipboardCheckboxes(){this._mediaManagerMediaList.querySelectorAll(".mediaCheckbox").forEach((e=>e.remove()))}_openEditorAfterUpload(e){if(e.upload===this._upload&&!e.isMultiFileUpload&&!this._upload.hasPendingUploads()){const t=Object.keys(e.media);t.length&&(d.close(this),this._mediaEditor.edit(this._media.get(~~e.media[t[0]].mediaID)))}}_setMedia(e){this._media=new Map(Object.entries(e).map((([e,t])=>[~~e,t])));let t=l.nextByClass(this._mediaManagerMediaList,"info");this._media.size?t&&c.hide(t):(null===t&&(t=document.createElement("p"),t.className="info",t.textContent=o.get("wcf.media.search.noResults")),c.show(t),c.insertAfter(t,this._mediaManagerMediaList)),l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{this._media.has(~~e.dataset.objectId)?c.show(e):c.hide(e)})),a.trigger(),r.get("admin.content.cms.canManageMedia")||this._forceClipboard?u.reload():this._removeClipboardCheckboxes()}addMedia(e,t){e.languageID||(e.isMultilingual=1),this._media.set(~~e.mediaID,e),this._listItems.set(~~e.mediaID,t),1===this._listItems.size&&this._search.showSearch()}clipboardDeleteMedia(e){e.forEach((e=>{this.removeMedia(~~e)})),m.show()}getCategoryId(){return this._mediaCategorySelect?~~this._mediaCategorySelect.value:0}getDialog(){return d.getDialog(this).dialog}getMode(){return""}getOption(e){return this._options[e]?this._options[e]:null}removeMedia(e){if(this._listItems.has(e)){try{this._listItems.get(e).remove()}catch(e){}this._listItems.delete(e),this._media.delete(e)}}resetMedia(){this._search.search()}setMedia(e,t,i){if(Object.entries(e).length>0){const e=document.createElement("ul");e.innerHTML=t,l.childrenByTag(e,"LI").forEach((e=>{this._listItems.has(~~e.dataset.objectId)||(this._listItems.set(~~e.dataset.objectId,e),this._mediaManagerMediaList.appendChild(e))}))}this._initPagination(i.pageCount,i.pageNo),this._setMedia(e)}setupMediaElement(e,t){const i=l.childByClass(t,"mediaInformation"),a=document.createElement("nav");a.className="jsMobileNavigation buttonGroupNavigation",i.parentNode.appendChild(a);const s=document.createElement("ul");s.className="buttonList iconList",a.appendChild(s);const c=document.createElement("li");c.className="mediaCheckbox",s.appendChild(c);const d=document.createElement("a");c.appendChild(d);const u=document.createElement("label");d.appendChild(u);const p=document.createElement("input");if(p.className="jsClipboardItem",p.type="checkbox",p.dataset.objectId=e.mediaID.toString(),u.appendChild(p),r.get("admin.content.cms.canManageMedia")){const t=document.createElement("li");t.className="jsMediaEditButton",t.dataset.objectId=e.mediaID.toString(),s.appendChild(t),t.innerHTML=`\n        <a class="jsTooltip" title="${o.get("wcf.global.button.edit")}">\n          <fa-icon name="pencil"></fa-icon>\n          <span class="invisible">${o.get("wcf.global.button.edit")}</span>\n        </a>`;const i=document.createElement("li");i.classList.add("jsObjectAction"),i.dataset.objectAction="delete";const r=n.getUuid();i.dataset.confirmMessage=h.unescapeHTML(o.get("wcf.media.delete.confirmMessage",{title:r})).replace(r,h.escapeHTML(e.filename)),s.appendChild(i),i.innerHTML=`\n        <a class="jsTooltip" title="${o.get("wcf.global.button.delete")}">\n          <fa-icon name="xmark"></fa-icon>\n          <span class="invisible">${o.get("wcf.global.button.delete")}</span>\n        </a>`}}}})),define("WoltLabSuite/Core/Media/Manager/Editor",["require","exports","tslib","./Base","../../Core","../../Event/Handler","../../Dom/Traverse","../../Language","../../Ui/Dialog","../../Controller/Clipboard","../../Dom/Util","../../Component/Ckeditor/Event"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaManagerEditor=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);class p extends n.default{_mediaToInsert=new Map;_mediaToInsertByClipboard=!1;_uploadData;_uploadId=null;constructor(e){if(super(e=o.extend({callbackInsert:null},e)),this._forceClipboard=!0,void 0===this._options.ckeditor)"string"==typeof this._options.buttonClass&&document.querySelectorAll(`.${this._options.buttonClass}`).forEach((e=>{e.addEventListener("click",(e=>{this._click(e)}))}));else{const e=this._options.ckeditor;(0,u.listenToCkeditor)(e.sourceElement).bbcode((({bbcode:e})=>"media"===e&&(this._click(),!0))),e.features.attachment||(0,u.listenToCkeditor)(e.sourceElement).uploadMedia((e=>{this._editorUpload(e)}))}}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&a.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaInsertButton");t&&(t.classList.remove("jsMediaInsertButton"),t.addEventListener("click",(e=>this._openInsertDialog(e))))}))}_buildInsertDialog(){let e="";this._getThumbnailSizes().forEach((t=>{e+='<option value="'+t+'">'+s.get("wcf.media.insert.imageSize."+t)+"</option>"})),e+='<option value="original">'+s.get("wcf.media.insert.imageSize.original")+"</option>";const t=`\n      <div class="section">\n        <dl class="thumbnailSizeSelection">\n          <dt>${s.get("wcf.media.insert.imageSize")}</dt>\n          <dd>\n            <select name="thumbnailSize">\n              ${e}\n            </select>\n          </dd>\n        </dl>\n      </div>\n      <div class="formSubmit">\n        <button type="button" class="button buttonPrimary">${s.get("wcf.global.button.insert")}</button>\n      </div>`;l.open({_dialogSetup:()=>({id:this._getInsertDialogId(),options:{onClose:()=>this._editorClose(),onSetup:e=>{e.querySelector(".buttonPrimary").addEventListener("click",(e=>this._insertMedia(e))),d.default.show(e.querySelector(".thumbnailSizeSelection"))},title:s.get("wcf.media.insert")},source:t})})}_dialogShow(){if(super._dialogShow(),this._uploadData){if(null!==this._upload){const e=this._upload.uploadFile(this._uploadData.file);this._uploadData.promise=new Promise((t=>{const i=r.add("com.woltlab.wcf.media.upload","success",(n=>{n.uploadId===e&&(r.remove("com.woltlab.wcf.media.upload","success",i),t({mediaId:n.media[0].mediaID,mediaSize:"original",url:n.media[0].link}))}))}))}this._uploadData=void 0}}_editorUpload(e){this._uploadData=e,l.open(this)}_getInsertDialogId(){return[this._id+"Insert",...this._mediaToInsert.keys()].join("-")}_getThumbnailSizes(){return["small","medium","large"].map((e=>Array.from(this._mediaToInsert.values()).every((t=>null!==t[e+"ThumbnailType"]))?e:null)).filter((e=>null!==e))}_insertMedia(e,t,i=!1){if(void 0===i&&(i=!0),e){l.close(this._getInsertDialogId());const i=e.currentTarget.closest(".dialogContent").querySelector("select[name=thumbnailSize]");t=i.value}null!==this._options.callbackInsert?this._options.callbackInsert(this._mediaToInsert,"separate",t):this._mediaToInsert.forEach((e=>this._insertMediaItem(t,e))),this._mediaToInsertByClipboard&&c.unmark("com.woltlab.wcf.media",Array.from(this._mediaToInsert.keys())),this._mediaToInsert=new Map,this._mediaToInsertByClipboard=!1,i&&l.close(this)}_insertMediaItem(e,t){const i=this._options.ckeditor;if(t.isImage){let n="";["small","medium","large","original"].some((i=>0!=t[i+"ThumbnailHeight"]&&(n=i,e==i))),(e=n)||(e="original"),i.insertText(`[wsm='${t.mediaID}','${e}'][/wsm]`)}else i.insertText(`[wsm='${t.mediaID}'][/wsm]`)}_mediaUploaded(e){null!==this._uploadId&&this._upload===e.upload&&(this._uploadId===e.uploadId||Array.isArray(this._uploadId)&&-1!==this._uploadId.indexOf(e.uploadId))&&(this._mediaToInsert=new Map(e.media.entries()),this._insertMedia(null,"medium",!1),this._uploadId=null)}_openInsertDialog(e){const t=e.currentTarget;this.insertMedia([~~t.dataset.objectId])}clipboardInsertMedia(e){this.insertMedia(e,!0)}insertMedia(e,t){this._mediaToInsert=new Map,this._mediaToInsertByClipboard=t||!1;let i=!0;if(e.forEach((e=>{const t=this._media.get(e);this._mediaToInsert.set(t.mediaID,t),t.isImage||(i=!1)})),i)if(this._getThumbnailSizes().length){l.close(this);const e=this._getInsertDialogId();l.getDialog(e)?l.openStatic(e,null):this._buildInsertDialog()}else this._insertMedia(void 0,"original");else this._insertMedia()}getMode(){return"editor"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaInsertButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML=`\n      <a class="jsTooltip" title="${s.get("wcf.global.button.insert")}">\n        <fa-icon name="plus"></fa-icon>\n        <span class="invisible">${s.get("wcf.global.button.insert")}</span>\n      </a>`}}t.MediaManagerEditor=p,t.default=p})),define("WoltLabSuite/Core/Media/Manager/Select",["require","exports","tslib","./Base","../../Core","../../Dom/Traverse","../../FileUtil","../../Language","../../Ui/Dialog"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l);class c extends n.default{_activeButton=null;_buttons;_storeElements=new WeakMap;constructor(e){super(e),this._buttons=document.getElementsByClassName(this._options.buttonClass||"jsMediaSelectButton"),Array.from(this._buttons).forEach((e=>{const t=e.dataset.store;if(t){const i=document.getElementById(t);if(i&&"INPUT"===i.tagName){e.addEventListener("click",(e=>this._click(e))),this._storeElements.set(e,i);const t=document.createElement("button");if(t.type="button",t.classList.add("button","jsTooltip"),t.title=s.getPhrase("wcf.global.button.delete"),t.innerHTML='<fa-icon name="xmark"></fa-icon>',"LI"===e.parentElement.tagName){const n=document.createElement("li");n.append(t),e.parentElement.insertAdjacentElement("afterend",n),i.value||(n.hidden=!0)}else e.insertAdjacentElement("afterend",t),i.value||(t.hidden=!0);t.addEventListener("click",(()=>this._removeMedia(e,t)))}}}))}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&r.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaSelectButton");t&&(t.classList.remove("jsMediaSelectButton"),t.addEventListener("click",(e=>this._chooseMedia(e))))}))}_chooseMedia(e){if(null===this._activeButton)throw new Error("Media cannot be chosen if no button is active.");const t=e.currentTarget,i=this._media.get(~~t.dataset.objectId),n=document.getElementById(this._activeButton.dataset.store);n.value=i.mediaID.toString(),o.triggerEvent(n,"change");const r=this._activeButton.dataset.display;if(r){const e=document.getElementById(r);if(e)if(i.isImage){const t=i.smallThumbnailLink?i.smallThumbnailLink:i.link,n=i.altText&&i.altText[window.LANGUAGE_ID]?i.altText[window.LANGUAGE_ID]:"";e.innerHTML=`<img src="${t}" alt="${n}" />`}else{let t=a.getIconNameByFilename(i.filename);t=t?"file-"+t:"file",e.innerHTML=`\n            <div class="box48" style="margin-bottom: 10px;">\n              <fa-icon size="48" name="${t}"></fa-icon>\n              <div class="containerHeadline">\n                <h3>${i.filename}</h3>\n                <p>${i.formattedFilesize}</p>\n              </div>\n            </div>`}}"LI"===this._activeButton.parentElement.tagName?this._activeButton.parentElement.nextElementSibling.hidden=!1:this._activeButton.nextElementSibling.hidden=!1,l.close(this)}_click(e){if(e.preventDefault(),this._activeButton=e.currentTarget,super._click(e),!this._mediaManagerMediaList)return;const t=this._storeElements.get(this._activeButton);r.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{t.value&&t.value==e.dataset.objectId?e.classList.add("jsSelected"):e.classList.remove("jsSelected")}))}getMode(){return"select"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaSelectButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML=`\n        <a class="jsTooltip" title="${s.get("wcf.media.button.select")}">\n          <fa-icon name="check"></fa-icon>\n          <span class="invisible">${s.get("wcf.media.button.select")}</span>\n        </a>\n      `}_removeMedia(e,t){"LI"===t.parentElement.tagName?t.parentElement.hidden=!0:t.hidden=!0;const i=document.getElementById(e.dataset.store);i.value="",o.triggerEvent(i,"change");const n=e.dataset.display;if(n){const e=document.getElementById(n);e&&(e.innerHTML="")}}}return c})),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["require","exports","tslib","../../Ajax","../Notification"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=i.__importStar(o),t.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),async function(){await(0,n.dboAction)("markAllAsRead","wcf\\data\\article\\ArticleAction").dispatch(),document.querySelectorAll(".contentItemList .contentItemBadgeNew").forEach((e=>e.remove())),document.querySelectorAll(".boxMenu .active .badge").forEach((e=>e.remove())),o.show()}()}))}))}})),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["require","exports","tslib","../../Core","./Simple"],(function(e,t,i,n,o){"use strict";function r(e){if(!(e instanceof HTMLUListElement))throw new TypeError("Expected a reference to an <ul> element.");if(!e.classList.contains("dropdownMenu"))throw new Error("List does not appear to be a dropdown menu.")}function a(e){const t=document.createElement("li");if("divider"===e)return t.className="dropdownDivider",t;"string"==typeof e.identifier&&(t.dataset.identifier=e.identifier);const i=document.createElement("a");if(i.href="string"==typeof e.href?e.href:"#","function"==typeof e.callback)i.addEventListener("click",(t=>{t.preventDefault(),e.callback(i)}));else if("#"===i.href)throw new Error("Expected either a `href` value or a `callback`.");if(e.attributes&&n.isPlainObject(e.attributes)&&Object.keys(e.attributes).forEach((t=>{const n=e.attributes[t];if("string"!=typeof n)throw new Error("Expected only string values.");-1!==t.indexOf("-")?i.setAttribute(`data-${t}`,n):i.dataset[t]=n})),t.appendChild(i),void 0!==e.icon&&n.isPlainObject(e.icon)){if("string"!=typeof e.icon.name)throw new TypeError("Expected a valid icon name.");let t=16;"number"==typeof e.icon.size&&-1!==c.indexOf(~~e.icon.size)&&(t=~~e.icon.size);const n=document.createElement("fa-icon");n.size=t,n.setIcon(e.icon.name,!!e.icon.forceSolid),i.appendChild(n)}const o="string"==typeof e.label?e.label.trim():"",r="string"==typeof e.labelHtml?e.labelHtml.trim():"";if(""===o&&""===r)throw new TypeError("Expected either a label or a `labelHtml`.");const a=document.createElement("span");return a[o?"textContent":"innerHTML"]=o||r,i.appendChild(document.createTextNode(" ")),i.appendChild(a),t}function s(e,t){r(e),e.appendChild(a(t))}function l(e,t){if(r(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");const i=t.length;if(0===i)throw new Error("Expected a non-empty list of items.");if(1===i)s(e,t[0]);else{const i=document.createDocumentFragment();t.forEach((e=>{i.appendChild(a(e))})),e.appendChild(i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.divider=t.attach=t.setItems=t.appendItems=t.appendItem=t.buildItem=t.create=void 0,n=i.__importStar(n),o=i.__importDefault(o);const c=[16,24,32,48,64,96,144];t.create=function(e,t){const i=document.createElement("ul");return i.className="dropdownMenu","string"==typeof t&&(i.dataset.identifier=t),Array.isArray(e)&&e.length>0&&l(i,e),i},t.buildItem=function(e){return a(e)},t.appendItem=s,t.appendItems=l,t.setItems=function(e,t){r(e),e.innerHTML="",l(e,t)},t.attach=function(e,t){r(e),o.default.initFragment(t,e),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),o.default.toggleDropdown(t.id)}))},t.divider=function(){return"divider"}})),define("WoltLabSuite/Core/Ui/File/Delete",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),class{buttonContainer;containers=new Map;deleteButton=void 0;internalId;isSingleImagePreview;target;uploadHandler;constructor(e,t,i,n){this.isSingleImagePreview=i,this.uploadHandler=n;const o=document.getElementById(e);if(null===o)throw new Error(`Element id '${e}' is unknown.`);this.buttonContainer=o;const r=document.getElementById(t);if(null===r)throw new Error(`Element id '${t}' is unknown.`);this.target=r;const a=this.target.dataset.internalId;if(!a)throw new Error("InternalId is unknown.");this.internalId=a,this.rebuild()}createButtons(){let e=!1;this.target.querySelectorAll("li.uploadedFile").forEach((t=>{const i=t.dataset.uniqueFileId;if(void 0===i||this.containers.has(i))return;const n={uniqueFileId:i,element:t};this.containers.set(i,n),this.initDeleteButton(t,n),e=!0})),e&&r.default.trigger()}initDeleteButton(e,t){const i=e.querySelector(".buttonGroup");if(null===i)throw new Error(`Button group in '${this.target.id}' is unknown.`);const n=document.createElement("li"),o=document.createElement("span");o.className="button jsDeleteButton small",o.textContent=a.get("wcf.global.button.delete"),n.appendChild(o),i.appendChild(n),n.addEventListener("click",this.deleteElement.bind(this,t.uniqueFileId))}deleteElement(e){n.api(this,{uniqueFileId:e,internalId:this.internalId})}rebuild(){if(!this.isSingleImagePreview)return void this.createButtons();const e=this.target.querySelector("img");if(null!==e){const t=e.dataset.uniqueFileId;if(!this.containers.has(t)){const i={uniqueFileId:t,element:e};this.containers.set(t,i),this.deleteButton=document.createElement("p"),this.deleteButton.className="button deleteButton";const n=document.createElement("span");n.textContent=a.get("wcf.global.button.delete"),this.deleteButton.appendChild(n),this.buttonContainer.appendChild(this.deleteButton),this.deleteButton.addEventListener("click",this.deleteElement.bind(this,i.uniqueFileId))}}}_ajaxSuccess(e){this.containers.get(e.uniqueFileId).element.remove(),this.isSingleImagePreview&&this.deleteButton&&(this.deleteButton.remove(),this.deleteButton=void 0),this.uploadHandler.checkMaxFiles(),o.triggerEvent(this.target,"change")}_ajaxSetup(){return{url:"index.php?ajax-file-delete/&t="+o.getXsrfToken()}}}})),define("WoltLabSuite/Core/Ui/File/Upload",["require","exports","tslib","../../Core","./Delete","../../Dom/Util","../../Language","../../Upload"],(function(e,t,i,n,o,r,a,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importDefault(s);class l extends s.default{_deleteHandler;constructor(e,t,i){if(void 0===(i=i||{}).internalId)throw new Error("Missing internal id.");(i=n.extend({imagePreview:!1,maxFiles:null,className:"invalid",url:`index.php?ajax-file-upload/&t=${n.getXsrfToken()}`},i)).multiple=null===i.maxFiles||i.maxFiles>1,super(e,t,i),this.checkMaxFiles(),this._deleteHandler=new o.default(e,t,this._options.imagePreview,this)}_createFileElement(e){const t=super._createFileElement(e);t.classList.add("box64","uploadedFile");const i=t.querySelector("progress"),n=document.createElement("fa-icon");n.size=64,n.setIcon("spinner");const o=t.textContent;t.textContent="",t.append(n);const r=document.createElement("div"),a=document.createElement("p");a.textContent=o;const s=document.createElement("small");s.appendChild(i),r.appendChild(a),r.appendChild(s);const l=document.createElement("div");l.appendChild(r);const c=document.createElement("ul");return c.className="buttonGroup",l.appendChild(c),t.append(l),t}_failure(e,t){throw this._fileElements[e].forEach((e=>{e.classList.add("uploadFailed");const t=e.querySelector("small");t.innerHTML="",e.querySelector("fa-icon").setIcon("ban");const i=document.createElement("span");i.className="innerError",i.textContent=a.get("wcf.upload.error.uploadFailed"),t.insertAdjacentElement("afterend",i)})),new Error(`Upload failed: ${t.message}`)}_upload(e,t,i){const n=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return n&&n.remove(),super._upload(e,t,i)}_success(e,t){this._fileElements[e].forEach(((i,n)=>{if(void 0!==t.files[n]){const e=t.files[n];if(this._options.imagePreview){if(null===e.image)throw new Error("Expect image for uploaded file. None given.");i.remove();const t=this._target.querySelector("img.previewImage");if(null!==t)t.src=e.image;else{const t=document.createElement("img");t.classList.add("previewImage"),t.src=e.image,t.style.setProperty("max-width","100%",""),t.dataset.uniqueFileId=e.uniqueFileId,this._target.appendChild(t)}}else{i.dataset.uniqueFileId=e.uniqueFileId,i.querySelector("small").textContent=e.filesize.toString();const t=i.querySelector("fa-icon");if(null!==e.image){const i=document.createElement("a");i.classList.add("jsImageViewer"),i.href=e.image;const n=document.createElement("img");n.classList.add("formUploadHandlerContentListImage"),n.src=e.image,n.width=e.imageWidth,n.height=e.imageHeight,i.appendChild(n),t.replaceWith(i)}else t.setIcon(e.icon,"paperclip"===e.icon)}}else{if(void 0===t.error[n])throw new Error(`Unknown uploaded file for uploadId ${e}.`);{const e=t.error[n];i.classList.add("uploadFailed");const o=i.querySelector("small");o.innerHTML="",i.querySelector("fa-icon").setIcon("ban");let r=i.querySelector(".innerError");null===r?(r=document.createElement("span"),r.className="innerError",r.textContent=e.errorMessage,o.insertAdjacentElement("afterend",r)):r.textContent=e.errorMessage}}})),this._deleteHandler.rebuild(),this.checkMaxFiles(),n.triggerEvent(this._target,"change")}_getFormData(){return{internalId:this._options.internalId}}validateUpload(e){if(null===this._options.maxFiles||e.length+this.countFiles()<=this._options.maxFiles)return!0;{let e=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return null===e&&(e=document.createElement("small"),e.className="innerError",this._buttonContainer.insertAdjacentElement("afterend",e)),e.textContent=a.get("wcf.upload.error.reachedRemainingLimit",{maxFiles:this._options.maxFiles-this.countFiles()}),!1}}countFiles(){return this._options.imagePreview?null!==this._target.querySelector("img")?1:0:this._target.childElementCount}checkMaxFiles(){null!==this._options.maxFiles&&this.countFiles()>=this._options.maxFiles?r.default.hide(this._button):r.default.show(this._button)}}return l})),define("WoltLabSuite/Core/Ui/ItemList/Filter",["require","exports","tslib","../../Core","../../Dom/Util","../../Language","../../StringUtil","../Dropdown/Simple"],(function(e,t,i,n,o,r,a,s){"use strict";return n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),class{_container;_dropdownId="";_dropdown=void 0;_element;_fragment=void 0;_input;_items=new Set;_options;_value="";_clearButton;constructor(e,t){this._options=n.extend({callbackPrepareItem:void 0,enableVisibilityFilter:!0,filterPosition:"top"},t),"top"!==this._options.filterPosition&&(this._options.filterPosition="bottom");const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id, '"+e+"' does not match anything.");if(!i.classList.contains("scrollableCheckboxList")&&"function"!=typeof this._options.callbackPrepareItem)throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");"function"!=typeof this._options.callbackPrepareItem&&(this._options.callbackPrepareItem=e=>this._prepareItem(e)),i.dataset.filter="showAll";const o=document.createElement("div");o.className="itemListFilter",i.insertAdjacentElement("beforebegin",o),o.appendChild(i);const a=document.createElement("div");a.className="inputAddon";const s=document.createElement("input");if(s.className="long",s.type="text",s.placeholder=r.get("wcf.global.filter.placeholder"),s.addEventListener("keydown",(e=>{"Enter"===e.key&&e.preventDefault()})),s.addEventListener("keyup",(()=>this._keyup())),this._clearButton=document.createElement("a"),this._clearButton.href="#",this._clearButton.className="button inputSuffix disabled jsTooltip",this._clearButton.title=r.get("wcf.global.filter.button.clear"),this._clearButton.innerHTML='<fa-icon name="xmark" solid></fa-icon>',this._clearButton.addEventListener("click",(e=>{e.preventDefault(),this.reset()})),a.appendChild(s),a.appendChild(this._clearButton),this._options.enableVisibilityFilter){const e=document.createElement("a");e.href="#",e.className="button inputSuffix jsTooltip",e.title=r.get("wcf.global.filter.button.visibility"),e.innerHTML='<fa-icon name="eye"></fa-icon>',e.addEventListener("click",(e=>this._toggleVisibility(e))),a.appendChild(e)}"bottom"===this._options.filterPosition?o.appendChild(a):o.insertBefore(a,i),this._container=o,this._element=i,this._input=s;const l=Math.max(this._element.offsetHeight,200);this._element.style.setProperty("height",`${l}px`,"")}reset(){this._input.value="",this._keyup()}_buildItems(){this._items.clear(),Array.from(this._element.children).forEach((e=>{this._items.add(this._options.callbackPrepareItem(e))}))}_prepareItem(e){const t=e.children[0],i=t.textContent.trim(),n=t.children[0];for(;n.nextSibling;)t.removeChild(n.nextSibling);t.appendChild(document.createTextNode(" "));const o=document.createElement("span");return o.textContent=i,t.appendChild(o),{item:e,span:o,text:i}}_keyup(){const e=this._input.value.trim();if(this._value===e)return;e?this._clearButton.classList.remove("disabled"):this._clearButton.classList.add("disabled"),this._fragment||(this._fragment=document.createDocumentFragment()),this._fragment.appendChild(this._element),this._items.size||this._buildItems();const t=new RegExp("("+a.escapeRegExp(e)+")","i");let i=""===e;this._items.forEach((n=>{""===e?(n.span.textContent=n.text,o.default.show(n.item)):t.test(n.text)?(n.span.innerHTML=n.text.replace(t,"<u>$1</u>"),o.default.show(n.item),i=!0):o.default.hide(n.item)})),"bottom"===this._options.filterPosition?this._container.insertAdjacentElement("afterbegin",this._element):this._container.insertAdjacentElement("beforeend",this._element),this._value=e,o.default.innerError(this._container,!i&&r.get("wcf.global.filter.error.noMatches"))}_toggleVisibility(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;if(!this._dropdown){const e=document.createElement("ul");e.className="dropdownMenu",["activeOnly","highlightActive","showAll"].forEach((t=>{const i=document.createElement("a");i.dataset.type=t,i.href="#",i.textContent=r.get(`wcf.global.filter.visibility.${t}`),i.addEventListener("click",(e=>this._setVisibility(e)));const n=document.createElement("li");if(n.appendChild(i),"showAll"===t){n.className="active";const t=document.createElement("li");t.className="dropdownDivider",e.appendChild(t)}e.appendChild(n)})),s.default.initFragment(t,e),this._setupVisibilityFilter(),this._dropdown=e,this._dropdownId=t.id}s.default.toggleDropdown(t.id,t)}_setupVisibilityFilter(){const e=this._element.nextSibling,t=this._element.parentElement,i=this._element.scrollTop;document.createDocumentFragment().appendChild(this._element),this._element.querySelectorAll("li").forEach((e=>{const t=e.querySelector('input[type="checkbox"]');if(t)t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{t.checked?e.classList.add("active"):e.classList.remove("active")}));else{const t=e.querySelector('input[type="radio"]');t&&(t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{this._element.querySelectorAll("li").forEach((e=>e.classList.remove("active"))),t.checked?e.classList.add("active"):e.classList.remove("active")})))}})),t.insertBefore(this._element,e),this._element.scrollTop=i}_setVisibility(e){e.preventDefault();const t=e.currentTarget,i=t.dataset.type;if(s.default.close(this._dropdownId),this._element.dataset.filter===i)return;this._element.dataset.filter=i,this._dropdown.querySelector(".active").classList.remove("active"),t.parentElement.classList.add("active");const n=document.getElementById(this._dropdownId);"showAll"===i?n.classList.remove("active"):n.classList.add("active");const o=n.querySelector("fa-icon");"showAll"===i?o.setIcon("eye"):o.setIcon("eye-slash")}}})),define("WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText",["require","exports","tslib","../Confirmation","../../Language","../../Dom/Util"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiItemListLineBreakSeparatedText=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r);class a{addButton=void 0;clearButton=void 0;itemInput=void 0;itemList;items=new Set;mutationObserver;options;submitField=void 0;uiDisabled=!1;constructor(e,t={}){if(this.itemList=e,this.options=t,!this.options.submitFieldName){const e=this.itemList.nextElementSibling;if(!(e instanceof HTMLInputElement&&"hidden"===e.type))throw new Error("Missing `submitFieldName` option");this.submitField=e}this.itemList.closest("form").addEventListener("submit",(()=>this.submit())),this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{"readonly"===e.attributeName&&(e.target.readOnly?this.disableUi():this.enableUi())}))})),this.initValues(),this.buildUi()}addItem(e){if(e.preventDefault(),this.uiDisabled)return;const t=this.itemInput,i=t.value.trim();""===i?r.default.innerError(t.parentElement,o.get("wcf.global.form.error.empty")):this.items.has(i)?r.default.innerError(t.parentElement,o.get("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:i}),!0):(this.insertItem(i),this.resetInput()),t.focus()}buildUi(){const e=document.createElement("div");e.classList.add("itemListFilter"),this.itemList.insertAdjacentElement("beforebegin",e),e.appendChild(this.itemList);const t=document.createElement("div");t.classList.add("inputAddon"),e.appendChild(t),this.itemInput=document.createElement("input"),this.itemInput.classList.add("long"),this.itemInput.type="text",this.itemInput.placeholder=o.get("wcf.acp.option.type.lineBreakSeparatedText.placeholder"),this.itemInput.addEventListener("keydown",(e=>this.keydown(e))),this.itemInput.addEventListener("paste",(e=>this.paste(e))),t.appendChild(this.itemInput),this.mutationObserver.observe(this.itemInput,{attributes:!0}),this.addButton=document.createElement("a"),this.addButton.href="#",this.addButton.classList.add("button","inputSuffix","jsTooltip"),this.addButton.title=o.get("wcf.global.button.add"),this.addButton.innerHTML='<fa-icon name="plus" solid></fa-icon>',this.addButton.addEventListener("click",(e=>this.addItem(e))),t.appendChild(this.addButton),this.clearButton=document.createElement("a"),this.clearButton.href="#",this.clearButton.classList.add("button","inputSuffix","jsTooltip"),this.clearButton.title=o.get("wcf.global.button.delete"),this.clearButton.innerHTML='<fa-icon name="times" solid></fa-icon>',this.clearButton.addEventListener("click",(e=>this.clearList(e))),t.appendChild(this.clearButton),0===this.items.size&&r.default.hide(this.clearButton)}clearList(e){e.preventDefault(),this.uiDisabled||n.show({confirm:()=>{this.itemList.innerHTML="",this.items.clear(),this.hideList()},message:o.get("wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage"),messageIsHtml:!0})}deleteItem(e){if(this.uiDisabled)return;const t=e.currentTarget,i=t.closest("li").dataset.value;n.show({confirm:()=>{t.closest("li").remove(),0===this.itemList.childElementCount&&this.hideList(),this.items.delete(i)},message:o.get("wcf.button.delete.confirmMessage",{objectTitle:i}),messageIsHtml:!0})}disableUi(){this.addButton.classList.add("disabled"),this.clearButton.classList.add("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.add("disabled"))),this.uiDisabled=!0}enableUi(){this.addButton.classList.remove("disabled"),this.clearButton.classList.remove("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.remove("disabled"))),this.uiDisabled=!1}hideList(){r.default.hide(this.itemList),r.default.hide(this.clearButton)}initValues(){Array.from(this.itemList.children).forEach((e=>{this.items.add(e.dataset.value),e.querySelector(".jsDeleteItem").addEventListener("click",(e=>this.deleteItem(e)))}))}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const i=document.createElement("span");i.innerHTML='<fa-icon name="xmark" solid></fa-icon>',i.classList.add("jsDeleteItem","jsTooltip","pointer"),i.title=o.get("wcf.global.button.delete"),i.addEventListener("click",(e=>this.deleteItem(e))),t.append(i),t.append(document.createTextNode(" "));const n=document.createElement("span");n.innerText=e,t.append(n);const r=Array.from(this.itemList.children).find((t=>t.dataset.value>e));r?this.itemList.insertBefore(t,r):this.itemList.append(t),this.showList()}keydown(e){"Enter"===e.key&&this.addItem(e)}paste(e){if(this.uiDisabled)return;const t=e.clipboardData.getData("text/plain").split("\n");t.length>1&&(e.preventDefault(),t.forEach((e=>{""===(e=e.trim())||this.items.has(e)||this.insertItem(e)})),this.resetInput())}resetInput(){r.default.innerError(this.itemInput.parentElement,""),this.itemInput.value=""}showList(){r.default.show(this.itemList),r.default.show(this.clearButton)}submit(){const e=Array.from(this.items).join("\n");if(this.submitField)this.submitField.value=e;else{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}}}t.UiItemListLineBreakSeparatedText=a,t.default=a})),define("WoltLabSuite/Core/Ui/ItemList/Static",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Language","../Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e){const t=p.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.placeholder=r.get("wcf.global.form.input.maxItems")))}function l(e,t,i){const n=p.get(e),o=document.createElement("li");o.className="item";const r=document.createElement("span");if(r.className="content",r.dataset.objectId=t.objectId.toString(),r.textContent=t.value,o.appendChild(r),i||!n.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",(e=>c(e))),o.appendChild(e)}n.list.insertBefore(o,n.listItem),n.element.value="",n.element.disabled||s(e);let a=d(n);"function"==typeof n.options.callbackChange&&(null===a&&(a=u(e)),n.options.callbackChange(e,a))}function c(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const i=e.parentElement.dataset.elementId,n=p.get(i);e.remove(),t||n.element.focus(),s(i);let o=d(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=u(i)),n.options.callbackChange(i,o))}function d(e){if(!e.options.isCSV)return null;const t=u(e.element.id);return e.shadow.value=t.map((e=>e.value)).join(","),t}function u(e){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const t=p.get(e),i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:~~e.dataset.objectId,value:e.textContent})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a);const p=new Map;t.init=function(e,t,i){const r=document.getElementById(e);if(null===r)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(p.has(e)){const t=p.get(e);Object.values(t).forEach((e=>{e instanceof HTMLElement&&e.parentElement&&e.remove()})),a.default.destroy(e),p.delete(e)}const s=n.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},i),d=o.parentByTag(r,"FORM");if(null!==d&&!s.isCSV){if(!s.submitFieldName.length&&"function"!=typeof s.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");d.addEventListener("submit",(()=>{const t=u(e);s.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=s.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,d.appendChild(t)})):s.callbackSubmit(d,t)}))}const m=function(e,t){const i=document.createElement("ol");i.className="inputItemList"+(e.disabled?" disabled":""),i.dataset.elementId=e.id,i.addEventListener("click",(t=>{t.target===i&&e.focus()}));const n=document.createElement("li");let o;n.className="input",i.appendChild(n),e.addEventListener("keydown",(e=>function(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?c(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}(e))),e.addEventListener("keypress",(e=>function(e){if("Enter"===e.key||","===e.key){e.preventDefault();const t=e.currentTarget,i=t.value.trim();i.length&&l(t.id,{objectId:0,value:i})}}(e))),e.addEventListener("keyup",(e=>function(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}(e))),e.addEventListener("paste",(e=>function(e){const t=e.currentTarget;e.clipboardData.getData("text/plain").split(",").map((e=>e.trim())).filter((e=>e.length>0)).forEach((e=>{l(t.id,{objectId:0,value:e})})),e.preventDefault()}(e))),e.addEventListener("blur",(e=>function(e){const t=e.currentTarget;window.setTimeout((()=>{const e=t.value.trim();e.length&&l(t.id,{objectId:0,value:e})}),100)}(e))),e.insertAdjacentElement("beforebegin",i),n.appendChild(e),-1!==t.maxLength&&(e.maxLength=t.maxLength);let r=[];if(t.isCSV&&(o=document.createElement("input"),o.className="itemListInputShadow",o.type="hidden",o.name=e.name,e.removeAttribute("name"),i.insertAdjacentElement("beforebegin",o),r=e.value.split(",").map((e=>e.trim())).filter((e=>e.length>0)),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentElement.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,list:i,shadow:o,values:r}}(r,s);if(p.set(e,{dropdownMenu:null,element:m.element,list:m.list,listItem:m.element.parentElement,options:s,shadow:m.shadow}),t=m.values.length?m.values:t,Array.isArray(t)){const i=!m.element.disabled;t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),l(e,t,i)}))}},t.getValues=u,t.setValues=function(e,t){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const i=p.get(e);o.childrenByClass(i.list,"item").forEach((e=>c(e,!0))),t.forEach((t=>l(e,t)))}})),define("WoltLabSuite/Core/Ui/ItemList/User",["require","exports","tslib","../ItemList"],(function(e,t,i,n){"use strict";function o(e){const t=r(e.element.id),i=[],n=[];t.forEach((e=>{e.type&&"group"===e.type?n.push(e.objectId):i.push(e.value)}));const o=e.shadow;return o.value=i.join(","),e._shadowGroups||(e._shadowGroups=document.createElement("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=`${o.name}GroupIDs`,o.insertAdjacentElement("beforebegin",e._shadowGroups)),e._shadowGroups.value=n.join(","),t}function r(e){return n.getValues(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.init=void 0,n=i.__importStar(n),t.init=function(e,t){n.init(e,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:t.includeUserGroups?~~t.includeUserGroups:0,restrictUserGroupIDs:Array.isArray(t.restrictUserGroupIDs)?t.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof t.callbackChange?t.callbackChange:null,callbackSyncShadow:t.csvPerType?o:null,callbackSetupValues:"function"==typeof t.callbackSetupValues?t.callbackSetupValues:null,excludedSearchValues:Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[],isCSV:!0,maxItems:t.maxItems?~~t.maxItems:-1,restricted:!0})},t.getValues=r})),define("WoltLabSuite/Core/Ui/Like/Handler",["require","exports","tslib","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil","../Reaction/Handler","../../User"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l);const c=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new WeakMap;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=n.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},t),this.initContainers(),o.default.add(`WoltLabSuite/Core/Ui/Like/Handler-${e}`,(()=>this.initContainers())),new s.default(this._objectType,{containerSelector:this._options.containerSelector})}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{if(this._containers.has(t))return;const i={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~t.dataset.likeDislikes,liked:~~t.dataset.likeLiked,likes:~~t.dataset.likeLikes,objectId:~~t.dataset.objectId,users:JSON.parse(t.dataset.likeUsers)};this._containers.set(t,i),this._buildWidget(t,i),e=!0})),e&&o.default.trigger()}_buildWidget(e,t){let i,n=!0;if(i=this._options.isSingleItem?document.querySelector(this._options.summarySelector):e.querySelector(this._options.summarySelector),null===i&&(i=this._options.isSingleItem?document.querySelector(this._options.badgeContainerSelector):e.querySelector(this._options.badgeContainerSelector),n=!1),null!==i){const e=document.createElement("ul");if(e.classList.add("reactionSummaryList"),n?e.classList.add("likesSummary"):e.classList.add("reactionSummaryListTiny"),Object.entries(t.users).forEach((([t,i])=>{const n=c.get(t);if("reactionTypeID"===t||!n)return;const o=document.createElement("li");o.className="reactCountButton",o.setAttribute("reaction-type-id",t);const r=document.createElement("span");r.className="reactionCount",r.innerHTML=a.shortUnit(~~i),o.appendChild(r),o.innerHTML=n.renderedIcon+o.innerHTML,e.appendChild(o)})),n)this._options.summaryPrepend?i.insertAdjacentElement("afterbegin",e):i.insertAdjacentElement("beforeend",e);else if("OL"===i.nodeName||"UL"===i.nodeName){const t=document.createElement("li");t.appendChild(e),i.appendChild(t)}else i.appendChild(e);t.badge=e}if(this._options.canLike&&(l.default.userId!=~~e.dataset.userId||this._options.canLikeOwnContent)){let i=null;this._options.buttonAppendToSelector&&(i=this._options.isSingleItem?document.querySelector(this._options.buttonAppendToSelector):e.querySelector(this._options.buttonAppendToSelector));let n=null;if(this._options.buttonBeforeSelector&&(n=this._options.isSingleItem?document.querySelector(this._options.buttonBeforeSelector):e.querySelector(this._options.buttonBeforeSelector)),null===n&&null===i)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,n,i)}}_createButton(e,t,i,n){const o=r.get("wcf.reactions.react"),a=document.createElement("li");a.className="wcfReactButton";const s=document.createElement("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=o;const l=document.createElement("fa-icon");l.setIcon("smile"),void 0===t||0==t?l.dataset.reactionTypeId="0":(s.dataset.reactionTypeId=t.toString(),s.classList.add("active")),s.appendChild(l);const c=document.createElement("span");return c.className="invisible",c.innerHTML=o,s.appendChild(document.createTextNode(" ")),s.appendChild(c),a.appendChild(s),i?i.insertAdjacentElement("beforebegin",a):n.insertAdjacentElement("beforeend",a),s}}})),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["require","exports","tslib","WoltLabSuite/Core/Component/Ckeditor/Event","../../Ajax","../../Component/Ckeditor","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../Language","../Dropdown/Reusable","../Notification","../Screen","../Scroll"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h){"use strict";return o=i.__importStar(o),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),p=i.__importStar(p),m=i.__importStar(m),h=i.__importStar(h),class{_activeDropdownElement;_activeElement;_dropdownMenu;_elements;_options;constructor(e){this.init(e)}init(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new WeakMap,this._options=a.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.default.add(`Ui/Message/InlineEdit_${this._options.className}`,(()=>this.rebuild()))}rebuild(){document.querySelectorAll(this._options.messageSelector).forEach((e=>{if(this._elements.has(e))return;const t=e.querySelector(".jsMessageEditButton");if(null!==t){const i=a.stringToBool(e.dataset.canEdit||""),n=a.stringToBool(e.dataset.canEditInline||"");this._options.canEditInline||n?(t.addEventListener("click",(t=>this._clickDropdown(e,t))),t.classList.add("jsDropdownEnabled"),i&&t.addEventListener("dblclick",(t=>this._click(e,t)))):i&&t.addEventListener("click",(t=>this._click(e,t)))}const i=e.querySelector(".messageBody"),n=e.querySelector(".messageFooter"),o=n.querySelector(".messageFooterButtons"),r=e.querySelector(".messageHeader"),s=i.querySelector(".messageText");this._elements.set(e,{button:t,messageBody:i,messageBodyEditor:null,messageFooter:n,messageFooterButtons:o,messageHeader:r,messageText:s})}))}_click(e,t){null===e&&(e=this._activeDropdownElement),t&&t.preventDefault(),null===this._activeElement?(this._activeElement=e,this._prepare(),o.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(e)}})):this._activeElement!==e&&p.show("wcf.message.error.editorAlreadyInUse",void 0,"warning")}_clickDropdown(e,t){t.preventDefault();const i=t.currentTarget;if(!i.classList.contains("dropdownToggle")){if(i.classList.add("dropdownToggle"),i.parentElement.classList.add("dropdown"),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this._activeDropdownElement=e;let n=i;if(m.is("screen-sm-down")&&0===i.clientWidth){const e=i.closest(this._options.messageSelector);n=this._elements.get(e).messageHeader.querySelector(".messageQuickOptions")}u.toggleDropdown(this._options.dropdownIdentifier,n)})),null===this._dropdownMenu){this._dropdownMenu=document.createElement("ul"),this._dropdownMenu.className="dropdownMenu";const e=this._dropdownGetItems();c.fire("com.woltlab.wcf.inlineEditor",`dropdownInit_${this._options.dropdownIdentifier}`,{items:e}),this._dropdownBuild(e),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,((e,t)=>this._dropdownToggle(e,t)))}setTimeout((()=>i.click()),10)}}_dropdownBuild(e){e.forEach((e=>{const t=document.createElement("li");if(t.dataset.item=e.item,"divider"===e.item)t.className="dropdownDivider";else{const i=document.createElement("span");i.textContent=d.get(e.label),t.appendChild(i),"editItem"===e.item?t.addEventListener("click",(e=>this._click(null,e))):t.addEventListener("click",(e=>this._clickDropdownItem(e)))}this._dropdownMenu.appendChild(t)}))}_dropdownToggle(e,t){const i=this._elements.get(this._activeDropdownElement),n=i.button.parentElement;if("close"===t)return n.classList.remove("dropdownOpen"),void i.messageFooterButtons.classList.remove("forceVisible");n.classList.add("dropdownOpen"),i.messageFooterButtons.classList.add("forceVisible");const o=new Map(Object.entries(this._dropdownOpen()));c.fire("com.woltlab.wcf.inlineEditor",`dropdownOpen_${this._options.dropdownIdentifier}`,{element:this._activeDropdownElement,visibility:o});const r=this._dropdownMenu;let a=!1;const s=Array.from(r.children);s.forEach(((e,t)=>{const i=e.dataset.item;if("divider"===i)a?(l.default.show(e),a=!1):l.default.hide(e);else if(!1===o.get(i)){if(l.default.hide(e),t>0&&t+1===s.length){const t=e.previousElementSibling;"divider"===t.dataset.item&&l.default.hide(t)}}else l.default.show(e),a=!0}))}_dropdownGetItems(){return[]}_dropdownOpen(){return{}}_dropdownSelect(e){}_clickDropdownItem(e){e.preventDefault();const t=e.currentTarget.dataset.item,i={cancel:!1,element:this._activeDropdownElement,item:t};c.fire("com.woltlab.wcf.inlineEditor",`dropdownItemClick_${this._options.dropdownIdentifier}`,i),i.cancel?e.preventDefault():this._dropdownSelect(t)}_prepare(){const e=this._elements.get(this._activeElement),t=document.createElement("div");t.className="messageBody editor",e.messageBodyEditor=t;const i=document.createElement("fa-icon");i.size=48,i.setIcon("spinner"),t.appendChild(i),e.messageBody.insertAdjacentElement("afterend",t),l.default.hide(e.messageBody),h.element(this._activeElement,void 0,"instant")}_showEditor(e){const t=this._getEditorId(),i=this._activeElement,n=this._elements.get(i);i.classList.add("jsInvalidQuoteTarget");const o=i.parentElement;o.classList.contains("anchorFixedHeader")&&o.classList.add("disableAnchorFixedHeader"),n.messageBodyEditor.querySelector("fa-icon").remove();const r=n.messageBodyEditor,a=document.createElement("div");a.className="editorContainer",l.default.setInnerHtml(a,e.returnValues.template),r.appendChild(a);const s=a.querySelector(".formSubmit");s.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save())),s.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),c.add("com.woltlab.wcf.ckeditor5",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()})),l.default.hide(n.messageHeader),l.default.hide(n.messageFooter),window.setTimeout((()=>{this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(i,void 0,"instant")}),250)}_restoreMessage(){const e=this._activeElement,t=this._elements.get(e);this._destroyEditor(),t.messageBodyEditor.remove(),t.messageBodyEditor=null,l.default.show(t.messageBody),l.default.show(t.messageFooter),l.default.show(t.messageHeader),e.classList.remove("jsInvalidQuoteTarget");const i=e.parentElement;i.classList.contains("anchorFixedHeader")&&i.classList.remove("disableAnchorFixedHeader"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()}_save(){const e=this._getEditorId(),t=(0,r.getCkeditorById)(e),i={containerID:this._options.containerId,data:{message:t.getHtml()},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},a=document.getElementById(`settings_${e}`);a&&a.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(i,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);i[t]=e.value.trim()}));let s=this._validate(i);s instanceof Promise||(s=!1===s?Promise.reject():Promise.resolve()),s.then((()=>{(0,n.dispatchToCkeditor)(t.sourceElement).collectMetaData({metaData:i}),o.api(this,{actionName:"save",parameters:i}),this._hideEditor()}),(e=>{const t=e.message;console.log(`Validation of post edit failed: ${t}`)}))}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t={api:this,parameters:e,valid:!0,promises:[]};return c.fire("com.woltlab.wcf.ckeditor5",`validate_${this._getEditorId()}`,t),t.valid?t.promises.push(Promise.resolve()):t.promises.push(Promise.reject()),Promise.all(t.promises)}throwError(e,t){l.default.innerError(e,t)}_showMessage(e){const t=this._activeElement,i=this._elements.get(t);if(l.default.setInnerHtml(i.messageBody.querySelector(".messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){i.messageFooter.querySelectorAll(".attachmentThumbnailList, .attachmentFileList").forEach((e=>e.remove()));const t=document.createElement("div");let n;for(l.default.setInnerHtml(t,e.returnValues.attachmentList);t.childNodes.length;)n=t.childNodes[t.childNodes.length-1],i.messageFooter.insertBefore(n,i.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){const t=i.messageBody.querySelector(".pollContainer");if(null!==t&&t.parentElement.remove(),""!==e.returnValues.poll){const t=document.createElement("div");t.className="jsInlineEditorHideContent",l.default.setInnerHtml(t,e.returnValues.poll),i.messageBody.insertAdjacentElement("afterbegin",t)}}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),p.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())}_hideEditor(){const e=this._elements.get(this._activeElement),t=e.messageBodyEditor.querySelector(".editorContainer");l.default.hide(t);const i=document.createElement("fa-icon");i.size=48,i.setIcon("spinner"),e.messageBodyEditor.appendChild(i)}_restoreEditor(){const e=this._elements.get(this._activeElement).messageBodyEditor;e.querySelector('fa-icon[name="spinner"]').remove();const t=e.querySelector(".editorContainer");null!==t&&l.default.show(t)}_destroyEditor(){const e=(0,r.getCkeditorById)(this._getEditorId(),!1);e?.destroy().then((()=>{e.discardDraft()}))}_getHash(e){return`#message${e}`}_updateHistory(e){window.location.hash=e}_getEditorId(){return this._options.editorPrefix+this._getObjectId(this._activeElement).toString()}_getObjectId(e){return e.dataset.objectId||""}_ajaxFailure(e){const t=this._elements.get(this._activeElement).messageBodyEditor.querySelector(".ck.ck-editor");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(l.default.innerError(t,e.returnValues.realErrorMessage),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}}legacyEdit(e){this._click(document.getElementById(e),null)}}})),define("WoltLabSuite/Core/Ui/Message/Manager",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil"],(function(e,t,i,n,o,r,a,s){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s),class{_elements=new Map;_options;constructor(e){this._options=o.extend({className:"",selector:""},e),this.rebuild(),r.default.add(`Ui/Message/Manager${this._options.className}`,this.rebuild.bind(this))}rebuild(){this._elements.clear(),document.querySelectorAll(this._options.selector).forEach((e=>{this._elements.set(e.dataset.objectId,e)}))}getPermission(e,t){t="can"+s.ucfirst(t);const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);return o.stringToBool(i.dataset[s.toCamelCase(t)]||"")}getPropertyValue(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const r=n.dataset[s.toCamelCase(t)]||"";return i?o.stringToBool(r):r}update(e,t,i){n.api(this,{actionName:t,parameters:i||{},objectIDs:[e]})}updateItems(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{const i=this._elements.get(e);void 0!==i&&Object.entries(t).forEach((([e,t])=>{this._update(i,e,t)}))}))}updateAllItems(e){const t=Array.from(this._elements.keys());this.updateItems(t,e)}setNote(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const o=n.querySelector(".messageFooterNotes");let r=o.querySelector(`.${t}`);i?(null===r&&(r=document.createElement("p"),r.className="messageFooterNote "+t,o.appendChild(r)),r.innerHTML=i):null!==r&&r.remove()}_update(e,t,i){e.dataset[t]=i.toString();const n=1==i||!0===i||"true"===i;this._updateState(e,t,i,n)}_updateState(e,t,i,n){switch(t){case"isDeleted":n?e.classList.add("messageDeleted"):e.classList.remove("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",n);break;case"isDisabled":n?e.classList.add("messageDisabled"):e.classList.remove("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",n)}}_toggleMessageStatus(e,t,i,n,o){let r=e.querySelector(".messageStatus");if(null===r){const t=e.querySelector(".messageHeaderMetaData");if(null===t)return;r=document.createElement("ul"),r.className="messageStatus",t.insertAdjacentElement("afterend",r)}let s=r.querySelector(`.${t}`);if(o){if(null!==s)return;s=document.createElement("span"),s.className=`badge label ${n} ${t}`,s.textContent=a.get(i);const e=document.createElement("li");e.appendChild(s),r.appendChild(e)}else{if(null===s)return;s.parentElement.remove()}}_getAttributeName(e){return-1!==e.indexOf("-")?e:e.split(/([A-Z][a-z]+)/).map((e=>e.trim().toLowerCase())).filter((e=>e.length>0)).join("-")}_ajaxSuccess(e){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")}_ajaxSetup(){return{data:{className:this._options.className}}}}})),define("WoltLabSuite/Core/Ui/Message/Quote",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiMessageQuote=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l);class c{activeMessageId="";className;containers=new Map;containerSelector="";copyQuote=document.createElement("div");message="";messageBodySelector;objectId=0;objectType="";timerSelectionChange=void 0;isMouseDown=!1;quoteManager;constructor(e,t,i,n,o,r,a){this.className=t,this.objectType=i,this.containerSelector=n,this.messageBodySelector=o,this.initContainers(),a=a&&e.supportPaste(),this.quoteManager=e,this.initCopyQuote(a),document.addEventListener("mouseup",(e=>this.onMouseUp(e))),document.addEventListener("selectionchange",(()=>this.onSelectionchange())),s.default.add("UiMessageQuote",(()=>this.initContainers())),document.addEventListener("touchstart",(e=>{const t=e.target;t===this.copyQuote||this.copyQuote.contains(t)||(this.copyQuote.classList.add("touchForceInaccessible"),document.addEventListener("touchend",(()=>{this.copyQuote.classList.remove("touchForceInaccessible")}),{once:!0,passive:!1}))}),{passive:!1})}initContainers(){document.querySelectorAll(this.containerSelector).forEach((e=>{const t=l.default.identify(e);this.containers.has(t)||(this.containers.set(t,e),e.classList.contains("jsInvalidQuoteTarget")||(e.addEventListener("mousedown",(e=>this.onMouseDown(e))),e.classList.add("jsQuoteMessageContainer"),e.querySelector(".jsQuoteMessage")?.addEventListener("click",(e=>this.saveFullQuote(e)))))}))}onSelectionchange(){if(!this.isMouseDown){if(""===this.activeMessageId){const e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return;const t=e.getRangeAt(0),i=l.default.closest(t.startContainer,".jsQuoteMessageContainer"),n=l.default.closest(t.endContainer,".jsQuoteMessageContainer");if(i&&i===n&&!i.classList.contains("jsInvalidQuoteTarget")){let e=t.commonAncestorContainer;e.nodeType!==Node.ELEMENT_NODE&&(e=e.parentElement);const n=e.offsetParent;if(i.contains(n)&&n.scrollTop+n.clientHeight<e.offsetTop)return;this.activeMessageId=i.id}}this.timerSelectionChange&&window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=window.setTimeout((()=>this.onMouseUp()),100)}}onMouseDown(e){this.copyQuote.classList.remove("active");const t=e.currentTarget;this.activeMessageId=t.classList.contains("jsInvalidQuoteTarget")?"":t.id,this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!0}getNodeText(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>"BLOCKQUOTE"===e.nodeName||"SCRIPT"===e.nodeName?NodeFilter.FILTER_REJECT:!(e instanceof HTMLImageElement)||e.classList.contains("smiley")&&e.alt?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i="";const n=[];for(;t.nextNode();){const e=t.currentNode;if(e instanceof Text){const t=e.parentElement;if(t instanceof HTMLAnchorElement&&n.includes(t))continue;i+=e.nodeValue.replace(/\n/g," ")}else{if(e instanceof HTMLAnchorElement){const t=e.textContent;if(t.indexOf("…")>0){const o=t.split(/\u2026/);if(2===o.length){const t=e.href;0===t.indexOf(o[0])&&t.substr(-1*o[1].length)===o[1]&&(i+=t,n.push(e))}}}switch(e.nodeName){case"BR":case"LI":case"TD":case"UL":i+="\n";break;case"P":i+="\n\n";break;case"IMG":i+=` ${e.alt} `;break;case"DIV":(e.classList.contains("codeBoxHeadline")||e.classList.contains("codeBoxLine"))&&(i+="\n")}}}return i}onMouseUp(e){if(e instanceof Event&&(this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!1),""===this.activeMessageId)return void this.copyQuote.classList.remove("active");const t=window.getSelection();if(1!==t.rangeCount||t.isCollapsed)return void this.copyQuote.classList.remove("active");const i=this.containers.get(this.activeMessageId);if(void 0===i)return;const n=~~i.dataset.objectId,o=this.messageBodySelector?i.querySelector(this.messageBodySelector):i;let r=t.anchorNode;for(;r&&r!==o;)r=r.parentNode;if(r!==o)return void this.copyQuote.classList.remove("active");const a=this.getSelectedText().trim();if(""===a)return void this.copyQuote.classList.remove("active");const s=t.getRangeAt(0),c=l.default.getClosestElement(s.startContainer),d=l.default.getClosestElement(s.endContainer);if(c.closest("blockquote")||d.closest("blockquote"))return void this.copyQuote.classList.remove("active");const u=this.getNodeText(o);if(!this.normalizeTextForComparison(u).includes(this.normalizeTextForComparison(a)))return;this.copyQuote.classList.add("active");const p=this.copyQuote.classList.contains("touchForceInaccessible");p&&this.copyQuote.classList.remove("touchForceInaccessible");const m=this.getElementBoundaries(t),h=(this.copyQuote.offsetHeight,this.copyQuote.offsetWidth);let f=(m.right-m.left)/2-h/2+m.left;const g=o.getBoundingClientRect();f<g.left?f=g.left:f+h>g.right&&(f=g.right-h),this.copyQuote.style.setProperty("top",`${m.bottom+7}px`),this.copyQuote.style.setProperty("left",`${f}px`),this.copyQuote.classList.remove("active"),p&&this.copyQuote.classList.add("touchForceInaccessible"),this.timerSelectionChange?(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0):this.activeMessageId="",window.setTimeout((()=>{const e=this.getSelectedText().trim();""!==e&&(this.copyQuote.classList.add("active"),this.message=e,this.objectId=n)}),10)}normalizeTextForComparison(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")}getElementBoundaries(e){let t=null;if(e.rangeCount>0){const i=e.getRangeAt(0).getBoundingClientRect(),n=window.pageYOffset;t={bottom:i.bottom+n,left:i.left,right:i.right,top:i.top+n}}return t}initCopyQuote(e){this.copyQuote.classList.add("balloonTooltip","interactive","quoteManagerCopy");const t=document.createElement("span");if(t.classList.add("jsQuoteManagerStore"),t.textContent=a.get("wcf.message.quote.quoteSelected"),t.addEventListener("click",(e=>this.saveQuote(e))),this.copyQuote.appendChild(t),e){const e=document.createElement("span");e.classList.add("jsQuoteManagerQuoteAndInsert"),e.textContent=a.get("wcf.message.quote.quoteAndReply"),e.addEventListener("click",(e=>this.saveAndInsertQuote(e))),this.copyQuote.appendChild(e)}document.body.appendChild(this.copyQuote)}getSelectedText(){const e=window.getSelection();return e.rangeCount?this.getNodeText(e.getRangeAt(0).cloneContents()):""}saveFullQuote(e){e.preventDefault();const t=e.currentTarget;n.api(this,{actionName:"saveFullQuote",objectIDs:[t.dataset.objectId]});const i=t.querySelector("a");o.stringToBool(t.dataset.isQuoted||"")?(t.dataset.isQuoted="false",i.classList.remove("active")):(t.dataset.isQuoted="true",i.classList.add("active"));const r=t.closest(".buttonGroupNavigation");r&&r.classList.contains("jsMobileButtonGroupNavigation")&&r.querySelector(".dropdownLabel").click()}saveQuote(e,t=!1){e?.preventDefault(),n.api(this,{actionName:"saveQuote",objectIDs:[this.objectId],parameters:{message:this.message,renderQuote:t}});const i=window.getSelection();i.rangeCount&&(i.removeAllRanges(),this.copyQuote.classList.remove("active"))}saveAndInsertQuote(e){e.preventDefault(),this.saveQuote(void 0,!0)}_ajaxSuccess(e){if(void 0!==e.returnValues.count){void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs);const t=e.returnValues.fullQuoteObjectIDs||{};this.quoteManager.updateCount(e.returnValues.count,t)}switch(e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&r.fire("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName,quote:e.returnValues.renderedQuote})}}_ajaxSetup(){return{data:{className:this.className,interfaceName:"wcf\\data\\IMessageQuoteAction"}}}updateFullQuoteObjectIDs(e){this.containers.forEach((t=>{const i=t.querySelector(".jsQuoteMessage");i.dataset.isQuoted="false";const n=i.querySelector("a");i.classList.remove("active");const o=~~i.dataset.objectID;e.includes(o)&&(i.dataset.isQuoted="true",n.classList.add("active"))}))}}t.UiMessageQuote=c,t.default=c})),define("WoltLabSuite/Core/Ui/Message/Reply",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util","../Dialog","../Notification","../../User","../../Controller/Captcha","../Scroll","../../Component/Ckeditor","WoltLabSuite/Core/Component/Ckeditor/Event"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importDefault(c),d=i.__importStar(d),u=i.__importDefault(u),p=i.__importDefault(p),m=i.__importStar(m),class{_container;_content;_ckeditor;_guestDialogId="";_loadingOverlay=null;_options;_textarea;constructor(e){this._options=o.extend({ajax:{className:""},quoteManager:null,successMessage:"wcf.global.success.add"},e),this._container=document.getElementById("messageQuickReply"),this._content=this._container.querySelector(".messageContent"),this._textarea=document.getElementById("text"),this._container.querySelector(".message").classList.add("jsInvalidQuoteTarget"),this._container.querySelector('button[data-type="save"]').addEventListener("click",(e=>this._submit(e))),document.querySelectorAll(".jsQuickReply").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),m.element(this._container,(()=>{this._getCKEditor().focus()}))}))}))}_submitGuestDialog(e){if(e instanceof KeyboardEvent&&"Enter"!==e.key)return;const t=e.currentTarget,i=t.closest(".dialogContent").querySelector("input[name=username]");if(""===i.value)return l.default.innerError(i,a.get("wcf.global.form.error.empty")),void i.closest("dl").classList.add("formError");let n={parameters:{data:{username:i.value}}};const r=t.dataset.captchaId;if(p.default.has(r)){const e=p.default.getData(r);p.default.delete(r),e instanceof Promise?e.then((e=>{n=o.extend(n,e),this._submit(void 0,n)})):(n=o.extend(n,e),this._submit(void 0,n))}else this._submit(void 0,n)}_submit(e,t){if(e&&e.preventDefault(),this._content.classList.contains("loading")&&(!this._guestDialogId||!c.default.isOpen(this._guestDialogId)))return;if(!this._validate())return;this._showLoadingOverlay();const i={};Object.entries(this._container.dataset).forEach((([e,t])=>{i[e.replace(/Id$/,"ID")]=t})),i.data={message:this._getCKEditor().getHtml()},i.removeQuoteIDs=this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[];const r=document.getElementById("settings_text");r&&r.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(i,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);i[t]=e.value.trim()})),(0,f.dispatchToCkeditor)(this._textarea).collectMetaData({metaData:i.data}),u.default.userId||t||(i.requireGuestDialog=!0),n.api(this,o.extend({parameters:i},t))}_validate(){this._container.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this._getCKEditor().getHtml();if(""===e)return this.throwError(this._getCKEditor().element,a.get("wcf.global.form.error.empty")),!1;const t={api:this,editor:this._getCKEditor(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}throwError(e,t){l.default.innerError(e,"empty"===t?a.get("wcf.global.form.error.empty"):t)}_showLoadingOverlay(){null===this._loadingOverlay&&(this._loadingOverlay=document.createElement("div"),this._loadingOverlay.className="messageContentLoadingOverlay",this._loadingOverlay.innerHTML='<fa-icon size="96" name="spinner" solid></fa-icon>'),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)}_hideLoadingOverlay(){this._content.classList.remove("loading");const e=this._content.querySelector(".messageContentLoadingOverlay");null!==e&&e.remove()}_reset(){this._getCKEditor().reset()}_handleError(e){const t={api:this,cancel:!1,returnValues:e.returnValues};r.fire("com.woltlab.wcf.ckeditor5","handleError_text",t),t.cancel||this.throwError(this._getCKEditor().element,e.returnValues.realErrorMessage)}_getCKEditor(){if(void 0===this._ckeditor&&(this._ckeditor=(0,h.getCkeditor)(this._textarea),void 0===this._ckeditor))throw new Error(`Unable to find the CKEditor instance for '${this._textarea.id}'.`);return this._ckeditor}_insertMessage(e){if(this._getCKEditor().discardDraft(),e.returnValues.url)window.location.href==e.returnValues.url&&window.location.reload(),window.location.href=e.returnValues.url;else{if(e.returnValues.template){let t;if("DESC"===this._container.dataset.sortOrder)l.default.insertHtml(e.returnValues.template,this._container,"after"),t=l.default.identify(this._container.nextElementSibling);else{let i=this._container;i.previousElementSibling&&i.previousElementSibling.classList.contains("messageListPagination")&&(i=i.previousElementSibling),l.default.insertHtml(e.returnValues.template,i,"before"),t=l.default.identify(i.previousElementSibling)}this._container.dataset.lastPostTime=e.returnValues.lastPostTime.toString(),window.history.replaceState(void 0,"",`#${t}`),m.element(document.getElementById(t))}d.show(a.get(this._options.successMessage)),this._options.quoteManager&&this._options.quoteManager.countQuotes(),s.default.trigger()}}_ajaxSuccess(e){if(!u.default.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.default.userId&&e.returnValues.guestDialog){const t=e.returnValues.guestDialogID;c.default.openStatic(t,e.returnValues.guestDialog,{closable:!1,onClose:function(){p.default.has(t)&&p.default.delete(t)},title:a.get("wcf.global.confirmation.title")});const i=c.default.getDialog(t);i.content.querySelector("input[type=submit]").addEventListener("click",(e=>this._submitGuestDialog(e))),i.content.querySelector("input[type=text]").addEventListener("keypress",(e=>this._submitGuestDialog(e))),this._guestDialogId=t}else this._insertMessage(e),u.default.userId||c.default.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay()}_ajaxFailure(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(this._handleError(e),!1)}_ajaxSetup(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"},silent:!0}}}})),define("WoltLabSuite/Core/Ui/Message/Share",["require","exports","tslib","../../Event/Handler","../../StringUtil"],(function(e,t,i,n,o){"use strict";function r(e,t,i,n){n||(n=s),window.open(t.replace("{pageURL}",n).replace("{text}",a+(i?`%20${n}`:"")),e,"height=600,width=600")}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let a="",s="";t.init=function(){const e=document.querySelector('meta[property="og:title"]');null!==e&&(a=encodeURIComponent(e.content));const t=document.querySelector('meta[property="og:url"]');null!==t&&(s=encodeURIComponent(t.content)),document.querySelectorAll(".jsMessageShareButtons").forEach((e=>{e.classList.remove("jsMessageShareButtons");let t=encodeURIComponent(o.unescapeHTML(e.dataset.url||""));t||(t=s);const i={facebook:{link:e.querySelector('.messageShareProvider[data-identifier="Facebook"]'),share(e){e.preventDefault(),r("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{link:e.querySelector('.messageShareProvider[data-identifier="Reddit"]'),share(e){e.preventDefault(),r("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{link:e.querySelector('.messageShareProvider[data-identifier="Twitter"]'),share(e){e.preventDefault(),r("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{link:e.querySelector('.messageShareProvider[data-identifier="LinkedIn"]'),share(e){e.preventDefault(),r("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{link:e.querySelector('.messageShareProvider[data-identifier="Pinterest"]'),share(e){e.preventDefault(),r("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{link:e.querySelector('.messageShareProvider[data-identifier="XING"]'),share(e){e.preventDefault(),r("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{link:e.querySelector('.messageShareProvider[data-identifier="WhatsApp"]'),share(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+a+"%20"+s}}};n.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:i,pageDescription:a,pageUrl:s}),Object.values(i).forEach((e=>{null!==e.link&&e.link.addEventListener("click",(t=>e.share(t)))}))}))}})),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["require","exports","https://platform.twitter.com/widgets.js"],(function(e,t){"use strict";async function i(e,t,i=!1){const o=await n,r="dark"===document.documentElement.dataset.colorScheme?"dark":"light",a=await o.widgets.createTweet(t,e,{dnt:!0,lang:document.documentElement.lang,theme:r});if(a&&i){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.embedAll=t.embedTweet=void 0;const n=new Promise((e=>{twttr.ready(e)}));t.embedTweet=i,t.embedAll=function(){document.querySelectorAll("[data-wsc-twitter-tweet]").forEach((e=>{const t=e.dataset.wscTwitterTweet;t&&(delete e.dataset.wscTwitterTweet,i(e,t,!0))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAllAsRead",["require","exports","tslib","../../Ajax","../Notification"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=i.__importStar(o),t.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),async function(){await(0,n.dboAction)("markAllAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").dispatch(),document.querySelectorAll(".moderationQueueEntryList .new").forEach((e=>{e.classList.remove("new")})),document.querySelector("#outstandingModeration .badgeUpdate")?.remove(),o.show()}()}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAsRead",["require","exports","../../Ajax"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const n=new WeakSet;t.setup=function(){document.querySelectorAll(".moderationQueueEntryList .new .columnAvatar").forEach((e=>{n.has(e)||(n.add(e),e.addEventListener("dblclick",(t=>{t.preventDefault();const n=e.closest(".moderationQueueEntry");n.classList.contains("new")&&async function(e){const t=parseInt(e.dataset.queueId,10);await(0,i.dboAction)("markAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").objectIds([t]).dispatch(),e.classList.remove("new"),e.querySelector(".columnAvatar p")?.removeAttribute("title")}(n)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/Report",["require","exports","tslib","../../Ajax","../../Component/Dialog","../../Dom/Util","../../Helper/Selector","../../Language","../Notification"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e){(function(e){return""===e.dataset.reportContent?(console.error("Missing the value for [data-report-content]",e),!1):!!parseInt(e.dataset.objectId||"")||(console.error("Expected a valid integer for [data-object-id]",e),!1)})(e)&&e.addEventListener("click",(t=>{"A"!==e.tagName&&"true"!==e.dataset.isLegacyButton||t.preventDefault(),async function(e){const t=parseInt(e.dataset.objectId||""),i=e.dataset.reportContent,a=await(0,n.dboAction)("prepareReport","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({objectID:t,objectType:i}).dispatch();let c;a.alreadyReported?c=(0,o.dialogFactory)().fromHtml(a.template).asAlert():(c=(0,o.dialogFactory)().fromHtml(a.template).asPrompt(),c.addEventListener("validate",(e=>{(function(e){const t=e.content.querySelector(".jsReportMessage"),i=t.closest("dl");return""===t.value.trim()?(i.classList.add("formError"),(0,r.innerError)(t,s.get("wcf.global.form.error.empty")),!1):(i.classList.remove("formError"),(0,r.innerError)(t,!1),!0)})(c)||e.preventDefault()})),c.addEventListener("primary",(()=>{!async function(e,t,i){const o=e.content.querySelector(".jsReportMessage").value.trim();await(0,n.dboAction)("report","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({message:o,objectID:i,objectType:t}).dispatch(),l.show()}(c,i,t)}))),c.show(s.get("wcf.moderation.report.reportContent"))}(e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.registerLegacyButton=void 0,s=i.__importStar(s),l=i.__importStar(l),t.registerLegacyButton=function(e,t){e.dataset.reportContent=t,e.dataset.isLegacyButton="true",c(e)},t.setup=function(){(0,a.wheneverFirstSeen)("[data-report-content]",(e=>c(e)))}})),define("WoltLabSuite/Core/Ui/Pagination/JumpToPage",["require","exports","../../Component/Dialog","../../Helper/Selector","../../Language"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,n.wheneverFirstSeen)("woltlab-core-pagination",(e=>{e.addEventListener("jumpToPage",(()=>{!function(e){const t=`\n    <dl>\n      <dt></dt>\n      <dd>\n        <input\n          class="tiny"\n          type="number"\n          min="1"\n          max="${e.count}"\n          value="${e.count}"\n          aria-label="${(0,o.getPhrase)("wcf.page.jumpTo.pageNo")}"\n          required\n        >\n        <small>${(0,o.getPhrase)("wcf.page.jumpTo.description",{pages:e.count})}</small>\n      </dd>\n    </dl>\n  `,n=(0,i.dialogFactory)().fromHtml(t).asPrompt(),r=n.content.querySelector('input[type="number"]');n.addEventListener("primary",(()=>{e.jumpToPage(parseInt(r.value))})),n.show((0,o.getPhrase)("wcf.page.jumpTo")),r.select()}(e)}))}))}})),define("WoltLabSuite/Core/Ui/Poll/View/Participants",["require","exports","../../../Component/User/List"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Participants=void 0;class n{pollManager;button;userList=void 0;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showPollParticipantsButton");if(!t)throw new Error(`Could not find button with selector "showPollParticipantsButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(e=>{e&&e.preventDefault(),this.open()}))}open(){this.userList||(this.userList=new i.UserList({className:"wcf\\data\\poll\\PollAction",parameters:{pollID:this.pollManager.pollId}},this.pollManager.question)),this.userList.open()}showButton(){this.button.hidden=!1}hideButton(){this.button.hidden=!0}}t.Participants=n,t.default=n})),define("WoltLabSuite/Core/Ui/Poll/View/Results",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Results=void 0,n=i.__importStar(n);class r{pollManager;button;constructor(e,t){this.pollManager=e,this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.results)?this.pollManager.displayView(o.PollViews.results):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=n.dboAction("getResultTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.results,t.template),this.pollManager.displayView(o.PollViews.results)}checkVisibility(e){e===o.PollViews.results?this.button.hidden=!0:this.button.hidden=!1}}t.Results=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/View/Vote",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,n=i.__importStar(n);class r{pollManager;button;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showVoteFormButton");if(!t)throw new Error(`Could not find button with selector ".showVoteFormButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.vote)?this.pollManager.displayView(o.PollViews.vote):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=n.dboAction("getVoteTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.vote,t.template),this.pollManager.displayView(o.PollViews.vote)}checkVisibility(e){e!==o.PollViews.vote&&this.pollManager.canVote?this.button.hidden=!1:this.button.hidden=!0}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Vote",["require","exports","tslib","./Poll","../../Ajax"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,o=i.__importStar(o);class r{pollManager;button;inputs;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".votePollButton");if(!t)throw new Error(`Could not find vote button for poll "${this.pollManager.pollId}".`);this.button=t,this.button.addEventListener("click",(()=>this.submit())),this.initSelects()}initSelects(){if(this.pollManager.hasView(n.PollViews.vote)){const e=this.pollManager.getView(n.PollViews.vote);this.inputs=Array.from(e.querySelectorAll("input")),this.inputs.forEach((e=>{e.addEventListener("change",(()=>this.checkInputs()))})),this.checkInputs()}}checkInputs(){let e=0;this.inputs.forEach((t=>{t.checked&&e++,this.pollManager.maxVotes>1&&(t.disabled=!1)})),0===e?this.button.disabled=!0:(e>=this.pollManager.maxVotes&&this.pollManager.maxVotes>1&&this.inputs.forEach((e=>{e.checked||(e.disabled=!0)})),this.button.disabled=!1)}getSelectedOptions(){return this.inputs.filter((e=>e.checked)).map((e=>parseInt(e.value,10)))}async submit(){this.button.disabled=!0;const e=this.getSelectedOptions(),t=o.dboAction("vote","wcf\\data\\poll\\PollAction");t.objectIds([this.pollManager.pollId]),t.payload({optionIDs:e});const i=await t.dispatch();this.pollManager.canVote=!!i.changeableVote,this.pollManager.canViewResults=!0,this.pollManager.addView(n.PollViews.results,i.template),this.pollManager.displayView(n.PollViews.results),this.pollManager.changeTotalVotes(i.totalVotes,i.totalVotesTooltip),this.button.disabled=!1}checkVisibility(e){this.button.hidden=e!==n.PollViews.vote}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Poll",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../StringUtil","./View/Participants","./View/Results","./View/Vote","./Vote"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";function d(){document.querySelectorAll(".pollContainer").forEach((e=>{if(!e.dataset.pollId)throw new Error("Invalid poll element given. Missing pollID.");if(h.has(e))return;const t=parseInt(e.dataset.pollId,10);new m(t),h.add(e)}))}function u(){n.default.add("WoltLabSuite/Core/Ui/Poll/Manager/Poll",(()=>{d()})),d()}var p;Object.defineProperty(t,"__esModule",{value:!0}),t.setupAll=t.Poll=t.PollViews=void 0,n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importDefault(a),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importDefault(c),function(e){e.vote="vote",e.results="results"}(p||(t.PollViews=p={}));class m{pollId;element;voteView=void 0;resultsView=void 0;participants=void 0;voteHandler=void 0;views=new Map;constructor(e){const t=document.getElementById(`poll${e}`);if(null===t)throw new Error(`Could not find poll with id "${e}".`);this.element=t,this.pollId=e,this.getInnerContainer().querySelectorAll("div").forEach((e=>{e.dataset.key&&this.views.set(e.dataset.key,e)}));const i=this.element.querySelector(".showResultsButton");this.canViewResults&&null!==i&&(this.resultsView=new s.default(this,i)),this.canVote&&(this.voteView=new l.default(this),this.voteHandler=new c.default(this)),this.canViewParticipants()&&(this.participants=new a.default(this))}getElement(){return this.element}hasView(e){return this.views.has(e)}getView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);return this.views.get(e)}displayView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);this.views.forEach((e=>{e.hidden=!0})),this.views.get(e).hidden=!1,this.voteView?.checkVisibility(e),this.resultsView?.checkVisibility(e),this.voteHandler?.checkVisibility(e),this.canViewParticipants()&&(e===p.results?(this.participants||(this.participants=new a.default(this)),this.participants.showButton()):this.participants?.hideButton())}addView(e,t){const i=document.createElement("div");i.dataset.key=e,i.hidden=!0,o.default.setInnerHtml(i,t),this.getInnerContainer().append(i),this.views.has(e)&&this.views.get(e).remove(),this.views.set(e,i),e===p.vote&&this.voteHandler.initSelects()}canViewParticipants(){return this.canViewResults&&this.isPublic}getInnerContainer(){const e=this.element.querySelector(".pollInnerContainer");if(!e)throw new Error(`Could not find inner container for poll "${this.pollId}"`);return e}changeTotalVotes(e,t){const i=this.getElement().querySelector(".pollTotalVotesBadge");if(!i)throw new Error("Could not find total votes badge.");i.textContent=(0,r.formatNumeric)(e),i.dataset.tooltip=t}get isPublic(){return"true"===this.element.dataset.isPublic}get maxVotes(){return parseInt(this.element.dataset.maxVotes,10)}get question(){return this.element.dataset.question}get canVote(){return"true"===this.element.dataset.canVote}set canVote(e){this.element.dataset.canVote=e?"true":"false"}get canViewResults(){return"true"===this.element.dataset.canViewResult}set canViewResults(e){this.element.dataset.canViewResult=e?"true":"false"}}t.Poll=m;const h=new WeakSet;t.setupAll=u,t.default=u})),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../StringUtil","../Dialog"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c);const d=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new Map;_currentObjectId=0;_objects=new Map;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=o.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},t),this.initContainers(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/CountButtons-${e}`,(()=>this.initContainers()))}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=a.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,summary:null,objectId:n,element:t};this._containers.set(i,o),this._initReactionCountButtons(t,o);const r=this._objects.get(n)||[];r.push(o),this._objects.set(n,r),e=!0})),e&&r.default.trigger()}updateCountButtons(e,t){let i=!1;this._objects.get(e).forEach((e=>{let n;if(n=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.element.querySelector(this._options.summaryListSelector),null===n)return;const o=new Map(Object.entries(t)),r=new Map;n.querySelectorAll(".reactCountButton").forEach((e=>{const t=e.dataset.reactionTypeId;o.has(t)?r.set(t,e):e.remove()})),o.forEach(((e,t)=>{if(r.has(t))r.get(t).querySelector(".reactionCount").innerHTML=l.shortUnit(e);else if(d.has(t)){const o=document.createElement("span");o.className="reactCountButton",o.innerHTML=d.get(t).renderedIcon,o.dataset.reactionTypeId=t;const r=document.createElement("span");r.className="reactionCount",r.innerHTML=l.shortUnit(e),o.appendChild(r),n.appendChild(o),i=!0}})),n.childElementCount>0?a.default.show(n):a.default.hide(n)})),i&&r.default.trigger()}_initReactionCountButtons(e,t){let i;i=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.querySelector(this._options.summaryListSelector),null!==i&&i.addEventListener("click",(e=>this._showReactionOverlay(t.objectId,e)))}_showReactionOverlay(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()}_showOverlay(){this._options.parameters.data.containerID=`${this._objectType}-${this._currentObjectId}`,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){s.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),c.default.open(this,e.returnValues.template),c.default.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)}_ajaxSetup(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}}_dialogSetup(){return{id:`userReactionOverlay-${this._objectType}`,options:{title:""},source:null}}}})),define("WoltLabSuite/Core/Ui/Reaction/SummaryDetails",["require","exports","../../Ajax","../../Component/Dialog","../../Helper/Selector"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,o.wheneverFirstSeen)("woltlab-core-reaction-summary",(e=>{e.addEventListener("showDetails",(()=>{!async function(e,t){const o=await(0,i.dboAction)("getReactionDetails","wcf\\data\\reaction\\ReactionAction").payload({data:{objectID:e,objectType:t}}).dispatch();(0,n.dialogFactory)().fromHtml(o.template).withoutControls().show(o.title)}(e.objectId,e.objectType)}))}))}})),define("WoltLabSuite/Core/Ui/Search/Page",["require","exports","tslib","../../Core","../../Dom/Util","../Dropdown/Simple","../Screen","./Input"],(function(e,t,i,n,o,r,a,s){"use strict";function l(e){e.preventDefault();const t=e.currentTarget,i=t.dataset.objectType,o=t.dataset.extendedLink;o&&(document.querySelector(".pageHeaderSearchExtendedLink").href=o),d.clear();try{const e=JSON.parse(t.dataset.parameters||"");n.isPlainObject(e)&&Object.keys(e).forEach((t=>{d.set(t,e[t])}))}catch(e){}i&&"everywhere"!==i&&d.set("type",i),document.getElementById("pageHeaderSearchInputContainer").querySelector(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").textContent=t.textContent}function c(e,t){const i=new URL(e.action);i.search+=""!==i.search?"&":"?",i.search+=new URLSearchParams([["q",t.value.trim()],...Array.from(d)]).toString(),window.location.href=i.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importDefault(s);const d=new Map;t.init=function(e){const t=document.getElementById("pageHeaderSearchInput"),i=t.form;new s.default(t,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit(e){if(e.classList.add("dropdownMenuPageSearch"),a.is("screen-lg")){e.dataset.dropdownAlignmentHorizontal="right";const i=t.clientWidth;e.style.setProperty("min-width",`${i}px`,"");const n=t.parentElement,r=o.default.offset(n).left+n.clientWidth-(o.default.offset(t).left+i),a=o.default.styleAsInt(window.getComputedStyle(n),"padding-bottom");e.style.setProperty("transform",`translateX(-${Math.ceil(r)}px) translateY(-${a}px)`,"")}},callbackSelect:()=>(setTimeout((()=>{c(i,t)}),1),!0),suppressErrors:!0});const n=document.querySelector(".pageHeaderSearchType"),d=r.default.getDropdownMenu(o.default.identify(n));d.querySelectorAll("a[data-object-type]").forEach((e=>{e.addEventListener("click",l)})),d.querySelector('a[data-object-type="'+e+'"]').click(),i.addEventListener("submit",(e=>{e.preventDefault(),c(i,t)}))}})),define("WoltLabSuite/Core/Ui/Smiley/Insert",["require","exports","../../Component/Ckeditor"],(function(e,t,i){"use strict";return class{container;editorId;constructor(e){this.editorId=e;let t=document.getElementById("smilies-"+this.editorId);if(!t&&(t=document.getElementById(this.editorId+"SmiliesTabContainer"),!t))throw new Error("Unable to find the message tab menu container containing the smilies.");this.container=t,this.container.addEventListener("keydown",(e=>this.keydown(e))),this.container.addEventListener("mousedown",(e=>this.mousedown(e)))}keydown(e){const t=document.activeElement;if(t.classList.contains("jsSmiley"))if(["ArrowLeft","ArrowRight","End","Home"].includes(e.key)){e.preventDefault();const i=e.currentTarget,n=Array.from(i.querySelectorAll(".jsSmiley"));"ArrowLeft"===e.key&&n.reverse();let o=n.indexOf(t);"Home"===e.key?o=0:"End"===e.key?o=n.length-1:(o+=1,o===n.length&&(o=0)),n[o].focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();const i=t.querySelector("img");this.insert(i)}}mousedown(e){const t=e.target.closest("li");if(t&&this.container.contains(t)){e.preventDefault();const i=t.querySelector("img");i&&this.insert(i)}}insert(e){const t=(0,i.getCkeditorById)(this.editorId);if(void 0===t)throw new Error(`Unable to find the CKEditor instance for '${this.editorId}'.`);const n=document.createElement("img");n.classList.add("smiley"),n.src=e.src,n.alt=e.alt,n.height=e.height,n.width=e.width,e.srcset&&(n.srcset=e.srcset),t.insertHtml(n.outerHTML)}}})),define("WoltLabSuite/Core/Ui/Sortable/List",["require","exports","tslib","../../Core","../Screen"],(function(e,t,i,n,o){"use strict";return n=i.__importStar(n),o=i.__importStar(o),class{_options;constructor(e){this._options=n.extend({containerId:"",className:"",offset:0,options:{},isSimpleSorting:!1,additionalParameters:{}},e),o.on("screen-sm-md",{match:()=>this._enable(!0),unmatch:()=>this._disable(),setup:()=>this._enable(!0)}),o.on("screen-lg",{match:()=>this._enable(!1),unmatch:()=>this._disable(),setup:()=>this._enable(!1)})}_enable(e){const t=this._options.options;e&&(t.handle=".sortableNodeHandle"),new window.WCF.Sortable.List(this._options.containerId,this._options.className,this._options.offset,t,this._options.isSimpleSorting,this._options.additionalParameters)}_disable(){window.jQuery(`#${this._options.containerId} .sortableList`)[this._options.isSimpleSorting?"sortable":"nestedSortable"]("destroy")}}})),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["require","exports","tslib","../../Language","../Dialog","../ItemList/Filter"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r);class a{callback=void 0;iconList=void 0;itemListFilter=void 0;open(e){this.callback=e,o.default.open(this)}click(e){e.preventDefault();const t=e.target.closest("li").querySelector("fa-icon");o.default.close(this),this.callback(t.name,t.solid)}_dialogSetup(){return{id:"fontAwesomeSelection",options:{onSetup:()=>{this.iconList=document.getElementById("fontAwesomeIcons");const e=[];window.getFontAwesome6Metadata().forEach((([,t],i)=>{t&&e.push(`<li><fa-icon size="48" name="${i}" solid></fa-icon><small>${i}</small></li>`),e.push(`<li><fa-icon size="48" name="${i}"></fa-icon><small>${i}</small></li>`)})),this.iconList.innerHTML=e.join(""),this.iconList.addEventListener("click",(e=>this.click(e))),this.itemListFilter=new r.default("fontAwesomeIcons",{callbackPrepareItem:e=>{const t=e.querySelector("small"),i=t.textContent.trim();return{item:e,span:t,text:i}},enableVisibilityFilter:!1,filterPosition:"top"})},onShow:()=>{this.itemListFilter.reset()},title:n.get("wcf.global.fontAwesome.selectIcon")},source:'<ul class="fontAwesomeIcons" id="fontAwesomeIcons"></ul>'}}}let s;t.setup=function(){s||(s=new a)},t.open=function(e){if(!s)throw new Error("Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`.");s.open(e)}})),define("WoltLabSuite/Core/Ui/Toggle/Input",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";return n=i.__importDefault(n),class{element;hide;show;constructor(e,t){const i=document.querySelector(e);if(null===i)throw new Error("Unable to find element by selector '"+e+"'.");const n="INPUT"===i.nodeName?i.type:"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this.element=i,this.hide=this.getElements("hide",Array.isArray(t.hide)?t.hide:[]),this.show=this.getElements("show",Array.isArray(t.show)?t.show:[]),this.element.addEventListener("change",(e=>this.change(e))),this.updateVisibility(this.show,this.element.checked),this.updateVisibility(this.hide,!this.element.checked)}getElements(e,t){const i=[];return t.forEach((t=>{let n=null;if("string"==typeof t){if(n=document.querySelector(t),null===n)throw new Error(`Unable to find an element with the selector '${t}'.`)}else{if(!(t instanceof HTMLElement))throw new TypeError(`The array '${e}' may only contain string selectors or DOM elements.`);n=t}i.push(n)})),i}change(e){const t=e.currentTarget.checked;this.updateVisibility(this.show,t),this.updateVisibility(this.hide,!t)}updateVisibility(e,t){e.forEach((e=>{n.default[t?"show":"hide"](e)}))}}})),define("WoltLabSuite/Core/Ui/User/List",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dialog","../Pagination"],(function(e,t,i,n,o,r,a,s){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importDefault(s),class{cache=new Map;options;pageCount=0;pageNo=1;constructor(e){this.options=o.extend({className:"",dialogTitle:"",parameters:{}},e)}open(){this.pageNo=1,this.showPage()}showPage(e){if("number"==typeof e&&(this.pageNo=+e),0!==this.pageCount&&(this.pageNo<1||this.pageNo>this.pageCount))throw new RangeError(`pageNo must be between 1 and ${this.pageCount} (${this.pageNo} given).`);if(this.cache.has(this.pageNo)){const e=a.default.open(this,this.cache.get(this.pageNo));if(this.pageCount>1){const t=e.content.querySelector(".jsPagination");null!==t&&new s.default(t,{activePage:this.pageNo,maxPage:this.pageCount,callbackSwitch:this.showPage.bind(this)});const i=e.content.parentElement;i.scrollTop>0&&(i.scrollTop=0)}}else this.options.parameters.pageNo=this.pageNo,n.api(this,{parameters:this.options.parameters})}_ajaxSuccess(e){void 0!==e.returnValues.pageCount&&(this.pageCount=~~e.returnValues.pageCount),this.cache.set(this.pageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserList",className:this.options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}}_dialogSetup(){return{id:r.default.getUniqueId(),options:{title:this.options.dialogTitle},source:null}}}})),define("WoltLabSuite/Core/Ui/User/ObjectWatch",["require","exports","tslib","../../Ajax","../Notification","../../Language","../../Event/Handler"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a);const s=new Map;t.setup=function(){document.querySelectorAll(".userObjectWatchDropdown").forEach((e=>{if(!e.dataset.objectId)throw new Error("Missing objectId for '.userObjectWatchDropdown' element.");const t=parseInt(e.dataset.objectId,10);s.has(t)||s.set(t,new Set),s.get(t).add(e),e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{if(!e.dataset.subscribe)throw new Error("Missing 'data-subscribe' attribute for '.userObjectWatchSelect' element.");e.addEventListener("click",(t=>{t.preventDefault(),async function(e){const t=e.closest(".userObjectWatchDropdown"),i=parseInt(e.dataset.subscribe,10),l=parseInt(t.dataset.objectId,10),c=t.dataset.objectType;await n.dboAction("saveSubscription","wcf\\data\\user\\object\\watch\\UserObjectWatchAction").payload({enableNotification:1,objectID:l,objectType:c,subscribe:i}).dispatch(),s.has(l)&&s.get(l).forEach((e=>{e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{parseInt(e.dataset.subscribe,10)===i?e.classList.add("active"):e.classList.remove("active")}))})),document.querySelectorAll(`.userObjectWatchDropdownToggle[data-object-type="${c}"][data-object-id="${l}"]`).forEach((e=>{const t=e.querySelector("fa-icon"),n=e.querySelector("span:not(.icon)");i?(e.classList.add("active"),t.setIcon("bookmark",!0),n.textContent=r.get("wcf.user.objectWatch.button.subscribed")):(e.classList.remove("active"),t.setIcon("bookmark"),n.textContent=r.get("wcf.user.objectWatch.button.subscribe")),e.dataset.isSubscribed=i.toString()})),a.fire("com.woltlab.wcf.objectWatch","updatedSubscription"),o.show()}(e)}))}))}))}})),define("WoltLabSuite/Core/Ui/User/PasswordStrength",["require","exports","tslib","../../Language","../../Dom/Util"],(function(e,t,i,n,o){"use strict";function r(e){return[].concat(e,e.split(/\W+/))}n=i.__importStar(n),o=i.__importDefault(o);const a=[],s=document.querySelector('meta[property="og:site_name"]')?.getAttribute("content");return s&&a.push(s),class{input;zxcvbn;relatedInputs=[];staticDictionary=[];feedbacker;wrapper;score=document.createElement("span");verdictResult=document.createElement("input");constructor(t,o){this.input=t,new Promise(((t,i)=>{e(["zxcvbn"],t,i)})).then(i.__importStar).then((({default:e})=>{this.zxcvbn=e,o.relatedInputs&&(this.relatedInputs=o.relatedInputs),o.staticDictionary&&(this.staticDictionary=o.staticDictionary),this.feedbacker=function(e){const t={};return Object.entries(e.default_phrases).forEach((([e,i])=>{t[e]={},Object.entries(i).forEach((([i,o])=>{const r=`wcf.user.password.zxcvbn.${e}.${i}`,a=n.get(r);t[e][i]=a!==r?a:o}))})),new e(t)}(e.Feedback);const t=this.input.closest(".inputAddon");if(null===t)throw new Error("Expected a parent with `.inputAddon`.");this.wrapper=t,this.wrapper.classList.add("inputAddonPasswordStrength");const i=document.createElement("div");i.className="passwordStrengthRating";const r=document.createElement("small");r.textContent=n.get("wcf.user.password.strength"),i.appendChild(r),this.score.className="passwordStrengthScore",this.score.dataset.score="-1",i.appendChild(this.score),this.wrapper.appendChild(i),this.verdictResult.type="hidden",this.verdictResult.name=`${this.input.name}_passwordStrengthVerdict`,this.wrapper.parentNode.insertBefore(this.verdictResult,this.wrapper),this.input.addEventListener("input",(e=>this.evaluate(e))),this.relatedInputs.forEach((e=>e.addEventListener("input",(e=>this.evaluate(e))))),""!==this.input.value.trim()&&this.evaluate()}))}evaluate(e){const t=(i=a.concat(this.staticDictionary,this.relatedInputs.map((e=>e.value.trim()))),n=r,i.map(n).reduce(((e,t)=>e.concat(t)),[])).filter((e=>e.length>0));var i,n;const s=this.input.value.trim(),l=this.zxcvbn(s.substr(0,100),t);l.feedback=this.feedbacker.from_result(l),this.score.dataset.score=0===s.length?"-1":l.score.toString(),void 0!==e&&o.default.innerError(this.wrapper,l.feedback.warning),this.verdictResult.value=JSON.stringify(l)}}})),define("WoltLabSuite/Core/Component/Comment/Response/woltlab-core-comment-response",["require","exports","tslib","../../../Ajax","../../../Dom/Util","../../../Ui/Dropdown/Simple","../../../Ui/Notification","../../Confirmation","../../../Event/Handler","../../../Ui/Scroll","../../../Language","../../Ckeditor"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentResponseElement=void 0,o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),l=i.__importStar(l),c=i.__importStar(c);class p extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".commentResponse__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#Pe()}));const t=this.menu.querySelector(".commentResponse__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#je()}));const i=this.menu.querySelector(".commentResponse__option--edit");i?.addEventListener("click",(e=>{e.preventDefault(),this.#qe()}))}}async#Pe(){await(0,n.dboAction)("enable","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).dispatch(),this.querySelector(".commentResponse__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".commentResponse__option--enable").hidden=!0)}async#je(){await(0,s.confirmationFactory)().delete()&&(await(0,n.dboAction)("delete","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).dispatch(),a.show(),this.dispatchEvent(new CustomEvent("delete")))}async#qe(){this.menu.querySelector(".commentResponse__option--edit").hidden=!0;const{template:e}=await(0,n.dboAction)("beginEdit","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).dispatch();this.#Oe(e)}#Oe(e){this.querySelector(".htmlContent").hidden=!0,o.default.insertHtml(e,this.#G,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#Ne()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#Be()})),l.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#Fe}`,(e=>{e.cancel=!0,this.#Ne()})),window.setTimeout((()=>{c.element(this)}),250)}async#Ne(){const e={data:{message:(0,u.getCkeditorById)(this.#Fe).getHtml()}};if(!this.#Ue(e))return;let t;l.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#Fe}`,e),this.#r();try{t=await(0,n.dboAction)("save","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).payload(e).dispatch()}catch(e){return await(0,n.handleValidationErrors)(e,(({errorType:e})=>(o.default.innerError(document.getElementById(this.#Fe),e),!0))),void this.#He()}o.default.setInnerHtml(this.querySelector(".htmlContent"),t.message),this.#He(),this.#Be(),a.show()}#r(){let e=this.querySelector(".commentResponse__loading");e||(e=document.createElement("div"),e.classList.add("commentResponse__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".commentResponse__message").append(e)),this.#G.hidden=!0,e.hidden=!1}#He(){this.#G.hidden=!1;const e=this.querySelector(".commentResponse__loading");e&&(e.hidden=!0)}#Ue(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,u.getCkeditorById)(this.#Fe);if(""===t.getHtml())return o.default.innerError(t.element,(0,d.getPhrase)("wcf.global.form.error.empty")),!1;const i={api:this,parameters:e,valid:!0};return l.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#Fe}`,i),i.valid}#Be(){(0,u.getCkeditorById)(this.#Fe).destroy(),this.#G.remove(),this.menu.querySelector(".commentResponse__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#G(){let e=this.querySelector(".commentResponse__editor");return e||(e=document.createElement("div"),e.classList.add("commentResponse__editor"),this.querySelector(".commentResponse__message").append(e)),e}get responseId(){return parseInt(this.getAttribute("response-id"))}get menu(){let e=r.default.getDropdownMenu(`commentResponseOptions${this.responseId}`);return void 0===e&&(e=this.querySelector(".commentResponse__menu .dropdownMenu")||void 0),e}get#Fe(){return`commentResponseEditor${this.responseId}`}}t.WoltlabCoreCommentResponseElement=p,window.customElements.define("woltlab-core-comment-response",p),t.default=p})),define("WoltLabSuite/Core/Controller/User/Notification/Settings",["require","exports","tslib","../../../Language","../../../Ui/Dropdown/Reusable"],(function(e,t,i,n,o){"use strict";function r(){return document.getElementById(`settings_${s}_mailNotificationType`)}let a;Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let s=0;t.init=function(){document.querySelectorAll(".jsCheckboxNotificationSettingsState").forEach((e=>{e.addEventListener("change",(e=>function(e){const t=e.currentTarget,i=~~t.dataset.objectId,n=document.querySelector(`.notificationSettingsEmailType[data-object-id="${i}"]`);null!==n&&(t.checked?n.classList.remove("disabled"):n.classList.add("disabled"))}(e)))})),document.querySelectorAll(".notificationSettingsEmailType").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;var i,l;s=~~t.dataset.objectId,a||(a=document.createElement("ul"),a.className="dropdownMenu",["instant","daily","divider","none"].forEach((e=>{const t=document.createElement("li");if("divider"===e)t.className="dropdownDivider";else{const i=document.createElement("a");i.href="#",i.textContent=n.get(`wcf.user.notification.mailNotificationType.${e}`),t.appendChild(i),t.dataset.value=e,t.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget.dataset.value;r().value=t;const i=document.querySelector(`.notificationSettingsEmailType[data-object-id="${s}"]`);i.title=n.get(`wcf.user.notification.mailNotificationType.${t}`);const o=i.querySelector(".jsIconNotificationSettingsEmailType fa-icon");switch(t){case"daily":o.setIcon("clock");break;case"instant":o.setIcon("bolt");break;case"none":o.setIcon("xmark")}s=0}(e)))}a.appendChild(t)})),o.init("UiNotificationSettingsEmailType",a)),i=r().value,a.querySelectorAll("li").forEach((e=>{e.dataset.value===i?e.classList.add("active"):e.classList.remove("active")})),l=t,o.toggleDropdown("UiNotificationSettingsEmailType",l)}(e)))}))}})),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["require","exports","tslib","../../../Ui/Dropdown/Simple","../../../Event/Handler"],(function(e,t,i,n,o){"use strict";return n=i.__importDefault(n),o=i.__importStar(o),class{_formId;_suffixField;_suffixDropdownMenu;_suffixDropdownToggle;constructor(e,t){this._formId=e,this._suffixField=document.getElementById(t),this._suffixDropdownMenu=n.default.getDropdownMenu(t+"_dropdown"),this._suffixDropdownToggle=n.default.getDropdown(t+"_dropdown").getElementsByClassName("dropdownToggle")[0],Array.from(this._suffixDropdownMenu.children).forEach((e=>{e.addEventListener("click",(e=>this._changeSuffixSelection(e)))})),o.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",(e=>this._destroyDropdown(e)))}_changeSuffixSelection(e){const t=e.currentTarget;t.classList.contains("disabled")||(Array.from(this._suffixDropdownMenu.children).forEach((e=>{e===t?e.classList.add("active"):e.classList.remove("active")})),this._suffixField.value=t.dataset.value,this._suffixDropdownToggle.innerHTML=t.dataset.label+' <fa-icon name="caret-down" solid></fa-icon>')}_destroyDropdown(e){e.formId===this._formId&&n.default.destroy(this._suffixDropdownMenu.id)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_aclList;_getData(){return{[this._fieldId]:this._aclList.getData()}}_readField(){}setAclList(e){return this._aclList=e,this}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Button",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0,n=i.__importDefault(n);class o extends n.default{_getData(){const e={};return"1"===this._field.dataset.isClicked&&(e[this._fieldId]=this._field.value),e}}t.Button=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["require","exports","tslib","./Field","../../../Controller/Captcha"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importDefault(o);class r extends n.default{_getData(){return o.default.has(this._fieldId)?o.default.getData(this._fieldId):{}}_readField(){}destroy(){o.default.has(this._fieldId)&&o.default.delete(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n);class r extends n.default{_fields;constructor(e){super(e),this._fields=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[]"]`))}_getData(){const e=this._fields.map((e=>e.checked?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_getData(){return{[this._fieldId]:this._field.checked?"1":"0"}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/CheckedVoid",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckedVoid=void 0,n=i.__importDefault(n);class o extends n.default{_getData(){return this._field.checked?{[this._fieldId]:1}:{}}}t.CheckedVoid=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Ckeditor",["require","exports","tslib","./Field","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Ckeditor"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ckeditor=void 0,n=i.__importDefault(n);class a extends n.default{_getData(){const e=(0,r.getCkeditorById)(this._fieldId);return{[this._fieldId]:e.getHtml()}}destroy(){(0,o.dispatchToCkeditor)(this._field).destroy()}}t.Ckeditor=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Date",["require","exports","tslib","./Field","../../../Date/Picker"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importDefault(o);class r extends n.default{_getData(){return{[this._fieldId]:o.default.getValue(this._field)}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["require","exports","tslib","./Field","../../../Ui/ItemList/Static"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e=[];return o.getValues(this._fieldId).forEach((t=>{t.objectId?e[t.objectId]=t.value:e.push(t.value)})),{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.MultilineItemListFormField=void 0,n=i.__importStar(n),r=i.__importDefault(r);const a=new Map;class s extends n.UiItemListLineBreakSeparatedText{constructor(e,t){super(e,t),null!=t.submitFieldName?a.set(t.submitFieldName,this):a.set(this.submitField.id,this)}getItems(){return this.items}initValues(){super.initValues(),Array.from(this.itemList.children).forEach((e=>{e.querySelector(".jsEditItem").addEventListener("click",(e=>{this.editItem(e)}))}))}editItem(e){if(this.uiDisabled)return;const t=e.currentTarget,i=t.closest("li"),n=i.querySelector(".jsDeleteItem"),a=i.querySelector("span"),s=t.closest("li").dataset.value;r.default.hide(n),r.default.hide(t),r.default.hide(a);const l=document.createElement("input");l.type="text",l.value=s;const c=document.createElement("button");c.classList.add("jsSaveItem","jsTooltip"),c.title=(0,o.getPhrase)("wcf.global.button.save");let d=document.createElement("fa-icon");d.setIcon("save"),c.append(d);const u=document.createElement("button");u.classList.add("jsCancelItem","jsTooltip"),u.title=(0,o.getPhrase)("wcf.global.button.cancel"),d=document.createElement("fa-icon"),d.setIcon("times"),u.append(d);const p=()=>{l.remove(),c.remove(),u.remove(),r.default.show(n),r.default.show(t),r.default.show(a)},m=e=>{if(e.preventDefault(),this.uiDisabled)return;const i=l.value.trim();""===i?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.global.form.error.empty")):this.items.has(i)&&i!==s?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:i}),!0):(r.default.innerError(l.parentElement,""),t.closest("li").dataset.value=i,a.textContent=i,this.items.delete(s),this.items.add(i),p()),l.focus()};l.addEventListener("keydown",(e=>{"Enter"===e.key?m(e):"Escape"===e.key&&p()})),c.addEventListener("click",(e=>{m(e)})),u.addEventListener("click",(()=>{p()})),i.append(c,u,l),l.focus()}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const i=document.createElement("button");i.type="button",i.classList.add("jsDeleteItem","jsTooltip"),i.title=(0,o.getPhrase)("wcf.global.button.delete"),i.addEventListener("click",(e=>{this.deleteItem(e)}));let n=document.createElement("fa-icon");n.setIcon("trash"),i.append(n);const r=document.createElement("button");r.type="button",r.classList.add("jsEditItem","jsTooltip"),r.title=(0,o.getPhrase)("wcf.global.button.edit"),r.addEventListener("click",(e=>{this.editItem(e)})),n=document.createElement("fa-icon"),n.setIcon("pencil"),r.append(n);const a=document.createElement("span");a.innerText=e,t.append(r,i," ",a);const s=Array.from(this.itemList.children).find((t=>t.dataset.value>e));s?this.itemList.insertBefore(t,s):this.itemList.append(t),this.showList()}submit(){this.submitField?this.submitField.value=Array.from(this.items).join("\n"):Array.from(this.items).forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}))}}t.MultilineItemListFormField=s,t.getValues=function(e){if(!a.has(e))throw new Error(`Element id '${e}' is unknown.`);return a.get(e).getItems()}})),define("WoltLabSuite/Core/Form/Builder/Field/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","./Controller/MultilineItemList"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultilineItemList=void 0,n=i.__importDefault(n);class r extends n.default{_getData(){return{[this._fieldId]:(0,o.getValues)(this._fieldId)}}}t.MultilineItemList=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n);class r extends n.default{_fields;constructor(e){super(e),this._fields=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}"]`))}_getData(){const e={};return this._fields.some((t=>!!t.checked&&(e[this._fieldId]=t.value,!0))),e}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n);class r extends n.default{_getData(){const e=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[group][]"]`)).map((e=>e.value)),t=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[user][]"]`)).map((e=>e.value));return{[this._fieldId]:{group:e,user:t}}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/User",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e.join(",")}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Value",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_getData(){return{[this._fieldId]:this._field.value}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["require","exports","tslib","./Field","../../../Language/Input"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e={},t=o.getValues(this._fieldId);return t.size>1?(Object.prototype.hasOwnProperty.call(e,this._fieldId+"_i18n")||(e[this._fieldId+"_i18n"]={}),t.forEach(((t,i)=>{e[this._fieldId+"_i18n"][i]=t}))):e[this._fieldId]=t.get(0),e}destroy(){o.unregister(this._fieldId)}}return r})),define("WoltLabSuite/Core/Ui/Object/Action/Toogle",["require","exports","./Toggle"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return i.setup}})})),define("WoltLabSuite/Core/Ui/User/Menu/View",["require","exports","tslib","../../../Date/Util","../../../StringUtil","../../../Dom/Change/Listener","../../../Language","focus-trap","perfect-scrollbar","../../Screen"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserMenuView=void 0,r=i.__importStar(r),a=i.__importStar(a),l=i.__importDefault(l),c=i.__importStar(c);class d{element;usePerfectScrollbar=!1;focusTrap;markAllAsReadButton;perfectScrollbar=void 0;provider;constructor(e){this.provider=e,this.element=document.createElement("div"),this.buildElement(),this.markAllAsReadButton=this.buildButton({icon:'<fa-icon size="24" name="check" solid></fa-icon>',link:"#",name:"markAllAsRead",title:a.get("wcf.global.button.markAllAsRead")}),this.focusTrap=(0,s.createFocusTrap)(this.element,{allowOutsideClick:!0,escapeDeactivates:()=>(this.element.dispatchEvent(new Event("shouldClose")),!1),fallbackFocus:this.element}),c.on("screen-lg",{match:()=>{this.usePerfectScrollbar=!0,this.rebuildScrollbar()},unmatch:()=>{this.usePerfectScrollbar=!1,this.rebuildScrollbar()},setup:()=>{this.usePerfectScrollbar=!0,this.rebuildScrollbar()}})}getElement(){return this.element}async open(){const e=this.provider.isStale();if(e&&this.reset(),this.element.hidden=!1,this.focusTrap.activate(),e){const e=await this.provider.getData();this.setContent(e)}}close(){this.focusTrap.deactivate(),this.element.hidden=!0}getItems(){return Array.from(this.getContent().querySelectorAll(".userMenuItem"))}setContent(e){const t=this.getContent();if(this.markAllAsReadButton.remove(),0===e.length)t.innerHTML=`<span class="userMenuContentStatus">${this.provider.getEmptyViewMessage()}</span>`;else{let i=!1;const n=document.createDocumentFragment();e.forEach((e=>{e.isUnread&&(i=!0),n.append(this.createItem(e))})),t.innerHTML="",t.append(n),i&&this.element.querySelector(".userMenuButtons").prepend(this.markAllAsReadButton),r.trigger()}this.rebuildScrollbar()}rebuildScrollbar(){if(this.usePerfectScrollbar){const e=this.getContent();this.enablePerfectScrollbar(e)}else this.disablePerfectScrollbar()}enablePerfectScrollbar(e){this.perfectScrollbar?this.perfectScrollbar.update():this.perfectScrollbar=new l.default(e,{suppressScrollX:!0,wheelPropagation:!1})}disablePerfectScrollbar(){this.perfectScrollbar?.destroy(),this.perfectScrollbar=void 0}createItem(e){const t=document.createElement("div");t.classList.add("userMenuItem"),t.dataset.objectId=e.objectId.toString(),t.dataset.isUnread=e.isUnread?"true":"false";const i=(0,o.escapeHTML)(e.link);t.innerHTML=`\n      <div class="userMenuItemImage">${e.image}</div>\n      <div class="userMenuItemContent">\n        <a href="${i}" class="userMenuItemLink">${e.content}</a>\n      </div>\n      <div class="userMenuItemMeta"></div>\n      <div class="userMenuItemUnread">\n        <button type="button" class="userMenuItemMarkAsRead jsTooltip" title="${a.get("wcf.global.button.markAsRead")}">\n          <fa-icon size="24" name="check"></fa-icon>\n        </button>\n      </div>\n    `;const r=(0,n.getTimeElement)(new Date(1e3*e.time));if(t.querySelector(".userMenuItemMeta").append(r),t.querySelector(".userMenuItemMarkAsRead").addEventListener("click",(async()=>{await this.provider.markAsRead(e.objectId),this.markAsRead(t)})),e.usernames.length>0){const i=t.querySelector(".userMenuItemContent"),n=document.createElement("div");n.classList.add("userMenuItemUsernames"),n.textContent=e.usernames.join(", "),i.insertAdjacentElement("afterend",n),t.classList.add("userMenuItemWithUsernames")}return this.provider.hasPlainTitle()&&t.querySelector(".userMenuItemLink").classList.add("userMenuItemLinkPlain"),t}markAsRead(e){e.dataset.isUnread="false",0===this.getContent().querySelectorAll('.userMenuItem[data-is-unread="true"]').length&&this.markAllAsReadButton.remove()}reset(){this.getContent().innerHTML='\n      <span class="userMenuContentStatus">\n        <woltlab-core-loading-indicator size="24" hide-text></woltlab-core-loading-indicator>\n      </span>\n    '}buildElement(){this.element.hidden=!0,this.element.classList.add("userMenu"),this.element.dataset.origin=this.provider.getPanelButton().id,this.element.tabIndex=-1,this.element.innerHTML=`\n      <div class="userMenuHeader">\n        <div class="userMenuTitle">${this.provider.getTitle()}</div>\n        <div class="userMenuButtons"></div>\n      </div>\n      <div class="userMenuContent userMenuContentScrollable"></div>\n    `,this.element.addEventListener("click",(e=>e.stopPropagation()));const e=this.element.querySelector(".userMenuButtons");this.provider.getMenuButtons().forEach((t=>{e.append(this.buildButton(t))}));const t=this.provider.getFooter();if(null!==t&&this.element.append(this.buildFooter(t)),"com.woltlab.wcf.notifications"===this.provider.getIdentifier()){const e=this.provider.getDesktopNotifications();e&&this.element.querySelector(".userMenuHeader").insertAdjacentElement("afterend",e)}}buildButton(e){let t;return"#"===e.link?(t=document.createElement("button"),t.type="button","markAllAsRead"===e.name?t.addEventListener("click",(e=>{e.preventDefault(),this.markAllAsRead()})):"function"==typeof e.clickCallback&&t.addEventListener("click",(t=>{t.preventDefault(),e.clickCallback()}))):(t=document.createElement("a"),t.href=e.link),t.classList.add("userMenuButton","jsTooltip"),t.title=e.title,t.innerHTML=e.icon,t}async markAllAsRead(){await this.provider.markAllAsRead(),this.getContent().querySelectorAll(".userMenuItem").forEach((e=>{e.dataset.isUnread="false"})),this.markAllAsReadButton.remove()}buildFooter(e){const t=(0,o.escapeHTML)(e.link),i=(0,o.escapeHTML)(e.title),n=document.createElement("div");return n.classList.add("userMenuFooter"),n.innerHTML=`<a href="${t}" class="userMenuFooterLink">${i}</a>`,n}getContent(){return this.element.querySelector(".userMenuContent")}}t.UserMenuView=d,t.default=d})),define("WoltLabSuite/Core/Ui/User/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class r extends o.default{constructor(e,t){const i=n.isPlainObject(t)&&!0===t.includeUserGroups;super(e,t=n.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:i?1:0}}}},t))}createListItem(e){const t=super.createListItem(e);t.dataset.type=e.type;const i=document.createElement("div");return i.className="box16",i.innerHTML="group"===e.type?'<fa-icon name="users" solid></fa-icon>':e.icon,i.appendChild(t.children[0]),t.appendChild(i),t}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["require","exports","tslib","../../../../Core","../../../../Dom/Util","../../../../Language","../../../../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),class{_formFieldContainer;_input;_labelChooser;_options;constructor(e,t,i){this._formFieldContainer=document.getElementById(e+"Container"),this._labelChooser=this._formFieldContainer.getElementsByClassName("labelChooser")[0],this._options=n.extend({forceSelection:!1,showWithoutSelection:!1},i),this._input=document.createElement("input"),this._input.type="hidden",this._input.id=e,this._input.name=e,this._input.value=t,this._formFieldContainer.appendChild(this._input);const s=o.identify(this._labelChooser);let l=a.default.getDropdownMenu(s);null===l&&(a.default.init(this._labelChooser.getElementsByClassName("dropdownToggle")[0]),l=a.default.getDropdownMenu(s));let c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=document.createElement("ul"),l.appendChild(c);const e=document.createElement("li");e.classList.add("dropdownDivider"),c.appendChild(e)}if(this._options.showWithoutSelection){const e=document.createElement("li");e.dataset.labelId="-1",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=r.get("wcf.label.withoutSelection"),t.appendChild(i)}if(!this._options.forceSelection){const e=document.createElement("li");e.dataset.labelId="0",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=r.get("wcf.label.none"),t.appendChild(i)}l.querySelectorAll("li:not(.dropdownDivider)").forEach((e=>{e.addEventListener("click",(e=>this._click(e))),t&&e.dataset.labelId===t&&this._selectLabel(e)}))}_blockScroll(e){e.addEventListener("wheel",(e=>e.preventDefault()),{passive:!1})}_click(e){e.preventDefault(),this._selectLabel(e.currentTarget)}_selectLabel(e){let t=e.dataset.labelId;t||(t="0");const i=e.querySelector("span > span"),n=this._labelChooser.querySelector(".dropdownToggle > span");n.className=i.className,n.textContent=i.textContent,this._input.value=t}}})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["require","exports","tslib","../../../../Environment"],(function(e,t,i,n){"use strict";return n=i.__importStar(n),class{_field;_input;_ratingElements;constructor(e,t){if(this._field=document.getElementById(e+"Container"),null===this._field)throw new Error("Unknown field with id '"+e+"'");this._input=document.createElement("input"),this._input.id=e,this._input.name=e,this._input.type="hidden",this._input.value=t,this._field.appendChild(this._input),this._ratingElements=new Map;const i=this._field.querySelector(".ratingList");i.addEventListener("mouseleave",(()=>this._restoreRating())),i.querySelectorAll("li").forEach((e=>{e.classList.contains("ratingMetaButton")?(e.addEventListener("click",(e=>this._metaButtonClick(e))),e.addEventListener("mouseenter",(()=>this._restoreRating()))):(this._ratingElements.set(e.dataset.rating,e),e.addEventListener("click",(e=>this._listItemClick(e))),e.addEventListener("mouseenter",(e=>this._listItemMouseEnter(e))),e.addEventListener("mouseleave",(()=>this._listItemMouseLeave())))}))}_listItemClick(e){const t=e.currentTarget;this._input.value=t.dataset.rating,"desktop"!==n.platform()&&this._restoreRating()}_listItemMouseEnter(e){const t=e.currentTarget.dataset.rating;this._ratingElements.forEach(((e,i)=>{const n=e.querySelector("fa-icon");this._toggleIcon(n,~~i<=~~t)}))}_listItemMouseLeave(){this._ratingElements.forEach((e=>{const t=e.querySelector("fa-icon");this._toggleIcon(t,!1)}))}_metaButtonClick(e){"removeRating"===e.currentTarget.dataset.action&&(this._input.value="",this._listItemMouseLeave())}_restoreRating(){this._ratingElements.forEach(((e,t)=>{const i=e.querySelector("fa-icon");this._toggleIcon(i,~~t<=~~this._input.value)}))}_toggleIcon(e,t=!1){t?e.setIcon("star",!0):e.setIcon("star")}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","./Manager"],(function(e,t,i,n,o){"use strict";return o=i.__importStar(o),class{_dependentElement;_field;_fields;_noField;constructor(e,t){this.init(e,t)}checkDependency(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")}getDependentNode(){return this._dependentElement}getField(){return this._field}getFields(){return this._fields}init(e,t){if(this._dependentElement=document.getElementById(e),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+e+"Container'.");if(this._field=document.getElementById(t),null===this._field){if(this._fields=[],document.querySelectorAll(`input[type=radio][name="${(0,n.escapeAttributeSelector)(t)}"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length&&(document.querySelectorAll(`input[type=checkbox][name="${(0,n.escapeAttributeSelector)(t)}[]"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length))throw new Error("Unknown field with id '"+t+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.nodeName&&"radio"===this._field.type&&""!==this._field.dataset.noInputId){if(this._noField=document.getElementById(this._field.dataset.noInputId),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+t+"'");this._fields.push(this._noField)}o.addDependency(this)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["require","exports","tslib","./Abstract"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return!e.checked;case"radio":return!(!this._noField||!this._noField.checked)||!e.checked;default:return 0===e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0===this._field.querySelectorAll("option:checked").length:"0"==e.value||0===e.value.length}case"TEXTAREA":return 0===this._field.value.trim().length}return this._fields.every((e=>!e.checked))}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/IsNotClicked",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsNotClicked=void 0,n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{constructor(e,t){super(e,t),this._field.addEventListener("click",(()=>{this._field.dataset.isClicked="1",o.checkDependencies()}))}checkDependency(){return"1"!==this._field.dataset.isClicked}}t.IsNotClicked=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["require","exports","tslib","./Abstract"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return e.checked;case"radio":return(!this._noField||!this._noField.checked)&&e.checked;default:return 0!==e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0!==e.querySelectorAll("option:checked").length:"0"!=e.value&&0!==e.value.length}case"TEXTAREA":return 0!==this._field.value.trim().length}return this._fields.some((e=>e.checked))}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_isNegated=!1;_values;checkDependency(){if(!this._values)throw new Error("Values have not been set.");const e=[];if(this._field){if(o.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else{let t=!0;if(this._fields.forEach((i=>{if(i.checked){if(o.isHiddenByDependencies(i))return t=!1,!1;e.push(i.value)}})),!t)return!1}let t=!1;return this._values.forEach((i=>{e.forEach((e=>{i==e&&(t=!0)}))})),t?!this._isNegated:this._isNegated}negate(e){return this._isNegated=e,this}values(e){return this._values=e,this}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/ValueInterval",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueInterval=void 0,n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_maximum=null;_minimum=null;checkDependency(){if(this._field){if(o.isHiddenByDependencies(this._field))return!1;const e=parseFloat(this._field.value);return!(isNaN(e)||null!==this._minimum&&this._minimum>e||null!==this._maximum&&this._maximum<e)}throw new Error("'ValueInterval' is only supported for individual fields.")}maximum(e){return this._maximum=e,this}minimum(e){return this._minimum=e,this}}t.ValueInterval=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["require","exports","tslib","../Value","../../../../Language/Chooser"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{destroy(){o.removeChooser(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["require","exports","tslib","../Value"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{constructor(e){super(e+"_tmpHash")}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Poll",["require","exports","tslib","../Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_pollEditor;_getData(){return this._pollEditor.getData()}_readField(){}setPollEditor(e){this._pollEditor=e}}return o})),define("WoltLabSuite/Core/Ui/User/Menu/Data/Notification",["require","exports","tslib","../../../../Ajax","../View","../Manager","../../../../Language","../../../../Notification/Handler"],(function(e,t,i,n,o,r,a,s){"use strict";function l(e){const t=document.querySelector('link[rel="icon"]');if(!t)return;c||(c=t.href);const i=Math.trunc(e).toString();if("0"===i)return void(t.href=c);const n=document.createElement("img");n.src=c,n.addEventListener("load",(()=>{const e=document.createElement("canvas");e.width=n.naturalWidth,e.height=n.naturalHeight;const o=e.getContext("2d");o&&(o.drawImage(n,0,0,e.width,e.height),function(e,t){const i=e.canvas.width;let n=!1,o=.4*i;const r=.4*i;let a=.6*i;const s=.6*i;2===t.length?(o-=.4*a,a*=1.4,n=!0):t.length>=3&&(o-=.65*a,a*=1.65,n=!0),e.beginPath(),e.fillStyle="#d00",n?(e.moveTo(o+a/2,r),e.lineTo(o+a-s/2,r),e.quadraticCurveTo(o+a,r,o+a,r+s/2),e.lineTo(o+a,r+s-s/2),e.quadraticCurveTo(o+a,r+s,o+a-s/2,r+s),e.lineTo(o+s/2,r+s),e.quadraticCurveTo(o,r+s,o,r+s-s/2),e.lineTo(o,r+s/2),e.quadraticCurveTo(o,r,o+s/2,r)):e.arc(o+a/2,r+s/2,s/2,0,2*Math.PI),e.fill(),e.closePath(),e.beginPath(),e.stroke(),e.font="bold "+Math.floor(s*(t.length>2?.85:1)).toString()+"px sans-serif",e.textAlign="center",e.fillStyle="#fff",t.length>3?e.fillText((t.length>4?9:Math.floor(+t/1e3)).toString()+"k+",Math.floor(o+a/2),Math.floor(r+s-.2*s)):e.fillText(t,Math.floor(o+a/2),Math.floor(r+s-.15*s)),e.closePath()}(o,i),t.href=e.toDataURL("image/png"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=i.__importDefault(o),a=i.__importStar(a);let c="";class d{button;options;stale=!0;view=void 0;constructor(e,t){this.button=e,this.options=t,this.counter>0&&l(this.counter),window.WCF.System.PushNotification.addCallback("userNotificationCount",(e=>{this.updateCounter(e),this.stale=!0}))}get counter(){return parseInt(this.button.dataset.count,10)}set counter(e){this.button.dataset.count=e.toString()}getPanelButton(){return this.button}getMenuButtons(){return[{icon:'<fa-icon size="24" name="cog" solid></fa-icon>',link:this.options.settingsLink,name:"settings",title:this.options.settingsTitle}]}getIdentifier(){return"com.woltlab.wcf.notifications"}async getData(){const e=await(0,n.dboAction)("getNotificationData","wcf\\data\\user\\notification\\UserNotificationAction").disableLoadingIndicator().dispatch();return this.updateCounter(e.totalCount),this.stale=!1,e.items}getFooter(){return{link:this.options.showAllLink,title:this.options.showAllTitle}}getTitle(){return this.options.title}getView(){return void 0===this.view&&(this.view=new o.default(this)),this.view}getEmptyViewMessage(){return this.options.noItems}hasPlainTitle(){return!1}hasUnreadContent(){return this.counter>0}isStale(){if(this.stale)return!0;const e=this.getView().getItems().filter((e=>"true"===e.dataset.isUnread));return this.counter!==e.length}getDesktopNotifications(){if(!("Notification"in window))return null;if("granted"===Notification.permission||"denied"===Notification.permission)return null;const e=document.createElement("div");e.classList.add("userMenuNotifications"),e.textContent=a.get("wcf.user.notification.enableDesktopNotifications");const t=document.createElement("div");t.classList.add("userMenuNotificationsButtons"),e.append(t);const i=document.createElement("button");return i.type="button",i.classList.add("button","small","userMenuNotificationsButton"),i.textContent=a.get("wcf.user.notification.enableDesktopNotifications.button"),i.addEventListener("click",(async t=>{t.preventDefault(),"granted"===await Notification.requestPermission()&&(0,s.enableNotifications)(),e.remove()})),t.append(i),e}async markAsRead(e){const t=await(0,n.dboAction)("markAsConfirmed","wcf\\data\\user\\notification\\UserNotificationAction").objectIds([e]).dispatch();this.updateCounter(t.totalCount)}async markAllAsRead(){await(0,n.dboAction)("markAllAsConfirmed","wcf\\data\\user\\notification\\UserNotificationAction").dispatch(),this.updateCounter(0)}updateCounter(e){this.counter=e;let t=this.button.querySelector(".badge");null===t&&e>0&&(t=document.createElement("span"),t.classList.add("badge","badgeUpdate"),this.button.querySelector("a").append(t)),t&&(0===e?t.remove():t.textContent=e.toString()),l(e)}}let u=!1;t.setup=function(e){if(!u){const t=document.getElementById("userNotifications");if(null!==t){const i=new d(t,e);(0,r.registerProvider)(i)}u=!0}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["require","exports","tslib","../Manager"],(function(e,t,i,n){"use strict";return n=i.__importStar(n),class{_container;constructor(e){this.init(e)}checkContainer(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")}init(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=document.getElementById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");n.addContainerCheckCallback((()=>this.checkContainer()))}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["require","exports","tslib","./Abstract","../../../../../Core","../Manager","../../../../../Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a);class s extends n.default{checkContainer(){if(o.stringToBool(this._container.dataset.ignoreDependencies||""))return;if(r.isHiddenByDependencies(this._container))return;const e=!a.default.isHidden(this._container),t=Array.from(this._container.children).some(((e,t)=>(0!==t||"H2"!==e.tagName&&"HEADER"!==e.tagName)&&!a.default.isHidden(e)));e!==t&&(t?a.default.show(this._container):a.default.hide(this._container),r.checkContainers())}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,i,n,o,r,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a);class s extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=Array.from(this._container.children).some((e=>!r.isHidden(e)));if(e!==t){const e=this._container.parentNode.parentNode.querySelector("#"+r.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]");if(null===e)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)r.show(this._container),r.show(e);else{r.hide(this._container),r.hide(e);const t=a.getTabMenu(r.identify(e.closest(".tabMenuContainer")));t.getActiveTab()===e&&t.selectFirstVisible()}o.checkContainers()}}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,i,n,o,r,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a);class s extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=this._container.parentNode.querySelectorAll("#"+r.identify(this._container)+" > nav > ul > li"),i=Array.from(t).some((e=>!r.isHidden(e)));e!==i&&(i?(r.show(this._container),a.getTabMenu(r.identify(this._container)).selectFirstVisible()):r.hide(this._container),o.checkContainers())}}return s})),function(e){function t(){for(;n.length&&"function"==typeof n[0];)n.shift()()}var i=e.require,n=[],o=0;e.orgRequire=i,e.require=function(r,a,s){if(!Array.isArray(r))return i.apply(e,arguments);var l=new Promise((function(e,a){var s=o++;n.push(s),i(r,(function(){var i=arguments;n[n.indexOf(s)]=function(){e(i)},t()}),(function(e){n[n.indexOf(s)]=function(){a(e)},t()}))}));return a&&(l=l.then((function(t){return a.apply(e,t)}))),s&&l.catch(s),l},e.require.config=i.config}(window),define("require.linearExecution",(function(){}));
-//# sourceMappingURL=../proxy_sourcemap.php?Ev9ZiisQaTpjB0RCgLK-IDAnaGqO86eYUw12FqrKrxmUEhMAenOEzoEMLBEVtH4Z21tndvJO-EXHliir14V8BGUqYvMf_H3RTHHT-bm5e93whSixCgKe9CyvNauA_HdwO98mjRQcb8q2nQBU-xnXDphk6Bk9sHZuvgHJ60PA-tr4s7czHq7xU3kFb62FcWmUtNGwCrMQX2Mp-lgCu1fPPdhcvlGytZP5hJ1mLVeMwEsDqCMxAtra91LBL0CM-5wNeNMJAxbuzKHviu-4Y237Hi2SA5UBGDf3TYiBJXO0fyCME-1GzDjd5WqHyvm33qFuPeO1lwLsmU1rhSTIBs78IQ/WCF/a55405fa47d7b7c519facc6bd88e2c3d1c6a959e1138960b0e8e9379a624ab5b
\ No newline at end of file
+var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__createBinding,__addDisposableResource,__disposeResources,_self,Prism,__setModuleDefault,Reflect;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,(function(t,o){!i&&hasProp(e,o)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,i){var n,o,r,a,s,l,c,d,u,p,m=t&&t.split("/"),h=x.map,f=h&&h["*"];if(e&&(l=(e=e.split("/")).length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),function(e){var t,i,n=e.length;for(t=0;t<n;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&h&&(m||f)){e:for(r=(o=e.split("/")).length;r>0;r-=1){if(s=o.slice(0,r).join("/"),m)for(a=m.length;a>0;a-=1)if((n=getOwn(h,m.slice(0,a).join("/")))&&(n=getOwn(n,s))){c=n,d=r;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),p=r)}!c&&u&&(c=u,d=p),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(x.pkgs,e)||e}function i(e){var t,i,n,o;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}t-=1,(i=(n=queue.shift())[0])in L||i in k||(i in T?v.apply(undef,n):k[i]=n)}e&&(o=getOwn(x.shim,e)||{},v(e,o.deps||[],o.exportsFn))}function n(e,n){var o=function(t,r,a,s){var l,c;if(n&&i(),"string"==typeof t){if(y[t])return y[t](e);if(!((l=_(t,e,!0).id)in L))throw new Error("Not loaded: "+l);return L[l]}return t&&!Array.isArray(t)&&(c=t,t=undef,Array.isArray(r)&&(t=r,r=a,a=s),n)?o.config(c)(t,r,a):(r=r||function(){return slice.call(arguments,0)},F.then((function(){return i(),v(undef,t||[],r,a,e)})))};return o.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,o.nameToUrl=function(e,t,i){var n,r,a,s,l,c,d=getOwn(x.pkgs,e);if(d&&(e=d),c=getOwn(N,e))return o.nameToUrl(c,t,i);if(urlRegExp.test(e))s=e+(t||"");else{for(n=x.paths,a=(r=e.split("/")).length;a>0;a-=1)if(l=getOwn(n,r.slice(0,a).join("/"))){Array.isArray(l)&&(l=l[0]),r.splice(0,a,l);break}s=r.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+s}return x.urlArgs&&!/^blob\:/.test(s)?s+x.urlArgs(e,s):s},o.toUrl=function(i){var n,r=i.lastIndexOf("."),a=i.split("/")[0];return-1!==r&&(!("."===a||".."===a)||r>1)&&(n=i.substring(r,i.length),i=i.substring(0,r)),o.nameToUrl(t(i,e),n,!0)},o.defined=function(t){return _(t,e,!0).id in L},o.specified=function(t){return(t=_(t,e,!0).id)in L||t in T},o}function o(e,t,i){e&&(L[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(C,t.map,t.deps)),t.finished=!0,t.resolve(i)}function r(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function a(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=C.execCb(i,e.factory,e.values,L[i])}catch(t){return r(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=L[i])):M.splice(M.indexOf(e),1),o(i,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||a(this))}function l(e,t){var i={};return i.promise=new Promise((function(t,n){i.resolve=t,i.reject=function(t){e||M.splice(M.indexOf(i),1),n(t)}})),i.map=e?t||_(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=s,i.map.pr&&(i.deps=[_(i.map.pr)]),i}function c(e,t){var i;return e?(i=e in T&&T[e])||(i=T[e]=l(e,t)):(i=l(),M.push(i)),i}function d(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(q+=1),i.requireModules=[t]),r(e,i))}}function u(e,t,i,n){i.depMax+=1,w(e,t).then((function(e){i.depFinished(e,n)}),d(i,e.id)).catch(d(i,i.map.id))}function p(e,t,a){e.load(t.n,n(a),function(e){function t(t){n||o(e,c(e),t)}var n;return t.error=function(t){r(c(e),t)},t.fromText=function(t,o){var a,s=c(e),l=_(_(e).n),d=l.id;n=!0,s.factory=function(e,t){return t},o&&(t=o),hasProp(x.config,e)&&(x.config[d]=x.config[e]);try{b.exec(t)}catch(e){(a=new Error("fromText eval for "+d+" failed: "+e)).requireType="fromtexteval",r(s,a)}i(d),s.deps=[l],u(l,null,s,s.deps.length)},t}(t.id),x)}function m(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function h(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach((function(n){var o=n.id,r=!hasProp(y,o)&&c(o,n);!r||r.finished||i[o]||(hasProp(t,o)?e.deps.forEach((function(t,i){t.id===o&&e.depFinished(L[o],i)})):h(r,t,i))})),i[n]=!0}function f(e){var t,i,n,o=[],a=1e3*x.waitSeconds,s=a&&j+a<(new Date).getTime();if(0===P&&(e?e.finished||h(e,{},{}):M.length&&M.forEach((function(e){h(e,{},{})}))),s){for(i in T)(n=T[i]).finished||o.push(n.map.id);(t=new Error("Timeout for modules: "+o)).requireModules=o,t.requireType="timeout",o.forEach((function(e){r(c(e),t)}))}else(P||M.length)&&(E||(E=!0,setTimeout((function(){E=!1,f()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&O[e.dynaId]||(O[e.dynaId]=!0,b.onError(e))})),e}var b,v,_,w,y,E,S,C,L=obj(),k=obj(),x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},I=obj(),M=[],T=obj(),D=obj(),A=obj(),P=0,j=(new Date).getTime(),q=0,O=obj(),B=obj(),N=obj(),F=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;B[t]||(B[t]=!0,c(e.id),importScripts(t),i(e.id))}:function(e){var t,n=e.id,o=e.url;B[o]||(B[o]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",n),t.type=x.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,P+=1,t.addEventListener("load",(function(){P-=1,i(n)}),!1),t.addEventListener("error",(function(){var e,i,o;P-=1,(i=getOwn(x.paths,n))&&Array.isArray(i)&&i.length>1?(t.parentNode.removeChild(t),i.shift(),(o=c(n)).map=_(n),o.map.url=b.nameToUrl(n),S(o.map)):((e=new Error("Load failed: "+n+": "+t.src)).requireModules=[n],e.requireType="scripterror",r(c(n),e))}),!1),t.src=o,x.onNodeCreated&&x.onNodeCreated(t,x,n,o),10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},w=function(e,t){var i,n,o=e.id,r=x.shim[o];if(o in k)i=k[o],delete k[o],v.apply(undef,i);else if(!(o in T))if(e.pr){if(!(n=getOwn(N,o)))return w(_(e.pr)).then((function(i){var n=e.prn?e:_(o,t,!0),r=n.id,a=getOwn(x.shim,r);return r in A||(A[r]=!0,a&&a.deps?b(a.deps,(function(){p(i,n,t)})):p(i,n,t)),c(r).promise}));e.url=b.nameToUrl(n),S(e)}else r&&r.deps?b(r.deps,(function(){S(e)})):S(e);return c(o).promise},_=function(e,i,n){if("string"!=typeof e)return e;var o,r,a,s,l,c,d=e+" & "+(i||"")+" & "+!!n;return s=(a=m(e))[0],e=a[1],!s&&d in I?I[d]:(s&&(o=(s=t(s,i,n))in L&&L[s]),s?o&&o.normalize?(e=o.normalize(e,function(e){return function(i){return t(i,e,!0)}}(i)),c=!0):e=-1===e.indexOf("!")?t(e,i,n):e:(s=(a=m(e=t(e,i,n)))[0],e=a[1],r=b.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&c},s||(I[d]=l),l)},y={require:function(e){return n(e)},exports:function(e){var t=L[e];return void 0!==t?t:L[e]={}},module:function(e,t){return{id:e,uri:t||"",exports:y.exports(e),config:function(){return getOwn(x.config,e)||{}}}}},v=function(e,t,i,n,r){if(e){if(e in D)return;D[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(i=t,t=[]),t=t?slice.call(t,0):null,n||(hasProp(x,"defaultErrback")?x.defaultErrback&&(n=x.defaultErrback):n=g),n&&s.promise.catch(n),r=r||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),s.factory=i,s.deps=t,s.depending=!0,t.forEach((function(i,n){var o;t[n]=o=_(i,r,!0),"require"===(i=o.id)?s.values[n]=y.require(e):"exports"===i?(s.values[n]=y.exports(e),s.usingExports=!0):"module"===i?s.values[n]=s.cjsModule=y.module(e,s.map.url):void 0===i?s.values[n]=void 0:u(o,r,s,n)})),s.depending=!1,s.depCount===s.depMax&&a(s)):e&&o(e,s,i),j=(new Date).getTime(),e||f(s),s.promise},(b=n(null,!0)).config=function(t){var i,n,o,r;return t.context&&t.context!==e?(i=getOwn(contexts,t.context))?i.req.config(t):newContext(t.context).config(t):(I=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(n=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+n}),o=x.shim,r={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){r[t]?(x[t]||(x[t]={}),mixin(x[t],e,!0,!0)):x[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(N[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),o[t]=e})),x.shim=o),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(x.paths[t]=e.location),x.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&b(t.deps,t.callback),b)},b.onError=function(e){throw e},C={id:e,defined:L,waiting:k,config:x,deferreds:T,req:b,execCb:function(e,t,i,n){return t.apply(n,i)}},contexts[e]=C,b}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{"focus-trap":"3rdParty/focus-trap/focus-trap.umd.min","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min","reflect-metadata":"3rdParty/reflect-metadata",tabbable:"3rdParty/focus-trap/index.umd.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn","@googlemaps/markerclusterer":"3rdParty/googlemaps/markerclusterer/index.umd","@ckeditor/ckeditor5-inspector":"3rdParty/ckeditor/ckeditor5-inspector/inspector","@woltlab/editor":"3rdParty/ckeditor/ckeditor5.bundle","ckeditor5-translation":"3rdParty/ckeditor/translations","diff-match-patch":"3rdParty/diff-match-patch/diff_match_patch.min"},packages:[{name:"codemirror",location:"3rdParty/codemirror",main:"lib/codemirror"},{name:"@woltlab/visual-dom-diff",location:"3rdParty/visual-dom-diff",main:"index"}],shim:{"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){var i;e.elAttr=function(e,t,i){if(void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var o=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(o,n),o},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,i){if(t="data-"+t,void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,i){var n,o,r,a=e.parentNode;if(null===a)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return o=e,(n=a).classList.contains("inputAddon")&&(n=a.parentElement,o=a),null!==(r=o.nextElementSibling)&&"SMALL"===r.nodeName&&r.classList.contains("innerError")||(""===t?r=null:((r=elCreate("small")).className="innerError",n.insertBefore(r,o.nextSibling))),""===t?null!==r&&(a.removeChild(r),r=null):r[i?"innerHTML":"textContent"]=t,r},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i],i)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,i){var n;return function(){var o=this,r=arguments;clearTimeout(n),n=setTimeout((function(){n=null,i||e.apply(o,r)}),t),i&&!n&&e.apply(o,r)}},Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),i=0,function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}(),e.addEventListener("popstate",(function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})),e.String.prototype.hashCode=function(){var e,t,i=0;if(this.length)for(e=0,t=this.length;e<t;e++)i=(i<<5)-i+this.charCodeAt(e),i&=i;return i},Object.defineProperty(e,"SECURITY_TOKEN",{configurable:!1,get(){const e=t.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[i,n]=e.split(/=/,2);return decodeURIComponent(n.trim())}})}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==i&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(i,n){return e[i]=t?t(i,n):n}}var i="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(n){e(t(i,t(n)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(i,t(module.exports))):e(t(i))}((function(e){var t,i,n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])};__extends=function(e,t){function i(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},__assign=Object.assign||function(e){var t,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__rest=function(e,t){var i,n,o={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]]);return o},__decorate=function(e,t,i,n){var o,r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,i,s):o(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},__param=function(e,t){return function(i,n){t(i,n,e)}},__esDecorate=function(e,t,i,n,o,r){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}var s,l,c,d,u,p=n.kind,m="getter"===p?"get":"setter"===p?"set":"value",h=!t&&e?n.static?e:e.prototype:null,f=t||(h?Object.getOwnPropertyDescriptor(h,n.name):{}),g=!1;for(l=i.length-1;l>=0;l--){for(d in c={},n)c[d]="access"===d?{}:n[d];for(d in n.access)c.access[d]=n.access[d];if(c.addInitializer=function(e){if(g)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(e||null))},u=(0,i[l])("accessor"===p?{get:f.get,set:f.set}:f[m],c),"accessor"===p){if(void 0===u)continue;if(null===u||"object"!=typeof u)throw new TypeError("Object expected");(s=a(u.get))&&(f.get=s),(s=a(u.set))&&(f.set=s),(s=a(u.init))&&o.unshift(s)}else(s=a(u))&&("field"===p?o.unshift(s):f[m]=s)}h&&Object.defineProperty(h,n.name,f),g=!0},__runInitializers=function(e,t,i){var n,o=arguments.length>2;for(n=0;n<t.length;n++)i=o?t[n].call(e,i):t[n].call(e);return o?i:void 0},__propKey=function(e){return"symbol"==typeof e?e:"".concat(e)},__setFunctionName=function(e,t,i){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:i?"".concat(i," ",t):t})},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},__generator=function(e,t){function i(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}var n,o,r,a,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},__exportStar=function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||__createBinding(t,e,i)},__createBinding=Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var i,n,o,r,a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,i,n,o,r,a,s;for(e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(n=Array(e),o=0,t=0;t<i;t++)for(a=0,s=(r=arguments[t]).length;a<s;a++,o++)n[o]=r[a];return n},__spreadArray=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,i){function n(e){c[e]&&(l[e]=function(t){return new Promise((function(i,n){d.push([e,t,i,n])>1||o(e,t)}))})}function o(e,t){try{(i=c[e](t)).value instanceof __await?Promise.resolve(i.value.v).then(r,a):s(d[0][2],i)}catch(e){s(d[0][3],e)}var i}function r(e){o("next",e)}function a(e){o("throw",e)}function s(e,t){e(t),d.shift(),d.length&&o(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=i.apply(e,t||[]),d=[];return l={},n("next"),n("throw"),n("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,o){i[t]=e[t]?function(i){return(n=!n)?{value:__await(e[t](i)),done:!1}:o?o(i):i}:o}var i,n;return i={},t("next"),t("throw",(function(e){throw e})),t("return"),i[Symbol.iterator]=function(){return this},i},__asyncValues=function(e){function t(t){i[t]=e[t]&&function(i){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(i=e[t](i)).done,i.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),i={},t("next"),t("throw"),t("return"),i[Symbol.asyncIterator]=function(){return this},i)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var i,n;if(e&&e.__esModule)return e;if(i={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(i,e,n);return t(i,e),i},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},__classPrivateFieldSet=function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i},__classPrivateFieldIn=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__addDisposableResource=function(e,t,i){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:i})}else i&&e.stack.push({async:!0});return t},i="function"==typeof SuppressedError?SuppressedError:function(e,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=e,n.suppressed=t,n},__disposeResources=function(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function i(){for(var n,o;e.stack.length;){n=e.stack.pop();try{if(o=n.dispose&&n.dispose.call(n.value),n.async)return Promise.resolve(o).then(i,(function(e){return t(e),i()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__esDecorate",__esDecorate),e("__runInitializers",__runInitializers),e("__propKey",__propKey),e("__setFunctionName",__setFunctionName),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__spreadArray",__spreadArray),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateObject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet),e("__classPrivateFieldIn",__classPrivateFieldIn),e("__addDisposableResource",__addDisposableResource),e("__disposeResources",__disposeResources)})),define("WoltLabSuite/Core/Ajax/Status",["require","exports"],(function(e,t){"use strict";function i(){return void 0===o&&(o=new n),o}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0;class n{_activeRequests=0;_overlay;_timer=null;constructor(){this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("woltlab-core-loading-indicator");e.size=48,this._overlay.append(e),document.body.append(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._overlay.classList.remove("active"))}}let o;t.show=function(){i().show()},t.hide=function(){i().hide()}})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function i(e){return r(e)}function n(e,...t){const r=i(e=e||{});for(let i=0,a=t.length;i<a;i++){const a=t[i];a&&Object.keys(a).forEach((t=>{Array.isArray(a[t])||"object"!=typeof a[t]?r[t]=a[t]:o(a[t])?r[t]=n(e[t],a[t]):r[t]=a[t]}))}return r}function o(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.getXsrfToken=t.enableLegacyInheritance=t.debounce=t.stringToBool=t.getStoragePrefix=t.triggerEvent=t.serialize=t.getUuid=t.getType=t.isPlainObject=t.inherit=t.extend=t.convertLegacyUrl=t.clone=void 0;const r=function(e){return"object"==typeof e&&(Array.isArray(e)||o(e))?a(e):e},a=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((i=>t[i]=r(e[i]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=i,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const i=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,n=i.length;e<n;e++){const n=i[e].trim();n.length&&(t.length&&(t+="-"),t+=n.toLowerCase())}return`index.php?${t}/&`}))},t.extend=n,t.inherit=function(e,t,i){if(null==e)throw new TypeError("The constructor must not be undefined or null.");if(null==t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=n(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),i||{})},t.isPlainObject=o,t.getType=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1")},t.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,i){if(null===t)return"";const n=[];return Object.keys(t).forEach((o=>{const r=i?i+"["+o+"]":o,a=t[o];"object"==typeof a?n.push(e(a,r)):n.push(encodeURIComponent(r)+"="+encodeURIComponent(a))})),n.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const i=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(i)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,i={isImmediate:!1}){let n;return function(...o){const r=i.isImmediate&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout((()=>{n=void 0,i.isImmediate||e.apply(this,o)}),t),r&&e.apply(this,o)}},t.enableLegacyInheritance=function(e){console.error("Relying on the legacy inheritance is no longer supported. Please migrate your code to use ES6 classes and inheritance.",e)},t.getXsrfToken=function(){const e=document.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[t,i]=e.split(/=/,2);return decodeURIComponent(i.trim())}})),define("WoltLabSuite/Core/CallbackList",["require","exports"],(function(e,t){"use strict";return class{_callbacks=new Map;add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){null===e?this._callbacks.forEach(((e,i)=>{e.forEach(t)})):this._callbacks.get(e)?.forEach(t)}}})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,i,n){"use strict";const o=new((n=i.__importDefault(n)).default);let r=!1;return{add:o.add.bind(o),remove:o.remove.bind(o),trigger(){if(!r)try{r=!0,o.forEach(null,(e=>e()))}finally{r=!1}}}})),define("WoltLabSuite/Core/Language",["require","exports"],(function(e,t){"use strict";function i(e,t={}){return window.WoltLabLanguage.getPhrase(e,t)}function n(e,t){window.WoltLabLanguage.registerPhrase(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.addObject=t.add=t.get=t.registerPhrase=t.getPhrase=void 0,t.getPhrase=i,t.registerPhrase=n,t.get=function(e,t={}){return i(e,t)},t.add=function(e,t){n(e,t)},t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{n(e,t)}))}})),define("WoltLabSuite/Core/Component/Dialog/Controls",["require","exports","tslib","../../Language"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogControls=void 0,n=i.__importStar(n);class o{#e;constructor(e){this.#e=e}asAlert(e){const t={cancel:void 0,extra:void 0,isAlert:!0,primary:e?.primary||n.get("wcf.dialog.button.primary")};return this.#e.attachControls(t),this.#e}asConfirmation(e){const t={cancel:"",extra:void 0,isAlert:!0,primary:e?.primary||n.get("wcf.dialog.button.primary.confirm")};return this.#e.attachControls(t),this.#e}asPrompt(e){const t={cancel:"",extra:e?.extra,isAlert:!1,primary:e?.primary||n.get("wcf.dialog.button.primary.submit")};return this.#e.attachControls(t),this.#e}withoutControls(){return this.#e}}t.DialogControls=o,t.default=o})),define("WoltLabSuite/Core/StringUtil",["require","exports"],(function(e,t){"use strict";function i(e,t){const i=t?-t:2;return e.toLocaleString(document.documentElement.lang,{maximumFractionDigits:i}).replace("-","−")}function n(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCase=t.shortUnit=t.unescapeHTML=t.ucfirst=t.lcfirst=t.formatNumeric=t.escapeRegExp=t.escapeHTML=t.addThousandsSeparator=void 0,t.addThousandsSeparator=function(e){return e.toLocaleString(document.documentElement.lang)},t.escapeHTML=function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=i,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=n,t.unescapeHTML=function(e){return String(e).replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},t.shortUnit=function(e){let t="";return e>=1e6?((e/=1e6)>10&&(e=Math.floor(e)),t="M"):e>=1e3&&((e/=1e3)>10&&(e=Math.floor(e)),t="k"),i(e,-1)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=n(e)),e))).join(""):e}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,i,n){"use strict";function o(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let n,o=e;const r=i+"Sibling";for(;null!==o&&o!==t;){if(null!==o[i+"ElementSibling"])return!1;if(o[r])for(n=o[r];n;){if(""!==n.textContent.trim())return!1;n=n[r]}o=o.parentNode}return!0}n=i.__importStar(n);let r=0;const a={createFragmentFromHtml(e){const t=document.createElement("div");a.setInnerHtml(t,e);const i=document.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId(){let e;do{e="wcf"+r++}while(null!==document.getElementById(e));return e},escapeAttributeSelector:e=>e.replace(/(["\\])/g,"\\$1"),identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=a.getUniqueId(),e.id=t),t},outerHeight(e,t){t=t||window.getComputedStyle(e);let i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom,i},outerWidth(e,t){t=t||window.getComputedStyle(e);let i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight,i},outerDimensions(e){const t=window.getComputedStyle(e);return{height:a.outerHeight(e,t),width:a.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let i=!1;Object.keys(t).forEach((n=>{/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":"")}))},styleAsInt(e,t){const i=e.getPropertyValue(t);return null===i?0:parseInt(i,10)},setInnerHtml(e,t){let i;e.innerHTML=t,i=e instanceof HTMLTemplateElement?e.content:e;const n=i.querySelectorAll("script");for(let e=0,t=n.length;e<t;e++){const t=n[e],o=document.createElement("script");t.src?o.src=t.src:o.textContent=t.textContent,i.appendChild(o),t.remove()}},insertHtml(e,t,i){const n=document.createElement("template");a.setInnerHtml(n,e);const o=document.importNode(n.content,!0);switch(i){case"append":t.appendChild(o);break;case"after":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'after'.");t.parentNode.insertBefore(o,t.nextSibling);break;case"prepend":t.insertBefore(o,t.firstChild);break;case"before":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'before'.");t.parentNode.insertBefore(o,t);break;default:throw new Error("Unknown insert method '"+i+"'.")}},contains:(e,t)=>e.contains(t),getDataAttributes(e,t,i,o){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),i=!0===i,o=!0===o;const r={};for(let a=0,s=e.attributes.length;a<s;a++){const s=e.attributes[a];if(0===s.name.indexOf(t)){let e=s.name.replace(new RegExp("^"+t),"");if(i){const t=e.split("-");e="";for(let i=0,r=t.length;i<r;i++)e.length&&(o&&"id"===t[i]?t[i]="ID":t[i]=n.ucfirst(t[i])),e+=t[i]}r[e]=s.value}}return r},unwrapChildNodes(e){if(null===e.parentNode)throw new Error("The element has no parent.");const t=e.parentNode;for(;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);e.remove()},replaceElement(e,t){if(null===e.parentNode)throw new Error("The old element has no parent.");for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),e.remove()},isAtNodeStart:(e,t)=>o(e,t,"previous"),isAtNodeEnd:(e,t)=>o(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){a.isHidden(e)?a.show(e):a.hide(e)},innerError(e,t,i){const n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=n,r=e;o.classList.contains("inputAddon")&&(o=n.parentElement,r=n);let a=r.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=document.createElement("small"),a.className="innerError",o.insertBefore(a,r.nextSibling))),""===t?null!==a&&(a.remove(),a=null):i?a.innerHTML=t:a.textContent=t,a},innerSuccess(e,t,i){const n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerSuccess")||(""===t?o=null:(o=document.createElement("small"),o.className="innerSuccess",n.insertBefore(o,e.nextSibling))),""===t?null!==o&&(o.remove(),o=null):i?o.innerHTML=t:o.textContent=t,o},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=a,a})),define("WoltLabSuite/Core/Ajax/Error",["require","exports","tslib","../Component/Dialog","../Core","../Language","../StringUtil"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerGlobalRejectionHandler=t.InvalidJson=t.ExpectedJson=t.StatusNotOk=t.ConnectionError=t.ApiError=void 0,o=i.__importStar(o),r=i.__importStar(r);class s extends Error{name="ApiError"}t.ApiError=s;class l extends s{originalError;constructor(e){let t="Unknown error";e instanceof Error&&(t=e.message),super(t),this.name="ConnectionError",this.originalError=e}}t.ConnectionError=l;class c extends s{response;constructor(e){super("The API request returned a status code outside of the 200-299 range."),this.name="StatusNotOk",this.response=e}}t.StatusNotOk=c;class d extends s{response;constructor(e){super("The API did not return a JSON response."),this.name="ExpectedJson",this.response=e}}t.ExpectedJson=d;class u extends s{response;constructor(e){super("Failed to decode the JSON response from the API."),this.name="InvalidJson",this.response=e}}t.InvalidJson=u;let p=!1;t.registerGlobalRejectionHandler=function(){p||(window.addEventListener("unhandledrejection",(e=>{e.reason instanceof s&&(e.preventDefault(),async function(e){const t=await async function(e){let t="",i="";if(e instanceof l)i=e.originalError instanceof TypeError?r.get("wcf.global.error.ajax.network",{message:e.message}):e.message;else if(e instanceof u)i=await e.response.clone().text();else if(e instanceof d||e instanceof c){let n;try{n=await e.response.clone().json()}catch(t){i=await e.response.clone().text()}if(n&&o.isPlainObject(n)&&Object.keys(n).length>0)n.returnValues&&n.returnValues.description&&(t+=`<br><p>Description:</p><p>${n.returnValues.description}</p>`),n.file&&n.line&&(t+=`<br><p>File:</p><p>${n.file} in line ${n.line}</p>`),n.exception?t+=`<br>Exception: <div style="white-space: pre;">${(0,a.escapeHTML)(n.exception)}</div>`:n.stacktrace?t+=`<br><p>Stacktrace:</p><p>${n.stacktrace}</p>`:n.exceptionID&&(t+=`<br><p>Exception ID: <code>${n.exceptionID}</code></p>`),i=n.message,n.previous&&n.previous.forEach((e=>{t+=`<hr><p>${e.message}</p>`,t+=`<br><p>Stacktrace</p><p>${e.stacktrace}</p>`}));else if(void 0===n){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=i,e}}if(!i||"undefined"===i){if(!window.ENABLE_DEBUG_MODE)return"";i="fetch() failed without a response body. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${i}</p>${t}</div>`}(e);if(t instanceof HTMLIFrameElement){const e=(0,n.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(r.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else""!==t&&(0,n.dialogFactory)().fromHtml(t).asAlert().show(r.get("wcf.global.error.title"))}(e.reason))})),p=!0)}})),define("WoltLabSuite/Core/Ajax/Backend",["require","exports","tslib","./Status","./Error","../Core"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0,n=i.__importStar(n);class a{url;constructor(e){this.url=e}delete(){return new l(this.url,0)}get(){return new c(this.url,1)}post(e){return new l(this.url,2,e)}}let s=!1;window.addEventListener("beforeunload",(()=>s=!0));class l{#t=new Map;#i;#n;#o;#r;#a=!0;#s=!1;constructor(e,t,i){this.#i=e,this.#n=t,this.#o=i}getAbortController(){return void 0===this.#r&&(this.#r=new AbortController),this.#r}disableLoadingIndicator(){return this.#a=!1,this}withHeader(e,t){return this.#t.set(e,t),this}allowCaching(){return this.#s=!0,this}async fetchAsJson(){const e=await this.#l({headers:{accept:"application/json"}});if(void 0===e)return;const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new o.ExpectedJson(e);let i;try{i=await e.json()}catch(t){throw new o.InvalidJson(e)}return i}async fetchAsResponse(){return this.#l()}async#l(t={}){(0,o.registerGlobalRejectionHandler)(),this.#t.set("X-Requested-With","XMLHttpRequest"),this.#t.set("X-XSRF-TOKEN",(0,r.getXsrfToken)());const a=Object.fromEntries(this.#t),l=(0,r.extend)({headers:a,mode:"same-origin",credentials:"same-origin",cache:this.#s?"default":"no-store",redirect:"error"},t);2===this.#n?(l.method="POST",this.#o&&(this.#o instanceof Blob?(l.headers["Content-Type"]="application/octet-stream",l.body=this.#o):this.#o instanceof FormData?(l.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8",l.body=this.#o):(l.headers["Content-Type"]="application/json; charset=UTF-8",l.body=JSON.stringify(this.#o)))):0===this.#n?l.method="DELETE":l.method="GET",this.#r&&(l.signal=this.#r.signal);const c=this.#a;c&&n.show();try{const t=await fetch(this.#i,l);if(!t.ok)throw new o.StatusNotOk(t);return"yes"===t.headers.get("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke())),t}catch(e){if(e instanceof o.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new o.ConnectionError(e)}finally{c&&n.hide()}}}class c extends l{allowCaching(){return super.allowCaching(),this}}t.prepareRequest=function(e){return new a(e.toString())}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function i(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(n))}let n={editorAutosave:!0,editorInspector:!1,eventLogging:!1};const o={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(o).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){n.editorAutosave=!e&&!n.editorAutosave,i(),window.console.log("%c\tEditor autosave "+(n.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEditorInspector(e){n.editorInspector=!!e||!n.editorInspector,i(),window.console.log("%c\tEditor inspector "+(n.editorInspector?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){n.eventLogging=!!e||!n.eventLogging,i(),window.console.log("%c\tEvent logging "+(n.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=o,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(n=JSON.parse(e))}catch(e){}n.editorAutosave||o.toggleEditorAutosave(!0),n.editorInspector&&o.toggleEditorInspector(!0),n.eventLogging&&o.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>n.editorAutosave,editorInspector:()=>n.editorInspector,eventLog(e,t){n.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return o})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,i,n,o){"use strict";function r(e,t){"string"!=typeof t&&(t=void 0);const i=a.get(e);void 0!==i&&(void 0===t?a.delete(e):i.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,n=i.__importStar(n),o=i.__importDefault(o);const a=new Map;t.add=function(e,t,i){if("function"!=typeof i)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let o=a.get(e);void 0===o&&(o=new Map,a.set(e,o));let r=o.get(t);void 0===r&&(r=new Map,o.set(t,r));const s=n.getUuid();return r.set(s,i),s},t.fire=function(e,t,i){o.default._internal_.eventLog(e,t),i=i||{},a.get(e)?.get(t)?.forEach((e=>e(i)))},t.remove=function(e,t,i){a.get(e)?.get(t)?.delete(i)},t.removeAll=r,t.removeAllBySuffix=function(e,t){const i=a.get(e);if(void 0===i)return;const n=-1*(t="_"+t).length;i.forEach(((i,o)=>{o.substr(n)===t&&r(e,o)}))}})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports"],(function(e,t){"use strict";return class{_fieldId;_field;constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,i,n,o){"use strict";function r(){!0!==p?(p=!0,m=!1,o.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),p=!1,m&&r()):m=!0}function a(){const e=[];d.forEach(((t,i)=>{const o=document.getElementById(i);if(null===o)return void e.push(i);let r=!0;var a;t.forEach((e=>{var t;e.checkDependency()||(t=o,n.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&n.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,i=e.getAttribute("max");i&&(t.set("max",i),e.removeAttribute("max"));const n=e.getAttribute("maxlength");n&&(t.set("maxlength",n),e.removeAttribute("maxlength"));const o=e.getAttribute("min");o&&(t.set("min",o),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),r=!1)})),r&&(a=o,n.default.show(a),s.delete(a),a.classList.contains("tabMenuContent")&&a.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===a.dataset.name&&n.default.show(e)})),a.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==a&&!n.default.isHidden(t);)t=t.parentNode;if(t===a&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),r()}Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=t.isHiddenByDependencies=t.checkDependencies=t.checkContainers=t.addDependency=t.addContainerCheckCallback=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let p=!1,m=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");o.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=n.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>a())):e.addEventListener("change",(()=>a())))}))},t.checkContainers=r,t.checkDependencies=a,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((i=>{i.contains(e)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,i)=>{t.contains(document.getElementById(i))&&d.delete(i),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))}})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterForm=t.registerForm=t.registerField=t.hasForm=t.hasField=t.getForm=t.getField=t.getData=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const c=new Map,d=new Map;t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const i=e.getData();if(!(i instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(i)})),Promise.all(t).then((e=>e.reduce(((e,t)=>n.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof r.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const i=t.getId();if(s(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");c.get(e).set(i,t),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");o.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),a.unregister(e),o.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}})),define("WoltLabSuite/Core/Component/FormBuilder/Setup",["require","exports","tslib","../../Ajax/Backend","../../Dom/Util","../../Form/Builder/Manager"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderSetup=void 0,o=i.__importStar(o),r=i.__importStar(r);class a{async fromEndpoint(t){const a=await(0,n.prepareRequest)(t).get().fetchAsJson(),{dialogFactory:s}=await new Promise(((t,i)=>{e(["../Dialog"],t,i)})).then(i.__importStar),l=s().fromHtml(a.dialog).asPrompt();return new Promise((e=>{l.addEventListener("validate",(i=>{const s=r.getData(a.formId).then((async i=>{i instanceof Promise&&(i=await i);const s=await(0,n.prepareRequest)(t).post(i).fetchAsJson();return"dialog"in s?(r.unregisterForm(a.formId),o.setInnerHtml(l.content,s.dialog),!1):(l.addEventListener("primary",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!0,result:s.result})})),!0)}));i.detail.push(s)})),l.addEventListener("afterClose",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!1,result:void 0})})),l.show(a.title)}))}}t.FormBuilderSetup=a,t.default=a})),define("WoltLabSuite/Core/Component/Dialog/Setup",["require","exports","tslib","./Controls","../../Dom/Util","../FormBuilder/Setup"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogSetup=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r);class a{fromElement(e){e instanceof HTMLTemplateElement&&(e=e.content.cloneNode(!0));const t=document.createElement("woltlab-core-dialog");return t.content.append(e),e instanceof HTMLElement&&(e.hidden=!1),new n.default(t)}fromId(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find the element identified by '${e}'.`);return this.fromElement(t)}fromHtml(e){const t=o.createFragmentFromHtml(e);if(0===t.childElementCount&&""===t.textContent.trim())throw new TypeError("The provided HTML string was empty.");return this.fromElement(t)}usingFormBuilder(){return new r.default}withoutContent(){const e=document.createElement("woltlab-core-dialog");return new n.default(e)}}t.DialogSetup=a,t.default=a})),define("WoltLabSuite/Core/Helper/PageOverlay",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPageOverlayContainer=t.releasePageOverlayContainer=t.adoptPageOverlayContainer=void 0;const i=document.createElement("div");i.id="pageOverlayContainer";const n=[];t.adoptPageOverlayContainer=function(e){n.push(e),e.append(i)},t.releasePageOverlayContainer=function(e){if(!n.includes(e))throw new Error("Cannot release the page overlay from a container that (no longer) adopts it.",{cause:{element:e}});const t=n.indexOf(e);if(0===t)throw new Error("Cannot release the page overlay, there is no previous owner.",{cause:{element:e}});t!==n.length-1?n.splice(t,1):(n.pop(),n[n.length-1].append(i))},t.getPageOverlayContainer=function(){return i}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core"],(function(e,t,i,n){"use strict";function o(e){return r(e).mql.matches}function r(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");m.has(e)&&(e=m.get(e)),p.has(e)&&(e=p.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(a),s.set(e,t),e!==t.mql.media&&m.set(t.mql.media,e)),t}function a(e){const t=r(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()})),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setDialogContainer=t.pageOverlayIsActive=t.pageOverlayClose=t.pageOverlayOpen=t.scrollEnable=t.scrollDisable=t.is=t.remove=t.on=void 0,n=i.__importStar(n);const s=new Map;let l,c=0,d=0,u=0;const p=new Map(Object.entries({"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: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),m=new Map;t.on=function(e,t){const i=n.getUuid(),o=r(e);return"function"==typeof t.match&&o.callbacksMatch.set(i,t.match),"function"==typeof t.unmatch&&o.callbacksUnmatch.set(i,t.unmatch),"function"==typeof t.setup&&(o.mql.matches?t.setup():o.callbacksSetup.set(i,t.setup)),i},t.remove=function(e,t){const i=r(e);i.callbacksMatch.delete(t),i.callbacksUnmatch.delete(t),i.callbacksSetup.delete(t)},t.is=o,t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.removeProperty("position"),e.style.removeProperty("top")),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){}})),define("WoltLabSuite/Core/Element/woltlab-core-dialog",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Language","../Ui/Screen"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogElement=void 0,n=i.__importDefault(n),r=i.__importStar(r);const s=document.createElement("div");class l extends HTMLElement{#c;#e;#d;#u;constructor(){super(),this.#c=document.createElement("div"),this.#e=document.createElement("dialog"),this.#u=document.createElement("div")}show(e){if(0===e.trim().length)throw new Error("Cannot open the modal dialog without a title.");this.#u.textContent=e,this.open||(null===s.parentElement&&document.getElementById("content").append(s),this.parentElement!==s&&s.append(this),this.#e.showModal(),(0,o.adoptPageOverlayContainer)(this.#e),(0,a.scrollDisable)())}close(){this.#e.close(),this.#p()}#p(){if(null===this.parentNode)return;const e=new CustomEvent("afterClose");this.dispatchEvent(e),(0,o.releasePageOverlayContainer)(this.#e),(0,a.scrollEnable)(),this.remove()}get dialog(){return this.#e}get content(){return this.#c}get open(){return this.#e.open}get incomplete(){return this.hasAttribute("incomplete")}set incomplete(e){e?this.setAttribute("incomplete",""):this.removeAttribute("incomplete")}attachControls(e){if(void 0!==this.#d)throw new Error("There is already a form control attached to this dialog.");void 0!==e.extra&&void 0===e.cancel&&(e.cancel="");const t=document.createElement("woltlab-core-dialog-control");t.primary=e.primary,void 0!==e.cancel&&(t.cancel=e.cancel),void 0!==e.extra&&(t.extra=e.extra),this.#d=document.createElement("form"),this.#d.method="dialog",this.#d.classList.add("dialog__form"),this.#c.insertAdjacentElement("beforebegin",this.#d),this.#d.append(this.#c,t),e.isAlert&&(void 0===e.cancel?this.#e.setAttribute("role","alert"):this.#e.setAttribute("role","alertdialog")),this.#d.addEventListener("submit",(e=>{if(this.incomplete)return void e.preventDefault();const t=new CustomEvent("validate",{cancelable:!0,detail:[]});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():t.detail.length>0?(e.preventDefault(),this.incomplete=!0,Promise.all(t.detail).then((e=>{this.incomplete=!1,e.some((e=>!1===e))||(this.#m(),this.#h()&&this.close())}))):this.#h()||(e.preventDefault(),this.#m())})),this.#e.addEventListener("close",(()=>{""===this.#e.returnValue||this.#m(),this.#p()})),t.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this.#h()&&this.close()})),void 0!==e.extra&&t.addEventListener("extra",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)}))}#m(){const e=new CustomEvent("primary");this.dispatchEvent(e)}connectedCallback(){if(null!==this.#e.parentElement)return;let e;const t=this.#e.getAttribute("role");"alert"!==t&&"alertdialog"!==t&&(e=document.createElement("button"),e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialog__closeButton","jsTooltip"),e.title=r.get("wcf.dialog.button.close"),e.addEventListener("click",(()=>{if(this.#h()){const e=new CustomEvent("cancel",{cancelable:!1});this.dispatchEvent(e),this.close()}})));const i=document.createElement("div");i.classList.add("dialog__header"),this.#u.classList.add("dialog__title"),i.append(this.#u),e&&i.append(e);const o=document.createElement("div");o.classList.add("dialog__document"),o.setAttribute("role","document"),o.append(i),this.#c.classList.add("dialog__content"),this.#d?o.append(this.#d):o.append(this.#c),this.#e.append(o),this.#e.classList.add("dialog"),this.#e.setAttribute("aria-labelledby",n.default.identify(this.#u)),this.#e.addEventListener("cancel",(e=>{const t=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():this.#h()?this.#p():e.preventDefault()})),this.#e.addEventListener("mousedown",(e=>{if(e.target===this.#e){const e=new CustomEvent("backdrop",{cancelable:!0});if(this.dispatchEvent(e),e.defaultPrevented)return;this.#h()&&this.close()}})),this.append(this.#e)}#h(){const e=new CustomEvent("close",{cancelable:!0});return this.dispatchEvent(e),!1===e.defaultPrevented}}t.WoltlabCoreDialogElement=l,window.customElements.define("woltlab-core-dialog",l),t.default=l})),define("WoltLabSuite/Core/Element/woltlab-core-dialog-control",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogControlElement=void 0,n=i.__importStar(n);class o extends HTMLElement{#f;#g;#b;set primary(e){this.setAttribute("primary",e)}get primary(){let e=this.getAttribute("primary");return e||(e=n.get("wcf.dialog.button.primary")),e}set cancel(e){void 0===e?this.removeAttribute("cancel"):this.setAttribute("cancel",e)}get cancel(){let e=this.getAttribute("cancel");if(null!==e)return""===e&&(e=n.get("wcf.global.confirmation.cancel")),e}set extra(e){void 0===e?this.removeAttribute("extra"):this.setAttribute("extra",e)}get extra(){const e=this.getAttribute("extra");if(null!==e)return e}connectedCallback(){const e=this.closest("woltlab-core-dialog");this.classList.add("dialog__control"),this.hasAttribute("primary")||this.setAttribute("primary",""),void 0===this.#b&&(this.#b=document.createElement("button"),this.#b.type="submit",this.#b.value="primary",this.#b.autofocus=!0,this.#b.classList.add("button","buttonPrimary","dialog__control__button","dialog__control__button--primary"),this.#b.textContent=this.primary,this.append(this.#b),new MutationObserver((()=>{this.#b.disabled=e.incomplete})).observe(e,{attributeFilter:["incomplete"]}),e.incomplete&&(this.#b.disabled=!0)),void 0===this.#f&&void 0!==this.cancel&&(this.#f=document.createElement("button"),this.#f.type="button",this.#f.value="cancel",this.#f.classList.add("button","dialog__control__button","dialog__control__button--cancel"),this.#f.textContent=this.cancel,this.#f.addEventListener("click",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e)})),this.append(this.#f),e.addEventListener("backdrop",(e=>{e.preventDefault(),this.#f.click()}))),void 0===this.#g&&void 0!==this.extra&&(this.#g=document.createElement("button"),this.#g.type="button",this.#g.value="extra",this.#g.classList.add("button","dialog__control__button","dialog__control__button--extra"),this.#g.textContent=this.extra,this.#g.addEventListener("click",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)})),this.append(this.#g))}}t.WoltlabCoreDialogControlElement=o,window.customElements.define("woltlab-core-dialog-control",o),t.default=o})),define("WoltLabSuite/Core/Component/Dialog",["require","exports","./Dialog/Setup","../Element/woltlab-core-dialog","../Element/woltlab-core-dialog-control"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dialogFactory=void 0,t.dialogFactory=function(){return new i.DialogSetup}})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Language","../Component/Dialog","../StringUtil"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);let c=!1,d=!1;return class{_options;_data;_xhr;constructor(e){this._options=o.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),c||(c=!0,window.addEventListener("beforeunload",(()=>d=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||n.show(),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.responseType&&this._xhr.setRequestHeader("Accept",this._options.responseType),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=o.clone(this._options),i=this._xhr;if(i.onload=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200&&i.status<300||304===i.status?204===i.status?this._success(i,t):t.responseType&&this.getContentType(i)!==t.responseType?this._failure(i,t):this._success(i,t):this._failure(i,t))},i.onerror=()=>{this._failure(i,t)},this._options.progress&&(i.onprogress=this._options.progress),this._options.uploadProgress&&(i.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==o.getType(e)&&(e=o.serialize(e)),i.send(e)}else i.send()}abortPrevious(){void 0!==this._xhr&&(this._xhr.abort(),this._xhr=void 0,this._options.silent||n.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==o.getType(e)&&(e=o.extend(this._data,e)),this._options.data=e}_success(t,o){if(o.silent||n.hide(),"function"==typeof o.success){let n=null;if("application/json"===this.getContentType(t)){try{n=JSON.parse(t.responseText)}catch(e){return void this._failure(t,o)}n&&n.returnValues&&void 0!==n.returnValues.template&&(n.returnValues.template=n.returnValues.template.trim()),"yes"===t.getResponseHeader("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke()))}o.success(n||{},t.responseText,t,o.data)}this._finalize(t,o)}_failure(e,t){if(d)return;t.silent||n.hide();let i=null;try{i=JSON.parse(e.responseText)}catch(e){}let o=!0;if("function"==typeof t.failure&&(o=!1!==t.failure(i||{},e.responseText||"",e,t.data)),!0!==t.ignoreError&&o){const t=this.getErrorHtml(i,e);if(t instanceof HTMLIFrameElement){const e=(0,s.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(a.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else t&&(0,s.dialogFactory)().fromHtml(t).asAlert().show(a.get("wcf.global.error.title"))}this._finalize(e,t)}getErrorHtml(e,t){let i,n="";if(null!==e&&Object.keys(e).length>0)e.returnValues&&e.returnValues.description&&(n+=`<br><p>Description:</p><p>${e.returnValues.description}</p>`),e.file&&e.line&&(n+=`<br><p>File:</p><p>${e.file} in line ${e.line}</p>`),e.extraInformation&&(n+="<br>",n+=e.extraInformation.map((([e,t])=>`<p>${e}: <code>${t.toString()}</code></p>`)).join("")),e.exception?n+=`<br>Exception: <div style="white-space: pre;">${(0,l.escapeHTML)(e.exception)}</div>`:e.stacktrace?n+=`<br><p>Stacktrace:</p><pre>${e.stacktrace}</pre>`:e.exceptionID&&(n+=`<br><p>Exception ID: <code>${e.exceptionID}</code></p>`),i=e.message,e.previous&&e.previous.forEach((e=>{n+=`<hr><p>${e.message}</p>`,n+=`<br><p>Stacktrace</p><pre>${e.stacktrace}</pre>`}));else{if(t.getResponseHeader("content-type")?.startsWith("text/html")){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=t.responseText,e}i=t.responseText}if(!i||"undefined"===i){if(!window.ENABLE_DEBUG_MODE)return null;i="XMLHttpRequest failed without a responseText. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${i}</p>${n}</div>`}_finalize(e,t){"function"==typeof t.finalize&&t.finalize(e),this._xhr===e&&(this._xhr=void 0),r.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}getContentType(e){const t=e.getResponseHeader("content-type");return null===t?null:t.split(";",1)[0].trim()}}})),define("WoltLabSuite/Core/Ajax/DboAction",["require","exports","tslib","./Error","./Status","../Core"],(function(e,t,i,n,o,r){"use strict";async function a(e){const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new n.ExpectedJson(e);let i;try{i=await e.json()}catch(t){throw new n.InvalidJson(e)}return i}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.DboAction=void 0,o=i.__importStar(o),r=i.__importStar(r);class l{#v;#_;#w=[];#o={};#a=!0;#y;constructor(e,t){this.#v=e,this.#_=t}static prepare(e,t){return void 0===s&&(s=!1,window.addEventListener("beforeunload",(()=>{s=!0}))),new l(e,t)}getAbortController(){return void 0===this.#y&&(this.#y=new AbortController),this.#y}objectIds(e){return this.#w=e,this}payload(e){return this.#o=e,this}disableLoadingIndicator(){return this.#a=!1,this}async dispatch(){(0,n.registerGlobalRejectionHandler)();const t=window.WSC_API_URL+"index.php?ajax-proxy/&t="+r.getXsrfToken(),l={actionName:this.#v,className:this.#_};this.#w&&(l.objectIDs=this.#w),this.#o&&(l.parameters=this.#o);const c={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":r.getXsrfToken(),Accept:"application/json"},body:r.serialize(l),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error"};this.#y&&(c.signal=this.#y.signal);const d=this.#a;d&&o.show();try{const o=await fetch(t,c);if(!o.ok)throw new n.StatusNotOk(o);const r=await a(o);return"yes"===o.headers.get("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke())),r.returnValues}catch(e){if(e instanceof n.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new n.ConnectionError(e)}finally{d&&o.hide()}}}t.DboAction=l,t.default=l,t.handleValidationErrors=async function(e,t){if(!(e instanceof n.StatusNotOk))throw e;const i=e.response.clone();try{const e=await a(i);if(function(e){return"code"in e&&"returnValues"in e}(e)&&412===e.code&&!0===t(e.returnValues))return}catch{}throw e}})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request","./Core","./Ajax/DboAction","./Ajax/DboAction"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.dboAction=t.getRequestObject=t.apiOnce=t.api=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r);const s=new WeakMap;t.api=function(e,t,i,r){"object"!=typeof t&&(t={});let a=s.get(e);if(void 0===a){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),t.withCredentials=!0),a=new n.default(t),s.set(e,a)}let l=null,c=null;return"function"==typeof i&&(l=a.getOption("success"),a.setOption("success",i)),"function"==typeof r&&(c=a.getOption("failure"),a.setOption("failure",r)),a.setData(t),a.sendRequest(),null!==l&&a.setOption("success",l),null!==c&&a.setOption("failure",c),a},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),e.withCredentials=!0),new n.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!s.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return s.get(e)},t.dboAction=function(e,t){return r.default.prepare(e,t)},Object.defineProperty(t,"handleValidationErrors",{enumerable:!0,get:function(){return a.handleValidationErrors}})})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,n=i.__importStar(n);class o{_invocations=0;_isBusy=!1;_url;constructor(e){this._url=e}invoke(){this._isBusy||(this._isBusy=!0,n.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let r;t.setUrl=function(e){r||(r=new o(e))},t.invoke=function(){r?r.invoke():console.error("The background queue has not been initialized yet.")}})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,n=i.__importStar(n);const o=document.documentElement.lang,r=new Intl.DateTimeFormat(o,{dateStyle:"long"}),a=new Intl.DateTimeFormat(o,{hour:"numeric",minute:"numeric"}),s=new Intl.DateTimeFormat(o,{year:"numeric",day:"numeric",month:"long",hour:"numeric",minute:"numeric"});t.formatDate=function(e){return r.format(e)},t.formatTime=function(e){return a.format(e)},t.formatDateTime=function(e){return s.format(e)},t.format=function(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let i="";for(let o=0,r=t.length;o<r;o++){let a;switch(t[o]){case"s":a=e.getSeconds().toString().padStart(2,"0");break;case"i":a=e.getMinutes().toString().padStart(2,"0");break;case"a":a=e.getHours()>11?"pm":"am";break;case"g":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString(),a=a.padStart(2,"0");break}case"A":a=e.getHours()>11?"PM":"AM";break;case"G":a=e.getHours().toString();break;case"H":a=e.getHours().toString().padStart(2,"0");break;case"d":a=e.getDate().toString().padStart(2,"0");break;case"j":a=e.getDate().toString();break;case"l":a=n.get("__days")[e.getDay()];break;case"D":a=n.get("__daysShort")[e.getDay()];break;case"S":a="";break;case"m":a=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":a=(e.getMonth()+1).toString();break;case"F":a=n.get("__months")[e.getMonth()];break;case"M":a=n.get("__monthsShort")[e.getMonth()];break;case"y":a=e.getFullYear().toString().slice(-2);break;case"Y":a=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();a=t>0?"-":"+",t=Math.abs(t),a+=(~~(t/60)).toString().padStart(2,"0"),a+=":",a+=(t%60).toString().padStart(2,"0");break}case"r":a=e.toString();break;case"U":a=Math.round(e.getTime()/1e3).toString();break;case"\\":a="",o+1<r&&(a=t[++o]);break;default:a=t[o]}i+=a}return i},t.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)},t.getTimeElement=function(e){const t=document.createElement("woltlab-core-date-time");return t.date=e,e.getTime()>Date.now()&&(t.static=!0),t},t.getTimezoneDate=function(e,t){const i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const n=[];for(let o=0;o<e.childElementCount;o++)r.get(t)(e.children[o],i)&&n.push(e.children[o]);return n}function n(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");let o=e.parentNode;for(;o instanceof Element;){if(o===n)return null;if(r.get(t)(o,i))return o;o=o.parentNode}return null}function o(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&r.get(i)(e[t],n)?e[t]:null}Object.defineProperty(t,"__esModule",{value:!0}),t.prevByTag=t.prevByClass=t.prevBySel=t.prev=t.nextByTag=t.nextByClass=t.nextBySel=t.next=t.parentByTag=t.parentByClass=t.parentBySel=t.childrenByTag=t.childrenByClass=t.childrenBySel=t.childByTag=t.childByClass=t.childBySel=void 0;const r=new Map([[0,()=>!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]]);t.childBySel=function(e,t){return i(e,1,t)[0]||null},t.childByClass=function(e,t){return i(e,2,t)[0]||null},t.childByTag=function(e,t){return i(e,3,t)[0]||null},t.childrenBySel=function(e,t){return i(e,1,t)},t.childrenByClass=function(e,t){return i(e,2,t)},t.childrenByTag=function(e,t){return i(e,3,t)},t.parentBySel=function(e,t,i){return n(e,1,t,i)},t.parentByClass=function(e,t,i){return n(e,2,t,i)},t.parentByTag=function(e,t,i){return n(e,3,t,i)},t.next=function(e){return o(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return o(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return o(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return o(e,"nextElementSibling",3,t)},t.prev=function(e){return o(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return o(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return o(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return o(e,"previousElementSibling",3,t)}})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.touch=t.platform=t.browser=t.setup=void 0;let i="other",n="desktop",o=!1;t.setup=function(){if("object"==typeof window.chrome)i="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,n=e.length;t<n;t++){const n=e[t];0===n.indexOf("-ms-")?i="microsoft":0===n.indexOf("-moz-")?i="firefox":"firefox"!==i&&0===n.indexOf("-webkit-")&&(i="safari")}}const e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("crios")?(i="chrome",n="ios"):/(?:iphone|ipad|ipod)/.test(e)?(i="safari",n="ios"):-1!==e.indexOf("android")?n="android":-1!==e.indexOf("iemobile")&&(i="microsoft",n="windows"),"desktop"!==n||-1===e.indexOf("mobile")&&-1===e.indexOf("tablet")||(n="mobile"),o="ontouchstart"in window||"msMaxTouchPoints"in window.navigator&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(i="safari",n="ios")},t.browser=function(){return i},t.platform=function(){return n},t.touch=function(){return o}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language","../Environment"],(function(e,t,i,n,o,r,a,s){"use strict";function l(e,t,i,n,o,r,a){let s="auto",l="auto",c=!0,d=50;const u=document.getElementById("pageHeaderPanel");if(null!==u){const e=window.getComputedStyle(u).position;d="fixed"===e||"static"===e?u.offsetHeight:0}if(a)if("top"===e){const e=n.top-r;s=o-e,e-t.height<d&&(c=!1)}else l=n.top+i.height+r,l+t.height>o&&(c=!1);else{const a=n.top+window.scrollY;if("top"===e){const{clientHeight:e}=document.body;s=e-a+r,e-(s+t.height)<window.scrollY+d&&(c=!1)}else l=a+i.height+r,l+t.height-window.scrollY>o&&(c=!1)}return{align:e,bottom:s,top:l,result:c}}function c(e,t,i,n,o){let r="auto",a="auto",s=!0;return"left"===e?(r=n.left,r+t.width>o&&(s=!1)):"right"===e?n.left+i.width<t.width?s=!1:(a=o-(n.left+i.width),a<0&&(s=!1)):(r=n.left+i.width/2-t.width/2,r=~~r,(r<0||r+t.width>o)&&(s=!1)),{align:e,left:r,right:a,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s),t.set=function(e,t,i){let d;i=n.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},i||{}),Array.isArray(i.pointerClassNames)&&i.pointerClassNames.length===(i.pointer?1:2)||(i.pointerClassNames=[]),-1===["left","right","center"].indexOf(i.horizontal)&&(i.horizontal="left"),"bottom"!==i.vertical&&(i.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(i.allowFlip)&&(i.allowFlip="both"),"none"===window.getComputedStyle(e).display&&(d=e.style.getPropertyValue("display"),e.style.setProperty("display","block")),r.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const u=r.default.outerDimensions(e),p=r.default.outerDimensions(i.refDimensionsElement instanceof HTMLElement?i.refDimensionsElement:t),m=t.getBoundingClientRect(),h=window.innerHeight,f=document.body.clientWidth;let g=null,b=!1;if("center"===i.horizontal&&(b=!0,g=c(i.horizontal,u,p,m,f),g.result||("both"===i.allowFlip||"horizontal"===i.allowFlip?i.horizontal="left":g.result=!0)),"rtl"===a.get("wcf.global.pageDirection")&&(i.horizontal="left"===i.horizontal?"right":"left"),null===g||!g.result){const e=g;if(g=c(i.horizontal,u,p,m,f),!g.result&&("both"===i.allowFlip||"horizontal"===i.allowFlip)){const t=c("left"===i.horizontal?"right":"left",u,p,m,f);if(t.result)g=t;else if(b)g=e;else if(u.width===f)g={align:"left",left:0,result:!0,right:0};else if(u.width<f){const e=f-(m.left+p.width),t=m.left<=e;g={align:t?"left":"right",left:t?0:"auto",result:!0,right:t?"auto":0}}}}const v="fixed"===window.getComputedStyle(e).position,_=g.left,w=g.right;let y=l(i.vertical,u,p,m,h,i.verticalOffset,v);if(!y.result&&("both"===i.allowFlip||"vertical"===i.allowFlip)){const e=l("top"===i.vertical?"bottom":"top",u,p,m,h,i.verticalOffset,v);if(e.result)y=e;else if("desktop"!==s.platform())if(u.height===h)y={align:"top",bottom:0,result:!0,top:0};else if(u.height<h){const e=h-(m.top+p.height),t=m.top<=e;y={align:t?"top":"bottom",bottom:t?0:"auto",result:!0,top:t?"auto":0}}}const E=y.bottom,S=y.top;if(i.pointer){const t=o.childrenByClass(e,"elementPointer")[0]||null;if(null===t)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===g.align?(t.classList.add("center"),t.classList.remove("left","right")):(t.classList.add(g.align),t.classList.remove("center"),t.classList.remove("left"===g.align?"right":"left")),"top"===y.align?t.classList.add("flipVertical"):t.classList.remove("flipVertical")}else 2===i.pointerClassNames.length&&(e.classList["auto"===S?"add":"remove"](i.pointerClassNames[0]),e.classList["auto"===_?"add":"remove"](i.pointerClassNames[1]));r.default.setStyles(e,{bottom:"auto"===E?E:Math.round(E).toString()+"px",left:"auto"===_?_:Math.ceil(_).toString()+"px",right:"auto"===w?w:Math.floor(w).toString()+"px",top:"auto"===S?S:Math.round(S).toString()+"px"}),r.default.show(e),e.style.removeProperty("visibility"),void 0!==d&&(""===d?e.style.removeProperty("display"):e.style.setProperty("display",d))}})),define("WoltLabSuite/Core/Ui/CloseOverlay",["require","exports","tslib","../CallbackList"],(function(e,t,i,n){"use strict";function o(e,t){s.add(e,t),c||(document.body.addEventListener("click",(()=>{a(l.Document)})),c=!0)}function r(e){s.remove(e)}function a(e,t){s.forEach(null,(i=>i(e,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.remove=t.add=t.Origin=void 0;const s=new((n=i.__importDefault(n)).default);var l;!function(e){e.Document="document",e.DropDown="dropdown",e.Search="search"}(l||(t.Origin=l={}));let c=!1;t.add=o,t.remove=r,t.execute=a;const d={add:o,remove:r,execute:a};t.default=d})),function(e,t){var i,n;"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("tabbable",["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,i=e.tabbable,t(n=e.tabbable={}),n.noConflict=function(){return e.tabbable=i,n})}(this,(function(e){"use strict";var t=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],i=t.join(","),n="undefined"==typeof Element,o=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!n&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},a=function e(t,i){var n,o;return void 0===i&&(i=!0),""===(o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert"))||"true"===o||i&&t&&e(t.parentNode)},s=function(e,t,n){if(a(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(i));return t&&o.call(e,i)&&r.unshift(e),r.filter(n)},l=function e(t,n,r){var s,l,c,d,u,p,m,h;for(s=[],l=Array.from(t);l.length;)c=l.shift(),a(c,!1)||("SLOT"===c.tagName?(u=e((d=c.assignedElements()).length?d:c.children,!0,r),r.flatten?s.push.apply(s,u):s.push({scopeParent:c,candidates:u})):(o.call(c,i)&&r.filter(c)&&(n||!t.includes(c))&&s.push(c),p=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),m=!a(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c)),p&&m?(h=e(!0===p?c.children:p.children,!0,r),r.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})):l.unshift.apply(l,c.children)));return s},c=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},d=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,i=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===i||"true"===i}(e))&&!c(e)?0:e.tabIndex},u=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return"INPUT"===e.tagName},m=function(e){var t=e.getBoundingClientRect(),i=t.width,n=t.height;return 0===i&&0===n},h=function(e,t){return!(t.disabled||a(t)||function(e){return p(e)&&"hidden"===e.type}(t)||function(e,t){var i,n,a,s,l=t.displayCheck,c=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;if(i=o.call(e,"details>summary:first-of-type")?e.parentElement:e,o.call(i,"details:not([open]) *"))return!0;if(l&&"full"!==l&&"legacy-full"!==l){if("non-zero-area"===l)return m(e)}else{if("function"==typeof c){for(n=e;e;){if(a=e.parentElement,s=r(e),a&&!a.shadowRoot&&!0===c(a))return m(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=n}if(function(e){var t,i,n,o,a,s,l,c=e&&r(e),d=null===(t=c)||void 0===t?void 0:t.host,u=!1;if(c&&c!==e)for(u=!!(null!==(i=d)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(d)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&d;)u=!(null===(s=d=null===(a=c=r(d))||void 0===a?void 0:a.host)||void 0===s||null===(l=s.ownerDocument)||void 0===l||!l.contains(d));return u}(e))return!e.getClientRects().length;if("legacy-full"!==l)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){var t,i,n;if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(i=0;i<t.children.length;i++)if("LEGEND"===(n=t.children.item(i)).tagName)return!!o.call(t,"fieldset[disabled] *")||!n.contains(e);return!0}t=t.parentElement}return!1}(t))},f=function(e,t){return!(function(e){return function(e){return p(e)&&"radio"===e.type}(e)&&!function(e){var t,i,n,o;if(!e.name)return!0;if(i=e.form||r(e),n=function(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')},"undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}return o=function(e,t){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===t)return e[i]}(t,e.form),!o||o===e}(e)}(t)||d(t)<0||!h(e,t))},g=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},b=function e(t){var i=[],n=[];return t.forEach((function(t,o){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var i=d(e);return i<0&&t&&!c(e)?0:i}(a,r),l=r?e(t.candidates):a;0===s?r?i.push.apply(i,l):i.push(a):n.push({documentOrder:o,tabIndex:s,item:t,isScope:r,content:l})})),n.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(i)},v=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,h.bind(null,t))},e.getTabIndex=d,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,v)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,i)&&f(t,e)},e.tabbable=function(e,t){var i;return i=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:f.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):s(e,t.includeContainer,f.bind(null,t)),b(i)},Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){var i,n;"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define("focus-trap",["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,i=e.focusTrap,t(n=e.focusTrap={},e.tabbable),n.noConflict=function(){return e.focusTrap=i,n})}(this,(function(e,t){"use strict";function i(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)),n}function n(e){var t,n;for(t=1;t<arguments.length;t++)n=null!=arguments[t]?arguments[t]:{},t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}));return e}function o(e,t,i){return(t=function(e){var t=function(e,t){var i,n;if("object"!=typeof e||null===e)return e;if(void 0!==(i=e[Symbol.toPrimitive])){if("object"!=typeof(n=i.call(e,"string")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},a=function(e){return r(e)&&!e.shiftKey},s=function(e){return r(e)&&e.shiftKey},l=function(e){return setTimeout(e,0)},c=function(e,t){var i=-1;return e.every((function(e,n){return!t(e)||(i=n,!1)})),i},d=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return"function"==typeof e?e.apply(void 0,i):e},u=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},p=[];e.createFocusTrap=function(e,i){var o,m=(null==i?void 0:i.document)||document,h=(null==i?void 0:i.trapStack)||p,f=n({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:a,isKeyBackward:s},i),g={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b=function(e,t,i){return e&&void 0!==e[t]?e[t]:f[i||t]},v=function(e,t){var i="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return g.containerGroups.findIndex((function(t){var n=t.container,o=t.tabbableNodes;return n.contains(e)||(null==i?void 0:i.includes(n))||o.find((function(t){return t===e}))}))},_=function(e){var t,i,n,o,r=f[e];if("function"==typeof r){for(t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];r=r.apply(void 0,i)}if(!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}if(o=r,"string"==typeof r&&!(o=m.querySelector(r)))throw new Error("`".concat(e,"` as selector refers to no known node"));return o},w=function(){var e,i=_("initialFocus");if(!1===i)return!1;if(void 0!==i&&t.isFocusable(i,f.tabbableOptions)||(i=v(m.activeElement)>=0?m.activeElement:(e=g.tabbableGroups[0])&&e.firstTabbableNode||_("fallbackFocus")),!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},y=function(){if(g.containerGroups=g.containers.map((function(e){var i=t.tabbable(e,f.tabbableOptions),n=t.focusable(e,f.tabbableOptions),o=i.length>0?i[0]:void 0,r=i.length>0?i[i.length-1]:void 0,a=n.find((function(e){return t.isTabbable(e)})),s=n.slice().reverse().find((function(e){return t.isTabbable(e)})),l=!!i.find((function(e){return t.getTabIndex(e)>0}));return{container:e,tabbableNodes:i,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:o,lastTabbableNode:r,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=i.indexOf(e);return r<0?o?n.slice(n.indexOf(e)+1).find((function(e){return t.isTabbable(e)})):n.slice(0,n.indexOf(e)).reverse().find((function(e){return t.isTabbable(e)})):i[r+(o?1:-1)]}}})),g.tabbableGroups=g.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),g.tabbableGroups.length<=0&&!_("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(g.containerGroups.find((function(e){return e.posTabIndexesFound}))&&g.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},E=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!f.preventScroll}),g.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(w()))},S=function(e){var t=_("setReturnFocus",e);return t||!1!==t&&e},C=function(e){var i,n,o,a,s,l,d,p,m,h=e.target,b=e.event,w=e.isBackward,E=void 0!==w&&w;return h=h||u(b),y(),i=null,g.tabbableGroups.length>0?(o=(n=v(h,b))>=0?g.containerGroups[n]:void 0,n<0?i=E?g.tabbableGroups[g.tabbableGroups.length-1].lastTabbableNode:g.tabbableGroups[0].firstTabbableNode:E?(a=c(g.tabbableGroups,(function(e){var t=e.firstTabbableNode;return h===t})),a<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h,!1))&&(a=n),a>=0?(s=0===a?g.tabbableGroups.length-1:a-1,l=g.tabbableGroups[s],i=t.getTabIndex(h)>=0?l.lastTabbableNode:l.lastDomTabbableNode):r(b)||(i=o.nextTabbableNode(h,!1))):(d=c(g.tabbableGroups,(function(e){var t=e.lastTabbableNode;return h===t})),d<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h))&&(d=n),d>=0?(p=d===g.tabbableGroups.length-1?0:d+1,m=g.tabbableGroups[p],i=t.getTabIndex(h)>=0?m.firstTabbableNode:m.firstDomTabbableNode):r(b)||(i=o.nextTabbableNode(h)))):i=_("fallbackFocus"),i},L=function(e){var t=u(e);v(t,e)>=0||(d(f.clickOutsideDeactivates,e)?o.deactivate({returnFocus:f.returnFocusOnDeactivate}):d(f.allowOutsideClick,e)||e.preventDefault())},k=function(e){var i,n,o,r,a,s=u(e),l=v(s,e)>=0;l||s instanceof Document?l&&(g.mostRecentlyFocusedNode=s):(e.stopImmediatePropagation(),n=!0,g.mostRecentlyFocusedNode?t.getTabIndex(g.mostRecentlyFocusedNode)>0?(o=v(g.mostRecentlyFocusedNode),(r=g.containerGroups[o].tabbableNodes).length>0&&(a=r.findIndex((function(e){return e===g.mostRecentlyFocusedNode})),a>=0&&(f.isKeyForward(g.recentNavEvent)?a+1<r.length&&(i=r[a+1],n=!1):a-1>=0&&(i=r[a-1],n=!1)))):g.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return t.getTabIndex(e)>0}))}))||(n=!1):n=!1,n&&(i=C({target:g.mostRecentlyFocusedNode,isBackward:f.isKeyBackward(g.recentNavEvent)})),E(i||g.mostRecentlyFocusedNode||w())),g.recentNavEvent=void 0},x=function(e){if(("Escape"===(null==(t=e)?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode))&&!1!==d(f.escapeDeactivates,e))return e.preventDefault(),void o.deactivate();var t;(f.isKeyForward(e)||f.isKeyBackward(e))&&function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.recentNavEvent=e,(t=C({event:e,isBackward:i}))&&(r(e)&&e.preventDefault(),E(t))}(e,f.isKeyBackward(e))},I=function(e){var t=u(e);v(t,e)>=0||d(f.clickOutsideDeactivates,e)||d(f.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},M=function(){if(g.active)return function(e,t){var i,n;e.length>0&&(i=e[e.length-1])!==t&&i.pause(),-1===(n=e.indexOf(t))||e.splice(n,1),e.push(t)}(h,o),g.delayInitialFocusTimer=f.delayInitialFocus?l((function(){E(w())})):E(w()),m.addEventListener("focusin",k,!0),m.addEventListener("mousedown",L,{capture:!0,passive:!1}),m.addEventListener("touchstart",L,{capture:!0,passive:!1}),m.addEventListener("click",I,{capture:!0,passive:!1}),m.addEventListener("keydown",x,{capture:!0,passive:!1}),o},T=function(){if(g.active)return m.removeEventListener("focusin",k,!0),m.removeEventListener("mousedown",L,!0),m.removeEventListener("touchstart",L,!0),m.removeEventListener("click",I,!0),m.removeEventListener("keydown",x,!0),o},D="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===g.mostRecentlyFocusedNode}))}))&&E(w())})):void 0,A=function(){D&&(D.disconnect(),g.active&&!g.paused&&g.containers.map((function(e){D.observe(e,{subtree:!0,childList:!0})})))};return(o={get active(){return g.active},get paused(){return g.paused},activate:function(e){var t,i,n,o;return g.active?this:(t=b(e,"onActivate"),i=b(e,"onPostActivate"),(n=b(e,"checkCanFocusTrap"))||y(),g.active=!0,g.paused=!1,g.nodeFocusedBeforeActivation=m.activeElement,null==t||t(),o=function(){n&&y(),M(),A(),null==i||i()},n?(n(g.containers.concat()).then(o,o),this):(o(),this))},deactivate:function(e){var t,i,r,a,s,c;return g.active?(t=n({onDeactivate:f.onDeactivate,onPostDeactivate:f.onPostDeactivate,checkCanReturnFocus:f.checkCanReturnFocus},e),clearTimeout(g.delayInitialFocusTimer),g.delayInitialFocusTimer=void 0,T(),g.active=!1,g.paused=!1,A(),function(e,t){var i=e.indexOf(t);-1!==i&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}(h,o),i=b(t,"onDeactivate"),r=b(t,"onPostDeactivate"),a=b(t,"checkCanReturnFocus"),s=b(t,"returnFocus","returnFocusOnDeactivate"),null==i||i(),c=function(){l((function(){s&&E(S(g.nodeFocusedBeforeActivation)),null==r||r()}))},s&&a?(a(S(g.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)):this},pause:function(e){if(g.paused||!g.active)return this;var t=b(e,"onPause"),i=b(e,"onPostPause");return g.paused=!0,null==t||t(),T(),A(),null==i||i(),this},unpause:function(e){if(!g.paused||!g.active)return this;var t=b(e,"onUnpause"),i=b(e,"onPostUnpause");return g.paused=!1,null==t||t(),y(),M(),A(),null==i||i(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return g.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),g.active&&y(),A(),this}}).updateContainerElements(e),o},Object.defineProperty(e,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Helper/Selector",["require","exports"],(function(e,t){"use strict";function i(e){for(const[t,i]of a.entries()){e.matches(t)&&n(e,i);const o=e.querySelectorAll(t);for(const e of o)n(e,i)}}function n(e,t){for(const i of t)i(e)}function o(e,t){a.has(e)||a.set(e,[]),a.get(e).push(t),i(document.body),void 0===r&&(r=new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&i(e)})),r.observe(document,{subtree:!0,childList:!0}))}let r;Object.defineProperty(t,"__esModule",{value:!0}),t.wheneverFirstSeen=t.wheneverSeen=void 0;const a=new Map;t.wheneverSeen=o,t.wheneverFirstSeen=function(e,t){const i=new WeakSet;o(e,(e=>{i.has(e)||(i.add(e),t(e))}))}})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util","../Helper/PageOverlay","focus-trap","../Helper/Selector"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";function m(e,t,i){const n=i?"minDate":"maxDate";let o=(e.dataset[n]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(o))o=new Date(o).getTime().toString();else if("now"===o)o=t.getTime().toString();else if(/^\d{1,3}$/.exec(o)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~o*(i?-1:1)),o=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(o)){if(o=RegExp.$1,null===document.getElementById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}-\d{2}-\d{2}T/.test(o)?new Date(o).getTime().toString():new Date(i?1902:2038,0,1).getTime().toString();e.dataset[n]=o}function h(e){let t=D.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function f(e){e.stopPropagation(),function(){if(null!==U)return;U=document.createElement("div"),U.className="datePicker",U.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");U.appendChild(e),N=document.createElement("button"),N.type="button",N.className="previous jsTooltip",N.title=a.get("wcf.date.datePicker.previousMonth"),N.setAttribute("aria-label",a.get("wcf.date.datePicker.previousMonth")),N.innerHTML='<fa-icon name="arrow-left" solid></fa-icon>',N.addEventListener("click",(()=>W.previousMonth())),e.appendChild(N);const t=document.createElement("span");e.appendChild(t),O=document.createElement("select"),O.className="month jsTooltip",O.title=a.get("wcf.date.datePicker.month"),O.setAttribute("aria-label",a.get("wcf.date.datePicker.month")),O.addEventListener("change",w),t.appendChild(O);let i="";const n=new Intl.DateTimeFormat(document.documentElement.lang,{month:"long"});for(let e=0;e<12;e++)i+=`<option value="${e}">${n.format(new Date(2e3,e,15))}</option>`;O.innerHTML=i,R=document.createElement("select"),R.className="year jsTooltip",R.title=a.get("wcf.date.datePicker.year"),R.setAttribute("aria-label",a.get("wcf.date.datePicker.year")),R.addEventListener("change",y),t.appendChild(R),B=document.createElement("button"),B.type="button",B.className="next jsTooltip",B.title=a.get("wcf.date.datePicker.nextMonth"),B.setAttribute("aria-label",a.get("wcf.date.datePicker.nextMonth")),B.innerHTML='<fa-icon name="arrow-right" solid></fa-icon>',B.addEventListener("click",(()=>W.nextMonth())),e.appendChild(B),P=document.createElement("ul"),U.appendChild(P);const o=document.createElement("li");o.className="weekdays",P.appendChild(o);const r=new Intl.DateTimeFormat(document.documentElement.lang,{weekday:"short"}),s=new Date,l=s.getDay()-x;for(let e=0;e<7;e++){const t=e-l,i=new Date((new Date).setDate(s.getDate()+t)),n=document.createElement("span");n.textContent=r.format(i),o.appendChild(n)}for(let e=0;e<6;e++){const e=document.createElement("li");P.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",E),A.push(t),e.appendChild(t)}}F=document.createElement("footer"),U.appendChild(F),j=document.createElement("select"),j.className="hour",j.title=a.get("wcf.date.datePicker.hour"),j.setAttribute("aria-label",a.get("wcf.date.datePicker.hour")),j.addEventListener("change",_);const c=new Date(2e3,0,1),p=new Intl.DateTimeFormat(document.documentElement.lang,{hour:"numeric"});let m="";for(let e=0;e<24;e++){c.setHours(e);let t=p.formatToParts(c);const i=t.some((e=>"dayPeriod"===e.type));2!==t.length||i||(t=t.filter((e=>"literal"!==e.type))),m+=`<option value="${e}">${t.map((e=>e.value)).join("")}</option>`}j.innerHTML=m,F.appendChild(j),F.appendChild(document.createTextNode(" : ")),q=document.createElement("select"),q.className="minute",q.title=a.get("wcf.date.datePicker.minute"),q.setAttribute("aria-label",a.get("wcf.date.datePicker.minute")),q.addEventListener("change",_),m="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;m+=`<option value="${e}">${t}</option>`}q.innerHTML=m,F.appendChild(q),(0,d.getPageOverlayContainer)().appendChild(U),C=(0,u.createFocusTrap)(U,{allowOutsideClick:!0,escapeDeactivates:()=>(g(),!1)})}();const t=e.currentTarget,i="INPUT"===t.nodeName?t:t.previousElementSibling;if(i===D)return void g();const o=i.closest(".dialogContent");null!==o&&(n.stringToBool(o.dataset.hasDatepickerScrollListener||"")||(o.addEventListener("scroll",b),o.dataset.hasDatepickerScrollListener="1")),D=i;const r=I.get(D),l=D.dataset.value;let c;l?(c=new Date(parseInt(l,10)),"Invalid Date"===c.toString()&&(c=new Date)):c=new Date,T=h("minDate"),T.getTime()>c.getTime()&&(c=T),M=h("maxDate"),D.dataset.maxDate&&M.getTime()<c.getTime()&&(c=M),r.isDateTime?(j.value=c.getHours().toString(),q.value=c.getMinutes().toString(),U.classList.add("datePickerTime")):U.classList.remove("datePickerTime"),U.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),function(e,t,i){v(e,t,i);let n="";for(let e=T.getFullYear(),t=M.getFullYear();e<=t;e++)n+=`<option value="${e}">${e}</option>`;R.innerHTML=n,R.value=i.toString(),O.value=t.toString(),U.classList.add("active")}(c.getDate(),c.getMonth(),c.getFullYear()),L=()=>{s.set(U,D)},L(),window.addEventListener("scroll",L,{passive:!1}),D.nextElementSibling.setAttribute("aria-expanded","true"),C.activate()}function g(){if(null===U||!U.classList.contains("active"))return;U.classList.remove("active");const e=I.get(D);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:D}),void 0!==L&&(window.removeEventListener("scroll",L),L=void 0),D.nextElementSibling.setAttribute("aria-expanded","false"),D=null,C.deactivate()}function b(e){if(null===D)return;const t=e.currentTarget,i=c.default.offset(D),n=c.default.offset(t);i.top+D.clientHeight<=n.top||i.top>=n.top+t.offsetHeight||i.left<=n.left||i.left>=n.left+t.offsetWidth?g():s.set(U,D)}function v(e,t,i){const n=void 0!==e,r=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||P.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof i&&(i=parseInt(i||"0",10)),r||i){let a=0!==i;const s=document.createDocumentFragment();s.appendChild(P),r||(t=parseInt(P.dataset.month,10)),i||(i=parseInt(P.dataset.year,10));let l=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(l<T?(i=T.getFullYear(),t=T.getMonth(),e=T.getDate(),O.value=t.toString(),R.value=i.toString(),a=!0):l>M&&(i=M.getFullYear(),t=M.getMonth(),e=M.getDate(),O.value=t.toString(),R.value=i.toString(),a=!0),l=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");l.getDay()!==x;)l.setDate(l.getDate()-1);c.default.show(A[35].parentNode);const d=new Date(T.getFullYear(),T.getMonth(),T.getDate());for(let e=0;e<42;e++){if(35===e&&l.getMonth()!==t){c.default.hide(A[35].parentNode);break}const i=A[e];i.textContent=l.getDate().toString();const n=l.getMonth()===t;n?i.classList.remove("otherMonth"):i.classList.add("otherMonth");let r=!0;(l<d||l>M)&&(r=!1),r?i.classList.remove("disabled"):i.classList.add("disabled"),n&&r&&(i.href="#",i.setAttribute("role","button"),i.tabIndex=0,i.title=o.formatDate(l),i.setAttribute("aria-label",o.formatDate(l))),l.setDate(l.getDate()+1)}if(P.dataset.month=t.toString(),P.dataset.year=i.toString(),U.insertBefore(s,F),!n&&(l=new Date(i,t,e),l.getDate()!==e)){for(;l.getMonth()!==t;)l.setDate(l.getDate()-1);e=l.getDate()}if(a){for(let e=0;e<12;e++){const t=O.children[e];t.disabled=i===T.getFullYear()&&+t.value<T.getMonth()||i===M.getFullYear()&&+t.value>M.getMonth()}const e=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),B.classList[e<M?"add":"remove"]("active");const n=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");n.setDate(n.getDate()-1),N.classList[n>T?"add":"remove"]("active")}}if(e){for(let t=0;t<37;t++){const i=A[t];let n=+i.textContent===e;(i.classList.contains("otherMonth")||i.classList.contains("disabled"))&&(n=!1),n?i.classList.add("active"):i.classList.remove("active")}P.dataset.day=e.toString()}_()}function _(){const e=I.get(D);let t;n.stringToBool(D.dataset.empty||"")||(t=e.isDateTime?new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day,+j.value,+q.value):new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day),W.setDate(D,t))}function w(e){v(void 0,+e.currentTarget.value)}function y(e){v(void 0,void 0,+e.currentTarget.value)}function E(e){e.preventDefault();const t=e.currentTarget;t.classList.contains("otherMonth")||t.classList.contains("disabled")||(D.dataset.empty="false",v(+t.textContent),I.get(D).isDateTime||g())}function S(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&I.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importDefault(c);let C,L,k=!1,x=0;const I=new Map;let M,T,D=null;const A=[];let P,j,q,O,B,N,F,R,U=null;const W={init(){k||(k=!0,x=parseInt(a.get("wcf.date.firstDayOfTheWeek"),10),(0,p.wheneverSeen)('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)',(e=>{const t=new Date;e.classList.add("inputDatePicker"),e.readOnly=!0;const i="datetime"===e.getAttribute("type"),r=i&&n.stringToBool(e.dataset.timeOnly||""),s=n.stringToBool(e.dataset.disableClear||""),l=i&&n.stringToBool(e.dataset.ignoreTimezone||""),c=e.classList.contains("birthday");e.dataset.isDateTime=i?"true":"false",e.dataset.isTimeOnly=r?"true":"false";let d=null,u=e.value;u||(u=e.getAttribute("value")||"");const p=/^\d+-\d+-\d+$/.test(u);if(u){if(r){d=new Date;const e=u.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||p){let e=new Date(u).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const i=Math.floor(e/60).toString(),n=(e%60).toString();t+=2===i.length?i:"0"+i,t+=":",t+=2===n.length?n:"0"+n,c||p?u+="T00:00:00"+t:u=u.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(u)}const t=d.getTime();isNaN(t)?u="":(e.dataset.value=t.toString(),u=r?o.formatTime(d):i?o.formatDateTime(d):o.formatDate(d))}const h=0===u.length;if(c?(e.dataset.minDate="120",e.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(e.min&&(e.dataset.minDate=e.min),e.max&&(e.dataset.maxDate=e.max)),m(e,t,!0),m(e,t,!1),(e.dataset.minDate||"")===(e.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+e.id+"').");e.type="text",e.value=u,e.dataset.empty=h?"true":"false";const g=e.dataset.placeholder||"";g&&(e.placeholder=g);const b=document.createElement("input");b.id=e.id+"DatePicker",b.name=e.name,b.type="hidden",null!==d&&(b.value=r?o.format(d,"H:i"):l?o.format(d,"Y-m-dTH:i:s"):o.format(d,i?"c":"Y-m-d")),e.parentNode.insertBefore(b,e),e.removeAttribute("name"),e.addEventListener("click",f);const v=document.createElement("div");v.className="inputAddon inputAddonDatePicker";const _=document.createElement("button");_.type="button",_.className="inputSuffix button jsTooltip",_.title=r?a.getPhrase("wcf.date.datePicker.time"):a.getPhrase("wcf.date.datePicker"),_.setAttribute("aria-haspopup","true"),_.setAttribute("aria-expanded","false"),_.addEventListener("click",(t=>{e.disabled||f(t)})),v.appendChild(_);let w=document.createElement("fa-icon");r?w.setIcon("clock"):w.setIcon("calendar"),_.appendChild(w),e.parentNode.insertBefore(v,e),v.insertBefore(e,_);let y=null;s||(y=document.createElement("button"),y.type="button",y.className="inputSuffix button jsTooltip",y.title=r?a.getPhrase("wcf.date.datePicker.time.clear"):a.getPhrase("wcf.date.datePicker.clear"),y.addEventListener("click",(()=>{e.disabled||W.clear(e)})),h&&(y.hidden=!0),v.appendChild(y),w=document.createElement("fa-icon"),w.setIcon("xmark"),y.appendChild(w));const E=["tiny","short","medium","long"];let S=!1;for(let t=0;t<4;t++)e.classList.contains(E[t])&&(S=!0);S||e.classList.add("short"),new MutationObserver((()=>{e.disabled?(_.classList.add("disabled"),y?.classList.add("disabled")):(_.classList.remove("disabled"),y?.classList.remove("disabled"))})).observe(e,{attributeFilter:["disabled"]}),e.disabled&&(_.classList.add("disabled"),y?.classList.add("disabled")),I.set(e,{clearButton:y,shadow:b,disableClear:s,isDateTime:i,isEmpty:h,isTimeOnly:r,ignoreTimezone:l,onClose:null})})),l.default.add("WoltLabSuite/Core/Date/Picker",(()=>g())))},previousMonth(){"0"===O.value?(O.value="11",R.value=(+R.value-1).toString()):O.value=(+O.value-1).toString(),v(void 0,+O.value,+R.value)},nextMonth(){"11"===O.value?(O.value="0",R.value=(+R.value+1).toString()):O.value=(+O.value+1).toString(),v(void 0,+O.value,+R.value)},getDate(e){const t=(e=S(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=S(e);const i=I.get(e);e.dataset.value=t.getTime().toString();let n,r="";i.isDateTime?i.isTimeOnly?(n=o.formatTime(t),r="H:i"):i.ignoreTimezone?(n=o.formatDateTime(t),r="Y-m-dTH:i:s"):(n=o.formatDateTime(t),r="c"):(n=o.formatDate(t),r="Y-m-d"),e.value=n,i.shadow.value=o.format(t,r),i.disableClear||(i.clearButton.hidden=!1)},getValue(e){e=S(e);const t=I.get(e);return t?t.shadow.value:""},clear(e){e=S(e);const t=I.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||(t.clearButton.hidden=!0),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=S(e);const t=I.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),i.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",f),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,I.delete(e)},setCloseCallback(e,t){e=S(e),I.get(e).onClose=t}};return window.__wcf_bc_datePicker=W,W})),define("WoltLabSuite/Core/Form/XsrfToken",["require","exports","../Core","../Helper/Selector"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=(0,i.getXsrfToken)();(0,n.wheneverFirstSeen)(".xsrfTokenInput",(t=>{(function(e){return"INPUT"===e.nodeName})(t)&&(t.value=e,t.classList.add("xsrfTokenInputHandled"))}))}})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./CloseOverlay","focus-trap","../Helper/PageOverlay"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);let m,h=null;const f=new Map;let g=!1;const b=new WeakMap,v=new Map;let _;const w=["onBeforeClose","onClose","onShow"],y=["number","password","search","tel","text","url"],E={setup(){m=document.createElement("div"),m.classList.add("dialogOverlay"),m.setAttribute("aria-hidden","true"),m.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),m.addEventListener("wheel",(e=>{e.target===m&&e.preventDefault()}),{passive:!1});let e=!1;new MutationObserver((()=>{"true"===m.getAttribute("aria-hidden")?((0,p.releasePageOverlayContainer)(m),e=!1):e||((0,p.adoptPageOverlayContainer)(m),e=!0)})).observe(m,{attributes:!0,attributeFilter:["aria-hidden"]}),document.getElementById("content").appendChild(m),_=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName){const e=f.get(h);return!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!1))}}return!0},r.on("screen-xs",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),this._initStaticDialogs(),o.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{f.forEach((e=>{n.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const i=document.getElementById(t);null!==i&&(i.classList.remove("jsStaticDialogContent"),i.dataset.isStaticDialog="true",a.default.hide(i),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(i.id,null,{title:i.dataset.title||""})})))}}))},open(t,o){let r=b.get(t);if(r&&n.isPlainObject(r))return this.openStatic(r.id,void 0===o?null:o);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!n.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(r={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),a.default.show(c)}else if(null===s.source)s.source=o;else if("function"==typeof s.source)s.source();else if(n.isPlainObject(s.source)){if("string"!=typeof o||""===o.trim())return new Promise(((t,i)=>{e(["../Ajax"],t,i)})).then(i.__importStar).then((e=>{const i=s.source;e.api(this,i.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof i.after&&i.after(f.get(l).content,e))}))})),{};s.source=o}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,a.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return b.set(t,r),v.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,o,a){this.isOpen(t)||r.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||r.scrollDisable()),f.has(t)?this._updateDialog(t,o):((a=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},a||{})).closable||(a.backdropCloseOnClick=!1),a.closeConfirmMessage&&(a.onBeforeClose=t=>{new Promise(((t,i)=>{e(["./Confirmation"],t,i)})).then(i.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:a.closeConfirmMessage||""})}))}),this._createDialog(t,o,a));const c=f.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{c.content.querySelector("input, textarea")?.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const i=f.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const n=i.dialog.querySelector(".dialogTitle");n&&(n.textContent=t)},setCallback(e,t,i){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const n=f.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof i&&null!==i)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof i+"' given).");n[t]=i},removeCallback(e,t){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const i=f.get(e);if(void 0===i)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");i[t]=void 0},_createDialog(e,t,i){let n=null;if(null===t&&(n=document.getElementById(e),null===n))throw new Error("Expected either a HTML string or an existing element id.");const o=document.createElement("div");o.classList.add("dialogContainer"),o.setAttribute("aria-hidden","true"),o.setAttribute("role","dialog"),o.dataset.id=e;const r=document.createElement("header");o.appendChild(r);const s=a.default.getUniqueId();o.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,l.id=s,r.appendChild(l),i.closable){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialogCloseButton","jsTooltip"),e.title=i.closeButtonLabel,e.setAttribute("aria-label",i.closeButtonLabel),e.addEventListener("click",(()=>this._close())),r.appendChild(e)}new ResizeObserver((()=>{if("false"===o.getAttribute("aria-hidden")){const e=Math.floor(o.getBoundingClientRect().width/2);o.style.setProperty("--translate-x",`-${e}px`)}})).observe(o);const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),i.disableContentPadding&&c.classList.add("dialogContentNoPadding"),o.appendChild(c),c.addEventListener("wheel",(e=>{let t,i,n,o=!1,r=e.target;for(;;){if(t=r.clientHeight,i=r.scrollHeight,t<i){if(n=r.scrollTop,e.deltaY<0&&n>0){o=!0;break}if(e.deltaY>0&&n+t<i){o=!0;break}}if(!r||r===c)break;r=r.parentNode}o||e.preventDefault()}),{passive:!1}),null===n)if("string"==typeof t)d=document.createElement("div"),d.id=e,a.default.setInnerHtml(d,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");{const i=[];let n;for(let e=0,o=t.childNodes.length;e<o;e++)n=t.childNodes[e],n.nodeType===Node.ELEMENT_NODE&&i.push(n);"DIV"!==i[0].nodeName||i.length>1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=i[0]}}else d=n;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&a.default.show(d);const p=(0,u.createFocusTrap)(o,{allowOutsideClick:!0,escapeDeactivates:()=>(f.get(e).closable&&E.close(e),!1),fallbackFocus:o});f.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,closable:i.closable,content:d,dialog:o,focusTrap:p,header:r,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow,submitButton:null,inputFields:new Set}),m.insertBefore(o,m.firstChild),"function"==typeof i.onSetup&&i.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const i=f.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&&a.default.setInnerHtml(i.content,t),n.stringToBool(i.dialog.getAttribute("aria-hidden"))){d.default.execute(),i.closable&&n.stringToBool(m.getAttribute("aria-hidden"))&&window.addEventListener("keyup",_),i.dialog.parentNode.insertBefore(i.dialog,i.dialog.parentNode.firstChild),i.dialog.setAttribute("aria-hidden","false"),m.setAttribute("aria-hidden","false"),m.setAttribute("close-on-click",i.backdropCloseOnClick?"true":"false"),h=e;const t=i.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),t&&t.removeAttribute("inert"),"function"==typeof i.onShow&&i.onShow(i.content),n.stringToBool(i.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:i.content,id:e})}this.rebuild(e),o.default.trigger(),i.focusTrap.activate()},rebuild(e){const t=this._getDialogId(e),i=f.get(t);if(void 0===i)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(n.stringToBool(i.dialog.getAttribute("aria-hidden")))return;const o=i.content.parentNode,r=i.content.querySelector(".formSubmit");let s=0;null!==r?(o.classList.add("dialogForm"),r.classList.add("dialogFormSubmit"),s+=a.default.outerHeight(r),s-=1,o.style.setProperty("margin-bottom",`${s}px`,"")):(o.classList.remove("dialogForm"),o.style.removeProperty("margin-bottom")),s+=a.default.outerHeight(i.header);const l=window.innerHeight*(g?1:.8)-s;if(o.style.setProperty("max-height",~~l+"px",""),""===i.dialog.style.getPropertyValue("--translate-x")){const e=Math.floor(i.dialog.getBoundingClientRect().width/2);i.dialog.style.setProperty("--translate-x",`-${e}px`)}const c=v.get(t);if(void 0!==c&&"function"==typeof c._dialogSubmit){const e=i.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),n=i.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===n)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",i.content));if(i.submitButton!==n){i.submitButton=n,n.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const o=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let r;for(let t=0,n=e.length;t<n;t++)r=e[t],i.inputFields.has(r)||(-1!==y.indexOf(r.type)?(i.inputFields.add(r),r.addEventListener("keydown",o)):console.warn("Unsupported input type.",r))}}},_submit(e){const t=f.get(e);let i=!0;if(t.inputFields.forEach((e=>{e.required&&(""===e.value.trim()?(a.default.innerError(e,s.get("wcf.global.form.error.empty")),e.closest("dl")?.classList.add("formError"),i=!1):(a.default.innerError(e,!1),e.closest("dl")?.classList.remove("formError")))})),i){const t=v.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(){const e=f.get(h);return void 0===e||!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!0))},_closeOnBackdrop(e){e.target===m&&(n.stringToBool(m.getAttribute("close-on-click"))?(e.preventDefault(),this._close()):e.preventDefault())},close(e){e=this._getDialogId(e);let t=f.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");try{t.focusTrap.deactivate()}catch(e){const t="Your focus-trap must have at least one container with at least one tabbable node in it at all times";if(e.message!==t)throw e}t.dialog.setAttribute("aria-hidden","true");const i=document.activeElement;i.closest(".dialogContainer")===t.dialog&&i.blur(),"function"==typeof t.onClose&&t.onClose(e),h=null;for(let e=0;e<m.childElementCount;e++){const t=m.children[e];if(t.classList.contains("dialogContainer")&&!n.stringToBool(t.getAttribute("aria-hidden"))){h=t.dataset.id||"";break}}r.pageOverlayClose(),null===h?(m.setAttribute("aria-hidden","true"),m.dataset.closeOnClick="false",t.closable&&window.removeEventListener("keyup",_)):(t=f.get(h),m.dataset.closeOnClick=t.backdropCloseOnClick?"true":"false"),"desktop"!==l.platform()&&r.scrollEnable()},getDialog(e){return f.get(this._getDialogId(e))},isOpen(e){const t=this.getDialog(e);return void 0!==t&&"false"===t.dialog.getAttribute("aria-hidden")},destroy(e){if("object"!=typeof e)throw new TypeError("Expected the callback object as parameter.");if(b.has(e)){const t=b.get(e).id;this.isOpen(t)&&this.close(t),f.has(t)&&(f.get(t).dialog.remove(),f.delete(t)),b.delete(e)}},_getDialogId(e){if("object"==typeof e){const t=b.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:()=>({})};return E})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay","../../Helper/PageOverlay","../../Helper/Selector"],(function(e,t,i,n,o,r,a,s,l,c,d){"use strict";function u(e){const t=e.currentTarget,i=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,n=i.length;e<n;e++){const n=i[e],o=a.default.identify(n),r=a.default.offset(n),s=a.default.offset(t);r.top+n.clientHeight<=s.top||r.top>=s.top+t.offsetHeight||r.left<=s.left||r.left>=s.left+t.offsetWidth?C.toggleDropdown(o):C.setAlignment(_.get(o),w.get(o))}}function p(){_.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(o.stringToBool(e.dataset.isOverlayDropdownButton||""))C.setAlignment(e,w.get(t));else{const i=w.get(e.id);o.stringToBool(i.dataset.dropdownIgnorePageScroll||"")||C.close(t)}}))}function m(e,t){b.forEach(e,(i=>{i(e,t)}))}function h(e,t,i,n){if(null!==e){e.preventDefault(),e.stopPropagation();const i=e.currentTarget;t=i.dataset.target,void 0===n&&e instanceof MouseEvent&&(o.stringToBool(i.dataset.isKeyboardClick||"")?delete i.dataset.isKeyboardClick:n=!0)}S=!0;try{l.default.execute(l.Origin.DropDown,t)}finally{S=!1}let a=_.get(t),s=!1;if(void 0!==a){let i,l;if(e&&(i=e.currentTarget,l=i.parentNode,l!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,_.set(t,l))),void 0===n&&(i=a.closest(".dropdownToggle"),i||(i=a.querySelector(".dropdownToggle"),!i&&a.id&&(i=document.querySelector('[data-target="'+a.id+'"]'))),i&&o.stringToBool(i.dataset.dropdownLazyInit||"")&&(n=!0)),o.stringToBool(a.dataset.dropdownPreventToggle||"")&&a.classList.contains("dropdownOpen")&&(s=!0),""===a.dataset.isOverlayDropdownButton){const e=r.parentByClass(a,"dialogContent");a.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",u)}}return E="",_.forEach(((e,r)=>{const a=w.get(r);if(e.classList.contains("dropdownOpen"))if(s)E=t;else{e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),m(r,"close")}else if(r===t&&a.childElementCount>0){E=t,e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen");const s=e.querySelector(".dropdownToggle");s&&s.setAttribute("aria-expanded","true");const l=a.childElementCount>0?a.children[0]:null;if(l&&o.stringToBool(l.dataset.scrollToActive||"")){delete l.dataset.scrollToActive;let e=null;for(let t=0,i=l.childElementCount;t<i;t++)if(l.children[t].classList.contains("active")){e=l.children[t];break}e&&(l.scrollTop=Math.max(e.offsetTop+e.clientHeight-a.clientHeight,0))}const c=a.querySelector(".scrollableDropdownMenu");null!==c&&c.classList[c.scrollHeight>c.clientHeight?"add":"remove"]("forceScrollbar"),m(r,"open");let d=null;if(!n){a.setAttribute("role","menu"),a.tabIndex=-1,a.removeEventListener("keydown",g),a.addEventListener("keydown",g);const e=Array.from(a.querySelectorAll("li")).filter((e=>e.clientHeight>0));d=e.find((e=>e.classList.contains("active")))||e[0]||null,e.forEach((e=>{e.setAttribute("role","menuitem"),e.tabIndex=-1}))}C.setAlignment(e,a,i),null!==d&&d.focus()}})),null===e}function f(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):h(e)))}function g(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const i=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||i.reverse();let n=null;const o=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let r=i.indexOf(t);"End"!==e.key&&"Home"!==e.key||(r=-1);for(let e=r+1;e<i.length;e++)if(o(i[e])){n=i[e];break}null===n&&(n=i.find(o)||null),null!==n&&n.focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();let i=t;1!==i.childElementCount||"SPAN"!==i.children[0].nodeName&&"A"!==i.children[0].nodeName||(i=i.children[0]);const n=_.get(E),r=n.querySelector(".dropdownToggle"),a=n.dataset.a11yMouseEvent||"click";o.triggerEvent(i,a),r&&r.focus()}else if("Escape"===e.key||"Tab"===e.key){e.preventDefault();const t=_.get(E);let i=t.querySelector(".dropdownToggle");null!==i||t.classList.contains("dropdown")||(i=t),h(null,E),i&&i.focus()}}n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);const b=new n.default;let v=!1;const _=new Map,w=new Map;let y,E="",S=!1;const C={setup(){v||(v=!0,y=document.createElement("div"),y.className="dropdownMenuContainer",(0,c.getPageOverlayContainer)().append(y),l.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>C.closeAll())),(0,d.wheneverFirstSeen)(".dropdownToggle",(e=>C.init(e,!1))),document.addEventListener("scroll",p),window.bc_wcfSimpleDropdown=this)},init(e,t){if(C.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const i=r.parentByClass(e,"dropdown");if(null===i)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a parent with .dropdown.");const n=r.nextByClass(e,"dropdownMenu");if(null===n)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a menu as next sibling.");y.appendChild(n);const s=a.default.identify(i);if(!_.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",h),e.addEventListener("keydown",f),_.set(s,i),w.set(s,n),/^wcf\d+$/.test(s)||(n.dataset.source=s),n.childElementCount&&n.children[0].classList.contains("scrollableDropdownMenu"))){const e=n.children[0];e.dataset.scrollToActive="true";let t=null,i=null;e.addEventListener("wheel",(n=>{null===t&&(t=e.clientHeight),null===i&&(i=e.scrollHeight),(n.deltaY<0&&0===e.scrollTop||n.deltaY>0&&e.scrollTop+t===i)&&n.preventDefault()}),{passive:!1})}return e.dataset.target=s,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",o.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){C.setup();const i=a.default.identify(e);_.has(i)||(_.set(i,e),y.appendChild(t),w.set(i,t))},registerCallback(e,t){b.add(e,t)},getDropdown:e=>_.get(e),getDropdownMenu:e=>w.get(e),toggleDropdown(e,t,i){h(null,e,t,i)},setAlignment(e,t,i){const n=e.querySelector(".dropdownToggle"),o=null!==n?n.parentNode:null;let r;o&&o.classList.contains("inputAddonTextarea")&&(r=n),s.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=_.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const i=w.get(e);C.setAlignment(t,i)},isOpen(e){const t=w.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t,i){const n=w.get(e);void 0===n||n.classList.contains("dropdownOpen")||C.toggleDropdown(e,i,t)},close(e){const t=_.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),w.get(e).classList.remove("dropdownOpen"))},closeAll(){S||_.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen")){e.classList.remove("dropdownOpen"),w.get(t).classList.remove("dropdownOpen");const i=e.querySelector(".dropdownToggle");i&&i.setAttribute("aria-expanded","false"),m(t,"close")}}))},destroy(e){if(!_.has(e))return!1;try{C.close(e),w.get(e)?.remove()}catch(e){}return w.delete(e),_.delete(e),!0},_toggle:(e,t,i,n)=>h(e,t,i,n)};return C})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,i,n){"use strict";function o(e){if(!r.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return r.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleDropdown=t.registerCallback=t.getDropdownMenu=t.init=void 0,n=i.__importDefault(n);const r=new Map;let a=0;t.init=function(e,t){if(r.has(e))return;const i=document.createElement("div");i.id="reusableDropdownGhost"+a++,n.default.initFragment(i,t),r.set(e,i.id)},t.getDropdownMenu=function(e){return n.default.getDropdownMenu(o(e))},t.registerCallback=function(e,t){n.default.registerCallback(o(e),t)},t.toggleDropdown=function(e,t){n.default.toggleDropdown(o(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Container",["require","exports","tslib","focus-trap","../../Screen","../../CloseOverlay","../../../Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuContainer=void 0,r=i.__importDefault(r),a=i.__importDefault(a);class s{container=document.createElement("div");content=document.createElement("div");focusTrap=void 0;provider;constructor(e){this.provider=e,this.container.hidden=!0;const t=a.default.identify(this.provider.getMenuButton());r.default.add(`WoltLabSuite/Core/Ui/PageMenu/Container-${t}`,(()=>{this.container.hidden||this.close()}))}open(){r.default.execute(),this.buildElements(),0===this.content.childElementCount&&this.content.append(this.provider.getContent()),this.provider.getMenuButton().setAttribute("aria-expanded","true"),(0,o.pageOverlayOpen)(),(0,o.scrollDisable)(),this.container.hidden=!1,this.provider.wakeup(),this.getFocusTrap().activate()}close(){this.provider.getMenuButton().setAttribute("aria-expanded","false"),(0,o.pageOverlayClose)(),(0,o.scrollEnable)(),this.container.hidden=!0,this.getFocusTrap().deactivate(),this.provider.sleep()}toggle(){this.container.hidden?this.open():this.close()}getContent(){return this.content}buildElements(){this.container.classList.contains("pageMenuContainer")||(this.container.classList.add("pageMenuContainer"),this.container.hidden=!0,this.container.addEventListener("click",(e=>{e.target===this.container&&this.close()})),this.content.classList.add("pageMenuContent"),this.content.addEventListener("click",(e=>{e.stopPropagation()})),this.container.append(this.content),document.body.append(this.container))}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,n.createFocusTrap)(this.content,{allowOutsideClick:!0})),this.focusTrap}}t.PageMenuContainer=s,t.default=s})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","./Container","../../../Language","../../../Dom/Util","../../Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuMain=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);class s{container;mainMenu;mainMenuButton;menuItemBadges=new Map;menuItemProvider;observer;constructor(e){this.mainMenu=document.querySelector(".mainMenu"),this.menuItemProvider=e,this.mainMenuButton=document.querySelector(".pageHeaderMenuMobile"),this.mainMenuButton.addEventListener("click",(e=>{e.stopPropagation(),this.container.toggle()})),this.container=new n.default(this),this.observer=new MutationObserver((e=>{let t=!1;e.forEach((e=>{(e.addedNodes.length>0||e.removedNodes.length>0||"characterData"===e.type)&&(t=!0)})),t&&this.refreshUnreadIndicator()})),this.watchForChanges()}enable(){this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars")}getContent(){const e=document.createElement("div");e.classList.add("pageMenuMainContainer"),e.addEventListener("scroll",(()=>this.updateOverflowIndicator(e)),{passive:!0}),e.append(this.buildMainMenu());const t=this.buildLanguageMenu();t&&e.append(t);const i=this.buildFooterMenu();i&&e.append(i);const n=new ResizeObserver((()=>this.updateOverflowIndicator(e)));Array.from(e.children).forEach((e=>{n.observe(e)}));const o=document.createDocumentFragment();return o.append(e),o}getMenuButton(){return this.mainMenuButton}sleep(){this.watchForChanges()}wakeup(){this.observer.disconnect(),this.refreshUnreadIndicator()}watchForChanges(){this.observer.observe(this.mainMenu,{childList:!0,subtree:!0})}buildMainMenu(){const e=this.mainMenu.querySelector(".boxMenu"),t=this.buildMenu(e);return t.setAttribute("aria-label",window.PAGE_TITLE),t.setAttribute("role","navigation"),this.showActiveMenuItem(t),t}showActiveMenuItem(e){const t=e.querySelector('.pageMenuMainItemLink[aria-current="page"]');if(t){let e=t;for(;e&&e.parentElement;)if(e=e.parentElement.closest(".pageMenuMainItemList"),e){e.hidden=!1;const t=e.previousElementSibling;t?.setAttribute("aria-expanded","true")}const i=t.nextElementSibling;i&&(i.setAttribute("aria-expanded","true"),i.nextElementSibling.hidden=!1)}}buildLanguageMenu(){const e=a.getDropdownMenu("pageLanguageContainer");if(void 0===e)return null;const t=[],i=new Map;Array.from(e.children).forEach((e=>{const n=e.dataset.languageCode,o=e.querySelector("span").textContent.trim(),r=e.querySelector("img.iconFlag")||void 0;i.set(n,e.querySelector("a")),t.push({active:!1,children:[],counter:0,depth:1,identifier:n,title:o,icon:r})}));const n=document.createElement("fa-icon");n.setIcon("language"),n.size=24;const r=[{active:!1,children:t,counter:0,depth:0,identifier:"language",title:o.get("wcf.user.language"),icon:n}],s=document.createElement("nav");return s.classList.add("pageMenuMainNavigation","pageMenuMainNavigationLanguage"),s.append(this.buildMenuItemList(r,!0)),s.querySelectorAll(".pageMenuMainItemList .pageMenuMainItemLabel[data-identifier]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const n=e.dataset.identifier;i.get(n)?.click()}))})),s}buildFooterMenu(){const e=document.querySelector('.box[data-box-identifier="com.woltlab.wcf.FooterMenu"]');if(null===e)return null;const t=e.querySelector(".boxMenu"),i=this.buildMenu(t);i.classList.add("pageMenuMainNavigationFooter");const n=e.querySelector("nav").getAttribute("aria-label");return i.setAttribute("aria-label",n),i}buildMenu(e){const t=this.menuItemProvider.getMenuItems(e),i=document.createElement("nav");return i.classList.add("pageMenuMainNavigation"),i.append(this.buildMenuItemList(t,!1)),i}buildMenuItemList(e,t){const i=document.createElement("ul");return i.classList.add("pageMenuMainItemList"),e.filter((e=>!(!t&&!e.link&&0===e.children.length))).forEach((e=>{i.append(this.buildMenuItem(e,t))})),i}buildMenuItem(e,t){const i=document.createElement("li");if(i.dataset.depth=e.depth.toString(),i.classList.add("pageMenuMainItem"),e.link){const t=document.createElement("a");if(t.classList.add("pageMenuMainItemLink"),t.href=e.link,t.textContent=e.title,e.active&&t.setAttribute("aria-current","page"),e.identifier&&(t.dataset.identifier=e.identifier),e.openInNewWindow&&(t.target="_blank"),e.counter>0){const i=document.createElement("span");i.classList.add("pageMenuMainItemCounter","badge","badgeUpdate"),i.setAttribute("aria-hidden","true"),i.textContent=e.counter.toString(),null!==e.identifier&&this.menuItemBadges.set(e.identifier,i),t.append(i)}i.append(t)}else{const n=document.createElement("a");if(n.classList.add("pageMenuMainItemLabel"),n.href="#",e.icon){n.append(e.icon);const t=document.createElement("span");t.textContent=e.title,n.append(t)}else n.textContent=e.title;e.identifier&&(n.dataset.identifier=e.identifier),t&&"language"!==e.identifier||(n.addEventListener("click",(e=>{e.preventDefault(),n.nextElementSibling.click()})),n.setAttribute("aria-hidden","true")),i.append(n)}if(e.children.length){i.classList.add("pageMenuMainItemExpandable");const n=r.default.getUniqueId(),a=document.createElement("button");a.type="button",a.classList.add("pageMenuMainItemToggle"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",n),a.innerHTML='<fa-icon size="24" name="angle-down"></fa-icon>';let s=e.title;e.link&&(s=o.get("wcf.menu.page.button.toggle",{title:e.title})),a.setAttribute("aria-label",s);const l=this.buildMenuItemList(e.children,t);l.id=n,l.hidden=!0,a.addEventListener("click",(()=>{this.toggleList(a,l)})),l.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.toggleList(a,l))})),i.append(a,l)}return i}toggleList(e,t){t.hidden?(e.setAttribute("aria-expanded","true"),t.hidden=!1):(e.setAttribute("aria-expanded","false"),t.hidden=!0,document.activeElement!==e&&e.focus())}refreshUnreadIndicator(){null!==this.mainMenu.querySelector(".boxMenuLinkOutstandingItems")?this.mainMenu.classList.add("pageMenuMobileButtonHasContent"):this.mainMenu.classList.remove("pageMenuMobileButtonHasContent"),this.menuItemProvider.getMenuItems(this.mainMenu).forEach((e=>this.refreshUnreadBage(e)))}refreshUnreadBage(e){if(null!==e.identifier){const t=this.menuItemBadges.get(e.identifier);t&&(0===e.counter?(t.remove(),this.menuItemBadges.delete(e.identifier)):parseInt(t.textContent,10)!==e.counter&&(t.textContent=e.counter.toString()))}e.children.forEach((e=>this.refreshUnreadBage(e)))}updateOverflowIndicator(e){e.clientHeight<e.scrollHeight?(e.scrollTop>0?e.classList.add("pageMenuMainContainerOverflowTop"):e.classList.remove("pageMenuMainContainerOverflowTop"),e.clientHeight+e.scrollTop<e.scrollHeight?e.classList.add("pageMenuMainContainerOverflowBottom"):e.classList.remove("pageMenuMainContainerOverflowBottom")):e.classList.remove("pageMenuMainContainerOverflowTop","pageMenuMainContainerOverflowBottom")}}t.PageMenuMain=s,t.default=s})),define("WoltLabSuite/Core/Ui/User/Menu/Manager",["require","exports","tslib","../../Alignment","../../CloseOverlay","../../../Event/Handler","../../../Dom/Util","../../Screen","../../../Helper/PageOverlay"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e){o.default.execute();const t=p(e);t.open();const i=e.getPanelButton();i.querySelector("a").setAttribute("aria-expanded","true"),i.classList.add("open"),d(t.getElement(),i)}function d(e,t){if(n.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==a.default.getFixedParent(t)){const{top:i,height:n}=t.getBoundingClientRect();e.style.setProperty("top",`${i+n}px`)}}function u(e){if(!g.has(e))return;const t=e.getPanelButton();t.classList.contains("open")&&(p(e).close(),t.classList.remove("open"),t.querySelector("a").setAttribute("aria-expanded","false"))}function p(e){if(!g.has(e)){const t=e.getView(),i=t.getElement();m().append(i),i.addEventListener("shouldClose",(()=>u(e))),g.set(e,t)}return g.get(e)}function m(){return void 0===h&&(h=document.createElement("div"),h.classList.add("dropdownMenuContainer"),(0,l.getPageOverlayContainer)().append(h)),h}let h;Object.defineProperty(t,"__esModule",{value:!0}),t.registerProvider=t.getContainer=t.updateCounter=t.getUserMenuProviders=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s);const f=new Set,g=new Map;t.getUserMenuProviders=function(){return f},t.updateCounter=function(e,t){Array.from(f).filter((t=>t.getIdentifier()===e)).forEach((e=>{e.getPanelButton().dispatchEvent(new CustomEvent("updateCounter",{detail:{counter:t}}))}))},t.getContainer=m,t.registerProvider=function(e){0===f.size&&(o.default.add("WoltLabSuite/Ui/User/Menu",(()=>{f.forEach((e=>u(e)))})),r.add("com.woltlab.wcf.UserMenuMobile","more",(e=>{f.forEach((t=>{e.identifier===t.getIdentifier()&&c(t)}))})),window.addEventListener("resize",(()=>{f.forEach((e=>{const t=e.getPanelButton();t.classList.contains("open")&&d(p(e).getElement(),t)}))}),{passive:!0}),s.on("screen-md-down",{match(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))},setup(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))}})),function(e){f.add(e);const t=e.getPanelButton();t.addEventListener("click",(i=>{i.preventDefault(),i.stopPropagation(),t.classList.contains("open")?u(e):c(e)}))}(e)}})),define("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",["require","exports","tslib","../../CloseOverlay","./Manager","focus-trap","../../Alignment","../../../Dom/Util"],(function(e,t,i,n,o,r,a,s){"use strict";function l(){u.deactivate(),d.hidden=!0,c.classList.remove("open"),p.setAttribute("aria-expanded","false")}let c,d,u,p;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.getElement=void 0,n=i.__importDefault(n),a=i.__importStar(a),s=i.__importDefault(s),t.getElement=function(){return d};let m=!1;t.setup=function(){m||(c=document.getElementById("userMenu"),d=c.querySelector(".userMenu"),p=c.querySelector("a"),n.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",(()=>l())),(0,o.getContainer)().append(d),d.addEventListener("click",(e=>e.stopPropagation())),c.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.hidden?d.hidden&&(n.default.execute(),d.hidden=!1,c.classList.add("open"),p.setAttribute("aria-expanded","true"),u.activate(),function(e,t){if(a.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==s.default.getFixedParent(t)){const{top:i,height:n}=t.getBoundingClientRect();e.style.setProperty("top",`${i+n}px`)}}(d,c)):l()})),u=(0,r.createFocusTrap)(d,{allowOutsideClick:!0,escapeDeactivates:()=>(l(),!1),fallbackFocus:d}),m=!0)}})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","./Container","../../../Language","../../User/Menu/Manager","../../../Dom/Util","../../User/Menu/ControlPanel","../../../Event/Handler","../../Screen"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasValidUserMenu=t.PageMenuUser=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),l=i.__importStar(l);class d{activeTab=void 0;container;legacyUserPanels=new Map;observer;userMenuProviders=new Map;tabOrigins=new Map;tabPanels=new Map;tabs=[];userMenu;userMenuButton;constructor(){this.userMenu=document.querySelector(".userPanel"),this.userMenuButton=document.querySelector(".pageHeaderUserMobile"),this.userMenuButton.addEventListener("click",(t=>{t.stopPropagation(),e.then((()=>this.container.toggle()))})),this.container=new n.default(this);const e=new Promise((e=>{"complete"===document.readyState?e():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&e()}))}));(0,c.on)("screen-lg",{match:()=>this.detachViewsFromPanel(),unmatch:()=>this.detachViewsFromPanel()}),this.observer=new MutationObserver((()=>{this.refreshTabUnreadIndicators()}))}enable(){this.userMenuButton.setAttribute("aria-expanded","false"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.userMenuButton.setAttribute("aria-expanded","false")}getContent(){const e=document.createDocumentFragment();return e.append(this.buildTabMenu()),e}getMenuButton(){return this.userMenuButton}sleep(){this.activeTab&&this.closeTab(this.activeTab),this.detachViewsFromPanel(),this.refreshUnreadIndicator()}wakeup(){this.activeTab?this.openTab(this.activeTab):this.isInMaintenanceMode()?this.openTab(this.tabs[0]):this.openNotifications(),this.refreshTabUnreadIndicators(),this.refreshUnreadIndicator()}isInMaintenanceMode(){return"wcf"===document.body.dataset.application&&"offline"===document.body.dataset.template}openNotifications(){const e=this.tabs.find((e=>"userNotifications"===e.dataset.origin));if(!e)throw new Error("Unable to find the notifications tab.");this.openTab(e)}openTab(e){this.closeActiveTab(),e.setAttribute("aria-selected","true"),e.tabIndex=0;const t=this.tabPanels.get(e);t.hidden=!1,document.activeElement!==e&&e.focus(),this.attachViewToPanel(e),this.activeTab=e,this.observer.observe(t,{attributeFilter:["data-is-unread"],childList:!0,subtree:!0})}closeActiveTab(){this.activeTab&&(this.closeTab(this.activeTab),this.activeTab=void 0)}closeTab(e){e.setAttribute("aria-selected","false"),e.tabIndex=-1,this.tabPanels.get(e).hidden=!0;const t=this.legacyUserPanels.get(e);t&&t.close(),this.observer.disconnect(),this.refreshTabUnreadIndicators()}attachViewToPanel(e){const t=e.dataset.origin,i=this.tabPanels.get(e);if("userMenu"===t){const e=(0,s.getElement)();e.hidden=!1,0===i.childElementCount&&(this.tabOrigins.set(i,e.parentElement),i.append(e))}else if(0===i.childElementCount){const t=this.userMenuProviders.get(e);if(t){const e=t.getView(),n=e.getElement();this.tabOrigins.set(i,n.parentElement),i.append(n),e.open()}else{const t=this.legacyUserPanels.get(e);t.open();const{top:n}=i.getBoundingClientRect();t.getDropdown().getContainer()[0].style.setProperty("--offset-top",`${n}px`)}}}detachViewsFromPanel(){this.tabPanels.forEach(((e,t)=>{if(e.childElementCount){const i=this.tabOrigins.get(e);if(i)if("userMenu"===t.dataset.origin){const t=e.children[0];t.hidden=!0,i.append(t)}else{const e=this.userMenuProviders.get(t);if(e){const t=e.getView().getElement();t.hidden=!0,i.append(t)}}}}))}keydown(e){const t=e.currentTarget;if("Enter"===e.key||" "===e.key)return e.preventDefault(),void this.openTab(t);if(!["ArrowLeft","ArrowRight","End","Home"].includes(e.key))return;e.preventDefault();const i=this.tabs.indexOf(t),n=this.tabs.length-1;let o;o="ArrowLeft"===e.key?0===i?n:i-1:"ArrowRight"===e.key?i===n?0:i+1:"End"===e.key?n:0,this.tabs[o].focus()}buildTabMenu(){const e=document.createElement("div");e.classList.add("pageMenuUserTabContainer");const t=document.createElement("div");return t.classList.add("pageMenuUserTabList"),t.setAttribute("role","tablist"),t.setAttribute("aria-label",o.get("wcf.menu.user")),e.append(t),this.buildControlPanelTab(t,e),(0,r.getUserMenuProviders)().forEach((i=>{const[n,o]=this.buildTab(i);t.append(n),e.append(o),this.tabs.push(n),this.tabPanels.set(n,o),this.userMenuProviders.set(n,i)})),this.buildLegacyTabs(t,e),e}buildTab(e){const t=e.getPanelButton(),i=t.querySelector("a");let n=i.querySelector("fa-icon")?.outerHTML;void 0===n&&(n='<fa-icon size="32" name="question"></fa-icon>');const o={icon:n,label:i.dataset.title||i.title,origin:t.id};return this.buildTabComponents(o)}buildControlPanelTab(e,t){const i=document.getElementById("userMenu"),n=i.querySelector("a"),o={icon:this.userMenuButton.querySelector(".userAvatarImage").outerHTML,label:n.dataset.title||n.title,origin:i.id},[r,a]=this.buildTabComponents(o);e.append(r),t.append(a),this.tabs.push(r),this.tabPanels.set(r,a)}buildLegacyTabs(e,t){const i=document.querySelector(".userPanelItems"),n={panels:[]};l.fire("com.woltlab.wcf.pageMenu","legacyMenu",n),Array.from(i.children).filter((e=>void 0!==n.panels.find((t=>t.element===e)))).map((e=>{const t=e.querySelector("a");return{icon:t.querySelector(".icon").outerHTML,label:t.dataset.title||t.title,origin:e.id}})).forEach((i=>{const[o,r]=this.buildTabComponents(i);e.append(o),t.append(r),this.tabs.push(o),this.tabPanels.set(o,r);const a=n.panels.find((e=>e.element.id===i.origin));this.legacyUserPanels.set(o,a.api)}))}buildTabComponents(e){const t=a.default.getUniqueId(),i=a.default.getUniqueId(),n=document.createElement("button");n.type="button",n.classList.add("pageMenuUserTab"),n.dataset.hasUnreadContent="false",n.dataset.origin=e.origin,n.id=t,n.setAttribute("aria-controls",i),n.setAttribute("aria-selected","false"),n.setAttribute("role","tab"),n.tabIndex=-1,n.setAttribute("aria-label",e.label),n.innerHTML=e.icon,n.addEventListener("click",(e=>{e.preventDefault(),this.openTab(n)})),n.addEventListener("keydown",(e=>this.keydown(e)));const o=document.createElement("div");return o.classList.add("pageMenuUserTabPanel"),o.id=i,o.hidden=!0,o.setAttribute("aria-labelledby",t),o.setAttribute("role","tabpanel"),o.tabIndex=0,[n,o]}refreshUnreadIndicator(){null!==this.userMenu.querySelector(".badge.badgeUpdate")?this.userMenu.classList.add("pageMenuMobileButtonHasContent"):this.userMenu.classList.remove("pageMenuMobileButtonHasContent")}refreshTabUnreadIndicators(){this.userMenuProviders.forEach(((e,t)=>{e.hasUnreadContent()?t.dataset.hasUnreadContent="true":t.dataset.hasUnreadContent="false"}))}}t.PageMenuUser=d,t.hasValidUserMenu=function(){return document.getElementById("topMenu").classList.contains("userPanelLoggedIn")},t.default=d})),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","focus-trap","../Core","../Dom/Change/Listener","../Dom/Util","../Environment","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen","../Language"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h){"use strict";function f(){B=!0,g(),b(),F&&(U=new u.PageMenuMain(H),U.enable(),(0,p.hasValidUserMenu)()&&(W=new p.PageMenuUser,W.enable())),c.default.add("WoltLabSuite/Core/Ui/Mobile",v),r.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{g(),b()})),document.addEventListener("scroll",(()=>E()),{passive:!0})}function g(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const i=document.createElement("button");i.type="button",i.innerHTML='<fa-icon size="24" name="ellipsis-vertical"></fa-icon>',i.classList.add("dropdownLabel"),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),v(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(i,e.firstChild)}))}function b(){document.querySelectorAll(".message").forEach((e=>{if(R.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const i=e.querySelector(".messageQuickOptions");if(i&&t.childElementCount){i.classList.add("active");let n=i.querySelector(".messageQuickOptionsMobile");null===n&&(n=document.createElement("li"),n.innerHTML=`\n            <button type="button" aria-label="${h.get("wcf.global.button.more")}">\n              <fa-icon name="ellipsis-vertical"></fa-icon>\n            </button>\n          `,n.classList.add("messageQuickOptionsMobile"),i.append(n)),n.querySelector("button").addEventListener("click",(n=>{n.stopPropagation(),S(e,i,t)}))}}R.add(e)}))}function v(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),B&&q&&E()}function _(){V=!0}function w(){V=!1,z.forEach((function(e){e.classList.remove("open")}))}function y(){z.forEach((function(e){e.addEventListener("mousedown",(function(t){V&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),V=!0}function E(){q?.classList.remove("dropdownOpen")}function S(e,t,i){if(null===q)q=document.createElement("ul"),q.className="dropdownMenu",d.init("com.woltlab.wcf.jsMobileNavigation",q);else if(q.classList.contains("dropdownOpen")&&(E(),j.deactivate(),j=void 0,O===e))return;q.innerHTML="",c.default.execute(),x(i);const o=i.previousElementSibling;if(o&&o.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",q.appendChild(e),x(o)}l.set(q,t,{horizontal:"right",allowFlip:"vertical"}),q.classList.add("dropdownOpen"),O=e,j=(0,n.createFocusTrap)(q,{allowOutsideClick:!0,escapeDeactivates:()=>(S(e,t,i),!1),setReturnFocus:t}),j.activate()}function C(){N=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(t=>{N&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const i=e.parentElement,n=t.target;i.contains(n)||n===i||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}),{passive:!1})}))}function L(){N=!0}function k(){N=!1}function x(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const i=e.querySelector("span:not(.icon)");t.innerHTML=`<a href="#">${i.textContent}</a>`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():o.triggerEvent(e,"click"),E()})),q.appendChild(t)}))}function I(){c.default.execute(),B=!0,F&&(U.enable(),W?.enable())}function M(){$&&A($,".messageGroupLink")}function T(){c.default.execute(),B=!1,F&&(U.disable(),W?.disable())}function D(){$&&P($),q&&E()}function A(e,t){Array.from(e).forEach((e=>{const i=e.parentElement;let n=i.querySelector(".mobileLinkShadow");if(null===n){const o=e.querySelector(t);o.href&&(n=document.createElement("a"),n.className="mobileLinkShadow",n.href=o.href,n.setAttribute("aria-labelledby",a.default.identify(o)),i.appendChild(n),i.classList.add("mobileLinkShadowContainer"))}}))}function P(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeShadow=t.rebuildShadow=t.disableShadow=t.disable=t.enableShadow=t.enable=t.setup=void 0,o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c),d=i.__importStar(d),m=i.__importStar(m),h=i.__importStar(h);let j,q=null,O=null,B=!1,N=!1,F=!1;const R=new WeakSet;let U,W,H,V=!1,$=null;const z=[];t.setup=function(e,t){F=e,H=t,document.querySelectorAll(".boxesSidebarLeft").forEach((e=>{z.push(e)})),s.touch()&&document.documentElement.classList.add("touch"),"desktop"!==s.platform()&&document.documentElement.classList.add("mobile");const i=document.querySelector(".messageGroupList");i&&($=i.getElementsByClassName("messageGroup")),m.on("screen-md-down",{match:I,unmatch:T,setup:f}),m.on("screen-sm-down",{match:M,unmatch:D,setup:M}),m.on("screen-md-down",{match:_,unmatch:w,setup:y}),!s.touch()||"ios"!==s.platform()&&"android"!==s.platform()||m.on("screen-lg",{match:L,unmatch:k,setup:C})},t.enable=I,t.enableShadow=M,t.disable=T,t.disableShadow=D,t.rebuildShadow=A,t.removeShadow=P})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language","../../Ui/Screen"],(function(e,t,i,n,o,r){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==g?(e>=b?(m.classList.contains("initiallyHidden")&&m.classList.remove("initiallyHidden"),m.setAttribute("aria-hidden","false")):m.setAttribute("aria-hidden","true"),l(),-1!==g&&h.classList[e<g?"remove":"add"]("scrolledDown"),g=-1):v()}function s(e){e.preventDefault(),document.getElementById("top").scrollIntoView({behavior:"smooth"})}function l(){const e=Array.from(p.children).find((e=>"false"===e.getAttribute("aria-hidden")));p.classList[e?"add":"remove"]("active"),e?h.classList.add("pageActionHasContextButtons"):h.classList.remove("pageActionHasContextButtons")}function c(){if(f)return;f=!0,h=document.createElement("div"),h.className="pageAction",p=document.createElement("div"),p.className="pageActionButtons",h.appendChild(p),m=function(){const e=document.createElement("button");return e.type="button",e.classList.add("button","buttonPrimary","pageActionButtonToTop","initiallyHidden","jsTooltip"),e.title=o.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='<fa-icon size="32" name="angle-up" solid></fa-icon>',e.addEventListener("click",s),e}(),h.appendChild(m),document.body.appendChild(h);const e=n.debounce(a,100);window.addEventListener("scroll",(()=>{-1===g&&(g=window.pageYOffset,window.setTimeout((()=>{a(),g=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==g&&(g=-1)}),{passive:!0}),r.on("screen-sm-down",{match(){b=50},unmatch(){b=300},setup(){b=50}}),a()}function d(e){const t=u.get(e);t&&(t.parentElement.setAttribute("aria-hidden","true"),l())}Object.defineProperty(t,"__esModule",{value:!0}),t.show=t.hide=t.remove=t.get=t.has=t.add=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);const u=new Map;let p,m,h,f=!1,g=-1,b=300;const v=n.debounce((()=>{g=-1}),50);t.setup=c,t.add=function(e,t,i){c();const n=document.createElement("div");n.className="pageActionButton",n.dataset.name=e,n.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),n.appendChild(t);let o=null;i&&(o=u.get(i)||null,o&&(o=o.parentElement)),!o&&p.childElementCount&&(o=p.children[0]),o||(o=p.firstChild),p.insertBefore(n,o),h.classList.remove("scrolledDown"),u.set(e,t),n.offsetParent,n.setAttribute("aria-hidden","false"),l()},t.has=function(e){return u.has(e)},t.get=function(e){return u.get(e)},t.remove=function(e){const t=u.get(e);if(void 0!==t){const i=t.parentElement,o=()=>{try{n.stringToBool(i.getAttribute("aria-hidden"))&&(p.removeChild(i),u.delete(e)),i.removeEventListener("transitionend",o)}catch(e){}};i.addEventListener("transitionend",o),d(e)}},t.hide=d,t.show=function(e){const t=u.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),h.classList.remove("scrolledDown"),l()}}})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler","WoltLabSuite/Core/Ui/CloseOverlay"],(function(e,t,i,n,o,r,a,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s);class l{container;containers=new Map;isLegacy=!1;store=null;tabs=new Map;constructor(e){this.container=e}validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=n.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;n.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=o.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const i=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+i+"') exists more than once.");const n=this.containers.get(t);if(void 0===n)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+i+"').");if(n.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+i+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+t+"'] (tab menu id: '"+i+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+i+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEach((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(){this.tabs.forEach((e=>{const t=e.children[0];if(t.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let e=!1;t.addEventListener("touchstart",(()=>{e=!0})),t.addEventListener("touchmove",(()=>{e=!1})),t.addEventListener("touchend",(t=>{e&&(e=!1,t.preventDefault(),this._onClick(t))}))}}));let e=null;const t=l.getIdentifierFromHash();let i;if(""!==t&&(i=this.tabs.get(t),i)){const t=this.container.parentElement;t?.classList.contains("tabMenuContainer")&&(e=this.container)}if(!i){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){i||o.default.isHidden(e)||e.previousElementSibling&&!o.default.isHidden(e.previousElementSibling)||(i=e)})):"string"==typeof e&&"false"!==e&&(i=this.tabs.get(e))}i&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,i,!0));const n=this.container.dataset.store;if(n){const e=document.createElement("input");e.type="hidden",e.name=n,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}return e}select(t,n,o){if(t=t?t.toString():"",!(n=n||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((i=>{e===t&&(n=i),e++}))}if(!n)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||n.dataset.name||"";const r=this.getActiveTab();let c=null;if(r){const e=r.dataset.name;if(e===t)return;o||a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:r,tabName:e}),r.classList.remove("active"),c=this.containers.get(r.dataset.name||""),c.classList.remove("active"),c.classList.add("hidden"),this.isLegacy&&(r.classList.remove("ui-state-active"),c.classList.remove("ui-state-active"))}n.classList.add("active");const d=this.containers.get(t);if(d.classList.add("active"),d.classList.remove("hidden"),this.isLegacy&&(n.classList.add("ui-state-active"),d.classList.add("ui-state-active")),this.store&&(this.store.value=t),!o){a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:n,activeName:t,previous:r,previousName:r?r.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(n),oldTab:e(r),newPanel:e(d),oldPanel:e(c)});let i=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?i+=window.location.hash:i+="#"+t,window.history.replaceState(void 0,"",i)}s.default.execute(),new Promise(((t,i)=>{e(["../TabMenu"],t,i)})).then(i.__importStar).then((e=>{e.scrollToTab(n)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||o.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const i=e.children[0];/#([^#]+)$/.exec(i.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,i,n){"use strict";function o(){null!==l&&window.clearTimeout(l),l=window.setTimeout((()=>{for(const e of a)e();window.removeEventListener("scroll",o),a=[],r=void 0,l=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,n=i.__importDefault(n);let r,a=[],s=null,l=null;t.element=function(e,t,i="smooth"){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(a.length>0&&e!==r)throw new Error("Cannot scroll to element, a concurrent request is running.");if(t&&a.push(t),void 0!==r)return;r=e,window.addEventListener("scroll",o);let l=n.default.offset(e).top;if(null===s){s=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;s="fixed"===t||"static"===t?e.offsetHeight:0}}s>0&&(l<=s?l=0:l-=s);const c=window.pageYOffset;window.scrollTo({left:0,top:l,behavior:i}),window.setTimeout((()=>{c===window.pageYOffset&&o()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=o.default.identify(e);if(_.has(t))return;let i=new r.default(e);if(!i.validate())return;const n=i.init();if(_.set(t,i),n instanceof HTMLElement){const e=f(n.parentNode.id);e&&(i=e,i.select(n.id,void 0,!0))}const a=document.querySelector("#"+t+" > nav > ul");a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===a?(a.classList.add("active"),b=a):(a.classList.remove("active"),b=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){i=null,h(e)}let i=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{if(!t.defaultPrevented)for(const i of e.querySelectorAll("input, select, textarea"))if(!i.checkValidity()){t.preventDefault();const e=f(i.closest(".tabMenuContainer").id),n=i.closest(".tabMenuContent");return e.select(n.dataset.name||""),void l.element(i,(()=>{i.reportValidity()}))}}))}}))}function d(){_.forEach((e=>{let t=!1;e.getContainers().forEach((i=>{t||null===i.querySelector(".formError")||(t=!0,e.select(i.id))}))}))}function u(e){v=!0,_.forEach((t=>{const i=t.getActiveTab();e?h(i.closest(".menu, .tabMenu")):g(i)}))}function p(){v=!1}function m(e,t,i,n,o,r){(r||t>0)&&(t-=15),i!==(t=t<0?0:Math.min(t,n-o))&&(e.classList.add("enableAnimation"),i<t?e.firstElementChild.style.setProperty("margin-left",i-t+"px",""):e.style.setProperty("padding-left",i-t+"px",""),setTimeout((()=>{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function h(e){if(!v)return;const t=e.clientWidth,i=e.querySelector("ul"),n=i.scrollLeft,o=i.scrollWidth,r=n>0;let a=e.querySelector(".tabMenuOverlayLeft");r?(null===a&&(a=document.createElement("button"),a.type="button",a.innerHTML='<fa-icon size="24" name="angle-left"></fa-icon>',a.className="tabMenuOverlayLeft",a.addEventListener("click",(()=>{const e=i.clientWidth;m(i,i.scrollLeft-~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");const s=t+n<o;let l=e.querySelector(".tabMenuOverlayRight");s?(null===l&&(l=document.createElement("button"),l.type="button",l.innerHTML='<fa-icon size="24" name="angle-right"></fa-icon>',l.className="tabMenuOverlayRight",l.addEventListener("click",(()=>{const e=i.clientWidth;m(i,i.scrollLeft+~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function f(e){return _.get(e)}function g(e){if(!v)return;const t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,o=t.scrollWidth;if(i===o)return;const r=e.offsetLeft;let a=!1;r<n&&(a=!0);let s=!1;if(!a){const t=i-(r-n);let o=e.clientWidth;null!==e.nextElementSibling&&(s=!0,o+=20),t<o&&(a=!0)}a&&m(t,r,n,o,i,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToTab=t.getTabMenu=t.setup=t.selectErroneousTabs=void 0,n=i.__importDefault(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);let b=null,v=!1;const _=new Map;t.selectErroneousTabs=d,t.setup=function(){c(),d(),n.default.add("WoltLabSuite/Core/Ui/TabMenu",c),a.default.add("WoltLabSuite/Core/Ui/TabMenu",(()=>{b&&(b.classList.remove("active"),b=null)})),s.on("screen-sm-down",{match(){u(!1)},unmatch:p,setup(){u(!0)}}),window.addEventListener("hashchange",(()=>{const e=r.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&_.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=r.default.getIdentifierFromHash();e&&window.setTimeout((()=>{const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const i=t.parentNode;let n=i.offsetTop-50;if(n<0&&(n=0),e>n){let e=o.default.offset(i).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=f,t.scrollToTab=g})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Environment","../Helper/PageOverlay","../Helper/Selector","./Alignment"],(function(e,t,i,n,o,r,a){"use strict";function s(e){const t=e.currentTarget;let i=t.title.trim();""!==i&&(t.dataset.tooltip=i,t.setAttribute("aria-label",i),t.removeAttribute("title")),i=t.dataset.tooltip||"",d.style.removeProperty("top"),d.style.removeProperty("left"),i.length?(d.classList.add("active"),c.textContent=i,a.set(d,t,{horizontal:"center",verticalOffset:4,vertical:"top"})):d.classList.remove("active")}function l(){d.classList.remove("active")}let c,d;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),a=i.__importStar(a),t.setup=function(){"desktop"===n.platform()&&(d=document.createElement("div"),d.id="balloonTooltip",d.classList.add("balloonTooltip"),d.addEventListener("transitionend",(()=>{d.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{d.style.removeProperty(e)}))})),c=document.createElement("span"),c.id="balloonTooltipText",d.appendChild(c),(0,o.getPageOverlayContainer)().append(d),(0,r.wheneverSeen)(".jsTooltip",(e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),e.addEventListener("click",l))})),window.addEventListener("scroll",l))}})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o);class r{activeElement;description;elements=new Map;input;submitButton;init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const i=e.dataset.link;t=i?e=>{window.location.href=i.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((i=>{i.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,o.default.open(this);const i=e.dataset.pages||"0";this.input.value=i,this.input.max=i,this.input.select(),this.description.textContent=n.get("wcf.page.jumpTo.description").replace(/#pages#/,i)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),o.default.close(this)}_dialogSetup(){const e=`<dl>\n        <dt><label for="jsPaginationPageNo">${n.get("wcf.page.jumpTo")}</label></dt>\n                <dd>\n          <input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny">\n          <small></small>\n        </dd>\n      </dl>\n      <div class="formSubmit">\n        <button type="button" class="button buttonPrimary">${n.get("wcf.global.button.submit")}</button>\n      </div>`;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:n.get("wcf.global.page.pagination")},source:e}}}let a=null;t.init=function(e,t){(null===a&&(a=new r),a).init(e,t)}})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,i,n,o){"use strict";function r(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.activeElement,i=document.createElement("div");i.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",i),i.appendChild(e);const n=document.createElement("button");n.type="button",n.title=o.get("wcf.global.form.password.button.show"),n.classList.add("button","inputSuffix","jsTooltip"),n.setAttribute("aria-hidden","true"),i.appendChild(n);const r=document.createElement("fa-icon");r.setIcon("eye"),n.appendChild(r),n.addEventListener("click",(()=>{a(e,n,r)})),e.form?.addEventListener("submit",(()=>{"password"!==e.type&&a(e,n,r)})),t===e&&e.focus()}(e)}))}function a(e,t,i){"password"===e.type?(i.setIcon("eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.hide"),e.type="text"):(i.setIcon("eye"),t.dataset.tooltip=o.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new WeakSet;t.setup=function(){r(),n.default.add("WoltLabSuite/Core/Ui/Password",(()=>r()))}})),define("WoltLabSuite/Core/Ui/Empty",["require","exports","tslib","../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((e=>{e.classList.remove("jsReloadPageWhenEmpty"),r.observe(e,{childList:!0})}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n);const r=new MutationObserver((e=>{e.forEach((e=>{const t=e.target;(0===t.childElementCount||Array.from(t.children).every((e=>"ignore"===e.dataset.reloadPageWhenEmpty)))&&window.location.reload()}))}));t.setup=function(){o(),n.default.add("WoltLabSuite/Core/Ui/Empty",(()=>o()))}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,i,n,o,r){"use strict";function a(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r);class s{_active=!1;parameters;confirmButton;_content;dialog;text;callbackCancel;callbackConfirm;constructor(){this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.type="button",this.confirmButton.dataset.type="submit",this.confirmButton.classList.add("button","buttonPrimary"),this.confirmButton.textContent=o.get("wcf.global.confirmation.confirm"),e.appendChild(this.confirmButton);const t=document.createElement("button");t.type="button",t.classList.add("button"),t.textContent=o.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{r.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,r.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,r.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){window.setTimeout((()=>{this.confirmButton.blur(),this.confirmButton.focus()}),1)}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:o.get("wcf.global.confirmation.title")}}}_dialogSubmit(){this._confirm()}}let l;t.show=function(e){if(!a().active){if((e=n.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");a().open(e)}},t.getContentElement=function(){return a().content}})),define("WoltLabSuite/Core/Ui/Object/Action",["require","exports","tslib","../../Ajax","../../Event/Handler","../Confirmation","../../Language","../../StringUtil","../../Dom/Change/Listener"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(`${d} ${u} ${p}`).forEach((e=>{m.has(e)||(e.addEventListener("click",(e=>function(e){function t(){n.apiOnce({data:{actionName:l,className:c,objectIDs:[p],parameters:m},success:e=>function(e,t){"reload"===e.dataset.objectActionSuccess?window.location.reload():o.fire("WoltLabSuite/Core/Ui/Object/Action",e.dataset.objectAction,{containerElement:e.closest(d),data:t,objectElement:e.closest(u)})}(i,e)})}e.preventDefault();const i=e.currentTarget,l=i.dataset.objectAction;let c=i.closest(d).dataset.objectActionClassName;i.dataset.objectActionClassName&&(c=i.dataset.objectActionClassName);let p=i.closest(u).dataset.objectId;i.dataset.objectId&&(p=i.dataset.objectId);const m={};Object.entries(i.dataset).forEach((([e,t])=>{let i=/^objectActionParameterData(.+)/.exec(e);if(i)Object.prototype.hasOwnProperty.call(m,"data")||(m.data={}),m.data[s.lcfirst(i[1])]=t;else if(i=/^objectActionParameter(.+)/.exec(e),i){const e=s.lcfirst(i[1]);if("data"===e)throw new Error("Additional object action parameters may not use 'data' as key.");m[e]=t}})),i.dataset.confirmMessage?r.show({confirm:t,message:a.get(i.dataset.confirmMessage),messageIsHtml:!0}):t()}(e))),m.add(e))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importDefault(l);const d=".jsObjectActionContainer[data-object-action-class-name]",u=".jsObjectActionObject[data-object-id]",p=".jsObjectAction[data-object-action]",m=new Set;t.setup=function(){c(),l.default.add("WoltLabSuite/Core/Ui/Action",(()=>c()))}})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";function m(){return f||(f=new h),f}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),p=i.__importStar(p);class h{containers=new Map;editors=new Map;editorDropdowns=new Map;itemData=new WeakMap;knownCheckboxes=new WeakSet;pageClassNames=[];pageObjectId=0;reloadPageOnSuccess=new Map;setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),r.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=a.default.identify(e);let i=this.containers.get(t);if(void 0===i){const n=e.querySelector(".jsClipboardMarkAll");null!==n&&(n.dataset.containerId=t,n.addEventListener("click",(e=>this.markAll(e)))),i={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:n,markedObjectIds:new Set},this.containers.set(t,i)}Array.from(i.checkboxes).forEach((e=>{this.knownCheckboxes.has(e)||(e.dataset.containerId=t,null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e))}))}))}loadMarkedItems(){n.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,i="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,i);const n=[],o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type;Array.from(r.checkboxes).forEach((e=>{const o=~~e.dataset.objectId;i?e.checked||(e.checked=!0,r.markedObjectIds.add(o),n.push(o)):e.checked&&(e.checked=!1,r.markedObjectIds.delete(o),n.push(o)),this.setParentAsMarked(e,i);const a=t.closest(".jsClipboardObject");null!==a&&(i?a.classList.add("jsMarked"):a.classList.remove("jsMarked"))})),this.saveState(a,n,i)}mark(e){const t=e instanceof Event?e.currentTarget:e,i=~~t.dataset.objectId,n=t.checked,o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type,s=t.closest(".jsClipboardObject");n?(r.markedObjectIds.add(i),s.classList.add("jsMarked")):(r.markedObjectIds.delete(i),s.classList.remove("jsMarked")),null!==r.markAll&&(r.markAll.checked=!Array.from(r.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(r.markAll,n)),this.setParentAsMarked(t,t.checked),this.saveState(a,[i],n)}saveState(e,t,i){n.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=i.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:i,responseData:null})}const i=e.currentTarget,n=this.itemData.get(i);if(n.url)return void(window.location.href=n.url);const r="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"";let a=!0;if(o.isPlainObject(n.parameters)&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(r.length){const e="string"==typeof n.internalData.template?n.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const i=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[i]=e.value);break;case"SELECT":t[i]=e.value;break;case"TEXTAREA":t[i]=e.value.trim()}})),this.executeProxyAction(i,n,t)},message:r,template:e})}else this.executeProxyAction(i,n)}else r.length&&(a=!1,c.show({confirm:t,message:r}));a&&t()}executeProxyAction(e,t,i={}){const r="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],a={data:i};o.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{a[e]=t})),n.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:r,parameters:a},(i=>{if("unmarkAll"!==t.actionName){const n=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",n,{data:t,listItem:e,responseData:i});const o=this.reloadPageOnSuccess.get(n);if(o&&o.includes(i.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;n.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=o.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const i=e.element.dataset.type,n=Array.isArray(t[i])?t[i]:[];this.rebuildMarkings(e,n)}));const i=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{i.includes(t)||(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let n=!1,o=this.editors.get(e),r=this.editorDropdowns.get(e);void 0===o?(n=!0,o=document.createElement("a"),o.className="dropdownToggle",o.textContent=t.label,this.editors.set(e,o),r=document.createElement("ol"),r.className="dropdownMenu",this.editorDropdowns.set(e,r)):(o.textContent=t.label,r.innerHTML=""),Object.values(t.items).forEach((t=>{const i=document.createElement("li"),n=document.createElement("span");n.textContent=t.label,i.appendChild(n),r.appendChild(i),i.dataset.type=e,i.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(i,t)}));const a=document.createElement("li");a.classList.add("dropdownDivider"),r.appendChild(a);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),r.appendChild(s),-1!==i.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):(u.add(t,o),n=!0)}if(n){const e=o.parentElement;e.classList.add("dropdown"),e.appendChild(r),d.default.init(o)}}))}rebuildMarkings(e,t){let i=!0;if(Array.from(e.checkboxes).forEach((e=>{const n=e.closest(".jsClipboardObject"),o=t.includes(~~e.dataset.objectId);o||(i=!1),e.checked=o,o?n.classList.add("jsMarked"):n.classList.remove("jsMarked"),this.setParentAsMarked(e,o)})),null!==e.markAll){e.markAll.checked=i,this.setParentAsMarked(e.markAll,i);const t=e.markAll.closest(".columnMark")?.parentNode;t&&(i?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const i=e.parentElement;"checkbox"===i.getAttribute("role")&&i.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),p.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),p.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let f;t.setup=function(e){m().setup(e)},t.reload=function(){m().reload()},t.hideEditor=function(e){m().hideEditor(e)},t.showEditor=function(){m().showEditor()},t.unmark=function(e,t){m().unmark(e,t)}})),define("WoltLabSuite/Core/Ui/Object/Action/Handler",["require","exports","tslib","../../../Event/Handler","../../../Controller/Clipboard"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=i.__importStar(n),o=i.__importStar(o),t.default=class{objectAction;constructor(e,t,i){this.objectAction=i,n.add("WoltLabSuite/Core/Ui/Object/Action",e,(e=>this.handleObjectAction(e))),document.querySelectorAll(".jsClipboardContainer[data-type]").forEach((e=>{n.add("com.woltlab.wcf.clipboard",e.dataset.type,(e=>{null!==e.responseData&&-1!==t.indexOf(e.responseData.actionName)&&this.handleClipboardAction(e)}))}))}handleClipboardAction(e){const t=e.listItem.dataset.type;document.querySelectorAll(`.jsClipboardContainer[data-type="${t}"] .jsClipboardObject`).forEach((t=>{const i=t.dataset.objectId;e.responseData.objectIDs.forEach((n=>{~~n==~~i&&this.objectAction({containerElement:t.closest(".jsObjectActionContainer"),data:e.responseData,objectElement:t})}))}))}handleObjectAction(e){this.objectAction(e),o.reload()}}})),define("WoltLabSuite/Core/Ui/Object/Action/Delete",["require","exports","tslib","./Handler"],(function(e,t,i,n){"use strict";function o(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="delete"]');if(!t||t.dataset.objectActionHandler)return;const i=e.objectElement.querySelector(".jsObjectActionObjectChildren");i&&Array.from(i.children).forEach((t=>{e.objectElement.insertAdjacentElement("beforebegin",t)})),e.objectElement.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),t.setup=function(){new n.default("delete",["delete"],o)}})),define("WoltLabSuite/Core/Ui/Object/Action/Toggle",["require","exports","tslib","../../../Language","./Handler"],(function(e,t,i,n,o){"use strict";function r(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="toggle"]');if(!t||t.dataset.objectActionHandler)return;const i="FA-ICON"===t.nodeName?t:t.querySelector("fa-icon");if(i)if("square"===i.name){i.setIcon("square-check");const e=t.dataset.disableTitle||n.get("wcf.global.button.disable");t.title=e}else{i.setIcon("square");const e=t.dataset.enableTitle||n.get("wcf.global.button.enable");t.title=e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),t.setup=function(){new o.default("toggle",["enable","disable"],r)}})),define("WoltLabSuite/Core/Ui/Search",["require","exports","tslib","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Simple","./Screen","../Environment","../Dom/Util"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";function d(){r.default.execute(r.Origin.Search),h.classList.add("searchBarOpen"),w?.parentElement.classList.add("open"),m||o.set(g,_,{horizontal:"right"}),g.style.setProperty("top",`${f.clientHeight}px`,""),v.focus(),window.setTimeout((()=>{const e=v.value.length;v.selectionStart=e,v.selectionEnd=e}),1)}function u(){if(!h.classList.contains("searchBarOpen")&&!g.classList.contains("open"))return;h.classList.remove("searchBarOpen"),g.classList.remove("open"),w?.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{g.style.removeProperty(e)})),"ios"===l.platform()&&(s.scrollEnable(),void 0!==p&&(document.body.scrollTop=p,p=void 0)),m&&v.blur();const e=document.getElementById("pageHeaderSearchMobile");e&&(e.setAttribute("aria-expanded","false"),e.querySelector("fa-icon").setIcon("magnifying-glass"));const t=g.querySelector(".pageHeaderSearchType");a.default.close(t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);let p,m=!1;document.body.classList.contains("wcfAcp");const h=document.getElementById("pageHeader"),f=document.getElementById("pageHeaderPanel"),g=document.getElementById("pageHeaderSearch");let b;const v=document.getElementById("pageHeaderSearchInput"),_=document.getElementById("topMenu"),w=document.getElementById("userPanelSearchButton");t.init=function(){null!==g&&(function(){g.addEventListener("click",(e=>e.stopPropagation()));const e=document.querySelector(".pageHeaderSearchType"),t=(0,c.identify)(e);a.default.getDropdownMenu(t).addEventListener("click",(e=>{e.stopPropagation(),a.default.close(t)})),w?.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),h.classList.contains("searchBarOpen")?u():d()})),r.default.add("WoltLabSuite/Core/Ui/Search",((e,t)=>{if(e!==r.Origin.Search){if(e===r.Origin.DropDown){if(document.getElementById("pageHeaderSearchTypeSelect").dataset.target===t)return;if(v.parentElement.id===t)return}u(),b?.setAttribute("aria-expanded","false")}}))}(),s.on("screen-md-down",{match(){m=!0},unmatch(){m=!1,p=void 0},setup(){m=!0,function(){const e=document.getElementById("pageHeaderSearchMobile");b=e,e.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"true"===e.getAttribute("aria-expanded")?u():("ios"===l.platform()&&(p=document.body.scrollTop,s.scrollDisable()),d(),g.style.setProperty("top",`${h.offsetHeight}px`,""),g.classList.add("open"),v.focus(),"ios"===l.platform()&&(document.body.scrollTop=0),e.setAttribute("aria-expanded","true"),e.querySelector("fa-icon").setIcon("xmark"))})),g.addEventListener("click",(e=>{e.stopPropagation(),e.target===g&&(e.preventDefault(),u())}))}()}}),n.add("com.woltlab.wcf.Search","close",(()=>u())))}})),define("WoltLabSuite/Core/LazyLoader",["require","exports"],(function(e,t){"use strict";function i(e){void 0!==r.get(e)&&window.cancelAnimationFrame(r.get(e)),r.set(e,window.requestAnimationFrame((()=>{for(const t of o.keys())if(e.matches(t)||null!==e.querySelector(t)){for(const e of o.get(t))a.then((()=>e()));o.delete(t)}r.delete(e)})))}let n;Object.defineProperty(t,"__esModule",{value:!0}),t.whenFirstSeen=void 0;const o=new Map,r=new Map,a=new Promise((e=>{"loading"===document.readyState?document.addEventListener("readystatechange",(()=>e()),{once:!0}):e()}));t.whenFirstSeen=function(e,t){o.has(e)||o.set(e,[]),o.get(e).push(t),i(document.body),void 0===n&&(n=new MutationObserver((e=>{if(0!==o.size)for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&i(e)}))),n.observe(document,{subtree:!0,childList:!0})}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(e=e||self).PerfectScrollbar=t()}(this,(function(){"use strict";function e(e){return getComputedStyle(e)}function t(e,t){var i,n;for(i in t)"number"==typeof(n=t[i])&&(n+="px"),e.style[i]=n;return e}function i(e){var t=document.createElement("div");return t.className=e,t}function n(e,t){if(!v)throw new Error("No element matching method supported");return v.call(e,t)}function o(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function r(e,t){return Array.prototype.filter.call(e.children,(function(e){return n(e,t)}))}function a(e,t){var i=e.element.classList,n=_.state.scrolling(t);i.contains(n)?clearTimeout(w[t]):i.add(n)}function s(e,t){w[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(_.state.scrolling(t))}),e.settings.scrollingThreshold)}function l(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function c(e,t,i,n,o){var r;if(void 0===n&&(n=!0),void 0===o&&(o=!1),"top"===t)r=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");r=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,i,n,o){var r,c=i[0],d=i[1],u=i[2],p=i[3],m=i[4],h=i[5];void 0===n&&(n=!0),void 0===o&&(o=!1),r=e.element,e.reach[p]=null,r[u]<1&&(e.reach[p]="start"),r[u]>e[c]-e[d]-1&&(e.reach[p]="end"),t&&(r.dispatchEvent(l("ps-scroll-"+p)),t<0?r.dispatchEvent(l("ps-scroll-"+m)):t>0&&r.dispatchEvent(l("ps-scroll-"+h)),n&&function(e,t){a(e,t),s(e,t)}(e,p)),e.reach[p]&&(t||o)&&r.dispatchEvent(l("ps-"+p+"-reach-"+e.reach[p]))}(e,i,r,n,o)}function d(e){return parseInt(e,10)||0}function u(e){var i=e.element,n=Math.floor(i.scrollTop),a=i.getBoundingClientRect();e.containerWidth=Math.round(a.width),e.containerHeight=Math.round(a.height),e.contentWidth=i.scrollWidth,e.contentHeight=i.scrollHeight,i.contains(e.scrollbarXRail)||(r(i,_.element.rail("x")).forEach((function(e){return o(e)})),i.appendChild(e.scrollbarXRail)),i.contains(e.scrollbarYRail)||(r(i,_.element.rail("y")).forEach((function(e){return o(e)})),i.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=p(e,d(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=d((e.negativeScrollAdjustment+i.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=p(e,d(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=d(n*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,i){var n,o={width:i.railXWidth},r=Math.floor(e.scrollTop);i.isRtl?o.left=i.negativeScrollAdjustment+e.scrollLeft+i.containerWidth-i.contentWidth:o.left=e.scrollLeft,i.isScrollbarXUsingBottom?o.bottom=i.scrollbarXBottom-r:o.top=i.scrollbarXTop+r,t(i.scrollbarXRail,o),n={top:r,height:i.railYHeight},i.isScrollbarYUsingRight?i.isRtl?n.right=i.contentWidth-(i.negativeScrollAdjustment+e.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth-9:n.right=i.scrollbarYRight-e.scrollLeft:i.isRtl?n.left=i.negativeScrollAdjustment+e.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:n.left=i.scrollbarYLeft+e.scrollLeft,t(i.scrollbarYRail,n),t(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),t(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}(i,e),e.scrollbarXActive?i.classList.add(_.state.active("x")):(i.classList.remove(_.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,i.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?i.classList.add(_.state.active("y")):(i.classList.remove(_.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,i.scrollTop=0)}function p(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 m(e,t){function i(t){t.touches&&t.touches[0]&&(t[c]=t.touches[0].pageY),b[h]=v+y*(t[c]-w),a(e,f),u(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function n(){s(e,f),e[g].classList.remove(_.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",i)}function o(t,o){v=b[h],o&&t.touches&&(t[c]=t.touches[0].pageY),w=t[c],y=(e[l]-e[r])/(e[d]-e[m]),o?e.event.bind(e.ownerDocument,"touchmove",i):(e.event.bind(e.ownerDocument,"mousemove",i),e.event.once(e.ownerDocument,"mouseup",n),t.preventDefault()),e[g].classList.add(_.state.clicking),t.stopPropagation()}var r=t[0],l=t[1],c=t[2],d=t[3],p=t[4],m=t[5],h=t[6],f=t[7],g=t[8],b=e.element,v=null,w=null,y=null;e.event.bind(e[p],"mousedown",(function(e){o(e)})),e.event.bind(e[p],"touchstart",(function(e){o(e,!0)}))}var h,f,g,b,v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),_={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},w={x:null,y:null},y=function(e){this.element=e,this.handlers={}},E={isEmpty:{configurable:!0}};return y.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,{passive:!1})},y.prototype.unbind=function(e,t){var i=this;this.handlers[e]=this.handlers[e].filter((function(n){return!(!t||n===t)||(i.element.removeEventListener(e,n,!1),!1)}))},y.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},E.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(y.prototype,E),(h=function(){this.eventElements=[]}).prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new y(e),this.eventElements.push(t)),t},h.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},h.prototype.unbind=function(e,t,i){var n=this.eventElement(e);n.unbind(t,i),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)},h.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},h.prototype.once=function(e,t,i){var n=this.eventElement(e),o=function(e){n.unbind(t,o),i(e)};n.bind(t,o)},f={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},g={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var i=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=i*e.containerHeight,u(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var i=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=i*e.containerWidth,u(e),t.stopPropagation()}))},"drag-thumb":function(e){m(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),m(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(i){var o,r,a,s;if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&(n(t,":hover")||n(e.scrollbarX,":focus")||n(e.scrollbarY,":focus"))){if(o=document.activeElement?document.activeElement:e.ownerDocument.activeElement){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(n(s=o,"input,[contenteditable]")||n(s,"select,[contenteditable]")||n(s,"textarea,[contenteditable]")||n(s,"button,[contenteditable]"))return}switch(r=0,a=0,i.which){case 37:r=i.metaKey?-e.contentWidth:i.altKey?-e.containerWidth:-30;break;case 38:a=i.metaKey?e.contentHeight:i.altKey?e.containerHeight:30;break;case 39:r=i.metaKey?e.contentWidth:i.altKey?e.containerWidth:30;break;case 40:a=i.metaKey?-e.contentHeight:i.altKey?-e.containerHeight:-30;break;case 32:a=i.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:a=e.containerHeight;break;case 34:a=-e.containerHeight;break;case 36:a=e.contentHeight;break;case 35:a=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==r||e.settings.suppressScrollY&&0!==a||(t.scrollTop-=a,t.scrollLeft+=r,u(e),function(i,n){var o,r=Math.floor(t.scrollTop);if(0===i){if(!e.scrollbarYActive)return!1;if(0===r&&n>0||r>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}if(o=t.scrollLeft,0===n){if(!e.scrollbarXActive)return!1;if(0===o&&i<0||o>=e.contentWidth-e.containerWidth&&i>0)return!e.settings.wheelPropagation}return!0}(r,a)&&i.preventDefault())}}))},wheel:function(t){function i(i){var o,r=function(e){var t=e.deltaX,i=-1*e.deltaY;return void 0!==t&&void 0!==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),e.shiftKey?[-i,-t]:[t,i]}(i),a=r[0],s=r[1];(function(t,i,o){var r,a,s,l;if(!f.isWebKit&&n.querySelector("select:focus"))return!0;if(!n.contains(t))return!1;for(r=t;r&&r!==n;){if(r.classList.contains(_.element.consuming))return!0;if(a=e(r),o&&a.overflowY.match(/(scroll|auto)/)&&(s=r.scrollHeight-r.clientHeight)>0&&(r.scrollTop>0&&o<0||r.scrollTop<s&&o>0))return!0;if(i&&a.overflowX.match(/(scroll|auto)/)&&(l=r.scrollWidth-r.clientWidth)>0&&(r.scrollLeft>0&&i<0||r.scrollLeft<l&&i>0))return!0;r=r.parentNode}return!1})(i.target,a,s)||(o=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?n.scrollTop-=s*t.settings.wheelSpeed:n.scrollTop+=a*t.settings.wheelSpeed,o=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(a?n.scrollLeft+=a*t.settings.wheelSpeed:n.scrollLeft-=s*t.settings.wheelSpeed,o=!0):(n.scrollTop-=s*t.settings.wheelSpeed,n.scrollLeft+=a*t.settings.wheelSpeed),u(t),o=o||function(e,i){var o=Math.floor(n.scrollTop),r=0===n.scrollTop,a=o+n.offsetHeight===n.scrollHeight,s=0===n.scrollLeft,l=n.scrollLeft+n.offsetWidth===n.scrollWidth;return!(Math.abs(i)>=Math.abs(e)?r&&i>0||a&&i<0:s&&e>0||l&&e<0)||!t.settings.wheelPropagation}(a,s),o&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault()))}var n=t.element;void 0!==window.onwheel?t.event.bind(n,"wheel",i):void 0!==window.onmousewheel&&t.event.bind(n,"mousewheel",i)},touch:function(t){function i(e,i){l.scrollTop-=i,l.scrollLeft-=e,u(t)}function n(e){return e.targetTouches?e.targetTouches[0]:e}function o(e){return!(e.pointerType&&"pen"===e.pointerType&&0===e.buttons||(!e.targetTouches||1!==e.targetTouches.length)&&(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function r(e){if(o(e)){var t=n(e);c.pageX=t.pageX,c.pageY=t.pageY,d=(new Date).getTime(),null!==m&&clearInterval(m)}}function a(r){var a,s,u,m,h,g;if(o(r)){if(u=(s={pageX:(a=n(r)).pageX,pageY:a.pageY}).pageX-c.pageX,m=s.pageY-c.pageY,function(t,i,n){var o,r,a,s;if(!l.contains(t))return!1;for(o=t;o&&o!==l;){if(o.classList.contains(_.element.consuming))return!0;if(r=e(o),n&&r.overflowY.match(/(scroll|auto)/)&&(a=o.scrollHeight-o.clientHeight)>0&&(o.scrollTop>0&&n<0||o.scrollTop<a&&n>0))return!0;if(i&&r.overflowX.match(/(scroll|auto)/)&&(s=o.scrollWidth-o.clientWidth)>0&&(o.scrollLeft>0&&i<0||o.scrollLeft<s&&i>0))return!0;o=o.parentNode}return!1}(r.target,u,m))return;i(u,m),c=s,(g=(h=(new Date).getTime())-d)>0&&(p.x=u/g,p.y=m/g,d=h),function(e,i){var n=Math.floor(l.scrollTop),o=l.scrollLeft,r=Math.abs(e),a=Math.abs(i);if(a>r){if(i<0&&n===t.contentHeight-t.containerHeight||i>0&&0===n)return 0===window.scrollY&&i>0&&f.isChrome}else if(r>a&&(e<0&&o===t.contentWidth-t.containerWidth||e>0&&0===o))return!0;return!0}(u,m)&&r.preventDefault()}}function s(){t.settings.swipeEasing&&(clearInterval(m),m=setInterval((function(){t.isInitialized?clearInterval(m):p.x||p.y?Math.abs(p.x)<.01&&Math.abs(p.y)<.01?clearInterval(m):t.element?(i(30*p.x,30*p.y),p.x*=.8,p.y*=.8):clearInterval(m):clearInterval(m)}),10))}var l,c,d,p,m;(f.supportsTouch||f.supportsIePointer)&&(l=t.element,c={},d=0,p={},m=null,f.supportsTouch?(t.event.bind(l,"touchstart",r),t.event.bind(l,"touchmove",a),t.event.bind(l,"touchend",s)):f.supportsIePointer&&(window.PointerEvent?(t.event.bind(l,"pointerdown",r),t.event.bind(l,"pointermove",a),t.event.bind(l,"pointerup",s)):window.MSPointerEvent&&(t.event.bind(l,"MSPointerDown",r),t.event.bind(l,"MSPointerMove",a),t.event.bind(l,"MSPointerUp",s))))}},(b=function(n,o){var r,a,s,l,c,p,m,f=this;if(void 0===o&&(o={}),"string"==typeof n&&(n=document.querySelector(n)),!n||!n.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(r in this.element=n,n.classList.add(_.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},o)this.settings[r]=o[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null,a=function(){return n.classList.add(_.state.focus)},s=function(){return n.classList.remove(_.state.focus)},this.isRtl="rtl"===e(n).direction,!0===this.isRtl&&n.classList.add(_.rtl),this.isNegativeScroll=(p=n.scrollLeft,null,n.scrollLeft=-1,m=n.scrollLeft<0,n.scrollLeft=p,m),this.negativeScrollAdjustment=this.isNegativeScroll?n.scrollWidth-n.clientWidth:0,this.event=new h,this.ownerDocument=n.ownerDocument||document,this.scrollbarXRail=i(_.element.rail("x")),n.appendChild(this.scrollbarXRail),this.scrollbarX=i(_.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null,l=e(this.scrollbarXRail),this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=d(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=d(l.borderLeftWidth)+d(l.borderRightWidth),t(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=d(l.marginLeft)+d(l.marginRight),t(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=i(_.element.rail("y")),n.appendChild(this.scrollbarYRail),this.scrollbarY=i(_.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null,c=e(this.scrollbarYRail),this.scrollbarYRight=parseInt(c.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=d(c.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var i=e(t);return d(i.width)+d(i.paddingLeft)+d(i.paddingRight)+d(i.borderLeftWidth)+d(i.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=d(c.borderTopWidth)+d(c.borderBottomWidth),t(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=d(c.marginTop)+d(c.marginBottom),t(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:n.scrollLeft<=0?"start":n.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:n.scrollTop<=0?"start":n.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return g[e](f)})),this.lastScrollTop=Math.floor(n.scrollTop),this.lastScrollLeft=n.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return f.onScroll(e)})),u(this)}).prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,t(this.scrollbarXRail,{display:"block"}),t(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=d(e(this.scrollbarXRail).marginLeft)+d(e(this.scrollbarXRail).marginRight),this.railYMarginHeight=d(e(this.scrollbarYRail).marginTop)+d(e(this.scrollbarYRail).marginBottom),t(this.scrollbarXRail,{display:"none"}),t(this.scrollbarYRail,{display:"none"}),u(this),c(this,"top",0,!1,!0),c(this,"left",0,!1,!0),t(this.scrollbarXRail,{display:""}),t(this.scrollbarYRail,{display:""}))},b.prototype.onScroll=function(e){this.isAlive&&(u(this),c(this,"top",this.element.scrollTop-this.lastScrollTop),c(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},b.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},b.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")},b})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Form/XsrfToken","./Language","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password","./Ui/Empty","./Ui/Object/Action","./Ui/Object/Action/Delete","./Ui/Object/Action/Toggle","./Ui/Search","./LazyLoader","./Helper/PageOverlay","perfect-scrollbar"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f,g,b,v,_,w,y,E,S,C,L){"use strict";function k(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importDefault(u),p=i.__importDefault(p),m=i.__importStar(m),h=i.__importStar(h),f=i.__importStar(f),g=i.__importStar(g),b=i.__importStar(b),v=i.__importStar(v),_=i.__importStar(_),w=i.__importStar(w),y=i.__importStar(y),E=i.__importStar(E),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=l,t.setup=function(t){t=n.extend({colorScheme:"light",enableMobileMenu:!0,pageMenuMainProvider:void 0},t),c.setup(),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),(0,L.adoptPageOverlayContainer)(document.body),s.setup(),o.default.init(),p.default.setup(),m.setup(t.enableMobileMenu,t.pageMenuMainProvider),f.setup(),u.default.setup(),g.setup(),v.setup(),_.setup(),w.setup(),y.setup(),E.setup(),(0,S.init)(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===s.browser()&&(window.onbeforeunload=()=>{});let l=0;l=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(l),window.jQuery((()=>{h.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==s.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),window.requestAnimationFrame((()=>{const e=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.setProperty("--scrollbar-width",`${e}px`)})),k(),a.default.add("WoltLabSuite/Core/Bootstrap",(()=>k)),t.dynamicColorScheme&&new Promise(((t,i)=>{e(["./Controller/Style/ColorScheme"],t,i)})).then(i.__importStar).then((({setup:e})=>{e()})),(0,C.whenFirstSeen)("[data-report-content]",(()=>{new Promise(((t,i)=>{e(["./Ui/Moderation/Report"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-pagination",(()=>{new Promise(((t,i)=>{e(["./Ui/Pagination/JumpToPage"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-google-maps",(()=>{new Promise(((t,i)=>{e(["./Component/GoogleMaps/woltlab-core-google-maps"],t,i)})).then(i.__importStar)})),(0,C.whenFirstSeen)("[data-google-maps-geocoding]",(()=>{new Promise(((t,i)=>{e(["./Component/GoogleMaps/Geocoding"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-file",(()=>{new Promise(((t,i)=>{e(["./Component/File/woltlab-core-file"],t,i)})).then(i.__importStar)})),(0,C.whenFirstSeen)("woltlab-core-file-upload",(()=>{new Promise(((t,i)=>{e(["./Component/File/woltlab-core-file"],t,i)})).then(i.__importStar),new Promise(((t,i)=>{e(["./Component/File/Upload"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes){if(!(e instanceof HTMLElement))continue;if(null===e.querySelector(".g-recaptcha-bubble-arrow"))continue;const t=e.querySelector("iframe");if(!t)continue;const i="a-"+t.name.split("-")[1],n=document.querySelector(`iframe[name="${i}"]`);n&&(n.closest("woltlab-core-dialog")&&((0,L.getPageOverlayContainer)().append(e),e.classList.add("g-recaptcha-container")))}})).observe(document.body,{childList:!0})}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){for(let e=0,t=a.length;e<t;e++){const t=a[e];s.has(t)||(t.addEventListener("click",r,{once:!0}),s.add(t))}}function r(e){e.preventDefault();const t=e.currentTarget;t.classList.remove("ignoredUserMessage"),s.delete(t),window.getSelection().removeAllRanges()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importDefault(n);const a=document.getElementsByClassName("ignoredUserMessage"),s=new Set;t.init=function(){o(),n.default.add("WoltLabSuite/Core/Ui/User/Ignore",o)}})),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["require","exports","tslib","../../../Environment","../../../Language","../../Screen"],(function(e,t,i,n,o,r){"use strict";function a(){f=!0,"safari"===n.browser()?window.setTimeout(c,1e3):window.requestAnimationFrame((()=>c()))}function s(){f=!1}function l(e){g=Math.min(g+e,0),m.style.setProperty("margin-left",`${g}px`,"")}function c(){if(!f)return;b=[],v=[];const e=h.clientWidth,t=h.scrollWidth;!p&&t>e&&(u=document.createElement("a"),u.className="mainMenuShowNext",u.href="#",u.innerHTML='<fa-icon size="32" name="angle-right" solid></fa-icon>',u.setAttribute("aria-hidden","true"),u.addEventListener("click",(e=>{e.preventDefault(),function(){if(v.length){const e=v.slice(0,3).pop();l(h.clientWidth-(e.offsetLeft+e.clientWidth)),h.lastElementChild===e&&u.classList.remove("active"),p.classList.add("active")}}()})),h.insertAdjacentElement("beforebegin",u),p=document.createElement("a"),p.className="mainMenuShowPrevious",p.href="#",p.innerHTML='<fa-icon size="32" name="angle-left" solid></fa-icon>',p.setAttribute("aria-hidden","true"),p.addEventListener("click",(e=>{e.preventDefault(),function(){if(b.length){const e=b.slice(-3)[0];l(-1*e.offsetLeft),h.firstElementChild===e&&p.classList.remove("active"),u.classList.add("active")}}()})),h.insertAdjacentElement("afterend",p)),(t>e||g<0)&&Array.from(h.children).forEach((t=>{const i=t.offsetLeft;i<0?b.push(t):i+t.clientWidth>e&&v.push(t)})),p?.classList[b.length?"add":"remove"]("active"),u?.classList[v.length?"add":"remove"]("active")}function d(){m.addEventListener("transitionend",c),new ResizeObserver((()=>{m.style.setProperty("margin-left","0px",""),g=0,c()})).observe(h),a(),h.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const i=document.createElement("button");i.type="button",i.className="visuallyHidden",i.setAttribute("aria-label",o.get("wcf.global.button.showMenu")),e.insertBefore(i,t.nextSibling);let n=!1;i.addEventListener("click",(()=>{n=!n,t.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-label",o.get(n?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);let u,p,m,h,f=!1,g=0,b=[],v=[];t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");h=e,m=t,r.on("screen-lg",{match:a,unmatch:s,setup:d})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class i{userId;username;link;guestTokenDialogEndpoint;constructor(e,t,i,n){this.userId=e,this.username=t,this.link=i,this.guestTokenDialogEndpoint=n}}let n;return{getLink:()=>n.link,init(e,t,o,r=""){if(n)throw new Error("User has already been initialized.");n=new i(e,t,o,r)},get userId(){return n.userId},get username(){return n.username},get guestTokenDialogEndpoint(){return n.guestTokenDialogEndpoint}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importDefault(s),l=i.__importDefault(l);class c{enableAll=!1;constructor(){"all"===window.sessionStorage.getItem(`${r.getStoragePrefix()}user-consent`)&&(this.enableAll=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){this.enableAll?this.enableAllExternalMedia():(0,n.wheneverFirstSeen)(".jsButtonMessageUserConsentEnable",(e=>{e.addEventListener("click",(e=>this.click(e)))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),l.default.userId?o.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${r.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){if(e.dataset.target)document.getElementById(e.dataset.target).hidden=!1;else{const t=atob(e.dataset.payload);s.default.insertHtml(t,e,"before")}e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let d;t.init=function(){d||(d=new c)}})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function i(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyElementTextToClipboard=t.copyTextToClipboard=void 0,t.copyTextToClipboard=i,t.copyElementTextToClipboard=async function(e){return i(e.textContent.replace(/\u200B/g,"").replace(/\u00A0/g," "))}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","../Helper/PageOverlay","../Language"],(function(e,t,i,n){"use strict";function o(){clearTimeout(s),a.classList.remove("active"),null!==c&&c(),l=!1}Object.defineProperty(t,"__esModule",{value:!0}),t.show=void 0;let r,a,s,l=!1,c=null,d=!1;t.show=function(e,t,u){l||(l=!0,d||(d=!0,a=document.createElement("div"),a.id="systemNotification",r=document.createElement("p"),r.addEventListener("click",o),a.appendChild(r),(0,i.getPageOverlayContainer)().appendChild(a)),c="function"==typeof t?t:null,r.className=u||"success",r.textContent=(0,n.getPhrase)(e||"wcf.global.success"),a.classList.add("active"),s=window.setTimeout(o,2e3))}})),define("WoltLabSuite/Core/Ui/Message/Share/Providers",["require","exports"],(function(e,t){"use strict";function i(e){n.add(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getShareProviders=t.addShareProviders=t.addShareProvider=void 0;const n=new Set;t.addShareProvider=i,t.addShareProviders=function(e){e.forEach((e=>i(e)))},t.getShareProviders=function(){return n}})),define("WoltLabSuite/Core/Ui/Message/Share/Dialog",["require","exports","tslib","../../../Dom/Traverse","../../../Clipboard","../../Notification","../../../StringUtil","../../../Dom/Change/Listener","./Providers","../../../Component/Dialog","WoltLabSuite/Core/Language","../../../Event/Handler"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";function p(e,t){return`\n    <dl>\n      <dt>${(0,d.getPhrase)(e)}</dt>\n      <dd>\n        <div class="inputAddon">\n          <input type="text" class="long" readonly value="${a.escapeHTML(t)}">\n          <button type="button" class="inputSuffix button jsTooltip shareDialogCopyButton" title="${(0,d.getPhrase)("wcf.message.share.copy")}">\n            <fa-icon name="copy"></fa-icon>\n          </button>\n        </div>\n      </dd>\n    </dl>\n  `}function m(e){e.preventDefault();const t=e.currentTarget,i=f(t),s=function(){const e=Array.from((0,l.getShareProviders)()).map((e=>{const[t,i,n]=e;return`\n      <li>\n        <button type="button" class="button small messageShareProvider" title="${i}" aria-label="${i}" data-identifier="${t}">\n          ${n}\n        </button>\n      </li>\n    `})).join("\n");return e?`<ul class="inlineList">${e}</ul>`:""}();let m="";s&&(m=`\n        <dl class="messageShareButtons jsMessageShareButtons" data-url="${a.escapeHTML(i)}">\n          <dt>${(0,d.getPhrase)("wcf.message.share.socialMedia")}</dt>\n          <dd>${s}</dd>\n        </dl>\n      `);let h="";_&&(h=`\n        <dl>\n          <dt></dt>\n          <dd>\n              <button type="button" class="button shareDialogNativeButton" data-url="${a.escapeHTML(i)}" data-title="${a.escapeHTML(t.dataset.linkTitle||"")}">\n                ${(0,d.getPhrase)("wcf.message.share.nativeShare")}\n              </button>\n          </dd>\n        </dl>\n      `);const v=`\n      <div class="shareContentDialog">\n        ${function(e){let t=p("wcf.message.share.permalink",f(e));return function(e){const t={bbcodes:[]},i=new CustomEvent("share:bbcodes",{cancelable:!0,detail:t}),n=f(e);return e.dispatchEvent(i),i.defaultPrevented?t.bbcodes:e.dataset.bbcode?[["wcf.message.share.permalink.bbcode",e.dataset.bbcode]]:n&&e.dataset.linkTitle?[["wcf.message.share.permalink.bbcode",`[url='${n}']${e.dataset.linkTitle}[/url]`]]:[]}(e).forEach((([e,i])=>{t+=p(e,i)})),function(e){const t={permalinkHtml:[]},i=new CustomEvent("share:permalink-html",{cancelable:!0,detail:t}),n=f(e);return e.dispatchEvent(i),i.defaultPrevented?t.permalinkHtml:n&&e.dataset.linkTitle?[["wcf.message.share.permalink.html",`<a href="${a.escapeHTML(n)}">${a.escapeHTML(e.dataset.linkTitle)}</a>`]]:[]}(e).forEach((([e,i])=>{t+=p(e,i)})),t}(t)}\n        ${m}\n        ${h}\n      </div>\n    `,w=(0,c.dialogFactory)().fromHtml(v).withoutControls();w.content.querySelectorAll(".shareDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,i=n.prevBySel(t,'input[type="text"]');await o.copyTextToClipboard(i.value),r.show((0,d.getPhrase)("wcf.message.share.copy.success"))}(e))))),_&&w.content.querySelector(".shareDialogNativeButton").addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,i={url:t.dataset.url};t.dataset.title&&(i.title=t.dataset.title),await window.navigator.share(i)}(e))),s&&function(e,t){const i={facebook:{selector:'.messageShareProvider[data-identifier="Facebook"]',share(){g("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{selector:'.messageShareProvider[data-identifier="Reddit"]',share(){g("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{selector:'.messageShareProvider[data-identifier="Twitter"]',share(){g("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{selector:'.messageShareProvider[data-identifier="LinkedIn"]',share(){g("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{selector:'.messageShareProvider[data-identifier="Pinterest"]',share(){g("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{selector:'.messageShareProvider[data-identifier="XING"]',share(){g("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{selector:'.messageShareProvider[data-identifier="WhatsApp"]',share(){window.location.href="https://api.whatsapp.com/send?text="+b()+"%20"+t}}};u.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:i,pageDescription:b(),pageUrl:t}),Object.values(i).forEach((t=>{e.querySelector(t.selector)?.addEventListener("click",(()=>t.share()))}))}(w.content,i),w.show((0,d.getPhrase)("wcf.message.share"))}function h(){document.querySelectorAll(".shareButton, .wsShareButton").forEach((e=>{v.has(e)||(e.addEventListener("click",(e=>m(e))),v.add(e))}))}function f(e){return e instanceof HTMLAnchorElement?e.href:e.dataset.link}function g(e,t,i,n){window.open(t.replace("{pageURL}",n).replace("{text}",b()+(i?`%20${n}`:"")),e,"height=600,width=600")}function b(){const e=document.querySelector('meta[property="og:title"]');return null!==e?encodeURIComponent(e.content):""}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),u=i.__importStar(u);const v=new WeakSet,_=void 0!==window.navigator.share;t.setup=function(){h(),s.default.add("WoltLabSuite/Core/Ui/Message/Share/Dialog",(()=>h()))}})),define("WoltLabSuite/Core/Ui/Feed/Dialog",["require","exports","tslib","../Dialog","../../StringUtil","../../Language","../../Clipboard","../Notification"],(function(e,t,i,n,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),t.setup=function(){document.querySelectorAll("a.rssFeed").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget,i=t.href,l=i.replace(/(\\?|&)at=[^&]*&?/,"$1").replace(/(\?|&)$/,"");n.default.openStatic("feedLinkDialog",`\n<woltlab-core-notice type="info">${r.get("wcf.global.rss.accessToken.info")}</woltlab-core-notice>\n<dl>\n  <dt>${r.get("wcf.global.rss.withoutAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${o.escapeHTML(l)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </button>\n    </div>\n  </dd>\n</dl>\n<dl>\n  <dt>${r.get("wcf.global.rss.withAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${o.escapeHTML(i)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </a>\n    </div>\n  </dd>\n</dl>\n`,{onShow(e){e.querySelectorAll(".feedLinkDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget.parentNode.querySelector('input[type="text"]');await a.copyTextToClipboard(t.value),s.show(r.get("wcf.global.rss.copy.success"))}(e)))))},title:t.title||r.get("wcf.global.button.rss")})}(e)))}))}})),define("WoltLabSuite/Core/Ui/Page/Menu/Main/Frontend",["require","exports"],(function(e,t){"use strict";function i(e,t){const n=e.querySelector(".boxMenuLink"),o=n.querySelector(".boxMenuLinkTitle").textContent;let r=0;const a=n.querySelector(".boxMenuLinkOutstandingItems");a&&(r=parseInt(a.textContent.replace(/[^0-9]/,""),10));const s=e.querySelector("ol");let l=[];if(s instanceof HTMLOListElement){let e=t;e<3&&(e=t+1),l=Array.from(s.children).map((t=>i(t,e)))}const c=n.getAttribute("href");let d,u;return c&&"#"!==c&&(d=n.href,"_blank"===n.target&&(u=!0)),{active:e.classList.contains("active"),children:l,counter:r,depth:t,identifier:n.parentElement.dataset.identifier,link:d,openInNewWindow:u,title:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.UiPageMenuMainFrontend=void 0;class n{getMenuItems(e){return Array.from(e.children).map((e=>i(e,0)))}}t.UiPageMenuMainFrontend=n,t.default=n})),define("WoltLabSuite/Core/Notification/ServiceWorker",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,i){"use strict";function n(){return"https:"===location.protocol&&"serviceWorker"in window.navigator&&"PushManager"in window&&"showNotification"in ServiceWorkerRegistration.prototype&&(!("Notification"in window)||"denied"!==Notification.permission)}function o(){r?.register()}Object.defineProperty(t,"__esModule",{value:!0}),t.registerServiceWorker=t.setup=t.serviceWorkerSupported=void 0;let r=null;class a{#E;#S;#C;#L;constructor(e,t,i){this.#E=e,this.#S=t,this.#C=i,window.navigator.serviceWorker.register(this.#S,{scope:"/"}),this.#L=window.navigator.serviceWorker.ready}async register(){const e=await(await this.#L).pushManager.getSubscription();if(e&&this.#k(e))return;await this.unsubscribe(e);const t=await(await this.#L).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:this.#x(this.#E)});t&&await this.#I(t)}async unsubscribe(e){e&&(await this.#I(e,!0),await e.unsubscribe())}#k(e){let t=window.btoa(String.fromCharCode(...new Uint8Array(e.options.applicationServerKey)));return t=t.replace(/\+/g,"-").replace(/\//g,"_"),t=t.replace(/=+$/,""),t===this.#E}async#I(e,t=!1){const n=e.getKey("p256dh"),o=e.getKey("auth"),r=(PushManager.supportedContentEncodings||["aes128gcm"])[0];try{await(0,i.prepareRequest)(this.#C).post({remove:t,endpoint:e.endpoint,publicKey:n?window.btoa(String.fromCharCode(...new Uint8Array(n))):null,authToken:o?window.btoa(String.fromCharCode(...new Uint8Array(o))):null,contentEncoding:r}).disableLoadingIndicator().fetchAsResponse()}catch(e){}}#x(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),i=window.atob(t),n=new Uint8Array(i.length);for(let e=0;e<i.length;++e)n[e]=i.charCodeAt(e);return n}}t.serviceWorkerSupported=n,t.setup=function(e,t,i){n()&&(r=new a(e,t,i),"granted"===Notification.permission&&o())},t.registerServiceWorker=o})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent","./Ui/Message/Share/Dialog","./Ui/Message/Share/Providers","./Ui/Feed/Dialog","./User","./Ui/Page/Menu/Main/Frontend","./LazyLoader","./Ajax/Backend","./Notification/ServiceWorker"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),d=i.__importStar(d),u=i.__importDefault(u),p=i.__importDefault(p),t.setup=function(t){var g;t.backgroundQueue.url=window.WSC_API_URL+t.backgroundQueue.url.substr(window.WCF_PATH.length),o.setup({dynamicColorScheme:t.dynamicColorScheme,enableMobileMenu:!0,pageMenuMainProvider:new p.default}),a.init(),t.styleChanger&&new Promise(((t,i)=>{e(["./Controller/Style/Changer"],t,i)})).then(i.__importStar).then((e=>{e.setup()})),""!==(g=t.endpointUserPopover)&&(0,m.whenFirstSeen)(".userLink",(()=>{new Promise(((t,i)=>{e(["./Component/Popover"],t,i)})).then(i.__importStar).then((({setupFor:e})=>{e({endpoint:g,identifier:"com.woltlab.wcf.user",selector:".userLink"})}))})),void 0!==t.executeCronjobs&&(0,h.prepareRequest)(t.executeCronjobs).get().disableLoadingIndicator().fetchAsResponse().catch((()=>{})),n.setUrl(t.backgroundQueue.url),(Math.random()<.1||t.backgroundQueue.force)&&n.invoke(),r.init(),s.init(),t.shareButtonProviders&&(0,c.addShareProviders)(t.shareButtonProviders),l.setup(),u.default.userId&&(d.setup(),t.serviceWorker&&(0,f.setup)(t.serviceWorker.publicKey,t.serviceWorker.serviceWorkerJsUrl,t.serviceWorker.registerUrl)),(0,m.whenFirstSeen)("woltlab-core-reaction-summary",(()=>{new Promise(((t,i)=>{e(["./Ui/Reaction/SummaryDetails"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,m.whenFirstSeen)("woltlab-core-comment",(()=>{new Promise(((t,i)=>{e(["./Component/Comment/woltlab-core-comment"],t,i)})).then(i.__importStar)})),(0,m.whenFirstSeen)("woltlab-core-comment-response",(()=>{new Promise(((t,i)=>{e(["./Component/Comment/Response/woltlab-core-comment-response"],t,i)})).then(i.__importStar)})),(0,m.whenFirstSeen)("[data-follow-user]",(()=>{new Promise(((t,i)=>{e(["./Component/User/Follow"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,m.whenFirstSeen)("[data-ignore-user]",(()=>{new Promise(((t,i)=>{e(["./Component/User/Ignore"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))}))}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(e>359)throw new TypeError("Hue cannot be larger than 359°");t/=100,i/=100;const n=(1-Math.abs(2*i-1))*t,o=n*(1-Math.abs(e/60%2-1)),r=i-n/2,[a,s,l]=0<=e&&e<60&&[n,o,0]||60<=e&&e<120&&[o,n,0]||120<=e&&e<180&&[0,n,o]||180<=e&&e<240&&[0,o,n]||240<=e&&e<300&&[o,0,n]||300<=e&&e<360&&[n,0,o];return{r:Math.round(255*(a+r)),g:Math.round(255*(s+r)),b:Math.round(255*(l+r))}}function n(e,t,i){const n={r:0,g:0,b:0},o=Math.floor(e/60),r=e/60-o,a=(i/=100)*(1-(t/=100)),s=i*(1-t*r),l=i*(1-t*(1-r));if(0==t)n.r=n.g=n.b=i;else switch(o){case 1:n.r=s,n.g=i,n.b=a;break;case 2:n.r=a,n.g=i,n.b=l;break;case 3:n.r=a,n.g=s,n.b=i;break;case 4:n.r=l,n.g=a,n.b=i;break;case 5:n.r=i,n.g=a,n.b=s;break;case 0:case 6:n.r=i,n.g=l,n.b=a}return{r:Math.round(255*n.r),g:Math.round(255*n.g),b:Math.round(255*n.b)}}function o(e,t,i){let n,o;e/=255,t/=255,i/=255;const r=Math.max(e,t,i),a=Math.min(e,t,i),s=r-a;if(n=0,r!==a){switch(r){case e:n=(t-i)/s*60;break;case t:n=60*(2+(i-e)/s);break;case i:n=60*(4+(e-t)/s)}n<0&&(n+=360)}const l=(r+a)/2;return o=0===s?0:s/(1-Math.abs(2*l-1)),{h:Math.round(n),s:Math.round(100*o),l:Math.round(100*l)}}function r(e,t,i){let n,o;e/=255,t/=255,i/=255;const r=Math.max(Math.max(e,t),i),a=Math.min(Math.min(e,t),i),s=r-a;if(n=0,r!==a){switch(r){case e:n=(t-i)/s*60;break;case t:n=60*(2+(i-e)/s);break;case i:n=60*(4+(e-t)/s)}n<0&&(n+=360)}return o=0===r?0:s/r,{h:Math.round(n),s:Math.round(100*o),v:Math.round(100*r)}}function a(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function s(e){if(e<0||e>255)throw new Error(`Invalid RGB component value '${e}' given.`);return e.toString(16).padStart(2,"0").toUpperCase()}function l(e,t,i){if(void 0===t){const n=/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString());if(!n)throw new Error("Invalid RGB data given.");e=+n[1],t=+n[2],i=+n[3]}return s(e)+s(t)+s(i)}function c(e){if(e<0||e>1)throw new Error(`Invalid alpha value '${e}' given.`);return Math.round(255*e).toString(16).padStart(2,"0").toUpperCase()}function d(e,t,i,n){if(void 0===t){const t=e;return l(t.r,t.g,t.b)+c(t.a)}return l(e,t,i)+c(n)}function u(e){return`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}function p(){let e=document.getElementById("jsColorUtilColorChecker");return null===e&&(e=document.createElement("span"),e.id="jsColorUtilColorChecker",document.body.appendChild(e)),e}function m(e){const t=p();return t.style.color="",t.style.color=e,""!==t.style.color}function h(e){if(!m(e))throw new Error(`Given string '${e}' is no valid color.`);const t=p();t.style.color=e;const i=window.getComputedStyle(t).color,n=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/.exec(i);if(n)return{r:+n[1],g:+n[2],b:+n[3],a:1};{const e=/^rgba\((\d+), ?(\d+), ?(\d+), ?([0-9.]+)\)$/.exec(i);if(e)return{r:+e[1],g:+e[2],b:+e[3],a:+e[4]}}throw new Error(`Cannot process color '${e}'.`)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringToRgba=t.isValidColor=t.rgbaToString=t.rgbaToHex=t.rgbToHex=t.hexToRgb=t.rgbToHsv=t.rgbToHsl=t.hsvToRgb=t.hslToRgb=void 0,t.hslToRgb=i,t.hsvToRgb=n,t.rgbToHsl=o,t.rgbToHsv=r,t.hexToRgb=a,t.rgbToHex=l,t.rgbaToHex=d,t.rgbaToString=u,t.isValidColor=m,t.stringToRgba=h,window.__wcf_bc_colorUtil={hexToRgb:a,hslToRgb:i,hsvToRgb:n,isValidColor:m,rgbaToHex:d,rgbaToString:u,rgbToHex:l,rgbToHsv:r,rgbToHsl:o,stringToRgba:h}})),define("WoltLabSuite/Core/Dictionary",["require","exports"],(function(e,t){"use strict";class i{_dictionary=new Map;set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,i=e.length;t<i;t++)e[t].forEach(((e,t)=>this.set(t,e)))}toObject(){const e={};return this._dictionary.forEach(((t,i)=>e[i]=t)),e}static fromObject(e){const t=new i;return Object.keys(e).forEach((i=>{t.set(i,e[i])})),t}get size(){return this._dictionary.size}}return i})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,i,n){"use strict";function o(e){return a.has(e)?"."+a.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,n=i.__importStar(n);const r=new Map(Object.entries({zip:"zipper",rar:"zipper",tar:"zipper",gz:"zipper",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",webp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"lines",doc:"word",docx:"word",odt:"word"})),a=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt","public.jpeg":"jpeg","public.png":"png","com.compuserve.gif":"gif","org.webmproject.webp":"webp"}));t.formatFilesize=function(e,t=2){let i="Byte";return e>=1e3&&(e/=1e3,i="kB"),e>=1e3&&(e/=1e3,i="MB"),e>=1e3&&(e/=1e3,i="GB"),e>=1e3&&(e/=1e3,i="TB"),n.formatNumeric(e,-t)+" "+i},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const i=e.substr(t+1);if(r.has(i))return r.get(i)}return""},t.getExtensionByMimeType=o,t.blobToFile=function(e,t){const i=o(e.type);return new File([e],t+i,{type:e.type})}})),define("WoltLabSuite/Core/List",["require","exports"],(function(e,t){"use strict";return class{_set=new Set;add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=void 0,t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let i=e.toString().split("e"),n=i[1]?+i[1]-t:-t;return i=(e=Math.round(+`${i[0]}e${n}`)).toString().split("e"),n=i[1]?+i[1]+t:t,+`${i[0]}e${n}`}})),define("WoltLabSuite/Core/ObjectMap",["require","exports"],(function(e,t){"use strict";return class{_map=new WeakMap;set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function i(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");n.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const n=new Map;t.add=i,t.addObject=function(e){Object.keys(e).forEach((t=>i(t,e[t])))},t.get=function(e){return!!n.has(e)&&n.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,i,n){this.type=e,this.content=t,this.alias=i,this.length=0|(n||"").length}function i(e,t,i,n){var o,r;return e.lastIndex=t,(o=e.exec(i))&&n&&o[1]&&(r=o[1].length,o.index+=r,o[0]=o[0].slice(r)),o}function n(e,o,s,l,c,d){var u,p,h,f,g,b,v,_,w,y,E,S,C,L,k,x,I,M,T,D,A,P,j,q,O;for(u in s)if(s.hasOwnProperty(u)&&s[u])for(p=s[u],p=Array.isArray(p)?p:[p],h=0;h<p.length;++h){if(d&&d.cause==u+","+h)return;for(g=(f=p[h]).inside,b=!!f.lookbehind,v=!!f.greedy,_=f.alias,v&&!f.pattern.global&&(w=f.pattern.toString().match(/[imsuy]*$/)[0],f.pattern=RegExp(f.pattern.source,w+"g")),y=f.pattern||f,E=l.next,S=c;E!==o.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){if(C=E.value,o.length>e.length)return;if(!(C instanceof t)){if(L=1,v){if(!(k=i(y,S,e,b))||k.index>=e.length)break;for(x=k.index,I=k.index+k[0].length,M=S,M+=E.value.length;x>=M;)M+=(E=E.next).value.length;if(S=M-=E.value.length,E.value instanceof t)continue;for(T=E;T!==o.tail&&(M<I||"string"==typeof T.value);T=T.next)L++,M+=T.value.length;L--,C=e.slice(S,M),k.index-=S}else if(!(k=i(y,0,C,b)))continue;x=k.index,D=k[0],A=C.slice(0,x),P=C.slice(x+D.length),j=S+C.length,d&&j>d.reach&&(d.reach=j),q=E.prev,A&&(q=r(o,q,A),S+=A.length),a(o,q,L),E=r(o,q,new t(u,g?m.tokenize(D,g):D,_,D)),P&&r(o,E,P),L>1&&(O={cause:u+","+h,reach:j},n(e,o,s,E.prev,S,O),d&&O.reach>d.reach&&(d.reach=O.reach))}}}}function o(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function r(e,t,i){var n=t.next,o={value:i,prev:t,next:n};return t.next=o,n.prev=o,e.length++,o}function a(e,t,i){var n,o=t.next;for(n=0;n<i&&o!==e.tail;n++)o=o.next;t.next=o,o.prev=t,e.length-=n}function s(){m.manual||m.highlightAll()}var l,c,d=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,u=0,p={},m={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(i){return i instanceof t?new t(i.type,e(i.content),i.alias):Array.isArray(i)?i.map(e):i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++u}),e.__id},clone:function e(t,i){var n,o,r;switch(i=i||{},m.util.type(t)){case"Object":if(o=m.util.objId(t),i[o])return i[o];for(r in n={},i[o]=n,t)t.hasOwnProperty(r)&&(n[r]=e(t[r],i));return n;case"Array":return o=m.util.objId(t),i[o]?i[o]:(n=[],i[o]=n,t.forEach((function(t,o){n[o]=e(t,i)})),n);default:return t}},getLanguage:function(e){for(;e;){var t=d.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(d,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){var e,t,i;if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(n){if(e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(n.stack)||[])[1])for(i in t=document.getElementsByTagName("script"))if(t[i].src==e)return t[i];return null}},isActive:function(e,t,i){for(var n,o="no-"+t;e;){if((n=e.classList).contains(t))return!0;if(n.contains(o))return!1;e=e.parentElement}return!!i}},languages:{plain:p,plaintext:p,text:p,txt:p,extend:function(e,t){var i,n=m.util.clone(m.languages[e]);for(i in t)n[i]=t[i];return n},insertBefore:function(e,t,i,n){var o,r,a,s,l;for(a in o=(n=n||m.languages)[e],r={},o)if(o.hasOwnProperty(a)){if(a==t)for(s in i)i.hasOwnProperty(s)&&(r[s]=i[s]);i.hasOwnProperty(a)||(r[a]=o[a])}return l=n[e],n[e]=r,m.languages.DFS(m.languages,(function(t,i){i===l&&t!=e&&(this[t]=r)})),r},DFS:function e(t,i,n,o){var r,a,s,l;for(a in o=o||{},r=m.util.objId,t)t.hasOwnProperty(a)&&(i.call(t,a,t[a],n||a),s=t[a],"Object"!==(l=m.util.type(s))||o[r(s)]?"Array"!==l||o[r(s)]||(o[r(s)]=!0,e(s,i,a,o)):(o[r(s)]=!0,e(s,i,null,o)))}},plugins:{},highlightAll:function(e,t){m.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,i){var n,o,r={callback:i,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};for(m.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),m.hooks.run("before-all-elements-highlight",r),n=0;o=r.elements[n++];)m.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,i,n){function o(e){s.highlightedCode=e,m.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,m.hooks.run("after-highlight",s),m.hooks.run("complete",s),n&&n.call(s.element)}var r,a,s,l,c=m.util.getLanguage(t),d=m.languages[c];if(m.util.setLanguage(t,c),(r=t.parentElement)&&"pre"===r.nodeName.toLowerCase()&&m.util.setLanguage(r,c),a=t.textContent,s={element:t,language:c,grammar:d,code:a},m.hooks.run("before-sanity-check",s),(r=s.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!s.code)return m.hooks.run("complete",s),void(n&&n.call(s.element));m.hooks.run("before-highlight",s),s.grammar?i&&e.Worker?((l=new Worker(m.filename)).onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):o(m.highlight(s.code,s.grammar,s.language)):o(m.util.encode(s.code))},highlight:function(e,i,n){var o={code:e,grammar:i,language:n};if(m.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=m.tokenize(o.code,o.grammar),m.hooks.run("after-tokenize",o),t.stringify(m.util.encode(o.tokens),o.language)},tokenize:function(e,t){var i,a,s=t.rest;if(s){for(i in s)t[i]=s[i];delete t.rest}return r(a=new o,a.head,e),n(e,a,t,a.head,0),function(e){for(var t=[],i=e.head.next;i!==e.tail;)t.push(i.value),i=i.next;return t}(a)},hooks:{all:{},add:function(e,t){var i=m.hooks.all;i[e]=i[e]||[],i[e].push(t)},run:function(e,t){var i,n,o=m.hooks.all[e];if(o&&o.length)for(i=0;n=o[i++];)n(t)}},Token:t};return e.Prism=m,t.stringify=function e(t,i){var n,o,r,a,s;if("string"==typeof t)return t;if(Array.isArray(t))return n="",t.forEach((function(t){n+=e(t,i)})),n;for(s in o={type:t.type,content:e(t.content,i),tag:"span",classes:["token",t.type],attributes:{},language:i},(r=t.alias)&&(Array.isArray(r)?Array.prototype.push.apply(o.classes,r):o.classes.push(r)),m.hooks.run("wrap",o),a="",o.attributes)a+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},e.document?((l=m.util.currentScript())&&(m.filename=l.src,l.hasAttribute("data-manual")&&(m.manual=!0)),m.manual||("loading"===(c=document.readyState)||"interactive"===c&&l&&l.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),m):e.addEventListener?(m.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var i=JSON.parse(t.data),n=i.language,o=i.code,r=i.immediateClose;e.postMessage(m.highlight(o,m.languages[n],n)),r&&e.close()}),!1),m):m}(_self),"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),define("prism/prism",(function(){})),window.Prism=window.Prism||{},window.Prism.manual=!0,define("WoltLabSuite/Core/Prism",["prism/prism"],(function(){return window.Prism.hooks.add("wrap",(e=>{e.classes=e.classes.map((e=>`prism-${e}`))})),Prism})),define("WoltLabSuite/Core/Template",["require","exports"],(function(e,t){"use strict";return window.WoltLabTemplate})),define("WoltLabSuite/Core/Upload",["require","exports","tslib","./Ajax/Request","./Core","./Dom/Change/Listener","./Language"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),class{_button=document.createElement("p");_buttonContainer;_fileElements=[];_fileUpload=document.createElement("input");_internalFileId=0;_multiFileUploadIds=[];_options;_target;constructor(e,t,i){if(!(i=i||{}).className)throw new Error("Missing class name.");this._options=o.extend({action:"upload",multiple:!1,acceptableFiles:null,name:"__files[]",singleFileRequests:!1,url:`index.php?ajax-upload/&t=${o.getXsrfToken()}`},i),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url);const n=document.getElementById(e);if(null===n)throw new Error(`Element id '${e}' is unknown.`);this._buttonContainer=n;const r=document.getElementById(t);if(null===r)throw new Error(`Element id '${t}' is unknown.`);if(this._target=r,i.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName&&"TBODY"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._createButton()}_createButton(){this._fileUpload=document.createElement("input"),this._fileUpload.type="file",this._fileUpload.name=this._options.name,this._options.multiple&&(this._fileUpload.multiple=!0),null!==this._options.acceptableFiles&&(this._fileUpload.accept=this._options.acceptableFiles.join(",")),this._fileUpload.addEventListener("change",(e=>this._upload(e))),this._button=document.createElement("p"),this._button.className="button uploadButton",this._button.setAttribute("role","button"),this._fileUpload.addEventListener("focus",(()=>{this._fileUpload.matches(":focus-visible")&&this._button.classList.add("active")})),this._fileUpload.addEventListener("blur",(()=>{this._button.classList.remove("active")}));const e=document.createElement("span");e.textContent=a.get("wcf.global.button.upload"),this._button.appendChild(e),this._button.insertAdjacentElement("afterbegin",this._fileUpload),this._insertButton(),r.default.trigger()}_createFileElement(e){const t=document.createElement("progress");let i;switch(t.max=100,this._target.nodeName){case"OL":case"UL":return i=document.createElement("li"),i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i;case"TBODY":return this._createFileTableRow(e);default:return i=document.createElement("p"),i.appendChild(t),this._target.appendChild(i),i}}_createFileElements(e){if(!e.length)return null;const t=[];Array.from(e).forEach((e=>{const i=this._createFileElement(e);i.classList.contains("uploadFailed")||(i.dataset.filename=e.name,i.dataset.internalFileId=(this._internalFileId++).toString(),t.push(i))}));const i=this._fileElements.length;return this._fileElements.push(t),r.default.trigger(),i}_createFileTableRow(e){throw new Error("Has to be implemented in subclass.")}_failure(e,t,i,n,o){return!0}_getParameters(){return{}}_getFormData(){return{}}_insertButton(){this._buttonContainer.insertAdjacentElement("afterbegin",this._button)}_progress(e,t){const i=Math.round(t.loaded/t.total*100);this._fileElements[e].forEach((e=>{const t=e.querySelector("progress");t&&(t.value=i)}))}_removeButton(){this._button.remove(),r.default.trigger()}_success(e,t,i,n,o){}_upload(e,t,i){this._target.querySelectorAll(".uploadFailed").forEach((e=>e.remove()));let n=null,o=[];if(t)o.push(t);else if(i){let e="";switch(i.type){case"image/jpeg":e="jpg";break;case"image/gif":e="gif";break;case"image/png":e="png";break;case"image/webp":e="webp"}o.push({name:`pasted-from-clipboard.${e}`})}else o=Array.from(this._fileUpload.files);return o.length&&this.validateUpload(o)&&(this._options.singleFileRequests?(n=[],o.forEach((e=>{const t=this._uploadFiles([e],i);1!==o.length&&this._multiFileUploadIds.push(t),n.push(t)}))):n=this._uploadFiles(o,i)),this._removeButton(),this._createButton(),n}validateUpload(e){return!0}_uploadFiles(e,t){function i(e,t){null!==e&&(t=t||"",Object.entries(e).forEach((([e,n])=>{if("object"==typeof n)i(n,0===t.length?e:`${t}[${e}]`);else{const i=0===t.length?e:`${t}[${e}]`;r.append(i,n)}})))}const o=this._createFileElements(e);if(!this._fileElements[o].length)return null;const r=new FormData;for(let i=0,n=e.length;i<n;i++)if(this._fileElements[o][i]){const n=this._fileElements[o][i].dataset.internalFileId;t?r.append(`__files[${n}]`,t,e[i].name):r.append(`__files[${n}]`,e[i])}return r.append("actionName",this._options.action),r.append("className",this._options.className),"upload"===this._options.action&&r.append("interfaceName","wcf\\data\\IUploadAction"),i(this._getParameters(),"parameters"),i(this._getFormData()),new n.default({data:r,contentType:!1,failure:this._failure.bind(this,o),silent:!0,success:this._success.bind(this,o),uploadProgress:this._progress.bind(this,o),url:this._options.url,withCredentials:!0}).sendRequest(),o}hasPendingUploads(){return void 0!==this._fileElements.find((e=>e.find((e=>null!==e.querySelector("progress")))))}uploadBlob(e){return this._upload(null,null,e)}uploadFile(e){return this._upload(null,e)}}})),define("WoltLabSuite/Core/prism-meta",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={markup:{title:"Markup",file:"markup"},html:{title:"HTML",file:"markup"},xml:{title:"XML",file:"markup"},svg:{title:"SVG",file:"markup"},mathml:{title:"MathML",file:"markup"},ssml:{title:"SSML",file:"markup"},atom:{title:"Atom",file:"markup"},rss:{title:"RSS",file:"markup"},css:{title:"CSS",file:"css"},clike:{title:"C-like",file:"clike"},javascript:{title:"JavaScript",file:"javascript"},abap:{title:"ABAP",file:"abap"},abnf:{title:"ABNF",file:"abnf"},actionscript:{title:"ActionScript",file:"actionscript"},ada:{title:"Ada",file:"ada"},agda:{title:"Agda",file:"agda"},al:{title:"AL",file:"al"},antlr4:{title:"ANTLR4",file:"antlr4"},apacheconf:{title:"Apache Configuration",file:"apacheconf"},apex:{title:"Apex",file:"apex"},apl:{title:"APL",file:"apl"},applescript:{title:"AppleScript",file:"applescript"},aql:{title:"AQL",file:"aql"},arduino:{title:"Arduino",file:"arduino"},arff:{title:"ARFF",file:"arff"},armasm:{title:"ARM Assembly",file:"armasm"},arturo:{title:"Arturo",file:"arturo"},asciidoc:{title:"AsciiDoc",file:"asciidoc"},aspnet:{title:"ASP.NET (C#)",file:"aspnet"},asm6502:{title:"6502 Assembly",file:"asm6502"},asmatmel:{title:"Atmel AVR Assembly",file:"asmatmel"},autohotkey:{title:"AutoHotkey",file:"autohotkey"},autoit:{title:"AutoIt",file:"autoit"},avisynth:{title:"AviSynth",file:"avisynth"},"avro-idl":{title:"Avro IDL",file:"avro-idl"},awk:{title:"AWK",file:"awk"},bash:{title:"Bash",file:"bash"},sh:{title:"Shell",file:"bash"},shell:{title:"Shell",file:"bash"},basic:{title:"BASIC",file:"basic"},batch:{title:"Batch",file:"batch"},bbcode:{title:"BBcode",file:"bbcode"},bbj:{title:"BBj",file:"bbj"},bicep:{title:"Bicep",file:"bicep"},birb:{title:"Birb",file:"birb"},bison:{title:"Bison",file:"bison"},bnf:{title:"BNF",file:"bnf"},bqn:{title:"BQN",file:"bqn"},brainfuck:{title:"Brainfuck",file:"brainfuck"},brightscript:{title:"BrightScript",file:"brightscript"},bro:{title:"Bro",file:"bro"},bsl:{title:"BSL (1C:Enterprise)",file:"bsl"},c:{title:"C",file:"c"},csharp:{title:"C#",file:"csharp"},cpp:{title:"C++",file:"cpp"},cfscript:{title:"CFScript",file:"cfscript"},chaiscript:{title:"ChaiScript",file:"chaiscript"},cil:{title:"CIL",file:"cil"},cilkc:{title:"Cilk/C",file:"cilkc"},cilkcpp:{title:"Cilk/C++",file:"cilkcpp"},clojure:{title:"Clojure",file:"clojure"},cmake:{title:"CMake",file:"cmake"},cobol:{title:"COBOL",file:"cobol"},coffeescript:{title:"CoffeeScript",file:"coffeescript"},concurnas:{title:"Concurnas",file:"concurnas"},csp:{title:"Content-Security-Policy",file:"csp"},cooklang:{title:"Cooklang",file:"cooklang"},coq:{title:"Coq",file:"coq"},crystal:{title:"Crystal",file:"crystal"},"css-extras":{title:"CSS Extras",file:"css-extras"},csv:{title:"CSV",file:"csv"},cue:{title:"CUE",file:"cue"},cypher:{title:"Cypher",file:"cypher"},d:{title:"D",file:"d"},dart:{title:"Dart",file:"dart"},dataweave:{title:"DataWeave",file:"dataweave"},dax:{title:"DAX",file:"dax"},dhall:{title:"Dhall",file:"dhall"},diff:{title:"Diff",file:"diff"},django:{title:"Django/Jinja2",file:"django"},"dns-zone-file":{title:"DNS zone file",file:"dns-zone-file"},docker:{title:"Docker",file:"docker"},dot:{title:"DOT (Graphviz)",file:"dot"},ebnf:{title:"EBNF",file:"ebnf"},editorconfig:{title:"EditorConfig",file:"editorconfig"},eiffel:{title:"Eiffel",file:"eiffel"},ejs:{title:"EJS",file:"ejs"},elixir:{title:"Elixir",file:"elixir"},elm:{title:"Elm",file:"elm"},etlua:{title:"Embedded Lua templating",file:"etlua"},erb:{title:"ERB",file:"erb"},erlang:{title:"Erlang",file:"erlang"},"excel-formula":{title:"Excel Formula",file:"excel-formula"},fsharp:{title:"F#",file:"fsharp"},factor:{title:"Factor",file:"factor"},false:{title:"False",file:"false"},"firestore-security-rules":{title:"Firestore security rules",file:"firestore-security-rules"},flow:{title:"Flow",file:"flow"},fortran:{title:"Fortran",file:"fortran"},ftl:{title:"FreeMarker Template Language",file:"ftl"},gml:{title:"GameMaker Language",file:"gml"},gap:{title:"GAP (CAS)",file:"gap"},gcode:{title:"G-code",file:"gcode"},gdscript:{title:"GDScript",file:"gdscript"},gedcom:{title:"GEDCOM",file:"gedcom"},gettext:{title:"gettext",file:"gettext"},gherkin:{title:"Gherkin",file:"gherkin"},git:{title:"Git",file:"git"},glsl:{title:"GLSL",file:"glsl"},gn:{title:"GN",file:"gn"},"linker-script":{title:"GNU Linker Script",file:"linker-script"},go:{title:"Go",file:"go"},"go-module":{title:"Go module",file:"go-module"},gradle:{title:"Gradle",file:"gradle"},graphql:{title:"GraphQL",file:"graphql"},groovy:{title:"Groovy",file:"groovy"},haml:{title:"Haml",file:"haml"},handlebars:{title:"Handlebars",file:"handlebars"},mustache:{title:"Mustache",file:"handlebars"},haskell:{title:"Haskell",file:"haskell"},haxe:{title:"Haxe",file:"haxe"},hcl:{title:"HCL",file:"hcl"},hlsl:{title:"HLSL",file:"hlsl"},hoon:{title:"Hoon",file:"hoon"},http:{title:"HTTP",file:"http"},hpkp:{title:"HTTP Public-Key-Pins",file:"hpkp"},hsts:{title:"HTTP Strict-Transport-Security",file:"hsts"},ichigojam:{title:"IchigoJam",file:"ichigojam"},icon:{title:"Icon",file:"icon"},"icu-message-format":{title:"ICU Message Format",file:"icu-message-format"},idris:{title:"Idris",file:"idris"},ignore:{title:".ignore",file:"ignore"},gitignore:{title:".gitignore",file:"ignore"},hgignore:{title:".hgignore",file:"ignore"},npmignore:{title:".npmignore",file:"ignore"},inform7:{title:"Inform 7",file:"inform7"},ini:{title:"Ini",file:"ini"},io:{title:"Io",file:"io"},j:{title:"J",file:"j"},java:{title:"Java",file:"java"},javadoc:{title:"JavaDoc",file:"javadoc"},javadoclike:{title:"JavaDoc-like",file:"javadoclike"},javastacktrace:{title:"Java stack trace",file:"javastacktrace"},jexl:{title:"Jexl",file:"jexl"},jolie:{title:"Jolie",file:"jolie"},jq:{title:"JQ",file:"jq"},jsdoc:{title:"JSDoc",file:"jsdoc"},"js-extras":{title:"JS Extras",file:"js-extras"},json:{title:"JSON",file:"json"},json5:{title:"JSON5",file:"json5"},jsonp:{title:"JSONP",file:"jsonp"},jsstacktrace:{title:"JS stack trace",file:"jsstacktrace"},"js-templates":{title:"JS Templates",file:"js-templates"},julia:{title:"Julia",file:"julia"},keepalived:{title:"Keepalived Configure",file:"keepalived"},keyman:{title:"Keyman",file:"keyman"},kotlin:{title:"Kotlin",file:"kotlin"},kts:{title:"Kotlin Script",file:"kotlin"},kumir:{title:"KuMir (КуМир)",file:"kumir"},kusto:{title:"Kusto",file:"kusto"},latex:{title:"LaTeX",file:"latex"},tex:{title:"TeX",file:"latex"},context:{title:"ConTeXt",file:"latex"},latte:{title:"Latte",file:"latte"},less:{title:"Less",file:"less"},lilypond:{title:"LilyPond",file:"lilypond"},liquid:{title:"Liquid",file:"liquid"},lisp:{title:"Lisp",file:"lisp"},livescript:{title:"LiveScript",file:"livescript"},llvm:{title:"LLVM IR",file:"llvm"},log:{title:"Log file",file:"log"},lolcode:{title:"LOLCODE",file:"lolcode"},lua:{title:"Lua",file:"lua"},magma:{title:"Magma (CAS)",file:"magma"},makefile:{title:"Makefile",file:"makefile"},markdown:{title:"Markdown",file:"markdown"},"markup-templating":{title:"Markup templating",file:"markup-templating"},mata:{title:"Mata",file:"mata"},matlab:{title:"MATLAB",file:"matlab"},maxscript:{title:"MAXScript",file:"maxscript"},mel:{title:"MEL",file:"mel"},mermaid:{title:"Mermaid",file:"mermaid"},metafont:{title:"METAFONT",file:"metafont"},mizar:{title:"Mizar",file:"mizar"},mongodb:{title:"MongoDB",file:"mongodb"},monkey:{title:"Monkey",file:"monkey"},moonscript:{title:"MoonScript",file:"moonscript"},n1ql:{title:"N1QL",file:"n1ql"},n4js:{title:"N4JS",file:"n4js"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",file:"nand2tetris-hdl"},naniscript:{title:"Naninovel Script",file:"naniscript"},nasm:{title:"NASM",file:"nasm"},neon:{title:"NEON",file:"neon"},nevod:{title:"Nevod",file:"nevod"},nginx:{title:"nginx",file:"nginx"},nim:{title:"Nim",file:"nim"},nix:{title:"Nix",file:"nix"},nsis:{title:"NSIS",file:"nsis"},objectivec:{title:"Objective-C",file:"objectivec"},ocaml:{title:"OCaml",file:"ocaml"},odin:{title:"Odin",file:"odin"},opencl:{title:"OpenCL",file:"opencl"},openqasm:{title:"OpenQasm",file:"openqasm"},oz:{title:"Oz",file:"oz"},parigp:{title:"PARI/GP",file:"parigp"},parser:{title:"Parser",file:"parser"},pascal:{title:"Pascal",file:"pascal"},pascaligo:{title:"Pascaligo",file:"pascaligo"},psl:{title:"PATROL Scripting Language",file:"psl"},pcaxis:{title:"PC-Axis",file:"pcaxis"},peoplecode:{title:"PeopleCode",file:"peoplecode"},perl:{title:"Perl",file:"perl"},php:{title:"PHP",file:"php"},phpdoc:{title:"PHPDoc",file:"phpdoc"},"php-extras":{title:"PHP Extras",file:"php-extras"},"plant-uml":{title:"PlantUML",file:"plant-uml"},plsql:{title:"PL/SQL",file:"plsql"},powerquery:{title:"PowerQuery",file:"powerquery"},powershell:{title:"PowerShell",file:"powershell"},processing:{title:"Processing",file:"processing"},prolog:{title:"Prolog",file:"prolog"},promql:{title:"PromQL",file:"promql"},properties:{title:".properties",file:"properties"},protobuf:{title:"Protocol Buffers",file:"protobuf"},pug:{title:"Pug",file:"pug"},puppet:{title:"Puppet",file:"puppet"},pure:{title:"Pure",file:"pure"},purebasic:{title:"PureBasic",file:"purebasic"},purescript:{title:"PureScript",file:"purescript"},python:{title:"Python",file:"python"},qsharp:{title:"Q#",file:"qsharp"},q:{title:"Q (kdb+ database)",file:"q"},qml:{title:"QML",file:"qml"},qore:{title:"Qore",file:"qore"},r:{title:"R",file:"r"},racket:{title:"Racket",file:"racket"},cshtml:{title:"Razor C#",file:"cshtml"},jsx:{title:"React JSX",file:"jsx"},tsx:{title:"React TSX",file:"tsx"},reason:{title:"Reason",file:"reason"},regex:{title:"Regex",file:"regex"},rego:{title:"Rego",file:"rego"},renpy:{title:"Ren'py",file:"renpy"},rescript:{title:"ReScript",file:"rescript"},rest:{title:"reST (reStructuredText)",file:"rest"},rip:{title:"Rip",file:"rip"},roboconf:{title:"Roboconf",file:"roboconf"},robotframework:{title:"Robot Framework",file:"robotframework"},ruby:{title:"Ruby",file:"ruby"},rust:{title:"Rust",file:"rust"},sas:{title:"SAS",file:"sas"},sass:{title:"Sass (Sass)",file:"sass"},scss:{title:"Sass (SCSS)",file:"scss"},scala:{title:"Scala",file:"scala"},scheme:{title:"Scheme",file:"scheme"},"shell-session":{title:"Shell session",file:"shell-session"},smali:{title:"Smali",file:"smali"},smalltalk:{title:"Smalltalk",file:"smalltalk"},smarty:{title:"Smarty",file:"smarty"},sml:{title:"SML",file:"sml"},solidity:{title:"Solidity (Ethereum)",file:"solidity"},"solution-file":{title:"Solution file",file:"solution-file"},soy:{title:"Soy (Closure Template)",file:"soy"},sparql:{title:"SPARQL",file:"sparql"},"splunk-spl":{title:"Splunk SPL",file:"splunk-spl"},sqf:{title:"SQF: Status Quo Function (Arma 3)",file:"sqf"},sql:{title:"SQL",file:"sql"},squirrel:{title:"Squirrel",file:"squirrel"},stan:{title:"Stan",file:"stan"},stata:{title:"Stata Ado",file:"stata"},iecst:{title:"Structured Text (IEC 61131-3)",file:"iecst"},stylus:{title:"Stylus",file:"stylus"},supercollider:{title:"SuperCollider",file:"supercollider"},swift:{title:"Swift",file:"swift"},systemd:{title:"Systemd configuration file",file:"systemd"},"t4-templating":{title:"T4 templating",file:"t4-templating"},"t4-cs":{title:"T4 Text Templates (C#)",file:"t4-cs"},"t4-vb":{title:"T4 Text Templates (VB)",file:"t4-vb"},tap:{title:"TAP",file:"tap"},tcl:{title:"Tcl",file:"tcl"},tt2:{title:"Template Toolkit 2",file:"tt2"},textile:{title:"Textile",file:"textile"},toml:{title:"TOML",file:"toml"},tremor:{title:"Tremor",file:"tremor"},trickle:{title:"trickle",file:"tremor"},troy:{title:"troy",file:"tremor"},turtle:{title:"Turtle",file:"turtle"},twig:{title:"Twig",file:"twig"},typescript:{title:"TypeScript",file:"typescript"},typoscript:{title:"TypoScript",file:"typoscript"},unrealscript:{title:"UnrealScript",file:"unrealscript"},uorazor:{title:"UO Razor Script",file:"uorazor"},uri:{title:"URI",file:"uri"},v:{title:"V",file:"v"},vala:{title:"Vala",file:"vala"},vbnet:{title:"VB.Net",file:"vbnet"},velocity:{title:"Velocity",file:"velocity"},verilog:{title:"Verilog",file:"verilog"},vhdl:{title:"VHDL",file:"vhdl"},vim:{title:"vim",file:"vim"},"visual-basic":{title:"Visual Basic",file:"visual-basic"},vba:{title:"VBA",file:"visual-basic"},warpscript:{title:"WarpScript",file:"warpscript"},wasm:{title:"WebAssembly",file:"wasm"},"web-idl":{title:"Web IDL",file:"web-idl"},wgsl:{title:"WGSL",file:"wgsl"},wiki:{title:"Wiki markup",file:"wiki"},wolfram:{title:"Wolfram language",file:"wolfram"},mathematica:{title:"Mathematica",file:"wolfram"},nb:{title:"Mathematica Notebook",file:"wolfram"},wren:{title:"Wren",file:"wren"},xeora:{title:"Xeora",file:"xeora"},"xml-doc":{title:"XML doc (.net)",file:"xml-doc"},xojo:{title:"Xojo (REALbasic)",file:"xojo"},xquery:{title:"XQuery",file:"xquery"},yaml:{title:"YAML",file:"yaml"},yang:{title:"YANG",file:"yang"},zig:{title:"Zig",file:"zig"}}})),define("WoltLabSuite/Core/Api/Error",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=t.ApiError=void 0,t.ApiError=class{type;code;message;param;statusCode;constructor(e,t,i,n,o){this.type=e,this.code=t,this.message=i,this.param=n,this.statusCode=o}getValidationError(){if("invalid_request_error"===this.type&&400===this.statusCode)return new i(this.code,this.message,this.param)}};class i{code;message;param;constructor(e,t,i){this.code=e,this.message=t,this.param=i}}t.ValidationError=i})),define("WoltLabSuite/Core/Api/Result",["require","exports","../Ajax/Error","../Core","./Error"],(function(e,t,i,n,o){"use strict";async function r(e){const{response:t}=e;if(void 0===t)throw e;const i=t.headers.get("content-type");if(!i||!i.includes("application/json"))throw e;let r;try{r=await t.json()}catch{throw e}if((0,n.isPlainObject)(r)&&Object.hasOwn(r,"type")&&("api_error"===r.type||"invalid_request_error"===r.type)&&"string"==typeof r.code&&"string"==typeof r.message&&"string"==typeof r.param){const e=new o.ApiError(r.type,r.code,r.message,r.param,t.status);return{ok:!1,error:e,unwrap(){throw e}}}throw e}Object.defineProperty(t,"__esModule",{value:!0}),t.apiResultFromStatusNotOk=t.apiResultFromError=t.apiResultFromValue=void 0,t.apiResultFromValue=function(e){return{ok:!0,value:e,unwrap:()=>e}},t.apiResultFromError=async function(e){if(e instanceof i.StatusNotOk)return r(e);throw e},t.apiResultFromStatusNotOk=r})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=void 0,t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let i,n=document.createElement("span");for(;i=t.nextNode();){const t=i,o=t.data.split(/\r?\n/);for(let i=0,r=o.length;i<r;i++){const r=o[i];i>=1&&(n.appendChild(document.createTextNode("\n")),yield n,n=document.createElement("span"));let a=document.createTextNode(r),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(a),a=e,s=s.parentNode}n.appendChild(a)}}yield n}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper"],(function(e,t,i,n,o,r,a,s){"use strict";async function l(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s);class c{static chunkSize=50;container;codeContainer;language;constructor(e){this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e)))?.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new c(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("button");t.type="button",t.innerHTML='<fa-icon size="24" name="copy"></fa-icon>',t.classList.add("jsTooltip"),t.title=n.get("wcf.message.bbcode.code.copy");const i=async()=>{await o.copyElementTextToClipboard(this.codeContainer),r.show(n.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",(()=>i())),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");const t=(await new Promise(((t,i)=>{e(["../prism-meta"],t,i)})).then(i.__importStar)).default;if(!t[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((i,n)=>{e(["prism/components/prism-"+t[this.language].file],i,n)})).then(i.__importStar),await l();const n=a.default.languages[this.language];if(!n)throw new Error(`Invalid language '${this.language}' given.`);const o=document.createElement("div");o.innerHTML=a.default.highlight(this.codeContainer.textContent,n,this.language),await l();const r=this.codeContainer.querySelectorAll(".codeBoxLine > span"),d=s.splitIntoLines(o);for(let e=0,t=r.length;e<t;e+=c.chunkSize){await l();const i=Math.min(e+c.chunkSize,t);for(let t=e;t<i;t++){const e=r[t],i=d.next().value;e.parentNode.replaceChild(i,e)}}this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}}return c})),define("WoltLabSuite/Core/Bbcode/Collapsible",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(e.classList.toggle("collapsed")){if(t.forEach((e=>{const t=e.dataset.titleExpand,i=e.querySelector("fa-icon");i?(i.setIcon("up-right-and-down-left-from-center"),e.title=t):e.textContent=t})),i instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse,i=e.querySelector("fa-icon");i?(i.setIcon("down-left-and-up-right-to-center"),e.title=t):e.textContent=t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),n=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,n){t.forEach((n=>{n.classList.add("jsToggleButtonEnabled"),n.addEventListener("click",(n=>i(e,t,n))),n.addEventListener("keydown",(n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),i(e,t))}))})),0!==n.scrollTop&&(n.scrollTop=0,i(e,t)),n.addEventListener("scroll",(()=>{n.scrollTop=0,e.classList.contains("collapsed")&&i(e,t)}))}(e,t,n),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenToCkeditor=t.dispatchToCkeditor=void 0;class i{#M;constructor(e){this.#M=e}collectMetaData(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#M.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#M.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#M.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class n{#M;constructor(e){this.#M=e}bbcode(e){return this.#M.addEventListener("ckeditor5:bbcode",(t=>{const i=e(t.detail);if(!0===i)t.preventDefault();else if(!1!==i)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#M.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#M.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#M.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#M.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#M.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#M.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#M.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#M.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#M.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#M.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#M.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#M.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#M.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#M.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#M.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new i(e)},t.listenToCkeditor=function(e){return new n(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,i){"use strict";function n(e,t,n){const o={abortController:n,file:t};return(0,i.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:i})=>{e({"data-attachment-id":t.toString(),urls:{default:i}})})).catch((()=>{}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{o.attachment&&(t.woltlabUpload={uploadImage:(t,i)=>n(e,t,i),uploadOther:t=>n(e,t)},(0,i.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,i.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:i})=>{""===i?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(`<img src="${i}" class="image woltlabAttachment" data-attachment-id="${t.toString()}">`)}))}(e),function(e){(0,i.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)})))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,i;if(e&&e.__esModule)return e;if(t={},null!=e)for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&__createBinding(t,e,i);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,i){"use strict";function n(e,t,n){const o={abortController:n,file:t};return(0,i.dispatchToCkeditor)(e).uploadMedia(o),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(t){(0,i.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:i})=>{!i.attachment&&i.media&&(e.woltlabUpload={uploadImage:(e,i)=>n(t,e,i),uploadOther:e=>n(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,i)=>{e(["../../Media/Manager/Editor"],t,i)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Api/Messages/MentionSuggestions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mentionSuggestions=void 0,t.mentionSuggestions=async function(e){const t=new URL(window.WSC_API_URL+"index.php?api/rpc/core/messages/mentionsuggestions");let o;t.searchParams.set("query",e);try{o=await(0,i.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){return e.length>24?[]:(await(0,o.mentionSuggestions)(e)).unwrap().map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'<fa-icon name="users"></fa-icon>',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,i.createFragmentFromHtml)(`\n            <span class="ckeditor5__mention">${e.icon} ${e.text}</span>\n          `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,n.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:n,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,i.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'</p><p><br data-cke-filler="true"></p><p>')).split("\n\n").map((e=>`<p>${e=e.replaceAll("\n","<br>")}</p>`)).join("")),n=(0,i.escapeHTML)(n),r=(0,i.escapeHTML)(r),e.insertHtml(`<woltlab-quote data-author="${n}" data-link="${r}">${o}</woltlab-quote>\n    <p><br data-cke-filler="true"></p>`)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,i,n,o,r){"use strict";function a(e){return`${(0,i.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeAutosave=t.setupRestoreDraft=t.deleteDraft=void 0,t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let i;try{const e=window.localStorage.getItem(a(t));null!==e&&(i=JSON.parse(e))}catch{return void s(t)}if(void 0===i)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=i.timestamp)return;const c=e.data.get();if(c===i.html)return;e.data.set(i.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n    <div class="ckeditor5__restoreDraft__question">\n      ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.editor.restoreDraft"))}\n    </div>\n    <div class="ckeditor5__restoreDraft__buttons">\n      <button type="button" class="button buttonPrimary small" data-type="submit">\n        ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.dialog.button.primary.restore"))}\n      </button>\n      <button type="button" class="button small" data-type="cancel">\n        ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.dialog.button.cancel"))}\n      </button>\n      <button type="button" class="button small" data-type="preview">\n        ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.editor.restoreDraft.preview"))}\n      </button>\n    </div>\n  `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const m=(e,t,i)=>{i&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n    <button type="button" class="ck ck-button">\n      ${(0,o.escapeHTML)((0,n.getPhrase)("wcf.editor.restoreDraft.restoreOrDiscard"))}\n    </button>\n  `,e}(),i=e.ui.view.toolbar.element,r=Array.from(i.children);r.forEach((e=>e.hidden=!0)),i.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,i){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let i,n;try{i=window.localStorage.getItem(t)}catch{return}if(null!==i){try{n=JSON.parse(i)}catch{}if(void 0===n||n.timestamp<e)try{localStorage.removeItem(t)}catch{}}}))}(),t.autosave={save:t=>(function(e,t,i){if(""===i)return void s(t);const n={html:i,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(n)),(0,r.dispatchToCkeditor)(e).autosave(n)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,i,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(i))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(i)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=void 0;class n{#T;#D="|";#A=[];#P=[];#j={};constructor(e){this.#T=e}#q(){this.#T.undo?this.#P.push("undo","redo"):this.#A.push("Undo")}#O(){this.#P.push("bold","italic")}#B(){const e=[];this.#T.heading?e.push("heading"):this.#A.push("Heading"),this.#T.underline?e.push("underline"):this.#A.push("Underline"),this.#T.strikethrough?e.push("strikethrough"):this.#A.push("Strikethrough"),e.push(this.#D),this.#T.mark?e.push("highlight"):this.#A.push("Highlight"),this.#T.fontColor?e.push("fontColor"):this.#A.push("FontColor"),this.#T.fontFamily?e.push("fontFamily"):this.#A.push("FontFamily"),this.#T.fontSize?e.push("fontSize"):this.#A.push("FontSize"),e.push(this.#D),this.#T.subscript?e.push("subscript"):this.#A.push("Subscript"),this.#T.superscript?e.push("superscript"):this.#A.push("Superscript"),0!==e.length&&e.push(this.#D,"removeFormat"),e.length>0&&(this.#P.push({label:"woltlabToolbarGroup_format",items:e}),this.#j.format={icon:"ellipsis;false",label:(0,i.getPhrase)("wcf.editor.button.group.format")})}#N(){this.#T.list?(this.#P.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#j.list={icon:"list;false",label:(0,i.getPhrase)("wcf.editor.button.group.list")}):this.#A.push("List")}#F(){this.#T.alignment?this.#P.push("alignment"):this.#A.push("Alignment")}#R(){this.#T.link?this.#P.push("link"):this.#A.push("Link","LinkImage")}#U(){this.#T.image?(this.#P.push("insertImage"),this.#T.attachment||this.#A.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#T.link&&this.#A.push("LinkImage")}#W(){this.#T.codeBlock?this.#P.push("codeBlock"):this.#A.push("CodeBlock","WoltlabCodeBlock"),this.#T.code?this.#P.push("code"):this.#A.push("Code","WoltlabCode")}#H(){this.#T.table?this.#P.push("insertTable"):this.#A.push("Table","TableToolbar"),this.#T.quoteBlock?this.#P.push("blockQuote"):this.#A.push("BlockQuote","WoltlabBlockQuote"),this.#T.spoiler?this.#P.push("spoiler"):this.#A.push("WoltlabSpoiler"),this.#T.html?this.#P.push("htmlEmbed"):this.#A.push("HtmlEmbed","WoltlabHtmlEmbed")}#V(){this.#P.push(this.#D)}#$(){this.#T.media||this.#A.push("WoltlabMedia")}#z(){this.#T.mention||this.#A.push("Mention","WoltlabMention")}#G(){let e=!1;return this.#P.filter((t=>"string"==typeof t&&t===this.#D?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#A.length>0||this.#P.length>0)throw new Error("Cannot build the configuration twice.");this.#q(),this.#V(),this.#V(),this.#O(),this.#R(),this.#B(),this.#V(),this.#N(),this.#F(),this.#V(),this.#U(),this.#W(),this.#H(),this.#V(),this.#$(),this.#z()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:n}=window.CKEDITOR_TRANSLATIONS[t];return n.Author=(0,i.getPhrase)("wcf.ckeditor.quote.author"),n.Filename=(0,i.getPhrase)("wcf.ckeditor.code.fileName"),n["Line number"]=(0,i.getPhrase)("wcf.ckeditor.code.lineNumber"),n.Quote=(0,i.getPhrase)("wcf.ckeditor.quote"),n["Quote from %0"]=(0,i.getPhrase)("wcf.ckeditor.quoteFrom"),n.Spoiler=(0,i.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,i.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,i.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,i.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,i.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#A,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#G(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#j,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new n(e);return t.build(),t.toConfig()}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e,t){e.editing.view.document.on("enter",((e,n)=>{if(n.isSoft)return;n.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,i.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";function o(e,t){const i=e.closest("p");if(null===i)return;const n=document.createElement("figure");n.classList.add("image",t),n.append(e),i.insertAdjacentElement("beforebegin",n),""===i.innerHTML&&i.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&n.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const i=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const i=e.childNodes[0];i instanceof HTMLBRElement&&"true"!==i.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,i=e.length;t<i;t++){const n=e[t];let o=0;for(;t+o+1<i;){const i=e[t+o+1];if(n.nextElementSibling!==i)break;o++}if(0===o)n.remove();else{const i=o+1,n=Math.ceil(i/2);e.slice(t,t+n).forEach((e=>{e.remove()})),t+=o}}}(i),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,n=i.__importDefault(n),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a <textarea>.");e.value=r(e.value)}})),define("WoltLabSuite/Core/Component/Ckeditor/Keyboard",["require","exports","./Event"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSubmitShortcut=void 0,t.setupSubmitShortcut=function(e){const t=e.element.closest("form, .message, .jsOuterEditorContainer");if(null===t)return;const n=t.querySelector(".formSubmit");if(null===n)return;const o=n.querySelector('input[type="submit"], button[data-type="save"], button[accesskey="s"]');if(null===o)return;o.removeAttribute("accesskey");const r=function(e){return t=>{if("KeyS"!==t.code)return;let i;i=window.navigator.platform.startsWith("Mac")?t.ctrlKey&&t.altKey:t.altKey&&!t.ctrlKey,i&&(t.preventDefault(),t.stopPropagation(),e.click())}}(o);t.addEventListener("keydown",r),(0,i.listenToCkeditor)(e.element).destroy((()=>{t.removeEventListener("keydown",r)}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Layer",["require","exports","../../Helper/PageOverlay"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const n=["ck-body-wrapper","ck-inspector-wrapper","ck-inspector-portal"];let o=!1;t.setup=function(){o||(o=!0,new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)if(e instanceof HTMLElement)for(const t of n)e.classList.contains(t)&&(0,i.getPageOverlayContainer)().append(e)})).observe(document.body,{childList:!0}))}})),define("WoltLabSuite/Core/Component/Ckeditor",["require","exports","tslib","./Ckeditor/Attachment","./Ckeditor/Media","./Ckeditor/Mention","./Ckeditor/Quote","./Ckeditor/Autosave","./Ckeditor/Configuration","./Ckeditor/Event","./Ckeditor/SubmitOnEnter","./Ckeditor/Normalizer","../Ui/Scroll","../Devtools","./Ckeditor/Keyboard","./Ckeditor/Layer","../Environment"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f,g){"use strict";function*b(e,t,i){if(e.is("element",t)&&Object.entries(i).every((([t,i])=>!!e.hasAttribute(t)&&String(e.getAttribute(t))===i.toString())))yield e;else for(const n of e.getChildren())n.is("element")&&(yield*b(n,t,i))}function v(e,t){for(const i of e)if("string"==typeof i){if(i===t)return!0}else if(v(i.items,t))return!0;return!1}function _(e){return w.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getCkeditorById=t.getCkeditor=t.setupCkeditor=void 0,m=i.__importDefault(m);const w=new WeakMap;class y{#Y;#T;constructor(e,t){this.#Y=e,this.#T=t}async destroy(){(0,c.dispatchToCkeditor)(this.sourceElement).destroy(),await this.#Y.destroy()}discardDraft(){this.#T.autosave&&(0,s.deleteDraft)(this.#T.autosave)}focus(){const e=this.#Y.ui.element,{bottom:t,top:i}=e.getBoundingClientRect(),n=window.innerHeight;let o=!1;(i>0&&i<n||t>0&&t<n)&&(o=!0),o?this.#Y.editing.view.focus():(0,p.element)(e,(()=>{this.#Y.editing.view.focus()}))}getHtml(){return this.#Y.data.get()}insertHtml(e){e=(0,u.normalizeLegacyHtml)(e),this.#Y.model.change((t=>{const i=this.#Y.data.processor.toView(e),n=this.#Y.data.toModel(i),o=this.#Y.model.insertContent(n);t.setSelection(o.end),this.focus()}))}insertText(e){const t=document.createElement("div");t.textContent=e,this.insertHtml(t.innerHTML)}isVisible(){return 0!==this.#Y.ui.element.clientWidth}setHtml(e,t=!0){e=(0,u.normalizeLegacyHtml)(e),this.#Y.model.change((i=>{let n=this.#Y.model.createRangeIn(this.#Y.model.document.getRoot());const o=this.#Y.data.processor.toView(e),r=this.#Y.data.toModel(o);n=this.#Y.model.insertContent(r,n),i.setSelection(n.end),t&&this.focus()}))}removeAll(e,t){this.#Y.model.change((i=>{const n=b(this.#Y.model.document.getRoot(),e,t);for(const e of n)i.remove(e)}))}reset(){if(this.setHtml("",!1),(0,c.dispatchToCkeditor)(this.sourceElement).reset({ckeditor:this}),"safari"===(0,g.browser)()&&!(0,g.touch)()){const e=this.#Y.ui.element;e.focus(),window.setTimeout((()=>{e.blur()}),0)}}get element(){return this.#Y.ui.element}get features(){return this.#T}get sourceElement(){return this.#Y.sourceElement}}t.setupCkeditor=async function(t,p,g,b,_,E){if(w.has(t))throw new TypeError(`Cannot initialize the editor for '${t.id}' twice.`);(0,f.setup)();const{create:S,CKEditor5:C}=await new Promise(((t,i)=>{e(["@woltlab/editor"],t,i)})).then(i.__importStar);await new Promise((e=>{window.requestAnimationFrame(e)})),function(e,t){(0,c.dispatchToCkeditor)(e).setupFeatures({features:t}),t.autosave&&!1===m.default._internal_.editorAutosave()&&(t.autosave=""),Object.freeze(t)}(t,p),p.attachment&&(0,n.setup)(t),p.media&&(0,o.setup)(t),(0,r.setup)(t),p.quoteBlock&&(0,a.setup)(t);const L=function(e,t,i,n,o,r){const a=(0,l.createConfigurationFor)(t);a.codeBlock={languages:o},a.woltlabBbcode=i,a.woltlabSmileys=n,""!==t.autosave&&(0,s.initializeAutosave)(e,a,t.autosave),(0,c.dispatchToCkeditor)(e).setupConfiguration({configuration:a,features:t,modules:r});const d=a.toolbar;for(let{name:e}of i)e=`woltlabBbcode_${e}`,v(d,e)||d.push(e);return a}(t,p,g,b,_,C);E&&(L.licenseKey=E),(0,u.normalizeLegacyMessage)(t);const k=await S(t,L),x=new y(k,p);return p.autosave&&(0,s.setupRestoreDraft)(k,p.autosave),w.set(t,x),(0,c.dispatchToCkeditor)(t).ready({ckeditor:x}),p.submitOnEnter&&(0,d.setup)(k,x),""===x.getHtml()&&(0,c.dispatchToCkeditor)(t).discardRecoveredData(),(0,h.setupSubmitShortcut)(x),function(e,t){e.model.document.on("change:data",(()=>{(0,c.dispatchToCkeditor)(t).changeData()}))}(k,t),window.ENABLE_DEBUG_MODE&&window.ENABLE_DEVELOPER_TOOLS&&m.default._internal_.editorInspector()&&new Promise(((t,i)=>{e(["@ckeditor/ckeditor5-inspector"],t,i)})).then(i.__importStar).then((e=>{e.default.attach(k)})),x},t.getCkeditor=_,t.getCkeditorById=function(e,t=!0){const i=document.getElementById(e);if(null!==i)return _(i);if(t)throw new Error(`Unable to find an element with the id '${e}'.`)}})),define("WoltLabSuite/Core/Component/Confirmation/Custom",["require","exports","tslib","../Dialog","../../Language"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationCustom=void 0,o=i.__importStar(o),t.ConfirmationCustom=class{#X;constructor(e){this.#X=e}async message(e){if(""===e.trim())throw new Error("An empty message for the delete confirmation was provided. Please use `defaultMessage()` if you do not want to provide a custom message.");const t=(0,n.dialogFactory)().fromHtml(`<p>${e}</p>`).asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return t.show(this.#X),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async withFormElements(e){const t=(0,n.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e(t),t.show(this.#X),new Promise((e=>{t.addEventListener("primary",(()=>{e({result:!0,dialog:t})})),t.addEventListener("cancel",(()=>{e({result:!1,dialog:t})}))}))}async withoutMessage(){const e=(0,n.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e.show(this.#X),new Promise((t=>{e.addEventListener("primary",(()=>t(!0))),e.addEventListener("cancel",(()=>t(!1)))}))}}})),define("WoltLabSuite/Core/Component/Confirmation",["require","exports","tslib","./Dialog","../Language","../Dom/Util","./Confirmation/Custom"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.confirmationFactory=void 0,r=i.__importStar(r);class s{custom(e){return new a.ConfirmationCustom(e)}async delete(e){const t=`<p>${(0,o.getPhrase)("wcf.dialog.confirmation.cannotBeUndone")}</p>`,i=(0,n.dialogFactory)().fromHtml(t).asConfirmation({primary:(0,o.getPhrase)("wcf.dialog.button.primary.delete")});let r;return r=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.delete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.delete",{title:e}),i.show(r),new Promise((e=>{i.addEventListener("primary",(()=>e(!0))),i.addEventListener("cancel",(()=>e(!1)))}))}async restore(e){const t=(0,n.dialogFactory)().withoutContent().asConfirmation();let i;return i=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.restore.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.restore",{title:e}),t.show(i),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async softDelete(e,t=!1){let i;if(i=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.softDelete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.softDelete",{title:e}),t)return this.withReason(i,!0);const r=(0,n.dialogFactory)().withoutContent().asConfirmation();return r.show(i),new Promise((e=>{r.addEventListener("primary",(()=>{e({result:!0})})),r.addEventListener("cancel",(()=>{e({result:!1})}))}))}async withReason(e,t){const i=(0,n.dialogFactory)().withoutContent().asConfirmation(),a=r.getUniqueId(),s=(0,o.getPhrase)(t?"wcf.dialog.confirmation.reason.optional":"wcf.dialog.confirmation.reason"),l=document.createElement("dl");l.innerHTML=`\n      <dt><label for="${a}">${s}</label></dt>\n      <dd><textarea id="${a}" cols="40" rows="3"></textarea></dd>\n    `;const c=l.querySelector("textarea");return i.content.append(l),i.show(e),new Promise((e=>{i.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),i.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=void 0,o=i.__importDefault(o),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class n{#Q=new Map;#J;constructor(e){this.#J=new URL(e)}async get(e){let t=this.#Q.get(e);if(void 0!==t)return t;this.#J.searchParams.set("id",e.toString());const n=await(0,i.prepareRequest)(this.#J).get().fetchAsResponse();return n?.ok?(t=await n.text(),this.#Q.set(e,t),t):""}reset(e){this.#Q.delete(e)}}t.SharedCache=n,t.default=n})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.setupFor=void 0,n=i.__importDefault(n),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importDefault(l);class c{#K;#Z=void 0;#ee=!0;#M;#te;#ie=void 0;#ne=void 0;constructor(e,t,i){this.#K=e,this.#M=t,this.#te=i,t.addEventListener("mouseenter",(()=>{this.#oe()})),t.addEventListener("mouseleave",(()=>{this.#re()}));const n=window.matchMedia("(hover:hover)");this.#ae(n.matches),n.addEventListener("change",(e=>{this.#ae(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#ae(!1)})),this.#oe()}#oe(){this.#ee&&(this.#ne?.stop(),void 0===this.#ie?this.#ie=new a.default((e=>{e.stop();const t=this.#se();this.#K.get(t).then((e=>{if(""===e)return;const t=this.#le();n.default.setInnerHtml(t,e),s.set(t,this.#M,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#ie.restart())}#re(){this.#ee&&(this.#ie?.stop(),void 0===this.#ne?this.#ne=new a.default((e=>{e.stop(),this.#Z?.setAttribute("aria-hidden","true")}),500):this.#ne.restart())}#ae(e){this.#ee=e,this.#Z?.setAttribute("aria-hidden","true")}#se(){return parseInt(this.#M.dataset.objectId)}#le(){return void 0===this.#Z&&(this.#Z=document.createElement("div"),this.#Z.classList.add("popoverContainer"),this.#Z.dataset.identifier=this.#te,this.#Z.setAttribute("aria-hidden","true"),this.#Z.addEventListener("transitionend",(()=>{"true"===this.#Z.getAttribute("aria-hidden")&&this.#Z.remove()})),this.#Z.addEventListener("mouseenter",(()=>{this.#ne?.stop()})),this.#Z.addEventListener("mouseleave",(()=>{this.#re()}))),null===this.#Z.parentNode&&(0,o.getPageOverlayContainer)().append(this.#Z),this.#Z}}const d=new Map;t.setupFor=function(e){const{identifier:t,endpoint:i,selector:n}=e,o=new l.default(i);d.set(t,o),(0,r.wheneverFirstSeen)(n,(e=>{null===e.closest(".popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map,n={add(e,t){if(i.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()},setupDialog(e,t){let i;return e.addEventListener("validate",(e=>{n.has(t)&&(i=n.getData(t),n.delete(t),i instanceof Promise&&(e.detail.push(new Promise((e=>{i.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==i?i instanceof Promise?i.then((e=>{t(e)})):t(i):t({})}))}))}};return n})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.ajaxApi=t.setContent=t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((i=>{const n=r.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;i.dataset.cacheId=a,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(i);a.childElementCount||(a=r.default.createFragmentFromHtml("<p>"+i+"</p>")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}resetCache(e,t){const i=`${e}-${t}`;this.cache.has(i)&&this.cache.set(i,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},i,i)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)},t.resetCache=function(e,t){l().resetCache(e,t)}})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=void 0,t.promiseMutex=function(e){let t=!1;return function(...i){return!t&&(t=!0,e(...i).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return e===s||e===l||e===c}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),i(n.error)})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function r(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");let r=t;for(let e=2;e<r.length&&255===r[e];){const t=2+(r[e+2]<<8|r[e+3]);if(r[e+1]===a.APP1){let o="";for(let t=e+4;0!==r[t]&&t<r.length;t++)o+=String.fromCharCode(r[t]);if(i(o)){const i=r.slice(0,e),o=r.slice(e+t);r=n(i,o)}else e+=t}else e+=t}return new Blob([r],{type:e.type})}Object.defineProperty(t,"__esModule",{value:!0}),t.setExifData=t.removeExifData=t.getExifBytesFromJpeg=void 0;const a={SOI:216,APP0:224,APP1:225,APP2:226,APP3:227,APP4:228,APP5:229,APP6:230,APP7:231,APP8:232,APP9:233,APP10:234,APP11:235,APP12:236,APP13:237,APP14:238,COM:254},s="Exif",l="http://ns.adobe.com/xap/1.0/",c="http://ns.adobe.com/xmp/extension/";t.getExifBytesFromJpeg=async function(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);let r=new Uint8Array(0);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");for(let e=2;e<t.length&&255===t[e];){const o=2+(t[e+2]<<8|t[e+3]);if(t[e+1]===a.APP1){let a="";for(let i=e+4;0!==t[i]&&i<t.length;i++)a+=String.fromCharCode(t[i]);i(a)&&(r=n(r,t.slice(e,o+e)))}e+=o}return r},t.removeExifData=r,t.setExifData=async function(e,t){e=await r(e);const i=await o(e);let s=2;255===i[2]&&i[3]===a.APP0&&(s+=2+(i[4]<<8|i[5]));const l=n(i.slice(0,s),t,i.slice(s));return new Blob([l],{type:e.type})}})),define("WoltLabSuite/Core/Image/ImageUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsTransparentPixels=void 0,t.containsTransparentPixels=function(e){const t=e.getContext("2d");if(!t)throw new Error("Unable to get canvas context.");const i=t.getImageData(0,0,e.width,e.height);for(let e=3,t=i.data.length;e<t;e+=4)if(255!==i.data[e])return!0;return!1}})),define("WoltLabSuite/Core/Image/Resizer",["require","exports","tslib","../FileUtil","./ExifUtil","pica"],(function(e,t,i,n,o,r){"use strict";n=i.__importStar(n),o=i.__importStar(o);const a=new((r=i.__importDefault(r)).default)({features:["js","wasm","ww"]}),s="image/jpeg";return class{maxWidth=800;maxHeight=600;quality=.8;fileType=s;setMaxWidth(e){return null==e&&(e=800),this.maxWidth=e,this}setMaxHeight(e){return null==e&&(e=600),this.maxHeight=e,this}setQuality(e){return null==e&&(e=.8),this.quality=e,this}setFileType(e){return null==e&&(e=s),this.fileType=e,this}async saveFile(e,t,i=this.fileType,r=this.quality){const s=/(.+)(\..+?)$/.exec(t);let l=await a.toBlob(e.image,i,r);return"image/jpeg"===i&&void 0!==e.exif&&(l=await o.setExifData(l,e.exif)),n.blobToFile(l,s[1])}async loadFile(e){let t=Promise.resolve(void 0),i=e;"image/jpeg"===e.type&&(t=o.getExifBytesFromJpeg(e),i=await o.removeExifData(i));const n=new Promise(((e,t)=>{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),t(n.error)})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[r,a]=await Promise.all([t,n]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,r){const s=document.createElement("canvas");if(window.createImageBitmap&&(await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965");const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);s.width=Math.floor(e.width*d),s.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const p={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,p)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,i,n,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=i.toString(),m.appendChild(h)),function(e,t,i,n,c,d){function m(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",m),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),b.appendChild(n);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),n.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===i&&(g.innerHTML=o.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===i){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),i.append(t),e.appendChild(i)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const _=t.closest("form");if(null!==_){_.addEventListener("submit",l);let t=p.get(_);void 0===t&&(t=[],p.set(_,t)),t.push(e)}}(t,h,i,n,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid  input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const n=d.get(e),o=r.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(n.languageId!==t){const o=p.get(e);if(n.languageId){const e=n.callbacks.get("beforeSelect");e&&e(n.element),o.set(n.languageId,n.element.value)}if(0===t?p.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=a,n.buttonLabel.querySelector("fa-icon")?.remove(),t){n.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),n.buttonLabel.append(e)}else n.buttonLabel.classList.remove("active");n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=r.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),a=p.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!a.get(t));const n=e.querySelector("span");if(n.querySelector("fa-icon")?.remove(),i){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),n.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=p.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,i,n){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,i,n,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const i=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),i&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const r=t instanceof HTMLElement;s(e,n,r)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let b;(a||i.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,i,n)},t.registerCallback=function(e,t,i){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const i=p.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),p.set(e,n),void s(e,0,!0);p.set(e,n),i.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const i=t.buttonLabel.parentElement;n.default.hide(i),i.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const i=t.buttonLabel.parentElement;n.default.show(i),i.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!i.isEnabled)return!0;const n=p.get(e),o=r.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,i,n,o){"use strict";function r(e){(0,o.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,o.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),t.init=function(e,t,i,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected <textarea class="wysiwygTextarea" /> for id '${e}'.`);n.init(e,t,i,o),n.registerCallback(e,"select",r),n.registerCallback(e,"submit",a),n.registerCallback(e,"beforeSelect",a)}})),define("WoltLabSuite/Core/Media/Clipboard",["require","exports","tslib","../Controller/Clipboard","../Ui/Notification","../Ui/Dialog","../Event/Handler","../Language","../Ajax"],(function(e,t,i,n,o,r,a,s,l){"use strict";let c;Object.defineProperty(t,"__esModule",{value:!0}),t.setMediaManager=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l);let d=!1;const u=new class{_ajaxSetup(){return{data:{className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(e){switch(e.actionName){case"getSetCategoryDialog":r.open(this,e.returnValues.template);break;case"setCategory":r.close(this),o.show(),n.reload()}}_dialogSetup(){return{id:"mediaSetCategoryDialog",options:{onSetup:e=>{e.querySelector("button").addEventListener("click",(t=>{t.preventDefault();var i;i=~~e.querySelector('select[name="categoryID"]').value,l.api(u,{actionName:"setCategory",objectIDs:p,parameters:{categoryID:i}}),t.currentTarget.disabled=!0}))},title:s.get("wcf.media.setCategory")},source:null}}};let p=[];t.init=function(e,t,i){d||(n.setup({hasMarkedItems:t,pageClassName:e}),a.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",(e=>function(e){const t=e.data.parameters.objectIDs;switch(e.data.actionName){case"com.woltlab.wcf.media.delete":null!==e.responseData&&c.clipboardDeleteMedia(t);break;case"com.woltlab.wcf.media.insert":c.clipboardInsertMedia(t);break;case"com.woltlab.wcf.media.setCategory":p=t,l.api(u,{actionName:"getSetCategoryDialog"})}}(e))),d=!0),c=i},t.setMediaManager=function(e){c=e}})),define("WoltLabSuite/Core/Media/Upload",["require","exports","tslib","../Upload","../Core","../Dom/Util","../Language","../User","../Date/Util","../FileUtil","../Dom/Change/Listener","../Event/Handler"],(function(e,t,i,n,o,r,a,s,l,c,d,u){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u);class p extends n.default{_categoryId=null;_elementTagSize;_mediaManager;constructor(e,t,i){super(e,t,o.extend({className:"wcf\\data\\media\\MediaAction",multiple:!!i.mediaManager,singleFileRequests:!0},i||{})),i=i||{},this._elementTagSize=144,this._options.elementTagSize&&(this._elementTagSize=this._options.elementTagSize),this._mediaManager=null,this._options.mediaManager&&(this._mediaManager=this._options.mediaManager,delete this._options.mediaManager)}_createFileElement(e){let t;if("OL"===this._target.nodeName||"UL"===this._target.nodeName)t=document.createElement("li");else{if("TBODY"===this._target.nodeName){const i=this._target.getElementsByTagName("TR")[0],n=this._target.parentNode.parentNode;return"none"===n.style.getPropertyValue("display")?(t=i,n.style.removeProperty("display"),document.getElementById(this._target.dataset.noItemsInfo).remove()):(t=i.cloneNode(!0),t.removeAttribute("id"),r.identify(t)),Array.from(t.getElementsByTagName("TD")).forEach((t=>{if(t.classList.contains("columnMark"))t.querySelectorAll("[data-object-id]").forEach((e=>r.hide(e)));else if(t.classList.contains("columnIcon"))t.querySelectorAll("[data-object-id]").forEach((e=>r.hide(e))),t.querySelector(".mediaEditButton").classList.add("jsMediaEditButton"),t.querySelector(".jsObjectAction[data-object-action='delete']").dataset.confirmMessage=a.get("wcf.media.delete.confirmMessage",{title:e.name});else if(t.classList.contains("columnFilename")){let i=t.querySelector("img");i||(i=t.querySelector("fa-icon"));const n=document.createElement("span");n.innerHTML='<fa-icon size="48" name="spinner"></fa-icon>',n.classList.add("mediaThumbnail"),r.replaceElement(i,n);const o=t.querySelectorAll(".box48 > div > p");o[0].textContent=e.name;let a=o[1].getElementsByTagName("A")[0];a||(a=document.createElement("a"),o[1].getElementsByTagName("SMALL")[0].appendChild(a)),a.setAttribute("href",s.default.getLink()),a.textContent=s.default.username}else t.classList.contains("columnUploadTime")?(t.innerHTML="",t.appendChild(l.getTimeElement(new Date))):t.classList.contains("columnFilesize")?t.textContent=c.formatFilesize(e.size):t.classList.contains("columnDownloads")?t.textContent="0":t.innerHTML=""})),r.prepend(t,this._target),t}t=document.createElement("p")}const i=document.createElement("div");i.classList.add("mediaThumbnail"),t.appendChild(i);const n=document.createElement("fa-icon");n.size=144,n.setIcon("spinner"),i.appendChild(n);const o=document.createElement("div");o.className="mediaInformation",t.appendChild(o);const u=document.createElement("p");u.className="mediaTitle",u.textContent=e.name,o.appendChild(u);const p=document.createElement("progress");return p.max=100,o.appendChild(p),r.prepend(t,this._target),d.trigger(),t}_getParameters(){const e={elementTagSize:this._elementTagSize};if(this._mediaManager){e.imagesOnly=this._mediaManager.getOption("imagesOnly");const t=this._mediaManager.getCategoryId();t&&(e.categoryID=t)}return o.extend(super._getParameters(),e)}_replaceFileIcon(e,t,i){if(t.elementTag)e.outerHTML=t.elementTag;else if(t.tinyThumbnailType){const n=document.createElement("img");n.src=t.tinyThumbnailLink,n.alt="",n.style.setProperty("width",`${i}px`),n.style.setProperty("height",`${i}px`),r.replaceElement(e,n)}else{let i=c.getIconNameByFilename(t.filename);i=i?`file-${i}`:"file",e.setIcon(i,!1)}}_success(e,t){const i=this._fileElements[e];i.forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if("TR"===e.tagName)if(n)e.dataset.objectId=n.mediaID.toString(),e.querySelectorAll("[data-object-id]").forEach((e=>{e.dataset.objectId=n.mediaID.toString(),e.style.removeProperty("display")})),e.querySelector(".columnMediaID").textContent=n.mediaID.toString(),this._replaceFileIcon(e.querySelector(".columnFilename fa-icon"),n,48);else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename});const o=document.createElement("button");o.type="button",o.classList.add("jsTooltip"),o.title=a.get("wcf.global.button.delete"),o.addEventListener("click",(()=>{o.closest(".mediaFile").remove(),u.fire("com.woltlab.wcf.media.upload","removedErroneousUploadRow")}));const s=e.querySelector("fa-icon");s.setIcon("xmark"),s.insertAdjacentElement("beforebegin",o),o.append(s),e.classList.add("uploadFailed");const l=e.querySelectorAll(".columnFilename .box48 > div > p")[1];r.innerError(l,a.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})),l.remove()}else if(e.querySelector(".mediaInformation progress").remove(),n){const t=e.querySelector(".mediaThumbnail fa-icon");this._replaceFileIcon(t,n,144),e.classList.add("jsClipboardObject","mediaFile","jsObjectActionObject"),e.dataset.objectId=n.mediaID.toString(),this._mediaManager&&(this._mediaManager.setupMediaElement(n,e),this._mediaManager.addMedia(n,e))}else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename}),e.querySelector(".mediaThumbnail fa-icon").setIcon("xmark"),e.classList.add("uploadFailed","pointer","jsTooltip"),e.title=a.get("wcf.global.button.delete"),e.addEventListener("click",(()=>e.remove())),e.querySelector(".mediaInformation .mediaTitle").textContent=a.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})}d.trigger()})),u.fire("com.woltlab.wcf.media.upload","success",{files:i,isMultiFileUpload:-1!==this._multiFileUploadIds.indexOf(e),media:t.returnValues.media,upload:this,uploadId:e})}}return p})),define("WoltLabSuite/Core/Media/Replace",["require","exports","tslib","../Core","./Upload","../Language","../Dom/Util","../Ui/Notification","../Dom/Change/Listener"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);class c extends o.default{_mediaID;constructor(e,t,i,o){super(t,i,n.extend(o,{action:"replaceFile"})),this._mediaID=e}_createButton(){super._createButton(),this._button.classList.add("small"),this._button.querySelector("span").textContent=r.get("wcf.media.button.replaceFile")}_createFileElement(){return this._target}_getFormData(){return{objectIDs:[this._mediaID]}}_success(e,t){this._fileElements[e].forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if(n)n.isImage&&(this._target.innerHTML=n.smallThumbnailTag),document.getElementById("mediaFilename").textContent=n.filename,document.getElementById("mediaFilesize").textContent=n.formattedFilesize,n.isImage&&(document.getElementById("mediaImageDimensions").textContent=n.imageDimensions),document.getElementById("mediaUploader").innerHTML=n.userLinkElement,this._options.mediaEditor.updateData(n),a.default.innerError(this._buttonContainer,""),s.show();else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename}),a.default.innerError(this._buttonContainer,r.get("wcf.media.upload.error."+n.errorType,{filename:n.filename}))}l.trigger()}))}}return c})),define("WoltLabSuite/Core/Media/Editor",["require","exports","tslib","../Ui/Notification","../Ui/Dialog","../Language/Chooser","../Language/Input","../Dom/Util","../Dom/Traverse","../Dom/Change/Listener","../Language","../Ajax","./Replace"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c),d=i.__importStar(d),u=i.__importStar(u),p=i.__importDefault(p),class{_availableLanguageCount=1;_categoryIds=[];_dialogs=new Map;_callbackObject;_media=null;_oldCategoryId=0;constructor(e){if(this._callbackObject=e||{},this._callbackObject._editorClose&&"function"!=typeof this._callbackObject._editorClose)throw new TypeError("Callback object has no function '_editorClose'.");if(this._callbackObject._editorSuccess&&"function"!=typeof this._callbackObject._editorSuccess)throw new TypeError("Callback object has no function '_editorSuccess'.")}_ajaxSetup(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(){n.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),o.close(`mediaEditor_${this._media.mediaID}`),this._media=null}_close(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()}_initEditor(e,t){this._availableLanguageCount=~~t.returnValues.availableLanguageCount,this._categoryIds=t.returnValues.categoryIDs.map((e=>~~e)),t.returnValues.mediaData&&(this._media=t.returnValues.mediaData);const i=this._media,n=i.mediaID;setTimeout((()=>{if(this._availableLanguageCount>1&&r.setLanguageId(`mediaEditor_${n}_languageID`,i.languageID||window.LANGUAGE_ID),this._categoryIds.length){const t=e.querySelector("select[name=categoryID]");i.categoryID?t.value=i.categoryID.toString():t.value="0"}const t=e.querySelector("input[name=title]"),o=e.querySelector("input[name=altText]"),l=e.querySelector("textarea[name=caption]");if(this._availableLanguageCount>1&&i.isMultilingual?(document.getElementById(`altText_${n}`)&&a.setValues(`altText_${n}`,i.altText||{}),document.getElementById(`caption_${n}`)&&a.setValues(`caption_${n}`,i.caption||{}),a.setValues(`title_${n}`,i.title||{})):(t.value=i.title?i.title[i.languageID||window.LANGUAGE_ID]:"",o&&(o.value=i.altText?i.altText[i.languageID||window.LANGUAGE_ID]:""),l&&(l.value=i.caption?i.caption[i.languageID||window.LANGUAGE_ID]:"")),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");t.addEventListener("change",(e=>this._updateLanguageFields(e))),this._updateLanguageFields(null,t)}o&&o.addEventListener("keypress",(e=>this._keyPress(e))),t.addEventListener("keypress",(e=>this._keyPress(e))),e.querySelector("button[data-type=submit]").addEventListener("click",(()=>this._saveData())),document.activeElement.blur(),document.getElementById(`mediaEditor_${n}`).parentNode.scrollTop=0;const d=e.querySelector(".mediaManagerMediaReplaceButton");let u=e.querySelector(".mediaThumbnail");u||(u=document.createElement("div"),e.appendChild(u)),new p.default(n,s.identify(d),s.identify(u),{mediaEditor:this}),c.default.trigger()}),200)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._saveData())}_saveData(){const e=o.getDialog(`mediaEditor_${this._media.mediaID}`).content,t=e.querySelector("select[name=categoryID]"),i=e.querySelector("input[name=altText]"),n=e.querySelector("textarea[name=caption]"),c=e.querySelector("input[name=captionEnableHtml]"),p=e.querySelector("input[name=title]");let m=!1;const h=!!i&&l.childByClass(i.parentNode,"innerError"),f=!!n&&l.childByClass(n.parentNode,"innerError"),g=l.childByClass(p.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~t.value,-1===this._categoryIds.indexOf(this._media.categoryID)&&(this._media.categoryID=0)),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");this._media.isMultilingual=~~t.checked,this._media.languageID=this._media.isMultilingual?null:r.getLanguageId(`mediaEditor_${this._media.mediaID}_languageID`)}else this._media.languageID=window.LANGUAGE_ID;this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual?(i&&!a.validate(i.id,!0)&&(m=!0,h||s.innerError(i,d.get("wcf.global.form.error.multilingual"))),n&&!a.validate(n.id,!0)&&(m=!0,f||s.innerError(n,d.get("wcf.global.form.error.multilingual"))),a.validate(p.id,!0)||(m=!0,g||s.innerError(p,d.get("wcf.global.form.error.multilingual"))),this._media.altText=i?this.mapToI18nValues(a.getValues(i.id)):"",this._media.caption=n?this.mapToI18nValues(a.getValues(n.id)):"",this._media.title=this.mapToI18nValues(a.getValues(p.id))):(this._media.altText[this._media.languageID]=i?i.value:"",this._media.caption[this._media.languageID]=n?n.value:"",this._media.title[this._media.languageID]=p.value),this._media.captionEnableHtml=c?~~c.checked:0;const b={allowAll:~~document.getElementById(`mediaEditor_${this._media.mediaID}_aclAllowAll`).checked,group:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[group][]"]`)).map((e=>~~e.value)),user:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[user][]"]`)).map((e=>~~e.value))};m||(h&&h.remove(),f&&f.remove(),g&&g.remove(),u.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{aclValues:b,altText:this._media.altText,caption:this._media.caption,data:{captionEnableHtml:this._media.captionEnableHtml,categoryID:this._media.categoryID,isMultilingual:this._media.isMultilingual,languageID:this._media.languageID},title:this._media.title}}))}mapToI18nValues(e){const t={};return e.forEach(((e,i)=>t[i]=e)),t}_updateLanguageFields(e,t){e&&(t=e.currentTarget);const i=this._media.mediaID,n=document.getElementById(`mediaEditor_${i}_languageIDContainer`).parentNode;t.checked?(a.enable(`title_${i}`),document.getElementById(`caption_${i}`)&&a.enable(`caption_${i}`),document.getElementById(`altText_${i}`)&&a.enable(`altText_${i}`),s.hide(n)):(a.disable(`title_${i}`),document.getElementById(`caption_${i}`)&&a.disable(`caption_${i}`),document.getElementById(`altText_${i}`)&&a.disable(`altText_${i}`),s.show(n))}edit(e){let t,i=0;if("object"==typeof e?(t=e,i=t.mediaID):(t={mediaID:e},i=e),null!==this._media)throw new Error(`Cannot edit media with id ${i} while editing media with id '${this._media.mediaID}'.`);this._media=t,this._dialogs.has(`mediaEditor_${i}`)||this._dialogs.set(`mediaEditor_${i}`,{_dialogSetup:()=>({id:`mediaEditor_${i}`,options:{backdropCloseOnClick:!1,onClose:()=>this._close(),title:d.get("wcf.media.edit")},source:{after:(e,t)=>this._initEditor(e,t),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[i]}}})}),o.open(this._dialogs.get(`mediaEditor_${i}`))}updateData(e){this._callbackObject._editorSuccess&&this._callbackObject._editorSuccess(e,void 0,!1)}}})),define("WoltLabSuite/Core/Notification/Handler",["require","exports","tslib","../Ajax","../Core","../Event/Handler","./ServiceWorker","WoltLabSuite/Core/Ui/User/Menu/Manager"],(function(e,t,i,n,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poll=t.enableNotifications=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);class l{allowNotification;icon;inactiveSince=0;lastRequestTimestamp=window.TIME_NOW;requestTimer=void 0;constructor(e){e=o.extend({icon:""},e),this.icon=e.icon,this.prepareNextRequest(),document.addEventListener("visibilitychange",(e=>this.onVisibilityChange(e))),window.addEventListener("storage",(()=>this.onStorage())),this.onVisibilityChange(),"Notification"in window&&"granted"===Notification.permission&&(this.allowNotification=!0),(0,a.serviceWorkerSupported)()&&window.navigator.serviceWorker.addEventListener("message",(e=>{const t=e.data;t.time>this.lastRequestTimestamp&&(this.lastRequestTimestamp=t.time)}))}enableNotifications(){this.allowNotification=!0}onVisibilityChange(e){e&&!document.hidden&&(Date.now()-this.inactiveSince)/6e4>4&&(this.resetTimer(),this.dispatchRequest()),this.inactiveSince=document.hidden?Date.now():0}getNextDelay(){if(0===this.inactiveSince)return 5;const e=~~((Date.now()-this.inactiveSince)/6e4);return e<15?5:e<30?10:15}resetTimer(){this.requestTimer&&(window.clearTimeout(this.requestTimer),this.requestTimer=void 0)}prepareNextRequest(){this.resetTimer(),this.requestTimer=window.setTimeout((()=>this.dispatchRequest()),6e4*this.getNextDelay())}dispatchRequest(){const e={};r.fire("com.woltlab.wcf.notification","beforePoll",e),e.lastRequestTimestamp=this.lastRequestTimestamp,n.api(this,{parameters:e})}onStorage(){let e,t;this.prepareNextRequest();let i=!1;try{e=window.localStorage.getItem(o.getStoragePrefix()+"notification"),t=window.localStorage.getItem(o.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),t=JSON.parse(t)}catch(e){i=!0}i||r.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:t})}_ajaxSuccess(e){const t=e.returnValues.keepAliveData,i=e.returnValues.pollData;(0,s.updateCounter)("com.woltlab.wcf.notifications",t.userNotificationCount);let n=!1;try{window.localStorage.setItem(o.getStoragePrefix()+"notification",JSON.stringify(i)),window.localStorage.setItem(o.getStoragePrefix()+"keepAliveData",JSON.stringify(t))}catch(e){n=!0,window.console.log(e)}n||this.prepareNextRequest(),this.lastRequestTimestamp=e.returnValues.lastRequestTimestamp,r.fire("com.woltlab.wcf.notification","afterPoll",i),this.showNotification(i)}showNotification(e){if(this.allowNotification&&"object"==typeof e.notification&&"string"==typeof e.notification.message){let t;const i=document.createElement("div");i.innerHTML=e.notification.message,i.querySelectorAll("img").forEach((e=>{e.replaceWith(document.createTextNode(e.alt))}));try{t=new window.Notification(e.notification.title,{body:i.textContent,icon:this.icon})}catch(e){if(e instanceof Error&&"TypeError"===e.name)return;throw e}t.onclick=()=>{window.focus(),t.close(),window.location.href=e.notification.link}}}_ajaxSetup(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}let c;t.setup=function(e){c||(c=new l(e))},t.enableNotifications=function(){c.enableNotifications()},t.poll=function(){c?.dispatchRequest()}})),define("WoltLabSuite/Core/Ui/Suggestion",["require","exports","tslib","../Ajax","../Core","./Dropdown/Simple"],(function(e,t,i,n,o,r){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),class{ajaxPayload;callbackSelect;dropdownMenu=null;excludedSearchValues;element;threshold;value="";constructor(e,t){const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id.");if(this.element=i,this.ajaxPayload=o.extend({actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},t.ajax),"function"!=typeof t.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this.callbackSelect=t.callbackSelect,this.excludedSearchValues=new Set(Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[]),this.threshold=void 0===t.threshold?3:t.threshold,this.element.addEventListener("click",(e=>e.preventDefault())),this.element.addEventListener("keydown",(e=>this.keyDown(e))),this.element.addEventListener("keyup",(e=>this.keyUp(e)))}addExcludedValue(e){this.excludedSearchValues.add(e)}removeExcludedValue(e){this.excludedSearchValues.delete(e)}isActive(){return null!==this.dropdownMenu&&r.default.isOpen(this.element.id)}keyDown(e){if(!this.isActive())return!0;if(-1===["ArrowDown","ArrowUp","Enter","Escape"].indexOf(e.key))return!0;let t,i=0;const n=this.dropdownMenu.childElementCount;for(;i<n&&(t=this.dropdownMenu.children[i],!t.classList.contains("active"));)i++;if("Enter"===e.key)r.default.close(this.element.id),this.select(void 0,t);else if("Escape"===e.key){if(!r.default.isOpen(this.element.id))return!0;r.default.close(this.element.id)}else{let o=0;"ArrowUp"===e.key?o=(0===i?n:i)-1:"ArrowDown"===e.key&&(o=i+1,o===n&&(o=0)),o!==i&&(t.classList.remove("active"),this.dropdownMenu.children[o].classList.add("active"))}return e.preventDefault(),!1}select(e,t){e instanceof MouseEvent&&(t=e.currentTarget.parentNode);const i=t.children[0];this.callbackSelect(this.element.id,{objectId:+(i.dataset.objectId||0),value:t.textContent||"",type:i.dataset.type||""}),e instanceof MouseEvent&&this.element.focus()}keyUp(e){const t=e.currentTarget.value.trim();if(this.value!==t){if(t.length<this.threshold)return null!==this.dropdownMenu&&r.default.close(this.element.id),void(this.value=t);this.value=t,n.api(this,{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:t}}})}}_ajaxSetup(){return{data:this.ajaxPayload}}_ajaxSuccess(e){null===this.dropdownMenu?(this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="dropdownMenu",r.default.initFragment(this.element,this.dropdownMenu)):this.dropdownMenu.innerHTML="",Array.isArray(e.returnValues)&&e.returnValues.length>0?(e.returnValues.forEach(((e,t)=>{const i=document.createElement("a");e.icon?(i.className="box16",i.innerHTML=`${e.icon} <span></span>`,i.children[1].textContent=e.label):i.textContent=e.label,i.dataset.objectId=e.objectID.toString(),e.type&&(i.dataset.type=e.type),i.addEventListener("click",(e=>this.select(e)));const n=document.createElement("li");0===t&&(n.className="active"),n.appendChild(i),this.dropdownMenu.appendChild(n)})),r.default.open(this.element.id,!0)):r.default.close(this.element.id)}}})),define("WoltLabSuite/Core/Ui/ItemList",["require","exports","tslib","../Core","../Dom/Traverse","../Language","./Suggestion","./Dropdown/Simple","../Dom/Util"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e){const t=y.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems}function d(e){const t=y.get(e);c(e)?(l.default.show(t.element),l.default.hide(t.limitReached),t.list.dataset.acceptsNewItems="true"):(l.default.hide(t.element),l.default.show(t.limitReached),t.list.dataset.acceptsNewItems="false")}function u(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?b(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}function p(e){if("Enter"===e.key){e.preventDefault();const t=e.currentTarget;if(y.get(t.id).options.restricted)return;const i=t.value.trim();i.length&&g(t.id,{objectId:0,value:i})}}function m(e){const t=e.currentTarget;if(y.get(t.id).options.restricted)return;let i=t.value;i.includes(",")&&(i=i.replace(/,/g,""),i.length?g(t.id,{objectId:0,value:i}):t.value=i)}function h(e){e.preventDefault();const t=e.clipboardData.getData("text/plain"),i=e.currentTarget,n=i.id,o=+i.maxLength;t.split(/,/).forEach((e=>{e=e.trim(),-1!==o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&c(n)&&g(n,{objectId:0,value:e})}))}function f(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}function g(e,t){const i=y.get(e),n=document.createElement("li");n.className="item";const o=document.createElement("span");if(o.className="content",o.dataset.objectId=t.objectId.toString(),t.type&&(o.dataset.type=t.type),o.textContent=t.value,n.appendChild(o),!i.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",b),n.appendChild(e)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||d(e);let r=v(i);"function"==typeof i.options.callbackChange&&(null===r&&(r=w(e)),i.options.callbackChange(e,r))}function b(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const i=e.parentElement.dataset.elementId||"",n=y.get(i);e.children[0].textContent&&n.suggestion.removeExcludedValue(e.children[0].textContent),e.remove(),t||n.element.focus(),d(i);let o=v(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=w(i)),n.options.callbackChange(i,o))}function v(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);const t=w(e.element.id);return e.shadow.value=w(e.element.id).map((e=>e.value)).join(","),t}function _(e){const t=e.currentTarget,i=y.get(t.id);if(i.options.restricted)return;const n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||g(t.id,{objectId:0,value:n}))}function w(e){const t=y.get(e);if(!t)throw new Error("Element id '"+e+"' is unknown.");const i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:+(e.dataset.objectId||""),value:e.textContent.trim(),type:e.dataset.type})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importDefault(s),l=i.__importDefault(l);const y=new Map;t.init=function(e,t,i){const d=document.getElementById(e);if(null===d)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(y.has(e)){const t=y.get(e);Object.keys(t).forEach((e=>{const i=t[e];i instanceof Element&&i.parentNode&&i.remove()})),s.default.destroy(e),y.delete(e)}const b=n.extend({ajax:{actionName:"getSearchResultList",className:"",parameters:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},i),v=o.parentByTag(d,"FORM");if(null!==v)if(b.isCSV)v.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}}));else{if(!b.submitFieldName.length&&"function"!=typeof b.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");v.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}const t=w(e);b.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=b.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,v.appendChild(t)})):b.callbackSubmit(v,t)}))}const E=function(e,t){const i=e.parentElement,n=document.createElement("ol");n.className="inputItemList"+(e.disabled?" disabled":""),n.dataset.acceptsNewItems="true",n.dataset.elementId=e.id,n.addEventListener("click",(t=>{t.target===n&&e.focus()}));const o=document.createElement("li");o.className="input",n.appendChild(o),e.addEventListener("input",m),e.addEventListener("keydown",u),e.addEventListener("keypress",p),e.addEventListener("keyup",f),e.addEventListener("paste",h);const a=e===document.activeElement;a&&e.blur(),e.addEventListener("blur",_),i.insertBefore(n,e),o.appendChild(e),a&&window.setTimeout((()=>{e.focus()}),1),-1!==t.maxLength&&(e.maxLength=t.maxLength);const s=document.createElement("span");s.className="inputItemListLimitReached",s.textContent=r.get("wcf.global.form.input.maxItems"),l.default.hide(s),o.appendChild(s);let c=null;const d=[];if(t.isCSV&&(c=document.createElement("input"),c.className="itemListInputShadow",c.type="hidden",c.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(c,n),e.value.split(",").forEach((e=>{(e=e.trim())&&d.push(e)})),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentNode.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,limitReached:s,list:n,shadow:c,values:d}}(d,b),S=new a.default(e,{ajax:b.ajax,callbackSelect:g,excludedSearchValues:b.excludedSearchValues});y.set(e,{dropdownMenu:null,element:E.element,limitReached:E.limitReached,list:E.list,listItem:E.element.parentElement,options:b,shadow:E.shadow,suggestion:S}),t=b.callbackSetupValues?b.callbackSetupValues():E.values.length?E.values:t,Array.isArray(t)&&t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),g(e,t)}))},t.getValues=w,t.setValues=function(e,t){const i=y.get(e);if(!i)throw new Error("Element id '"+e+"' is unknown.");o.childrenByClass(i.list,"item").forEach((e=>{b(e,!0)})),t.forEach((t=>{g(e,t)}))}})),define("WoltLabSuite/Core/Ui/Pagination",["require","exports"],(function(e,t){"use strict";return class{#ce;#de;#ue;constructor(e,t){"function"==typeof t.callbackSwitch&&(this.#ce=t.callbackSwitch),"function"==typeof t.callbackShouldSwitch&&(this.#de=t.callbackShouldSwitch),this.#ue=document.createElement("woltlab-core-pagination"),this.#ue.count=t.maxPage,this.#ue.page=t.activePage,e.append(this.#ue),this.#pe()}#pe(){this.#ue.addEventListener("switchPage",(e=>{void 0===this.#de||!1!==this.#de(e.detail)?this.#ce&&this.#ce(e.detail):e.preventDefault()}))}getActivePage(){return this.#ue.page}getElement(){return this.#ue.parentElement}getMaxPage(){return this.#ue.count}switchPage(e,t){if(t instanceof MouseEvent){t.preventDefault();const e=t.currentTarget;if(e&&e.dataset.tooltip){const t=document.getElementById("balloonTooltip");if(t){const i=new Event("mouseleave",{bubbles:!0,cancelable:!0});e.dispatchEvent(i),t.style.removeProperty("top"),t.style.removeProperty("bottom")}}}if((e=~~e)>0&&this.#ue.page!==e&&e<=this.#ue.count){if(void 0!==this.#de&&!this.#de(e))return;this.#ue.jumpToPage(e),void 0!==this.#ce&&this.#ce(e)}}}})),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["require","exports","https://connect.facebook.net/en_US/sdk.js"],(function(e,t){"use strict";return FB.init({version:"v7.0"}),FB})),define("WoltLabSuite/Core/Api/Comments/CreateComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createComment=void 0,t.createComment=async function(e,t,o,r=""){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments`),s={objectTypeID:e,objectID:t,message:o,guestToken:r};let l;try{l=await(0,i.prepareRequest)(a).post(s).fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(l)}})),define("WoltLabSuite/Core/Api/Comments/DeleteComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteComment=void 0,t.deleteComment=async function(e){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}`).delete().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/EditComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editComment=void 0,t.editComment=async function(e){const t=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}/edit`);let o;try{o=await(0,i.prepareRequest)(t).get().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Comments/EnableComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableComment=void 0,t.enableComment=async function(e){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}/enable`).post().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/RenderComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderComment=void 0,t.renderComment=async function(e,t=undefined,o=!1,r=undefined){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}/render`);let s;a.searchParams.set("messageOnly",o.toString()),void 0!==t&&a.searchParams.set("responseID",t.toString()),void 0!==r&&a.searchParams.set("objectTypeID",r.toString());try{s=await(0,i.prepareRequest)(a).get().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Api/Comments/RenderComments",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderComments=void 0,t.renderComments=async function(e,t,o=0){const r=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/render`);let a;r.searchParams.set("objectTypeID",e.toString()),r.searchParams.set("objectID",t.toString()),r.searchParams.set("lastCommentTime",o.toString());try{a=await(0,i.prepareRequest)(r).get().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(a)}})),define("WoltLabSuite/Core/Api/Comments/UpdateComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateComment=void 0,t.updateComment=async function(e,t){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}`).post({message:t}).fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Files/DeleteFile",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteFile=void 0,t.deleteFile=async function(e){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/files/${e}`).delete().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Files/GenerateThumbnails",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateThumbnails=void 0,t.generateThumbnails=async function(e){const t=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/files/${e}/generatethumbnails`);let o;try{o=await(0,i.prepareRequest)(t).post().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Files/Upload",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=void 0,t.upload=async function(e,t,o,r,a){const s=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/files/upload`),l={filename:e,fileSize:t,fileHash:o,objectType:r,context:a};let c;try{c=await(0,i.prepareRequest)(s).post(l).fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(c)}})),define("WoltLabSuite/Core/Api/Sessions/DeleteSession",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSession=void 0,t.deleteSession=async function(e){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/sessions/${e}`).delete().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Component/File/Helper",["require","exports","WoltLabSuite/Core/Language","WoltLabSuite/Core/FileUtil"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertFileInformation=t.fileInitializationFailed=t.removeUploadProgress=t.trackUploadProgress=void 0,t.trackUploadProgress=function(e,t){const i=document.createElement("progress");i.classList.add("fileList__item__progress__bar"),i.max=100;const n=document.createElement("span");n.classList.add("fileList__item__progress__readout"),t.addEventListener("uploadProgress",(t=>{if(i.value=t.detail,n.textContent=`${t.detail}%`,null===i.parentNode){e.classList.add("fileProcessor__item--uploading");const t=document.createElement("div");t.classList.add("fileList__item__progress"),t.append(i,n),e.append(t)}}))},t.removeUploadProgress=function(e){e.classList.contains("fileProcessor__item--uploading")&&(e.classList.remove("fileProcessor__item--uploading"),e.querySelector(".fileList__item__progress")?.remove())},t.fileInitializationFailed=function(e,t,n){if(n instanceof Error)throw n;if(void 0===t.apiError)return;let o;const r=t.apiError.getValidationError();if(void 0!==r)switch(r.param){case"preflight":o=(0,i.getPhrase)(`wcf.upload.error.${r.code}`);break;case"validation":o=(0,i.getPhrase)(`wcf.upload.validation.error.${r.code}`);break;default:o="Unrecognized error type: "+JSON.stringify(r)}else o=`Unexpected server error: [${t.apiError.type}] ${t.apiError.message}`;!function(e,t){e.classList.add("fileList__item--error");const i=document.createElement("div");i.classList.add("fileList__item__errorMessage"),i.textContent=t,e.append(i)}(e,o)},t.insertFileInformation=function(e,t){const i=document.createElement("div");i.classList.add("fileList__item__file"),i.append(t);const o=document.createElement("div");o.classList.add("fileList__item__filename"),o.textContent=t.filename||t.dataset.filename;const r=document.createElement("div");r.classList.add("fileList__item__fileSize"),r.textContent=(0,n.formatFilesize)(t.fileSize||parseInt(t.dataset.fileSize)),e.append(i,o,r)}})),define("WoltLabSuite/Core/Component/Attachment/Entry",["require","exports","tslib","WoltLabSuite/Core/Ui/Dropdown/Simple","WoltLabSuite/Core/Dom/Change/Listener","../Ckeditor/Event","WoltLabSuite/Core/Api/Files/DeleteFile","WoltLabSuite/Core/Language","WoltLabSuite/Core/Component/File/Helper"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e,t,i){const n=document.createElement("button");return n.type="button",n.textContent=(0,s.getPhrase)("wcf.attachment.insert"),n.addEventListener("click",(()=>{(0,r.dispatchToCkeditor)(i).insertAttachment({attachmentId:e,url:t})})),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createAttachmentFromFile=void 0,o=i.__importDefault(o),t.createAttachmentFromFile=function(e,t){const i=document.createElement("li");return i.classList.add("fileList__item","attachment__item"),(0,l.insertFileInformation)(i,e),e.ready.then((()=>{!function(e,t,i){const l=t.data;if(void 0===l)throw new Error("No meta data was returned from the server.",{cause:{file:t}});const d=t.fileId;if(void 0===d)throw new Error("The file id is not set.",{cause:{file:t}});const u=[];let p;if(t.isImage()){const n=t.thumbnails.find((e=>"tiny"===e.identifier));void 0!==n?t.thumbnail=n:t.link&&(t.previewUrl=t.link);const r=t.thumbnails.find((e=>""===e.identifier))?.link;if(void 0!==r){p=c(l.attachmentID,r,i);const e=c(l.attachmentID,t.link,i);e.textContent=(0,s.getPhrase)("wcf.attachment.insertFull"),u.push(e)}else p=c(l.attachmentID,t.link?t.link:"",i);if(void 0!==t.link&&void 0!==t.filename){const i=document.createElement("a");i.href=t.link,i.classList.add("jsImageViewer"),i.title=t.filename,i.textContent=t.filename;const n=e.querySelector(".fileList__item__filename");n.innerHTML="",n.append(i),o.default.trigger()}}else p=c(l.attachmentID,t.isImage()&&t.link?t.link:"",i);const m=document.createElement("ul");m.classList.add("dropdownMenu");for(const e of u){const t=document.createElement("li");t.append(e),m.append(t)}if(0!==m.childElementCount){const e=document.createElement("li");e.classList.add("dropdownDivider"),m.append(e)}const h=document.createElement("li");h.append(function(e,t,i,n){const o=document.createElement("button");return o.type="button",o.textContent=(0,s.getPhrase)("wcf.global.button.delete"),o.addEventListener("click",(()=>{(0,a.deleteFile)(e).then((e=>{e.unwrap(),(0,r.dispatchToCkeditor)(i).removeAttachment({attachmentId:t}),n.remove()}))})),o}(d,l.attachmentID,i,e)),m.append(h);const f=document.createElement("button");f.classList.add("button","small"),f.type="button",f.setAttribute("aria-label",(0,s.getPhrase)("wcf.global.button.more")),f.innerHTML='<fa-icon name="ellipsis-vertical"></fa-icon>';const g=document.createElement("div");g.classList.add("fileList__item__buttons"),p.classList.add("button","small"),g.append(p,f),e.append(g),(0,n.initFragment)(f,m),f.addEventListener("click",(e=>{e.stopPropagation(),(0,n.toggleDropdown)(f.id)}))}(i,e,t)})).catch((t=>{(0,l.fileInitializationFailed)(i,e,t)})).finally((()=>{(0,l.removeUploadProgress)(i)})),(0,l.trackUploadProgress)(i,e),i}})),define("WoltLabSuite/Core/Component/File/woltlab-core-file",["require","exports","WoltLabSuite/Core/FileUtil"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreFileElement=t.Thumbnail=void 0;class n{#te;#me;constructor(e,t){this.#te=e,this.#me=t}get identifier(){return this.#te}get link(){return this.#me}}t.Thumbnail=n;class o extends HTMLElement{#Q=void 0;#he="";#fe=void 0;#ge=void 0;#me=void 0;#be=void 0;#ve=0;#_e=void 0;#we=[];#ye;#Ee;#Se;constructor(){super(),this.#Se=new Promise(((e,t)=>{this.#Ee=e,this.#ye=t}))}connectedCallback(){let e=!1;0===this.#ve&&(e=this.#Ce()),this.#Le(),e&&this.#Ee()}#Ce(){if(void 0===this.#fe){this.#he=this.dataset.filename||"unknown.bin",delete this.dataset.filename,this.#ge=parseInt(this.dataset.fileSize||"0"),delete this.dataset.fileSize,this.#be=this.dataset.mimeType||"application/octet-stream",delete this.dataset.mimeType;const e=parseInt(this.getAttribute("file-id")||"0");if(!e)return this.#ve=1,!1;this.#fe=e}if(this.dataset.thumbnails){const e=JSON.parse(this.dataset.thumbnails);for(const t of e)this.#we.push(new n(t.identifier,t.link));delete this.dataset.thumbnails}return this.dataset.metaData&&(this.#Q=JSON.parse(this.dataset.metaData),delete this.dataset.metaData),this.#me=this.dataset.link,delete this.dataset.link,this.#ve=3,!0}#Le(){switch(this.#ve){case 1:case 2:this.#ke("spinner");break;case 3:if(this.previewUrl)this.#xe(this.previewUrl);else{const e=this.iconName||"file";this.#ke(e)}break;case 4:this.#ke("triangle-exclamation");break;default:throw new Error("Unreachable",{cause:{state:this.#ve}})}}#xe(e){let t=this.querySelector("img");null===t&&(this.innerHTML="",t=document.createElement("img"),t.alt="",this.append(t)),t.src=e,this.unbounded?(t.removeAttribute("height"),t.removeAttribute("width")):(t.height=64,t.width=64)}#ke(e){let t=this.querySelector("fa-icon");return null===t?(this.innerHTML="",t=document.createElement("fa-icon"),t.size=64,t.setIcon(e),this.append(t)):t.setIcon(e),t}get fileId(){return this.#fe}get iconName(){if(void 0===this.mimeType)return;const e=(0,i.getExtensionByMimeType)(this.mimeType);if(""===e)return;const t=(0,i.getIconNameByFilename)(e);return""!==t?`file-${t}`:void 0}get previewUrl(){return this.dataset.previewUrl}set previewUrl(e){this.dataset.previewUrl=e,this.#Le()}get unbounded(){return"unbounded"===this.getAttribute("dimensions")}set unbounded(e){e?this.setAttribute("dimensions","unbounded"):this.removeAttribute("dimensions"),this.#Le()}get filename(){return this.#he}get fileSize(){return this.#ge}get mimeType(){return this.#be}get data(){return this.#Q}get link(){return this.#me}isImage(){if(void 0===this.mimeType)return!1;switch(this.mimeType){case"image/gif":case"image/jpeg":case"image/png":case"image/webp":return!0;default:return!1}}uploadFailed(e){1===this.#ve&&(this.#ve=4,this.#_e=e,this.#Le(),this.#ye())}uploadCompleted(e,t,i,n,o){1===this.#ve&&(this.#Q=n,this.#fe=e,this.#me=i,this.#be=t,this.setAttribute("file-id",e.toString()),o?(this.#ve=2,this.#Le()):(this.#ve=3,this.#Le(),this.#Ee()))}setThumbnails(e){if(2===this.#ve){for(const t of e)this.#we.push(new n(t.identifier,t.link));this.#ve=3,this.#Le(),this.#Ee()}}isFailedUpload(){return 4===this.#ve}set thumbnail(e){this.#we.includes(e)&&this.#xe(e.link)}get thumbnails(){return[...this.#we]}get ready(){return this.#Se}get apiError(){return this.#_e}}t.WoltlabCoreFileElement=o,t.default=o,window.customElements.define("woltlab-core-file",o)})),define("WoltLabSuite/Core/Component/Attachment/List",["require","exports","./Entry","../Ckeditor/Event","../File/woltlab-core-file"],(function(e,t,i,n){"use strict";function o(e,t,n){e.append((0,i.createAttachmentFromFile)(t,n))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){const t=document.getElementById(`attachments_${e}`);if(null===t)throw new Error(`The attachments container for '${e}' does not exist.`);const i=document.getElementById(e);if(null===i)throw new Error(`The editor element for '${e}' does not exist.`);const r=t.querySelector("woltlab-core-file-upload");if(null===r)throw new Error("Expected the container to contain an upload button",{cause:{container:t}});let a=t.querySelector(".fileList");null===a&&(a=document.createElement("ol"),a.classList.add("fileList"),r.insertAdjacentElement("afterend",a)),r.addEventListener("uploadStart",(e=>{o(a,e.detail,i)})),(0,n.listenToCkeditor)(i).uploadAttachment((e=>{const t=new CustomEvent("ckeditorDrop",{detail:e});r.dispatchEvent(t)}));const s=t.querySelector(".attachment__list__existingFiles");null!==s&&(s.querySelectorAll("woltlab-core-file").forEach((e=>{o(a,e,i)})),s.remove())}})),define("WoltLabSuite/Core/Component/Comment/Add",["require","exports","tslib","../../Ui/Scroll","../../Ui/Notification","../../Language","../../Event/Handler","../../Dom/Util","../Ckeditor","../Ckeditor/Event","WoltLabSuite/Core/Api/Comments/CreateComment","../GuestTokenDialog","WoltLabSuite/Core/User"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentAdd=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),s=i.__importDefault(s),p=i.__importDefault(p),t.CommentAdd=class{#Z;#c;#Ie;#Me;#Te;#De;#Ae;#Pe;#Y;constructor(e,t,i,n){this.#Z=e,this.#c=this.#Z.querySelector(".commentAdd__content"),this.#Ie=this.#Z.querySelector(".commentAdd__editor"),this.#Me=this.#Z.querySelector(".wysiwygTextarea"),this.#Te=t,this.#De=i,this.#Ae=this.#Z.querySelector(".commentAdd__placeholder"),this.#Pe=n,this.#je()}#je(){this.#Ae.addEventListener("click",(e=>{this.#c.classList.contains("commentAdd__content--collapsed")&&(e.preventDefault(),this.#c.classList.remove("commentAdd__content--collapsed"),this.#Z.classList.remove("commentAdd--collapsed"),this.#Ae.hidden=!0,this.#Ie.hidden=!1,this.#qe())})),this.#Z.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#Oe()})),(0,c.listenToCkeditor)(this.#Me).setupFeatures((({features:e})=>{e.heading=!1,e.spoiler=!1,e.table=!1}))}#qe(){window.setTimeout((()=>{n.element(this.#Z,(()=>{this.#Be().focus()}))}),0)}#Ne(){this.#Z.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#Be().getHtml();if(""===e)return this.#Fe(this.#Be().element,(0,r.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#Be(),message:e,valid:!0};return a.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#Oe(){if(!this.#Ne())return;this.#Re();let e="";if(!p.default.userId&&(e=await(0,u.getGuestToken)(),void 0===e))return void this.#Ue();const t=await(0,d.createComment)(this.#Te,this.#De,this.#Be().getHtml(),e);if(!t.ok){const e=t.error.getValidationError();if(void 0===e)throw t.error;return this.#Fe(this.#Be().element,e.code),void this.#Ue()}this.#Pe(t.value.commentID),o.show((0,r.getPhrase)("wcf.global.success.add")),this.#We(),this.#Ue()}#Be(){return void 0===this.#Y&&(this.#Y=(0,l.getCkeditor)(this.#Me)),this.#Y}#Re(){if(this.#c.classList.contains("commentAdd__content--loading"))return;const e=document.createElement("div");e.className="commentAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#c.classList.add("commentAdd__content--loading"),this.#c.appendChild(e)}#Fe(e,t){s.default.innerError(e,"empty"===t?(0,r.getPhrase)("wcf.global.form.error.empty"):t)}#We(){this.#Be().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#c.classList.add("commentAdd__content--collapsed"),this.#Z.classList.add("commentAdd--collapsed"),this.#Ie.hidden=!0,this.#Ae.hidden=!1}#Ue(){this.#c.classList.remove("commentAdd__content--loading");const e=this.#c.querySelector(".commentAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Api/Comments/Responses/CreateResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponse=void 0,t.createResponse=async function(e,t,o=""){const r=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses`),a={commentID:e,message:t,guestToken:o};let s;try{s=await(0,i.prepareRequest)(r).post(a).fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Component/Comment/Response/Add",["require","exports","tslib","../../../Dom/Util","../../../Language","../../../Event/Handler","../../../Ui/Scroll","../../../Ui/Notification","../../Ckeditor","../../Ckeditor/Event","WoltLabSuite/Core/User","../../GuestTokenDialog","WoltLabSuite/Core/Api/Comments/Responses/CreateResponse"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentResponseAdd=void 0,n=i.__importDefault(n),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),d=i.__importDefault(d),t.CommentResponseAdd=class{container;#c;#Me;#Pe;#He=new Map;#Y;#Ve;constructor(e,t){this.container=e,this.#c=this.container.querySelector(".commentResponseAdd__content"),this.#Me=this.container.querySelector(".wysiwygTextarea"),this.#Pe=t,this.#je()}#je(){this.container.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#Oe()})),(0,c.listenToCkeditor)(this.#Me).setupFeatures((({features:e})=>{e.heading=!1,e.spoiler=!1,e.table=!1}))}show(e){this.#Ve&&this.#He.set(this.#Ve,this.#$e()),this.#ze(this.#He.get(e)||""),this.#Ve=e,this.container.hidden=!1}#Ne(){this.container.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#Be().getHtml();if(""===e)return this.#Fe(this.#Be().element,(0,o.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#Be(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#Oe(){if(!this.#Ne())return;this.#Re();let e="";if(!d.default.userId&&(e=await(0,u.getGuestToken)(),void 0===e))return void this.#Ue();const t=await(0,p.createResponse)(this.#Ve,this.#Be().getHtml(),e);if(!t.ok){const e=t.error.getValidationError();if(void 0===e)throw t.error;return this.#Fe(this.#Be().element,e.code),void this.#Ue()}this.#Pe(this.#Ve,t.value.responseID),s.show((0,o.getPhrase)("wcf.global.success.add")),this.#We(),this.#Ue()}#We(){this.#Be().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#He.delete(this.#Ve),this.container.hidden=!0}#Fe(e,t){n.default.innerError(e,"empty"===t?(0,o.getPhrase)("wcf.global.form.error.empty"):t)}#Be(){return void 0===this.#Y&&(this.#Y=(0,l.getCkeditor)(this.#Me)),this.#Y}#$e(){return this.#Be().getHtml()}#ze(e){this.#Be().setHtml(e);const t=this.#Me.parentElement.querySelector(".innerError");null!==t&&t.remove(),this.#qe()}#qe(){window.setTimeout((()=>{a.element(this.container,(()=>{this.#Be().focus()}))}),0)}#Re(){if(this.#c.classList.contains("commentResponseAdd__content--loading"))return;const e=document.createElement("div");e.className="commentResponseAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#c.classList.add("commentResponseAdd__content--loading"),this.#c.appendChild(e)}#Ue(){this.#c.classList.remove("commentResponseAdd__content--loading");const e=this.#c.querySelector(".commentResponseAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Ui/Reaction/Handler",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../Alignment","../CloseOverlay","../Screen","focus-trap"],(function(e,t,i,n,o,r,a,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c);const u=Object.values(window.REACTION_TYPES);return class{activeButton=void 0;_cache=new Map;focusTrap=void 0;_containers=new Map;_options;_objects=new Map;_objectType;_popoverCurrentObjectId=0;_popover;_popoverContent;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._popover=null,this._popoverContent=null,this._options=o.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},t),this.initReactButtons(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/Handler-${e}`,(()=>this.initReactButtons())),l.default.add("WoltLabSuite/Core/Ui/Reaction/Handler",(()=>this._closePopover()))}initReactButtons(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=a.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,objectId:n,element:t};this._containers.set(i,o),this._initReactButton(t,o);const r=this._objects.get(n)||[];r.push(o),this._objects.set(n,r),e=!0})),e&&r.default.trigger()}_initReactButton(e,t){if(this._options.isSingleItem?t.reactButton=document.querySelector(this._options.buttonSelector):t.reactButton=e.querySelector(this._options.buttonSelector),null!==t.reactButton){if(1===u.length){const e=u[0];t.reactButton.title=e.title,t.reactButton.querySelector(".invisible").textContent=e.title}t.reactButton.setAttribute("role","button"),u.length>1&&(t.reactButton.setAttribute("aria-haspopup","true"),t.reactButton.setAttribute("aria-expanded","false")),t.reactButton.addEventListener("click",(e=>{this._toggleReactPopover(t.objectId,t.reactButton,e)})),t.reactButton.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleReactPopover(t.objectId,t.reactButton,null))}))}}_updateReactButton(e,t){this._objects.get(e).forEach((e=>{null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),e.reactButton.dataset.reactionTypeId=t.toString()):(e.reactButton.dataset.reactionTypeId="0",e.reactButton.classList.remove("active")))}))}_markReactionAsActive(){let e=null;for(const t of this._objects.get(this._popoverCurrentObjectId))null!==t.reactButton&&(e=~~t.reactButton.dataset.reactionTypeId);if(null===e)throw new Error("Unable to find react button for current popover.");const t=this._getPopover();t.querySelectorAll(".reactionTypeButton.active").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-selected")}));const i=t.querySelector(".reactionPopoverContent");if(e){const n=t.querySelector(`.reactionTypeButton[data-reaction-type-id="${e}"]`);n.classList.add("active"),n.setAttribute("aria-selected","true"),0==~~n.dataset.isAssignable&&a.default.show(n),this._scrollReactionIntoView(i,n)}else c.is("screen-xs")&&(t.classList.contains("inverseOrder")?i.scrollTop=0:i.scrollTop=i.scrollHeight-i.clientHeight)}_scrollReactionIntoView(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2}_toggleReactPopover(e,t,i){if(null!==i&&(i.preventDefault(),i.stopPropagation()),1===u.length){const t=u[0];this._popoverCurrentObjectId=e,this._react(t.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover()}_openReactPopover(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,s.set(this._getPopover(),t,{horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:c.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");const i=this._getPopover();"auto"===i.style.getPropertyValue("bottom")?i.classList.add("inverseOrder"):i.classList.remove("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),i.classList.remove("forceHide"),i.classList.add("active"),this.activeButton=t,u.length>1&&this.activeButton.setAttribute("aria-expanded","true"),this.getFocusTrap().activate()}_getPopover(){if(null==this._popover){this._popover=document.createElement("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=document.createElement("div"),this._popoverContent.className="reactionPopoverContent";const e=document.createElement("ul");e.className="reactionTypeButtonList",this._getSortedReactionTypes().forEach((t=>{const i=document.createElement("li");i.tabIndex=0,i.setAttribute("role","button"),i.className="reactionTypeButton jsTooltip",i.dataset.reactionTypeId=t.reactionTypeID.toString(),i.dataset.title=t.title,i.dataset.isAssignable=t.isAssignable.toString(),i.title=t.title;const n=document.createElement("span");n.className="reactionTypeButtonTitle",n.innerHTML=t.title,i.innerHTML=t.renderedIcon,i.appendChild(n),i.addEventListener("click",(()=>this._react(t.reactionTypeID))),i.addEventListener("keydown",(e=>this.keydown(e))),t.isAssignable||a.default.hide(i),e.appendChild(i)})),this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",(()=>this._rebuildOverflowIndicator()),{passive:!0}),this._popover.appendChild(this._popoverContent),document.body.appendChild(this._popover),r.default.trigger()}return this._popover}keydown(e){if("Enter"===e.key||" "===e.key){e.preventDefault();const t=this.activeButton,i=~~e.currentTarget.dataset.reactionTypeId;this._react(i),t.focus()}}_rebuildOverflowIndicator(){const e=this._popoverContent;e.scrollTop>0?e.classList.add("overflowTop"):e.classList.remove("overflowTop"),e.scrollTop+e.clientHeight<e.scrollHeight?e.classList.add("overflowBottom"):e.classList.remove("overflowBottom")}_getSortedReactionTypes(){return u.sort(((e,t)=>e.showOrder-t.showOrder))}_closePopover(){if(0!==this._popoverCurrentObjectId){const e=this._getPopover();e.classList.remove("active"),e.querySelectorAll('.reactionTypeButton[data-is-assignable="0"]').forEach((e=>a.default.hide(e))),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach((e=>{e.reactButton.closest("nav").style.cssText=""})),u.length>1&&this.activeButton.setAttribute("aria-expanded","false"),this.activeButton=void 0,this._popoverCurrentObjectId=0,this.getFocusTrap().deactivate()}}_react(e){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=e,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters}),this._closePopover())}_ajaxSuccess(e){const t=~~e.returnValues.objectID,i=new Map;Object.entries(e.returnValues.reactions).forEach((([e,t])=>{i.set(parseInt(e),t)}));const n=document.querySelector(`woltlab-core-reaction-summary[object-type="${this._objectType}"][object-id="${t}"]`);n?.setData(i,e.returnValues.reactionTypeID),this._updateReactButton(t,e.returnValues.reactionTypeID)}_ajaxSetup(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,d.createFocusTrap)(this._popover,{allowOutsideClick:!0,escapeDeactivates:()=>(this._closePopover(),!1),preventScroll:!0})),this.focusTrap}}})),define("WoltLabSuite/Core/Api/Comments/Responses/RenderResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderResponse=void 0,t.renderResponse=async function(e,t=!1,o=undefined){const r=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}/render`);let a;r.searchParams.set("messageOnly",t.toString()),void 0!==o&&r.searchParams.set("objectTypeID",o.toString());try{a=await(0,i.prepareRequest)(r).get().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(a)}})),define("WoltLabSuite/Core/Api/Comments/Responses/RenderResponses",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderResponses=void 0,t.renderResponses=async function(e,t,o,r){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/render`);let s;a.searchParams.set("commentID",e.toString()),a.searchParams.set("lastResponseTime",t.toString()),a.searchParams.set("lastResponseID",o.toString()),a.searchParams.set("loadAllResponses",r.toString());try{s=await(0,i.prepareRequest)(a).get().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Component/Comment/List",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../Helper/Selector","../../Language","./Add","./Response/Add","../../Ui/Scroll","../../Ui/Reaction/Handler","WoltLabSuite/Core/Api/Comments/RenderComment","WoltLabSuite/Core/Api/Comments/RenderComments","WoltLabSuite/Core/Api/Comments/Responses/RenderResponse","WoltLabSuite/Core/Api/Comments/Responses/RenderResponses"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importDefault(o),c=i.__importStar(c),d=i.__importDefault(d);class f{#Z;#Ge;constructor(e){this.#Z=e,this.#Ye(),this.#Xe(),this.#Qe(),this.#Je(),this.#Ke(),this.#Ze()}#Ze(){"true"===this.#Z.dataset.enableReactions&&(new d.default("com.woltlab.wcf.comment",{containerSelector:`#${this.#Z.id} .commentList__item`,buttonSelector:".comment__button--react"}),new d.default("com.woltlab.wcf.comment.response",{containerSelector:`#${this.#Z.id} .commentResponseList__item`,buttonSelector:".commentResponse__button--react"}))}#Ke(){window.addEventListener("hashchange",(()=>{this.#et()})),this.#et()}#et(){const e=window.location.hash.match(/^#(?:[^/]+\/)?comment(\d+)(?:\/response(\d+))?/);if(e){const t=this.#Z.querySelector(`.commentList__item[data-comment-id="${e[1]}"]`);if(t)if(e[2]){const i=this.#Z.querySelector(`.commentResponseList__item[data-response-id="${e[2]}"]`);i?this.#tt(i,!0):this.#it(t,parseInt(e[2]))}else this.#tt(t,!0);else this.#nt(parseInt(e[1]),e[2]?parseInt(e[2]):0)}}async#nt(e,t){let i=this.#Z.querySelector(".commentPermalink");i&&i.remove(),i=document.createElement("div"),i.classList.add("commentList__item","commentPermalink","commentPermalink--loading"),i.innerHTML='<woltlab-core-loading-indicator size="48" hide-text></woltlab-core-loading-indicator>',this.#Z.querySelector(".commentList")?.prepend(i);const n=await(0,u.renderComment)(e,t||void 0,!1,parseInt(this.#Z.dataset.objectTypeId));if(!n.ok)return void i.remove();const{template:r,response:a}=n.unwrap();o.default.insertHtml(r,i,"before"),i.remove();const s=this.#Z.querySelector(`.commentList__item[data-comment-id="${e}"]`);if(s.classList.add("commentPermalink"),a){const e=document.createElement("div");e.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),e.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',s.querySelector(".commentResponseList").prepend(e),this.#ot(a)}else this.#tt(s,!0)}#ot(e){const t=this.#Z.querySelector(".commentResponsePermalink");o.default.insertHtml(e,t,"before");const i=t.previousElementSibling;t.classList.add("commentResponsePermalink"),t.remove(),this.#tt(i,!0)}async#it(e,t){let i=e.querySelector(".commentResponsePermalink");i&&i.remove(),i=document.createElement("div"),i.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),i.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',e.querySelector(".commentResponseList").prepend(i);const n=await(0,m.renderResponse)(t,!1,parseInt(this.#Z.dataset.objectTypeId));n.ok?this.#ot(n.value.template):i.remove()}#tt(e,t=!1){c.element(e,(()=>{t&&(e.classList.contains("comment__highlight__target")&&e.classList.remove("comment__highlight__target"),e.classList.add("comment__highlight__target"))}))}#Je(){"true"===this.#Z.dataset.canAdd&&(new s.CommentAdd(this.#Z.querySelector(".commentAdd"),parseInt(this.#Z.dataset.objectTypeId),parseInt(this.#Z.dataset.objectId),(e=>{this.#rt(e)})),this.#Ge=new l.CommentResponseAdd(this.#Z.querySelector(".commentResponseAdd"),((e,t)=>{this.#at(e,t)})))}#Ye(){(0,r.wheneverFirstSeen)("woltlab-core-comment",(e=>{this.#Z.contains(e)&&(e.addEventListener("reply",(()=>{this.#st(e,e.commentId)})),e.addEventListener("delete",(()=>{e.parentElement?.remove()})),this.#lt(e.parentElement))}))}#Xe(){(0,r.wheneverFirstSeen)("woltlab-core-comment-response",(e=>{this.#Z.contains(e)&&e.addEventListener("delete",(()=>{e.parentElement?.remove()}))}))}#lt(e){const t=e.querySelectorAll(".commentResponse").length,i=parseInt(e.dataset.responses);if(t<i){const n=(0,a.getPhrase)("wcf.comment.response.more",{count:i-t});if(e.querySelector(".commentLoadNextResponses"))e.querySelector(".commentLoadNextResponses__button").textContent=n;else{const t=document.createElement("div");t.classList.add("commentResponseList__item","commentLoadNextResponses"),e.querySelector(".commentResponseList").append(t);const i=document.createElement("button");i.type="button",i.classList.add("button","small","commentLoadNextResponses__button"),i.textContent=n,t.append(i),i.addEventListener("click",(()=>{this.#ct(e)}))}}else e.querySelector(".commentLoadNextResponses")?.remove()}async#ct(e,t=!1){e.querySelector(".commentLoadNextResponses__button").disabled=!0;const i=(await(0,h.renderResponses)(parseInt(e.dataset.commentId),parseInt(e.dataset.lastResponseTime),parseInt(e.dataset.lastResponseId),t)).unwrap(),r=o.default.createFragmentFromHtml(i.template);r.querySelectorAll(".commentResponseList__item").forEach((t=>{e.querySelector(`.commentResponseList__item[data-response-id="${t.dataset.responseId}"]`)?.remove()})),e.querySelector(".commentResponseList").insertBefore(r,e.querySelector(".commentLoadNextResponses")),n.default.trigger(),e.dataset.lastResponseTime=i.lastResponseTime.toString(),e.dataset.lastResponseId=i.lastResponseID.toString(),this.#lt(e)}#Qe(){if(this.#dt<this.#ut&&!this.#Z.querySelector(".commentLoadNext")){const e=document.createElement("div");e.classList.add("commentList__item","commentLoadNext"),this.#Z.querySelector(".commentList").append(e);const t=document.createElement("button");t.type="button",t.classList.add("button","small","commentLoadNext__button"),t.textContent=(0,a.getPhrase)("wcf.comment.more"),e.append(t),t.addEventListener("click",(()=>{this.#pt()}))}}async#pt(){const e=this.#Z.querySelector(".commentLoadNext__button");e.disabled=!0;const t=(await(0,p.renderComments)(parseInt(this.#Z.dataset.objectTypeId),parseInt(this.#Z.dataset.objectId),parseInt(this.#Z.dataset.lastCommentTime))).unwrap(),i=o.default.createFragmentFromHtml(t.template);i.querySelectorAll(".commentList__item").forEach((e=>{this.#Z.querySelector(`.commentList__item[data-comment-id="${e.dataset.commentId}"]`)?.remove()})),this.#Z.querySelector(".commentList").insertBefore(i,this.#Z.querySelector(".commentLoadNext")),n.default.trigger(),this.#Z.dataset.lastCommentTime=t.lastCommentTime.toString(),this.#dt<this.#ut?e.disabled=!1:this.#Z.querySelector(".commentLoadNext").hidden=!0}#st(e,t){e.parentElement.append(this.#Ge.container),this.#Ge.show(t)}async#rt(e){const t=await(0,u.renderComment)(e);if(!t.ok){if(void 0===t.error.getValidationError())throw t.error;return}const i=this.#Z.querySelector(".commentAdd").parentElement;o.default.insertHtml(t.value.template,i,"after"),n.default.trigger();const r=i.nextElementSibling;window.setTimeout((()=>{c.element(r)}),100)}async#at(e,t){const i=await(0,m.renderResponse)(t);if(!i.ok){if(void 0===i.error.getValidationError())throw i.error;return}const r=this.#Z.querySelector(`.commentList__item[data-comment-id="${e}"]`);let a=r.querySelector(".commentResponseList");if(!a){const e=document.createElement("div");e.classList.add("comment__responses"),r.append(e),a=document.createElement("div"),a.classList.add("commentResponseList"),a.dataset.responses="1",e.append(a)}o.default.insertHtml(i.value.template,a,"append"),n.default.trigger();const s=a.firstElementChild;window.setTimeout((()=>{c.element(s)}),100)}get#dt(){return this.#Z.querySelectorAll(".comment").length}get#ut(){return parseInt(this.#Z.dataset.comments)}}t.setup=function(e){const t=document.getElementById(e);t?new f(t):console.debug(`Unable to find the container identified by '${e}'`)}})),define("WoltLabSuite/Core/Component/Comment/woltlab-core-comment",["require","exports","tslib","../../Dom/Util","../../Ui/Dropdown/Simple","../../Ui/Notification","../Confirmation","../../Ui/Scroll","../../Event/Handler","../../Language","../Ckeditor","WoltLabSuite/Core/Api/Comments/DeleteComment","WoltLabSuite/Core/Api/Comments/EnableComment","WoltLabSuite/Core/Api/Comments/EditComment","WoltLabSuite/Core/Api/Comments/UpdateComment","WoltLabSuite/Core/Api/Comments/RenderComment"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentElement=void 0,n=i.__importDefault(n),o=i.__importDefault(o),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);class g extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".comment__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#mt()}));const t=this.menu.querySelector(".comment__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#ht()}));const i=this.menu.querySelector(".comment__option--edit");i?.addEventListener("click",(e=>{e.preventDefault(),this.#ft()}))}const e=this.querySelector(".comment__button--reply");e?.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("reply"))}))}async#mt(){(await(0,p.enableComment)(this.commentId)).unwrap(),this.querySelector(".comment__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".comment__option--enable").hidden=!0)}async#ht(){await(0,a.confirmationFactory)().delete()&&((await(0,u.deleteComment)(this.commentId)).unwrap(),r.show(),this.dispatchEvent(new CustomEvent("delete")))}async#ft(){this.menu.querySelector(".comment__option--edit").hidden=!0;const{template:e}=(await(0,m.editComment)(this.commentId)).unwrap();this.#gt(e)}#gt(e){this.querySelector(".htmlContent").hidden=!0,n.default.insertHtml(e,this.#Ie,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#bt()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#vt()})),l.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#_t}`,(e=>{e.cancel=!0,this.#bt()})),window.setTimeout((()=>{s.element(this)}),250)}async#bt(){const e=(0,d.getCkeditorById)(this.#_t),t={data:{message:e.getHtml()}};if(!this.#wt(t))return;l.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#_t}`,t),this.#a();const i=await(0,h.updateComment)(this.commentId,e.getHtml());if(!i.ok){const e=i.error.getValidationError();if(void 0===e)throw i.error;return n.default.innerError(document.getElementById(this.#_t),e.code),void this.#yt()}const{template:o}=(await(0,f.renderComment)(this.commentId,void 0,!0)).unwrap();n.default.setInnerHtml(this.querySelector(".htmlContent"),o),this.#yt(),this.#vt(),r.show()}#a(){let e=this.querySelector(".comment__loading");e||(e=document.createElement("div"),e.classList.add("comment__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".comment__message").append(e)),this.#Ie.hidden=!0,e.hidden=!1}#yt(){this.#Ie.hidden=!1;const e=this.querySelector(".comment__loading");e&&(e.hidden=!0)}#wt(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,d.getCkeditorById)(this.#_t);if(""===t.getHtml())return n.default.innerError(t.element,(0,c.getPhrase)("wcf.global.form.error.empty")),!1;const i={api:this,parameters:e,valid:!0};return l.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#_t}`,i),i.valid}#vt(){(0,d.getCkeditorById)(this.#_t).destroy(),this.#Ie.remove(),this.menu.querySelector(".comment__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#Ie(){let e=this.querySelector(".comment__editor");return e||(e=document.createElement("div"),e.classList.add("comment__editor"),this.querySelector(".comment__message").append(e)),e}get commentId(){return parseInt(this.getAttribute("comment-id"))}get menu(){let e=o.default.getDropdownMenu(`commentOptions${this.commentId}`);return void 0===e&&(e=this.querySelector(".comment__menu .dropdownMenu")||void 0),e}get#_t(){return`commentEditor${this.commentId}`}}t.WoltlabCoreCommentElement=g,window.customElements.define("woltlab-core-comment",g),t.default=g})),define("WoltLabSuite/Core/Api/Files/Chunk/Chunk",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadChunk=void 0,t.uploadChunk=async function(e,t,o,r){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/files/upload/${e}/chunk/${t}`);let s;try{s=await(0,i.prepareRequest)(a).post(r).withHeader("chunk-checksum-sha256",o).fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Component/File/Upload",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Api/Files/Upload","WoltLabSuite/Core/Api/Files/Chunk/Chunk","WoltLabSuite/Core/Api/Files/GenerateThumbnails","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Language"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";async function d(e,t){const i=e.dataset.objectType,n=await m(await t.arrayBuffer()),a=document.createElement("woltlab-core-file");a.dataset.filename=t.name,a.dataset.fileSize=t.size.toString();const s=new CustomEvent("uploadStart",{detail:a});e.dispatchEvent(s);const l=await(0,o.upload)(t.name,t.size,n,i,e.dataset.context||"");if(!l.ok){if(void 0===l.error.getValidationError())throw a.uploadFailed(l.error),l.error;return void a.uploadFailed(l.error)}const{identifier:c,numberOfChunks:d}=l.value,h=Math.ceil(t.size/d);u(a,0,d);for(let e=0;e<d;e++){const i=e*h,n=i+h,o=t.slice(i,n),s=await m(await o.arrayBuffer()),l=await(0,r.uploadChunk)(c,e,s,o);if(!l.ok)throw a.uploadFailed(l.error),l.error;if(u(a,e+1,d),await p(a,l.value),l.value.completed)return l.value}}function u(e,t,i){if(1===i)return;const n=new CustomEvent("uploadProgress",{detail:Math.floor(t/i*100)});e.dispatchEvent(n)}async function p(e,t){if(t.completed&&(e.uploadCompleted(t.fileID,t.mimeType,t.link,t.data,t.generateThumbnails),t.generateThumbnails)){const i=await(0,a.generateThumbnails)(t.fileID);e.setThumbnails(i.unwrap())}}async function m(e){const t=await window.crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}function h(e){e.parentElement?.querySelectorAll(".innerError").forEach((e=>e.remove()))}async function f(e,t){switch(t.type){case"image/jpeg":case"image/png":case"image/webp":break;default:return t}const i=new Promise((e=>{window.setTimeout((()=>e(t)),1e4)})),n=JSON.parse(e.dataset.resizeConfiguration),o=new s.default,{image:r,exif:a}=await o.loadFile(t),l=-1===n.maxHeight?r.height:n.maxHeight;let c=-1===n.maxWidth?r.width:n.maxWidth;if(window.devicePixelRatio>=2){const e=window.screen.width*window.devicePixelRatio,t=window.screen.height*window.devicePixelRatio;e===r.width&&t===r.height&&(c=Math.min(c,window.screen.width))}const d=await o.resize(r,c,l,n.quality,!0,i);if(void 0===d)return t;let u=n.fileType;return u="image/jpeg"===u||"image/webp"===u?"image/webp":t.type,await o.saveFile({exif:a,image:d},t.name,u,n.quality)}function g(e,t){const i=(e.dataset.fileExtensions||"*").split(",");for(const e of i){if("*"===e)return!0;if(t.name.endsWith(e))return!0}return(0,l.innerError)(e,(0,c.getPhrase)("wcf.upload.error.fileExtensionNotPermitted",{filename:t.name})),!1}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.clearPreviousErrors=void 0,s=i.__importDefault(s),t.clearPreviousErrors=h,t.setup=function(){(0,n.wheneverFirstSeen)("woltlab-core-file-upload",(e=>{e.addEventListener("upload",(t=>{const i=t.detail;h(e),function(e){const t=e.maximumCount;return-1===t||Array.from(e.parentElement.querySelectorAll("woltlab-core-file")).filter((e=>!e.isFailedUpload())).length+1<=t||((0,l.innerError)(e,(0,c.getPhrase)("wcf.upload.error.maximumCountReached",{maximumCount:t})),!1)}(e)&&g(e,i)&&function(e,t){let i=!1;switch(t.type){case"image/gif":case"image/jpeg":case"image/png":case"image/webp":i=!0}if(i)return!0;const n=e.maximumSize;return-1===n||t.size<=n||((0,l.innerError)(e,(0,c.getPhrase)("wcf.upload.error.fileSizeTooLarge",{filename:t.name})),!1)}(e,i)&&f(e,i).then((t=>{d(e,t)}))})),e.addEventListener("ckeditorDrop",(t=>{const{file:i}=t.detail;let n,o;t.detail.promise=new Promise(((e,t)=>{n=e,o=t})),h(e),g(e,i)?f(e,i).then((async t=>{try{const i=await d(e,t);if(void 0===i||"number"!=typeof i.data.attachmentID)o();else{const e={attachmentId:i.data.attachmentID,url:i.link};n(e)}}catch(e){throw o(),e}})):o()}))}))}})),define("WoltLabSuite/Core/Ui/Search/Input",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),class{activeItem=void 0;ajaxPayload;autoFocus;callbackDropdownInit=void 0;callbackSelect=void 0;delay;dropdownContainerId="";element;excludedSearchValues=new Set;list=void 0;lastValue="";minLength;noResultPlaceholder;preventSubmit;request=void 0;suppressErrors;timerDelay=void 0;constructor(e,t){if(this.element=e,!(this.element instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this.element.nodeName||"search"!==this.element.type&&"text"!==this.element.type)throw new Error('Expected an input[type="text"].');t=o.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:void 0,callbackSelect:void 0,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1,suppressErrors:!1},t),this.ajaxPayload=t.ajax,this.autoFocus=t.autoFocus,this.callbackDropdownInit=t.callbackDropdownInit,this.callbackSelect=t.callbackSelect,this.delay=t.delay,t.excludedSearchValues.forEach((e=>{this.addExcludedSearchValues(e)})),this.minLength=t.minLength,this.noResultPlaceholder=t.noResultPlaceholder,this.preventSubmit=t.preventSubmit,this.suppressErrors=t.suppressErrors||!1,this.element.autocomplete="off",this.element.addEventListener("keydown",(e=>this.keydown(e))),this.element.addEventListener("keyup",(e=>this.keyup(e)))}addExcludedSearchValues(e){this.excludedSearchValues.add(e)}removeExcludedSearchValues(e){this.excludedSearchValues.delete(e)}keydown(e){(this.activeItem&&a.default.isOpen(this.dropdownContainerId)||this.preventSubmit)&&"Enter"===e.key&&e.preventDefault(),["ArrowUp","ArrowDown","Escape"].includes(e.key)&&e.preventDefault()}keyup(e){if(this.activeItem||!this.autoFocus)if(a.default.isOpen(this.dropdownContainerId)){if("ArrowUp"===e.key)return e.preventDefault(),this.keyboardPreviousItem();if("ArrowDown"===e.key)return e.preventDefault(),this.keyboardNextItem();if("Enter"===e.key)return e.preventDefault(),this.keyboardSelectItem()}else this.activeItem=void 0;if("Escape"===e.key)return void a.default.close(this.dropdownContainerId);const t=this.element.value.trim();this.lastValue!==t&&(this.lastValue=t,t.length<this.minLength?this.dropdownContainerId&&(a.default.close(this.dropdownContainerId),this.activeItem=void 0):this.delay?(this.timerDelay&&window.clearTimeout(this.timerDelay),this.timerDelay=window.setTimeout((()=>{this.search(t)}),this.delay)):this.search(t))}search(e){this.request&&this.request.abortPrevious(),this.request=n.api(this,this.getParameters(e))}getParameters(e){return{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:e}}}}keyboardNextItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.nextElementSibling&&(e=this.activeItem.nextElementSibling)),this.activeItem=e||this.list.children[0],this.activeItem.classList.add("active")}keyboardPreviousItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.previousElementSibling&&(e=this.activeItem.previousElementSibling)),this.activeItem=e||this.list.children[this.list.childElementCount-1],this.activeItem.classList.add("active")}keyboardSelectItem(){this.selectItem(this.activeItem)}clickSelectItem(e){this.selectItem(e.currentTarget)}selectItem(e){this.callbackSelect&&!this.callbackSelect(e)?this.element.value="":this.element.value=e.dataset.label||"",this.activeItem=void 0,a.default.close(this.dropdownContainerId)}_ajaxSuccess(e){let t=!1;if(this.list?this.list.innerHTML="":(this.list=document.createElement("ul"),this.list.className="dropdownMenu",t=!0,"function"==typeof this.callbackDropdownInit&&this.callbackDropdownInit(this.list)),"object"==typeof e.returnValues){const t=this.clickSelectItem.bind(this);Object.keys(e.returnValues).forEach((i=>{const n=this.createListItem(e.returnValues[i]);n.addEventListener("click",t),this.list.appendChild(n)}))}if(t){this.element.insertAdjacentElement("afterend",this.list);const e=this.element.parentElement;a.default.initFragment(e,this.list),this.dropdownContainerId=r.default.identify(e)}if(this.dropdownContainerId)if(this.activeItem=void 0,this.list.childElementCount||this.handleEmptyResult()){a.default.open(this.dropdownContainerId,!0,this.element);const e=this.list.childElementCount?this.list.children[0]:void 0;this.autoFocus&&e&&~~(e.dataset.objectId||"")&&(this.activeItem=e,this.activeItem.classList.add("active"))}else a.default.close(this.dropdownContainerId)}handleEmptyResult(){if(!this.noResultPlaceholder)return!1;const e=document.createElement("li");e.className="dropdownText";const t=document.createElement("span");return t.textContent=this.noResultPlaceholder,e.appendChild(t),this.list.appendChild(e),!0}createListItem(e){const t=document.createElement("li");t.dataset.objectId=e.objectID.toString(),t.dataset.label=e.label;const i=document.createElement("span");return i.textContent=e.label,t.appendChild(i),t}_ajaxSetup(){return{data:this.ajaxPayload,silent:this.suppressErrors,ignoreError:this.suppressErrors}}}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding/Suggestion",["require","exports","tslib","../../../Ui/Search/Input"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n);class o extends n.default{#Et;constructor(e,t,i){super(e,t),this.#Et=i}search(e){this.#Et.geocode({address:e},((e,t)=>{if(t===google.maps.GeocoderStatus.OK){const t={actionName:"",objectIDs:[],returnValues:{}};e.forEach((e=>{t.returnValues[e.formatted_address]={label:e.formatted_address,objectID:e.formatted_address}})),this._ajaxSuccess(t)}}))}}t.setup=function(e,t,i){new o(e,{callbackSelect:i},t)}})),define("WoltLabSuite/Core/Component/GoogleMaps/woltlab-core-google-maps",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreGoogleMapsElement=void 0;let i=!1;const n=new Promise((e=>{window.woltlab_core_google_maps_callback=e}));class o extends HTMLElement{#St;#Ct;#Lt;#kt=!1;#Et;constructor(){super(),this.#Ct=new Promise((e=>{this.#Lt=e}))}connectedCallback(){this.hidden||this.#xt()}attributeChangedCallback(e,t,i){"hidden"===e&&null===i&&this.#xt()}static get observedAttributes(){return["hidden"]}#xt(){this.#kt||(this.#Ne(),this.#kt=!0,(e=>{if(!i){const t=document.createElement("script");t.src="https://maps.googleapis.com/maps/api/js?"+(e?`key=${e}&`:"")+"callback=woltlab_core_google_maps_callback",document.head.appendChild(t),i=!0}return n})(this.apiKey).then((()=>{this.hasAttribute("access-user-location")?navigator.geolocation.getCurrentPosition((e=>{this.setAttribute("lat",e.coords.latitude.toString()),this.setAttribute("lng",e.coords.longitude.toString()),this.#It()}),(()=>{this.#It()})):this.#It()})))}#It(){this.#St=new google.maps.Map(this,{zoom:this.zoom,center:{lat:this.lat,lng:this.lng}}),this.#Mt(),this.#Lt&&(this.#Lt(),this.#Lt=void 0)}async#Mt(){await this.#Ct;const e=this.bounds;e&&this.#St.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.southWest.latitude,e.southWest.longitude),new google.maps.LatLng(e.northEast.latitude,e.northEast.longitude)))}#Ne(){if(!this.apiKey)throw new TypeError("Must provide an api key.")}get apiKey(){return this.getAttribute("api-key")||""}async getMap(){return await this.#Ct,this.#St}get lat(){return this.getAttribute("lat")?parseFloat(this.getAttribute("lat")):0}get lng(){return this.getAttribute("lng")?parseFloat(this.getAttribute("lng")):0}get zoom(){return this.getAttribute("zoom")?parseInt(this.getAttribute("zoom")):13}get bounds(){return this.getAttribute("bounds")?JSON.parse(this.getAttribute("bounds")):null}async getGeocoder(){return await this.#Ct,void 0===this.#Et&&(this.#Et=new google.maps.Geocoder),this.#Et}}t.WoltlabCoreGoogleMapsElement=o,window.customElements.define("woltlab-core-google-maps",o),t.default=o})),define("WoltLabSuite/Core/Component/GoogleMaps/Marker",["require","exports","./woltlab-core-google-maps"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDraggableMarker=t.addMarker=void 0,t.addMarker=async function(e,t,i,n,o){const r=await e.getMap(),a=new google.maps.Marker({map:r,position:new google.maps.LatLng(t,i),title:n});o&&r.setCenter(a.getPosition())},t.addDraggableMarker=async function(e,t,i){const n=await e.getMap();void 0===t&&(t=e.lat),void 0===i&&(i=e.lng);const o=new google.maps.Marker({map:n,position:new google.maps.LatLng(t,i),draggable:!0,clickable:!1});return n.setCenter(o.getPosition()),o}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding",["require","exports","../../Helper/Selector","./Geocoding/Suggestion","./Marker","./woltlab-core-google-maps"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;class r{#M;#St;#Tt;#Dt;constructor(e,t){this.#M=e,this.#St=t,this.#je(),this.#St.getGeocoder().then((t=>{this.#M.hasAttribute("data-google-maps-marker")&&this.#At(),e.value&&this.#Pt(e.value),(0,n.setup)(this.#M,t,(e=>(this.#Pt(e.dataset.label),!0)))}))}#je(){this.#M.addEventListener("geocoding:move-marker",(e=>{this.#jt(e.detail.latitude,e.detail.longitude)})),this.#M.addEventListener("geocoding:resolve",(e=>{this.#St.getGeocoder().then((t=>{const i=new google.maps.LatLng(e.detail.latitude,e.detail.longitude);t.geocode({location:i},((t,i)=>{i===google.maps.GeocoderStatus.OK&&e.detail.callback(t[0].formatted_address)}))}))})),this.#M.addEventListener("geocoding:reset-marker",(()=>{this.#Dt&&this.#jt(this.#Dt.lat(),this.#Dt.lng())}))}async#At(){this.#Tt=await(0,o.addDraggableMarker)(this.#St),this.#Dt=this.#Tt.getPosition(),this.#Tt.addListener("dragend",(()=>{this.#St.getGeocoder().then((e=>{e.geocode({location:this.#Tt.getPosition()},((e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#M.value=e[0].formatted_address,this.#qt(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}))}))}async#jt(e,t){const i=new google.maps.LatLng(e,t);this.#Tt?.setPosition(i),(await this.#St.getMap()).setCenter(i),this.#qt(e,t)}async#Pt(e){(await this.#St.getGeocoder()).geocode({address:e},(async(e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#Tt?.setPosition(e[0].geometry.location),(await this.#St.getMap()).setCenter(e[0].geometry.location),this.#qt(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}#qt(e,t){this.#M.dataset.googleMapsLat=e.toString(),this.#M.dataset.googleMapsLng=t.toString();const i=this.#M.dataset.googleMapsGeocodingStore;null!=i&&this.#M.form&&this.#Ot(i,e,t)}#Ot(e,t,i){const n=e+"coordinates";let o=this.#M.form.querySelector(`input[name="${n}"]`);o||(o=document.createElement("input"),o.type="hidden",o.name=n,this.#M.form.append(o)),o.value=`${t},${i}`}}t.setup=function(){(0,i.wheneverFirstSeen)("[data-google-maps-geocoding]",(e=>{const t=document.getElementById(e.dataset.googleMapsGeocoding);new r(e,t)}))}})),define("WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader",["require","exports","tslib","../../Ajax","../Dialog","../../Dom/Util","@googlemaps/markerclusterer","./woltlab-core-google-maps"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=i.__importDefault(r);class s{#St;#Bt;#Nt;#Ft;#Rt;#Ut;#w=[];constructor(e,t,i){this.#St=e,this.#Bt=t,this.#Nt=i,this.#Ft=new a.MarkerClusterer({map:e}),this.#Wt()}async#Wt(){this.#St.getBounds()&&await this.#Ht(),this.#St.addListener("idle",(()=>{this.#Ht()}))}async#Ht(){const e=this.#St.getBounds().getNorthEast(),t=this.#St.getBounds().getSouthWest();this.#Vt(e,t)&&(await(0,n.dboAction)("getMapMarkers",this.#Bt).payload({...this.#Nt,excludedObjectIDs:JSON.stringify(this.#w),eastLongitude:e.lng(),northLatitude:e.lat(),southLatitude:t.lat(),westLongitude:t.lng()}).dispatch()).markers.forEach((e=>{this.#$t(e)}))}#$t(e){const t=new google.maps.Marker({map:this.#St,position:new google.maps.LatLng(e.latitude,e.longitude),title:e.title});if(this.#Ft.addMarker(t),e.infoWindow){const i=document.createElement("div");r.default.setInnerHtml(i,e.infoWindow);const n=new google.maps.InfoWindow({content:i});if(t.addListener("click",(()=>{n.open(this.#St,t)})),e.dialog){let t;n.addListener("domready",(()=>{const n=i.querySelector(".jsButtonShowDialog");n?.addEventListener("click",(()=>{t||(t=(0,o.dialogFactory)().fromHtml(e.dialog).withoutControls()),t.show(n.dataset.title||n.textContent)}))}))}}e.objectID&&this.#w.push(e.objectID),e.objectIDs&&this.#w.push(...e.objectIDs)}#Vt(e,t){return!(this.#Rt&&this.#Rt.lat()>=e.lat()&&this.#Rt.lng()>=e.lng()&&this.#Ut.lat()<=t.lat()&&this.#Ut.lng()<=t.lng()||(this.#Rt=e,this.#Ut=t,0))}}t.setup=async function(e,t,i){const n=await e.getMap();new s(n,t,i)}})),define("WoltLabSuite/Core/Component/User/Follow",["require","exports","tslib","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification"],(function(e,t,i,n,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,s=i.__importStar(s),t.setup=function(){(0,r.wheneverFirstSeen)("[data-follow-user]",(e=>{e.addEventListener("click",(0,o.promiseMutex)((()=>async function(e){"1"!==e.dataset.following?(await(0,n.prepareRequest)(e.dataset.followUser).post({action:"follow"}).fetchAsResponse(),e.dataset.following="1",e.dataset.tooltip=(0,a.getPhrase)("wcf.user.button.unfollow"),e.querySelector("fa-icon")?.setIcon("circle-minus")):(await(0,n.prepareRequest)(e.dataset.followUser).post({action:"unfollow"}).fetchAsResponse(),e.dataset.following="0",e.dataset.tooltip=(0,a.getPhrase)("wcf.user.button.follow"),e.querySelector("fa-icon")?.setIcon("circle-plus")),s.show()}(e))))}))}})),define("WoltLabSuite/Core/Component/User/Ignore",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Component/Dialog"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,n.wheneverFirstSeen)("[data-ignore-user]",(e=>{e.addEventListener("click",(0,i.promiseMutex)((()=>async function(e){const{ok:t,result:i}=await(0,a.dialogFactory)().usingFormBuilder().fromEndpoint(e.dataset.ignoreUser);t&&(i.type?(e.dataset.ignored="1",e.dataset.tooltip=(0,o.getPhrase)("wcf.user.button.unignore"),e.querySelector("fa-icon")?.setIcon("eye",!0)):(e.dataset.ignored="0",e.dataset.tooltip=(0,o.getPhrase)("wcf.user.button.ignore"),e.querySelector("fa-icon")?.setIcon("eye-slash",!0)),(0,r.show)())}(e))))}))}})),define("WoltLabSuite/Core/Component/User/List",["require","exports","tslib","../../Ajax","../../Ui/Pagination","../Dialog","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserList=void 0,o=i.__importDefault(o),a=i.__importDefault(a),t.UserList=class{#zt;#Gt;#Yt=1;#Xt=0;#e;constructor(e,t){this.#zt=e,this.#Gt=t}open(){this.#Yt=1,this.#Qt(this.#Yt)}#Jt(e,t){e&&(this.#Yt=e);const i=this.#Kt();if(a.default.setInnerHtml(i.content,t),i.show(this.#Gt),this.#Xt>1){const e=i.content.querySelector(".jsPagination");null!==e&&new o.default(e,{activePage:this.#Yt,maxPage:this.#Xt,callbackSwitch:e=>{this.#Qt(e)}})}}async#Qt(e){if(0!==this.#Xt&&(e<1||e>this.#Xt))throw new RangeError(`pageNo must be between 1 and ${this.#Xt} (${e} given).`);this.#zt.parameters.pageNo=e;const t=await(0,n.dboAction)("getGroupedUserList",this.#zt.className).payload(this.#zt.parameters).dispatch();t.pageCount&&(this.#Xt=t.pageCount),this.#Jt(e,t.template)}#Kt(){return void 0===this.#e&&(this.#e=(0,r.dialogFactory)().withoutContent().withoutControls()),this.#e}}})),define("WoltLabSuite/Core/Controller/Moderation/AssignUser",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","../../Component/Dialog","../../Language","../../Ui/Notification"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){e.addEventListener("click",(0,i.promiseMutex)((()=>async function(e){const{ok:t,result:i}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(e);var a;t&&(function(e){const t=document.getElementById("moderationAssignedUser");if(null===e)t.textContent=(0,o.getPhrase)("wcf.moderation.assignedUser.nobody");else{const i=document.createElement("a");i.href=e.link,i.dataset.objectId=e.userID.toString(),i.classList.add("userLink"),i.innerHTML=e.username,t.innerHTML="",t.append(i)}}(i.assignee),a=i.status,document.getElementById("moderationQueueStatus").textContent=a,(0,r.show)())}(e.dataset.url))))}})),define("WoltLabSuite/Core/Controller/Notice/Dismiss",["require","exports","tslib","../../Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),t.setup=function(){document.querySelectorAll(".jsDismissNoticeButton").forEach((e=>{e.addEventListener("click",(e=>function(e){const t=e.currentTarget;n.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[t.dataset.objectId]},success:()=>{t.parentElement.remove()}})}(e)))}))}})),define("WoltLabSuite/Core/Controller/Style/ColorScheme",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=document.querySelector('meta[name="theme-color"]');e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{document.documentElement.dataset.colorScheme=t.matches?"dark":"light",e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor")}))}})),define("WoltLabSuite/Core/Controller/User/Profile",["require","exports","../../Component/User/List"],(function(e,t,i){"use strict";function n(e,t,n){const o=document.getElementById(t);if(o){let t;o.addEventListener("click",(()=>{void 0===t&&(t=new i.UserList({className:n,parameters:{userID:e}},o.dataset.dialogTitle)),t.open()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){!function(e){n(e,"followingAll","wcf\\data\\user\\follow\\UserFollowingAction")}(e),function(e){n(e,"followerAll","wcf\\data\\user\\follow\\UserFollowAction")}(e),function(e){n(e,"visitorAll","wcf\\data\\user\\profile\\visitor\\UserProfileVisitorAction")}(e)}})),define("WoltLabSuite/Core/Controller/User/Registration",["require","exports","tslib","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Language","../../Dom/Util"],(function(e,t,i,n,o,r){"use strict";function a(e,t){const i=e.closest("dl");i.classList.add("formError"),i.classList.remove("formSuccess"),r.default.innerError(e,(0,o.getPhrase)(t))}function s(e){const t=e.closest("dl");t.classList.remove("formError"),t.classList.add("formSuccess"),r.default.innerError(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=i.__importDefault(r),t.setup=function(e,t,i,o){e.addEventListener("blur",(()=>{!async function(e,t){const i=e.value.trim();if(!i)return void a(e,"wcf.global.form.error.empty");if(i.length<t.minlength||i.length>t.maxlength)return void a(e,"wcf.user.username.error.invalid");const o=await(0,n.prepareRequest)(e.dataset.validationEndpoint).post({username:i}).fetchAsJson();o.ok?s(e):a(e,`wcf.user.username.error.${o.error}`)}(e,o)})),t.addEventListener("blur",(()=>{!async function(e){const t=e.value.trim();if(!t)return void a(e,"wcf.global.form.error.empty");const i=await(0,n.prepareRequest)(e.dataset.validationEndpoint).post({email:t}).fetchAsJson();i.ok?s(e):a(e,`wcf.user.email.error.${i.error}`)}(t)})),i.addEventListener("blur",(()=>{!function(e){e.value.trim()||a(e,"wcf.global.form.error.empty")}(i)}))}})),define("WoltLabSuite/Core/Form/Builder/Dialog",["require","exports","tslib","../../Core","../../Ui/Dialog","../../Ajax","./Manager"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),class{_actionName;_className;_dialogContent;_dialogId;_formId;_options;_additionalSubmitButtons;constructor(e,t,i,n){this.init(e,t,i,n)}init(e,t,i,r){if(this._dialogId=e,this._className=t,this._actionName=i,this._options=n.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:/\w+\\data\\/.test(this._className)},r),this._options.dialog=n.extend(this._options.dialog||{},{onClose:()=>this._dialogOnClose()}),o.default.getDialog(this._dialogId))throw new Error(`The dialogId ${this._dialogId} is already in use.`);this._formId="",this._dialogContent=""}_ajaxSetup(){const e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+n.getXsrfToken(),e.withCredentials=!0),e}_ajaxSuccess(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");!function(e){if(void 0===e.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.formId)throw new Error("Missing form id in return data.")}(e.returnValues),this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&void 0!==(t=e.returnValues).dialog&&void 0!==t.formId){if(e.returnValues.formId!==this._formId)throw new Error("Mismatch between form ids: expected '"+this._formId+"' but got '"+e.returnValues.formId+"'.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog)}else this.destroy(),"function"==typeof this._options.successCallback&&this._options.successCallback(e.returnValues||{});break;default:throw new Error("Cannot handle action '"+e.actionName+"'.")}var t}_closeDialog(){o.default.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()}_dialogOnClose(){this._options.destroyOnClose&&this.destroy()}_dialogSetup(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}}_dialogSubmit(){this.getData().then((e=>this._submitForm(e)))}_openDialogContent(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;const i=o.default.open(this,this._dialogContent),r=i.content.querySelector("button[data-type=cancel]");null===r||n.stringToBool(r.dataset.hasEventListener||"")||(r.addEventListener("click",(()=>this._closeDialog())),r.dataset.hasEventListener="1"),this._additionalSubmitButtons=Array.from(i.content.querySelectorAll(':not(.formSubmit) button[type="submit"]')),this._additionalSubmitButtons.forEach((e=>{e.addEventListener("click",(()=>{this._additionalSubmitButtons.forEach((t=>{t.dataset.isClicked=t===e?"1":"0"})),setTimeout((()=>o.default.submit(this._dialogId)),0)}))}))}_submitForm(e){const t=o.default.getDialog(this).content.querySelector("button[data-type=submit]");"function"==typeof this._options.onSubmit?this._options.onSubmit(e,t):"string"==typeof this._options.submitActionName&&(t.disabled=!0,this._additionalSubmitButtons.forEach((e=>e.disabled=!0)),r.api(this,{actionName:this._options.submitActionName,parameters:{data:e,formId:this._formId}}))}destroy(e=!1){""!==this._formId&&(a.hasForm(this._formId)&&a.unregisterForm(this._formId),!0!==e&&o.default.destroy(this))}getData(){if(""===this._formId)throw new Error("Form has not been requested yet.");return a.getData(this._formId)}open(){o.default.getDialog(this._dialogId)?o.default.open(this):r.api(this)}}})),define("WoltLabSuite/Core/Helper/Dom/View",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomView=void 0,n=i.__importDefault(n);class o{#Zt;constructor(e){this.#Zt=this.#ei(e)}get root(){return this.#Zt}#ei(e){if(e instanceof HTMLElement)return e;if("string"==typeof e&&(e=n.default.createFragmentFromHtml(e)),1===e.children.length)return e.children[0];const t=document.createElement("div");return t.append(e),t}}t.DomView=o,t.default=o})),function(e){!function(t){function i(e,t){return function(i,n){"function"!=typeof e[i]&&Object.defineProperty(e,i,{configurable:!0,writable:!0,value:n}),t&&t(i,n)}}var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=i(e);void 0===n.Reflect?n.Reflect=e:o=i(n.Reflect,o),function(e){function t(e,t,i){var n,o=q.get(e);if(d(o)){if(!i)return;o=new P,q.set(e,o)}if(d(n=o.get(t))){if(!i)return;n=new P,o.set(t,n)}return n}function i(e,t,o){var r;return!!n(e,t,o)||!u(r=y(t))&&i(e,r,o)}function n(e,i,n){var o=t(i,n,!1);return!d(o)&&!!o.has(e)}function o(e,t,i){var a;return n(e,t,i)?r(e,t,i):u(a=y(t))?void 0:o(e,a,i)}function r(e,i,n){var o=t(i,n,!1);if(!d(o))return o.get(e)}function a(e,i,n,o){t(n,o,!0).set(e,i)}function s(e,t){var i,n,o,r,a,c,d,u,p=l(e,t),m=y(e);if(null===m)return p;if((i=s(m,t)).length<=0)return p;if(p.length<=0)return i;for(n=new j,o=[],r=0,a=p;r<a.length;r++)c=a[r],n.has(c)||(n.add(c),o.push(c));for(d=0,u=i;d<u.length;d++)c=u[d],n.has(c)||(n.add(c),o.push(c));return o}function l(e,i){var n,o,r,a,s=[],l=t(e,i,!1);if(d(l))return s;for(n=function(e){var t,i=v(e,k);if(!g(i))throw new TypeError;if(!p(t=i.call(e)))throw new TypeError;return t}(l.keys()),o=0;;){if(!(r=_(n)))return s.length=o,s;a=r.value;try{s[o]=a}catch(e){try{w(n)}finally{throw e}}o++}}function c(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function d(e){return void 0===e}function u(e){return null===e}function p(e){return"object"==typeof e?null!==e:"function"==typeof e}function m(e,t){var i,n,o;switch(c(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}if(i=3===t?"string":5===t?"number":"default",void 0!==(n=v(e,L))){if(p(o=n.call(e,i)))throw new TypeError;return o}return function(e,t){var i,n,o,r;if("string"===t){if(g(i=e.toString)&&!p(n=i.call(e)))return n;if(g(o=e.valueOf)&&!p(n=o.call(e)))return n}else{if(g(o=e.valueOf)&&!p(n=o.call(e)))return n;if(g(r=e.toString)&&!p(n=r.call(e)))return n}throw new TypeError}(e,"default"===i?"number":i)}function h(e){var t=m(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function f(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function g(e){return"function"==typeof e}function b(e){return"function"==typeof e}function v(e,t){var i=e[t];if(null!=i){if(!g(i))throw new TypeError;return i}}function _(e){var t=e.next();return!t.done&&t}function w(e){var t=e.return;t&&t.call(e)}function y(e){var t,i,n,o=Object.getPrototypeOf(e);return"function"!=typeof e||e===D||o!==D||null==(i=(t=e.prototype)&&Object.getPrototypeOf(t))||i===Object.prototype||"function"!=typeof(n=i.constructor)||n===e?o:n}function E(e){return e.__=void 0,delete e.__,e}var S=Object.prototype.hasOwnProperty,C="function"==typeof Symbol,L=C&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",k=C&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",x="function"==typeof Object.create,I={__proto__:[]}instanceof Array,M=!x&&!I,T={create:x?function(){return E(Object.create(null))}:I?function(){return E({__proto__:null})}:function(){return E({})},has:M?function(e,t){return S.call(e,t)}:function(e,t){return t in e},get:M?function(e,t){return S.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},D=Object.getPrototypeOf(Function),A="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,P=A||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){function e(e,t){return e}function t(e,t){return t}function i(e,t){return[e,t]}var n={},o=[],r=function(){function e(e,t,i){this._index=0,this._keys=e,this._values=t,this._selector=i}return e.prototype["@@iterator"]=function(){return this},e.prototype[k]=function(){return this},e.prototype.next=function(){var e,t=this._index;return t>=0&&t<this._keys.length?(e=this._selector(this._keys[t],this._values[t]),t+1>=this._keys.length?(this._index=-1,this._keys=o,this._values=o):this._index++,{value:e,done:!1}):{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=o,this._values=o),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=o,this._values=o),{value:e,done:!0}},e}();return function(){function o(){this._keys=[],this._values=[],this._cacheKey=n,this._cacheIndex=-2}return Object.defineProperty(o.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),o.prototype.has=function(e){return this._find(e,!1)>=0},o.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},o.prototype.set=function(e,t){var i=this._find(e,!0);return this._values[i]=t,this},o.prototype.delete=function(e){var t,i,o=this._find(e,!1);if(o>=0){for(t=this._keys.length,i=o+1;i<t;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=n,this._cacheIndex=-2),!0}return!1},o.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=n,this._cacheIndex=-2},o.prototype.keys=function(){return new r(this._keys,this._values,e)},o.prototype.values=function(){return new r(this._keys,this._values,t)},o.prototype.entries=function(){return new r(this._keys,this._values,i)},o.prototype["@@iterator"]=function(){return this.entries()},o.prototype[k]=function(){return this.entries()},o.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},o}()}():Map,j=A||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new P}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[k]=function(){return this.keys()},e}():Set,q=new(A||"function"!=typeof WeakMap?function(){function e(){var e;do{e="@@WeakMap@@"+n()}while(T.has(r,e));return r[e]=!0,e}function t(e,t){if(!S.call(e,a)){if(!t)return;Object.defineProperty(e,a,{value:T.create()})}return e[a]}function i(e,t){for(var i=0;i<t;++i)e[i]=255*Math.random()|0;return e}function n(){var e,t,n,r,a=(r=o,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(r)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(r)):i(new Uint8Array(r),r):i(new Array(r),r));for(a[6]=79&a[6]|64,a[8]=191&a[8]|128,e="",t=0;t<o;++t)4!==t&&6!==t&&8!==t||(e+="-"),(n=a[t])<16&&(e+="0"),e+=n.toString(16).toLowerCase();return e}var o=16,r=T.create(),a=e();return function(){function i(){this._key=e()}return i.prototype.has=function(e){var i=t(e,!1);return void 0!==i&&T.has(i,this._key)},i.prototype.get=function(e){var i=t(e,!1);return void 0!==i?T.get(i,this._key):void 0},i.prototype.set=function(e,i){return t(e,!0)[this._key]=i,this},i.prototype.delete=function(e){var i=t(e,!1);return void 0!==i&&delete i[this._key]},i.prototype.clear=function(){this._key=e()},i}()}():WeakMap);e("decorate",(function(e,t,i,n){if(d(i)){if(!f(e))throw new TypeError;if(!b(t))throw new TypeError;return function(e,t){var i,n;for(i=e.length-1;i>=0;--i)if(!d(n=(0,e[i])(t))&&!u(n)){if(!b(n))throw new TypeError;t=n}return t}(e,t)}if(!f(e))throw new TypeError;if(!p(t))throw new TypeError;if(!p(n)&&!d(n)&&!u(n))throw new TypeError;return u(n)&&(n=void 0),function(e,t,i,n){var o,r;for(o=e.length-1;o>=0;--o)if(!d(r=(0,e[o])(t,i,n))&&!u(r)){if(!p(r))throw new TypeError;n=r}return n}(e,t,i=h(i),n)})),e("metadata",(function(e,t){return function(i,n){if(!p(i))throw new TypeError;if(!d(n)&&!function(e){switch(c(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;a(e,t,i,n)}})),e("defineMetadata",(function(e,t,i,n){if(!p(i))throw new TypeError;return d(n)||(n=h(n)),a(e,t,i,n)})),e("hasMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),i(e,t,n)})),e("hasOwnMetadata",(function(e,t,i){if(!p(t))throw new TypeError;return d(i)||(i=h(i)),n(e,t,i)})),e("getMetadata",(function(e,t,i){if(!p(t))throw new TypeError;return d(i)||(i=h(i)),o(e,t,i)})),e("getOwnMetadata",(function(e,t,i){if(!p(t))throw new TypeError;return d(i)||(i=h(i)),r(e,t,i)})),e("getMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),s(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),l(e,t)})),e("deleteMetadata",(function(e,i,n){var o,r;if(!p(i))throw new TypeError;return d(n)||(n=h(n)),!d(o=t(i,n,!1))&&!!o.delete(e)&&(o.size>0||((r=q.get(i)).delete(n),r.size>0||q.delete(i),!0))}))}(o)}()}(Reflect||(Reflect={})),define("reflect-metadata",(function(){})),define("WoltLabSuite/Core/Helper/Dom/Element",["require","exports","./View","reflect-metadata"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomElementList=t.DomElement=void 0,t.DomElement=function(e,t){return function(n,o){if(!(n instanceof i.DomView))throw new Error("@DomElement() is only supported on `DomView`");const{nullable:r,type:a}=Object.assign({nullable:!1,type:Reflect.getMetadata("design:type",n,o)},t);Object.defineProperty(n,o,{configurable:!0,get(){const t=this.root.querySelector(e);if(null===t){if(r)return null;throw new Error(`Unable to find an element with the selector '${e}'.`)}if(!(t instanceof a))throw new Error(`Expected an element of type '${a.name}' but found '${t.nodeName}'.`);return t}})}},t.DomElementList=function(e,t){return function(n,o){if(!(n instanceof i.DomView))throw new Error("@DomElementList() is only supported on `DomView`");if(Reflect.getMetadata("design:type",n,o).prototype!==Array.prototype)throw new Error("The type must be an array of elements.");const{type:r}=t;Object.defineProperty(n,o,{configurable:!0,get(){const t=Array.from(this.root.querySelectorAll(e));for(const e of t)if(!(e instanceof r))throw new Error(`Expected an element of type '${r.name}' but found '${e.nodeName}'.`);return t}})}}})),define("WoltLabSuite/Core/Media/List/Upload",["require","exports","tslib","../Upload","../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_createButton(){super._createButton();const e=this._button.querySelector("span"),t=document.createTextNode(" ");e.insertBefore(t,e.childNodes[0]);const i=document.createElement("fa-icon");i.setIcon("upload"),e.insertBefore(i,e.childNodes[0])}_getParameters(){return this._options.categoryId?o.extend(super._getParameters(),{categoryID:this._options.categoryId}):super._getParameters()}}return r})),define("WoltLabSuite/Core/Media/Manager/Search",["require","exports","tslib","../../Dom/Traverse","../../Language","../../Ajax","../../Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),class{_cancelButton;_input;_mediaManager;_searchContainer;_searchMode=!1;constructor(e){this._mediaManager=e;const t=e.getDialog();this._searchContainer=t.querySelector(".mediaManagerSearch"),this._input=t.querySelector(".mediaManagerSearchField"),this._input.addEventListener("keypress",(e=>this._keyPress(e))),this._cancelButton=t.querySelector(".mediaManagerSearchCancelButton"),this._cancelButton.addEventListener("click",(()=>this._cancelSearch()))}_ajaxSetup(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\media\\MediaAction",interfaceName:"wcf\\data\\ISearchAction"}}}_ajaxSuccess(e){this._mediaManager.setMedia(e.returnValues.media||{},e.returnValues.template||"",{pageCount:e.returnValues.pageCount||0,pageNo:e.returnValues.pageNo||0}),this._mediaManager.getDialog().querySelector(".dialogContent").scrollTop=0}_cancelSearch(){this._searchMode&&(this._searchMode=!1,this.resetSearch(),this._mediaManager.resetMedia())}_hideStringThresholdError(){const e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e&&a.default.hide(e)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._input.value.length>=this._mediaManager.getOption("minSearchLength")?(this._hideStringThresholdError(),this.search()):this._showStringThresholdError())}_showStringThresholdError(){let e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e?a.default.show(e):(e=document.createElement("p"),e.className="innerInfo",e.textContent=o.get("wcf.media.search.info.searchStringThreshold",{minSearchLength:this._mediaManager.getOption("minSearchLength")}),this._input.parentNode.insertAdjacentElement("afterend",e))}hideSearch(){a.default.hide(this._searchContainer)}resetSearch(){this._input.value=""}showSearch(){a.default.show(this._searchContainer)}search(e){"number"!=typeof e&&(e=1);let t=this._input.value;t&&this._input.value.length<this._mediaManager.getOption("minSearchLength")?(this._showStringThresholdError(),t=""):this._hideStringThresholdError(),this._searchMode=!0,r.api(this,{parameters:{categoryID:this._mediaManager.getCategoryId(),imagesOnly:this._mediaManager.getOption("imagesOnly"),mode:this._mediaManager.getMode(),pageNo:e,searchString:t}})}}})),define("WoltLabSuite/Core/Media/Manager/Base",["require","exports","tslib","../../Core","../../Language","../../Permission","../../Dom/Change/Listener","../../Event/Handler","../../Dom/Traverse","../../Dom/Util","../../Ui/Dialog","../../Controller/Clipboard","../../Ui/Pagination","../../Ui/Notification","../../StringUtil","./Search","../Upload","../Editor","../Clipboard"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f,g,b,v){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),p=i.__importDefault(p),m=i.__importStar(m),h=i.__importStar(h),f=i.__importDefault(f),g=i.__importDefault(g),b=i.__importDefault(b),v=i.__importStar(v);let _=0;return class{_forceClipboard=!1;_hadInitiallyMarkedItems=!1;_id;_listItems=new Map;_media=new Map;_mediaCategorySelect;_mediaEditor=null;_mediaManagerMediaList=null;_pagination=null;_search=null;_upload=null;_options;constructor(e){this._options=n.extend({dialogTitle:o.get("wcf.media.manager"),imagesOnly:!1,minSearchLength:3},e),this._id="mediaManager"+_++,r.get("admin.content.cms.canManageMedia")&&(this._mediaEditor=new b.default(this)),a.add("WoltLabSuite/Core/Media/Manager",(()=>this._addButtonEventListeners())),s.add("com.woltlab.wcf.media.upload","success",(e=>this._openEditorAfterUpload(e)))}_addButtonEventListeners(){this._mediaManagerMediaList&&r.get("admin.content.cms.canManageMedia")&&l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaEditButton");t&&(t.classList.remove("jsMediaEditButton"),t.addEventListener("click",(e=>this._editMedia(e))))}))}_categoryChange(){this._search.search()}_click(e){e?.preventDefault(),d.open(this)}_dialogClose(){(r.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.hideEditor("com.woltlab.wcf.media")}_dialogInit(e,t){Object.entries(t.returnValues.media||{}).forEach((([e,t])=>{this._media.set(~~e,t)})),this._initPagination(~~t.returnValues.pageCount),this._hadInitiallyMarkedItems=t.returnValues.hasMarkedItems>0}_dialogSetup(){return{id:this._id,options:{onClose:()=>this._dialogClose(),onShow:()=>this._dialogShow(),title:this._options.dialogTitle},source:{after:(e,t)=>this._dialogInit(e,t),data:{actionName:"getManagementDialog",className:"wcf\\data\\media\\MediaAction",parameters:{mode:this.getMode(),imagesOnly:this._options.imagesOnly}}}}}_dialogShow(){if(this._mediaManagerMediaList)v.setMediaManager(this);else{const e=this.getDialog();this._mediaManagerMediaList=e.querySelector(".mediaManagerMediaList"),this._mediaCategorySelect=e.querySelector(".mediaManagerCategoryList > select"),this._mediaCategorySelect&&this._mediaCategorySelect.addEventListener("change",(()=>this._categoryChange()));const t=l.childrenByTag(this._mediaManagerMediaList,"LI");if(t.forEach((e=>{this._listItems.set(~~e.dataset.objectId,e)})),r.get("admin.content.cms.canManageMedia")){const e=d.getDialog(this).dialog.querySelector(".mediaManagerMediaUploadButton");this._upload=new g.default(c.identify(e),c.identify(this._mediaManagerMediaList),{mediaManager:this}),s.add("WoltLabSuite/Core/Ui/Object/Action","delete",(e=>this.removeMedia(~~e.objectElement.dataset.objectId)))}r.get("admin.content.cms.canManageMedia")||this._forceClipboard?v.init("menuManagerDialog-"+this.getMode(),!!this._hadInitiallyMarkedItems,this):this._removeClipboardCheckboxes(),this._search=new f.default(this),t.length||this._search.hideSearch()}(r.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.showEditor()}_editMedia(e){if(!r.get("admin.content.cms.canManageMedia"))throw new Error("You are not allowed to edit media files.");d.close(this);const t=e.currentTarget;this._mediaEditor.edit(this._media.get(~~t.dataset.objectId))}_editorClose(){d.open(this)}_editorSuccess(e,t,i=!0){if(this._mediaCategorySelect){const i=~~this._mediaCategorySelect.value;if(i){const n=~~e.categoryID;t==n||t!=i&&n!=i||this._search.search()}}i&&d.open(this),this._media.set(~~e.mediaID,e);const n=this._listItems.get(~~e.mediaID),o=n.querySelector(".mediaTitle");e.isMultilingual?e.title&&e.title[window.LANGUAGE_ID]?o.textContent=e.title[window.LANGUAGE_ID]:o.textContent=e.filename:e.title&&e.title[e.languageID]?o.textContent=e.title[e.languageID]:o.textContent=e.filename;const r=n.querySelector(".mediaThumbnail");r.innerHTML=e.elementTag;const a=r.querySelector("img");a&&(a.src+=`&refresh=${Date.now()}`)}_initPagination(e,t){if(void 0===t&&(t=1),e>1){const i=document.createElement("div");i.className="paginationBottom jsPagination";const n=d.getDialog(this).content.querySelector(".jsPagination");n.insertAdjacentElement("beforebegin",i),n.remove(),this._pagination=new p.default(i,{activePage:t,callbackSwitch:e=>this._search.search(e),maxPage:e})}else this._pagination&&c.hide(this._pagination.getElement())}_removeClipboardCheckboxes(){this._mediaManagerMediaList.querySelectorAll(".mediaCheckbox").forEach((e=>e.remove()))}_openEditorAfterUpload(e){if(e.upload===this._upload&&!e.isMultiFileUpload&&!this._upload.hasPendingUploads()){const t=Object.keys(e.media);t.length&&(d.close(this),this._mediaEditor.edit(this._media.get(~~e.media[t[0]].mediaID)))}}_setMedia(e){this._media=new Map(Object.entries(e).map((([e,t])=>[~~e,t])));let t=l.nextByClass(this._mediaManagerMediaList,"info");this._media.size?t&&c.hide(t):(null===t&&(t=document.createElement("p"),t.className="info",t.textContent=o.get("wcf.media.search.noResults")),c.show(t),c.insertAfter(t,this._mediaManagerMediaList)),l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{this._media.has(~~e.dataset.objectId)?c.show(e):c.hide(e)})),a.trigger(),r.get("admin.content.cms.canManageMedia")||this._forceClipboard?u.reload():this._removeClipboardCheckboxes()}addMedia(e,t){e.languageID||(e.isMultilingual=1),this._media.set(~~e.mediaID,e),this._listItems.set(~~e.mediaID,t),1===this._listItems.size&&this._search.showSearch()}clipboardDeleteMedia(e){e.forEach((e=>{this.removeMedia(~~e)})),m.show()}getCategoryId(){return this._mediaCategorySelect?~~this._mediaCategorySelect.value:0}getDialog(){return d.getDialog(this).dialog}getMode(){return""}getOption(e){return this._options[e]?this._options[e]:null}removeMedia(e){if(this._listItems.has(e)){try{this._listItems.get(e).remove()}catch(e){}this._listItems.delete(e),this._media.delete(e)}}resetMedia(){this._search.search()}setMedia(e,t,i){if(Object.entries(e).length>0){const e=document.createElement("ul");e.innerHTML=t,l.childrenByTag(e,"LI").forEach((e=>{this._listItems.has(~~e.dataset.objectId)||(this._listItems.set(~~e.dataset.objectId,e),this._mediaManagerMediaList.appendChild(e))}))}this._initPagination(i.pageCount,i.pageNo),this._setMedia(e)}setupMediaElement(e,t){const i=l.childByClass(t,"mediaInformation"),a=document.createElement("nav");a.className="jsMobileNavigation buttonGroupNavigation",i.parentNode.appendChild(a);const s=document.createElement("ul");s.className="buttonList iconList",a.appendChild(s);const c=document.createElement("li");c.className="mediaCheckbox",s.appendChild(c);const d=document.createElement("a");c.appendChild(d);const u=document.createElement("label");d.appendChild(u);const p=document.createElement("input");if(p.className="jsClipboardItem",p.type="checkbox",p.dataset.objectId=e.mediaID.toString(),u.appendChild(p),r.get("admin.content.cms.canManageMedia")){const t=document.createElement("li");t.className="jsMediaEditButton",t.dataset.objectId=e.mediaID.toString(),s.appendChild(t),t.innerHTML=`\n        <a class="jsTooltip" title="${o.get("wcf.global.button.edit")}">\n          <fa-icon name="pencil"></fa-icon>\n          <span class="invisible">${o.get("wcf.global.button.edit")}</span>\n        </a>`;const i=document.createElement("li");i.classList.add("jsObjectAction"),i.dataset.objectAction="delete";const r=n.getUuid();i.dataset.confirmMessage=h.unescapeHTML(o.get("wcf.media.delete.confirmMessage",{title:r})).replace(r,h.escapeHTML(e.filename)),s.appendChild(i),i.innerHTML=`\n        <a class="jsTooltip" title="${o.get("wcf.global.button.delete")}">\n          <fa-icon name="xmark"></fa-icon>\n          <span class="invisible">${o.get("wcf.global.button.delete")}</span>\n        </a>`}}}})),define("WoltLabSuite/Core/Media/Manager/Editor",["require","exports","tslib","./Base","../../Core","../../Event/Handler","../../Dom/Traverse","../../Language","../../Ui/Dialog","../../Controller/Clipboard","../../Dom/Util","../../Component/Ckeditor/Event","WoltLabSuite/Core/StringUtil"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaManagerEditor=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);class m extends n.default{_mediaToInsert=new Map;_mediaToInsertByClipboard=!1;_uploadData;_uploadId=null;constructor(e){if(super(e=o.extend({callbackInsert:null},e)),this._forceClipboard=!0,void 0===this._options.ckeditor)"string"==typeof this._options.buttonClass&&document.querySelectorAll(`.${this._options.buttonClass}`).forEach((e=>{e.addEventListener("click",(e=>{this._click(e)}))}));else{const e=this._options.ckeditor;(0,u.listenToCkeditor)(e.sourceElement).bbcode((({bbcode:e})=>"media"===e&&(this._click(),!0))),e.features.attachment||(0,u.listenToCkeditor)(e.sourceElement).uploadMedia((e=>{this._editorUpload(e)}))}}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&a.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaInsertButton");t&&(t.classList.remove("jsMediaInsertButton"),t.addEventListener("click",(e=>this._openInsertDialog(e))))}))}_buildInsertDialog(){let e="";this._getThumbnailSizes().forEach((t=>{e+='<option value="'+t+'">'+s.get("wcf.media.insert.imageSize."+t)+"</option>"})),e+='<option value="original">'+s.get("wcf.media.insert.imageSize.original")+"</option>";const t=`\n      <div class="section">\n        <dl class="thumbnailSizeSelection">\n          <dt>${s.get("wcf.media.insert.imageSize")}</dt>\n          <dd>\n            <select name="thumbnailSize">\n              ${e}\n            </select>\n          </dd>\n        </dl>\n      </div>\n      <div class="formSubmit">\n        <button type="button" class="button buttonPrimary">${s.get("wcf.global.button.insert")}</button>\n      </div>`;l.open({_dialogSetup:()=>({id:this._getInsertDialogId(),options:{onClose:()=>this._editorClose(),onSetup:e=>{e.querySelector(".buttonPrimary").addEventListener("click",(e=>this._insertMedia(e))),d.default.show(e.querySelector(".thumbnailSizeSelection"))},title:s.get("wcf.media.insert")},source:t})})}_dialogShow(){if(super._dialogShow(),this._uploadData){if(null!==this._upload){const e=this._upload.uploadFile(this._uploadData.file);this._uploadData.promise=new Promise((t=>{const i=r.add("com.woltlab.wcf.media.upload","success",(n=>{n.uploadId===e&&(r.remove("com.woltlab.wcf.media.upload","success",i),t({mediaId:n.media[0].mediaID,mediaSize:"original",url:n.media[0].link}))}))}))}this._uploadData=void 0}}_editorUpload(e){this._uploadData=e,l.open(this)}_getInsertDialogId(){return[this._id+"Insert",...this._mediaToInsert.keys()].join("-")}_getThumbnailSizes(){return["small","medium","large"].map((e=>Array.from(this._mediaToInsert.values()).every((t=>null!==t[e+"ThumbnailType"]))?e:null)).filter((e=>null!==e))}_insertMedia(e,t,i=!1){if(void 0===i&&(i=!0),e){l.close(this._getInsertDialogId());const i=e.currentTarget.closest(".dialogContent").querySelector("select[name=thumbnailSize]");t=i.value}null!==this._options.callbackInsert?this._options.callbackInsert(this._mediaToInsert,"separate",t):this._mediaToInsert.forEach((e=>this._insertMediaItem(t,e))),this._mediaToInsertByClipboard&&c.unmark("com.woltlab.wcf.media",Array.from(this._mediaToInsert.keys())),this._mediaToInsert=new Map,this._mediaToInsertByClipboard=!1,i&&l.close(this)}_insertMediaItem(e,t){const i=this._options.ckeditor;if(t.isImage){let n="";["small","medium","large","original"].some((i=>0!=t[i+"ThumbnailHeight"]&&(n=i,e==i))),(e=n)||(e="original");let o=t.link;"original"!==e&&(o=t[e+"ThumbnailLink"]),i.insertHtml(`<img src="${(0,p.escapeHTML)(o)}" class="image woltlabSuiteMedia" data-media-id="${t.mediaID}" data-media-size="${(0,p.escapeHTML)(e)}">`)}else i.insertText(`[wsm='${t.mediaID}'][/wsm]`)}_mediaUploaded(e){null!==this._uploadId&&this._upload===e.upload&&(this._uploadId===e.uploadId||Array.isArray(this._uploadId)&&-1!==this._uploadId.indexOf(e.uploadId))&&(this._mediaToInsert=new Map(e.media.entries()),this._insertMedia(null,"medium",!1),this._uploadId=null)}_openInsertDialog(e){const t=e.currentTarget;this.insertMedia([~~t.dataset.objectId])}clipboardInsertMedia(e){this.insertMedia(e,!0)}insertMedia(e,t){this._mediaToInsert=new Map,this._mediaToInsertByClipboard=t||!1;let i=!0;if(e.forEach((e=>{const t=this._media.get(e);this._mediaToInsert.set(t.mediaID,t),t.isImage||(i=!1)})),i)if(this._getThumbnailSizes().length){l.close(this);const e=this._getInsertDialogId();l.getDialog(e)?l.openStatic(e,null):this._buildInsertDialog()}else this._insertMedia(void 0,"original");else this._insertMedia()}getMode(){return"editor"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaInsertButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML=`\n      <a class="jsTooltip" title="${s.get("wcf.global.button.insert")}">\n        <fa-icon name="plus"></fa-icon>\n        <span class="invisible">${s.get("wcf.global.button.insert")}</span>\n      </a>`}}t.MediaManagerEditor=m,t.default=m})),define("WoltLabSuite/Core/Media/Manager/Select",["require","exports","tslib","./Base","../../Core","../../Dom/Traverse","../../FileUtil","../../Language","../../Ui/Dialog"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importStar(l);class c extends n.default{_activeButton=null;_buttons;_storeElements=new WeakMap;constructor(e){super(e),this._buttons=document.getElementsByClassName(this._options.buttonClass||"jsMediaSelectButton"),Array.from(this._buttons).forEach((e=>{const t=e.dataset.store;if(t){const i=document.getElementById(t);if(i&&"INPUT"===i.tagName){e.addEventListener("click",(e=>this._click(e))),this._storeElements.set(e,i);const t=document.createElement("button");if(t.type="button",t.classList.add("button","jsTooltip"),t.title=s.getPhrase("wcf.global.button.delete"),t.innerHTML='<fa-icon name="xmark"></fa-icon>',"LI"===e.parentElement.tagName){const n=document.createElement("li");n.append(t),e.parentElement.insertAdjacentElement("afterend",n),i.value||(n.hidden=!0)}else e.insertAdjacentElement("afterend",t),i.value||(t.hidden=!0);t.addEventListener("click",(()=>this._removeMedia(e,t)))}}}))}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&r.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaSelectButton");t&&(t.classList.remove("jsMediaSelectButton"),t.addEventListener("click",(e=>this._chooseMedia(e))))}))}_chooseMedia(e){if(null===this._activeButton)throw new Error("Media cannot be chosen if no button is active.");const t=e.currentTarget,i=this._media.get(~~t.dataset.objectId),n=document.getElementById(this._activeButton.dataset.store);n.value=i.mediaID.toString(),o.triggerEvent(n,"change");const r=this._activeButton.dataset.display;if(r){const e=document.getElementById(r);if(e)if(i.isImage){const t=i.smallThumbnailLink?i.smallThumbnailLink:i.link,n=i.altText&&i.altText[window.LANGUAGE_ID]?i.altText[window.LANGUAGE_ID]:"";e.innerHTML=`<img src="${t}" alt="${n}" />`}else{let t=a.getIconNameByFilename(i.filename);t=t?"file-"+t:"file",e.innerHTML=`\n            <div class="box48" style="margin-bottom: 10px;">\n              <fa-icon size="48" name="${t}"></fa-icon>\n              <div class="containerHeadline">\n                <h3>${i.filename}</h3>\n                <p>${i.formattedFilesize}</p>\n              </div>\n            </div>`}}"LI"===this._activeButton.parentElement.tagName?this._activeButton.parentElement.nextElementSibling.hidden=!1:this._activeButton.nextElementSibling.hidden=!1,l.close(this)}_click(e){if(e.preventDefault(),this._activeButton=e.currentTarget,super._click(e),!this._mediaManagerMediaList)return;const t=this._storeElements.get(this._activeButton);r.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{t.value&&t.value==e.dataset.objectId?e.classList.add("jsSelected"):e.classList.remove("jsSelected")}))}getMode(){return"select"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaSelectButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML=`\n        <a class="jsTooltip" title="${s.get("wcf.media.button.select")}">\n          <fa-icon name="check"></fa-icon>\n          <span class="invisible">${s.get("wcf.media.button.select")}</span>\n        </a>\n      `}_removeMedia(e,t){"LI"===t.parentElement.tagName?t.parentElement.hidden=!0:t.hidden=!0;const i=document.getElementById(e.dataset.store);i.value="",o.triggerEvent(i,"change");const n=e.dataset.display;if(n){const e=document.getElementById(n);e&&(e.innerHTML="")}}}return c})),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["require","exports","tslib","../../Ajax","../Notification"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=i.__importStar(o),t.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),async function(){await(0,n.dboAction)("markAllAsRead","wcf\\data\\article\\ArticleAction").dispatch(),document.querySelectorAll(".contentItemList .contentItemBadgeNew").forEach((e=>e.remove())),document.querySelectorAll(".boxMenu .active .badge").forEach((e=>e.remove())),o.show()}()}))}))}})),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["require","exports","tslib","../../Core","./Simple"],(function(e,t,i,n,o){"use strict";function r(e){if(!(e instanceof HTMLUListElement))throw new TypeError("Expected a reference to an <ul> element.");if(!e.classList.contains("dropdownMenu"))throw new Error("List does not appear to be a dropdown menu.")}function a(e){const t=document.createElement("li");if("divider"===e)return t.className="dropdownDivider",t;"string"==typeof e.identifier&&(t.dataset.identifier=e.identifier);const i=document.createElement("a");if(i.href="string"==typeof e.href?e.href:"#","function"==typeof e.callback)i.addEventListener("click",(t=>{t.preventDefault(),e.callback(i)}));else if("#"===i.href)throw new Error("Expected either a `href` value or a `callback`.");if(e.attributes&&n.isPlainObject(e.attributes)&&Object.keys(e.attributes).forEach((t=>{const n=e.attributes[t];if("string"!=typeof n)throw new Error("Expected only string values.");-1!==t.indexOf("-")?i.setAttribute(`data-${t}`,n):i.dataset[t]=n})),t.appendChild(i),void 0!==e.icon&&n.isPlainObject(e.icon)){if("string"!=typeof e.icon.name)throw new TypeError("Expected a valid icon name.");let t=16;"number"==typeof e.icon.size&&-1!==c.indexOf(~~e.icon.size)&&(t=~~e.icon.size);const n=document.createElement("fa-icon");n.size=t,n.setIcon(e.icon.name,!!e.icon.forceSolid),i.appendChild(n)}const o="string"==typeof e.label?e.label.trim():"",r="string"==typeof e.labelHtml?e.labelHtml.trim():"";if(""===o&&""===r)throw new TypeError("Expected either a label or a `labelHtml`.");const a=document.createElement("span");return a[o?"textContent":"innerHTML"]=o||r,i.appendChild(document.createTextNode(" ")),i.appendChild(a),t}function s(e,t){r(e),e.appendChild(a(t))}function l(e,t){if(r(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");const i=t.length;if(0===i)throw new Error("Expected a non-empty list of items.");if(1===i)s(e,t[0]);else{const i=document.createDocumentFragment();t.forEach((e=>{i.appendChild(a(e))})),e.appendChild(i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.divider=t.attach=t.setItems=t.appendItems=t.appendItem=t.buildItem=t.create=void 0,n=i.__importStar(n),o=i.__importDefault(o);const c=[16,24,32,48,64,96,144];t.create=function(e,t){const i=document.createElement("ul");return i.className="dropdownMenu","string"==typeof t&&(i.dataset.identifier=t),Array.isArray(e)&&e.length>0&&l(i,e),i},t.buildItem=function(e){return a(e)},t.appendItem=s,t.appendItems=l,t.setItems=function(e,t){r(e),e.innerHTML="",l(e,t)},t.attach=function(e,t){r(e),o.default.initFragment(t,e),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),o.default.toggleDropdown(t.id)}))},t.divider=function(){return"divider"}})),define("WoltLabSuite/Core/Ui/File/Delete",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),class{buttonContainer;containers=new Map;deleteButton=void 0;internalId;isSingleImagePreview;target;uploadHandler;constructor(e,t,i,n){this.isSingleImagePreview=i,this.uploadHandler=n;const o=document.getElementById(e);if(null===o)throw new Error(`Element id '${e}' is unknown.`);this.buttonContainer=o;const r=document.getElementById(t);if(null===r)throw new Error(`Element id '${t}' is unknown.`);this.target=r;const a=this.target.dataset.internalId;if(!a)throw new Error("InternalId is unknown.");this.internalId=a,this.rebuild()}createButtons(){let e=!1;this.target.querySelectorAll("li.uploadedFile").forEach((t=>{const i=t.dataset.uniqueFileId;if(void 0===i||this.containers.has(i))return;const n={uniqueFileId:i,element:t};this.containers.set(i,n),this.initDeleteButton(t,n),e=!0})),e&&r.default.trigger()}initDeleteButton(e,t){const i=e.querySelector(".buttonGroup");if(null===i)throw new Error(`Button group in '${this.target.id}' is unknown.`);const n=document.createElement("li"),o=document.createElement("span");o.className="button jsDeleteButton small",o.textContent=a.get("wcf.global.button.delete"),n.appendChild(o),i.appendChild(n),n.addEventListener("click",this.deleteElement.bind(this,t.uniqueFileId))}deleteElement(e){n.api(this,{uniqueFileId:e,internalId:this.internalId})}rebuild(){if(!this.isSingleImagePreview)return void this.createButtons();const e=this.target.querySelector("img");if(null!==e){const t=e.dataset.uniqueFileId;if(!this.containers.has(t)){const i={uniqueFileId:t,element:e};this.containers.set(t,i),this.deleteButton=document.createElement("p"),this.deleteButton.className="button deleteButton";const n=document.createElement("span");n.textContent=a.get("wcf.global.button.delete"),this.deleteButton.appendChild(n),this.buttonContainer.appendChild(this.deleteButton),this.deleteButton.addEventListener("click",this.deleteElement.bind(this,i.uniqueFileId))}}}_ajaxSuccess(e){this.containers.get(e.uniqueFileId).element.remove(),this.isSingleImagePreview&&this.deleteButton&&(this.deleteButton.remove(),this.deleteButton=void 0),this.uploadHandler.checkMaxFiles(),o.triggerEvent(this.target,"change")}_ajaxSetup(){return{url:"index.php?ajax-file-delete/&t="+o.getXsrfToken()}}}})),define("WoltLabSuite/Core/Ui/File/Upload",["require","exports","tslib","../../Core","./Delete","../../Dom/Util","../../Language","../../Upload"],(function(e,t,i,n,o,r,a,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importDefault(s);class l extends s.default{_deleteHandler;constructor(e,t,i){if(void 0===(i=i||{}).internalId)throw new Error("Missing internal id.");(i=n.extend({imagePreview:!1,maxFiles:null,className:"invalid",url:`index.php?ajax-file-upload/&t=${n.getXsrfToken()}`},i)).multiple=null===i.maxFiles||i.maxFiles>1,super(e,t,i),this.checkMaxFiles(),this._deleteHandler=new o.default(e,t,this._options.imagePreview,this)}_createFileElement(e){const t=super._createFileElement(e);t.classList.add("box64","uploadedFile");const i=t.querySelector("progress"),n=document.createElement("fa-icon");n.size=64,n.setIcon("spinner");const o=t.textContent;t.textContent="",t.append(n);const r=document.createElement("div"),a=document.createElement("p");a.textContent=o;const s=document.createElement("small");s.appendChild(i),r.appendChild(a),r.appendChild(s);const l=document.createElement("div");l.appendChild(r);const c=document.createElement("ul");return c.className="buttonGroup",l.appendChild(c),t.append(l),t}_failure(e,t){throw this._fileElements[e].forEach((e=>{e.classList.add("uploadFailed");const t=e.querySelector("small");t.innerHTML="",e.querySelector("fa-icon").setIcon("ban");const i=document.createElement("span");i.className="innerError",i.textContent=a.get("wcf.upload.error.uploadFailed"),t.insertAdjacentElement("afterend",i)})),new Error(`Upload failed: ${t.message}`)}_upload(e,t,i){const n=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return n&&n.remove(),super._upload(e,t,i)}_success(e,t){this._fileElements[e].forEach(((i,n)=>{if(void 0!==t.files[n]){const e=t.files[n];if(this._options.imagePreview){if(null===e.image)throw new Error("Expect image for uploaded file. None given.");i.remove();const t=this._target.querySelector("img.previewImage");if(null!==t)t.src=e.image;else{const t=document.createElement("img");t.classList.add("previewImage"),t.src=e.image,t.style.setProperty("max-width","100%",""),t.dataset.uniqueFileId=e.uniqueFileId,this._target.appendChild(t)}}else{i.dataset.uniqueFileId=e.uniqueFileId,i.querySelector("small").textContent=e.filesize.toString();const t=i.querySelector("fa-icon");if(null!==e.image){const i=document.createElement("a");i.classList.add("jsImageViewer"),i.href=e.image;const n=document.createElement("img");n.classList.add("formUploadHandlerContentListImage"),n.src=e.image,n.width=e.imageWidth,n.height=e.imageHeight,i.appendChild(n),t.replaceWith(i)}else t.setIcon(e.icon,"paperclip"===e.icon)}}else{if(void 0===t.error[n])throw new Error(`Unknown uploaded file for uploadId ${e}.`);{const e=t.error[n];i.classList.add("uploadFailed");const o=i.querySelector("small");o.innerHTML="",i.querySelector("fa-icon").setIcon("ban");let r=i.querySelector(".innerError");null===r?(r=document.createElement("span"),r.className="innerError",r.textContent=e.errorMessage,o.insertAdjacentElement("afterend",r)):r.textContent=e.errorMessage}}})),this._deleteHandler.rebuild(),this.checkMaxFiles(),n.triggerEvent(this._target,"change")}_getFormData(){return{internalId:this._options.internalId}}validateUpload(e){if(null===this._options.maxFiles||e.length+this.countFiles()<=this._options.maxFiles)return!0;{let e=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return null===e&&(e=document.createElement("small"),e.className="innerError",this._buttonContainer.insertAdjacentElement("afterend",e)),e.textContent=a.get("wcf.upload.error.reachedRemainingLimit",{maxFiles:this._options.maxFiles-this.countFiles()}),!1}}countFiles(){return this._options.imagePreview?null!==this._target.querySelector("img")?1:0:this._target.childElementCount}checkMaxFiles(){null!==this._options.maxFiles&&this.countFiles()>=this._options.maxFiles?r.default.hide(this._button):r.default.show(this._button)}}return l})),define("WoltLabSuite/Core/Ui/ItemList/Filter",["require","exports","tslib","../../Core","../../Dom/Util","../../Language","../../StringUtil","../Dropdown/Simple"],(function(e,t,i,n,o,r,a,s){"use strict";return n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),class{_container;_dropdownId="";_dropdown=void 0;_element;_fragment=void 0;_input;_items=new Set;_options;_value="";_clearButton;constructor(e,t){this._options=n.extend({callbackPrepareItem:void 0,enableVisibilityFilter:!0,filterPosition:"top"},t),"top"!==this._options.filterPosition&&(this._options.filterPosition="bottom");const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id, '"+e+"' does not match anything.");if(!i.classList.contains("scrollableCheckboxList")&&"function"!=typeof this._options.callbackPrepareItem)throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");"function"!=typeof this._options.callbackPrepareItem&&(this._options.callbackPrepareItem=e=>this._prepareItem(e)),i.dataset.filter="showAll";const o=document.createElement("div");o.className="itemListFilter",i.insertAdjacentElement("beforebegin",o),o.appendChild(i);const a=document.createElement("div");a.className="inputAddon";const s=document.createElement("input");if(s.className="long",s.type="text",s.placeholder=r.get("wcf.global.filter.placeholder"),s.addEventListener("keydown",(e=>{"Enter"===e.key&&e.preventDefault()})),s.addEventListener("keyup",(()=>this._keyup())),this._clearButton=document.createElement("a"),this._clearButton.href="#",this._clearButton.className="button inputSuffix disabled jsTooltip",this._clearButton.title=r.get("wcf.global.filter.button.clear"),this._clearButton.innerHTML='<fa-icon name="xmark" solid></fa-icon>',this._clearButton.addEventListener("click",(e=>{e.preventDefault(),this.reset()})),a.appendChild(s),a.appendChild(this._clearButton),this._options.enableVisibilityFilter){const e=document.createElement("a");e.href="#",e.className="button inputSuffix jsTooltip",e.title=r.get("wcf.global.filter.button.visibility"),e.innerHTML='<fa-icon name="eye"></fa-icon>',e.addEventListener("click",(e=>this._toggleVisibility(e))),a.appendChild(e)}"bottom"===this._options.filterPosition?o.appendChild(a):o.insertBefore(a,i),this._container=o,this._element=i,this._input=s;const l=Math.max(this._element.offsetHeight,200);this._element.style.setProperty("height",`${l}px`,"")}reset(){this._input.value="",this._keyup()}_buildItems(){this._items.clear(),Array.from(this._element.children).forEach((e=>{this._items.add(this._options.callbackPrepareItem(e))}))}_prepareItem(e){const t=e.children[0],i=t.textContent.trim(),n=t.children[0];for(;n.nextSibling;)t.removeChild(n.nextSibling);t.appendChild(document.createTextNode(" "));const o=document.createElement("span");return o.textContent=i,t.appendChild(o),{item:e,span:o,text:i}}_keyup(){const e=this._input.value.trim();if(this._value===e)return;e?this._clearButton.classList.remove("disabled"):this._clearButton.classList.add("disabled"),this._fragment||(this._fragment=document.createDocumentFragment()),this._fragment.appendChild(this._element),this._items.size||this._buildItems();const t=new RegExp("("+a.escapeRegExp(e)+")","i");let i=""===e;this._items.forEach((n=>{""===e?(n.span.textContent=n.text,o.default.show(n.item)):t.test(n.text)?(n.span.innerHTML=n.text.replace(t,"<u>$1</u>"),o.default.show(n.item),i=!0):o.default.hide(n.item)})),"bottom"===this._options.filterPosition?this._container.insertAdjacentElement("afterbegin",this._element):this._container.insertAdjacentElement("beforeend",this._element),this._value=e,o.default.innerError(this._container,!i&&r.get("wcf.global.filter.error.noMatches"))}_toggleVisibility(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;if(!this._dropdown){const e=document.createElement("ul");e.className="dropdownMenu",["activeOnly","highlightActive","showAll"].forEach((t=>{const i=document.createElement("a");i.dataset.type=t,i.href="#",i.textContent=r.get(`wcf.global.filter.visibility.${t}`),i.addEventListener("click",(e=>this._setVisibility(e)));const n=document.createElement("li");if(n.appendChild(i),"showAll"===t){n.className="active";const t=document.createElement("li");t.className="dropdownDivider",e.appendChild(t)}e.appendChild(n)})),s.default.initFragment(t,e),this._setupVisibilityFilter(),this._dropdown=e,this._dropdownId=t.id}s.default.toggleDropdown(t.id,t)}_setupVisibilityFilter(){const e=this._element.nextSibling,t=this._element.parentElement,i=this._element.scrollTop;document.createDocumentFragment().appendChild(this._element),this._element.querySelectorAll("li").forEach((e=>{const t=e.querySelector('input[type="checkbox"]');if(t)t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{t.checked?e.classList.add("active"):e.classList.remove("active")}));else{const t=e.querySelector('input[type="radio"]');t&&(t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{this._element.querySelectorAll("li").forEach((e=>e.classList.remove("active"))),t.checked?e.classList.add("active"):e.classList.remove("active")})))}})),t.insertBefore(this._element,e),this._element.scrollTop=i}_setVisibility(e){e.preventDefault();const t=e.currentTarget,i=t.dataset.type;if(s.default.close(this._dropdownId),this._element.dataset.filter===i)return;this._element.dataset.filter=i,this._dropdown.querySelector(".active").classList.remove("active"),t.parentElement.classList.add("active");const n=document.getElementById(this._dropdownId);"showAll"===i?n.classList.remove("active"):n.classList.add("active");const o=n.querySelector("fa-icon");"showAll"===i?o.setIcon("eye"):o.setIcon("eye-slash")}}})),define("WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText",["require","exports","tslib","../Confirmation","../../Language","../../Dom/Util"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiItemListLineBreakSeparatedText=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r);class a{addButton=void 0;clearButton=void 0;itemInput=void 0;itemList;items=new Set;mutationObserver;options;submitField=void 0;uiDisabled=!1;constructor(e,t={}){if(this.itemList=e,this.options=t,!this.options.submitFieldName){const e=this.itemList.nextElementSibling;if(!(e instanceof HTMLInputElement&&"hidden"===e.type))throw new Error("Missing `submitFieldName` option");this.submitField=e}this.itemList.closest("form").addEventListener("submit",(()=>this.submit())),this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{"readonly"===e.attributeName&&(e.target.readOnly?this.disableUi():this.enableUi())}))})),this.initValues(),this.buildUi()}addItem(e){if(e.preventDefault(),this.uiDisabled)return;const t=this.itemInput,i=t.value.trim();""===i?r.default.innerError(t.parentElement,o.get("wcf.global.form.error.empty")):this.items.has(i)?r.default.innerError(t.parentElement,o.get("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:i}),!0):(this.insertItem(i),this.resetInput()),t.focus()}buildUi(){const e=document.createElement("div");e.classList.add("itemListFilter"),this.itemList.insertAdjacentElement("beforebegin",e),e.appendChild(this.itemList);const t=document.createElement("div");t.classList.add("inputAddon"),e.appendChild(t),this.itemInput=document.createElement("input"),this.itemInput.classList.add("long"),this.itemInput.type="text",this.itemInput.placeholder=o.get("wcf.acp.option.type.lineBreakSeparatedText.placeholder"),this.itemInput.addEventListener("keydown",(e=>this.keydown(e))),this.itemInput.addEventListener("paste",(e=>this.paste(e))),t.appendChild(this.itemInput),this.mutationObserver.observe(this.itemInput,{attributes:!0}),this.addButton=document.createElement("a"),this.addButton.href="#",this.addButton.classList.add("button","inputSuffix","jsTooltip"),this.addButton.title=o.get("wcf.global.button.add"),this.addButton.innerHTML='<fa-icon name="plus" solid></fa-icon>',this.addButton.addEventListener("click",(e=>this.addItem(e))),t.appendChild(this.addButton),this.clearButton=document.createElement("a"),this.clearButton.href="#",this.clearButton.classList.add("button","inputSuffix","jsTooltip"),this.clearButton.title=o.get("wcf.global.button.delete"),this.clearButton.innerHTML='<fa-icon name="times" solid></fa-icon>',this.clearButton.addEventListener("click",(e=>this.clearList(e))),t.appendChild(this.clearButton),0===this.items.size&&r.default.hide(this.clearButton)}clearList(e){e.preventDefault(),this.uiDisabled||n.show({confirm:()=>{this.itemList.innerHTML="",this.items.clear(),this.hideList()},message:o.get("wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage"),messageIsHtml:!0})}deleteItem(e){if(this.uiDisabled)return;const t=e.currentTarget,i=t.closest("li").dataset.value;n.show({confirm:()=>{t.closest("li").remove(),0===this.itemList.childElementCount&&this.hideList(),this.items.delete(i)},message:o.get("wcf.button.delete.confirmMessage",{objectTitle:i}),messageIsHtml:!0})}disableUi(){this.addButton.classList.add("disabled"),this.clearButton.classList.add("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.add("disabled"))),this.uiDisabled=!0}enableUi(){this.addButton.classList.remove("disabled"),this.clearButton.classList.remove("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.remove("disabled"))),this.uiDisabled=!1}hideList(){r.default.hide(this.itemList),r.default.hide(this.clearButton)}initValues(){Array.from(this.itemList.children).forEach((e=>{this.items.add(e.dataset.value),e.querySelector(".jsDeleteItem").addEventListener("click",(e=>this.deleteItem(e)))}))}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const i=document.createElement("span");i.innerHTML='<fa-icon name="xmark" solid></fa-icon>',i.classList.add("jsDeleteItem","jsTooltip","pointer"),i.title=o.get("wcf.global.button.delete"),i.addEventListener("click",(e=>this.deleteItem(e))),t.append(i),t.append(document.createTextNode(" "));const n=document.createElement("span");n.innerText=e,t.append(n);const r=Array.from(this.itemList.children).find((t=>t.dataset.value>e));r?this.itemList.insertBefore(t,r):this.itemList.append(t),this.showList()}keydown(e){"Enter"===e.key&&this.addItem(e)}paste(e){if(this.uiDisabled)return;const t=e.clipboardData.getData("text/plain").split("\n");t.length>1&&(e.preventDefault(),t.forEach((e=>{""===(e=e.trim())||this.items.has(e)||this.insertItem(e)})),this.resetInput())}resetInput(){r.default.innerError(this.itemInput.parentElement,""),this.itemInput.value=""}showList(){r.default.show(this.itemList),r.default.show(this.clearButton)}submit(){const e=Array.from(this.items).join("\n");if(this.submitField)this.submitField.value=e;else{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}}}t.UiItemListLineBreakSeparatedText=a,t.default=a})),define("WoltLabSuite/Core/Ui/ItemList/Static",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Language","../Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e){const t=p.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.placeholder=r.get("wcf.global.form.input.maxItems")))}function l(e,t,i){const n=p.get(e),o=document.createElement("li");o.className="item";const r=document.createElement("span");if(r.className="content",r.dataset.objectId=t.objectId.toString(),r.textContent=t.value,o.appendChild(r),i||!n.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",(e=>c(e))),o.appendChild(e)}n.list.insertBefore(o,n.listItem),n.element.value="",n.element.disabled||s(e);let a=d(n);"function"==typeof n.options.callbackChange&&(null===a&&(a=u(e)),n.options.callbackChange(e,a))}function c(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const i=e.parentElement.dataset.elementId,n=p.get(i);e.remove(),t||n.element.focus(),s(i);let o=d(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=u(i)),n.options.callbackChange(i,o))}function d(e){if(!e.options.isCSV)return null;const t=u(e.element.id);return e.shadow.value=t.map((e=>e.value)).join(","),t}function u(e){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const t=p.get(e),i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:~~e.dataset.objectId,value:e.textContent})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a);const p=new Map;t.init=function(e,t,i){const r=document.getElementById(e);if(null===r)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(p.has(e)){const t=p.get(e);Object.values(t).forEach((e=>{e instanceof HTMLElement&&e.parentElement&&e.remove()})),a.default.destroy(e),p.delete(e)}const s=n.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},i),d=o.parentByTag(r,"FORM");if(null!==d&&!s.isCSV){if(!s.submitFieldName.length&&"function"!=typeof s.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");d.addEventListener("submit",(()=>{const t=u(e);s.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=s.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,d.appendChild(t)})):s.callbackSubmit(d,t)}))}const m=function(e,t){const i=document.createElement("ol");i.className="inputItemList"+(e.disabled?" disabled":""),i.dataset.elementId=e.id,i.addEventListener("click",(t=>{t.target===i&&e.focus()}));const n=document.createElement("li");let o;n.className="input",i.appendChild(n),e.addEventListener("keydown",(e=>function(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?c(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}(e))),e.addEventListener("keypress",(e=>function(e){if("Enter"===e.key||","===e.key){e.preventDefault();const t=e.currentTarget,i=t.value.trim();i.length&&l(t.id,{objectId:0,value:i})}}(e))),e.addEventListener("keyup",(e=>function(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}(e))),e.addEventListener("paste",(e=>function(e){const t=e.currentTarget;e.clipboardData.getData("text/plain").split(",").map((e=>e.trim())).filter((e=>e.length>0)).forEach((e=>{l(t.id,{objectId:0,value:e})})),e.preventDefault()}(e))),e.addEventListener("blur",(e=>function(e){const t=e.currentTarget;window.setTimeout((()=>{const e=t.value.trim();e.length&&l(t.id,{objectId:0,value:e})}),100)}(e))),e.insertAdjacentElement("beforebegin",i),n.appendChild(e),-1!==t.maxLength&&(e.maxLength=t.maxLength);let r=[];if(t.isCSV&&(o=document.createElement("input"),o.className="itemListInputShadow",o.type="hidden",o.name=e.name,e.removeAttribute("name"),i.insertAdjacentElement("beforebegin",o),r=e.value.split(",").map((e=>e.trim())).filter((e=>e.length>0)),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentElement.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,list:i,shadow:o,values:r}}(r,s);if(p.set(e,{dropdownMenu:null,element:m.element,list:m.list,listItem:m.element.parentElement,options:s,shadow:m.shadow}),t=m.values.length?m.values:t,Array.isArray(t)){const i=!m.element.disabled;t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),l(e,t,i)}))}},t.getValues=u,t.setValues=function(e,t){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const i=p.get(e);o.childrenByClass(i.list,"item").forEach((e=>c(e,!0))),t.forEach((t=>l(e,t)))}})),define("WoltLabSuite/Core/Ui/ItemList/User",["require","exports","tslib","../ItemList"],(function(e,t,i,n){"use strict";function o(e){const t=r(e.element.id),i=[],n=[];t.forEach((e=>{e.type&&"group"===e.type?n.push(e.objectId):i.push(e.value)}));const o=e.shadow;return o.value=i.join(","),e._shadowGroups||(e._shadowGroups=document.createElement("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=`${o.name}GroupIDs`,o.insertAdjacentElement("beforebegin",e._shadowGroups)),e._shadowGroups.value=n.join(","),t}function r(e){return n.getValues(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.init=void 0,n=i.__importStar(n),t.init=function(e,t){n.init(e,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:t.includeUserGroups?~~t.includeUserGroups:0,restrictUserGroupIDs:Array.isArray(t.restrictUserGroupIDs)?t.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof t.callbackChange?t.callbackChange:null,callbackSyncShadow:t.csvPerType?o:null,callbackSetupValues:"function"==typeof t.callbackSetupValues?t.callbackSetupValues:null,excludedSearchValues:Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[],isCSV:!0,maxItems:t.maxItems?~~t.maxItems:-1,restricted:!0})},t.getValues=r})),define("WoltLabSuite/Core/Ui/Like/Handler",["require","exports","tslib","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil","../Reaction/Handler","../../User"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l);const c=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new WeakMap;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=n.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},t),this.initContainers(),o.default.add(`WoltLabSuite/Core/Ui/Like/Handler-${e}`,(()=>this.initContainers())),new s.default(this._objectType,{containerSelector:this._options.containerSelector})}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{if(this._containers.has(t))return;const i={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~t.dataset.likeDislikes,liked:~~t.dataset.likeLiked,likes:~~t.dataset.likeLikes,objectId:~~t.dataset.objectId,users:JSON.parse(t.dataset.likeUsers)};this._containers.set(t,i),this._buildWidget(t,i),e=!0})),e&&o.default.trigger()}_buildWidget(e,t){let i,n=!0;if(i=this._options.isSingleItem?document.querySelector(this._options.summarySelector):e.querySelector(this._options.summarySelector),null===i&&(i=this._options.isSingleItem?document.querySelector(this._options.badgeContainerSelector):e.querySelector(this._options.badgeContainerSelector),n=!1),null!==i){const e=document.createElement("ul");if(e.classList.add("reactionSummaryList"),n?e.classList.add("likesSummary"):e.classList.add("reactionSummaryListTiny"),Object.entries(t.users).forEach((([t,i])=>{const n=c.get(t);if("reactionTypeID"===t||!n)return;const o=document.createElement("li");o.className="reactCountButton",o.setAttribute("reaction-type-id",t);const r=document.createElement("span");r.className="reactionCount",r.innerHTML=a.shortUnit(~~i),o.appendChild(r),o.innerHTML=n.renderedIcon+o.innerHTML,e.appendChild(o)})),n)this._options.summaryPrepend?i.insertAdjacentElement("afterbegin",e):i.insertAdjacentElement("beforeend",e);else if("OL"===i.nodeName||"UL"===i.nodeName){const t=document.createElement("li");t.appendChild(e),i.appendChild(t)}else i.appendChild(e);t.badge=e}if(this._options.canLike&&(l.default.userId!=~~e.dataset.userId||this._options.canLikeOwnContent)){let i=null;this._options.buttonAppendToSelector&&(i=this._options.isSingleItem?document.querySelector(this._options.buttonAppendToSelector):e.querySelector(this._options.buttonAppendToSelector));let n=null;if(this._options.buttonBeforeSelector&&(n=this._options.isSingleItem?document.querySelector(this._options.buttonBeforeSelector):e.querySelector(this._options.buttonBeforeSelector)),null===n&&null===i)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,n,i)}}_createButton(e,t,i,n){const o=r.get("wcf.reactions.react"),a=document.createElement("li");a.className="wcfReactButton";const s=document.createElement("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=o;const l=document.createElement("fa-icon");l.setIcon("smile"),void 0===t||0==t?l.dataset.reactionTypeId="0":(s.dataset.reactionTypeId=t.toString(),s.classList.add("active")),s.appendChild(l);const c=document.createElement("span");return c.className="invisible",c.innerHTML=o,s.appendChild(document.createTextNode(" ")),s.appendChild(c),a.appendChild(s),i?i.insertAdjacentElement("beforebegin",a):n.insertAdjacentElement("beforeend",a),s}}})),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["require","exports","tslib","WoltLabSuite/Core/Component/Ckeditor/Event","../../Ajax","../../Component/Ckeditor","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../Language","../Dropdown/Reusable","../Notification","../Screen","../Scroll"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h){"use strict";return o=i.__importStar(o),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),p=i.__importStar(p),m=i.__importStar(m),h=i.__importStar(h),class{_activeDropdownElement;_activeElement;_dropdownMenu;_elements;_options;constructor(e){this.init(e)}init(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new WeakMap,this._options=a.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.default.add(`Ui/Message/InlineEdit_${this._options.className}`,(()=>this.rebuild()))}rebuild(){document.querySelectorAll(this._options.messageSelector).forEach((e=>{if(this._elements.has(e))return;const t=e.querySelector(".jsMessageEditButton");if(null!==t){const i=a.stringToBool(e.dataset.canEdit||""),n=a.stringToBool(e.dataset.canEditInline||"");this._options.canEditInline||n?(t.addEventListener("click",(t=>this._clickDropdown(e,t))),t.classList.add("jsDropdownEnabled"),i&&t.addEventListener("dblclick",(t=>this._click(e,t)))):i&&t.addEventListener("click",(t=>this._click(e,t)))}const i=e.querySelector(".messageBody"),n=e.querySelector(".messageFooter"),o=n.querySelector(".messageFooterButtons"),r=e.querySelector(".messageHeader"),s=i.querySelector(".messageText");this._elements.set(e,{button:t,messageBody:i,messageBodyEditor:null,messageFooter:n,messageFooterButtons:o,messageHeader:r,messageText:s})}))}_click(e,t){null===e&&(e=this._activeDropdownElement),t&&t.preventDefault(),null===this._activeElement?(this._activeElement=e,this._prepare(),o.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(e)}})):this._activeElement!==e&&p.show("wcf.message.error.editorAlreadyInUse",void 0,"warning")}_clickDropdown(e,t){t.preventDefault();const i=t.currentTarget;if(!i.classList.contains("dropdownToggle")){if(i.classList.add("dropdownToggle"),i.parentElement.classList.add("dropdown"),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this._activeDropdownElement=e;let n=i;if(m.is("screen-sm-down")&&0===i.clientWidth){const e=i.closest(this._options.messageSelector);n=this._elements.get(e).messageHeader.querySelector(".messageQuickOptions")}u.toggleDropdown(this._options.dropdownIdentifier,n)})),null===this._dropdownMenu){this._dropdownMenu=document.createElement("ul"),this._dropdownMenu.className="dropdownMenu";const e=this._dropdownGetItems();c.fire("com.woltlab.wcf.inlineEditor",`dropdownInit_${this._options.dropdownIdentifier}`,{items:e}),this._dropdownBuild(e),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,((e,t)=>this._dropdownToggle(e,t)))}setTimeout((()=>i.click()),10)}}_dropdownBuild(e){e.forEach((e=>{const t=document.createElement("li");if(t.dataset.item=e.item,"divider"===e.item)t.className="dropdownDivider";else{const i=document.createElement("span");i.textContent=d.get(e.label),t.appendChild(i),"editItem"===e.item?t.addEventListener("click",(e=>this._click(null,e))):t.addEventListener("click",(e=>this._clickDropdownItem(e)))}this._dropdownMenu.appendChild(t)}))}_dropdownToggle(e,t){const i=this._elements.get(this._activeDropdownElement),n=i.button.parentElement;if("close"===t)return n.classList.remove("dropdownOpen"),void i.messageFooterButtons.classList.remove("forceVisible");n.classList.add("dropdownOpen"),i.messageFooterButtons.classList.add("forceVisible");const o=new Map(Object.entries(this._dropdownOpen()));c.fire("com.woltlab.wcf.inlineEditor",`dropdownOpen_${this._options.dropdownIdentifier}`,{element:this._activeDropdownElement,visibility:o});const r=this._dropdownMenu;let a=!1;const s=Array.from(r.children);s.forEach(((e,t)=>{const i=e.dataset.item;if("divider"===i)a?(l.default.show(e),a=!1):l.default.hide(e);else if(!1===o.get(i)){if(l.default.hide(e),t>0&&t+1===s.length){const t=e.previousElementSibling;"divider"===t.dataset.item&&l.default.hide(t)}}else l.default.show(e),a=!0}))}_dropdownGetItems(){return[]}_dropdownOpen(){return{}}_dropdownSelect(e){}_clickDropdownItem(e){e.preventDefault();const t=e.currentTarget.dataset.item,i={cancel:!1,element:this._activeDropdownElement,item:t};c.fire("com.woltlab.wcf.inlineEditor",`dropdownItemClick_${this._options.dropdownIdentifier}`,i),i.cancel?e.preventDefault():this._dropdownSelect(t)}_prepare(){const e=this._elements.get(this._activeElement),t=document.createElement("div");t.className="messageBody editor",e.messageBodyEditor=t;const i=document.createElement("fa-icon");i.size=48,i.setIcon("spinner"),t.appendChild(i),e.messageBody.insertAdjacentElement("afterend",t),l.default.hide(e.messageBody),h.element(this._activeElement,void 0,"instant")}_showEditor(e){const t=this._getEditorId(),i=this._activeElement,n=this._elements.get(i);i.classList.add("jsInvalidQuoteTarget");const o=i.parentElement;o.classList.contains("anchorFixedHeader")&&o.classList.add("disableAnchorFixedHeader"),n.messageBodyEditor.querySelector("fa-icon").remove();const r=n.messageBodyEditor,a=document.createElement("div");a.className="editorContainer",l.default.setInnerHtml(a,e.returnValues.template),r.appendChild(a);const s=a.querySelector(".formSubmit");s.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save())),s.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),c.add("com.woltlab.wcf.ckeditor5",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()})),l.default.hide(n.messageHeader),l.default.hide(n.messageFooter),window.setTimeout((()=>{this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(i,void 0,"instant")}),250)}_restoreMessage(){const e=this._activeElement,t=this._elements.get(e);this._destroyEditor(),t.messageBodyEditor.remove(),t.messageBodyEditor=null,l.default.show(t.messageBody),l.default.show(t.messageFooter),l.default.show(t.messageHeader),e.classList.remove("jsInvalidQuoteTarget");const i=e.parentElement;i.classList.contains("anchorFixedHeader")&&i.classList.remove("disableAnchorFixedHeader"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()}_save(){const e=this._getEditorId(),t=(0,r.getCkeditorById)(e),i={containerID:this._options.containerId,data:{message:t.getHtml()},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},a=document.getElementById(`settings_${e}`);a&&a.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(i,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);i[t]=e.value.trim()}));let s=this._validate(i);s instanceof Promise||(s=!1===s?Promise.reject():Promise.resolve()),s.then((()=>{(0,n.dispatchToCkeditor)(t.sourceElement).collectMetaData({metaData:i}),o.api(this,{actionName:"save",parameters:i}),this._hideEditor()}),(e=>{const t=e.message;console.log(`Validation of post edit failed: ${t}`)}))}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t={api:this,parameters:e,valid:!0,promises:[]};return c.fire("com.woltlab.wcf.ckeditor5",`validate_${this._getEditorId()}`,t),t.valid?t.promises.push(Promise.resolve()):t.promises.push(Promise.reject()),Promise.all(t.promises)}throwError(e,t){l.default.innerError(e,t)}_showMessage(e){const t=this._activeElement,i=this._elements.get(t);if(l.default.setInnerHtml(i.messageBody.querySelector(".messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){i.messageFooter.querySelectorAll(".attachmentThumbnailList, .attachmentFileList").forEach((e=>e.remove()));const t=document.createElement("div");let n;for(l.default.setInnerHtml(t,e.returnValues.attachmentList);t.childNodes.length;)n=t.childNodes[t.childNodes.length-1],i.messageFooter.insertBefore(n,i.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){const t=i.messageBody.querySelector(".pollContainer");if(null!==t&&t.parentElement.remove(),""!==e.returnValues.poll){const t=document.createElement("div");t.className="jsInlineEditorHideContent",l.default.setInnerHtml(t,e.returnValues.poll),i.messageBody.insertAdjacentElement("afterbegin",t)}}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),p.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())}_hideEditor(){const e=this._elements.get(this._activeElement),t=e.messageBodyEditor.querySelector(".editorContainer");l.default.hide(t);const i=document.createElement("fa-icon");i.size=48,i.setIcon("spinner"),e.messageBodyEditor.appendChild(i)}_restoreEditor(){const e=this._elements.get(this._activeElement).messageBodyEditor;e.querySelector('fa-icon[name="spinner"]').remove();const t=e.querySelector(".editorContainer");null!==t&&l.default.show(t)}_destroyEditor(){const e=(0,r.getCkeditorById)(this._getEditorId(),!1);e?.destroy().then((()=>{e.discardDraft()}))}_getHash(e){return`#message${e}`}_updateHistory(e){window.location.hash=e}_getEditorId(){return this._options.editorPrefix+this._getObjectId(this._activeElement).toString()}_getObjectId(e){return e.dataset.objectId||""}_ajaxFailure(e){const t=this._elements.get(this._activeElement).messageBodyEditor.querySelector(".ck.ck-editor");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(l.default.innerError(t,e.returnValues.realErrorMessage),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}}legacyEdit(e){this._click(document.getElementById(e),null)}}})),define("WoltLabSuite/Core/Ui/Message/Manager",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil"],(function(e,t,i,n,o,r,a,s){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s),class{_elements=new Map;_options;constructor(e){this._options=o.extend({className:"",selector:""},e),this.rebuild(),r.default.add(`Ui/Message/Manager${this._options.className}`,this.rebuild.bind(this))}rebuild(){this._elements.clear(),document.querySelectorAll(this._options.selector).forEach((e=>{this._elements.set(e.dataset.objectId,e)}))}getPermission(e,t){t="can"+s.ucfirst(t);const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);return o.stringToBool(i.dataset[s.toCamelCase(t)]||"")}getPropertyValue(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const r=n.dataset[s.toCamelCase(t)]||"";return i?o.stringToBool(r):r}update(e,t,i){n.api(this,{actionName:t,parameters:i||{},objectIDs:[e]})}updateItems(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{const i=this._elements.get(e);void 0!==i&&Object.entries(t).forEach((([e,t])=>{this._update(i,e,t)}))}))}updateAllItems(e){const t=Array.from(this._elements.keys());this.updateItems(t,e)}setNote(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const o=n.querySelector(".messageFooterNotes");let r=o.querySelector(`.${t}`);i?(null===r&&(r=document.createElement("p"),r.className="messageFooterNote "+t,o.appendChild(r)),r.innerHTML=i):null!==r&&r.remove()}_update(e,t,i){e.dataset[t]=i.toString();const n=1==i||!0===i||"true"===i;this._updateState(e,t,i,n)}_updateState(e,t,i,n){switch(t){case"isDeleted":n?e.classList.add("messageDeleted"):e.classList.remove("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",n);break;case"isDisabled":n?e.classList.add("messageDisabled"):e.classList.remove("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",n)}}_toggleMessageStatus(e,t,i,n,o){let r=e.querySelector(".messageStatus");if(null===r){const t=e.querySelector(".messageHeaderMetaData");if(null===t)return;r=document.createElement("ul"),r.className="messageStatus",t.insertAdjacentElement("afterend",r)}let s=r.querySelector(`.${t}`);if(o){if(null!==s)return;s=document.createElement("span"),s.className=`badge label ${n} ${t}`,s.textContent=a.get(i);const e=document.createElement("li");e.appendChild(s),r.appendChild(e)}else{if(null===s)return;s.parentElement.remove()}}_getAttributeName(e){return-1!==e.indexOf("-")?e:e.split(/([A-Z][a-z]+)/).map((e=>e.trim().toLowerCase())).filter((e=>e.length>0)).join("-")}_ajaxSuccess(e){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")}_ajaxSetup(){return{data:{className:this._options.className}}}}})),define("WoltLabSuite/Core/Ui/Message/Quote",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiMessageQuote=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l);class c{activeMessageId="";className;containers=new Map;containerSelector="";copyQuote=document.createElement("div");message="";messageBodySelector;objectId=0;objectType="";timerSelectionChange=void 0;isMouseDown=!1;quoteManager;constructor(e,t,i,n,o,r,a){this.className=t,this.objectType=i,this.containerSelector=n,this.messageBodySelector=o,this.initContainers(),a=a&&e.supportPaste(),this.quoteManager=e,this.initCopyQuote(a),document.addEventListener("mouseup",(e=>this.onMouseUp(e))),document.addEventListener("selectionchange",(()=>this.onSelectionchange())),s.default.add("UiMessageQuote",(()=>this.initContainers())),document.addEventListener("touchstart",(e=>{const t=e.target;t===this.copyQuote||this.copyQuote.contains(t)||(this.copyQuote.classList.add("touchForceInaccessible"),document.addEventListener("touchend",(()=>{this.copyQuote.classList.remove("touchForceInaccessible")}),{once:!0,passive:!1}))}),{passive:!1})}initContainers(){document.querySelectorAll(this.containerSelector).forEach((e=>{const t=l.default.identify(e);this.containers.has(t)||(this.containers.set(t,e),e.classList.contains("jsInvalidQuoteTarget")||(e.addEventListener("mousedown",(e=>this.onMouseDown(e))),e.classList.add("jsQuoteMessageContainer"),e.querySelector(".jsQuoteMessage")?.addEventListener("click",(e=>this.saveFullQuote(e)))))}))}onSelectionchange(){if(!this.isMouseDown){if(""===this.activeMessageId){const e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return;const t=e.getRangeAt(0),i=l.default.closest(t.startContainer,".jsQuoteMessageContainer"),n=l.default.closest(t.endContainer,".jsQuoteMessageContainer");if(i&&i===n&&!i.classList.contains("jsInvalidQuoteTarget")){let e=t.commonAncestorContainer;e.nodeType!==Node.ELEMENT_NODE&&(e=e.parentElement);const n=e.offsetParent;if(i.contains(n)&&n.scrollTop+n.clientHeight<e.offsetTop)return;this.activeMessageId=i.id}}this.timerSelectionChange&&window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=window.setTimeout((()=>this.onMouseUp()),100)}}onMouseDown(e){this.copyQuote.classList.remove("active");const t=e.currentTarget;this.activeMessageId=t.classList.contains("jsInvalidQuoteTarget")?"":t.id,this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!0}getNodeText(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>"BLOCKQUOTE"===e.nodeName||"SCRIPT"===e.nodeName?NodeFilter.FILTER_REJECT:!(e instanceof HTMLImageElement)||e.classList.contains("smiley")&&e.alt?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i="";const n=[];for(;t.nextNode();){const e=t.currentNode;if(e instanceof Text){const t=e.parentElement;if(t instanceof HTMLAnchorElement&&n.includes(t))continue;i+=e.nodeValue.replace(/\n/g," ")}else{if(e instanceof HTMLAnchorElement){const t=e.textContent;if(t.indexOf("…")>0){const o=t.split(/\u2026/);if(2===o.length){const t=e.href;0===t.indexOf(o[0])&&t.substr(-1*o[1].length)===o[1]&&(i+=t,n.push(e))}}}switch(e.nodeName){case"BR":case"LI":case"TD":case"UL":i+="\n";break;case"P":i+="\n\n";break;case"IMG":i+=` ${e.alt} `;break;case"DIV":(e.classList.contains("codeBoxHeadline")||e.classList.contains("codeBoxLine"))&&(i+="\n")}}}return i}onMouseUp(e){if(e instanceof Event&&(this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!1),""===this.activeMessageId)return void this.copyQuote.classList.remove("active");const t=window.getSelection();if(1!==t.rangeCount||t.isCollapsed)return void this.copyQuote.classList.remove("active");const i=this.containers.get(this.activeMessageId);if(void 0===i)return;const n=~~i.dataset.objectId,o=this.messageBodySelector?i.querySelector(this.messageBodySelector):i;let r=t.anchorNode;for(;r&&r!==o;)r=r.parentNode;if(r!==o)return void this.copyQuote.classList.remove("active");const a=this.getSelectedText().trim();if(""===a)return void this.copyQuote.classList.remove("active");const s=t.getRangeAt(0),c=l.default.getClosestElement(s.startContainer),d=l.default.getClosestElement(s.endContainer);if(c.closest("blockquote")||d.closest("blockquote"))return void this.copyQuote.classList.remove("active");const u=this.getNodeText(o);if(!this.normalizeTextForComparison(u).includes(this.normalizeTextForComparison(a)))return;this.copyQuote.classList.add("active");const p=this.copyQuote.classList.contains("touchForceInaccessible");p&&this.copyQuote.classList.remove("touchForceInaccessible");const m=this.getElementBoundaries(t),h=(this.copyQuote.offsetHeight,this.copyQuote.offsetWidth);let f=(m.right-m.left)/2-h/2+m.left;const g=o.getBoundingClientRect();f<g.left?f=g.left:f+h>g.right&&(f=g.right-h),this.copyQuote.style.setProperty("top",`${m.bottom+7}px`),this.copyQuote.style.setProperty("left",`${f}px`),this.copyQuote.classList.remove("active"),p&&this.copyQuote.classList.add("touchForceInaccessible"),this.timerSelectionChange?(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0):this.activeMessageId="",window.setTimeout((()=>{const e=this.getSelectedText().trim();""!==e&&(this.copyQuote.classList.add("active"),this.message=e,this.objectId=n)}),10)}normalizeTextForComparison(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")}getElementBoundaries(e){let t=null;if(e.rangeCount>0){const i=e.getRangeAt(0).getBoundingClientRect(),n=window.pageYOffset;t={bottom:i.bottom+n,left:i.left,right:i.right,top:i.top+n}}return t}initCopyQuote(e){this.copyQuote.classList.add("balloonTooltip","interactive","quoteManagerCopy");const t=document.createElement("span");if(t.classList.add("jsQuoteManagerStore"),t.textContent=a.get("wcf.message.quote.quoteSelected"),t.addEventListener("click",(e=>this.saveQuote(e))),this.copyQuote.appendChild(t),e){const e=document.createElement("span");e.classList.add("jsQuoteManagerQuoteAndInsert"),e.textContent=a.get("wcf.message.quote.quoteAndReply"),e.addEventListener("click",(e=>this.saveAndInsertQuote(e))),this.copyQuote.appendChild(e)}document.body.appendChild(this.copyQuote)}getSelectedText(){const e=window.getSelection();return e.rangeCount?this.getNodeText(e.getRangeAt(0).cloneContents()):""}saveFullQuote(e){e.preventDefault();const t=e.currentTarget;n.api(this,{actionName:"saveFullQuote",objectIDs:[t.dataset.objectId]});const i=t.querySelector("a");o.stringToBool(t.dataset.isQuoted||"")?(t.dataset.isQuoted="false",i.classList.remove("active")):(t.dataset.isQuoted="true",i.classList.add("active"));const r=t.closest(".buttonGroupNavigation");r&&r.classList.contains("jsMobileButtonGroupNavigation")&&r.querySelector(".dropdownLabel").click()}saveQuote(e,t=!1){e?.preventDefault(),n.api(this,{actionName:"saveQuote",objectIDs:[this.objectId],parameters:{message:this.message,renderQuote:t}});const i=window.getSelection();i.rangeCount&&(i.removeAllRanges(),this.copyQuote.classList.remove("active"))}saveAndInsertQuote(e){e.preventDefault(),this.saveQuote(void 0,!0)}_ajaxSuccess(e){if(void 0!==e.returnValues.count){void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs);const t=e.returnValues.fullQuoteObjectIDs||{};this.quoteManager.updateCount(e.returnValues.count,t)}switch(e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&r.fire("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName,quote:e.returnValues.renderedQuote})}}_ajaxSetup(){return{data:{className:this.className,interfaceName:"wcf\\data\\IMessageQuoteAction"}}}updateFullQuoteObjectIDs(e){this.containers.forEach((t=>{const i=t.querySelector(".jsQuoteMessage");i.dataset.isQuoted="false";const n=i.querySelector("a");i.classList.remove("active");const o=~~i.dataset.objectID;e.includes(o)&&(i.dataset.isQuoted="true",n.classList.add("active"))}))}}t.UiMessageQuote=c,t.default=c})),define("WoltLabSuite/Core/Ui/Message/Reply",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util","../Dialog","../Notification","../../User","../../Controller/Captcha","../Scroll","../../Component/Ckeditor","WoltLabSuite/Core/Component/Ckeditor/Event"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importDefault(c),d=i.__importStar(d),u=i.__importDefault(u),p=i.__importDefault(p),m=i.__importStar(m),class{_container;_content;_ckeditor;_guestDialogId="";_loadingOverlay=null;_options;_textarea;constructor(e){this._options=o.extend({ajax:{className:""},quoteManager:null,successMessage:"wcf.global.success.add"},e),this._container=document.getElementById("messageQuickReply"),this._content=this._container.querySelector(".messageContent"),this._textarea=document.getElementById("text"),this._container.querySelector(".message").classList.add("jsInvalidQuoteTarget"),this._container.querySelector('button[data-type="save"]').addEventListener("click",(e=>this._submit(e))),document.querySelectorAll(".jsQuickReply").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),m.element(this._container,(()=>{this._getCKEditor().focus()}))}))}))}_submitGuestDialog(e){if(e instanceof KeyboardEvent&&"Enter"!==e.key)return;const t=e.currentTarget,i=t.closest(".dialogContent").querySelector("input[name=username]");if(""===i.value)return l.default.innerError(i,a.get("wcf.global.form.error.empty")),void i.closest("dl").classList.add("formError");let n={parameters:{data:{username:i.value}}};const r=t.dataset.captchaId;if(p.default.has(r)){const e=p.default.getData(r);p.default.delete(r),e instanceof Promise?e.then((e=>{n=o.extend(n,e),this._submit(void 0,n)})):(n=o.extend(n,e),this._submit(void 0,n))}else this._submit(void 0,n)}_submit(e,t){if(e&&e.preventDefault(),this._content.classList.contains("loading")&&(!this._guestDialogId||!c.default.isOpen(this._guestDialogId)))return;if(!this._validate())return;this._showLoadingOverlay();const i={};Object.entries(this._container.dataset).forEach((([e,t])=>{i[e.replace(/Id$/,"ID")]=t})),i.data={message:this._getCKEditor().getHtml()},i.removeQuoteIDs=this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[];const r=document.getElementById("settings_text");r&&r.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(i,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);i[t]=e.value.trim()})),(0,f.dispatchToCkeditor)(this._textarea).collectMetaData({metaData:i.data}),u.default.userId||t||(i.requireGuestDialog=!0),n.api(this,o.extend({parameters:i},t))}_validate(){this._container.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this._getCKEditor().getHtml();if(""===e)return this.throwError(this._getCKEditor().element,a.get("wcf.global.form.error.empty")),!1;const t={api:this,editor:this._getCKEditor(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}throwError(e,t){l.default.innerError(e,"empty"===t?a.get("wcf.global.form.error.empty"):t)}_showLoadingOverlay(){null===this._loadingOverlay&&(this._loadingOverlay=document.createElement("div"),this._loadingOverlay.className="messageContentLoadingOverlay",this._loadingOverlay.innerHTML='<fa-icon size="96" name="spinner" solid></fa-icon>'),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)}_hideLoadingOverlay(){this._content.classList.remove("loading");const e=this._content.querySelector(".messageContentLoadingOverlay");null!==e&&e.remove()}_reset(){this._getCKEditor().reset()}_handleError(e){const t={api:this,cancel:!1,returnValues:e.returnValues};r.fire("com.woltlab.wcf.ckeditor5","handleError_text",t),t.cancel||this.throwError(this._getCKEditor().element,e.returnValues.realErrorMessage)}_getCKEditor(){if(void 0===this._ckeditor&&(this._ckeditor=(0,h.getCkeditor)(this._textarea),void 0===this._ckeditor))throw new Error(`Unable to find the CKEditor instance for '${this._textarea.id}'.`);return this._ckeditor}_insertMessage(e){if(this._getCKEditor().discardDraft(),e.returnValues.url)window.location.href==e.returnValues.url&&window.location.reload(),window.location.href=e.returnValues.url;else{if(e.returnValues.template){let t;if("DESC"===this._container.dataset.sortOrder)l.default.insertHtml(e.returnValues.template,this._container,"after"),t=l.default.identify(this._container.nextElementSibling);else{let i=this._container;i.previousElementSibling&&i.previousElementSibling.classList.contains("messageListPagination")&&(i=i.previousElementSibling),l.default.insertHtml(e.returnValues.template,i,"before"),t=l.default.identify(i.previousElementSibling)}this._container.dataset.lastPostTime=e.returnValues.lastPostTime.toString(),window.history.replaceState(void 0,"",`#${t}`),m.element(document.getElementById(t))}d.show(a.get(this._options.successMessage)),this._options.quoteManager&&this._options.quoteManager.countQuotes(),s.default.trigger()}}_ajaxSuccess(e){if(!u.default.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.default.userId&&e.returnValues.guestDialog){const t=e.returnValues.guestDialogID;c.default.openStatic(t,e.returnValues.guestDialog,{closable:!1,onClose:function(){p.default.has(t)&&p.default.delete(t)},title:a.get("wcf.global.confirmation.title")});const i=c.default.getDialog(t);i.content.querySelector("input[type=submit]").addEventListener("click",(e=>this._submitGuestDialog(e))),i.content.querySelector("input[type=text]").addEventListener("keypress",(e=>this._submitGuestDialog(e))),this._guestDialogId=t}else this._insertMessage(e),u.default.userId||c.default.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay()}_ajaxFailure(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(this._handleError(e),!1)}_ajaxSetup(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"},silent:!0}}}})),define("WoltLabSuite/Core/Ui/Message/Share",["require","exports","tslib","../../Event/Handler","../../StringUtil"],(function(e,t,i,n,o){"use strict";function r(e,t,i,n){n||(n=s),window.open(t.replace("{pageURL}",n).replace("{text}",a+(i?`%20${n}`:"")),e,"height=600,width=600")}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let a="",s="";t.init=function(){const e=document.querySelector('meta[property="og:title"]');null!==e&&(a=encodeURIComponent(e.content));const t=document.querySelector('meta[property="og:url"]');null!==t&&(s=encodeURIComponent(t.content)),document.querySelectorAll(".jsMessageShareButtons").forEach((e=>{e.classList.remove("jsMessageShareButtons");let t=encodeURIComponent(o.unescapeHTML(e.dataset.url||""));t||(t=s);const i={facebook:{link:e.querySelector('.messageShareProvider[data-identifier="Facebook"]'),share(e){e.preventDefault(),r("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{link:e.querySelector('.messageShareProvider[data-identifier="Reddit"]'),share(e){e.preventDefault(),r("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{link:e.querySelector('.messageShareProvider[data-identifier="Twitter"]'),share(e){e.preventDefault(),r("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{link:e.querySelector('.messageShareProvider[data-identifier="LinkedIn"]'),share(e){e.preventDefault(),r("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{link:e.querySelector('.messageShareProvider[data-identifier="Pinterest"]'),share(e){e.preventDefault(),r("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{link:e.querySelector('.messageShareProvider[data-identifier="XING"]'),share(e){e.preventDefault(),r("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{link:e.querySelector('.messageShareProvider[data-identifier="WhatsApp"]'),share(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+a+"%20"+s}}};n.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:i,pageDescription:a,pageUrl:s}),Object.values(i).forEach((e=>{null!==e.link&&e.link.addEventListener("click",(t=>e.share(t)))}))}))}})),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["require","exports","https://platform.twitter.com/widgets.js"],(function(e,t){"use strict";async function i(e,t,i=!1){const o=await n,r="dark"===document.documentElement.dataset.colorScheme?"dark":"light",a=await o.widgets.createTweet(t,e,{dnt:!0,lang:document.documentElement.lang,theme:r});if(a&&i){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.embedAll=t.embedTweet=void 0;const n=new Promise((e=>{twttr.ready(e)}));t.embedTweet=i,t.embedAll=function(){document.querySelectorAll("[data-wsc-twitter-tweet]").forEach((e=>{const t=e.dataset.wscTwitterTweet;t&&(delete e.dataset.wscTwitterTweet,i(e,t,!0))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAllAsRead",["require","exports","tslib","../../Ajax","../Notification"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=i.__importStar(o),t.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),async function(){await(0,n.dboAction)("markAllAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").dispatch(),document.querySelectorAll(".moderationQueueEntryList .new").forEach((e=>{e.classList.remove("new")})),document.querySelector("#outstandingModeration .badgeUpdate")?.remove(),o.show()}()}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAsRead",["require","exports","../../Ajax"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const n=new WeakSet;t.setup=function(){document.querySelectorAll(".moderationQueueEntryList .new .columnAvatar").forEach((e=>{n.has(e)||(n.add(e),e.addEventListener("dblclick",(t=>{t.preventDefault();const n=e.closest(".moderationQueueEntry");n.classList.contains("new")&&async function(e){const t=parseInt(e.dataset.queueId,10);await(0,i.dboAction)("markAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").objectIds([t]).dispatch(),e.classList.remove("new"),e.querySelector(".columnAvatar p")?.removeAttribute("title")}(n)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/Report",["require","exports","tslib","../../Ajax","../../Component/Dialog","../../Dom/Util","../../Helper/Selector","../../Language","../Notification"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e){(function(e){return""===e.dataset.reportContent?(console.error("Missing the value for [data-report-content]",e),!1):!!parseInt(e.dataset.objectId||"")||(console.error("Expected a valid integer for [data-object-id]",e),!1)})(e)&&e.addEventListener("click",(t=>{"A"!==e.tagName&&"true"!==e.dataset.isLegacyButton||t.preventDefault(),async function(e){const t=parseInt(e.dataset.objectId||""),i=e.dataset.reportContent,a=await(0,n.dboAction)("prepareReport","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({objectID:t,objectType:i}).dispatch();let c;a.alreadyReported?c=(0,o.dialogFactory)().fromHtml(a.template).asAlert():(c=(0,o.dialogFactory)().fromHtml(a.template).asPrompt(),c.addEventListener("validate",(e=>{(function(e){const t=e.content.querySelector(".jsReportMessage"),i=t.closest("dl");return""===t.value.trim()?(i.classList.add("formError"),(0,r.innerError)(t,s.get("wcf.global.form.error.empty")),!1):(i.classList.remove("formError"),(0,r.innerError)(t,!1),!0)})(c)||e.preventDefault()})),c.addEventListener("primary",(()=>{!async function(e,t,i){const o=e.content.querySelector(".jsReportMessage").value.trim();await(0,n.dboAction)("report","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({message:o,objectID:i,objectType:t}).dispatch(),l.show()}(c,i,t)}))),c.show(s.get("wcf.moderation.report.reportContent"))}(e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.registerLegacyButton=void 0,s=i.__importStar(s),l=i.__importStar(l),t.registerLegacyButton=function(e,t){e.dataset.reportContent=t,e.dataset.isLegacyButton="true",c(e)},t.setup=function(){(0,a.wheneverFirstSeen)("[data-report-content]",(e=>c(e)))}})),define("WoltLabSuite/Core/Ui/Pagination/JumpToPage",["require","exports","../../Component/Dialog","../../Helper/Selector","../../Language"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,n.wheneverFirstSeen)("woltlab-core-pagination",(e=>{e.addEventListener("jumpToPage",(()=>{!function(e){const t=`\n    <dl>\n      <dt></dt>\n      <dd>\n        <input\n          class="tiny"\n          type="number"\n          min="1"\n          max="${e.count}"\n          value="${e.count}"\n          aria-label="${(0,o.getPhrase)("wcf.page.jumpTo.pageNo")}"\n          required\n        >\n        <small>${(0,o.getPhrase)("wcf.page.jumpTo.description",{pages:e.count})}</small>\n      </dd>\n    </dl>\n  `,n=(0,i.dialogFactory)().fromHtml(t).asPrompt(),r=n.content.querySelector('input[type="number"]');n.addEventListener("primary",(()=>{e.jumpToPage(parseInt(r.value))})),n.show((0,o.getPhrase)("wcf.page.jumpTo")),r.select()}(e)}))}))}})),define("WoltLabSuite/Core/Ui/Poll/View/Participants",["require","exports","../../../Component/User/List"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Participants=void 0;class n{pollManager;button;userList=void 0;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showPollParticipantsButton");if(!t)throw new Error(`Could not find button with selector "showPollParticipantsButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(e=>{e&&e.preventDefault(),this.open()}))}open(){this.userList||(this.userList=new i.UserList({className:"wcf\\data\\poll\\PollAction",parameters:{pollID:this.pollManager.pollId}},this.pollManager.question)),this.userList.open()}showButton(){this.button.hidden=!1}hideButton(){this.button.hidden=!0}}t.Participants=n,t.default=n})),define("WoltLabSuite/Core/Ui/Poll/View/Results",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Results=void 0,n=i.__importStar(n);class r{pollManager;button;constructor(e,t){this.pollManager=e,this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.results)?this.pollManager.displayView(o.PollViews.results):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=n.dboAction("getResultTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.results,t.template),this.pollManager.displayView(o.PollViews.results)}checkVisibility(e){e===o.PollViews.results?this.button.hidden=!0:this.button.hidden=!1}}t.Results=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/View/Vote",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,n=i.__importStar(n);class r{pollManager;button;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showVoteFormButton");if(!t)throw new Error(`Could not find button with selector ".showVoteFormButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.vote)?this.pollManager.displayView(o.PollViews.vote):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=n.dboAction("getVoteTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.vote,t.template),this.pollManager.displayView(o.PollViews.vote)}checkVisibility(e){e!==o.PollViews.vote&&this.pollManager.canVote?this.button.hidden=!1:this.button.hidden=!0}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Vote",["require","exports","tslib","./Poll","../../Ajax"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,o=i.__importStar(o);class r{pollManager;button;inputs;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".votePollButton");if(!t)throw new Error(`Could not find vote button for poll "${this.pollManager.pollId}".`);this.button=t,this.button.addEventListener("click",(()=>this.submit())),this.initSelects()}initSelects(){if(this.pollManager.hasView(n.PollViews.vote)){const e=this.pollManager.getView(n.PollViews.vote);this.inputs=Array.from(e.querySelectorAll("input")),this.inputs.forEach((e=>{e.addEventListener("change",(()=>this.checkInputs()))})),this.checkInputs()}}checkInputs(){let e=0;this.inputs.forEach((t=>{t.checked&&e++,this.pollManager.maxVotes>1&&(t.disabled=!1)})),0===e?this.button.disabled=!0:(e>=this.pollManager.maxVotes&&this.pollManager.maxVotes>1&&this.inputs.forEach((e=>{e.checked||(e.disabled=!0)})),this.button.disabled=!1)}getSelectedOptions(){return this.inputs.filter((e=>e.checked)).map((e=>parseInt(e.value,10)))}async submit(){this.button.disabled=!0;const e=this.getSelectedOptions(),t=o.dboAction("vote","wcf\\data\\poll\\PollAction");t.objectIds([this.pollManager.pollId]),t.payload({optionIDs:e});const i=await t.dispatch();this.pollManager.canVote=!!i.changeableVote,this.pollManager.canViewResults=!0,this.pollManager.addView(n.PollViews.results,i.template),this.pollManager.displayView(n.PollViews.results),this.pollManager.changeTotalVotes(i.totalVotes,i.totalVotesTooltip),this.button.disabled=!1}checkVisibility(e){this.button.hidden=e!==n.PollViews.vote}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Poll",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../StringUtil","./View/Participants","./View/Results","./View/Vote","./Vote"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";function d(){document.querySelectorAll(".pollContainer").forEach((e=>{if(!e.dataset.pollId)throw new Error("Invalid poll element given. Missing pollID.");if(h.has(e))return;const t=parseInt(e.dataset.pollId,10);new m(t),h.add(e)}))}function u(){n.default.add("WoltLabSuite/Core/Ui/Poll/Manager/Poll",(()=>{d()})),d()}var p;Object.defineProperty(t,"__esModule",{value:!0}),t.setupAll=t.Poll=t.PollViews=void 0,n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importDefault(a),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importDefault(c),function(e){e.vote="vote",e.results="results"}(p||(t.PollViews=p={}));class m{pollId;element;voteView=void 0;resultsView=void 0;participants=void 0;voteHandler=void 0;views=new Map;constructor(e){const t=document.getElementById(`poll${e}`);if(null===t)throw new Error(`Could not find poll with id "${e}".`);this.element=t,this.pollId=e,this.getInnerContainer().querySelectorAll("div").forEach((e=>{e.dataset.key&&this.views.set(e.dataset.key,e)}));const i=this.element.querySelector(".showResultsButton");this.canViewResults&&null!==i&&(this.resultsView=new s.default(this,i)),this.canVote&&(this.voteView=new l.default(this),this.voteHandler=new c.default(this)),this.canViewParticipants()&&(this.participants=new a.default(this))}getElement(){return this.element}hasView(e){return this.views.has(e)}getView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);return this.views.get(e)}displayView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);this.views.forEach((e=>{e.hidden=!0})),this.views.get(e).hidden=!1,this.voteView?.checkVisibility(e),this.resultsView?.checkVisibility(e),this.voteHandler?.checkVisibility(e),this.canViewParticipants()&&(e===p.results?(this.participants||(this.participants=new a.default(this)),this.participants.showButton()):this.participants?.hideButton())}addView(e,t){const i=document.createElement("div");i.dataset.key=e,i.hidden=!0,o.default.setInnerHtml(i,t),this.getInnerContainer().append(i),this.views.has(e)&&this.views.get(e).remove(),this.views.set(e,i),e===p.vote&&this.voteHandler.initSelects()}canViewParticipants(){return this.canViewResults&&this.isPublic}getInnerContainer(){const e=this.element.querySelector(".pollInnerContainer");if(!e)throw new Error(`Could not find inner container for poll "${this.pollId}"`);return e}changeTotalVotes(e,t){const i=this.getElement().querySelector(".pollTotalVotesBadge");if(!i)throw new Error("Could not find total votes badge.");i.textContent=(0,r.formatNumeric)(e),i.dataset.tooltip=t}get isPublic(){return"true"===this.element.dataset.isPublic}get maxVotes(){return parseInt(this.element.dataset.maxVotes,10)}get question(){return this.element.dataset.question}get canVote(){return"true"===this.element.dataset.canVote}set canVote(e){this.element.dataset.canVote=e?"true":"false"}get canViewResults(){return"true"===this.element.dataset.canViewResult}set canViewResults(e){this.element.dataset.canViewResult=e?"true":"false"}}t.Poll=m;const h=new WeakSet;t.setupAll=u,t.default=u})),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../StringUtil","../Dialog"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c);const d=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new Map;_currentObjectId=0;_objects=new Map;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=o.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},t),this.initContainers(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/CountButtons-${e}`,(()=>this.initContainers()))}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=a.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,summary:null,objectId:n,element:t};this._containers.set(i,o),this._initReactionCountButtons(t,o);const r=this._objects.get(n)||[];r.push(o),this._objects.set(n,r),e=!0})),e&&r.default.trigger()}updateCountButtons(e,t){let i=!1;this._objects.get(e).forEach((e=>{let n;if(n=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.element.querySelector(this._options.summaryListSelector),null===n)return;const o=new Map(Object.entries(t)),r=new Map;n.querySelectorAll(".reactCountButton").forEach((e=>{const t=e.dataset.reactionTypeId;o.has(t)?r.set(t,e):e.remove()})),o.forEach(((e,t)=>{if(r.has(t))r.get(t).querySelector(".reactionCount").innerHTML=l.shortUnit(e);else if(d.has(t)){const o=document.createElement("span");o.className="reactCountButton",o.innerHTML=d.get(t).renderedIcon,o.dataset.reactionTypeId=t;const r=document.createElement("span");r.className="reactionCount",r.innerHTML=l.shortUnit(e),o.appendChild(r),n.appendChild(o),i=!0}})),n.childElementCount>0?a.default.show(n):a.default.hide(n)})),i&&r.default.trigger()}_initReactionCountButtons(e,t){let i;i=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.querySelector(this._options.summaryListSelector),null!==i&&i.addEventListener("click",(e=>this._showReactionOverlay(t.objectId,e)))}_showReactionOverlay(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()}_showOverlay(){this._options.parameters.data.containerID=`${this._objectType}-${this._currentObjectId}`,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){s.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),c.default.open(this,e.returnValues.template),c.default.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)}_ajaxSetup(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}}_dialogSetup(){return{id:`userReactionOverlay-${this._objectType}`,options:{title:""},source:null}}}})),define("WoltLabSuite/Core/Ui/Reaction/SummaryDetails",["require","exports","../../Ajax","../../Component/Dialog","../../Helper/Selector"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,o.wheneverFirstSeen)("woltlab-core-reaction-summary",(e=>{e.addEventListener("showDetails",(()=>{!async function(e,t){const o=await(0,i.dboAction)("getReactionDetails","wcf\\data\\reaction\\ReactionAction").payload({data:{objectID:e,objectType:t}}).dispatch();(0,n.dialogFactory)().fromHtml(o.template).withoutControls().show(o.title)}(e.objectId,e.objectType)}))}))}})),define("WoltLabSuite/Core/Ui/Search/Page",["require","exports","tslib","../../Core","../../Dom/Util","../Dropdown/Simple","../Screen","./Input"],(function(e,t,i,n,o,r,a,s){"use strict";function l(e){e.preventDefault();const t=e.currentTarget,i=t.dataset.objectType,o=t.dataset.extendedLink;o&&(document.querySelector(".pageHeaderSearchExtendedLink").href=o),d.clear();try{const e=JSON.parse(t.dataset.parameters||"");n.isPlainObject(e)&&Object.keys(e).forEach((t=>{d.set(t,e[t])}))}catch(e){}i&&"everywhere"!==i&&d.set("type",i),document.getElementById("pageHeaderSearchInputContainer").querySelector(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").textContent=t.textContent}function c(e,t){const i=new URL(e.action);i.search+=""!==i.search?"&":"?",i.search+=new URLSearchParams([["q",t.value.trim()],...Array.from(d)]).toString(),window.location.href=i.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importDefault(s);const d=new Map;t.init=function(e){const t=document.getElementById("pageHeaderSearchInput"),i=t.form;new s.default(t,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit(e){if(e.classList.add("dropdownMenuPageSearch"),a.is("screen-lg")){e.dataset.dropdownAlignmentHorizontal="right";const i=t.clientWidth;e.style.setProperty("min-width",`${i}px`,"");const n=t.parentElement,r=o.default.offset(n).left+n.clientWidth-(o.default.offset(t).left+i),a=o.default.styleAsInt(window.getComputedStyle(n),"padding-bottom");e.style.setProperty("transform",`translateX(-${Math.ceil(r)}px) translateY(-${a}px)`,"")}},callbackSelect:()=>(setTimeout((()=>{c(i,t)}),1),!0),suppressErrors:!0});const n=document.querySelector(".pageHeaderSearchType"),d=r.default.getDropdownMenu(o.default.identify(n));d.querySelectorAll("a[data-object-type]").forEach((e=>{e.addEventListener("click",l)})),d.querySelector('a[data-object-type="'+e+'"]').click(),i.addEventListener("submit",(e=>{e.preventDefault(),c(i,t)}))}})),define("WoltLabSuite/Core/Ui/Smiley/Insert",["require","exports","../../Component/Ckeditor"],(function(e,t,i){"use strict";return class{container;editorId;constructor(e){this.editorId=e;let t=document.getElementById("smilies-"+this.editorId);if(!t&&(t=document.getElementById(this.editorId+"SmiliesTabContainer"),!t))throw new Error("Unable to find the message tab menu container containing the smilies.");this.container=t,this.container.addEventListener("keydown",(e=>this.keydown(e))),this.container.addEventListener("mousedown",(e=>this.mousedown(e)))}keydown(e){const t=document.activeElement;if(t.classList.contains("jsSmiley"))if(["ArrowLeft","ArrowRight","End","Home"].includes(e.key)){e.preventDefault();const i=e.currentTarget,n=Array.from(i.querySelectorAll(".jsSmiley"));"ArrowLeft"===e.key&&n.reverse();let o=n.indexOf(t);"Home"===e.key?o=0:"End"===e.key?o=n.length-1:(o+=1,o===n.length&&(o=0)),n[o].focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();const i=t.querySelector("img");this.insert(i)}}mousedown(e){const t=e.target.closest("li");if(t&&this.container.contains(t)){e.preventDefault();const i=t.querySelector("img");i&&this.insert(i)}}insert(e){const t=(0,i.getCkeditorById)(this.editorId);if(void 0===t)throw new Error(`Unable to find the CKEditor instance for '${this.editorId}'.`);const n=document.createElement("img");n.classList.add("smiley"),n.src=e.src,n.alt=e.alt,n.height=e.height,n.width=e.width,e.srcset&&(n.srcset=e.srcset),t.insertHtml(n.outerHTML)}}})),define("WoltLabSuite/Core/Ui/Sortable/List",["require","exports","tslib","../../Core","../Screen"],(function(e,t,i,n,o){"use strict";return n=i.__importStar(n),o=i.__importStar(o),class{_options;constructor(e){this._options=n.extend({containerId:"",className:"",offset:0,options:{},isSimpleSorting:!1,additionalParameters:{}},e),o.on("screen-sm-md",{match:()=>this._enable(!0),unmatch:()=>this._disable(),setup:()=>this._enable(!0)}),o.on("screen-lg",{match:()=>this._enable(!1),unmatch:()=>this._disable(),setup:()=>this._enable(!1)})}_enable(e){const t=this._options.options;e&&(t.handle=".sortableNodeHandle"),new window.WCF.Sortable.List(this._options.containerId,this._options.className,this._options.offset,t,this._options.isSimpleSorting,this._options.additionalParameters)}_disable(){window.jQuery(`#${this._options.containerId} .sortableList`)[this._options.isSimpleSorting?"sortable":"nestedSortable"]("destroy")}}})),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["require","exports","tslib","../../Language","../Dialog","../ItemList/Filter"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r);class a{callback=void 0;iconList=void 0;itemListFilter=void 0;open(e){this.callback=e,o.default.open(this)}click(e){e.preventDefault();const t=e.target.closest("li").querySelector("fa-icon");o.default.close(this),this.callback(t.name,t.solid)}_dialogSetup(){return{id:"fontAwesomeSelection",options:{onSetup:()=>{this.iconList=document.getElementById("fontAwesomeIcons");const e=[];window.getFontAwesome6Metadata().forEach((([,t],i)=>{t&&e.push(`<li><fa-icon size="48" name="${i}" solid></fa-icon><small>${i}</small></li>`),e.push(`<li><fa-icon size="48" name="${i}"></fa-icon><small>${i}</small></li>`)})),this.iconList.innerHTML=e.join(""),this.iconList.addEventListener("click",(e=>this.click(e))),this.itemListFilter=new r.default("fontAwesomeIcons",{callbackPrepareItem:e=>{const t=e.querySelector("small"),i=t.textContent.trim();return{item:e,span:t,text:i}},enableVisibilityFilter:!1,filterPosition:"top"})},onShow:()=>{this.itemListFilter.reset()},title:n.get("wcf.global.fontAwesome.selectIcon")},source:'<ul class="fontAwesomeIcons" id="fontAwesomeIcons"></ul>'}}}let s;t.setup=function(){s||(s=new a)},t.open=function(e){if(!s)throw new Error("Missing icon data, please include the template before calling this method using `{include file='shared_fontAwesomeJavaScript'}`.");s.open(e)}})),define("WoltLabSuite/Core/Ui/Toggle/Input",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";return n=i.__importDefault(n),class{element;hide;show;constructor(e,t){const i=document.querySelector(e);if(null===i)throw new Error("Unable to find element by selector '"+e+"'.");const n="INPUT"===i.nodeName?i.type:"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this.element=i,this.hide=this.getElements("hide",Array.isArray(t.hide)?t.hide:[]),this.show=this.getElements("show",Array.isArray(t.show)?t.show:[]),this.element.addEventListener("change",(e=>this.change(e))),this.updateVisibility(this.show,this.element.checked),this.updateVisibility(this.hide,!this.element.checked)}getElements(e,t){const i=[];return t.forEach((t=>{let n=null;if("string"==typeof t){if(n=document.querySelector(t),null===n)throw new Error(`Unable to find an element with the selector '${t}'.`)}else{if(!(t instanceof HTMLElement))throw new TypeError(`The array '${e}' may only contain string selectors or DOM elements.`);n=t}i.push(n)})),i}change(e){const t=e.currentTarget.checked;this.updateVisibility(this.show,t),this.updateVisibility(this.hide,!t)}updateVisibility(e,t){e.forEach((e=>{n.default[t?"show":"hide"](e)}))}}})),define("WoltLabSuite/Core/Ui/User/List",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dialog","../Pagination"],(function(e,t,i,n,o,r,a,s){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importDefault(s),class{cache=new Map;options;pageCount=0;pageNo=1;constructor(e){this.options=o.extend({className:"",dialogTitle:"",parameters:{}},e)}open(){this.pageNo=1,this.showPage()}showPage(e){if("number"==typeof e&&(this.pageNo=+e),0!==this.pageCount&&(this.pageNo<1||this.pageNo>this.pageCount))throw new RangeError(`pageNo must be between 1 and ${this.pageCount} (${this.pageNo} given).`);if(this.cache.has(this.pageNo)){const e=a.default.open(this,this.cache.get(this.pageNo));if(this.pageCount>1){const t=e.content.querySelector(".jsPagination");null!==t&&new s.default(t,{activePage:this.pageNo,maxPage:this.pageCount,callbackSwitch:this.showPage.bind(this)});const i=e.content.parentElement;i.scrollTop>0&&(i.scrollTop=0)}}else this.options.parameters.pageNo=this.pageNo,n.api(this,{parameters:this.options.parameters})}_ajaxSuccess(e){void 0!==e.returnValues.pageCount&&(this.pageCount=~~e.returnValues.pageCount),this.cache.set(this.pageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserList",className:this.options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}}_dialogSetup(){return{id:r.default.getUniqueId(),options:{title:this.options.dialogTitle},source:null}}}})),define("WoltLabSuite/Core/Ui/User/ObjectWatch",["require","exports","tslib","../../Ajax","../Notification","../../Language","../../Event/Handler"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a);const s=new Map;t.setup=function(){document.querySelectorAll(".userObjectWatchDropdown").forEach((e=>{if(!e.dataset.objectId)throw new Error("Missing objectId for '.userObjectWatchDropdown' element.");const t=parseInt(e.dataset.objectId,10);s.has(t)||s.set(t,new Set),s.get(t).add(e),e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{if(!e.dataset.subscribe)throw new Error("Missing 'data-subscribe' attribute for '.userObjectWatchSelect' element.");e.addEventListener("click",(t=>{t.preventDefault(),async function(e){const t=e.closest(".userObjectWatchDropdown"),i=parseInt(e.dataset.subscribe,10),l=parseInt(t.dataset.objectId,10),c=t.dataset.objectType;await n.dboAction("saveSubscription","wcf\\data\\user\\object\\watch\\UserObjectWatchAction").payload({enableNotification:1,objectID:l,objectType:c,subscribe:i}).dispatch(),s.has(l)&&s.get(l).forEach((e=>{e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{parseInt(e.dataset.subscribe,10)===i?e.classList.add("active"):e.classList.remove("active")}))})),document.querySelectorAll(`.userObjectWatchDropdownToggle[data-object-type="${c}"][data-object-id="${l}"]`).forEach((e=>{const t=e.querySelector("fa-icon"),n=e.querySelector("span:not(.icon)");i?(e.classList.add("active"),t.setIcon("bookmark",!0),n.textContent=r.get("wcf.user.objectWatch.button.subscribed")):(e.classList.remove("active"),t.setIcon("bookmark"),n.textContent=r.get("wcf.user.objectWatch.button.subscribe")),e.dataset.isSubscribed=i.toString()})),a.fire("com.woltlab.wcf.objectWatch","updatedSubscription"),o.show()}(e)}))}))}))}})),define("WoltLabSuite/Core/Ui/User/PasswordStrength",["require","exports","tslib","../../Language","../../Dom/Util"],(function(e,t,i,n,o){"use strict";function r(e){return[].concat(e,e.split(/\W+/))}n=i.__importStar(n),o=i.__importDefault(o);const a=[],s=document.querySelector('meta[property="og:site_name"]')?.getAttribute("content");return s&&a.push(s),class{input;zxcvbn;relatedInputs=[];staticDictionary=[];feedbacker;wrapper;score=document.createElement("span");verdictResult=document.createElement("input");constructor(t,o){this.input=t,new Promise(((t,i)=>{e(["zxcvbn"],t,i)})).then(i.__importStar).then((({default:e})=>{this.zxcvbn=e,o.relatedInputs&&(this.relatedInputs=o.relatedInputs),o.staticDictionary&&(this.staticDictionary=o.staticDictionary),this.feedbacker=function(e){const t={};return Object.entries(e.default_phrases).forEach((([e,i])=>{t[e]={},Object.entries(i).forEach((([i,o])=>{const r=`wcf.user.password.zxcvbn.${e}.${i}`,a=n.get(r);t[e][i]=a!==r?a:o}))})),new e(t)}(e.Feedback);const t=this.input.closest(".inputAddon");if(null===t)throw new Error("Expected a parent with `.inputAddon`.");this.wrapper=t,this.wrapper.classList.add("inputAddonPasswordStrength");const i=document.createElement("div");i.className="passwordStrengthRating";const r=document.createElement("small");r.textContent=n.get("wcf.user.password.strength"),i.appendChild(r),this.score.className="passwordStrengthScore",this.score.dataset.score="-1",i.appendChild(this.score),this.wrapper.appendChild(i),this.verdictResult.type="hidden",this.verdictResult.name=`${this.input.name}_passwordStrengthVerdict`,this.wrapper.parentNode.insertBefore(this.verdictResult,this.wrapper),this.input.addEventListener("input",(e=>this.evaluate(e))),this.relatedInputs.forEach((e=>e.addEventListener("input",(e=>this.evaluate(e))))),""!==this.input.value.trim()&&this.evaluate()}))}evaluate(e){const t=(i=a.concat(this.staticDictionary,this.relatedInputs.map((e=>e.value.trim()))),n=r,i.map(n).reduce(((e,t)=>e.concat(t)),[])).filter((e=>e.length>0));var i,n;const s=this.input.value.trim(),l=this.zxcvbn(s.substr(0,100),t);l.feedback=this.feedbacker.from_result(l),this.score.dataset.score=0===s.length?"-1":l.score.toString(),void 0!==e&&o.default.innerError(this.wrapper,l.feedback.warning),this.verdictResult.value=JSON.stringify(l)}}})),define("WoltLabSuite/Core/Api/Comments/Responses/DeleteResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteResponse=void 0,t.deleteResponse=async function(e){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}`).delete().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/Responses/EditResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editResponse=void 0,t.editResponse=async function(e){const t=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}/edit`);let o;try{o=await(0,i.prepareRequest)(t).get().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Comments/Responses/EnableResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableResponse=void 0,t.enableResponse=async function(e){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}/enable`).post().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/Responses/UpdateResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateResponse=void 0,t.updateResponse=async function(e,t){try{await(0,i.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}`).post({message:t}).fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Component/Comment/Response/woltlab-core-comment-response",["require","exports","tslib","../../../Dom/Util","../../../Ui/Dropdown/Simple","../../../Ui/Notification","../../Confirmation","../../../Event/Handler","../../../Ui/Scroll","../../../Language","../../Ckeditor","WoltLabSuite/Core/Api/Comments/Responses/EnableResponse","WoltLabSuite/Core/Api/Comments/Responses/DeleteResponse","WoltLabSuite/Core/Api/Comments/Responses/EditResponse","WoltLabSuite/Core/Api/Comments/Responses/RenderResponse","WoltLabSuite/Core/Api/Comments/Responses/UpdateResponse"],(function(e,t,i,n,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentResponseElement=void 0,n=i.__importDefault(n),o=i.__importDefault(o),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);class g extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".commentResponse__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#mt()}));const t=this.menu.querySelector(".commentResponse__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#ht()}));const i=this.menu.querySelector(".commentResponse__option--edit");i?.addEventListener("click",(e=>{e.preventDefault(),this.#ft()}))}}async#mt(){(await(0,u.enableResponse)(this.responseId)).unwrap(),this.querySelector(".commentResponse__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".commentResponse__option--enable").hidden=!0)}async#ht(){await(0,a.confirmationFactory)().delete()&&((await(0,p.deleteResponse)(this.responseId)).unwrap(),r.show(),this.dispatchEvent(new CustomEvent("delete")))}async#ft(){this.menu.querySelector(".commentResponse__option--edit").hidden=!0;const{template:e}=(await(0,m.editResponse)(this.responseId)).unwrap();this.#gt(e)}#gt(e){this.querySelector(".htmlContent").hidden=!0,n.default.insertHtml(e,this.#Ie,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#bt()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#vt()})),s.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#_t}`,(e=>{e.cancel=!0,this.#bt()})),window.setTimeout((()=>{l.element(this)}),250)}async#bt(){const e=(0,d.getCkeditorById)(this.#_t),t={data:{message:e.getHtml()}};if(!this.#wt(t))return;s.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#_t}`,t),this.#a();const i=await(0,f.updateResponse)(this.responseId,e.getHtml());if(!i.ok){const e=i.error.getValidationError();if(void 0===e)throw i.error;return n.default.innerError(document.getElementById(this.#_t),e.code),void this.#yt()}const{template:o}=(await(0,h.renderResponse)(this.responseId,!0)).unwrap();n.default.setInnerHtml(this.querySelector(".htmlContent"),o),this.#yt(),this.#vt(),r.show()}#a(){let e=this.querySelector(".commentResponse__loading");e||(e=document.createElement("div"),e.classList.add("commentResponse__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".commentResponse__message").append(e)),this.#Ie.hidden=!0,e.hidden=!1}#yt(){this.#Ie.hidden=!1;const e=this.querySelector(".commentResponse__loading");e&&(e.hidden=!0)}#wt(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,d.getCkeditorById)(this.#_t);if(""===t.getHtml())return n.default.innerError(t.element,(0,c.getPhrase)("wcf.global.form.error.empty")),!1;const i={api:this,parameters:e,valid:!0};return s.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#_t}`,i),i.valid}#vt(){(0,d.getCkeditorById)(this.#_t).destroy(),this.#Ie.remove(),this.menu.querySelector(".commentResponse__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#Ie(){let e=this.querySelector(".commentResponse__editor");return e||(e=document.createElement("div"),e.classList.add("commentResponse__editor"),this.querySelector(".commentResponse__message").append(e)),e}get responseId(){return parseInt(this.getAttribute("response-id"))}get menu(){let e=o.default.getDropdownMenu(`commentResponseOptions${this.responseId}`);return void 0===e&&(e=this.querySelector(".commentResponse__menu .dropdownMenu")||void 0),e}get#_t(){return`commentResponseEditor${this.responseId}`}}t.WoltlabCoreCommentResponseElement=g,window.customElements.define("woltlab-core-comment-response",g),t.default=g})),define("WoltLabSuite/Core/Component/User/RecentActivity/Loader",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Language"],(function(e,t,i,n,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=i.__importDefault(r),t.setup=function(e){!function(e){if(e.querySelector(".recentActivityList__showMoreButton"))return;const t=document.createElement("div");t.classList.add("recentActivityList__showMoreButton"),e.append(t);const i=document.createElement("button");i.type="button",i.classList.add("button","small"),i.textContent=(0,s.getPhrase)("wcf.user.recentActivity.more"),t.append(i),i.addEventListener("click",(0,a.promiseMutex)((()=>async function(e){const t=await(0,n.dboAction)("load","wcf\\data\\user\\activity\\event\\UserActivityEventAction").payload({lastEventTime:e.dataset.lastEventTime,lastEventID:e.dataset.lastEventId||0,userID:e.dataset.userId||0,boxID:e.dataset.boxId||0,filteredByFollowedUsers:(0,o.stringToBool)(e.dataset.filteredByFollowedUsers||"")}).dispatch();if(t.template){e.dataset.lastEventTime=t.lastEventTime.toString(),e.dataset.lastEventId=t.lastEventID.toString();const i=r.default.createFragmentFromHtml(t.template);e.insertBefore(i,e.querySelector(".recentActivityList__showMoreButton"))}else e.querySelector(".recentActivityList__showMoreButton")?.remove(),function(e){const t=document.createElement("div");t.classList.add("recentActivityList__showMoreButton"),e.append(t);const i=document.createElement("small");i.textContent=(0,s.getPhrase)("wcf.user.recentActivity.noMoreEntries"),t.append(i)}(e)}(e))))}(e),function(e){e.querySelectorAll(".recentActivityList__switchContextButton").forEach((t=>{t.addEventListener("click",(0,a.promiseMutex)((()=>async function(e){await(0,n.dboAction)("switchContext","wcf\\data\\user\\activity\\event\\UserActivityEventAction").dispatch(),window.location.hash=`#${e.id}`,window.location.reload()}(e))))}))}(e)}})),define("WoltLabSuite/Core/Controller/User/Notification/Settings",["require","exports","tslib","../../../Language","../../../Ui/Dropdown/Reusable"],(function(e,t,i,n,o){"use strict";function r(){return document.getElementById(`settings_${s}_mailNotificationType`)}let a;Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let s=0;t.init=function(){document.querySelectorAll(".jsCheckboxNotificationSettingsState").forEach((e=>{e.addEventListener("change",(e=>function(e){const t=e.currentTarget,i=~~t.dataset.objectId,n=document.querySelector(`.notificationSettingsEmailType[data-object-id="${i}"]`);null!==n&&(t.checked?n.classList.remove("disabled"):n.classList.add("disabled"))}(e)))})),document.querySelectorAll(".notificationSettingsEmailType").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;var i,l;s=~~t.dataset.objectId,a||(a=document.createElement("ul"),a.className="dropdownMenu",["instant","daily","divider","none"].forEach((e=>{const t=document.createElement("li");if("divider"===e)t.className="dropdownDivider";else{const i=document.createElement("a");i.href="#",i.textContent=n.get(`wcf.user.notification.mailNotificationType.${e}`),t.appendChild(i),t.dataset.value=e,t.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget.dataset.value;r().value=t;const i=document.querySelector(`.notificationSettingsEmailType[data-object-id="${s}"]`);i.title=n.get(`wcf.user.notification.mailNotificationType.${t}`);const o=i.querySelector(".jsIconNotificationSettingsEmailType fa-icon");switch(t){case"daily":o.setIcon("clock");break;case"instant":o.setIcon("bolt");break;case"none":o.setIcon("xmark")}s=0}(e)))}a.appendChild(t)})),o.init("UiNotificationSettingsEmailType",a)),i=r().value,a.querySelectorAll("li").forEach((e=>{e.dataset.value===i?e.classList.add("active"):e.classList.remove("active")})),l=t,o.toggleDropdown("UiNotificationSettingsEmailType",l)}(e)))}))}})),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["require","exports","tslib","../../../Ui/Dropdown/Simple","../../../Event/Handler"],(function(e,t,i,n,o){"use strict";return n=i.__importDefault(n),o=i.__importStar(o),class{_formId;_suffixField;_suffixDropdownMenu;_suffixDropdownToggle;constructor(e,t){this._formId=e,this._suffixField=document.getElementById(t),this._suffixDropdownMenu=n.default.getDropdownMenu(t+"_dropdown"),this._suffixDropdownToggle=n.default.getDropdown(t+"_dropdown").getElementsByClassName("dropdownToggle")[0],Array.from(this._suffixDropdownMenu.children).forEach((e=>{e.addEventListener("click",(e=>this._changeSuffixSelection(e)))})),o.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",(e=>this._destroyDropdown(e)))}_changeSuffixSelection(e){const t=e.currentTarget;t.classList.contains("disabled")||(Array.from(this._suffixDropdownMenu.children).forEach((e=>{e===t?e.classList.add("active"):e.classList.remove("active")})),this._suffixField.value=t.dataset.value,this._suffixDropdownToggle.innerHTML=t.dataset.label+' <fa-icon name="caret-down" solid></fa-icon>')}_destroyDropdown(e){e.formId===this._formId&&n.default.destroy(this._suffixDropdownMenu.id)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_aclList;_getData(){return{[this._fieldId]:this._aclList.getData()}}_readField(){}setAclList(e){return this._aclList=e,this}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Button",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0,n=i.__importDefault(n);class o extends n.default{_getData(){const e={};return"1"===this._field.dataset.isClicked&&(e[this._fieldId]=this._field.value),e}}t.Button=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["require","exports","tslib","./Field","../../../Controller/Captcha"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importDefault(o);class r extends n.default{_getData(){return o.default.has(this._fieldId)?o.default.getData(this._fieldId):{}}_readField(){}destroy(){o.default.has(this._fieldId)&&o.default.delete(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n);class r extends n.default{_getData(){const e=this._fields.map((e=>e.checked?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e}}_readField(){}get _fields(){return Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[]"]`))}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_getData(){return{[this._fieldId]:this._field.checked?"1":"0"}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/CheckedVoid",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckedVoid=void 0,n=i.__importDefault(n);class o extends n.default{_getData(){return this._field.checked?{[this._fieldId]:1}:{}}}t.CheckedVoid=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Ckeditor",["require","exports","tslib","./Field","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Ckeditor"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ckeditor=void 0,n=i.__importDefault(n);class a extends n.default{_getData(){const e=(0,r.getCkeditorById)(this._fieldId);return{[this._fieldId]:e.getHtml()}}destroy(){(0,o.dispatchToCkeditor)(this._field).destroy()}}t.Ckeditor=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Date",["require","exports","tslib","./Field","../../../Date/Picker"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importDefault(o);class r extends n.default{_getData(){return{[this._fieldId]:o.default.getValue(this._field)}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor",["require","exports","tslib","WoltLabSuite/Core/Language","WoltLabSuite/Core/Api/Files/DeleteFile","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Component/File/Helper","WoltLabSuite/Core/Component/File/Upload"],(function(e,t,i,n,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.FileProcessor=void 0,r=i.__importDefault(r);const l=new Map;t.FileProcessor=class{#Z;#ti;#ii;#ni=void 0;#oi;#ri;#ai;#si;#li;constructor(e,t=!1,i=!1,n=[]){if(this.#ii=e,this.#ri=i,this.#ai=t,this.#si=n,this.#Z=document.getElementById(e+"Container"),null===this.#Z)throw new Error("Unknown field with id '"+e+"'");this.#ti=this.#Z.querySelector("woltlab-core-file-upload"),this.#ti.addEventListener("uploadStart",(e=>{void 0!==this.#li&&this.#li(),this.#ci(e.detail)})),this.#oi=this.#ti.shadowRoot.querySelector('input[type="file"]'),this.#Z.querySelectorAll("woltlab-core-file").forEach((e=>{this.#ci(e,e.parentElement)})),l.set(e,this)}get classPrefix(){return this.#ri?"fileUpload__preview__":"fileList__"}addButtons(e,t){const i=document.createElement("ul");i.classList.add("buttonList"),i.classList.add(this.classPrefix+"item__buttons");let n=document.createElement("li");n.append(this.getDeleteButton(t)),i.append(n),this.#ai&&(n=document.createElement("li"),n.append(this.getReplaceButton(t)),i.append(n)),this.#si.forEach((e=>{const n=document.createElement("button");n.type="button",n.classList.add("button","small"),void 0===e.icon?n.textContent=e.title:(n.classList.add("jsTooltip"),n.title=e.title,n.innerHTML=e.icon),n.addEventListener("click",(()=>{t.dispatchEvent(new CustomEvent("fileProcessorCustomAction",{detail:e.actionName,bubbles:!0}))}));const o=document.createElement("li");o.append(n),i.append(o)})),e.append(i)}#di(e,t,i){(0,a.fileInitializationFailed)(e,t,i),e.classList.add("innerError")}getDeleteButton(e){const t=document.createElement("button");return t.type="button",t.classList.add("button","small"),t.textContent=(0,n.getPhrase)("wcf.global.button.delete"),t.addEventListener("click",(async()=>{await(0,o.deleteFile)(e.fileId),this.#ui(e)})),t}getReplaceButton(e){const t=document.createElement("button");return t.type="button",t.classList.add("button","small"),t.textContent=(0,n.getPhrase)("wcf.global.button.replace"),t.addEventListener("click",(()=>{const t=this.#ti.dataset.context,i=JSON.parse(t);i.__replace=!0,this.#ti.dataset.context=JSON.stringify(i),this.#ni=e,this.#ui(e),(0,s.clearPreviousErrors)(this.#ti);const n=()=>{this.#oi.removeEventListener("cancel",o),new Promise((e=>{this.#li=e})).then((()=>{this.#li=void 0,this.#ti.dataset.context=t}))},o=()=>{this.#ti.dataset.context=t,this.#ci(this.#ni),this.#ni=void 0,this.#oi.removeEventListener("change",n)};this.#oi.addEventListener("cancel",o,{once:!0}),this.#oi.addEventListener("change",n,{once:!0}),this.#oi.click()})),t}#ui(e){this.#ri?e.parentElement.innerHTML="":e.parentElement.parentElement.remove()}#ci(e,t=null){null===t&&(this.#ri?(null===(t=this.#Z.querySelector(".fileUpload__preview"))&&((t=document.createElement("div")).classList.add("fileUpload__preview"),this.#ti.insertAdjacentElement("beforebegin",t)),t.append(e)):((t=document.createElement("li")).classList.add("fileList__item"),this.#Z.querySelector(".fileList").append(t))),this.#ri||(0,a.insertFileInformation)(t,e),(0,a.trackUploadProgress)(t,e),e.ready.then((()=>{void 0!==this.#ni&&((0,o.deleteFile)(this.#ni.fileId),this.#ni=void 0),this.#pi(e,t)})).catch((i=>{if(void 0!==this.#ni&&(this.#ci(this.#ni),this.#ni=void 0,this.#ri)){const i=document.createElement("div");i.append(e),this.#ti.insertAdjacentElement("afterend",i),t=i}this.#di(t,e,i)})).finally((()=>{(0,a.removeUploadProgress)(t)}))}#pi(e,t){if(this.#ri)e.dataset.previewUrl=e.link,e.unbounded=!0;else if(e.isImage()){const i=e.thumbnails.find((e=>"tiny"===e.identifier));if(void 0!==i?e.thumbnail=i:(e.dataset.previewUrl=e.link,e.unbounded=!1),void 0!==e.link&&void 0!==e.filename){const n=document.createElement("a");n.href=e.link,n.title=e.filename,n.textContent=e.filename,n.classList.add("jsImageViewer");const o=document.createElement("img");o.src=void 0!==i?i.link:e.link,o.alt=e.filename,o.style.display="none",o.loading="lazy",o.classList.add(this.classPrefix+"item__previewImage"),n.append(o);const a=t.querySelector("."+this.classPrefix+"item__filename");a.innerHTML="",a.append(n),r.default.trigger()}}const i=document.createElement("input");i.type="hidden",i.name=this.#ai?this.#ii:this.#ii+"[]",i.value=e.fileId.toString(),t.append(i),this.addButtons(t,e)}get values(){if(this.#ai){const e=this.#Z.querySelector('input[type="hidden"]');if(null===e)return;return parseInt(e.value)}return new Set(Array.from(this.#Z.querySelectorAll('input[type="hidden"]')).map((e=>parseInt(e.value))))}},t.getValues=function(e){const t=l.get(e);if(void 0===t)throw new Error("Unknown field with id '"+e+"'");return t.values}})),define("WoltLabSuite/Core/Form/Builder/Field/FileProcessor",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=i.__importDefault(n);class r extends n.default{_getData(){const e=(0,o.getValues)(this._fieldId);return void 0===e?{}:{[this._fieldId]:e}}_readField(){}}t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["require","exports","tslib","./Field","../../../Ui/ItemList/Static"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e=[];return o.getValues(this._fieldId).forEach((t=>{t.objectId?e[t.objectId]=t.value:e.push(t.value)})),{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.MultilineItemListFormField=void 0,n=i.__importStar(n),r=i.__importDefault(r);const a=new Map;class s extends n.UiItemListLineBreakSeparatedText{constructor(e,t){super(e,t),null!=t.submitFieldName?a.set(t.submitFieldName,this):a.set(this.submitField.id,this)}getItems(){return this.items}initValues(){super.initValues(),Array.from(this.itemList.children).forEach((e=>{e.querySelector(".jsEditItem").addEventListener("click",(e=>{this.editItem(e)}))}))}editItem(e){if(this.uiDisabled)return;const t=e.currentTarget,i=t.closest("li"),n=i.querySelector(".jsDeleteItem"),a=i.querySelector("span"),s=t.closest("li").dataset.value;r.default.hide(n),r.default.hide(t),r.default.hide(a);const l=document.createElement("input");l.type="text",l.value=s;const c=document.createElement("button");c.classList.add("jsSaveItem","jsTooltip"),c.title=(0,o.getPhrase)("wcf.global.button.save");let d=document.createElement("fa-icon");d.setIcon("save"),c.append(d);const u=document.createElement("button");u.classList.add("jsCancelItem","jsTooltip"),u.title=(0,o.getPhrase)("wcf.global.button.cancel"),d=document.createElement("fa-icon"),d.setIcon("times"),u.append(d);const p=()=>{l.remove(),c.remove(),u.remove(),r.default.show(n),r.default.show(t),r.default.show(a)},m=e=>{if(e.preventDefault(),this.uiDisabled)return;const i=l.value.trim();""===i?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.global.form.error.empty")):this.items.has(i)&&i!==s?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:i}),!0):(r.default.innerError(l.parentElement,""),t.closest("li").dataset.value=i,a.textContent=i,this.items.delete(s),this.items.add(i),p()),l.focus()};l.addEventListener("keydown",(e=>{"Enter"===e.key?m(e):"Escape"===e.key&&p()})),c.addEventListener("click",(e=>{m(e)})),u.addEventListener("click",(()=>{p()})),i.append(c,u,l),l.focus()}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const i=document.createElement("button");i.type="button",i.classList.add("jsDeleteItem","jsTooltip"),i.title=(0,o.getPhrase)("wcf.global.button.delete"),i.addEventListener("click",(e=>{this.deleteItem(e)}));let n=document.createElement("fa-icon");n.setIcon("trash"),i.append(n);const r=document.createElement("button");r.type="button",r.classList.add("jsEditItem","jsTooltip"),r.title=(0,o.getPhrase)("wcf.global.button.edit"),r.addEventListener("click",(e=>{this.editItem(e)})),n=document.createElement("fa-icon"),n.setIcon("pencil"),r.append(n);const a=document.createElement("span");a.innerText=e,t.append(r,i," ",a);const s=Array.from(this.itemList.children).find((t=>t.dataset.value>e));s?this.itemList.insertBefore(t,s):this.itemList.append(t),this.showList()}submit(){this.submitField?this.submitField.value=Array.from(this.items).join("\n"):Array.from(this.items).forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}))}}t.MultilineItemListFormField=s,t.getValues=function(e){if(!a.has(e))throw new Error(`Element id '${e}' is unknown.`);return a.get(e).getItems()}})),define("WoltLabSuite/Core/Form/Builder/Field/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","./Controller/MultilineItemList"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultilineItemList=void 0,n=i.__importDefault(n);class r extends n.default{_getData(){return{[this._fieldId]:(0,o.getValues)(this._fieldId)}}}t.MultilineItemList=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n);class r extends n.default{_fields;constructor(e){super(e),this._fields=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}"]`))}_getData(){const e={};return this._fields.some((t=>!!t.checked&&(e[this._fieldId]=t.value,!0))),e}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n);class r extends n.default{_getData(){const e=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[group][]"]`)).map((e=>e.value)),t=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[user][]"]`)).map((e=>e.value));return{[this._fieldId]:{group:e,user:t}}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/User",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e.join(",")}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Value",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_getData(){return{[this._fieldId]:this._field.value}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["require","exports","tslib","./Field","../../../Language/Input"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_getData(){const e={},t=o.getValues(this._fieldId);return t.size>1?(Object.prototype.hasOwnProperty.call(e,this._fieldId+"_i18n")||(e[this._fieldId+"_i18n"]={}),t.forEach(((t,i)=>{e[this._fieldId+"_i18n"][i]=t}))):e[this._fieldId]=t.get(0),e}destroy(){o.unregister(this._fieldId)}}return r})),define("WoltLabSuite/Core/Ui/Object/Action/Toogle",["require","exports","./Toggle"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return i.setup}})})),define("WoltLabSuite/Core/Ui/User/Menu/View",["require","exports","tslib","../../../Date/Util","../../../StringUtil","../../../Dom/Change/Listener","../../../Language","focus-trap","perfect-scrollbar","../../Screen"],(function(e,t,i,n,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserMenuView=void 0,r=i.__importStar(r),a=i.__importStar(a),l=i.__importDefault(l),c=i.__importStar(c);class d{element;usePerfectScrollbar=!1;focusTrap;markAllAsReadButton;perfectScrollbar=void 0;provider;constructor(e){this.provider=e,this.element=document.createElement("div"),this.buildElement(),this.markAllAsReadButton=this.buildButton({icon:'<fa-icon size="24" name="check" solid></fa-icon>',link:"#",name:"markAllAsRead",title:a.get("wcf.global.button.markAllAsRead")}),this.focusTrap=(0,s.createFocusTrap)(this.element,{allowOutsideClick:!0,escapeDeactivates:()=>(this.element.dispatchEvent(new Event("shouldClose")),!1),fallbackFocus:this.element}),c.on("screen-lg",{match:()=>{this.usePerfectScrollbar=!0,this.rebuildScrollbar()},unmatch:()=>{this.usePerfectScrollbar=!1,this.rebuildScrollbar()},setup:()=>{this.usePerfectScrollbar=!0,this.rebuildScrollbar()}})}getElement(){return this.element}async open(){const e=this.provider.isStale();if(e&&this.reset(),this.element.hidden=!1,this.focusTrap.activate(),e){const e=await this.provider.getData();this.setContent(e)}}close(){this.focusTrap.deactivate(),this.element.hidden=!0}getItems(){return Array.from(this.getContent().querySelectorAll(".userMenuItem"))}setContent(e){const t=this.getContent();if(this.markAllAsReadButton.remove(),0===e.length)t.innerHTML=`<span class="userMenuContentStatus">${this.provider.getEmptyViewMessage()}</span>`;else{let i=!1;const n=document.createDocumentFragment();e.forEach((e=>{e.isUnread&&(i=!0),n.append(this.createItem(e))})),t.innerHTML="",t.append(n),i&&this.element.querySelector(".userMenuButtons").prepend(this.markAllAsReadButton),r.trigger()}this.rebuildScrollbar()}rebuildScrollbar(){if(this.usePerfectScrollbar){const e=this.getContent();this.enablePerfectScrollbar(e)}else this.disablePerfectScrollbar()}enablePerfectScrollbar(e){this.perfectScrollbar?this.perfectScrollbar.update():this.perfectScrollbar=new l.default(e,{suppressScrollX:!0,wheelPropagation:!1})}disablePerfectScrollbar(){this.perfectScrollbar?.destroy(),this.perfectScrollbar=void 0}createItem(e){const t=document.createElement("div");t.classList.add("userMenuItem"),t.dataset.objectId=e.objectId.toString(),t.dataset.isUnread=e.isUnread?"true":"false";const i=(0,o.escapeHTML)(e.link);t.innerHTML=`\n      <div class="userMenuItemImage">${e.image}</div>\n      <div class="userMenuItemContent">\n        <a href="${i}" class="userMenuItemLink">${e.content}</a>\n      </div>\n      <div class="userMenuItemMeta"></div>\n      <div class="userMenuItemUnread">\n        <button type="button" class="userMenuItemMarkAsRead jsTooltip" title="${a.get("wcf.global.button.markAsRead")}">\n          <fa-icon size="24" name="check"></fa-icon>\n        </button>\n      </div>\n    `;const r=(0,n.getTimeElement)(new Date(1e3*e.time));if(t.querySelector(".userMenuItemMeta").append(r),t.querySelector(".userMenuItemMarkAsRead").addEventListener("click",(async()=>{await this.provider.markAsRead(e.objectId),this.markAsRead(t)})),e.usernames.length>0){const i=t.querySelector(".userMenuItemContent"),n=document.createElement("div");n.classList.add("userMenuItemUsernames"),n.textContent=e.usernames.join(", "),i.insertAdjacentElement("afterend",n),t.classList.add("userMenuItemWithUsernames")}return this.provider.hasPlainTitle()&&t.querySelector(".userMenuItemLink").classList.add("userMenuItemLinkPlain"),t}markAsRead(e){e.dataset.isUnread="false",0===this.getContent().querySelectorAll('.userMenuItem[data-is-unread="true"]').length&&this.markAllAsReadButton.remove()}reset(){this.getContent().innerHTML='\n      <span class="userMenuContentStatus">\n        <woltlab-core-loading-indicator size="24" hide-text></woltlab-core-loading-indicator>\n      </span>\n    '}buildElement(){this.element.hidden=!0,this.element.classList.add("userMenu"),this.element.dataset.origin=this.provider.getPanelButton().id,this.element.tabIndex=-1,this.element.innerHTML=`\n      <div class="userMenuHeader">\n        <div class="userMenuTitle">${this.provider.getTitle()}</div>\n        <div class="userMenuButtons"></div>\n      </div>\n      <div class="userMenuContent userMenuContentScrollable"></div>\n    `,this.element.addEventListener("click",(e=>e.stopPropagation()));const e=this.element.querySelector(".userMenuButtons");this.provider.getMenuButtons().forEach((t=>{e.append(this.buildButton(t))}));const t=this.provider.getFooter();if(null!==t&&this.element.append(this.buildFooter(t)),"com.woltlab.wcf.notifications"===this.provider.getIdentifier()){const e=this.provider.getDesktopNotifications();e&&this.element.querySelector(".userMenuHeader").insertAdjacentElement("afterend",e)}}buildButton(e){let t;return"#"===e.link?(t=document.createElement("button"),t.type="button","markAllAsRead"===e.name?t.addEventListener("click",(e=>{e.preventDefault(),this.markAllAsRead()})):"function"==typeof e.clickCallback&&t.addEventListener("click",(t=>{t.preventDefault(),e.clickCallback()}))):(t=document.createElement("a"),t.href=e.link),t.classList.add("userMenuButton","jsTooltip"),t.title=e.title,t.innerHTML=e.icon,t}async markAllAsRead(){await this.provider.markAllAsRead(),this.getContent().querySelectorAll(".userMenuItem").forEach((e=>{e.dataset.isUnread="false"})),this.markAllAsReadButton.remove()}buildFooter(e){const t=(0,o.escapeHTML)(e.link),i=(0,o.escapeHTML)(e.title),n=document.createElement("div");return n.classList.add("userMenuFooter"),n.innerHTML=`<a href="${t}" class="userMenuFooterLink">${i}</a>`,n}getContent(){return this.element.querySelector(".userMenuContent")}}t.UserMenuView=d,t.default=d})),define("WoltLabSuite/Core/Ui/User/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class r extends o.default{constructor(e,t){const i=n.isPlainObject(t)&&!0===t.includeUserGroups;super(e,t=n.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:i?1:0}}}},t))}createListItem(e){const t=super.createListItem(e);t.dataset.type=e.type;const i=document.createElement("div");return i.className="box16",i.innerHTML="group"===e.type?'<fa-icon name="users" solid></fa-icon>':e.icon,i.appendChild(t.children[0]),t.appendChild(i),t}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["require","exports","tslib","../../../../Core","../../../../Dom/Util","../../../../Language","../../../../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),class{_formFieldContainer;_input;_labelChooser;_options;constructor(e,t,i){this._formFieldContainer=document.getElementById(e+"Container"),this._labelChooser=this._formFieldContainer.getElementsByClassName("labelChooser")[0],this._options=n.extend({forceSelection:!1,showWithoutSelection:!1},i),this._input=document.createElement("input"),this._input.type="hidden",this._input.id=e,this._input.name=e,this._input.value=t,this._formFieldContainer.appendChild(this._input);const s=o.identify(this._labelChooser);let l=a.default.getDropdownMenu(s);null===l&&(a.default.init(this._labelChooser.getElementsByClassName("dropdownToggle")[0]),l=a.default.getDropdownMenu(s));let c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=document.createElement("ul"),l.appendChild(c);const e=document.createElement("li");e.classList.add("dropdownDivider"),c.appendChild(e)}if(this._options.showWithoutSelection){const e=document.createElement("li");e.dataset.labelId="-1",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=r.get("wcf.label.withoutSelection"),t.appendChild(i)}if(!this._options.forceSelection){const e=document.createElement("li");e.dataset.labelId="0",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=r.get("wcf.label.none"),t.appendChild(i)}l.querySelectorAll("li:not(.dropdownDivider)").forEach((e=>{e.addEventListener("click",(e=>this._click(e))),t&&e.dataset.labelId===t&&this._selectLabel(e)}))}_blockScroll(e){e.addEventListener("wheel",(e=>e.preventDefault()),{passive:!1})}_click(e){e.preventDefault(),this._selectLabel(e.currentTarget)}_selectLabel(e){let t=e.dataset.labelId;t||(t="0");const i=e.querySelector("span > span"),n=this._labelChooser.querySelector(".dropdownToggle > span");n.className=i.className,n.textContent=i.textContent,this._input.value=t}}})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["require","exports","tslib","../../../../Environment"],(function(e,t,i,n){"use strict";return n=i.__importStar(n),class{_field;_input;_ratingElements;constructor(e,t){if(this._field=document.getElementById(e+"Container"),null===this._field)throw new Error("Unknown field with id '"+e+"'");this._input=document.createElement("input"),this._input.id=e,this._input.name=e,this._input.type="hidden",this._input.value=t,this._field.appendChild(this._input),this._ratingElements=new Map;const i=this._field.querySelector(".ratingList");i.addEventListener("mouseleave",(()=>this._restoreRating())),i.querySelectorAll("li").forEach((e=>{e.classList.contains("ratingMetaButton")?(e.addEventListener("click",(e=>this._metaButtonClick(e))),e.addEventListener("mouseenter",(()=>this._restoreRating()))):(this._ratingElements.set(e.dataset.rating,e),e.addEventListener("click",(e=>this._listItemClick(e))),e.addEventListener("mouseenter",(e=>this._listItemMouseEnter(e))),e.addEventListener("mouseleave",(()=>this._listItemMouseLeave())))}))}_listItemClick(e){const t=e.currentTarget;this._input.value=t.dataset.rating,"desktop"!==n.platform()&&this._restoreRating()}_listItemMouseEnter(e){const t=e.currentTarget.dataset.rating;this._ratingElements.forEach(((e,i)=>{const n=e.querySelector("fa-icon");this._toggleIcon(n,~~i<=~~t)}))}_listItemMouseLeave(){this._ratingElements.forEach((e=>{const t=e.querySelector("fa-icon");this._toggleIcon(t,!1)}))}_metaButtonClick(e){"removeRating"===e.currentTarget.dataset.action&&(this._input.value="",this._listItemMouseLeave())}_restoreRating(){this._ratingElements.forEach(((e,t)=>{const i=e.querySelector("fa-icon");this._toggleIcon(i,~~t<=~~this._input.value)}))}_toggleIcon(e,t=!1){t?e.setIcon("star",!0):e.setIcon("star")}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","./Manager"],(function(e,t,i,n,o){"use strict";return o=i.__importStar(o),class{_dependentElement;_field;_fields;_noField;constructor(e,t){this.init(e,t)}checkDependency(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")}getDependentNode(){return this._dependentElement}getField(){return this._field}getFields(){return this._fields}init(e,t){if(this._dependentElement=document.getElementById(e),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+e+"Container'.");if(this._field=document.getElementById(t),null===this._field){if(this._fields=[],document.querySelectorAll(`input[type=radio][name="${(0,n.escapeAttributeSelector)(t)}"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length&&(document.querySelectorAll(`input[type=checkbox][name="${(0,n.escapeAttributeSelector)(t)}[]"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length))throw new Error("Unknown field with id '"+t+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.nodeName&&"radio"===this._field.type&&""!==this._field.dataset.noInputId){if(this._noField=document.getElementById(this._field.dataset.noInputId),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+t+"'");this._fields.push(this._noField)}o.addDependency(this)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["require","exports","tslib","./Abstract"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return!e.checked;case"radio":return!(!this._noField||!this._noField.checked)||!e.checked;default:return 0===e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0===this._field.querySelectorAll("option:checked").length:"0"==e.value||0===e.value.length}case"TEXTAREA":return 0===this._field.value.trim().length}return this._fields.every((e=>!e.checked))}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/IsNotClicked",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsNotClicked=void 0,n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{constructor(e,t){super(e,t),this._field.addEventListener("click",(()=>{this._field.dataset.isClicked="1",o.checkDependencies()}))}checkDependency(){return"1"!==this._field.dataset.isClicked}}t.IsNotClicked=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["require","exports","tslib","./Abstract"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return e.checked;case"radio":return(!this._noField||!this._noField.checked)&&e.checked;default:return 0!==e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0!==e.querySelectorAll("option:checked").length:"0"!=e.value&&0!==e.value.length}case"TEXTAREA":return 0!==this._field.value.trim().length}return this._fields.some((e=>e.checked))}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_isNegated=!1;_values;checkDependency(){if(!this._values)throw new Error("Values have not been set.");const e=[];if(this._field){if(o.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else{let t=!0;if(this._fields.forEach((i=>{if(i.checked){if(o.isHiddenByDependencies(i))return t=!1,!1;e.push(i.value)}})),!t)return!1}let t=!1;return this._values.forEach((i=>{e.forEach((e=>{i==e&&(t=!0)}))})),t?!this._isNegated:this._isNegated}negate(e){return this._isNegated=e,this}values(e){return this._values=e,this}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/ValueInterval",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueInterval=void 0,n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{_maximum=null;_minimum=null;checkDependency(){if(this._field){if(o.isHiddenByDependencies(this._field))return!1;const e=parseFloat(this._field.value);return!(isNaN(e)||null!==this._minimum&&this._minimum>e||null!==this._maximum&&this._maximum<e)}throw new Error("'ValueInterval' is only supported for individual fields.")}maximum(e){return this._maximum=e,this}minimum(e){return this._minimum=e,this}}t.ValueInterval=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["require","exports","tslib","../Value","../../../../Language/Chooser"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class r extends n.default{destroy(){o.removeChooser(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["require","exports","tslib","../Value"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{constructor(e){super(e+"_tmpHash")}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Poll",["require","exports","tslib","../Field"],(function(e,t,i,n){"use strict";n=i.__importDefault(n);class o extends n.default{_pollEditor;_getData(){return this._pollEditor.getData()}_readField(){}setPollEditor(e){this._pollEditor=e}}return o})),define("WoltLabSuite/Core/Ui/User/Menu/Data/Notification",["require","exports","tslib","../../../../Ajax","../View","../Manager","../../../../Language","../../../../Notification/Handler","../../../../Notification/ServiceWorker"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(e){const t=document.querySelector('link[rel="icon"]');if(!t)return;d||(d=t.href);const i=Math.trunc(e).toString();if("0"===i)return void(t.href=d);const n=document.createElement("img");n.src=d,n.addEventListener("load",(()=>{const e=document.createElement("canvas");e.width=n.naturalWidth,e.height=n.naturalHeight;const o=e.getContext("2d");o&&(o.drawImage(n,0,0,e.width,e.height),function(e,t){const i=e.canvas.width;let n=!1,o=.4*i;const r=.4*i;let a=.6*i;const s=.6*i;2===t.length?(o-=.4*a,a*=1.4,n=!0):t.length>=3&&(o-=.65*a,a*=1.65,n=!0),e.beginPath(),e.fillStyle="#d00",n?(e.moveTo(o+a/2,r),e.lineTo(o+a-s/2,r),e.quadraticCurveTo(o+a,r,o+a,r+s/2),e.lineTo(o+a,r+s-s/2),e.quadraticCurveTo(o+a,r+s,o+a-s/2,r+s),e.lineTo(o+s/2,r+s),e.quadraticCurveTo(o,r+s,o,r+s-s/2),e.lineTo(o,r+s/2),e.quadraticCurveTo(o,r,o+s/2,r)):e.arc(o+a/2,r+s/2,s/2,0,2*Math.PI),e.fill(),e.closePath(),e.beginPath(),e.stroke(),e.font="bold "+Math.floor(s*(t.length>2?.85:1)).toString()+"px sans-serif",e.textAlign="center",e.fillStyle="#fff",t.length>3?e.fillText((t.length>4?9:Math.floor(+t/1e3)).toString()+"k+",Math.floor(o+a/2),Math.floor(r+s-.2*s)):e.fillText(t,Math.floor(o+a/2),Math.floor(r+s-.15*s)),e.closePath()}(o,i),t.href=e.toDataURL("image/png"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=i.__importDefault(o),a=i.__importStar(a);let d="";class u{button;options;stale=!0;view=void 0;constructor(e,t){this.button=e,this.options=t,this.counter>0&&c(this.counter),this.button.addEventListener("updateCounter",(e=>{this.updateCounter(e.detail.counter),this.stale=!0}))}get counter(){return parseInt(this.button.dataset.count,10)}set counter(e){this.button.dataset.count=e.toString()}getPanelButton(){return this.button}getMenuButtons(){return[{icon:'<fa-icon size="24" name="cog" solid></fa-icon>',link:this.options.settingsLink,name:"settings",title:this.options.settingsTitle}]}getIdentifier(){return"com.woltlab.wcf.notifications"}async getData(){const e=await(0,n.dboAction)("getNotificationData","wcf\\data\\user\\notification\\UserNotificationAction").disableLoadingIndicator().dispatch();return this.updateCounter(e.totalCount),this.stale=!1,e.items}getFooter(){return{link:this.options.showAllLink,title:this.options.showAllTitle}}getTitle(){return this.options.title}getView(){return void 0===this.view&&(this.view=new o.default(this)),this.view}getEmptyViewMessage(){return this.options.noItems}hasPlainTitle(){return!1}hasUnreadContent(){return this.counter>0}isStale(){if(this.stale)return!0;const e=this.getView().getItems().filter((e=>"true"===e.dataset.isUnread));return this.counter!==e.length}getDesktopNotifications(){if(!("Notification"in window))return null;if("granted"===Notification.permission||"denied"===Notification.permission)return null;const e=document.createElement("div");e.classList.add("userMenuNotifications"),e.textContent=a.get("wcf.user.notification.enableDesktopNotifications");const t=document.createElement("div");t.classList.add("userMenuNotificationsButtons"),e.append(t);const i=document.createElement("button");return i.type="button",i.classList.add("button","small","userMenuNotificationsButton"),i.textContent=a.get("wcf.user.notification.enableDesktopNotifications.button"),i.addEventListener("click",(async t=>{t.preventDefault(),"granted"===await Notification.requestPermission()&&((0,s.enableNotifications)(),(0,l.registerServiceWorker)()),e.remove()})),t.append(i),e}async markAsRead(e){const t=await(0,n.dboAction)("markAsConfirmed","wcf\\data\\user\\notification\\UserNotificationAction").objectIds([e]).dispatch();this.updateCounter(t.totalCount)}async markAllAsRead(){await(0,n.dboAction)("markAllAsConfirmed","wcf\\data\\user\\notification\\UserNotificationAction").dispatch(),this.updateCounter(0)}updateCounter(e){this.counter=e;let t=this.button.querySelector(".badge");null===t&&e>0&&(t=document.createElement("span"),t.classList.add("badge","badgeUpdate"),this.button.querySelector("a").append(t)),t&&(0===e?t.remove():t.textContent=e.toString()),c(e)}}let p=!1;t.setup=function(e){if(!p){const t=document.getElementById("userNotifications");if(null!==t){const i=new u(t,e);(0,r.registerProvider)(i)}p=!0}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["require","exports","tslib","../Manager"],(function(e,t,i,n){"use strict";return n=i.__importStar(n),class{_container;constructor(e){this.init(e)}checkContainer(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")}init(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=document.getElementById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");n.addContainerCheckCallback((()=>this.checkContainer()))}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["require","exports","tslib","./Abstract","../../../../../Core","../Manager","../../../../../Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a);class s extends n.default{checkContainer(){if(o.stringToBool(this._container.dataset.ignoreDependencies||""))return;if(r.isHiddenByDependencies(this._container))return;const e=!a.default.isHidden(this._container),t=Array.from(this._container.children).some(((e,t)=>(0!==t||"H2"!==e.tagName&&"HEADER"!==e.tagName)&&!a.default.isHidden(e)));e!==t&&(t?a.default.show(this._container):a.default.hide(this._container),r.checkContainers())}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,i,n,o,r,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a);class s extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=Array.from(this._container.children).some((e=>!r.isHidden(e)));if(e!==t){const e=this._container.parentNode.parentNode.querySelector("#"+r.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]");if(null===e)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)r.show(this._container),r.show(e);else{r.hide(this._container),r.hide(e);const t=a.getTabMenu(r.identify(e.closest(".tabMenuContainer")));t.getActiveTab()===e&&t.selectFirstVisible()}o.checkContainers()}}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,i,n,o,r,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a);class s extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=this._container.parentNode.querySelectorAll("#"+r.identify(this._container)+" > nav > ul > li"),i=Array.from(t).some((e=>!r.isHidden(e)));e!==i&&(i?(r.show(this._container),a.getTabMenu(r.identify(this._container)).selectFirstVisible()):r.hide(this._container),o.checkContainers())}}return s})),function(e){function t(){for(;n.length&&"function"==typeof n[0];)n.shift()()}var i=e.require,n=[],o=0;e.orgRequire=i,e.require=function(r,a,s){if(!Array.isArray(r))return i.apply(e,arguments);var l=new Promise((function(e,a){var s=o++;n.push(s),i(r,(function(){var i=arguments;n[n.indexOf(s)]=function(){e(i)},t()}),(function(e){n[n.indexOf(s)]=function(){a(e)},t()}))}));return a&&(l=l.then((function(t){return a.apply(e,t)}))),s&&l.catch(s),l},e.require.config=i.config}(window),define("require.linearExecution",(function(){}));
+//# sourceMappingURL=../proxy_sourcemap.php?Bo6aAzw0G4ptS3B4As-lJhhaQUvgYIt_4sH9ZU-j4s8t_MrSb03ZGlh8Mixc4gyBrbdMnWZTLmBqXdRmepC0jDhljbgFYI5XA_Iird_sSnqb1C70mQR6AEsA_n8y709vbgJ7HxxHD4lM6997BgAnJ7-W9V4MmTGlnf1f0WMD2Bfkgi60nz1VNitTr0VWQoPCNVkrCMzowMq-E5EAKsXKdfu4tIpU7gd21ozPWsHpdJIBZlt30ZPYAS_fG6G4QJfQjG_79NmDbg1rr5KRIu0SslVDVDO7lRuSV4Ee37D_xeNfFqPd0Kfmnf4xRgH2izkaOrE9qDxKF-relFBgKi1uiw/WCF/d93cd55c7360dde233a66dd4d7028b2c99db2f759074ae4ce6f2db7fca148dd1
\ No newline at end of file
index 2541cfbc74702bd1392f14b118e0398443d9540a..ecd797d81951367881be662080817a6ae1b06324 100644 (file)
@@ -1,2 +1,2 @@
-var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__createBinding,__addDisposableResource,__disposeResources,_self,Prism,__setModuleDefault,Reflect;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,o){return t&&eachProp(t,(function(t,i){!n&&hasProp(e,i)||(!o||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[i]=t:(e[i]||(e[i]={}),mixin(e[i],t,n,o)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,n){var o,i,r,a,s,l,c,d,u,p,m=t&&t.split("/"),h=x.map,f=h&&h["*"];if(e&&(l=(e=e.split("/")).length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),function(e){var t,n,o=e.length;for(t=0;t<o;t++)if("."===(n=e[t]))e.splice(t,1),t-=1;else if(".."===n){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),n&&h&&(m||f)){e:for(r=(i=e.split("/")).length;r>0;r-=1){if(s=i.slice(0,r).join("/"),m)for(a=m.length;a>0;a-=1)if((o=getOwn(h,m.slice(0,a).join("/")))&&(o=getOwn(o,s))){c=o,d=r;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),p=r)}!c&&u&&(c=u,d=p),c&&(i.splice(0,d,c),e=i.join("/"))}return getOwn(x.pkgs,e)||e}function n(e){var t,n,o,i;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}t-=1,(n=(o=queue.shift())[0])in C||n in k||(n in I?v.apply(undef,o):k[n]=o)}e&&(i=getOwn(x.shim,e)||{},v(e,i.deps||[],i.exportsFn))}function o(e,o){var i=function(t,r,a,s){var l,c;if(o&&n(),"string"==typeof t){if(_[t])return _[t](e);if(!((l=w(t,e,!0).id)in C))throw new Error("Not loaded: "+l);return C[l]}return t&&!Array.isArray(t)&&(c=t,t=undef,Array.isArray(r)&&(t=r,r=a,a=s),o)?i.config(c)(t,r,a):(r=r||function(){return slice.call(arguments,0)},U.then((function(){return n(),v(undef,t||[],r,a,e)})))};return i.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,i.nameToUrl=function(e,t,n){var o,r,a,s,l,c,d=getOwn(x.pkgs,e);if(d&&(e=d),c=getOwn(N,e))return i.nameToUrl(c,t,n);if(urlRegExp.test(e))s=e+(t||"");else{for(o=x.paths,a=(r=e.split("/")).length;a>0;a-=1)if(l=getOwn(o,r.slice(0,a).join("/"))){Array.isArray(l)&&(l=l[0]),r.splice(0,a,l);break}s=r.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||n?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+s}return x.urlArgs&&!/^blob\:/.test(s)?s+x.urlArgs(e,s):s},i.toUrl=function(n){var o,r=n.lastIndexOf("."),a=n.split("/")[0];return-1!==r&&(!("."===a||".."===a)||r>1)&&(o=n.substring(r,n.length),n=n.substring(0,r)),i.nameToUrl(t(n,e),o,!0)},i.defined=function(t){return w(t,e,!0).id in C},i.specified=function(t){return(t=w(t,e,!0).id)in C||t in I},i}function i(e,t,n){e&&(C[e]=n,requirejs.onResourceLoad&&requirejs.onResourceLoad(L,t.map,t.deps)),t.finished=!0,t.resolve(n)}function r(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function a(e){e.factoryCalled=!0;var t,n=e.map.id;try{t=L.execCb(n,e.factory,e.values,C[n])}catch(t){return r(e,t)}n?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=C[n])):M.splice(M.indexOf(e),1),i(n,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||a(this))}function l(e,t){var n={};return n.promise=new Promise((function(t,o){n.resolve=t,n.reject=function(t){e||M.splice(M.indexOf(n),1),o(t)}})),n.map=e?t||w(e):{},n.depCount=0,n.depMax=0,n.values=[],n.depDefined=[],n.depFinished=s,n.map.pr&&(n.deps=[w(n.map.pr)]),n}function c(e,t){var n;return e?(n=e in I&&I[e])||(n=I[e]=l(e,t)):(n=l(),M.push(n)),n}function d(e,t){return function(n){e.rejected||(n.dynaId||(n.dynaId="id"+(O+=1),n.requireModules=[t]),r(e,n))}}function u(e,t,n,o){n.depMax+=1,y(e,t).then((function(e){n.depFinished(e,o)}),d(n,e.id)).catch(d(n,n.map.id))}function p(e,t,a){e.load(t.n,o(a),function(e){function t(t){o||i(e,c(e),t)}var o;return t.error=function(t){r(c(e),t)},t.fromText=function(t,i){var a,s=c(e),l=w(w(e).n),d=l.id;o=!0,s.factory=function(e,t){return t},i&&(t=i),hasProp(x.config,e)&&(x.config[d]=x.config[e]);try{b.exec(t)}catch(e){(a=new Error("fromText eval for "+d+" failed: "+e)).requireType="fromtexteval",r(s,a)}n(d),s.deps=[l],u(l,null,s,s.deps.length)},t}(t.id),x)}function m(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function h(e,t,n){var o=e.map.id;t[o]=!0,!e.finished&&e.deps&&e.deps.forEach((function(o){var i=o.id,r=!hasProp(_,i)&&c(i,o);!r||r.finished||n[i]||(hasProp(t,i)?e.deps.forEach((function(t,n){t.id===i&&e.depFinished(C[i],n)})):h(r,t,n))})),n[o]=!0}function f(e){var t,n,o,i=[],a=1e3*x.waitSeconds,s=a&&j+a<(new Date).getTime();if(0===P&&(e?e.finished||h(e,{},{}):M.length&&M.forEach((function(e){h(e,{},{})}))),s){for(n in I)(o=I[n]).finished||i.push(o.map.id);(t=new Error("Timeout for modules: "+i)).requireModules=i,t.requireType="timeout",i.forEach((function(e){r(c(e),t)}))}else(P||M.length)&&(E||(E=!0,setTimeout((function(){E=!1,f()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&q[e.dynaId]||(q[e.dynaId]=!0,b.onError(e))})),e}var b,v,w,y,_,E,S,L,C=obj(),k=obj(),x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},T=obj(),M=[],I=obj(),D=obj(),A=obj(),P=0,j=(new Date).getTime(),O=0,q=obj(),B=obj(),N=obj(),U=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;B[t]||(B[t]=!0,c(e.id),importScripts(t),n(e.id))}:function(e){var t,o=e.id,i=e.url;B[i]||(B[i]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",o),t.type=x.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,P+=1,t.addEventListener("load",(function(){P-=1,n(o)}),!1),t.addEventListener("error",(function(){var e,n,i;P-=1,(n=getOwn(x.paths,o))&&Array.isArray(n)&&n.length>1?(t.parentNode.removeChild(t),n.shift(),(i=c(o)).map=w(o),i.map.url=b.nameToUrl(o),S(i.map)):((e=new Error("Load failed: "+o+": "+t.src)).requireModules=[o],e.requireType="scripterror",r(c(o),e))}),!1),t.src=i,x.onNodeCreated&&x.onNodeCreated(t,x,o,i),10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},y=function(e,t){var n,o,i=e.id,r=x.shim[i];if(i in k)n=k[i],delete k[i],v.apply(undef,n);else if(!(i in I))if(e.pr){if(!(o=getOwn(N,i)))return y(w(e.pr)).then((function(n){var o=e.prn?e:w(i,t,!0),r=o.id,a=getOwn(x.shim,r);return r in A||(A[r]=!0,a&&a.deps?b(a.deps,(function(){p(n,o,t)})):p(n,o,t)),c(r).promise}));e.url=b.nameToUrl(o),S(e)}else r&&r.deps?b(r.deps,(function(){S(e)})):S(e);return c(i).promise},w=function(e,n,o){if("string"!=typeof e)return e;var i,r,a,s,l,c,d=e+" & "+(n||"")+" & "+!!o;return s=(a=m(e))[0],e=a[1],!s&&d in T?T[d]:(s&&(i=(s=t(s,n,o))in C&&C[s]),s?i&&i.normalize?(e=i.normalize(e,function(e){return function(n){return t(n,e,!0)}}(n)),c=!0):e=-1===e.indexOf("!")?t(e,n,o):e:(s=(a=m(e=t(e,n,o)))[0],e=a[1],r=b.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&c},s||(T[d]=l),l)},_={require:function(e){return o(e)},exports:function(e){var t=C[e];return void 0!==t?t:C[e]={}},module:function(e,t){return{id:e,uri:t||"",exports:_.exports(e),config:function(){return getOwn(x.config,e)||{}}}}},v=function(e,t,n,o,r){if(e){if(e in D)return;D[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(n=t,t=[]),t=t?slice.call(t,0):null,o||(hasProp(x,"defaultErrback")?x.defaultErrback&&(o=x.defaultErrback):o=g),o&&s.promise.catch(o),r=r||e,"function"==typeof n?(!t.length&&n.length&&(n.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,n){t.push(n)})),t=(1===n.length?["require"]:["require","exports","module"]).concat(t)),s.factory=n,s.deps=t,s.depending=!0,t.forEach((function(n,o){var i;t[o]=i=w(n,r,!0),"require"===(n=i.id)?s.values[o]=_.require(e):"exports"===n?(s.values[o]=_.exports(e),s.usingExports=!0):"module"===n?s.values[o]=s.cjsModule=_.module(e,s.map.url):void 0===n?s.values[o]=void 0:u(i,r,s,o)})),s.depending=!1,s.depCount===s.depMax&&a(s)):e&&i(e,s,n),j=(new Date).getTime(),e||f(s),s.promise},(b=o(null,!0)).config=function(t){var n,o,i,r;return t.context&&t.context!==e?(n=getOwn(contexts,t.context))?n.req.config(t):newContext(t.context).config(t):(T=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(o=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+o}),i=x.shim,r={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){r[t]?(x[t]||(x[t]={}),mixin(x[t],e,!0,!0)):x[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(N[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),i[t]=e})),x.shim=i),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(x.paths[t]=e.location),x.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&b(t.deps,t.callback),b)},b.onError=function(e){throw e},L={id:e,defined:C,waiting:k,config:x,deferreds:I,req:b,execCb:function(e,t,n,o){return t.apply(o,n)}},contexts[e]=L,b}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{"focus-trap":"3rdParty/focus-trap/focus-trap.umd.min","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min","reflect-metadata":"3rdParty/reflect-metadata",tabbable:"3rdParty/focus-trap/index.umd.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn","@googlemaps/markerclusterer":"3rdParty/googlemaps/markerclusterer/index.umd","@ckeditor/ckeditor5-inspector":"3rdParty/ckeditor/ckeditor5-inspector/inspector","@woltlab/editor":"3rdParty/ckeditor/ckeditor5.bundle","ckeditor5-translation":"3rdParty/ckeditor/translations"},packages:[{name:"codemirror",location:"3rdParty/codemirror",main:"lib/codemirror"}],shim:{"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){var n;e.elAttr=function(e,t,n){if(void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elAttrBool=function(e,t){var n=elAttr(e,t);return"1"===n||"true"===n},e.elByClass=function(e,n){return(n||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,n){return(n||t).querySelector(e)},e.elBySelAll=function(e,n,o){var i=(n||t).querySelectorAll(e);return"function"==typeof o&&Array.prototype.forEach.call(i,o),i},e.elByTag=function(e,n){return(n||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,n){if(t="data-"+t,void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elDataBool=function(e,t){var n=elData(e,t);return"1"===n||"true"===n},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,n){var o,i,r,a=e.parentNode;if(null===a)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return i=e,(o=a).classList.contains("inputAddon")&&(o=a.parentElement,i=a),null!==(r=i.nextElementSibling)&&"SMALL"===r.nodeName&&r.classList.contains("innerError")||(""===t?r=null:((r=elCreate("small")).className="innerError",o.insertBefore(r,i.nextSibling))),""===t?null!==r&&(a.removeChild(r),r=null):r[n?"innerHTML":"textContent"]=t,r},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var n=0,o=e.length;n<o;n++)t(e[n],n)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,n){var o;return function(){var i=this,r=arguments;clearTimeout(o),o=setTimeout((function(){o=null,n||e.apply(i,r)}),t),n&&!o&&e.apply(i,r)}},Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),n=0,function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++n},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}(),e.addEventListener("popstate",(function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})),e.String.prototype.hashCode=function(){var e,t,n=0;if(this.length)for(e=0,t=this.length;e<t;e++)n=(n<<5)-n+this.charCodeAt(e),n&=n;return n},Object.defineProperty(e,"SECURITY_TOKEN",{configurable:!1,get(){const e=t.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[n,o]=e.split(/=/,2);return decodeURIComponent(o.trim())}})}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==n&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,o){return e[n]=t?t(n,o):o}}var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(o){e(t(n,t(o)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(n,t(module.exports))):e(t(n))}((function(e){var t,n,o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};__extends=function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__assign=Object.assign||function(e){var t,n,o,i;for(n=1,o=arguments.length;n<o;n++)for(i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__rest=function(e,t){var n,o,i={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i},__decorate=function(e,t,n,o){var i,r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(r=e.length-1;r>=0;r--)(i=e[r])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},__param=function(e,t){return function(n,o){t(n,o,e)}},__esDecorate=function(e,t,n,o,i,r){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}var s,l,c,d,u,p=o.kind,m="getter"===p?"get":"setter"===p?"set":"value",h=!t&&e?o.static?e:e.prototype:null,f=t||(h?Object.getOwnPropertyDescriptor(h,o.name):{}),g=!1;for(l=n.length-1;l>=0;l--){for(d in c={},o)c[d]="access"===d?{}:o[d];for(d in o.access)c.access[d]=o.access[d];if(c.addInitializer=function(e){if(g)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(e||null))},u=(0,n[l])("accessor"===p?{get:f.get,set:f.set}:f[m],c),"accessor"===p){if(void 0===u)continue;if(null===u||"object"!=typeof u)throw new TypeError("Object expected");(s=a(u.get))&&(f.get=s),(s=a(u.set))&&(f.set=s),(s=a(u.init))&&i.unshift(s)}else(s=a(u))&&("field"===p?i.unshift(s):f[m]=s)}h&&Object.defineProperty(h,o.name,f),g=!0},__runInitializers=function(e,t,n){var o,i=arguments.length>2;for(o=0;o<t.length;o++)n=i?t[o].call(e,n):t[o].call(e);return i?n:void 0},__propKey=function(e){return"symbol"==typeof e?e:"".concat(e)},__setFunctionName=function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},__generator=function(e,t){function n(n){return function(l){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,n[0]&&(s=0)),s;)try{if(o=1,i&&(r=2&n[0]?i.return:n[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,n[1])).done)return r;switch(i=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,i=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){s.label=n[1];break}if(6===n[0]&&s.label<r[1]){s.label=r[1],r=n;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(n);break}r[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],i=0}finally{o=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,l])}}var o,i,r,a,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},__exportStar=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,n)},__createBinding=Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var n,o,i,r,a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;n=a.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return i},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,n,o,i,r,a,s;for(e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(o=Array(e),i=0,t=0;t<n;t++)for(a=0,s=(r=arguments[t]).length;a<s;a++,i++)o[i]=r[a];return o},__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,n){function o(e){c[e]&&(l[e]=function(t){return new Promise((function(n,o){d.push([e,t,n,o])>1||i(e,t)}))})}function i(e,t){try{(n=c[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(r,a):s(d[0][2],n)}catch(e){s(d[0][3],e)}var n}function r(e){i("next",e)}function a(e){i("throw",e)}function s(e,t){e(t),d.shift(),d.length&&i(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=n.apply(e,t||[]),d=[];return l={},o("next"),o("throw"),o("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,i){n[t]=e[t]?function(n){return(o=!o)?{value:__await(e[t](n)),done:!1}:i?i(n):n}:i}var n,o;return n={},t("next"),t("throw",(function(e){throw e})),t("return"),n[Symbol.iterator]=function(){return this},n},__asyncValues=function(e){function t(t){n[t]=e[t]&&function(n){return new Promise((function(o,i){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,i,(n=e[t](n)).done,n.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=e[Symbol.asyncIterator];return o?o.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var n,o;if(e&&e.__esModule)return e;if(n={},null!=e)for(o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&__createBinding(n,e,o);return t(n,e),n},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)},__classPrivateFieldSet=function(e,t,n,o,i){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?i.call(e,n):i?i.value=n:t.set(e,n),n},__classPrivateFieldIn=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__addDisposableResource=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose]}if("function"!=typeof o)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:o,async:n})}else n&&e.stack.push({async:!0});return t},n="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var o=new Error(n);return o.name="SuppressedError",o.error=e,o.suppressed=t,o},__disposeResources=function(e){function t(t){e.error=e.hasError?new n(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(var o,i;e.stack.length;){o=e.stack.pop();try{if(i=o.dispose&&o.dispose.call(o.value),o.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__esDecorate",__esDecorate),e("__runInitializers",__runInitializers),e("__propKey",__propKey),e("__setFunctionName",__setFunctionName),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__spreadArray",__spreadArray),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateObject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet),e("__classPrivateFieldIn",__classPrivateFieldIn),e("__addDisposableResource",__addDisposableResource),e("__disposeResources",__disposeResources)})),define("WoltLabSuite/Core/Ajax/Status",["require","exports"],(function(e,t){"use strict";function n(){return void 0===i&&(i=new o),i}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0;class o{_activeRequests=0;_overlay;_timer=null;constructor(){this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("woltlab-core-loading-indicator");e.size=48,this._overlay.append(e),document.body.append(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._overlay.classList.remove("active"))}}let i;t.show=function(){n().show()},t.hide=function(){n().hide()}})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function n(e){return r(e)}function o(e,...t){const r=n(e=e||{});for(let n=0,a=t.length;n<a;n++){const a=t[n];a&&Object.keys(a).forEach((t=>{Array.isArray(a[t])||"object"!=typeof a[t]?r[t]=a[t]:i(a[t])?r[t]=o(e[t],a[t]):r[t]=a[t]}))}return r}function i(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.getXsrfToken=t.enableLegacyInheritance=t.debounce=t.stringToBool=t.getStoragePrefix=t.triggerEvent=t.serialize=t.getUuid=t.getType=t.isPlainObject=t.inherit=t.extend=t.convertLegacyUrl=t.clone=void 0;const r=function(e){return"object"==typeof e&&(Array.isArray(e)||i(e))?a(e):e},a=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((n=>t[n]=r(e[n]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=n,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const n=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,o=n.length;e<o;e++){const o=n[e].trim();o.length&&(t.length&&(t+="-"),t+=o.toLowerCase())}return`index.php?${t}/&`}))},t.extend=o,t.inherit=function(e,t,n){if(null==e)throw new TypeError("The constructor must not be undefined or null.");if(null==t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=o(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),n||{})},t.isPlainObject=i,t.getType=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1")},t.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,n){if(null===t)return"";const o=[];return Object.keys(t).forEach((i=>{const r=n?n+"["+i+"]":i,a=t[i];"object"==typeof a?o.push(e(a,r)):o.push(encodeURIComponent(r)+"="+encodeURIComponent(a))})),o.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const n=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(n)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,n={isImmediate:!1}){let o;return function(...i){const r=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((()=>{o=void 0,n.isImmediate||e.apply(this,i)}),t),r&&e.apply(this,i)}},t.enableLegacyInheritance=function(e){console.error("Relying on the legacy inheritance is no longer supported. Please migrate your code to use ES6 classes and inheritance.",e)},t.getXsrfToken=function(){const e=document.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[t,n]=e.split(/=/,2);return decodeURIComponent(n.trim())}})),define("WoltLabSuite/Core/CallbackList",["require","exports"],(function(e,t){"use strict";return class{_callbacks=new Map;add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){null===e?this._callbacks.forEach(((e,n)=>{e.forEach(t)})):this._callbacks.get(e)?.forEach(t)}}})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,n,o){"use strict";const i=new((o=n.__importDefault(o)).default);let r=!1;return{add:i.add.bind(i),remove:i.remove.bind(i),trigger(){if(!r)try{r=!0,i.forEach(null,(e=>e()))}finally{r=!1}}}})),define("WoltLabSuite/Core/Language",["require","exports"],(function(e,t){"use strict";function n(e,t={}){return window.WoltLabLanguage.getPhrase(e,t)}function o(e,t){window.WoltLabLanguage.registerPhrase(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.addObject=t.add=t.get=t.registerPhrase=t.getPhrase=void 0,t.getPhrase=n,t.registerPhrase=o,t.get=function(e,t={}){return n(e,t)},t.add=function(e,t){o(e,t)},t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{o(e,t)}))}})),define("WoltLabSuite/Core/Component/Dialog/Controls",["require","exports","tslib","../../Language"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogControls=void 0,o=n.__importStar(o);class i{#e;constructor(e){this.#e=e}asAlert(e){const t={cancel:void 0,extra:void 0,isAlert:!0,primary:e?.primary||o.get("wcf.dialog.button.primary")};return this.#e.attachControls(t),this.#e}asConfirmation(e){const t={cancel:"",extra:void 0,isAlert:!0,primary:e?.primary||o.get("wcf.dialog.button.primary.confirm")};return this.#e.attachControls(t),this.#e}asPrompt(e){const t={cancel:"",extra:e?.extra,isAlert:!1,primary:e?.primary||o.get("wcf.dialog.button.primary.submit")};return this.#e.attachControls(t),this.#e}withoutControls(){return this.#e}}t.DialogControls=i,t.default=i})),define("WoltLabSuite/Core/StringUtil",["require","exports"],(function(e,t){"use strict";function n(e,t){const n=t?-t:2;return e.toLocaleString(document.documentElement.lang,{maximumFractionDigits:n}).replace("-","−")}function o(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCase=t.shortUnit=t.unescapeHTML=t.ucfirst=t.lcfirst=t.formatNumeric=t.escapeRegExp=t.escapeHTML=t.addThousandsSeparator=void 0,t.addThousandsSeparator=function(e){return e.toLocaleString(document.documentElement.lang)},t.escapeHTML=function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=n,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=o,t.unescapeHTML=function(e){return String(e).replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},t.shortUnit=function(e){let t="";return e>=1e6?((e/=1e6)>10&&(e=Math.floor(e)),t="M"):e>=1e3&&((e/=1e3)>10&&(e=Math.floor(e)),t="k"),n(e,-1)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=o(e)),e))).join(""):e}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,n,o){"use strict";function i(e,t,n){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let o,i=e;const r=n+"Sibling";for(;null!==i&&i!==t;){if(null!==i[n+"ElementSibling"])return!1;if(i[r])for(o=i[r];o;){if(""!==o.textContent.trim())return!1;o=o[r]}i=i.parentNode}return!0}o=n.__importStar(o);let r=0;const a={createFragmentFromHtml(e){const t=document.createElement("div");a.setInnerHtml(t,e);const n=document.createDocumentFragment();for(;t.childNodes.length;)n.appendChild(t.childNodes[0]);return n},getUniqueId(){let e;do{e="wcf"+r++}while(null!==document.getElementById(e));return e},escapeAttributeSelector:e=>e.replace(/(["\\])/g,"\\$1"),identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=a.getUniqueId(),e.id=t),t},outerHeight(e,t){t=t||window.getComputedStyle(e);let n=e.offsetHeight;return n+=~~t.marginTop+~~t.marginBottom,n},outerWidth(e,t){t=t||window.getComputedStyle(e);let n=e.offsetWidth;return n+=~~t.marginLeft+~~t.marginRight,n},outerDimensions(e){const t=window.getComputedStyle(e);return{height:a.outerHeight(e,t),width:a.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let n=!1;Object.keys(t).forEach((o=>{/ !important$/.test(t[o])?(n=!0,t[o]=t[o].replace(/ !important$/,"")):n=!1,"important"!==e.style.getPropertyPriority(o)||n||e.style.removeProperty(o),e.style.setProperty(o,t[o],n?"important":"")}))},styleAsInt(e,t){const n=e.getPropertyValue(t);return null===n?0:parseInt(n,10)},setInnerHtml(e,t){let n;e.innerHTML=t,n=e instanceof HTMLTemplateElement?e.content:e;const o=n.querySelectorAll("script");for(let e=0,t=o.length;e<t;e++){const t=o[e],i=document.createElement("script");t.src?i.src=t.src:i.textContent=t.textContent,n.appendChild(i),t.remove()}},insertHtml(e,t,n){const o=document.createElement("template");a.setInnerHtml(o,e);const i=document.importNode(o.content,!0);switch(n){case"append":t.appendChild(i);break;case"after":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'after'.");t.parentNode.insertBefore(i,t.nextSibling);break;case"prepend":t.insertBefore(i,t.firstChild);break;case"before":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'before'.");t.parentNode.insertBefore(i,t);break;default:throw new Error("Unknown insert method '"+n+"'.")}},contains:(e,t)=>e.contains(t),getDataAttributes(e,t,n,i){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),n=!0===n,i=!0===i;const r={};for(let a=0,s=e.attributes.length;a<s;a++){const s=e.attributes[a];if(0===s.name.indexOf(t)){let e=s.name.replace(new RegExp("^"+t),"");if(n){const t=e.split("-");e="";for(let n=0,r=t.length;n<r;n++)e.length&&(i&&"id"===t[n]?t[n]="ID":t[n]=o.ucfirst(t[n])),e+=t[n]}r[e]=s.value}}return r},unwrapChildNodes(e){if(null===e.parentNode)throw new Error("The element has no parent.");const t=e.parentNode;for(;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);e.remove()},replaceElement(e,t){if(null===e.parentNode)throw new Error("The old element has no parent.");for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),e.remove()},isAtNodeStart:(e,t)=>i(e,t,"previous"),isAtNodeEnd:(e,t)=>i(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){a.isHidden(e)?a.show(e):a.hide(e)},innerError(e,t,n){const o=e.parentNode;if(null===o)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let i=o,r=e;i.classList.contains("inputAddon")&&(i=o.parentElement,r=o);let a=r.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=document.createElement("small"),a.className="innerError",i.insertBefore(a,r.nextSibling))),""===t?null!==a&&(a.remove(),a=null):n?a.innerHTML=t:a.textContent=t,a},innerSuccess(e,t,n){const o=e.parentNode;if(null===o)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let i=e.nextElementSibling;return null!==i&&"SMALL"===i.nodeName&&i.classList.contains("innerSuccess")||(""===t?i=null:(i=document.createElement("small"),i.className="innerSuccess",o.insertBefore(i,e.nextSibling))),""===t?null!==i&&(i.remove(),i=null):n?i.innerHTML=t:i.textContent=t,i},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=a,a})),define("WoltLabSuite/Core/Ajax/Error",["require","exports","tslib","../Component/Dialog","../Core","../Language","../StringUtil"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerGlobalRejectionHandler=t.InvalidJson=t.ExpectedJson=t.StatusNotOk=t.ConnectionError=t.ApiError=void 0,i=n.__importStar(i),r=n.__importStar(r);class s extends Error{name="ApiError"}t.ApiError=s;class l extends s{originalError;constructor(e){let t="Unknown error";e instanceof Error&&(t=e.message),super(t),this.name="ConnectionError",this.originalError=e}}t.ConnectionError=l;class c extends s{response;constructor(e){super("The API request returned a status code outside of the 200-299 range."),this.name="StatusNotOk",this.response=e}}t.StatusNotOk=c;class d extends s{response;constructor(e){super("The API did not return a JSON response."),this.name="ExpectedJson",this.response=e}}t.ExpectedJson=d;class u extends s{response;constructor(e){super("Failed to decode the JSON response from the API."),this.name="InvalidJson",this.response=e}}t.InvalidJson=u;let p=!1;t.registerGlobalRejectionHandler=function(){p||(window.addEventListener("unhandledrejection",(e=>{e.reason instanceof s&&(e.preventDefault(),async function(e){const t=await async function(e){let t="",n="";if(e instanceof l)n=e.originalError instanceof TypeError?r.get("wcf.global.error.ajax.network",{message:e.message}):e.message;else if(e instanceof u)n=await e.response.clone().text();else if(e instanceof d||e instanceof c){let o;try{o=await e.response.clone().json()}catch(t){n=await e.response.clone().text()}if(o&&i.isPlainObject(o)&&Object.keys(o).length>0)o.returnValues&&o.returnValues.description&&(t+=`<br><p>Description:</p><p>${o.returnValues.description}</p>`),o.file&&o.line&&(t+=`<br><p>File:</p><p>${o.file} in line ${o.line}</p>`),o.exception?t+=`<br>Exception: <div style="white-space: pre;">${(0,a.escapeHTML)(o.exception)}</div>`:o.stacktrace?t+=`<br><p>Stacktrace:</p><p>${o.stacktrace}</p>`:o.exceptionID&&(t+=`<br><p>Exception ID: <code>${o.exceptionID}</code></p>`),n=o.message,o.previous&&o.previous.forEach((e=>{t+=`<hr><p>${e.message}</p>`,t+=`<br><p>Stacktrace</p><p>${e.stacktrace}</p>`}));else if(void 0===o){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=n,e}}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return"";n="fetch() failed without a response body. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${n}</p>${t}</div>`}(e);if(t instanceof HTMLIFrameElement){const e=(0,o.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(r.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else""!==t&&(0,o.dialogFactory)().fromHtml(t).asAlert().show(r.get("wcf.global.error.title"))}(e.reason))})),p=!0)}})),define("WoltLabSuite/Core/Ajax/Backend",["require","exports","tslib","./Status","./Error","../Core"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0,o=n.__importStar(o);class a{url;constructor(e){this.url=e}get(){return new c(this.url,0)}post(e){return new l(this.url,1,e)}}let s=!1;window.addEventListener("beforeunload",(()=>s=!0));class l{#t;#n;#o;#i;#r=!0;#a=!1;constructor(e,t,n){this.#t=e,this.#n=t,this.#o=n}getAbortController(){return void 0===this.#i&&(this.#i=new AbortController),this.#i}disableLoadingIndicator(){return this.#r=!1,this}allowCaching(){return this.#a=!0,this}async fetchAsJson(){const e=await this.#s({headers:{accept:"application/json"}});if(void 0===e)return;const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new i.ExpectedJson(e);let n;try{n=await e.json()}catch(t){throw new i.InvalidJson(e)}return n}async fetchAsResponse(){return this.#s()}async#s(t={}){(0,i.registerGlobalRejectionHandler)();const a=(0,r.extend)({headers:{"X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":(0,r.getXsrfToken)()},mode:"same-origin",credentials:"same-origin",cache:this.#a?"default":"no-store",redirect:"error"},t);1===this.#n?(a.method="POST",this.#o&&(this.#o instanceof FormData?(a.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8",a.body=this.#o):(a.headers["Content-Type"]="application/json; charset=UTF-8",a.body=JSON.stringify(this.#o)))):a.method="GET",this.#i&&(a.signal=this.#i.signal);const l=this.#r;l&&o.show();try{const t=await fetch(this.#t,a);if(!t.ok)throw new i.StatusNotOk(t);return"yes"===t.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),t}catch(e){if(e instanceof i.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new i.ConnectionError(e)}finally{l&&o.hide()}}}class c extends l{allowCaching(){return super.allowCaching(),this}}t.prepareRequest=function(e){return new a(e)}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function n(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(o))}let o={editorAutosave:!0,editorInspector:!1,eventLogging:!1};const i={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(i).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){o.editorAutosave=!e&&!o.editorAutosave,n(),window.console.log("%c\tEditor autosave "+(o.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEditorInspector(e){o.editorInspector=!!e||!o.editorInspector,n(),window.console.log("%c\tEditor inspector "+(o.editorInspector?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){o.eventLogging=!!e||!o.eventLogging,n(),window.console.log("%c\tEvent logging "+(o.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=i,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(o=JSON.parse(e))}catch(e){}o.editorAutosave||i.toggleEditorAutosave(!0),o.editorInspector&&i.toggleEditorInspector(!0),o.eventLogging&&i.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>o.editorAutosave,editorInspector:()=>o.editorInspector,eventLog(e,t){o.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return i})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,n,o,i){"use strict";function r(e,t){"string"!=typeof t&&(t=void 0);const n=a.get(e);void 0!==n&&(void 0===t?a.delete(e):n.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,o=n.__importStar(o),i=n.__importDefault(i);const a=new Map;t.add=function(e,t,n){if("function"!=typeof n)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let i=a.get(e);void 0===i&&(i=new Map,a.set(e,i));let r=i.get(t);void 0===r&&(r=new Map,i.set(t,r));const s=o.getUuid();return r.set(s,n),s},t.fire=function(e,t,n){i.default._internal_.eventLog(e,t),n=n||{},a.get(e)?.get(t)?.forEach((e=>e(n)))},t.remove=function(e,t,n){a.get(e)?.get(t)?.delete(n)},t.removeAll=r,t.removeAllBySuffix=function(e,t){const n=a.get(e);if(void 0===n)return;const o=-1*(t="_"+t).length;n.forEach(((n,i)=>{i.substr(o)===t&&r(e,i)}))}})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports"],(function(e,t){"use strict";return class{_fieldId;_field;constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,n,o,i){"use strict";function r(){!0!==p?(p=!0,m=!1,i.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),p=!1,m&&r()):m=!0}function a(){const e=[];d.forEach(((t,n)=>{const i=document.getElementById(n);if(null===i)return void e.push(n);let r=!0;var a;t.forEach((e=>{var t;e.checkDependency()||(t=i,o.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&o.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,n=e.getAttribute("max");n&&(t.set("max",n),e.removeAttribute("max"));const o=e.getAttribute("maxlength");o&&(t.set("maxlength",o),e.removeAttribute("maxlength"));const i=e.getAttribute("min");i&&(t.set("min",i),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),r=!1)})),r&&(a=i,o.default.show(a),s.delete(a),a.classList.contains("tabMenuContent")&&a.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===a.dataset.name&&o.default.show(e)})),a.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==a&&!o.default.isHidden(t);)t=t.parentNode;if(t===a&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),r()}Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=t.isHiddenByDependencies=t.checkDependencies=t.checkContainers=t.addDependency=t.addContainerCheckCallback=void 0,o=n.__importDefault(o),i=n.__importStar(i);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let p=!1,m=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=o.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>a())):e.addEventListener("change",(()=>a())))}))},t.checkContainers=r,t.checkDependencies=a,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((n=>{n.contains(e)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,n)=>{t.contains(document.getElementById(n))&&d.delete(n),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))}})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterForm=t.registerForm=t.registerField=t.hasForm=t.hasField=t.getForm=t.getField=t.getData=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);const c=new Map,d=new Map;t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const n=e.getData();if(!(n instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(n)})),Promise.all(t).then((e=>e.reduce(((e,t)=>o.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof r.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const n=t.getId();if(s(e,n))throw new Error("Form field with id '"+n+"' has already been registered for form with id '"+e+"'.");c.get(e).set(n,t),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");i.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),a.unregister(e),i.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}})),define("WoltLabSuite/Core/Component/FormBuilder/Setup",["require","exports","tslib","../../Ajax/Backend","../../Dom/Util","../../Form/Builder/Manager"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderSetup=void 0,i=n.__importStar(i),r=n.__importStar(r);class a{async fromEndpoint(t){const a=await(0,o.prepareRequest)(t).get().fetchAsJson(),{dialogFactory:s}=await new Promise(((t,n)=>{e(["../Dialog"],t,n)})).then(n.__importStar),l=s().fromHtml(a.dialog).asPrompt();return new Promise((e=>{l.addEventListener("validate",(n=>{const s=r.getData(a.formId).then((async n=>{n instanceof Promise&&(n=await n);const s=await(0,o.prepareRequest)(t).post(n).fetchAsJson();return"dialog"in s?(r.unregisterForm(a.formId),i.setInnerHtml(l.content,s.dialog),!1):(l.addEventListener("primary",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!0,result:s.result})})),!0)}));n.detail.push(s)})),l.addEventListener("afterClose",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!1,result:void 0})})),l.show(a.title)}))}}t.FormBuilderSetup=a,t.default=a})),define("WoltLabSuite/Core/Component/Dialog/Setup",["require","exports","tslib","./Controls","../../Dom/Util","../FormBuilder/Setup"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogSetup=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r);class a{fromElement(e){e instanceof HTMLTemplateElement&&(e=e.content.cloneNode(!0));const t=document.createElement("woltlab-core-dialog");return t.content.append(e),e instanceof HTMLElement&&(e.hidden=!1),new o.default(t)}fromId(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find the element identified by '${e}'.`);return this.fromElement(t)}fromHtml(e){const t=i.createFragmentFromHtml(e);if(0===t.childElementCount&&""===t.textContent.trim())throw new TypeError("The provided HTML string was empty.");return this.fromElement(t)}usingFormBuilder(){return new r.default}withoutContent(){const e=document.createElement("woltlab-core-dialog");return new o.default(e)}}t.DialogSetup=a,t.default=a})),define("WoltLabSuite/Core/Helper/PageOverlay",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPageOverlayContainer=t.releasePageOverlayContainer=t.adoptPageOverlayContainer=void 0;const n=document.createElement("div");n.id="pageOverlayContainer";const o=[];t.adoptPageOverlayContainer=function(e){o.push(e),e.append(n)},t.releasePageOverlayContainer=function(e){if(!o.includes(e))throw new Error("Cannot release the page overlay from a container that (no longer) adopts it.",{cause:{element:e}});const t=o.indexOf(e);if(0===t)throw new Error("Cannot release the page overlay, there is no previous owner.",{cause:{element:e}});t!==o.length-1?o.splice(t,1):(o.pop(),o[o.length-1].append(n))},t.getPageOverlayContainer=function(){return n}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core"],(function(e,t,n,o){"use strict";function i(e){return r(e).mql.matches}function r(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");m.has(e)&&(e=m.get(e)),p.has(e)&&(e=p.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(a),s.set(e,t),e!==t.mql.media&&m.set(t.mql.media,e)),t}function a(e){const t=r(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()})),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setDialogContainer=t.pageOverlayIsActive=t.pageOverlayClose=t.pageOverlayOpen=t.scrollEnable=t.scrollDisable=t.is=t.remove=t.on=void 0,o=n.__importStar(o);const s=new Map;let l,c=0,d=0,u=0;const p=new Map(Object.entries({"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: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),m=new Map;t.on=function(e,t){const n=o.getUuid(),i=r(e);return"function"==typeof t.match&&i.callbacksMatch.set(n,t.match),"function"==typeof t.unmatch&&i.callbacksUnmatch.set(n,t.unmatch),"function"==typeof t.setup&&(i.mql.matches?t.setup():i.callbacksSetup.set(n,t.setup)),n},t.remove=function(e,t){const n=r(e);n.callbacksMatch.delete(t),n.callbacksUnmatch.delete(t),n.callbacksSetup.delete(t)},t.is=i,t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");i("screen-md-down")&&(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");i("screen-md-down")&&(e.style.removeProperty("position"),e.style.removeProperty("top")),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){}})),define("WoltLabSuite/Core/Element/woltlab-core-dialog",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Language","../Ui/Screen"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogElement=void 0,o=n.__importDefault(o),r=n.__importStar(r);const s=document.createElement("div");class l extends HTMLElement{#l;#e;#c;#d;constructor(){super(),this.#l=document.createElement("div"),this.#e=document.createElement("dialog"),this.#d=document.createElement("div")}show(e){if(0===e.trim().length)throw new Error("Cannot open the modal dialog without a title.");this.#d.textContent=e,this.open||(null===s.parentElement&&document.getElementById("content").append(s),this.parentElement!==s&&s.append(this),this.#e.showModal(),(0,i.adoptPageOverlayContainer)(this.#e),(0,a.scrollDisable)())}close(){this.#e.close(),this.#u()}#u(){if(null===this.parentNode)return;const e=new CustomEvent("afterClose");this.dispatchEvent(e),(0,i.releasePageOverlayContainer)(this.#e),(0,a.scrollEnable)(),this.remove()}get dialog(){return this.#e}get content(){return this.#l}get open(){return this.#e.open}get incomplete(){return this.hasAttribute("incomplete")}set incomplete(e){e?this.setAttribute("incomplete",""):this.removeAttribute("incomplete")}attachControls(e){if(void 0!==this.#c)throw new Error("There is already a form control attached to this dialog.");void 0!==e.extra&&void 0===e.cancel&&(e.cancel="");const t=document.createElement("woltlab-core-dialog-control");t.primary=e.primary,void 0!==e.cancel&&(t.cancel=e.cancel),void 0!==e.extra&&(t.extra=e.extra),this.#c=document.createElement("form"),this.#c.method="dialog",this.#c.classList.add("dialog__form"),this.#l.insertAdjacentElement("beforebegin",this.#c),this.#c.append(this.#l,t),e.isAlert&&(void 0===e.cancel?this.#e.setAttribute("role","alert"):this.#e.setAttribute("role","alertdialog")),this.#c.addEventListener("submit",(e=>{if(this.incomplete)return void e.preventDefault();const t=new CustomEvent("validate",{cancelable:!0,detail:[]});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():t.detail.length>0?(e.preventDefault(),this.incomplete=!0,Promise.all(t.detail).then((e=>{this.incomplete=!1,e.some((e=>!1===e))||(this.#p(),this.#m()&&this.close())}))):this.#m()||(e.preventDefault(),this.#p())})),this.#e.addEventListener("close",(()=>{""===this.#e.returnValue||this.#p(),this.#u()})),t.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this.#m()&&this.close()})),void 0!==e.extra&&t.addEventListener("extra",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)}))}#p(){const e=new CustomEvent("primary");this.dispatchEvent(e)}connectedCallback(){if(null!==this.#e.parentElement)return;let e;const t=this.#e.getAttribute("role");"alert"!==t&&"alertdialog"!==t&&(e=document.createElement("button"),e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialog__closeButton","jsTooltip"),e.title=r.get("wcf.dialog.button.close"),e.addEventListener("click",(()=>{if(this.#m()){const e=new CustomEvent("cancel",{cancelable:!1});this.dispatchEvent(e),this.close()}})));const n=document.createElement("div");n.classList.add("dialog__header"),this.#d.classList.add("dialog__title"),n.append(this.#d),e&&n.append(e);const i=document.createElement("div");i.classList.add("dialog__document"),i.setAttribute("role","document"),i.append(n),this.#l.classList.add("dialog__content"),this.#c?i.append(this.#c):i.append(this.#l),this.#e.append(i),this.#e.classList.add("dialog"),this.#e.setAttribute("aria-labelledby",o.default.identify(this.#d)),this.#e.addEventListener("cancel",(e=>{const t=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():this.#m()?this.#u():e.preventDefault()})),this.#e.addEventListener("mousedown",(e=>{if(e.target===this.#e){const e=new CustomEvent("backdrop",{cancelable:!0});if(this.dispatchEvent(e),e.defaultPrevented)return;this.#m()&&this.close()}})),this.append(this.#e)}#m(){const e=new CustomEvent("close",{cancelable:!0});return this.dispatchEvent(e),!1===e.defaultPrevented}}t.WoltlabCoreDialogElement=l,window.customElements.define("woltlab-core-dialog",l),t.default=l})),define("WoltLabSuite/Core/Element/woltlab-core-dialog-control",["require","exports","tslib","../Language"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogControlElement=void 0,o=n.__importStar(o);class i extends HTMLElement{#h;#f;#g;set primary(e){this.setAttribute("primary",e)}get primary(){let e=this.getAttribute("primary");return e||(e=o.get("wcf.dialog.button.primary")),e}set cancel(e){void 0===e?this.removeAttribute("cancel"):this.setAttribute("cancel",e)}get cancel(){let e=this.getAttribute("cancel");if(null!==e)return""===e&&(e=o.get("wcf.global.confirmation.cancel")),e}set extra(e){void 0===e?this.removeAttribute("extra"):this.setAttribute("extra",e)}get extra(){const e=this.getAttribute("extra");if(null!==e)return e}connectedCallback(){const e=this.closest("woltlab-core-dialog");this.classList.add("dialog__control"),this.hasAttribute("primary")||this.setAttribute("primary",""),void 0===this.#g&&(this.#g=document.createElement("button"),this.#g.type="submit",this.#g.value="primary",this.#g.autofocus=!0,this.#g.classList.add("button","buttonPrimary","dialog__control__button","dialog__control__button--primary"),this.#g.textContent=this.primary,this.append(this.#g),new MutationObserver((()=>{this.#g.disabled=e.incomplete})).observe(e,{attributeFilter:["incomplete"]}),e.incomplete&&(this.#g.disabled=!0)),void 0===this.#h&&void 0!==this.cancel&&(this.#h=document.createElement("button"),this.#h.type="button",this.#h.value="cancel",this.#h.classList.add("button","dialog__control__button","dialog__control__button--cancel"),this.#h.textContent=this.cancel,this.#h.addEventListener("click",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e)})),this.append(this.#h),e.addEventListener("backdrop",(e=>{e.preventDefault(),this.#h.click()}))),void 0===this.#f&&void 0!==this.extra&&(this.#f=document.createElement("button"),this.#f.type="button",this.#f.value="extra",this.#f.classList.add("button","dialog__control__button","dialog__control__button--extra"),this.#f.textContent=this.extra,this.#f.addEventListener("click",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)})),this.append(this.#f))}}t.WoltlabCoreDialogControlElement=i,window.customElements.define("woltlab-core-dialog-control",i),t.default=i})),define("WoltLabSuite/Core/Component/Dialog",["require","exports","./Dialog/Setup","../Element/woltlab-core-dialog","../Element/woltlab-core-dialog-control"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dialogFactory=void 0,t.dialogFactory=function(){return new n.DialogSetup}})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Language","../Component/Dialog","../StringUtil"],(function(e,t,n,o,i,r,a,s,l){"use strict";o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);let c=!1,d=!1;return class{_options;_data;_xhr;constructor(e){this._options=i.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=i.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),c||(c=!0,window.addEventListener("beforeunload",(()=>d=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||o.show(),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.responseType&&this._xhr.setRequestHeader("Accept",this._options.responseType),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=i.clone(this._options),n=this._xhr;if(n.onload=()=>{n.readyState===XMLHttpRequest.DONE&&(n.status>=200&&n.status<300||304===n.status?204===n.status?this._success(n,t):t.responseType&&this.getContentType(n)!==t.responseType?this._failure(n,t):this._success(n,t):this._failure(n,t))},n.onerror=()=>{this._failure(n,t)},this._options.progress&&(n.onprogress=this._options.progress),this._options.uploadProgress&&(n.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==i.getType(e)&&(e=i.serialize(e)),n.send(e)}else n.send()}abortPrevious(){void 0!==this._xhr&&(this._xhr.abort(),this._xhr=void 0,this._options.silent||o.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==i.getType(e)&&(e=i.extend(this._data,e)),this._options.data=e}_success(t,i){if(i.silent||o.hide(),"function"==typeof i.success){let o=null;if("application/json"===this.getContentType(t)){try{o=JSON.parse(t.responseText)}catch(e){return void this._failure(t,i)}o&&o.returnValues&&void 0!==o.returnValues.template&&(o.returnValues.template=o.returnValues.template.trim()),"yes"===t.getResponseHeader("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke()))}i.success(o||{},t.responseText,t,i.data)}this._finalize(t,i)}_failure(e,t){if(d)return;t.silent||o.hide();let n=null;try{n=JSON.parse(e.responseText)}catch(e){}let i=!0;if("function"==typeof t.failure&&(i=!1!==t.failure(n||{},e.responseText||"",e,t.data)),!0!==t.ignoreError&&i){const t=this.getErrorHtml(n,e);if(t instanceof HTMLIFrameElement){const e=(0,s.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(a.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else t&&(0,s.dialogFactory)().fromHtml(t).asAlert().show(a.get("wcf.global.error.title"))}this._finalize(e,t)}getErrorHtml(e,t){let n,o="";if(null!==e&&Object.keys(e).length>0)e.returnValues&&e.returnValues.description&&(o+=`<br><p>Description:</p><p>${e.returnValues.description}</p>`),e.file&&e.line&&(o+=`<br><p>File:</p><p>${e.file} in line ${e.line}</p>`),e.extraInformation&&(o+="<br>",o+=e.extraInformation.map((([e,t])=>`<p>${e}: <code>${t.toString()}</code></p>`)).join("")),e.exception?o+=`<br>Exception: <div style="white-space: pre;">${(0,l.escapeHTML)(e.exception)}</div>`:e.stacktrace?o+=`<br><p>Stacktrace:</p><pre>${e.stacktrace}</pre>`:e.exceptionID&&(o+=`<br><p>Exception ID: <code>${e.exceptionID}</code></p>`),n=e.message,e.previous&&e.previous.forEach((e=>{o+=`<hr><p>${e.message}</p>`,o+=`<br><p>Stacktrace</p><pre>${e.stacktrace}</pre>`}));else{if(t.getResponseHeader("content-type")?.startsWith("text/html")){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=t.responseText,e}n=t.responseText}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return null;n="XMLHttpRequest failed without a responseText. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${n}</p>${o}</div>`}_finalize(e,t){"function"==typeof t.finalize&&t.finalize(e),this._xhr===e&&(this._xhr=void 0),r.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}getContentType(e){const t=e.getResponseHeader("content-type");return null===t?null:t.split(";",1)[0].trim()}}})),define("WoltLabSuite/Core/Ajax/DboAction",["require","exports","tslib","./Error","./Status","../Core"],(function(e,t,n,o,i,r){"use strict";async function a(e){const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new o.ExpectedJson(e);let n;try{n=await e.json()}catch(t){throw new o.InvalidJson(e)}return n}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.DboAction=void 0,i=n.__importStar(i),r=n.__importStar(r);class l{#b;#v;#w=[];#o={};#r=!0;#y;constructor(e,t){this.#b=e,this.#v=t}static prepare(e,t){return void 0===s&&(s=!1,window.addEventListener("beforeunload",(()=>{s=!0}))),new l(e,t)}getAbortController(){return void 0===this.#y&&(this.#y=new AbortController),this.#y}objectIds(e){return this.#w=e,this}payload(e){return this.#o=e,this}disableLoadingIndicator(){return this.#r=!1,this}async dispatch(){(0,o.registerGlobalRejectionHandler)();const t=window.WSC_API_URL+"index.php?ajax-proxy/&t="+r.getXsrfToken(),l={actionName:this.#b,className:this.#v};this.#w&&(l.objectIDs=this.#w),this.#o&&(l.parameters=this.#o);const c={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":r.getXsrfToken(),Accept:"application/json"},body:r.serialize(l),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error"};this.#y&&(c.signal=this.#y.signal);const d=this.#r;d&&i.show();try{const i=await fetch(t,c);if(!i.ok)throw new o.StatusNotOk(i);const r=await a(i);return"yes"===i.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),r.returnValues}catch(e){if(e instanceof o.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new o.ConnectionError(e)}finally{d&&i.hide()}}}t.DboAction=l,t.default=l,t.handleValidationErrors=async function(e,t){if(!(e instanceof o.StatusNotOk))throw e;const n=e.response.clone();try{const e=await a(n);if(function(e){return"code"in e&&"returnValues"in e}(e)&&412===e.code&&!0===t(e.returnValues))return}catch{}throw e}})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request","./Core","./Ajax/DboAction","./Ajax/DboAction"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.dboAction=t.getRequestObject=t.apiOnce=t.api=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r);const s=new WeakMap;t.api=function(e,t,n,r){"object"!=typeof t&&(t={});let a=s.get(e);if(void 0===a){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+i.getXsrfToken(),t.withCredentials=!0),a=new o.default(t),s.set(e,a)}let l=null,c=null;return"function"==typeof n&&(l=a.getOption("success"),a.setOption("success",n)),"function"==typeof r&&(c=a.getOption("failure"),a.setOption("failure",r)),a.setData(t),a.sendRequest(),null!==l&&a.setOption("success",l),null!==c&&a.setOption("failure",c),a},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+i.getXsrfToken(),e.withCredentials=!0),new o.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!s.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return s.get(e)},t.dboAction=function(e,t){return r.default.prepare(e,t)},Object.defineProperty(t,"handleValidationErrors",{enumerable:!0,get:function(){return a.handleValidationErrors}})})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,o=n.__importStar(o);class i{_invocations=0;_isBusy=!1;_url;constructor(e){this._url=e}invoke(){this._isBusy||(this._isBusy=!0,o.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let r;t.setUrl=function(e){r||(r=new i(e))},t.invoke=function(){r?r.invoke():console.error("The background queue has not been initialized yet.")}})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,o=n.__importStar(o);const i=document.documentElement.lang,r=new Intl.DateTimeFormat(i,{dateStyle:"long"}),a=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"numeric"}),s=new Intl.DateTimeFormat(i,{year:"numeric",day:"numeric",month:"long",hour:"numeric",minute:"numeric"});t.formatDate=function(e){return r.format(e)},t.formatTime=function(e){return a.format(e)},t.formatDateTime=function(e){return s.format(e)},t.format=function(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let n="";for(let i=0,r=t.length;i<r;i++){let a;switch(t[i]){case"s":a=e.getSeconds().toString().padStart(2,"0");break;case"i":a=e.getMinutes().toString().padStart(2,"0");break;case"a":a=e.getHours()>11?"pm":"am";break;case"g":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString(),a=a.padStart(2,"0");break}case"A":a=e.getHours()>11?"PM":"AM";break;case"G":a=e.getHours().toString();break;case"H":a=e.getHours().toString().padStart(2,"0");break;case"d":a=e.getDate().toString().padStart(2,"0");break;case"j":a=e.getDate().toString();break;case"l":a=o.get("__days")[e.getDay()];break;case"D":a=o.get("__daysShort")[e.getDay()];break;case"S":a="";break;case"m":a=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":a=(e.getMonth()+1).toString();break;case"F":a=o.get("__months")[e.getMonth()];break;case"M":a=o.get("__monthsShort")[e.getMonth()];break;case"y":a=e.getFullYear().toString().slice(-2);break;case"Y":a=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();a=t>0?"-":"+",t=Math.abs(t),a+=(~~(t/60)).toString().padStart(2,"0"),a+=":",a+=(t%60).toString().padStart(2,"0");break}case"r":a=e.toString();break;case"U":a=Math.round(e.getTime()/1e3).toString();break;case"\\":a="",i+1<r&&(a=t[++i]);break;default:a=t[i]}n+=a}return n},t.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)},t.getTimeElement=function(e){const t=document.createElement("woltlab-core-date-time");return t.date=e,e.getTime()>Date.now()&&(t.static=!0),t},t.getTimezoneDate=function(e,t){const n=6e4*new Date(e).getTimezoneOffset();return new Date(e+n+t)}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const o=[];for(let i=0;i<e.childElementCount;i++)r.get(t)(e.children[i],n)&&o.push(e.children[i]);return o}function o(e,t,n,o){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");let i=e.parentNode;for(;i instanceof Element;){if(i===o)return null;if(r.get(t)(i,n))return i;i=i.parentNode}return null}function i(e,t,n,o){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&r.get(n)(e[t],o)?e[t]:null}Object.defineProperty(t,"__esModule",{value:!0}),t.prevByTag=t.prevByClass=t.prevBySel=t.prev=t.nextByTag=t.nextByClass=t.nextBySel=t.next=t.parentByTag=t.parentByClass=t.parentBySel=t.childrenByTag=t.childrenByClass=t.childrenBySel=t.childByTag=t.childByClass=t.childBySel=void 0;const r=new Map([[0,()=>!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]]);t.childBySel=function(e,t){return n(e,1,t)[0]||null},t.childByClass=function(e,t){return n(e,2,t)[0]||null},t.childByTag=function(e,t){return n(e,3,t)[0]||null},t.childrenBySel=function(e,t){return n(e,1,t)},t.childrenByClass=function(e,t){return n(e,2,t)},t.childrenByTag=function(e,t){return n(e,3,t)},t.parentBySel=function(e,t,n){return o(e,1,t,n)},t.parentByClass=function(e,t,n){return o(e,2,t,n)},t.parentByTag=function(e,t,n){return o(e,3,t,n)},t.next=function(e){return i(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return i(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return i(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return i(e,"nextElementSibling",3,t)},t.prev=function(e){return i(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return i(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return i(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return i(e,"previousElementSibling",3,t)}})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.touch=t.platform=t.browser=t.setup=void 0;let n="other",o="desktop",i=!1;t.setup=function(){if("object"==typeof window.chrome)n="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,o=e.length;t<o;t++){const o=e[t];0===o.indexOf("-ms-")?n="microsoft":0===o.indexOf("-moz-")?n="firefox":"firefox"!==n&&0===o.indexOf("-webkit-")&&(n="safari")}}const e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("crios")?(n="chrome",o="ios"):/(?:iphone|ipad|ipod)/.test(e)?(n="safari",o="ios"):-1!==e.indexOf("android")?o="android":-1!==e.indexOf("iemobile")&&(n="microsoft",o="windows"),"desktop"!==o||-1===e.indexOf("mobile")&&-1===e.indexOf("tablet")||(o="mobile"),i="ontouchstart"in window||"msMaxTouchPoints"in window.navigator&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(n="safari",o="ios")},t.browser=function(){return n},t.platform=function(){return o},t.touch=function(){return i}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language","../Environment"],(function(e,t,n,o,i,r,a,s){"use strict";function l(e,t,n,o,i,r,a){let s="auto",l="auto",c=!0,d=50;const u=document.getElementById("pageHeaderPanel");if(null!==u){const e=window.getComputedStyle(u).position;d="fixed"===e||"static"===e?u.offsetHeight:0}if(a)if("top"===e){const e=o.top-r;s=i-e,e-t.height<d&&(c=!1)}else l=o.top+n.height+r,l+t.height>i&&(c=!1);else{const a=o.top+window.scrollY;if("top"===e){const{clientHeight:e}=document.body;s=e-a+r,e-(s+t.height)<window.scrollY+d&&(c=!1)}else l=a+n.height+r,l+t.height-window.scrollY>i&&(c=!1)}return{align:e,bottom:s,top:l,result:c}}function c(e,t,n,o,i){let r="auto",a="auto",s=!0;return"left"===e?(r=o.left,r+t.width>i&&(s=!1)):"right"===e?o.left+n.width<t.width?s=!1:(a=i-(o.left+n.width),a<0&&(s=!1)):(r=o.left+n.width/2-t.width/2,r=~~r,(r<0||r+t.width>i)&&(s=!1)),{align:e,left:r,right:a,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s),t.set=function(e,t,n){let d;n=o.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},n||{}),Array.isArray(n.pointerClassNames)&&n.pointerClassNames.length===(n.pointer?1:2)||(n.pointerClassNames=[]),-1===["left","right","center"].indexOf(n.horizontal)&&(n.horizontal="left"),"bottom"!==n.vertical&&(n.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(n.allowFlip)&&(n.allowFlip="both"),"none"===window.getComputedStyle(e).display&&(d=e.style.getPropertyValue("display"),e.style.setProperty("display","block")),r.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const u=r.default.outerDimensions(e),p=r.default.outerDimensions(n.refDimensionsElement instanceof HTMLElement?n.refDimensionsElement:t),m=t.getBoundingClientRect(),h=window.innerHeight,f=document.body.clientWidth;let g=null,b=!1;if("center"===n.horizontal&&(b=!0,g=c(n.horizontal,u,p,m,f),g.result||("both"===n.allowFlip||"horizontal"===n.allowFlip?n.horizontal="left":g.result=!0)),"rtl"===a.get("wcf.global.pageDirection")&&(n.horizontal="left"===n.horizontal?"right":"left"),null===g||!g.result){const e=g;if(g=c(n.horizontal,u,p,m,f),!g.result&&("both"===n.allowFlip||"horizontal"===n.allowFlip)){const t=c("left"===n.horizontal?"right":"left",u,p,m,f);if(t.result)g=t;else if(b)g=e;else if(u.width===f)g={align:"left",left:0,result:!0,right:0};else if(u.width<f){const e=f-(m.left+p.width),t=m.left<=e;g={align:t?"left":"right",left:t?0:"auto",result:!0,right:t?"auto":0}}}}const v="fixed"===window.getComputedStyle(e).position,w=g.left,y=g.right;let _=l(n.vertical,u,p,m,h,n.verticalOffset,v);if(!_.result&&("both"===n.allowFlip||"vertical"===n.allowFlip)){const e=l("top"===n.vertical?"bottom":"top",u,p,m,h,n.verticalOffset,v);if(e.result)_=e;else if("desktop"!==s.platform())if(u.height===h)_={align:"top",bottom:0,result:!0,top:0};else if(u.height<h){const e=h-(m.top+p.height),t=m.top<=e;_={align:t?"top":"bottom",bottom:t?0:"auto",result:!0,top:t?"auto":0}}}const E=_.bottom,S=_.top;if(n.pointer){const t=i.childrenByClass(e,"elementPointer")[0]||null;if(null===t)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===g.align?(t.classList.add("center"),t.classList.remove("left","right")):(t.classList.add(g.align),t.classList.remove("center"),t.classList.remove("left"===g.align?"right":"left")),"top"===_.align?t.classList.add("flipVertical"):t.classList.remove("flipVertical")}else 2===n.pointerClassNames.length&&(e.classList["auto"===S?"add":"remove"](n.pointerClassNames[0]),e.classList["auto"===w?"add":"remove"](n.pointerClassNames[1]));r.default.setStyles(e,{bottom:"auto"===E?E:Math.round(E).toString()+"px",left:"auto"===w?w:Math.ceil(w).toString()+"px",right:"auto"===y?y:Math.floor(y).toString()+"px",top:"auto"===S?S:Math.round(S).toString()+"px"}),r.default.show(e),e.style.removeProperty("visibility"),void 0!==d&&(""===d?e.style.removeProperty("display"):e.style.setProperty("display",d))}})),define("WoltLabSuite/Core/Ui/CloseOverlay",["require","exports","tslib","../CallbackList"],(function(e,t,n,o){"use strict";function i(e,t){s.add(e,t),c||(document.body.addEventListener("click",(()=>{a(l.Document)})),c=!0)}function r(e){s.remove(e)}function a(e,t){s.forEach(null,(n=>n(e,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.remove=t.add=t.Origin=void 0;const s=new((o=n.__importDefault(o)).default);var l;!function(e){e.Document="document",e.DropDown="dropdown",e.Search="search"}(l||(t.Origin=l={}));let c=!1;t.add=i,t.remove=r,t.execute=a;const d={add:i,remove:r,execute:a};t.default=d})),function(e,t){var n,o;"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("tabbable",["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.tabbable,t(o=e.tabbable={}),o.noConflict=function(){return e.tabbable=n,o})}(this,(function(e){"use strict";var t=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=t.join(","),o="undefined"==typeof Element,i=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!o&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},a=function e(t,n){var o,i;return void 0===n&&(n=!0),""===(i=null==t||null===(o=t.getAttribute)||void 0===o?void 0:o.call(t,"inert"))||"true"===i||n&&t&&e(t.parentNode)},s=function(e,t,o){if(a(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(n));return t&&i.call(e,n)&&r.unshift(e),r.filter(o)},l=function e(t,o,r){var s,l,c,d,u,p,m,h;for(s=[],l=Array.from(t);l.length;)c=l.shift(),a(c,!1)||("SLOT"===c.tagName?(u=e((d=c.assignedElements()).length?d:c.children,!0,r),r.flatten?s.push.apply(s,u):s.push({scopeParent:c,candidates:u})):(i.call(c,n)&&r.filter(c)&&(o||!t.includes(c))&&s.push(c),p=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),m=!a(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c)),p&&m?(h=e(!0===p?c.children:p.children,!0,r),r.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})):l.unshift.apply(l,c.children)));return s},c=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},d=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!c(e)?0:e.tabIndex},u=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return"INPUT"===e.tagName},m=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return 0===n&&0===o},h=function(e,t){return!(t.disabled||a(t)||function(e){return p(e)&&"hidden"===e.type}(t)||function(e,t){var n,o,a,s,l=t.displayCheck,c=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;if(n=i.call(e,"details>summary:first-of-type")?e.parentElement:e,i.call(n,"details:not([open]) *"))return!0;if(l&&"full"!==l&&"legacy-full"!==l){if("non-zero-area"===l)return m(e)}else{if("function"==typeof c){for(o=e;e;){if(a=e.parentElement,s=r(e),a&&!a.shadowRoot&&!0===c(a))return m(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=o}if(function(e){var t,n,o,i,a,s,l,c=e&&r(e),d=null===(t=c)||void 0===t?void 0:t.host,u=!1;if(c&&c!==e)for(u=!!(null!==(n=d)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(d)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!u&&d;)u=!(null===(s=d=null===(a=c=r(d))||void 0===a?void 0:a.host)||void 0===s||null===(l=s.ownerDocument)||void 0===l||!l.contains(d));return u}(e))return!e.getClientRects().length;if("legacy-full"!==l)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){var t,n,o;if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(n=0;n<t.children.length;n++)if("LEGEND"===(o=t.children.item(n)).tagName)return!!i.call(t,"fieldset[disabled] *")||!o.contains(e);return!0}t=t.parentElement}return!1}(t))},f=function(e,t){return!(function(e){return function(e){return p(e)&&"radio"===e.type}(e)&&!function(e){var t,n,o,i;if(!e.name)return!0;if(n=e.form||r(e),o=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')},"undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=o(window.CSS.escape(e.name));else try{t=o(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}return i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form),!i||i===e}(e)}(t)||d(t)<0||!h(e,t))},g=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},b=function e(t){var n=[],o=[];return t.forEach((function(t,i){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var n=d(e);return n<0&&t&&!c(e)?0:n}(a,r),l=r?e(t.candidates):a;0===s?r?n.push.apply(n,l):n.push(a):o.push({documentOrder:i,tabIndex:s,item:t,isScope:r,content:l})})),o.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},v=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,h.bind(null,t))},e.getTabIndex=d,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==i.call(e,v)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==i.call(e,n)&&f(t,e)},e.tabbable=function(e,t){var n;return n=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:f.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):s(e,t.includeContainer,f.bind(null,t)),b(n)},Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){var n,o;"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define("focus-trap",["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.focusTrap,t(o=e.focusTrap={},e.tabbable),o.noConflict=function(){return e.focusTrap=n,o})}(this,(function(e,t){"use strict";function n(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)),o}function o(e){var t,o;for(t=1;t<arguments.length;t++)o=null!=arguments[t]?arguments[t]:{},t%2?n(Object(o),!0).forEach((function(t){i(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}));return e}function i(e,t,n){return(t=function(e){var t=function(e,t){var n,o;if("object"!=typeof e||null===e)return e;if(void 0!==(n=e[Symbol.toPrimitive])){if("object"!=typeof(o=n.call(e,"string")))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},a=function(e){return r(e)&&!e.shiftKey},s=function(e){return r(e)&&e.shiftKey},l=function(e){return setTimeout(e,0)},c=function(e,t){var n=-1;return e.every((function(e,o){return!t(e)||(n=o,!1)})),n},d=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return"function"==typeof e?e.apply(void 0,n):e},u=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},p=[];e.createFocusTrap=function(e,n){var i,m=(null==n?void 0:n.document)||document,h=(null==n?void 0:n.trapStack)||p,f=o({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:a,isKeyBackward:s},n),g={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b=function(e,t,n){return e&&void 0!==e[t]?e[t]:f[n||t]},v=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return g.containerGroups.findIndex((function(t){var o=t.container,i=t.tabbableNodes;return o.contains(e)||(null==n?void 0:n.includes(o))||i.find((function(t){return t===e}))}))},w=function(e){var t,n,o,i,r=f[e];if("function"==typeof r){for(t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r=r.apply(void 0,n)}if(!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}if(i=r,"string"==typeof r&&!(i=m.querySelector(r)))throw new Error("`".concat(e,"` as selector refers to no known node"));return i},y=function(){var e,n=w("initialFocus");if(!1===n)return!1;if(void 0!==n&&t.isFocusable(n,f.tabbableOptions)||(n=v(m.activeElement)>=0?m.activeElement:(e=g.tabbableGroups[0])&&e.firstTabbableNode||w("fallbackFocus")),!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},_=function(){if(g.containerGroups=g.containers.map((function(e){var n=t.tabbable(e,f.tabbableOptions),o=t.focusable(e,f.tabbableOptions),i=n.length>0?n[0]:void 0,r=n.length>0?n[n.length-1]:void 0,a=o.find((function(e){return t.isTabbable(e)})),s=o.slice().reverse().find((function(e){return t.isTabbable(e)})),l=!!n.find((function(e){return t.getTabIndex(e)>0}));return{container:e,tabbableNodes:n,focusableNodes:o,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.indexOf(e);return r<0?i?o.slice(o.indexOf(e)+1).find((function(e){return t.isTabbable(e)})):o.slice(0,o.indexOf(e)).reverse().find((function(e){return t.isTabbable(e)})):n[r+(i?1:-1)]}}})),g.tabbableGroups=g.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),g.tabbableGroups.length<=0&&!w("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(g.containerGroups.find((function(e){return e.posTabIndexesFound}))&&g.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},E=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!f.preventScroll}),g.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(y()))},S=function(e){var t=w("setReturnFocus",e);return t||!1!==t&&e},L=function(e){var n,o,i,a,s,l,d,p,m,h=e.target,b=e.event,y=e.isBackward,E=void 0!==y&&y;return h=h||u(b),_(),n=null,g.tabbableGroups.length>0?(i=(o=v(h,b))>=0?g.containerGroups[o]:void 0,o<0?n=E?g.tabbableGroups[g.tabbableGroups.length-1].lastTabbableNode:g.tabbableGroups[0].firstTabbableNode:E?(a=c(g.tabbableGroups,(function(e){var t=e.firstTabbableNode;return h===t})),a<0&&(i.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!i.nextTabbableNode(h,!1))&&(a=o),a>=0?(s=0===a?g.tabbableGroups.length-1:a-1,l=g.tabbableGroups[s],n=t.getTabIndex(h)>=0?l.lastTabbableNode:l.lastDomTabbableNode):r(b)||(n=i.nextTabbableNode(h,!1))):(d=c(g.tabbableGroups,(function(e){var t=e.lastTabbableNode;return h===t})),d<0&&(i.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!i.nextTabbableNode(h))&&(d=o),d>=0?(p=d===g.tabbableGroups.length-1?0:d+1,m=g.tabbableGroups[p],n=t.getTabIndex(h)>=0?m.firstTabbableNode:m.firstDomTabbableNode):r(b)||(n=i.nextTabbableNode(h)))):n=w("fallbackFocus"),n},C=function(e){var t=u(e);v(t,e)>=0||(d(f.clickOutsideDeactivates,e)?i.deactivate({returnFocus:f.returnFocusOnDeactivate}):d(f.allowOutsideClick,e)||e.preventDefault())},k=function(e){var n,o,i,r,a,s=u(e),l=v(s,e)>=0;l||s instanceof Document?l&&(g.mostRecentlyFocusedNode=s):(e.stopImmediatePropagation(),o=!0,g.mostRecentlyFocusedNode?t.getTabIndex(g.mostRecentlyFocusedNode)>0?(i=v(g.mostRecentlyFocusedNode),(r=g.containerGroups[i].tabbableNodes).length>0&&(a=r.findIndex((function(e){return e===g.mostRecentlyFocusedNode})),a>=0&&(f.isKeyForward(g.recentNavEvent)?a+1<r.length&&(n=r[a+1],o=!1):a-1>=0&&(n=r[a-1],o=!1)))):g.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return t.getTabIndex(e)>0}))}))||(o=!1):o=!1,o&&(n=L({target:g.mostRecentlyFocusedNode,isBackward:f.isKeyBackward(g.recentNavEvent)})),E(n||g.mostRecentlyFocusedNode||y())),g.recentNavEvent=void 0},x=function(e){if(("Escape"===(null==(t=e)?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode))&&!1!==d(f.escapeDeactivates,e))return e.preventDefault(),void i.deactivate();var t;(f.isKeyForward(e)||f.isKeyBackward(e))&&function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.recentNavEvent=e,(t=L({event:e,isBackward:n}))&&(r(e)&&e.preventDefault(),E(t))}(e,f.isKeyBackward(e))},T=function(e){var t=u(e);v(t,e)>=0||d(f.clickOutsideDeactivates,e)||d(f.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},M=function(){if(g.active)return function(e,t){var n,o;e.length>0&&(n=e[e.length-1])!==t&&n.pause(),-1===(o=e.indexOf(t))||e.splice(o,1),e.push(t)}(h,i),g.delayInitialFocusTimer=f.delayInitialFocus?l((function(){E(y())})):E(y()),m.addEventListener("focusin",k,!0),m.addEventListener("mousedown",C,{capture:!0,passive:!1}),m.addEventListener("touchstart",C,{capture:!0,passive:!1}),m.addEventListener("click",T,{capture:!0,passive:!1}),m.addEventListener("keydown",x,{capture:!0,passive:!1}),i},I=function(){if(g.active)return m.removeEventListener("focusin",k,!0),m.removeEventListener("mousedown",C,!0),m.removeEventListener("touchstart",C,!0),m.removeEventListener("click",T,!0),m.removeEventListener("keydown",x,!0),i},D="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===g.mostRecentlyFocusedNode}))}))&&E(y())})):void 0,A=function(){D&&(D.disconnect(),g.active&&!g.paused&&g.containers.map((function(e){D.observe(e,{subtree:!0,childList:!0})})))};return(i={get active(){return g.active},get paused(){return g.paused},activate:function(e){var t,n,o,i;return g.active?this:(t=b(e,"onActivate"),n=b(e,"onPostActivate"),(o=b(e,"checkCanFocusTrap"))||_(),g.active=!0,g.paused=!1,g.nodeFocusedBeforeActivation=m.activeElement,null==t||t(),i=function(){o&&_(),M(),A(),null==n||n()},o?(o(g.containers.concat()).then(i,i),this):(i(),this))},deactivate:function(e){var t,n,r,a,s,c;return g.active?(t=o({onDeactivate:f.onDeactivate,onPostDeactivate:f.onPostDeactivate,checkCanReturnFocus:f.checkCanReturnFocus},e),clearTimeout(g.delayInitialFocusTimer),g.delayInitialFocusTimer=void 0,I(),g.active=!1,g.paused=!1,A(),function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}(h,i),n=b(t,"onDeactivate"),r=b(t,"onPostDeactivate"),a=b(t,"checkCanReturnFocus"),s=b(t,"returnFocus","returnFocusOnDeactivate"),null==n||n(),c=function(){l((function(){s&&E(S(g.nodeFocusedBeforeActivation)),null==r||r()}))},s&&a?(a(S(g.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)):this},pause:function(e){if(g.paused||!g.active)return this;var t=b(e,"onPause"),n=b(e,"onPostPause");return g.paused=!0,null==t||t(),I(),A(),null==n||n(),this},unpause:function(e){if(!g.paused||!g.active)return this;var t=b(e,"onUnpause"),n=b(e,"onPostUnpause");return g.paused=!1,null==t||t(),_(),M(),A(),null==n||n(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return g.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),g.active&&_(),A(),this}}).updateContainerElements(e),i},Object.defineProperty(e,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Helper/Selector",["require","exports"],(function(e,t){"use strict";function n(e){for(const[t,n]of a.entries()){e.matches(t)&&o(e,n);const i=e.querySelectorAll(t);for(const e of i)o(e,n)}}function o(e,t){for(const n of t)n(e)}function i(e,t){a.has(e)||a.set(e,[]),a.get(e).push(t),n(document.body),void 0===r&&(r=new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)})),r.observe(document,{subtree:!0,childList:!0}))}let r;Object.defineProperty(t,"__esModule",{value:!0}),t.wheneverFirstSeen=t.wheneverSeen=void 0;const a=new Map;t.wheneverSeen=i,t.wheneverFirstSeen=function(e,t){const n=new WeakSet;i(e,(e=>{n.has(e)||(n.add(e),t(e))}))}})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util","../Helper/PageOverlay","focus-trap","../Helper/Selector"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p){"use strict";function m(e,t,n){const o=n?"minDate":"maxDate";let i=(e.dataset[o]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(i))i=new Date(i).getTime().toString();else if("now"===i)i=t.getTime().toString();else if(/^\d{1,3}$/.exec(i)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~i*(n?-1:1)),i=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(i)){if(i=RegExp.$1,null===document.getElementById(i))throw new Error("Reference date picker identified by '"+i+"' does not exists (element id: '"+e.id+"').")}else i=/^\d{4}-\d{2}-\d{2}T/.test(i)?new Date(i).getTime().toString():new Date(n?1902:2038,0,1).getTime().toString();e.dataset[o]=i}function h(e){let t=D.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function f(e){e.stopPropagation(),function(){if(null!==H)return;H=document.createElement("div"),H.className="datePicker",H.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");H.appendChild(e),N=document.createElement("button"),N.type="button",N.className="previous jsTooltip",N.title=a.get("wcf.date.datePicker.previousMonth"),N.setAttribute("aria-label",a.get("wcf.date.datePicker.previousMonth")),N.innerHTML='<fa-icon name="arrow-left" solid></fa-icon>',N.addEventListener("click",(()=>R.previousMonth())),e.appendChild(N);const t=document.createElement("span");e.appendChild(t),q=document.createElement("select"),q.className="month jsTooltip",q.title=a.get("wcf.date.datePicker.month"),q.setAttribute("aria-label",a.get("wcf.date.datePicker.month")),q.addEventListener("change",y),t.appendChild(q);let n="";const o=new Intl.DateTimeFormat(document.documentElement.lang,{month:"long"});for(let e=0;e<12;e++)n+=`<option value="${e}">${o.format(new Date(2e3,e,15))}</option>`;q.innerHTML=n,F=document.createElement("select"),F.className="year jsTooltip",F.title=a.get("wcf.date.datePicker.year"),F.setAttribute("aria-label",a.get("wcf.date.datePicker.year")),F.addEventListener("change",_),t.appendChild(F),B=document.createElement("button"),B.type="button",B.className="next jsTooltip",B.title=a.get("wcf.date.datePicker.nextMonth"),B.setAttribute("aria-label",a.get("wcf.date.datePicker.nextMonth")),B.innerHTML='<fa-icon name="arrow-right" solid></fa-icon>',B.addEventListener("click",(()=>R.nextMonth())),e.appendChild(B),P=document.createElement("ul"),H.appendChild(P);const i=document.createElement("li");i.className="weekdays",P.appendChild(i);const r=new Intl.DateTimeFormat(document.documentElement.lang,{weekday:"short"}),s=new Date,l=s.getDay()-x;for(let e=0;e<7;e++){const t=e-l,n=new Date((new Date).setDate(s.getDate()+t)),o=document.createElement("span");o.textContent=r.format(n),i.appendChild(o)}for(let e=0;e<6;e++){const e=document.createElement("li");P.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",E),A.push(t),e.appendChild(t)}}U=document.createElement("footer"),H.appendChild(U),j=document.createElement("select"),j.className="hour",j.title=a.get("wcf.date.datePicker.hour"),j.setAttribute("aria-label",a.get("wcf.date.datePicker.hour")),j.addEventListener("change",w);const c=new Date(2e3,0,1),p=new Intl.DateTimeFormat(document.documentElement.lang,{hour:"numeric"});let m="";for(let e=0;e<24;e++){c.setHours(e);let t=p.formatToParts(c);const n=t.some((e=>"dayPeriod"===e.type));2!==t.length||n||(t=t.filter((e=>"literal"!==e.type))),m+=`<option value="${e}">${t.map((e=>e.value)).join("")}</option>`}j.innerHTML=m,U.appendChild(j),U.appendChild(document.createTextNode(" : ")),O=document.createElement("select"),O.className="minute",O.title=a.get("wcf.date.datePicker.minute"),O.setAttribute("aria-label",a.get("wcf.date.datePicker.minute")),O.addEventListener("change",w),m="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;m+=`<option value="${e}">${t}</option>`}O.innerHTML=m,U.appendChild(O),(0,d.getPageOverlayContainer)().appendChild(H),L=(0,u.createFocusTrap)(H,{allowOutsideClick:!0,escapeDeactivates:()=>(g(),!1)})}();const t=e.currentTarget,n="INPUT"===t.nodeName?t:t.previousElementSibling;if(n===D)return void g();const i=n.closest(".dialogContent");null!==i&&(o.stringToBool(i.dataset.hasDatepickerScrollListener||"")||(i.addEventListener("scroll",b),i.dataset.hasDatepickerScrollListener="1")),D=n;const r=T.get(D),l=D.dataset.value;let c;l?(c=new Date(parseInt(l,10)),"Invalid Date"===c.toString()&&(c=new Date)):c=new Date,I=h("minDate"),I.getTime()>c.getTime()&&(c=I),M=h("maxDate"),D.dataset.maxDate&&M.getTime()<c.getTime()&&(c=M),r.isDateTime?(j.value=c.getHours().toString(),O.value=c.getMinutes().toString(),H.classList.add("datePickerTime")):H.classList.remove("datePickerTime"),H.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),function(e,t,n){v(e,t,n);let o="";for(let e=I.getFullYear(),t=M.getFullYear();e<=t;e++)o+=`<option value="${e}">${e}</option>`;F.innerHTML=o,F.value=n.toString(),q.value=t.toString(),H.classList.add("active")}(c.getDate(),c.getMonth(),c.getFullYear()),C=()=>{s.set(H,D)},C(),window.addEventListener("scroll",C,{passive:!1}),D.nextElementSibling.setAttribute("aria-expanded","true"),L.activate()}function g(){if(null===H||!H.classList.contains("active"))return;H.classList.remove("active");const e=T.get(D);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:D}),void 0!==C&&(window.removeEventListener("scroll",C),C=void 0),D.nextElementSibling.setAttribute("aria-expanded","false"),D=null,L.deactivate()}function b(e){if(null===D)return;const t=e.currentTarget,n=c.default.offset(D),o=c.default.offset(t);n.top+D.clientHeight<=o.top||n.top>=o.top+t.offsetHeight||n.left<=o.left||n.left>=o.left+t.offsetWidth?g():s.set(H,D)}function v(e,t,n){const o=void 0!==e,r=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||P.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof n&&(n=parseInt(n||"0",10)),r||n){let a=0!==n;const s=document.createDocumentFragment();s.appendChild(P),r||(t=parseInt(P.dataset.month,10)),n||(n=parseInt(P.dataset.year,10));let l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(l<I?(n=I.getFullYear(),t=I.getMonth(),e=I.getDate(),q.value=t.toString(),F.value=n.toString(),a=!0):l>M&&(n=M.getFullYear(),t=M.getMonth(),e=M.getDate(),q.value=t.toString(),F.value=n.toString(),a=!0),l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");l.getDay()!==x;)l.setDate(l.getDate()-1);c.default.show(A[35].parentNode);const d=new Date(I.getFullYear(),I.getMonth(),I.getDate());for(let e=0;e<42;e++){if(35===e&&l.getMonth()!==t){c.default.hide(A[35].parentNode);break}const n=A[e];n.textContent=l.getDate().toString();const o=l.getMonth()===t;o?n.classList.remove("otherMonth"):n.classList.add("otherMonth");let r=!0;(l<d||l>M)&&(r=!1),r?n.classList.remove("disabled"):n.classList.add("disabled"),o&&r&&(n.href="#",n.setAttribute("role","button"),n.tabIndex=0,n.title=i.formatDate(l),n.setAttribute("aria-label",i.formatDate(l))),l.setDate(l.getDate()+1)}if(P.dataset.month=t.toString(),P.dataset.year=n.toString(),H.insertBefore(s,U),!o&&(l=new Date(n,t,e),l.getDate()!==e)){for(;l.getMonth()!==t;)l.setDate(l.getDate()-1);e=l.getDate()}if(a){for(let e=0;e<12;e++){const t=q.children[e];t.disabled=n===I.getFullYear()&&+t.value<I.getMonth()||n===M.getFullYear()&&+t.value>M.getMonth()}const e=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),B.classList[e<M?"add":"remove"]("active");const o=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");o.setDate(o.getDate()-1),N.classList[o>I?"add":"remove"]("active")}}if(e){for(let t=0;t<37;t++){const n=A[t];let o=+n.textContent===e;(n.classList.contains("otherMonth")||n.classList.contains("disabled"))&&(o=!1),o?n.classList.add("active"):n.classList.remove("active")}P.dataset.day=e.toString()}w()}function w(){const e=T.get(D);let t;o.stringToBool(D.dataset.empty||"")||(t=e.isDateTime?new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day,+j.value,+O.value):new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day),R.setDate(D,t))}function y(e){v(void 0,+e.currentTarget.value)}function _(e){v(void 0,void 0,+e.currentTarget.value)}function E(e){e.preventDefault();const t=e.currentTarget;t.classList.contains("otherMonth")||t.classList.contains("disabled")||(D.dataset.empty="false",v(+t.textContent),T.get(D).isDateTime||g())}function S(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&T.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l),c=n.__importDefault(c);let L,C,k=!1,x=0;const T=new Map;let M,I,D=null;const A=[];let P,j,O,q,B,N,U,F,H=null;const R={init(){k||(k=!0,x=parseInt(a.get("wcf.date.firstDayOfTheWeek"),10),(0,p.wheneverSeen)('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)',(e=>{const t=new Date;e.classList.add("inputDatePicker"),e.readOnly=!0;const n="datetime"===e.getAttribute("type"),r=n&&o.stringToBool(e.dataset.timeOnly||""),s=o.stringToBool(e.dataset.disableClear||""),l=n&&o.stringToBool(e.dataset.ignoreTimezone||""),c=e.classList.contains("birthday");e.dataset.isDateTime=n?"true":"false",e.dataset.isTimeOnly=r?"true":"false";let d=null,u=e.value;u||(u=e.getAttribute("value")||"");const p=/^\d+-\d+-\d+$/.test(u);if(u){if(r){d=new Date;const e=u.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||p){let e=new Date(u).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const n=Math.floor(e/60).toString(),o=(e%60).toString();t+=2===n.length?n:"0"+n,t+=":",t+=2===o.length?o:"0"+o,c||p?u+="T00:00:00"+t:u=u.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(u)}const t=d.getTime();isNaN(t)?u="":(e.dataset.value=t.toString(),u=r?i.formatTime(d):n?i.formatDateTime(d):i.formatDate(d))}const h=0===u.length;if(c?(e.dataset.minDate="120",e.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(e.min&&(e.dataset.minDate=e.min),e.max&&(e.dataset.maxDate=e.max)),m(e,t,!0),m(e,t,!1),(e.dataset.minDate||"")===(e.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+e.id+"').");e.type="text",e.value=u,e.dataset.empty=h?"true":"false";const g=e.dataset.placeholder||"";g&&(e.placeholder=g);const b=document.createElement("input");b.id=e.id+"DatePicker",b.name=e.name,b.type="hidden",null!==d&&(b.value=r?i.format(d,"H:i"):l?i.format(d,"Y-m-dTH:i:s"):i.format(d,n?"c":"Y-m-d")),e.parentNode.insertBefore(b,e),e.removeAttribute("name"),e.addEventListener("click",f);const v=document.createElement("div");v.className="inputAddon inputAddonDatePicker";const w=document.createElement("button");w.type="button",w.className="inputSuffix button jsTooltip",w.title=r?a.getPhrase("wcf.date.datePicker.time"):a.getPhrase("wcf.date.datePicker"),w.setAttribute("aria-haspopup","true"),w.setAttribute("aria-expanded","false"),w.addEventListener("click",(t=>{e.disabled||f(t)})),v.appendChild(w);let y=document.createElement("fa-icon");r?y.setIcon("clock"):y.setIcon("calendar"),w.appendChild(y),e.parentNode.insertBefore(v,e),v.insertBefore(e,w);let _=null;s||(_=document.createElement("button"),_.type="button",_.className="inputSuffix button jsTooltip",_.title=r?a.getPhrase("wcf.date.datePicker.time.clear"):a.getPhrase("wcf.date.datePicker.clear"),_.addEventListener("click",(()=>{e.disabled||R.clear(e)})),h&&(_.hidden=!0),v.appendChild(_),y=document.createElement("fa-icon"),y.setIcon("xmark"),_.appendChild(y));const E=["tiny","short","medium","long"];let S=!1;for(let t=0;t<4;t++)e.classList.contains(E[t])&&(S=!0);S||e.classList.add("short"),new MutationObserver((()=>{e.disabled?(w.classList.add("disabled"),_?.classList.add("disabled")):(w.classList.remove("disabled"),_?.classList.remove("disabled"))})).observe(e,{attributeFilter:["disabled"]}),e.disabled&&(w.classList.add("disabled"),_?.classList.add("disabled")),T.set(e,{clearButton:_,shadow:b,disableClear:s,isDateTime:n,isEmpty:h,isTimeOnly:r,ignoreTimezone:l,onClose:null})})),l.default.add("WoltLabSuite/Core/Date/Picker",(()=>g())))},previousMonth(){"0"===q.value?(q.value="11",F.value=(+F.value-1).toString()):q.value=(+q.value-1).toString(),v(void 0,+q.value,+F.value)},nextMonth(){"11"===q.value?(q.value="0",F.value=(+F.value+1).toString()):q.value=(+q.value+1).toString(),v(void 0,+q.value,+F.value)},getDate(e){const t=(e=S(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=S(e);const n=T.get(e);e.dataset.value=t.getTime().toString();let o,r="";n.isDateTime?n.isTimeOnly?(o=i.formatTime(t),r="H:i"):n.ignoreTimezone?(o=i.formatDateTime(t),r="Y-m-dTH:i:s"):(o=i.formatDateTime(t),r="c"):(o=i.formatDate(t),r="Y-m-d"),e.value=o,n.shadow.value=i.format(t,r),n.disableClear||(n.clearButton.hidden=!1)},getValue(e){e=S(e);const t=T.get(e);return t?t.shadow.value:""},clear(e){e=S(e);const t=T.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||(t.clearButton.hidden=!0),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=S(e);const t=T.get(e),n=e.parentNode;n.parentNode.insertBefore(e,n),n.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",f),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,T.delete(e)},setCloseCallback(e,t){e=S(e),T.get(e).onClose=t}};return window.__wcf_bc_datePicker=R,R})),define("WoltLabSuite/Core/Form/XsrfToken",["require","exports","../Core","../Helper/Selector"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=(0,n.getXsrfToken)();(0,o.wheneverFirstSeen)(".xsrfTokenInput",(t=>{(function(e){return"INPUT"===e.nodeName})(t)&&(t.value=e,t.classList.add("xsrfTokenInputHandled"))}))}})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./CloseOverlay","focus-trap","../Helper/PageOverlay"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p){"use strict";o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d);let m,h=null;const f=new Map;let g=!1;const b=new WeakMap,v=new Map;let w;const y=["onBeforeClose","onClose","onShow"],_=["number","password","search","tel","text","url"],E={setup(){m=document.createElement("div"),m.classList.add("dialogOverlay"),m.setAttribute("aria-hidden","true"),m.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),m.addEventListener("wheel",(e=>{e.target===m&&e.preventDefault()}),{passive:!1});let e=!1;new MutationObserver((()=>{"true"===m.getAttribute("aria-hidden")?((0,p.releasePageOverlayContainer)(m),e=!1):e||((0,p.adoptPageOverlayContainer)(m),e=!0)})).observe(m,{attributes:!0,attributeFilter:["aria-hidden"]}),document.getElementById("content").appendChild(m),w=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName){const e=f.get(h);return!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!1))}}return!0},r.on("screen-xs",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),this._initStaticDialogs(),i.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{f.forEach((e=>{o.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const n=document.getElementById(t);null!==n&&(n.classList.remove("jsStaticDialogContent"),n.dataset.isStaticDialog="true",a.default.hide(n),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(n.id,null,{title:n.dataset.title||""})})))}}))},open(t,i){let r=b.get(t);if(r&&o.isPlainObject(r))return this.openStatic(r.id,void 0===i?null:i);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!o.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(r={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),a.default.show(c)}else if(null===s.source)s.source=i;else if("function"==typeof s.source)s.source();else if(o.isPlainObject(s.source)){if("string"!=typeof i||""===i.trim())return new Promise(((t,n)=>{e(["../Ajax"],t,n)})).then(n.__importStar).then((e=>{const n=s.source;e.api(this,n.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof n.after&&n.after(f.get(l).content,e))}))})),{};s.source=i}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,a.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return b.set(t,r),v.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,i,a){this.isOpen(t)||r.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||r.scrollDisable()),f.has(t)?this._updateDialog(t,i):((a=o.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},a||{})).closable||(a.backdropCloseOnClick=!1),a.closeConfirmMessage&&(a.onBeforeClose=t=>{new Promise(((t,n)=>{e(["./Confirmation"],t,n)})).then(n.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:a.closeConfirmMessage||""})}))}),this._createDialog(t,i,a));const c=f.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{c.content.querySelector("input, textarea")?.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const n=f.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const o=n.dialog.querySelector(".dialogTitle");o&&(o.textContent=t)},setCallback(e,t,n){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const o=f.get(e);if(void 0===o)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===y.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof n&&null!==n)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof n+"' given).");o[t]=n},removeCallback(e,t){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const n=f.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===y.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");n[t]=void 0},_createDialog(e,t,n){let o=null;if(null===t&&(o=document.getElementById(e),null===o))throw new Error("Expected either a HTML string or an existing element id.");const i=document.createElement("div");i.classList.add("dialogContainer"),i.setAttribute("aria-hidden","true"),i.setAttribute("role","dialog"),i.dataset.id=e;const r=document.createElement("header");i.appendChild(r);const s=a.default.getUniqueId();i.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=n.title,l.id=s,r.appendChild(l),n.closable){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialogCloseButton","jsTooltip"),e.title=n.closeButtonLabel,e.setAttribute("aria-label",n.closeButtonLabel),e.addEventListener("click",(()=>this._close())),r.appendChild(e)}new ResizeObserver((()=>{if("false"===i.getAttribute("aria-hidden")){const e=Math.floor(i.getBoundingClientRect().width/2);i.style.setProperty("--translate-x",`-${e}px`)}})).observe(i);const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),n.disableContentPadding&&c.classList.add("dialogContentNoPadding"),i.appendChild(c),c.addEventListener("wheel",(e=>{let t,n,o,i=!1,r=e.target;for(;;){if(t=r.clientHeight,n=r.scrollHeight,t<n){if(o=r.scrollTop,e.deltaY<0&&o>0){i=!0;break}if(e.deltaY>0&&o+t<n){i=!0;break}}if(!r||r===c)break;r=r.parentNode}i||e.preventDefault()}),{passive:!1}),null===o)if("string"==typeof t)d=document.createElement("div"),d.id=e,a.default.setInnerHtml(d,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");{const n=[];let o;for(let e=0,i=t.childNodes.length;e<i;e++)o=t.childNodes[e],o.nodeType===Node.ELEMENT_NODE&&n.push(o);"DIV"!==n[0].nodeName||n.length>1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=n[0]}}else d=o;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&a.default.show(d);const p=(0,u.createFocusTrap)(i,{allowOutsideClick:!0,escapeDeactivates:()=>(f.get(e).closable&&E.close(e),!1),fallbackFocus:i});f.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,closable:n.closable,content:d,dialog:i,focusTrap:p,header:r,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow,submitButton:null,inputFields:new Set}),m.insertBefore(i,m.firstChild),"function"==typeof n.onSetup&&n.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const n=f.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&a.default.setInnerHtml(n.content,t),o.stringToBool(n.dialog.getAttribute("aria-hidden"))){d.default.execute(),n.closable&&o.stringToBool(m.getAttribute("aria-hidden"))&&window.addEventListener("keyup",w),n.dialog.parentNode.insertBefore(n.dialog,n.dialog.parentNode.firstChild),n.dialog.setAttribute("aria-hidden","false"),m.setAttribute("aria-hidden","false"),m.setAttribute("close-on-click",n.backdropCloseOnClick?"true":"false"),h=e;const t=n.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),t&&t.removeAttribute("inert"),"function"==typeof n.onShow&&n.onShow(n.content),o.stringToBool(n.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:n.content,id:e})}this.rebuild(e),i.default.trigger(),n.focusTrap.activate()},rebuild(e){const t=this._getDialogId(e),n=f.get(t);if(void 0===n)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(o.stringToBool(n.dialog.getAttribute("aria-hidden")))return;const i=n.content.parentNode,r=n.content.querySelector(".formSubmit");let s=0;null!==r?(i.classList.add("dialogForm"),r.classList.add("dialogFormSubmit"),s+=a.default.outerHeight(r),s-=1,i.style.setProperty("margin-bottom",`${s}px`,"")):(i.classList.remove("dialogForm"),i.style.removeProperty("margin-bottom")),s+=a.default.outerHeight(n.header);const l=window.innerHeight*(g?1:.8)-s;if(i.style.setProperty("max-height",~~l+"px",""),""===n.dialog.style.getPropertyValue("--translate-x")){const e=Math.floor(n.dialog.getBoundingClientRect().width/2);n.dialog.style.setProperty("--translate-x",`-${e}px`)}const c=v.get(t);if(void 0!==c&&"function"==typeof c._dialogSubmit){const e=n.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),o=n.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===o)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",n.content));if(n.submitButton!==o){n.submitButton=o,o.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const i=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let r;for(let t=0,o=e.length;t<o;t++)r=e[t],n.inputFields.has(r)||(-1!==_.indexOf(r.type)?(n.inputFields.add(r),r.addEventListener("keydown",i)):console.warn("Unsupported input type.",r))}}},_submit(e){const t=f.get(e);let n=!0;if(t.inputFields.forEach((e=>{e.required&&(""===e.value.trim()?(a.default.innerError(e,s.get("wcf.global.form.error.empty")),e.closest("dl")?.classList.add("formError"),n=!1):(a.default.innerError(e,!1),e.closest("dl")?.classList.remove("formError")))})),n){const t=v.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(){const e=f.get(h);return void 0===e||!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!0))},_closeOnBackdrop(e){e.target===m&&(o.stringToBool(m.getAttribute("close-on-click"))?(e.preventDefault(),this._close()):e.preventDefault())},close(e){e=this._getDialogId(e);let t=f.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");try{t.focusTrap.deactivate()}catch(e){const t="Your focus-trap must have at least one container with at least one tabbable node in it at all times";if(e.message!==t)throw e}t.dialog.setAttribute("aria-hidden","true");const n=document.activeElement;n.closest(".dialogContainer")===t.dialog&&n.blur(),"function"==typeof t.onClose&&t.onClose(e),h=null;for(let e=0;e<m.childElementCount;e++){const t=m.children[e];if(t.classList.contains("dialogContainer")&&!o.stringToBool(t.getAttribute("aria-hidden"))){h=t.dataset.id||"";break}}r.pageOverlayClose(),null===h?(m.setAttribute("aria-hidden","true"),m.dataset.closeOnClick="false",t.closable&&window.removeEventListener("keyup",w)):(t=f.get(h),m.dataset.closeOnClick=t.backdropCloseOnClick?"true":"false"),"desktop"!==l.platform()&&r.scrollEnable()},getDialog(e){return f.get(this._getDialogId(e))},isOpen(e){const t=this.getDialog(e);return void 0!==t&&"false"===t.dialog.getAttribute("aria-hidden")},destroy(e){if("object"!=typeof e)throw new TypeError("Expected the callback object as parameter.");if(b.has(e)){const t=b.get(e).id;this.isOpen(t)&&this.close(t),f.has(t)&&(f.get(t).dialog.remove(),f.delete(t)),b.delete(e)}},_getDialogId(e){if("object"==typeof e){const t=b.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:()=>({})};return E})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay","../../Helper/PageOverlay","../../Helper/Selector"],(function(e,t,n,o,i,r,a,s,l,c,d){"use strict";function u(e){const t=e.currentTarget,n=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,o=n.length;e<o;e++){const o=n[e],i=a.default.identify(o),r=a.default.offset(o),s=a.default.offset(t);r.top+o.clientHeight<=s.top||r.top>=s.top+t.offsetHeight||r.left<=s.left||r.left>=s.left+t.offsetWidth?L.toggleDropdown(i):L.setAlignment(w.get(i),y.get(i))}}function p(){w.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(i.stringToBool(e.dataset.isOverlayDropdownButton||""))L.setAlignment(e,y.get(t));else{const n=y.get(e.id);i.stringToBool(n.dataset.dropdownIgnorePageScroll||"")||L.close(t)}}))}function m(e,t){b.forEach(e,(n=>{n(e,t)}))}function h(e,t,n,o){if(null!==e){e.preventDefault(),e.stopPropagation();const n=e.currentTarget;t=n.dataset.target,void 0===o&&e instanceof MouseEvent&&(i.stringToBool(n.dataset.isKeyboardClick||"")?delete n.dataset.isKeyboardClick:o=!0)}S=!0;try{l.default.execute(l.Origin.DropDown,t)}finally{S=!1}let a=w.get(t),s=!1;if(void 0!==a){let n,l;if(e&&(n=e.currentTarget,l=n.parentNode,l!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,w.set(t,l))),void 0===o&&(n=a.closest(".dropdownToggle"),n||(n=a.querySelector(".dropdownToggle"),!n&&a.id&&(n=document.querySelector('[data-target="'+a.id+'"]'))),n&&i.stringToBool(n.dataset.dropdownLazyInit||"")&&(o=!0)),i.stringToBool(a.dataset.dropdownPreventToggle||"")&&a.classList.contains("dropdownOpen")&&(s=!0),""===a.dataset.isOverlayDropdownButton){const e=r.parentByClass(a,"dialogContent");a.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",u)}}return E="",w.forEach(((e,r)=>{const a=y.get(r);if(e.classList.contains("dropdownOpen"))if(s)E=t;else{e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),m(r,"close")}else if(r===t&&a.childElementCount>0){E=t,e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen");const s=e.querySelector(".dropdownToggle");s&&s.setAttribute("aria-expanded","true");const l=a.childElementCount>0?a.children[0]:null;if(l&&i.stringToBool(l.dataset.scrollToActive||"")){delete l.dataset.scrollToActive;let e=null;for(let t=0,n=l.childElementCount;t<n;t++)if(l.children[t].classList.contains("active")){e=l.children[t];break}e&&(l.scrollTop=Math.max(e.offsetTop+e.clientHeight-a.clientHeight,0))}const c=a.querySelector(".scrollableDropdownMenu");null!==c&&c.classList[c.scrollHeight>c.clientHeight?"add":"remove"]("forceScrollbar"),m(r,"open");let d=null;if(!o){a.setAttribute("role","menu"),a.tabIndex=-1,a.removeEventListener("keydown",g),a.addEventListener("keydown",g);const e=Array.from(a.querySelectorAll("li")).filter((e=>e.clientHeight>0));d=e.find((e=>e.classList.contains("active")))||e[0]||null,e.forEach((e=>{e.setAttribute("role","menuitem"),e.tabIndex=-1}))}L.setAlignment(e,a,n),null!==d&&d.focus()}})),null===e}function f(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):h(e)))}function g(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const n=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||n.reverse();let o=null;const i=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let r=n.indexOf(t);"End"!==e.key&&"Home"!==e.key||(r=-1);for(let e=r+1;e<n.length;e++)if(i(n[e])){o=n[e];break}null===o&&(o=n.find(i)||null),null!==o&&o.focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();let n=t;1!==n.childElementCount||"SPAN"!==n.children[0].nodeName&&"A"!==n.children[0].nodeName||(n=n.children[0]);const o=w.get(E),r=o.querySelector(".dropdownToggle"),a=o.dataset.a11yMouseEvent||"click";i.triggerEvent(n,a),r&&r.focus()}else if("Escape"===e.key||"Tab"===e.key){e.preventDefault();const t=w.get(E);let n=t.querySelector(".dropdownToggle");null!==n||t.classList.contains("dropdown")||(n=t),h(null,E),n&&n.focus()}}o=n.__importDefault(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);const b=new o.default;let v=!1;const w=new Map,y=new Map;let _,E="",S=!1;const L={setup(){v||(v=!0,_=document.createElement("div"),_.className="dropdownMenuContainer",(0,c.getPageOverlayContainer)().append(_),l.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>L.closeAll())),(0,d.wheneverFirstSeen)(".dropdownToggle",(e=>L.init(e,!1))),document.addEventListener("scroll",p),window.bc_wcfSimpleDropdown=this)},init(e,t){if(L.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const n=r.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a parent with .dropdown.");const o=r.nextByClass(e,"dropdownMenu");if(null===o)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a menu as next sibling.");_.appendChild(o);const s=a.default.identify(n);if(!w.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",h),e.addEventListener("keydown",f),w.set(s,n),y.set(s,o),/^wcf\d+$/.test(s)||(o.dataset.source=s),o.childElementCount&&o.children[0].classList.contains("scrollableDropdownMenu"))){const e=o.children[0];e.dataset.scrollToActive="true";let t=null,n=null;e.addEventListener("wheel",(o=>{null===t&&(t=e.clientHeight),null===n&&(n=e.scrollHeight),(o.deltaY<0&&0===e.scrollTop||o.deltaY>0&&e.scrollTop+t===n)&&o.preventDefault()}),{passive:!1})}return e.dataset.target=s,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",i.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){L.setup();const n=a.default.identify(e);w.has(n)||(w.set(n,e),_.appendChild(t),y.set(n,t))},registerCallback(e,t){b.add(e,t)},getDropdown:e=>w.get(e),getDropdownMenu:e=>y.get(e),toggleDropdown(e,t,n){h(null,e,t,n)},setAlignment(e,t,n){const o=e.querySelector(".dropdownToggle"),i=null!==o?o.parentNode:null;let r;i&&i.classList.contains("inputAddonTextarea")&&(r=o),s.set(t,n||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=w.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const n=y.get(e);L.setAlignment(t,n)},isOpen(e){const t=y.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t,n){const o=y.get(e);void 0===o||o.classList.contains("dropdownOpen")||L.toggleDropdown(e,n,t)},close(e){const t=w.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),y.get(e).classList.remove("dropdownOpen"))},closeAll(){S||w.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen")){e.classList.remove("dropdownOpen"),y.get(t).classList.remove("dropdownOpen");const n=e.querySelector(".dropdownToggle");n&&n.setAttribute("aria-expanded","false"),m(t,"close")}}))},destroy(e){if(!w.has(e))return!1;try{L.close(e),y.get(e)?.remove()}catch(e){}return y.delete(e),w.delete(e),!0},_toggle:(e,t,n,o)=>h(e,t,n,o)};return L})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,n,o){"use strict";function i(e){if(!r.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return r.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleDropdown=t.registerCallback=t.getDropdownMenu=t.init=void 0,o=n.__importDefault(o);const r=new Map;let a=0;t.init=function(e,t){if(r.has(e))return;const n=document.createElement("div");n.id="reusableDropdownGhost"+a++,o.default.initFragment(n,t),r.set(e,n.id)},t.getDropdownMenu=function(e){return o.default.getDropdownMenu(i(e))},t.registerCallback=function(e,t){o.default.registerCallback(i(e),t)},t.toggleDropdown=function(e,t){o.default.toggleDropdown(i(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Container",["require","exports","tslib","focus-trap","../../Screen","../../CloseOverlay","../../../Dom/Util"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuContainer=void 0,r=n.__importDefault(r),a=n.__importDefault(a);class s{container=document.createElement("div");content=document.createElement("div");focusTrap=void 0;provider;constructor(e){this.provider=e,this.container.hidden=!0;const t=a.default.identify(this.provider.getMenuButton());r.default.add(`WoltLabSuite/Core/Ui/PageMenu/Container-${t}`,(()=>{this.container.hidden||this.close()}))}open(){r.default.execute(),this.buildElements(),0===this.content.childElementCount&&this.content.append(this.provider.getContent()),this.provider.getMenuButton().setAttribute("aria-expanded","true"),(0,i.pageOverlayOpen)(),(0,i.scrollDisable)(),this.container.hidden=!1,this.provider.wakeup(),this.getFocusTrap().activate()}close(){this.provider.getMenuButton().setAttribute("aria-expanded","false"),(0,i.pageOverlayClose)(),(0,i.scrollEnable)(),this.container.hidden=!0,this.getFocusTrap().deactivate(),this.provider.sleep()}toggle(){this.container.hidden?this.open():this.close()}getContent(){return this.content}buildElements(){this.container.classList.contains("pageMenuContainer")||(this.container.classList.add("pageMenuContainer"),this.container.hidden=!0,this.container.addEventListener("click",(e=>{e.target===this.container&&this.close()})),this.content.classList.add("pageMenuContent"),this.content.addEventListener("click",(e=>{e.stopPropagation()})),this.container.append(this.content),document.body.append(this.container))}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,o.createFocusTrap)(this.content,{allowOutsideClick:!0})),this.focusTrap}}t.PageMenuContainer=s,t.default=s})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","./Container","../../../Language","../../../Dom/Util","../../Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuMain=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);class s{container;mainMenu;mainMenuButton;menuItemBadges=new Map;menuItemProvider;observer;constructor(e){this.mainMenu=document.querySelector(".mainMenu"),this.menuItemProvider=e,this.mainMenuButton=document.querySelector(".pageHeaderMenuMobile"),this.mainMenuButton.addEventListener("click",(e=>{e.stopPropagation(),this.container.toggle()})),this.container=new o.default(this),this.observer=new MutationObserver((e=>{let t=!1;e.forEach((e=>{(e.addedNodes.length>0||e.removedNodes.length>0||"characterData"===e.type)&&(t=!0)})),t&&this.refreshUnreadIndicator()})),this.watchForChanges()}enable(){this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars")}getContent(){const e=document.createElement("div");e.classList.add("pageMenuMainContainer"),e.addEventListener("scroll",(()=>this.updateOverflowIndicator(e)),{passive:!0}),e.append(this.buildMainMenu());const t=this.buildLanguageMenu();t&&e.append(t);const n=this.buildFooterMenu();n&&e.append(n);const o=new ResizeObserver((()=>this.updateOverflowIndicator(e)));Array.from(e.children).forEach((e=>{o.observe(e)}));const i=document.createDocumentFragment();return i.append(e),i}getMenuButton(){return this.mainMenuButton}sleep(){this.watchForChanges()}wakeup(){this.observer.disconnect(),this.refreshUnreadIndicator()}watchForChanges(){this.observer.observe(this.mainMenu,{childList:!0,subtree:!0})}buildMainMenu(){const e=this.mainMenu.querySelector(".boxMenu"),t=this.buildMenu(e);return t.setAttribute("aria-label",window.PAGE_TITLE),t.setAttribute("role","navigation"),this.showActiveMenuItem(t),t}showActiveMenuItem(e){const t=e.querySelector('.pageMenuMainItemLink[aria-current="page"]');if(t){let e=t;for(;e&&e.parentElement;)if(e=e.parentElement.closest(".pageMenuMainItemList"),e){e.hidden=!1;const t=e.previousElementSibling;t?.setAttribute("aria-expanded","true")}const n=t.nextElementSibling;n&&(n.setAttribute("aria-expanded","true"),n.nextElementSibling.hidden=!1)}}buildLanguageMenu(){const e=a.getDropdownMenu("pageLanguageContainer");if(void 0===e)return null;const t=[],n=new Map;Array.from(e.children).forEach((e=>{const o=e.dataset.languageCode,i=e.querySelector("span").textContent.trim(),r=e.querySelector("img.iconFlag")||void 0;n.set(o,e.querySelector("a")),t.push({active:!1,children:[],counter:0,depth:1,identifier:o,title:i,icon:r})}));const o=document.createElement("fa-icon");o.setIcon("language"),o.size=24;const r=[{active:!1,children:t,counter:0,depth:0,identifier:"language",title:i.get("wcf.user.language"),icon:o}],s=document.createElement("nav");return s.classList.add("pageMenuMainNavigation","pageMenuMainNavigationLanguage"),s.append(this.buildMenuItemList(r,!0)),s.querySelectorAll(".pageMenuMainItemList .pageMenuMainItemLabel[data-identifier]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const o=e.dataset.identifier;n.get(o)?.click()}))})),s}buildFooterMenu(){const e=document.querySelector('.box[data-box-identifier="com.woltlab.wcf.FooterMenu"]');if(null===e)return null;const t=e.querySelector(".boxMenu"),n=this.buildMenu(t);n.classList.add("pageMenuMainNavigationFooter");const o=e.querySelector("nav").getAttribute("aria-label");return n.setAttribute("aria-label",o),n}buildMenu(e){const t=this.menuItemProvider.getMenuItems(e),n=document.createElement("nav");return n.classList.add("pageMenuMainNavigation"),n.append(this.buildMenuItemList(t,!1)),n}buildMenuItemList(e,t){const n=document.createElement("ul");return n.classList.add("pageMenuMainItemList"),e.filter((e=>!(!t&&!e.link&&0===e.children.length))).forEach((e=>{n.append(this.buildMenuItem(e,t))})),n}buildMenuItem(e,t){const n=document.createElement("li");if(n.dataset.depth=e.depth.toString(),n.classList.add("pageMenuMainItem"),e.link){const t=document.createElement("a");if(t.classList.add("pageMenuMainItemLink"),t.href=e.link,t.textContent=e.title,e.active&&t.setAttribute("aria-current","page"),e.identifier&&(t.dataset.identifier=e.identifier),e.openInNewWindow&&(t.target="_blank"),e.counter>0){const n=document.createElement("span");n.classList.add("pageMenuMainItemCounter","badge","badgeUpdate"),n.setAttribute("aria-hidden","true"),n.textContent=e.counter.toString(),null!==e.identifier&&this.menuItemBadges.set(e.identifier,n),t.append(n)}n.append(t)}else{const o=document.createElement("a");if(o.classList.add("pageMenuMainItemLabel"),o.href="#",e.icon){o.append(e.icon);const t=document.createElement("span");t.textContent=e.title,o.append(t)}else o.textContent=e.title;e.identifier&&(o.dataset.identifier=e.identifier),t&&"language"!==e.identifier||(o.addEventListener("click",(e=>{e.preventDefault(),o.nextElementSibling.click()})),o.setAttribute("aria-hidden","true")),n.append(o)}if(e.children.length){n.classList.add("pageMenuMainItemExpandable");const o=r.default.getUniqueId(),a=document.createElement("button");a.type="button",a.classList.add("pageMenuMainItemToggle"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",o),a.innerHTML='<fa-icon size="24" name="angle-down"></fa-icon>';let s=e.title;e.link&&(s=i.get("wcf.menu.page.button.toggle",{title:e.title})),a.setAttribute("aria-label",s);const l=this.buildMenuItemList(e.children,t);l.id=o,l.hidden=!0,a.addEventListener("click",(()=>{this.toggleList(a,l)})),l.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.toggleList(a,l))})),n.append(a,l)}return n}toggleList(e,t){t.hidden?(e.setAttribute("aria-expanded","true"),t.hidden=!1):(e.setAttribute("aria-expanded","false"),t.hidden=!0,document.activeElement!==e&&e.focus())}refreshUnreadIndicator(){null!==this.mainMenu.querySelector(".boxMenuLinkOutstandingItems")?this.mainMenu.classList.add("pageMenuMobileButtonHasContent"):this.mainMenu.classList.remove("pageMenuMobileButtonHasContent"),this.menuItemProvider.getMenuItems(this.mainMenu).forEach((e=>this.refreshUnreadBage(e)))}refreshUnreadBage(e){if(null!==e.identifier){const t=this.menuItemBadges.get(e.identifier);t&&(0===e.counter?(t.remove(),this.menuItemBadges.delete(e.identifier)):parseInt(t.textContent,10)!==e.counter&&(t.textContent=e.counter.toString()))}e.children.forEach((e=>this.refreshUnreadBage(e)))}updateOverflowIndicator(e){e.clientHeight<e.scrollHeight?(e.scrollTop>0?e.classList.add("pageMenuMainContainerOverflowTop"):e.classList.remove("pageMenuMainContainerOverflowTop"),e.clientHeight+e.scrollTop<e.scrollHeight?e.classList.add("pageMenuMainContainerOverflowBottom"):e.classList.remove("pageMenuMainContainerOverflowBottom")):e.classList.remove("pageMenuMainContainerOverflowTop","pageMenuMainContainerOverflowBottom")}}t.PageMenuMain=s,t.default=s})),define("WoltLabSuite/Core/Ui/User/Menu/Manager",["require","exports","tslib","../../Alignment","../../CloseOverlay","../../../Event/Handler","../../../Dom/Util","../../Screen","../../../Helper/PageOverlay"],(function(e,t,n,o,i,r,a,s,l){"use strict";function c(e){i.default.execute();const t=p(e);t.open();const n=e.getPanelButton();n.querySelector("a").setAttribute("aria-expanded","true"),n.classList.add("open"),d(t.getElement(),n)}function d(e,t){if(o.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==a.default.getFixedParent(t)){const{top:n,height:o}=t.getBoundingClientRect();e.style.setProperty("top",`${n+o}px`)}}function u(e){if(!g.has(e))return;const t=e.getPanelButton();t.classList.contains("open")&&(p(e).close(),t.classList.remove("open"),t.querySelector("a").setAttribute("aria-expanded","false"))}function p(e){if(!g.has(e)){const t=e.getView(),n=t.getElement();m().append(n),n.addEventListener("shouldClose",(()=>u(e))),g.set(e,t)}return g.get(e)}function m(){return void 0===h&&(h=document.createElement("div"),h.classList.add("dropdownMenuContainer"),(0,l.getPageOverlayContainer)().append(h)),h}let h;Object.defineProperty(t,"__esModule",{value:!0}),t.registerProvider=t.getContainer=t.getUserMenuProviders=void 0,o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s);const f=new Set,g=new Map;t.getUserMenuProviders=function(){return f},t.getContainer=m,t.registerProvider=function(e){0===f.size&&(i.default.add("WoltLabSuite/Ui/User/Menu",(()=>{f.forEach((e=>u(e)))})),r.add("com.woltlab.wcf.UserMenuMobile","more",(e=>{f.forEach((t=>{e.identifier===t.getIdentifier()&&c(t)}))})),window.addEventListener("resize",(()=>{f.forEach((e=>{const t=e.getPanelButton();t.classList.contains("open")&&d(p(e).getElement(),t)}))}),{passive:!0}),s.on("screen-md-down",{match(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))},setup(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))}})),function(e){f.add(e);const t=e.getPanelButton();t.addEventListener("click",(n=>{n.preventDefault(),n.stopPropagation(),t.classList.contains("open")?u(e):c(e)}))}(e)}})),define("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",["require","exports","tslib","../../CloseOverlay","./Manager","focus-trap","../../Alignment","../../../Dom/Util"],(function(e,t,n,o,i,r,a,s){"use strict";function l(){u.deactivate(),d.hidden=!0,c.classList.remove("open"),p.setAttribute("aria-expanded","false")}let c,d,u,p;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.getElement=void 0,o=n.__importDefault(o),a=n.__importStar(a),s=n.__importDefault(s),t.getElement=function(){return d};let m=!1;t.setup=function(){m||(c=document.getElementById("userMenu"),d=c.querySelector(".userMenu"),p=c.querySelector("a"),o.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",(()=>l())),(0,i.getContainer)().append(d),d.addEventListener("click",(e=>e.stopPropagation())),c.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.hidden?d.hidden&&(o.default.execute(),d.hidden=!1,c.classList.add("open"),p.setAttribute("aria-expanded","true"),u.activate(),function(e,t){if(a.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==s.default.getFixedParent(t)){const{top:n,height:o}=t.getBoundingClientRect();e.style.setProperty("top",`${n+o}px`)}}(d,c)):l()})),u=(0,r.createFocusTrap)(d,{allowOutsideClick:!0,escapeDeactivates:()=>(l(),!1),fallbackFocus:d}),m=!0)}})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","./Container","../../../Language","../../User/Menu/Manager","../../../Dom/Util","../../User/Menu/ControlPanel","../../../Event/Handler","../../Screen"],(function(e,t,n,o,i,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasValidUserMenu=t.PageMenuUser=void 0,o=n.__importDefault(o),i=n.__importStar(i),a=n.__importDefault(a),l=n.__importStar(l);class d{activeTab=void 0;container;legacyUserPanels=new Map;observer;userMenuProviders=new Map;tabOrigins=new Map;tabPanels=new Map;tabs=[];userMenu;userMenuButton;constructor(){this.userMenu=document.querySelector(".userPanel"),this.userMenuButton=document.querySelector(".pageHeaderUserMobile"),this.userMenuButton.addEventListener("click",(t=>{t.stopPropagation(),e.then((()=>this.container.toggle()))})),this.container=new o.default(this);const e=new Promise((e=>{"complete"===document.readyState?e():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&e()}))}));(0,c.on)("screen-lg",{match:()=>this.detachViewsFromPanel(),unmatch:()=>this.detachViewsFromPanel()}),this.observer=new MutationObserver((()=>{this.refreshTabUnreadIndicators()}))}enable(){this.userMenuButton.setAttribute("aria-expanded","false"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.userMenuButton.setAttribute("aria-expanded","false")}getContent(){const e=document.createDocumentFragment();return e.append(this.buildTabMenu()),e}getMenuButton(){return this.userMenuButton}sleep(){this.activeTab&&this.closeTab(this.activeTab),this.detachViewsFromPanel(),this.refreshUnreadIndicator()}wakeup(){this.activeTab?this.openTab(this.activeTab):this.isInMaintenanceMode()?this.openTab(this.tabs[0]):this.openNotifications(),this.refreshTabUnreadIndicators(),this.refreshUnreadIndicator()}isInMaintenanceMode(){return"wcf"===document.body.dataset.application&&"offline"===document.body.dataset.template}openNotifications(){const e=this.tabs.find((e=>"userNotifications"===e.dataset.origin));if(!e)throw new Error("Unable to find the notifications tab.");this.openTab(e)}openTab(e){this.closeActiveTab(),e.setAttribute("aria-selected","true"),e.tabIndex=0;const t=this.tabPanels.get(e);t.hidden=!1,document.activeElement!==e&&e.focus(),this.attachViewToPanel(e),this.activeTab=e,this.observer.observe(t,{attributeFilter:["data-is-unread"],childList:!0,subtree:!0})}closeActiveTab(){this.activeTab&&(this.closeTab(this.activeTab),this.activeTab=void 0)}closeTab(e){e.setAttribute("aria-selected","false"),e.tabIndex=-1,this.tabPanels.get(e).hidden=!0;const t=this.legacyUserPanels.get(e);t&&t.close(),this.observer.disconnect(),this.refreshTabUnreadIndicators()}attachViewToPanel(e){const t=e.dataset.origin,n=this.tabPanels.get(e);if("userMenu"===t){const e=(0,s.getElement)();e.hidden=!1,0===n.childElementCount&&(this.tabOrigins.set(n,e.parentElement),n.append(e))}else if(0===n.childElementCount){const t=this.userMenuProviders.get(e);if(t){const e=t.getView(),o=e.getElement();this.tabOrigins.set(n,o.parentElement),n.append(o),e.open()}else{const t=this.legacyUserPanels.get(e);t.open();const{top:o}=n.getBoundingClientRect();t.getDropdown().getContainer()[0].style.setProperty("--offset-top",`${o}px`)}}}detachViewsFromPanel(){this.tabPanels.forEach(((e,t)=>{if(e.childElementCount){const n=this.tabOrigins.get(e);if(n)if("userMenu"===t.dataset.origin){const t=e.children[0];t.hidden=!0,n.append(t)}else{const e=this.userMenuProviders.get(t);if(e){const t=e.getView().getElement();t.hidden=!0,n.append(t)}}}}))}keydown(e){const t=e.currentTarget;if("Enter"===e.key||" "===e.key)return e.preventDefault(),void this.openTab(t);if(!["ArrowLeft","ArrowRight","End","Home"].includes(e.key))return;e.preventDefault();const n=this.tabs.indexOf(t),o=this.tabs.length-1;let i;i="ArrowLeft"===e.key?0===n?o:n-1:"ArrowRight"===e.key?n===o?0:n+1:"End"===e.key?o:0,this.tabs[i].focus()}buildTabMenu(){const e=document.createElement("div");e.classList.add("pageMenuUserTabContainer");const t=document.createElement("div");return t.classList.add("pageMenuUserTabList"),t.setAttribute("role","tablist"),t.setAttribute("aria-label",i.get("wcf.menu.user")),e.append(t),this.buildControlPanelTab(t,e),(0,r.getUserMenuProviders)().forEach((n=>{const[o,i]=this.buildTab(n);t.append(o),e.append(i),this.tabs.push(o),this.tabPanels.set(o,i),this.userMenuProviders.set(o,n)})),this.buildLegacyTabs(t,e),e}buildTab(e){const t=e.getPanelButton(),n=t.querySelector("a");let o=n.querySelector("fa-icon")?.outerHTML;void 0===o&&(o='<fa-icon size="32" name="question"></fa-icon>');const i={icon:o,label:n.dataset.title||n.title,origin:t.id};return this.buildTabComponents(i)}buildControlPanelTab(e,t){const n=document.getElementById("userMenu"),o=n.querySelector("a"),i={icon:this.userMenuButton.querySelector(".userAvatarImage").outerHTML,label:o.dataset.title||o.title,origin:n.id},[r,a]=this.buildTabComponents(i);e.append(r),t.append(a),this.tabs.push(r),this.tabPanels.set(r,a)}buildLegacyTabs(e,t){const n=document.querySelector(".userPanelItems"),o={panels:[]};l.fire("com.woltlab.wcf.pageMenu","legacyMenu",o),Array.from(n.children).filter((e=>void 0!==o.panels.find((t=>t.element===e)))).map((e=>{const t=e.querySelector("a");return{icon:t.querySelector(".icon").outerHTML,label:t.dataset.title||t.title,origin:e.id}})).forEach((n=>{const[i,r]=this.buildTabComponents(n);e.append(i),t.append(r),this.tabs.push(i),this.tabPanels.set(i,r);const a=o.panels.find((e=>e.element.id===n.origin));this.legacyUserPanels.set(i,a.api)}))}buildTabComponents(e){const t=a.default.getUniqueId(),n=a.default.getUniqueId(),o=document.createElement("button");o.type="button",o.classList.add("pageMenuUserTab"),o.dataset.hasUnreadContent="false",o.dataset.origin=e.origin,o.id=t,o.setAttribute("aria-controls",n),o.setAttribute("aria-selected","false"),o.setAttribute("role","tab"),o.tabIndex=-1,o.setAttribute("aria-label",e.label),o.innerHTML=e.icon,o.addEventListener("click",(e=>{e.preventDefault(),this.openTab(o)})),o.addEventListener("keydown",(e=>this.keydown(e)));const i=document.createElement("div");return i.classList.add("pageMenuUserTabPanel"),i.id=n,i.hidden=!0,i.setAttribute("aria-labelledby",t),i.setAttribute("role","tabpanel"),i.tabIndex=0,[o,i]}refreshUnreadIndicator(){null!==this.userMenu.querySelector(".badge.badgeUpdate")?this.userMenu.classList.add("pageMenuMobileButtonHasContent"):this.userMenu.classList.remove("pageMenuMobileButtonHasContent")}refreshTabUnreadIndicators(){this.userMenuProviders.forEach(((e,t)=>{e.hasUnreadContent()?t.dataset.hasUnreadContent="true":t.dataset.hasUnreadContent="false"}))}}t.PageMenuUser=d,t.hasValidUserMenu=function(){return document.getElementById("topMenu").classList.contains("userPanelLoggedIn")},t.default=d})),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","focus-trap","../Core","../Dom/Change/Listener","../Dom/Util","../Environment","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen","../Language"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,m,h){"use strict";function f(){B=!0,g(),b(),U&&(H=new u.PageMenuMain(W),H.enable(),(0,p.hasValidUserMenu)()&&(R=new p.PageMenuUser,R.enable())),c.default.add("WoltLabSuite/Core/Ui/Mobile",v),r.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{g(),b()})),document.addEventListener("scroll",(()=>E()),{passive:!0})}function g(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const n=document.createElement("button");n.type="button",n.innerHTML='<fa-icon size="24" name="ellipsis-vertical"></fa-icon>',n.classList.add("dropdownLabel"),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),v(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(n,e.firstChild)}))}function b(){document.querySelectorAll(".message").forEach((e=>{if(F.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const n=e.querySelector(".messageQuickOptions");if(n&&t.childElementCount){n.classList.add("active");let o=n.querySelector(".messageQuickOptionsMobile");null===o&&(o=document.createElement("li"),o.innerHTML=`\n            <button type="button" aria-label="${h.get("wcf.global.button.more")}">\n              <fa-icon name="ellipsis-vertical"></fa-icon>\n            </button>\n          `,o.classList.add("messageQuickOptionsMobile"),n.append(o)),o.querySelector("button").addEventListener("click",(o=>{o.stopPropagation(),S(e,n,t)}))}}F.add(e)}))}function v(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),B&&O&&E()}function w(){V=!0}function y(){V=!1,z.forEach((function(e){e.classList.remove("open")}))}function _(){z.forEach((function(e){e.addEventListener("mousedown",(function(t){V&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),V=!0}function E(){O?.classList.remove("dropdownOpen")}function S(e,t,n){if(null===O)O=document.createElement("ul"),O.className="dropdownMenu",d.init("com.woltlab.wcf.jsMobileNavigation",O);else if(O.classList.contains("dropdownOpen")&&(E(),j.deactivate(),j=void 0,q===e))return;O.innerHTML="",c.default.execute(),x(n);const i=n.previousElementSibling;if(i&&i.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",O.appendChild(e),x(i)}l.set(O,t,{horizontal:"right",allowFlip:"vertical"}),O.classList.add("dropdownOpen"),q=e,j=(0,o.createFocusTrap)(O,{allowOutsideClick:!0,escapeDeactivates:()=>(S(e,t,n),!1),setReturnFocus:t}),j.activate()}function L(){N=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(t=>{N&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const n=e.parentElement,o=t.target;n.contains(o)||o===n||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}),{passive:!1})}))}function C(){N=!0}function k(){N=!1}function x(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const n=e.querySelector("span:not(.icon)");t.innerHTML=`<a href="#">${n.textContent}</a>`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():i.triggerEvent(e,"click"),E()})),O.appendChild(t)}))}function T(){c.default.execute(),B=!0,U&&(H.enable(),R?.enable())}function M(){$&&A($,".messageGroupLink")}function I(){c.default.execute(),B=!1,U&&(H.disable(),R?.disable())}function D(){$&&P($),O&&E()}function A(e,t){Array.from(e).forEach((e=>{const n=e.parentElement;let o=n.querySelector(".mobileLinkShadow");if(null===o){const i=e.querySelector(t);i.href&&(o=document.createElement("a"),o.className="mobileLinkShadow",o.href=i.href,o.setAttribute("aria-labelledby",a.default.identify(i)),n.appendChild(o),n.classList.add("mobileLinkShadowContainer"))}}))}function P(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeShadow=t.rebuildShadow=t.disableShadow=t.disable=t.enableShadow=t.enable=t.setup=void 0,i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importDefault(c),d=n.__importStar(d),m=n.__importStar(m),h=n.__importStar(h);let j,O=null,q=null,B=!1,N=!1,U=!1;const F=new WeakSet;let H,R,W,V=!1,$=null;const z=[];t.setup=function(e,t){U=e,W=t,document.querySelectorAll(".boxesSidebarLeft").forEach((e=>{z.push(e)})),s.touch()&&document.documentElement.classList.add("touch"),"desktop"!==s.platform()&&document.documentElement.classList.add("mobile");const n=document.querySelector(".messageGroupList");n&&($=n.getElementsByClassName("messageGroup")),m.on("screen-md-down",{match:T,unmatch:I,setup:f}),m.on("screen-sm-down",{match:M,unmatch:D,setup:M}),m.on("screen-md-down",{match:w,unmatch:y,setup:_}),!s.touch()||"ios"!==s.platform()&&"android"!==s.platform()||m.on("screen-lg",{match:C,unmatch:k,setup:L})},t.enable=T,t.enableShadow=M,t.disable=I,t.disableShadow=D,t.rebuildShadow=A,t.removeShadow=P})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language","../../Ui/Screen"],(function(e,t,n,o,i,r){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==g?(e>=b?(m.classList.contains("initiallyHidden")&&m.classList.remove("initiallyHidden"),m.setAttribute("aria-hidden","false")):m.setAttribute("aria-hidden","true"),l(),-1!==g&&h.classList[e<g?"remove":"add"]("scrolledDown"),g=-1):v()}function s(e){e.preventDefault(),document.getElementById("top").scrollIntoView({behavior:"smooth"})}function l(){const e=Array.from(p.children).find((e=>"false"===e.getAttribute("aria-hidden")));p.classList[e?"add":"remove"]("active"),e?h.classList.add("pageActionHasContextButtons"):h.classList.remove("pageActionHasContextButtons")}function c(){if(f)return;f=!0,h=document.createElement("div"),h.className="pageAction",p=document.createElement("div"),p.className="pageActionButtons",h.appendChild(p),m=function(){const e=document.createElement("button");return e.type="button",e.classList.add("button","buttonPrimary","pageActionButtonToTop","initiallyHidden","jsTooltip"),e.title=i.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='<fa-icon size="32" name="angle-up" solid></fa-icon>',e.addEventListener("click",s),e}(),h.appendChild(m),document.body.appendChild(h);const e=o.debounce(a,100);window.addEventListener("scroll",(()=>{-1===g&&(g=window.pageYOffset,window.setTimeout((()=>{a(),g=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==g&&(g=-1)}),{passive:!0}),r.on("screen-sm-down",{match(){b=50},unmatch(){b=300},setup(){b=50}}),a()}function d(e){const t=u.get(e);t&&(t.parentElement.setAttribute("aria-hidden","true"),l())}Object.defineProperty(t,"__esModule",{value:!0}),t.show=t.hide=t.remove=t.get=t.has=t.add=t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r);const u=new Map;let p,m,h,f=!1,g=-1,b=300;const v=o.debounce((()=>{g=-1}),50);t.setup=c,t.add=function(e,t,n){c();const o=document.createElement("div");o.className="pageActionButton",o.dataset.name=e,o.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),o.appendChild(t);let i=null;n&&(i=u.get(n)||null,i&&(i=i.parentElement)),!i&&p.childElementCount&&(i=p.children[0]),i||(i=p.firstChild),p.insertBefore(o,i),h.classList.remove("scrolledDown"),u.set(e,t),o.offsetParent,o.setAttribute("aria-hidden","false"),l()},t.has=function(e){return u.has(e)},t.get=function(e){return u.get(e)},t.remove=function(e){const t=u.get(e);if(void 0!==t){const n=t.parentElement,i=()=>{try{o.stringToBool(n.getAttribute("aria-hidden"))&&(p.removeChild(n),u.delete(e)),n.removeEventListener("transitionend",i)}catch(e){}};n.addEventListener("transitionend",i),d(e)}},t.hide=d,t.show=function(e){const t=u.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),h.classList.remove("scrolledDown"),l()}}})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler","WoltLabSuite/Core/Ui/CloseOverlay"],(function(e,t,n,o,i,r,a,s){"use strict";o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s);class l{container;containers=new Map;isLegacy=!1;store=null;tabs=new Map;constructor(e){this.container=e}validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=o.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;o.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=i.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const n=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+n+"') exists more than once.");const o=this.containers.get(t);if(void 0===o)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+n+"').");if(o.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+n+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+t+"'] (tab menu id: '"+n+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+n+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEach((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(){this.tabs.forEach((e=>{const t=e.children[0];if(t.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let e=!1;t.addEventListener("touchstart",(()=>{e=!0})),t.addEventListener("touchmove",(()=>{e=!1})),t.addEventListener("touchend",(t=>{e&&(e=!1,t.preventDefault(),this._onClick(t))}))}}));let e=null;const t=l.getIdentifierFromHash();let n;if(""!==t&&(n=this.tabs.get(t),n)){const t=this.container.parentElement;t?.classList.contains("tabMenuContainer")&&(e=this.container)}if(!n){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){n||i.default.isHidden(e)||e.previousElementSibling&&!i.default.isHidden(e.previousElementSibling)||(n=e)})):"string"==typeof e&&"false"!==e&&(n=this.tabs.get(e))}n&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,n,!0));const o=this.container.dataset.store;if(o){const e=document.createElement("input");e.type="hidden",e.name=o,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}return e}select(t,o,i){if(t=t?t.toString():"",!(o=o||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((n=>{e===t&&(o=n),e++}))}if(!o)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||o.dataset.name||"";const r=this.getActiveTab();let c=null;if(r){const e=r.dataset.name;if(e===t)return;i||a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:r,tabName:e}),r.classList.remove("active"),c=this.containers.get(r.dataset.name||""),c.classList.remove("active"),c.classList.add("hidden"),this.isLegacy&&(r.classList.remove("ui-state-active"),c.classList.remove("ui-state-active"))}o.classList.add("active");const d=this.containers.get(t);if(d.classList.add("active"),d.classList.remove("hidden"),this.isLegacy&&(o.classList.add("ui-state-active"),d.classList.add("ui-state-active")),this.store&&(this.store.value=t),!i){a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:o,activeName:t,previous:r,previousName:r?r.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(o),oldTab:e(r),newPanel:e(d),oldPanel:e(c)});let n=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?n+=window.location.hash:n+="#"+t,window.history.replaceState(void 0,"",n)}s.default.execute(),new Promise(((t,n)=>{e(["../TabMenu"],t,n)})).then(n.__importStar).then((e=>{e.scrollToTab(o)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||i.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const n=e.children[0];/#([^#]+)$/.exec(n.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,n,o){"use strict";function i(){null!==l&&window.clearTimeout(l),l=window.setTimeout((()=>{for(const e of a)e();window.removeEventListener("scroll",i),a=[],r=void 0,l=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,o=n.__importDefault(o);let r,a=[],s=null,l=null;t.element=function(e,t,n="smooth"){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(a.length>0&&e!==r)throw new Error("Cannot scroll to element, a concurrent request is running.");if(t&&a.push(t),void 0!==r)return;r=e,window.addEventListener("scroll",i);let l=o.default.offset(e).top;if(null===s){s=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;s="fixed"===t||"static"===t?e.offsetHeight:0}}s>0&&(l<=s?l=0:l-=s);const c=window.pageYOffset;window.scrollTo({left:0,top:l,behavior:n}),window.setTimeout((()=>{c===window.pageYOffset&&i()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,n,o,i,r,a,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=i.default.identify(e);if(w.has(t))return;let n=new r.default(e);if(!n.validate())return;const o=n.init();if(w.set(t,n),o instanceof HTMLElement){const e=f(o.parentNode.id);e&&(n=e,n.select(o.id,void 0,!0))}const a=document.querySelector("#"+t+" > nav > ul");a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===a?(a.classList.add("active"),b=a):(a.classList.remove("active"),b=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){n=null,h(e)}let n=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==n&&window.clearTimeout(n),n=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{if(!t.defaultPrevented)for(const n of e.querySelectorAll("input, select, textarea"))if(!n.checkValidity()){t.preventDefault();const e=f(n.closest(".tabMenuContainer").id),o=n.closest(".tabMenuContent");return e.select(o.dataset.name||""),void l.element(n,(()=>{n.reportValidity()}))}}))}}))}function d(){w.forEach((e=>{let t=!1;e.getContainers().forEach((n=>{t||null===n.querySelector(".formError")||(t=!0,e.select(n.id))}))}))}function u(e){v=!0,w.forEach((t=>{const n=t.getActiveTab();e?h(n.closest(".menu, .tabMenu")):g(n)}))}function p(){v=!1}function m(e,t,n,o,i,r){(r||t>0)&&(t-=15),n!==(t=t<0?0:Math.min(t,o-i))&&(e.classList.add("enableAnimation"),n<t?e.firstElementChild.style.setProperty("margin-left",n-t+"px",""):e.style.setProperty("padding-left",n-t+"px",""),setTimeout((()=>{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function h(e){if(!v)return;const t=e.clientWidth,n=e.querySelector("ul"),o=n.scrollLeft,i=n.scrollWidth,r=o>0;let a=e.querySelector(".tabMenuOverlayLeft");r?(null===a&&(a=document.createElement("button"),a.type="button",a.innerHTML='<fa-icon size="24" name="angle-left"></fa-icon>',a.className="tabMenuOverlayLeft",a.addEventListener("click",(()=>{const e=n.clientWidth;m(n,n.scrollLeft-~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");const s=t+o<i;let l=e.querySelector(".tabMenuOverlayRight");s?(null===l&&(l=document.createElement("button"),l.type="button",l.innerHTML='<fa-icon size="24" name="angle-right"></fa-icon>',l.className="tabMenuOverlayRight",l.addEventListener("click",(()=>{const e=n.clientWidth;m(n,n.scrollLeft+~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function f(e){return w.get(e)}function g(e){if(!v)return;const t=e.closest("ul"),n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;if(n===i)return;const r=e.offsetLeft;let a=!1;r<o&&(a=!0);let s=!1;if(!a){const t=n-(r-o);let i=e.clientWidth;null!==e.nextElementSibling&&(s=!0,i+=20),t<i&&(a=!0)}a&&m(t,r,o,i,n,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToTab=t.getTabMenu=t.setup=t.selectErroneousTabs=void 0,o=n.__importDefault(o),i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);let b=null,v=!1;const w=new Map;t.selectErroneousTabs=d,t.setup=function(){c(),d(),o.default.add("WoltLabSuite/Core/Ui/TabMenu",c),a.default.add("WoltLabSuite/Core/Ui/TabMenu",(()=>{b&&(b.classList.remove("active"),b=null)})),s.on("screen-sm-down",{match(){u(!1)},unmatch:p,setup(){u(!0)}}),window.addEventListener("hashchange",(()=>{const e=r.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&w.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=r.default.getIdentifierFromHash();e&&window.setTimeout((()=>{const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const n=t.parentNode;let o=n.offsetTop-50;if(o<0&&(o=0),e>o){let e=i.default.offset(n).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=f,t.scrollToTab=g})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Environment","../Helper/PageOverlay","../Helper/Selector","./Alignment"],(function(e,t,n,o,i,r,a){"use strict";function s(e){const t=e.currentTarget;let n=t.title.trim();""!==n&&(t.dataset.tooltip=n,t.setAttribute("aria-label",n),t.removeAttribute("title")),n=t.dataset.tooltip||"",u.style.removeProperty("top"),u.style.removeProperty("left"),n.length?(u.classList.add("active"),d.textContent=n,a.set(u,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):u.classList.remove("active")}function l(){u.classList.remove("active")}let c,d,u;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),a=n.__importStar(a),t.setup=function(){"desktop"===o.platform()&&(u=document.createElement("div"),u.id="balloonTooltip",u.classList.add("balloonTooltip"),u.addEventListener("transitionend",(()=>{u.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{u.style.removeProperty(e)}))})),d=document.createElement("span"),d.id="balloonTooltipText",u.appendChild(d),c=document.createElement("span"),c.classList.add("elementPointer"),c.appendChild(document.createElement("span")),u.appendChild(c),(0,i.getPageOverlayContainer)().append(u),(0,r.wheneverSeen)(".jsTooltip",(e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),e.addEventListener("click",l))})),window.addEventListener("scroll",l))}})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importDefault(i);class r{activeElement;description;elements=new Map;input;submitButton;init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const n=e.dataset.link;t=n?e=>{window.location.href=n.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((n=>{n.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,i.default.open(this);const n=e.dataset.pages||"0";this.input.value=n,this.input.max=n,this.input.select(),this.description.textContent=o.get("wcf.page.jumpTo.description").replace(/#pages#/,n)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),i.default.close(this)}_dialogSetup(){const e=`<dl>\n        <dt><label for="jsPaginationPageNo">${o.get("wcf.page.jumpTo")}</label></dt>\n                <dd>\n          <input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny">\n          <small></small>\n        </dd>\n      </dl>\n      <div class="formSubmit">\n        <button type="button" class="button buttonPrimary">${o.get("wcf.global.button.submit")}</button>\n      </div>`;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:o.get("wcf.global.page.pagination")},source:e}}}let a=null;t.init=function(e,t){(null===a&&(a=new r),a).init(e,t)}})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,n,o,i){"use strict";function r(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.activeElement,n=document.createElement("div");n.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",n),n.appendChild(e);const o=document.createElement("button");o.type="button",o.title=i.get("wcf.global.form.password.button.show"),o.classList.add("button","inputSuffix","jsTooltip"),o.setAttribute("aria-hidden","true"),n.appendChild(o);const r=document.createElement("fa-icon");r.setIcon("eye"),o.appendChild(r),o.addEventListener("click",(()=>{a(e,o,r)})),e.form?.addEventListener("submit",(()=>{"password"!==e.type&&a(e,o,r)})),t===e&&e.focus()}(e)}))}function a(e,t,n){"password"===e.type?(n.setIcon("eye-slash"),t.dataset.tooltip=i.get("wcf.global.form.password.button.hide"),e.type="text"):(n.setIcon("eye"),t.dataset.tooltip=i.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o),i=n.__importStar(i);const s=new WeakSet;t.setup=function(){r(),o.default.add("WoltLabSuite/Core/Ui/Password",(()=>r()))}})),define("WoltLabSuite/Core/Ui/Empty",["require","exports","tslib","../Dom/Change/Listener"],(function(e,t,n,o){"use strict";function i(){document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((e=>{e.classList.remove("jsReloadPageWhenEmpty"),r.observe(e,{childList:!0})}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o);const r=new MutationObserver((e=>{e.forEach((e=>{const t=e.target;(0===t.childElementCount||Array.from(t.children).every((e=>"ignore"===e.dataset.reloadPageWhenEmpty)))&&window.location.reload()}))}));t.setup=function(){i(),o.default.add("WoltLabSuite/Core/Ui/Empty",(()=>i()))}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,n,o,i,r){"use strict";function a(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r);class s{_active=!1;parameters;confirmButton;_content;dialog;text;callbackCancel;callbackConfirm;constructor(){this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.type="button",this.confirmButton.dataset.type="submit",this.confirmButton.classList.add("button","buttonPrimary"),this.confirmButton.textContent=i.get("wcf.global.confirmation.confirm"),e.appendChild(this.confirmButton);const t=document.createElement("button");t.type="button",t.classList.add("button"),t.textContent=i.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{r.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,r.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,r.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){window.setTimeout((()=>{this.confirmButton.blur(),this.confirmButton.focus()}),1)}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:i.get("wcf.global.confirmation.title")}}}_dialogSubmit(){this._confirm()}}let l;t.show=function(e){if(!a().active){if((e=o.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");a().open(e)}},t.getContentElement=function(){return a().content}})),define("WoltLabSuite/Core/Ui/Object/Action",["require","exports","tslib","../../Ajax","../../Event/Handler","../Confirmation","../../Language","../../StringUtil","../../Dom/Change/Listener"],(function(e,t,n,o,i,r,a,s,l){"use strict";function c(){document.querySelectorAll(`${d} ${u} ${p}`).forEach((e=>{m.has(e)||(e.addEventListener("click",(e=>function(e){function t(){o.apiOnce({data:{actionName:l,className:c,objectIDs:[p],parameters:m},success:e=>function(e,t){"reload"===e.dataset.objectActionSuccess?window.location.reload():i.fire("WoltLabSuite/Core/Ui/Object/Action",e.dataset.objectAction,{containerElement:e.closest(d),data:t,objectElement:e.closest(u)})}(n,e)})}e.preventDefault();const n=e.currentTarget,l=n.dataset.objectAction;let c=n.closest(d).dataset.objectActionClassName;n.dataset.objectActionClassName&&(c=n.dataset.objectActionClassName);let p=n.closest(u).dataset.objectId;n.dataset.objectId&&(p=n.dataset.objectId);const m={};Object.entries(n.dataset).forEach((([e,t])=>{let n=/^objectActionParameterData(.+)/.exec(e);if(n)Object.prototype.hasOwnProperty.call(m,"data")||(m.data={}),m.data[s.lcfirst(n[1])]=t;else if(n=/^objectActionParameter(.+)/.exec(e),n){const e=s.lcfirst(n[1]);if("data"===e)throw new Error("Additional object action parameters may not use 'data' as key.");m[e]=t}})),n.dataset.confirmMessage?r.show({confirm:t,message:a.get(n.dataset.confirmMessage),messageIsHtml:!0}):t()}(e))),m.add(e))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l);const d=".jsObjectActionContainer[data-object-action-class-name]",u=".jsObjectActionObject[data-object-id]",p=".jsObjectAction[data-object-action]",m=new Set;t.setup=function(){c(),l.default.add("WoltLabSuite/Core/Ui/Action",(()=>c()))}})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p){"use strict";function m(){return f||(f=new h),f}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d),u=n.__importStar(u),p=n.__importStar(p);class h{containers=new Map;editors=new Map;editorDropdowns=new Map;itemData=new WeakMap;knownCheckboxes=new WeakSet;pageClassNames=[];pageObjectId=0;reloadPageOnSuccess=new Map;setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),r.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=a.default.identify(e);let n=this.containers.get(t);if(void 0===n){const o=e.querySelector(".jsClipboardMarkAll");null!==o&&(o.dataset.containerId=t,o.addEventListener("click",(e=>this.markAll(e)))),n={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:o,markedObjectIds:new Set},this.containers.set(t,n)}Array.from(n.checkboxes).forEach((e=>{this.knownCheckboxes.has(e)||(e.dataset.containerId=t,null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e))}))}))}loadMarkedItems(){o.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,n="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,n);const o=[],i=t.dataset.containerId,r=this.containers.get(i),a=r.element.dataset.type;Array.from(r.checkboxes).forEach((e=>{const i=~~e.dataset.objectId;n?e.checked||(e.checked=!0,r.markedObjectIds.add(i),o.push(i)):e.checked&&(e.checked=!1,r.markedObjectIds.delete(i),o.push(i)),this.setParentAsMarked(e,n);const a=t.closest(".jsClipboardObject");null!==a&&(n?a.classList.add("jsMarked"):a.classList.remove("jsMarked"))})),this.saveState(a,o,n)}mark(e){const t=e instanceof Event?e.currentTarget:e,n=~~t.dataset.objectId,o=t.checked,i=t.dataset.containerId,r=this.containers.get(i),a=r.element.dataset.type,s=t.closest(".jsClipboardObject");o?(r.markedObjectIds.add(n),s.classList.add("jsMarked")):(r.markedObjectIds.delete(n),s.classList.remove("jsMarked")),null!==r.markAll&&(r.markAll.checked=!Array.from(r.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(r.markAll,o)),this.setParentAsMarked(t,t.checked),this.saveState(a,[n],o)}saveState(e,t,n){o.api(this,{actionName:n?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=n.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:o,listItem:n,responseData:null})}const n=e.currentTarget,o=this.itemData.get(n);if(o.url)return void(window.location.href=o.url);const r="string"==typeof o.internalData.confirmMessage?o.internalData.confirmMessage:"";let a=!0;if(i.isPlainObject(o.parameters)&&o.parameters.actionName&&o.parameters.className){if("unmarkAll"===o.parameters.actionName||Array.isArray(o.parameters.objectIDs))if(r.length){const e="string"==typeof o.internalData.template?o.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const n=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[n]=e.value);break;case"SELECT":t[n]=e.value;break;case"TEXTAREA":t[n]=e.value.trim()}})),this.executeProxyAction(n,o,t)},message:r,template:e})}else this.executeProxyAction(n,o)}else r.length&&(a=!1,c.show({confirm:t,message:r}));a&&t()}executeProxyAction(e,t,n={}){const r="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],a={data:n};i.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{a[e]=t})),o.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:r,parameters:a},(n=>{if("unmarkAll"!==t.actionName){const o=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",o,{data:t,listItem:e,responseData:n});const i=this.reloadPageOnSuccess.get(o);if(i&&i.includes(n.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;o.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=i.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const n=e.element.dataset.type,o=Array.isArray(t[n])?t[n]:[];this.rebuildMarkings(e,o)}));const n=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{n.includes(t)||(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let o=!1,i=this.editors.get(e),r=this.editorDropdowns.get(e);void 0===i?(o=!0,i=document.createElement("a"),i.className="dropdownToggle",i.textContent=t.label,this.editors.set(e,i),r=document.createElement("ol"),r.className="dropdownMenu",this.editorDropdowns.set(e,r)):(i.textContent=t.label,r.innerHTML=""),Object.values(t.items).forEach((t=>{const n=document.createElement("li"),o=document.createElement("span");o.textContent=t.label,n.appendChild(o),r.appendChild(n),n.dataset.type=e,n.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(n,t)}));const a=document.createElement("li");a.classList.add("dropdownDivider"),r.appendChild(a);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),r.appendChild(s),-1!==n.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):(u.add(t,i),o=!0)}if(o){const e=i.parentElement;e.classList.add("dropdown"),e.appendChild(r),d.default.init(i)}}))}rebuildMarkings(e,t){let n=!0;if(Array.from(e.checkboxes).forEach((e=>{const o=e.closest(".jsClipboardObject"),i=t.includes(~~e.dataset.objectId);i||(n=!1),e.checked=i,i?o.classList.add("jsMarked"):o.classList.remove("jsMarked"),this.setParentAsMarked(e,i)})),null!==e.markAll){e.markAll.checked=n,this.setParentAsMarked(e.markAll,n);const t=e.markAll.closest(".columnMark")?.parentNode;t&&(n?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const n=e.parentElement;"checkbox"===n.getAttribute("role")&&n.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),p.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),p.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let f;t.setup=function(e){m().setup(e)},t.reload=function(){m().reload()},t.hideEditor=function(e){m().hideEditor(e)},t.showEditor=function(){m().showEditor()},t.unmark=function(e,t){m().unmark(e,t)}})),define("WoltLabSuite/Core/Ui/Object/Action/Handler",["require","exports","tslib","../../../Event/Handler","../../../Controller/Clipboard"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importStar(o),i=n.__importStar(i),t.default=class{objectAction;constructor(e,t,n){this.objectAction=n,o.add("WoltLabSuite/Core/Ui/Object/Action",e,(e=>this.handleObjectAction(e))),document.querySelectorAll(".jsClipboardContainer[data-type]").forEach((e=>{o.add("com.woltlab.wcf.clipboard",e.dataset.type,(e=>{null!==e.responseData&&-1!==t.indexOf(e.responseData.actionName)&&this.handleClipboardAction(e)}))}))}handleClipboardAction(e){const t=e.listItem.dataset.type;document.querySelectorAll(`.jsClipboardContainer[data-type="${t}"] .jsClipboardObject`).forEach((t=>{const n=t.dataset.objectId;e.responseData.objectIDs.forEach((o=>{~~o==~~n&&this.objectAction({containerElement:t.closest(".jsObjectActionContainer"),data:e.responseData,objectElement:t})}))}))}handleObjectAction(e){this.objectAction(e),i.reload()}}})),define("WoltLabSuite/Core/Ui/Object/Action/Delete",["require","exports","tslib","./Handler"],(function(e,t,n,o){"use strict";function i(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="delete"]');if(!t||t.dataset.objectActionHandler)return;const n=e.objectElement.querySelector(".jsObjectActionObjectChildren");n&&Array.from(n.children).forEach((t=>{e.objectElement.insertAdjacentElement("beforebegin",t)})),e.objectElement.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o),t.setup=function(){new o.default("delete",["delete"],i)}})),define("WoltLabSuite/Core/Ui/Object/Action/Toggle",["require","exports","tslib","../../../Language","./Handler"],(function(e,t,n,o,i){"use strict";function r(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="toggle"]');if(!t||t.dataset.objectActionHandler)return;const n="FA-ICON"===t.nodeName?t:t.querySelector("fa-icon");if(n)if("square"===n.name){n.setIcon("square-check");const e=t.dataset.disableTitle||o.get("wcf.global.button.disable");t.title=e}else{n.setIcon("square");const e=t.dataset.enableTitle||o.get("wcf.global.button.enable");t.title=e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importDefault(i),t.setup=function(){new i.default("toggle",["enable","disable"],r)}})),define("WoltLabSuite/Core/Ui/Search",["require","exports","tslib","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Simple","./Screen","../Environment","../Dom/Util"],(function(e,t,n,o,i,r,a,s,l,c){"use strict";function d(){r.default.execute(r.Origin.Search),f.classList.add("searchBarOpen"),_?.parentElement.classList.add("open"),m||i.set(b,y,{horizontal:"right"}),b.style.setProperty("top",`${g.clientHeight}px`,""),w.focus(),window.setTimeout((()=>{const e=w.value.length;w.selectionStart=e,w.selectionEnd=e}),1)}function u(){if(!f.classList.contains("searchBarOpen")&&!b.classList.contains("open"))return;f.classList.remove("searchBarOpen"),b.classList.remove("open"),_?.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{b.style.removeProperty(e)})),"ios"===l.platform()&&(s.scrollEnable(),void 0!==p&&(document.body.scrollTop=p,p=void 0)),m&&w.blur();const e=document.getElementById("pageHeaderSearchMobile");e&&(e.setAttribute("aria-expanded","false"),e.querySelector("fa-icon").setIcon("magnifying-glass"));const t=b.querySelector(".pageHeaderSearchType");a.default.close(t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);let p,m=!1;const h=document.body.classList.contains("wcfAcp"),f=document.getElementById("pageHeader"),g=document.getElementById("pageHeaderPanel"),b=document.getElementById("pageHeaderSearch");let v;const w=document.getElementById("pageHeaderSearchInput"),y=document.getElementById("topMenu"),_=document.getElementById("userPanelSearchButton");t.init=function(){h&&null===b||(function(){b.addEventListener("click",(e=>e.stopPropagation()));const e=document.querySelector(".pageHeaderSearchType"),t=(0,c.identify)(e);a.default.getDropdownMenu(t).addEventListener("click",(e=>{e.stopPropagation(),a.default.close(t)})),_?.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),f.classList.contains("searchBarOpen")?u():d()})),r.default.add("WoltLabSuite/Core/Ui/Search",((e,t)=>{if(e!==r.Origin.Search){if(e===r.Origin.DropDown){if(document.getElementById("pageHeaderSearchTypeSelect").dataset.target===t)return;if(w.parentElement.id===t)return}u(),v?.setAttribute("aria-expanded","false")}}))}(),s.on("screen-md-down",{match(){m=!0},unmatch(){m=!1,p=void 0},setup(){m=!0,function(){const e=document.getElementById("pageHeaderSearchMobile");v=e,e.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"true"===e.getAttribute("aria-expanded")?u():("ios"===l.platform()&&(p=document.body.scrollTop,s.scrollDisable()),d(),b.style.setProperty("top",`${f.offsetHeight}px`,""),b.classList.add("open"),w.focus(),"ios"===l.platform()&&(document.body.scrollTop=0),e.setAttribute("aria-expanded","true"),e.querySelector("fa-icon").setIcon("xmark"))})),b.addEventListener("click",(e=>{e.stopPropagation(),e.target===b&&(e.preventDefault(),u())}))}()}}),o.add("com.woltlab.wcf.Search","close",(()=>u())))}})),define("WoltLabSuite/Core/LazyLoader",["require","exports"],(function(e,t){"use strict";function n(e){void 0!==r.get(e)&&window.cancelAnimationFrame(r.get(e)),r.set(e,window.requestAnimationFrame((()=>{for(const t of i.keys())if(e.matches(t)||null!==e.querySelector(t)){for(const e of i.get(t))a.then((()=>e()));i.delete(t)}r.delete(e)})))}let o;Object.defineProperty(t,"__esModule",{value:!0}),t.whenFirstSeen=void 0;const i=new Map,r=new Map,a=new Promise((e=>{"loading"===document.readyState?document.addEventListener("readystatechange",(()=>e()),{once:!0}):e()}));t.whenFirstSeen=function(e,t){i.has(e)||i.set(e,[]),i.get(e).push(t),n(document.body),void 0===o&&(o=new MutationObserver((e=>{if(0!==i.size)for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)}))),o.observe(document,{subtree:!0,childList:!0})}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(e=e||self).PerfectScrollbar=t()}(this,(function(){"use strict";function e(e){return getComputedStyle(e)}function t(e,t){var n,o;for(n in t)"number"==typeof(o=t[n])&&(o+="px"),e.style[n]=o;return e}function n(e){var t=document.createElement("div");return t.className=e,t}function o(e,t){if(!v)throw new Error("No element matching method supported");return v.call(e,t)}function i(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function r(e,t){return Array.prototype.filter.call(e.children,(function(e){return o(e,t)}))}function a(e,t){var n=e.element.classList,o=w.state.scrolling(t);n.contains(o)?clearTimeout(y[t]):n.add(o)}function s(e,t){y[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(w.state.scrolling(t))}),e.settings.scrollingThreshold)}function l(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function c(e,t,n,o,i){var r;if(void 0===o&&(o=!0),void 0===i&&(i=!1),"top"===t)r=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");r=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,o,i){var r,c=n[0],d=n[1],u=n[2],p=n[3],m=n[4],h=n[5];void 0===o&&(o=!0),void 0===i&&(i=!1),r=e.element,e.reach[p]=null,r[u]<1&&(e.reach[p]="start"),r[u]>e[c]-e[d]-1&&(e.reach[p]="end"),t&&(r.dispatchEvent(l("ps-scroll-"+p)),t<0?r.dispatchEvent(l("ps-scroll-"+m)):t>0&&r.dispatchEvent(l("ps-scroll-"+h)),o&&function(e,t){a(e,t),s(e,t)}(e,p)),e.reach[p]&&(t||i)&&r.dispatchEvent(l("ps-"+p+"-reach-"+e.reach[p]))}(e,n,r,o,i)}function d(e){return parseInt(e,10)||0}function u(e){var n=e.element,o=Math.floor(n.scrollTop),a=n.getBoundingClientRect();e.containerWidth=Math.round(a.width),e.containerHeight=Math.round(a.height),e.contentWidth=n.scrollWidth,e.contentHeight=n.scrollHeight,n.contains(e.scrollbarXRail)||(r(n,w.element.rail("x")).forEach((function(e){return i(e)})),n.appendChild(e.scrollbarXRail)),n.contains(e.scrollbarYRail)||(r(n,w.element.rail("y")).forEach((function(e){return i(e)})),n.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=p(e,d(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=d((e.negativeScrollAdjustment+n.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=p(e,d(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=d(o*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,n){var o,i={width:n.railXWidth},r=Math.floor(e.scrollTop);n.isRtl?i.left=n.negativeScrollAdjustment+e.scrollLeft+n.containerWidth-n.contentWidth:i.left=e.scrollLeft,n.isScrollbarXUsingBottom?i.bottom=n.scrollbarXBottom-r:i.top=n.scrollbarXTop+r,t(n.scrollbarXRail,i),o={top:r,height:n.railYHeight},n.isScrollbarYUsingRight?n.isRtl?o.right=n.contentWidth-(n.negativeScrollAdjustment+e.scrollLeft)-n.scrollbarYRight-n.scrollbarYOuterWidth-9:o.right=n.scrollbarYRight-e.scrollLeft:n.isRtl?o.left=n.negativeScrollAdjustment+e.scrollLeft+2*n.containerWidth-n.contentWidth-n.scrollbarYLeft-n.scrollbarYOuterWidth:o.left=n.scrollbarYLeft+e.scrollLeft,t(n.scrollbarYRail,o),t(n.scrollbarX,{left:n.scrollbarXLeft,width:n.scrollbarXWidth-n.railBorderXWidth}),t(n.scrollbarY,{top:n.scrollbarYTop,height:n.scrollbarYHeight-n.railBorderYWidth})}(n,e),e.scrollbarXActive?n.classList.add(w.state.active("x")):(n.classList.remove(w.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,n.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?n.classList.add(w.state.active("y")):(n.classList.remove(w.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,n.scrollTop=0)}function p(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 m(e,t){function n(t){t.touches&&t.touches[0]&&(t[c]=t.touches[0].pageY),b[h]=v+_*(t[c]-y),a(e,f),u(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function o(){s(e,f),e[g].classList.remove(w.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",n)}function i(t,i){v=b[h],i&&t.touches&&(t[c]=t.touches[0].pageY),y=t[c],_=(e[l]-e[r])/(e[d]-e[m]),i?e.event.bind(e.ownerDocument,"touchmove",n):(e.event.bind(e.ownerDocument,"mousemove",n),e.event.once(e.ownerDocument,"mouseup",o),t.preventDefault()),e[g].classList.add(w.state.clicking),t.stopPropagation()}var r=t[0],l=t[1],c=t[2],d=t[3],p=t[4],m=t[5],h=t[6],f=t[7],g=t[8],b=e.element,v=null,y=null,_=null;e.event.bind(e[p],"mousedown",(function(e){i(e)})),e.event.bind(e[p],"touchstart",(function(e){i(e,!0)}))}var h,f,g,b,v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),w={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},y={x:null,y:null},_=function(e){this.element=e,this.handlers={}},E={isEmpty:{configurable:!0}};return _.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,{passive:!1})},_.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(o){return!(!t||o===t)||(n.element.removeEventListener(e,o,!1),!1)}))},_.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},E.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(_.prototype,E),(h=function(){this.eventElements=[]}).prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new _(e),this.eventElements.push(t)),t},h.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},h.prototype.unbind=function(e,t,n){var o=this.eventElement(e);o.unbind(t,n),o.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(o),1)},h.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},h.prototype.once=function(e,t,n){var o=this.eventElement(e),i=function(e){o.unbind(t,i),n(e)};o.bind(t,i)},f={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},g={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=n*e.containerHeight,u(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=n*e.containerWidth,u(e),t.stopPropagation()}))},"drag-thumb":function(e){m(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),m(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(n){var i,r,a,s;if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(o(t,":hover")||o(e.scrollbarX,":focus")||o(e.scrollbarY,":focus"))){if(i=document.activeElement?document.activeElement:e.ownerDocument.activeElement){if("IFRAME"===i.tagName)i=i.contentDocument.activeElement;else for(;i.shadowRoot;)i=i.shadowRoot.activeElement;if(o(s=i,"input,[contenteditable]")||o(s,"select,[contenteditable]")||o(s,"textarea,[contenteditable]")||o(s,"button,[contenteditable]"))return}switch(r=0,a=0,n.which){case 37:r=n.metaKey?-e.contentWidth:n.altKey?-e.containerWidth:-30;break;case 38:a=n.metaKey?e.contentHeight:n.altKey?e.containerHeight:30;break;case 39:r=n.metaKey?e.contentWidth:n.altKey?e.containerWidth:30;break;case 40:a=n.metaKey?-e.contentHeight:n.altKey?-e.containerHeight:-30;break;case 32:a=n.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:a=e.containerHeight;break;case 34:a=-e.containerHeight;break;case 36:a=e.contentHeight;break;case 35:a=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==r||e.settings.suppressScrollY&&0!==a||(t.scrollTop-=a,t.scrollLeft+=r,u(e),function(n,o){var i,r=Math.floor(t.scrollTop);if(0===n){if(!e.scrollbarYActive)return!1;if(0===r&&o>0||r>=e.contentHeight-e.containerHeight&&o<0)return!e.settings.wheelPropagation}if(i=t.scrollLeft,0===o){if(!e.scrollbarXActive)return!1;if(0===i&&n<0||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}(r,a)&&n.preventDefault())}}))},wheel:function(t){function n(n){var i,r=function(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!=t&&n!=n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}(n),a=r[0],s=r[1];(function(t,n,i){var r,a,s,l;if(!f.isWebKit&&o.querySelector("select:focus"))return!0;if(!o.contains(t))return!1;for(r=t;r&&r!==o;){if(r.classList.contains(w.element.consuming))return!0;if(a=e(r),i&&a.overflowY.match(/(scroll|auto)/)&&(s=r.scrollHeight-r.clientHeight)>0&&(r.scrollTop>0&&i<0||r.scrollTop<s&&i>0))return!0;if(n&&a.overflowX.match(/(scroll|auto)/)&&(l=r.scrollWidth-r.clientWidth)>0&&(r.scrollLeft>0&&n<0||r.scrollLeft<l&&n>0))return!0;r=r.parentNode}return!1})(n.target,a,s)||(i=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?o.scrollTop-=s*t.settings.wheelSpeed:o.scrollTop+=a*t.settings.wheelSpeed,i=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(a?o.scrollLeft+=a*t.settings.wheelSpeed:o.scrollLeft-=s*t.settings.wheelSpeed,i=!0):(o.scrollTop-=s*t.settings.wheelSpeed,o.scrollLeft+=a*t.settings.wheelSpeed),u(t),i=i||function(e,n){var i=Math.floor(o.scrollTop),r=0===o.scrollTop,a=i+o.offsetHeight===o.scrollHeight,s=0===o.scrollLeft,l=o.scrollLeft+o.offsetWidth===o.scrollWidth;return!(Math.abs(n)>=Math.abs(e)?r&&n>0||a&&n<0:s&&e>0||l&&e<0)||!t.settings.wheelPropagation}(a,s),i&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault()))}var o=t.element;void 0!==window.onwheel?t.event.bind(o,"wheel",n):void 0!==window.onmousewheel&&t.event.bind(o,"mousewheel",n)},touch:function(t){function n(e,n){l.scrollTop-=n,l.scrollLeft-=e,u(t)}function o(e){return e.targetTouches?e.targetTouches[0]:e}function i(e){return!(e.pointerType&&"pen"===e.pointerType&&0===e.buttons||(!e.targetTouches||1!==e.targetTouches.length)&&(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function r(e){if(i(e)){var t=o(e);c.pageX=t.pageX,c.pageY=t.pageY,d=(new Date).getTime(),null!==m&&clearInterval(m)}}function a(r){var a,s,u,m,h,g;if(i(r)){if(u=(s={pageX:(a=o(r)).pageX,pageY:a.pageY}).pageX-c.pageX,m=s.pageY-c.pageY,function(t,n,o){var i,r,a,s;if(!l.contains(t))return!1;for(i=t;i&&i!==l;){if(i.classList.contains(w.element.consuming))return!0;if(r=e(i),o&&r.overflowY.match(/(scroll|auto)/)&&(a=i.scrollHeight-i.clientHeight)>0&&(i.scrollTop>0&&o<0||i.scrollTop<a&&o>0))return!0;if(n&&r.overflowX.match(/(scroll|auto)/)&&(s=i.scrollWidth-i.clientWidth)>0&&(i.scrollLeft>0&&n<0||i.scrollLeft<s&&n>0))return!0;i=i.parentNode}return!1}(r.target,u,m))return;n(u,m),c=s,(g=(h=(new Date).getTime())-d)>0&&(p.x=u/g,p.y=m/g,d=h),function(e,n){var o=Math.floor(l.scrollTop),i=l.scrollLeft,r=Math.abs(e),a=Math.abs(n);if(a>r){if(n<0&&o===t.contentHeight-t.containerHeight||n>0&&0===o)return 0===window.scrollY&&n>0&&f.isChrome}else if(r>a&&(e<0&&i===t.contentWidth-t.containerWidth||e>0&&0===i))return!0;return!0}(u,m)&&r.preventDefault()}}function s(){t.settings.swipeEasing&&(clearInterval(m),m=setInterval((function(){t.isInitialized?clearInterval(m):p.x||p.y?Math.abs(p.x)<.01&&Math.abs(p.y)<.01?clearInterval(m):t.element?(n(30*p.x,30*p.y),p.x*=.8,p.y*=.8):clearInterval(m):clearInterval(m)}),10))}var l,c,d,p,m;(f.supportsTouch||f.supportsIePointer)&&(l=t.element,c={},d=0,p={},m=null,f.supportsTouch?(t.event.bind(l,"touchstart",r),t.event.bind(l,"touchmove",a),t.event.bind(l,"touchend",s)):f.supportsIePointer&&(window.PointerEvent?(t.event.bind(l,"pointerdown",r),t.event.bind(l,"pointermove",a),t.event.bind(l,"pointerup",s)):window.MSPointerEvent&&(t.event.bind(l,"MSPointerDown",r),t.event.bind(l,"MSPointerMove",a),t.event.bind(l,"MSPointerUp",s))))}},(b=function(o,i){var r,a,s,l,c,p,m,f=this;if(void 0===i&&(i={}),"string"==typeof o&&(o=document.querySelector(o)),!o||!o.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(r in this.element=o,o.classList.add(w.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},i)this.settings[r]=i[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null,a=function(){return o.classList.add(w.state.focus)},s=function(){return o.classList.remove(w.state.focus)},this.isRtl="rtl"===e(o).direction,!0===this.isRtl&&o.classList.add(w.rtl),this.isNegativeScroll=(p=o.scrollLeft,null,o.scrollLeft=-1,m=o.scrollLeft<0,o.scrollLeft=p,m),this.negativeScrollAdjustment=this.isNegativeScroll?o.scrollWidth-o.clientWidth:0,this.event=new h,this.ownerDocument=o.ownerDocument||document,this.scrollbarXRail=n(w.element.rail("x")),o.appendChild(this.scrollbarXRail),this.scrollbarX=n(w.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null,l=e(this.scrollbarXRail),this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=d(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=d(l.borderLeftWidth)+d(l.borderRightWidth),t(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=d(l.marginLeft)+d(l.marginRight),t(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=n(w.element.rail("y")),o.appendChild(this.scrollbarYRail),this.scrollbarY=n(w.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null,c=e(this.scrollbarYRail),this.scrollbarYRight=parseInt(c.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=d(c.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var n=e(t);return d(n.width)+d(n.paddingLeft)+d(n.paddingRight)+d(n.borderLeftWidth)+d(n.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=d(c.borderTopWidth)+d(c.borderBottomWidth),t(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=d(c.marginTop)+d(c.marginBottom),t(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:o.scrollLeft<=0?"start":o.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:o.scrollTop<=0?"start":o.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return g[e](f)})),this.lastScrollTop=Math.floor(o.scrollTop),this.lastScrollLeft=o.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return f.onScroll(e)})),u(this)}).prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,t(this.scrollbarXRail,{display:"block"}),t(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=d(e(this.scrollbarXRail).marginLeft)+d(e(this.scrollbarXRail).marginRight),this.railYMarginHeight=d(e(this.scrollbarYRail).marginTop)+d(e(this.scrollbarYRail).marginBottom),t(this.scrollbarXRail,{display:"none"}),t(this.scrollbarYRail,{display:"none"}),u(this),c(this,"top",0,!1,!0),c(this,"left",0,!1,!0),t(this.scrollbarXRail,{display:""}),t(this.scrollbarYRail,{display:""}))},b.prototype.onScroll=function(e){this.isAlive&&(u(this),c(this,"top",this.element.scrollTop-this.lastScrollTop),c(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},b.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),i(this.scrollbarX),i(this.scrollbarY),i(this.scrollbarXRail),i(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},b.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")},b})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Form/XsrfToken","./Language","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password","./Ui/Empty","./Ui/Object/Action","./Ui/Object/Action/Delete","./Ui/Object/Action/Toggle","./Ui/Search","./LazyLoader","./Helper/PageOverlay","perfect-scrollbar"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,m,h,f,g,b,v,w,y,_,E,S,L,C){"use strict";function k(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importStar(d),u=n.__importDefault(u),p=n.__importDefault(p),m=n.__importStar(m),h=n.__importStar(h),f=n.__importStar(f),g=n.__importStar(g),b=n.__importStar(b),v=n.__importStar(v),w=n.__importStar(w),y=n.__importStar(y),_=n.__importStar(_),E=n.__importStar(E),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=l,t.setup=function(t){t=o.extend({colorScheme:"light",enableMobileMenu:!0,pageMenuMainProvider:void 0},t),c.setup(),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),(0,C.adoptPageOverlayContainer)(document.body),s.setup(),i.default.init(),p.default.setup(),m.setup(t.enableMobileMenu,t.pageMenuMainProvider),f.setup(),u.default.setup(),g.setup(),v.setup(),w.setup(),y.setup(),_.setup(),E.setup(),(0,S.init)(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===s.browser()&&(window.onbeforeunload=()=>{});let l=0;l=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(l),window.jQuery((()=>{h.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==s.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),window.requestAnimationFrame((()=>{const e=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.setProperty("--scrollbar-width",`${e}px`)})),k(),a.default.add("WoltLabSuite/Core/Bootstrap",(()=>k)),t.dynamicColorScheme&&new Promise(((t,n)=>{e(["./Controller/Style/ColorScheme"],t,n)})).then(n.__importStar).then((({setup:e})=>{e()})),(0,L.whenFirstSeen)("[data-report-content]",(()=>{new Promise(((t,n)=>{e(["./Ui/Moderation/Report"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,L.whenFirstSeen)("woltlab-core-pagination",(()=>{new Promise(((t,n)=>{e(["./Ui/Pagination/JumpToPage"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,L.whenFirstSeen)("woltlab-core-google-maps",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/woltlab-core-google-maps"],t,n)})).then(n.__importStar)})),(0,L.whenFirstSeen)("[data-google-maps-geocoding]",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/Geocoding"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes){if(!(e instanceof HTMLElement))continue;if(null===e.querySelector(".g-recaptcha-bubble-arrow"))continue;const t=e.querySelector("iframe");if(!t)continue;const n="a-"+t.name.split("-")[1],o=document.querySelector(`iframe[name="${n}"]`);o&&(o.closest("woltlab-core-dialog")&&((0,C.getPageOverlayContainer)().append(e),e.classList.add("g-recaptcha-container")))}})).observe(document.body,{childList:!0})}})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,n,o,i,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.ajaxApi=t.setContent=t.init=void 0,o=n.__importStar(o),i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent);const e=document.createElement("span");e.className="elementPointer",e.appendChild(document.createElement("span")),this.popover.appendChild(e),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),i.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((n=>{const o=r.default.identify(n);if(this.cache.has(o))return;if(null!==n.closest(".popover"))return void this.cache.set(o,{content:null,state:0});const i=e.legacy?o:~~n.getAttribute(e.attributeName);if(0===i)return;n.addEventListener("mouseenter",(e=>this.mouseEnter(e))),n.addEventListener("mouseleave",(()=>this.mouseLeave())),n instanceof HTMLAnchorElement&&n.href&&n.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${i}`;n.dataset.cacheId=a,this.elements.set(o,{element:n,identifier:t,objectId:i.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,n){const o=`${e}-${t}`,i=this.cache.get(o);if(void 0===i)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(n);a.childElementCount||(a=r.default.createFragmentFromHtml("<p>"+n+"</p>")),i.content=a,i.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===o&&this.show()}resetCache(e,t){const n=`${e}-${t}`;this.cache.has(n)&&this.cache.set(n,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const n=t.element.dataset.cacheId,o=this.cache.get(n);switch(o.state){case 2:this.popoverContent.appendChild(o.content),this.rebuild();break;case 0:{o.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const n=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},n,n)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{pointer:!0,vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,n){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");o.api(this,e,t,n)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,n){l().setContent(e,t,n)},t.ajaxApi=function(e,t,n){l().ajaxApi(e,t,n)},t.resetCache=function(e,t){l().resetCache(e,t)}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,n,o){"use strict";function i(){for(let e=0,t=a.length;e<t;e++){const t=a[e];s.has(t)||(t.addEventListener("click",r,{once:!0}),s.add(t))}}function r(e){e.preventDefault();const t=e.currentTarget;t.classList.remove("ignoredUserMessage"),s.delete(t),window.getSelection().removeAllRanges()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importDefault(o);const a=document.getElementsByClassName("ignoredUserMessage"),s=new Set;t.init=function(){i(),o.default.add("WoltLabSuite/Core/Ui/User/Ignore",i)}})),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["require","exports","tslib","../../../Environment","../../../Language","../../Screen"],(function(e,t,n,o,i,r){"use strict";function a(){f=!0,"safari"===o.browser()?window.setTimeout(c,1e3):window.requestAnimationFrame((()=>c()))}function s(){f=!1}function l(e){g=Math.min(g+e,0),m.style.setProperty("margin-left",`${g}px`,"")}function c(){if(!f)return;b=[],v=[];const e=h.clientWidth,t=h.scrollWidth;!p&&t>e&&(u=document.createElement("a"),u.className="mainMenuShowNext",u.href="#",u.innerHTML='<fa-icon size="32" name="angle-right" solid></fa-icon>',u.setAttribute("aria-hidden","true"),u.addEventListener("click",(e=>{e.preventDefault(),function(){if(v.length){const e=v.slice(0,3).pop();l(h.clientWidth-(e.offsetLeft+e.clientWidth)),h.lastElementChild===e&&u.classList.remove("active"),p.classList.add("active")}}()})),h.insertAdjacentElement("beforebegin",u),p=document.createElement("a"),p.className="mainMenuShowPrevious",p.href="#",p.innerHTML='<fa-icon size="32" name="angle-left" solid></fa-icon>',p.setAttribute("aria-hidden","true"),p.addEventListener("click",(e=>{e.preventDefault(),function(){if(b.length){const e=b.slice(-3)[0];l(-1*e.offsetLeft),h.firstElementChild===e&&p.classList.remove("active"),u.classList.add("active")}}()})),h.insertAdjacentElement("afterend",p)),(t>e||g<0)&&Array.from(h.children).forEach((t=>{const n=t.offsetLeft;n<0?b.push(t):n+t.clientWidth>e&&v.push(t)})),p?.classList[b.length?"add":"remove"]("active"),u?.classList[v.length?"add":"remove"]("active")}function d(){m.addEventListener("transitionend",c),new ResizeObserver((()=>{m.style.setProperty("margin-left","0px",""),g=0,c()})).observe(h),a(),h.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const n=document.createElement("button");n.type="button",n.className="visuallyHidden",n.setAttribute("aria-label",i.get("wcf.global.button.showMenu")),e.insertBefore(n,t.nextSibling);let o=!1;n.addEventListener("click",(()=>{o=!o,t.setAttribute("aria-expanded",o?"true":"false"),n.setAttribute("aria-label",i.get(o?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r);let u,p,m,h,f=!1,g=0,b=[],v=[];t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");h=e,m=t,r.on("screen-lg",{match:a,unmatch:s,setup:d})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class n{userId;username;link;constructor(e,t,n){this.userId=e,this.username=t,this.link=n}}let o;return{getLink:()=>o.link,init(e,t,i){if(o)throw new Error("User has already been initialized.");o=new n(e,t,i)},get userId(){return o.userId},get username(){return o.username}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,n,o,i,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l);class c{enableAll=!1;constructor(){"all"===window.sessionStorage.getItem(`${r.getStoragePrefix()}user-consent`)&&(this.enableAll=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){this.enableAll?this.enableAllExternalMedia():(0,o.wheneverFirstSeen)(".jsButtonMessageUserConsentEnable",(e=>{e.addEventListener("click",(e=>this.click(e)))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),l.default.userId?i.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${r.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){if(e.dataset.target)document.getElementById(e.dataset.target).hidden=!1;else{const t=atob(e.dataset.payload);s.default.insertHtml(t,e,"before")}e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let d;t.init=function(){d||(d=new c)}})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function n(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyElementTextToClipboard=t.copyTextToClipboard=void 0,t.copyTextToClipboard=n,t.copyElementTextToClipboard=async function(e){return n(e.textContent.replace(/\u200B/g,"").replace(/\u00A0/g," "))}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","../Helper/PageOverlay","../Language"],(function(e,t,n,o){"use strict";function i(){clearTimeout(s),a.classList.remove("active"),null!==c&&c(),l=!1}Object.defineProperty(t,"__esModule",{value:!0}),t.show=void 0;let r,a,s,l=!1,c=null,d=!1;t.show=function(e,t,u){l||(l=!0,d||(d=!0,a=document.createElement("div"),a.id="systemNotification",r=document.createElement("p"),r.addEventListener("click",i),a.appendChild(r),(0,n.getPageOverlayContainer)().appendChild(a)),c="function"==typeof t?t:null,r.className=u||"success",r.textContent=(0,o.getPhrase)(e||"wcf.global.success"),a.classList.add("active"),s=window.setTimeout(i,2e3))}})),define("WoltLabSuite/Core/Ui/Message/Share/Providers",["require","exports"],(function(e,t){"use strict";function n(e){o.add(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getShareProviders=t.addShareProviders=t.addShareProvider=void 0;const o=new Set;t.addShareProvider=n,t.addShareProviders=function(e){e.forEach((e=>n(e)))},t.getShareProviders=function(){return o}})),define("WoltLabSuite/Core/Ui/Message/Share/Dialog",["require","exports","tslib","../../../Dom/Traverse","../../../Clipboard","../../Notification","../../../StringUtil","../../../Dom/Change/Listener","./Providers","../../../Component/Dialog","WoltLabSuite/Core/Language","../../../Event/Handler"],(function(e,t,n,o,i,r,a,s,l,c,d,u){"use strict";function p(e,t){return`\n    <dl>\n      <dt>${(0,d.getPhrase)(e)}</dt>\n      <dd>\n        <div class="inputAddon">\n          <input type="text" class="long" readonly value="${a.escapeHTML(t)}">\n          <button type="button" class="inputSuffix button jsTooltip shareDialogCopyButton" title="${(0,d.getPhrase)("wcf.message.share.copy")}">\n            <fa-icon name="copy"></fa-icon>\n          </button>\n        </div>\n      </dd>\n    </dl>\n  `}function m(e){e.preventDefault();const t=e.currentTarget,n=f(t),s=function(){const e=Array.from((0,l.getShareProviders)()).map((e=>{const[t,n,o]=e;return`\n      <li>\n        <button type="button" class="button small messageShareProvider" title="${n}" aria-label="${n}" data-identifier="${t}">\n          ${o}\n        </button>\n      </li>\n    `})).join("\n");return e?`<ul class="inlineList">${e}</ul>`:""}();let m="";s&&(m=`\n        <dl class="messageShareButtons jsMessageShareButtons" data-url="${a.escapeHTML(n)}">\n          <dt>${(0,d.getPhrase)("wcf.message.share.socialMedia")}</dt>\n          <dd>${s}</dd>\n        </dl>\n      `);let h="";w&&(h=`\n        <dl>\n          <dt></dt>\n          <dd>\n              <button type="button" class="button shareDialogNativeButton" data-url="${a.escapeHTML(n)}" data-title="${a.escapeHTML(t.dataset.linkTitle||"")}">\n                ${(0,d.getPhrase)("wcf.message.share.nativeShare")}\n              </button>\n          </dd>\n        </dl>\n      `);const v=`\n      <div class="shareContentDialog">\n        ${function(e){let t=p("wcf.message.share.permalink",f(e));return function(e){const t={bbcodes:[]},n=new CustomEvent("share:bbcodes",{cancelable:!0,detail:t}),o=f(e);return e.dispatchEvent(n),n.defaultPrevented?t.bbcodes:e.dataset.bbcode?[["wcf.message.share.permalink.bbcode",e.dataset.bbcode]]:o&&e.dataset.linkTitle?[["wcf.message.share.permalink.bbcode",`[url='${o}']${e.dataset.linkTitle}[/url]`]]:[]}(e).forEach((([e,n])=>{t+=p(e,n)})),function(e){const t={permalinkHtml:[]},n=new CustomEvent("share:permalink-html",{cancelable:!0,detail:t}),o=f(e);return e.dispatchEvent(n),n.defaultPrevented?t.permalinkHtml:o&&e.dataset.linkTitle?[["wcf.message.share.permalink.html",`<a href="${a.escapeHTML(o)}">${a.escapeHTML(e.dataset.linkTitle)}</a>`]]:[]}(e).forEach((([e,n])=>{t+=p(e,n)})),t}(t)}\n        ${m}\n        ${h}\n      </div>\n    `,y=(0,c.dialogFactory)().fromHtml(v).withoutControls();y.content.querySelectorAll(".shareDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n=o.prevBySel(t,'input[type="text"]');await i.copyTextToClipboard(n.value),r.show((0,d.getPhrase)("wcf.message.share.copy.success"))}(e))))),w&&y.content.querySelector(".shareDialogNativeButton").addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n={url:t.dataset.url};t.dataset.title&&(n.title=t.dataset.title),await window.navigator.share(n)}(e))),s&&function(e,t){const n={facebook:{selector:'.messageShareProvider[data-identifier="Facebook"]',share(){g("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{selector:'.messageShareProvider[data-identifier="Reddit"]',share(){g("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{selector:'.messageShareProvider[data-identifier="Twitter"]',share(){g("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{selector:'.messageShareProvider[data-identifier="LinkedIn"]',share(){g("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{selector:'.messageShareProvider[data-identifier="Pinterest"]',share(){g("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{selector:'.messageShareProvider[data-identifier="XING"]',share(){g("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{selector:'.messageShareProvider[data-identifier="WhatsApp"]',share(){window.location.href="https://api.whatsapp.com/send?text="+b()+"%20"+t}}};u.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:n,pageDescription:b(),pageUrl:t}),Object.values(n).forEach((t=>{e.querySelector(t.selector)?.addEventListener("click",(()=>t.share()))}))}(y.content,n),y.show((0,d.getPhrase)("wcf.message.share"))}function h(){document.querySelectorAll(".shareButton, .wsShareButton").forEach((e=>{v.has(e)||(e.addEventListener("click",(e=>m(e))),v.add(e))}))}function f(e){return e instanceof HTMLAnchorElement?e.href:e.dataset.link}function g(e,t,n,o){window.open(t.replace("{pageURL}",o).replace("{text}",b()+(n?`%20${o}`:"")),e,"height=600,width=600")}function b(){const e=document.querySelector('meta[property="og:title"]');return null!==e?encodeURIComponent(e.content):""}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s),u=n.__importStar(u);const v=new WeakSet,w=void 0!==window.navigator.share;t.setup=function(){h(),s.default.add("WoltLabSuite/Core/Ui/Message/Share/Dialog",(()=>h()))}})),define("WoltLabSuite/Core/Ui/Feed/Dialog",["require","exports","tslib","../Dialog","../../StringUtil","../../Language","../../Clipboard","../Notification"],(function(e,t,n,o,i,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),t.setup=function(){document.querySelectorAll("a.rssFeed").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget,n=t.href,l=n.replace(/(\\?|&)at=[^&]*&?/,"$1").replace(/(\?|&)$/,"");o.default.openStatic("feedLinkDialog",`\n<p class="info">${r.get("wcf.global.rss.accessToken.info")}</p>\n<dl>\n  <dt>${r.get("wcf.global.rss.withoutAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${i.escapeHTML(l)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </button>\n    </div>\n  </dd>\n</dl>\n<dl>\n  <dt>${r.get("wcf.global.rss.withAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${i.escapeHTML(n)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </a>\n    </div>\n  </dd>\n</dl>\n`,{onShow(e){e.querySelectorAll(".feedLinkDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget.parentNode.querySelector('input[type="text"]');await a.copyTextToClipboard(t.value),s.show(r.get("wcf.global.rss.copy.success"))}(e)))))},title:t.title||r.get("wcf.global.button.rss")})}(e)))}))}})),define("WoltLabSuite/Core/Ui/Page/Menu/Main/Frontend",["require","exports"],(function(e,t){"use strict";function n(e,t){const o=e.querySelector(".boxMenuLink"),i=o.querySelector(".boxMenuLinkTitle").textContent;let r=0;const a=o.querySelector(".boxMenuLinkOutstandingItems");a&&(r=parseInt(a.textContent.replace(/[^0-9]/,""),10));const s=e.querySelector("ol");let l=[];if(s instanceof HTMLOListElement){let e=t;e<3&&(e=t+1),l=Array.from(s.children).map((t=>n(t,e)))}const c=o.getAttribute("href");let d,u;return c&&"#"!==c&&(d=o.href,"_blank"===o.target&&(u=!0)),{active:e.classList.contains("active"),children:l,counter:r,depth:t,identifier:o.parentElement.dataset.identifier,link:d,openInNewWindow:u,title:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.UiPageMenuMainFrontend=void 0;class o{getMenuItems(e){return Array.from(e.children).map((e=>n(e,0)))}}t.UiPageMenuMainFrontend=o,t.default=o})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Controller/Popover","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent","./Ui/Message/Share/Dialog","./Ui/Message/Share/Providers","./Ui/Feed/Dialog","./User","./Ui/Page/Menu/Main/Frontend","./LazyLoader","./Ajax/Backend"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),u=n.__importStar(u),p=n.__importDefault(p),m=n.__importDefault(m),t.setup=function(t){t.backgroundQueue.url=window.WSC_API_URL+t.backgroundQueue.url.substr(window.WCF_PATH.length),i.setup({dynamicColorScheme:t.dynamicColorScheme,enableMobileMenu:!0,pageMenuMainProvider:new m.default}),s.init(),t.styleChanger&&new Promise(((t,n)=>{e(["./Controller/Style/Changer"],t,n)})).then(n.__importStar).then((e=>{e.setup()})),t.enableUserPopover&&(r.init({className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user"}),r.init({attributeName:"data-user-id",className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user.deprecated"})),void 0!==t.executeCronjobs&&(0,f.prepareRequest)(t.executeCronjobs).get().disableLoadingIndicator().fetchAsResponse().catch((()=>{})),o.setUrl(t.backgroundQueue.url),(Math.random()<.1||t.backgroundQueue.force)&&o.invoke(),l.init(),t.shareButtonProviders&&(0,d.addShareProviders)(t.shareButtonProviders),c.setup(),p.default.userId&&u.setup(),(0,h.whenFirstSeen)("woltlab-core-reaction-summary",(()=>{new Promise(((t,n)=>{e(["./Ui/Reaction/SummaryDetails"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,h.whenFirstSeen)("woltlab-core-comment",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/woltlab-core-comment"],t,n)})).then(n.__importStar)})),(0,h.whenFirstSeen)("woltlab-core-comment-response",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/Response/woltlab-core-comment-response"],t,n)})).then(n.__importStar)}))}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(e>359)throw new TypeError("Hue cannot be larger than 359°");t/=100,n/=100;const o=(1-Math.abs(2*n-1))*t,i=o*(1-Math.abs(e/60%2-1)),r=n-o/2,[a,s,l]=0<=e&&e<60&&[o,i,0]||60<=e&&e<120&&[i,o,0]||120<=e&&e<180&&[0,o,i]||180<=e&&e<240&&[0,i,o]||240<=e&&e<300&&[i,0,o]||300<=e&&e<360&&[o,0,i];return{r:Math.round(255*(a+r)),g:Math.round(255*(s+r)),b:Math.round(255*(l+r))}}function o(e,t,n){const o={r:0,g:0,b:0},i=Math.floor(e/60),r=e/60-i,a=(n/=100)*(1-(t/=100)),s=n*(1-t*r),l=n*(1-t*(1-r));if(0==t)o.r=o.g=o.b=n;else switch(i){case 1:o.r=s,o.g=n,o.b=a;break;case 2:o.r=a,o.g=n,o.b=l;break;case 3:o.r=a,o.g=s,o.b=n;break;case 4:o.r=l,o.g=a,o.b=n;break;case 5:o.r=n,o.g=a,o.b=s;break;case 0:case 6:o.r=n,o.g=l,o.b=a}return{r:Math.round(255*o.r),g:Math.round(255*o.g),b:Math.round(255*o.b)}}function i(e,t,n){let o,i;e/=255,t/=255,n/=255;const r=Math.max(e,t,n),a=Math.min(e,t,n),s=r-a;if(o=0,r!==a){switch(r){case e:o=(t-n)/s*60;break;case t:o=60*(2+(n-e)/s);break;case n:o=60*(4+(e-t)/s)}o<0&&(o+=360)}const l=(r+a)/2;return i=0===s?0:s/(1-Math.abs(2*l-1)),{h:Math.round(o),s:Math.round(100*i),l:Math.round(100*l)}}function r(e,t,n){let o,i;e/=255,t/=255,n/=255;const r=Math.max(Math.max(e,t),n),a=Math.min(Math.min(e,t),n),s=r-a;if(o=0,r!==a){switch(r){case e:o=(t-n)/s*60;break;case t:o=60*(2+(n-e)/s);break;case n:o=60*(4+(e-t)/s)}o<0&&(o+=360)}return i=0===r?0:s/r,{h:Math.round(o),s:Math.round(100*i),v:Math.round(100*r)}}function a(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function s(e){if(e<0||e>255)throw new Error(`Invalid RGB component value '${e}' given.`);return e.toString(16).padStart(2,"0").toUpperCase()}function l(e,t,n){if(void 0===t){const o=/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString());if(!o)throw new Error("Invalid RGB data given.");e=+o[1],t=+o[2],n=+o[3]}return s(e)+s(t)+s(n)}function c(e){if(e<0||e>1)throw new Error(`Invalid alpha value '${e}' given.`);return Math.round(255*e).toString(16).padStart(2,"0").toUpperCase()}function d(e,t,n,o){if(void 0===t){const t=e;return l(t.r,t.g,t.b)+c(t.a)}return l(e,t,n)+c(o)}function u(e){return`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}function p(){let e=document.getElementById("jsColorUtilColorChecker");return null===e&&(e=document.createElement("span"),e.id="jsColorUtilColorChecker",document.body.appendChild(e)),e}function m(e){const t=p();return t.style.color="",t.style.color=e,""!==t.style.color}function h(e){if(!m(e))throw new Error(`Given string '${e}' is no valid color.`);const t=p();t.style.color=e;const n=window.getComputedStyle(t).color,o=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/.exec(n);if(o)return{r:+o[1],g:+o[2],b:+o[3],a:1};{const e=/^rgba\((\d+), ?(\d+), ?(\d+), ?([0-9.]+)\)$/.exec(n);if(e)return{r:+e[1],g:+e[2],b:+e[3],a:+e[4]}}throw new Error(`Cannot process color '${e}'.`)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringToRgba=t.isValidColor=t.rgbaToString=t.rgbaToHex=t.rgbToHex=t.hexToRgb=t.rgbToHsv=t.rgbToHsl=t.hsvToRgb=t.hslToRgb=void 0,t.hslToRgb=n,t.hsvToRgb=o,t.rgbToHsl=i,t.rgbToHsv=r,t.hexToRgb=a,t.rgbToHex=l,t.rgbaToHex=d,t.rgbaToString=u,t.isValidColor=m,t.stringToRgba=h,window.__wcf_bc_colorUtil={hexToRgb:a,hslToRgb:n,hsvToRgb:o,isValidColor:m,rgbaToHex:d,rgbaToString:u,rgbToHex:l,rgbToHsv:r,rgbToHsl:i,stringToRgba:h}})),define("WoltLabSuite/Core/Dictionary",["require","exports"],(function(e,t){"use strict";class n{_dictionary=new Map;set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,n=e.length;t<n;t++)e[t].forEach(((e,t)=>this.set(t,e)))}toObject(){const e={};return this._dictionary.forEach(((t,n)=>e[n]=t)),e}static fromObject(e){const t=new n;return Object.keys(e).forEach((n=>{t.set(n,e[n])})),t}get size(){return this._dictionary.size}}return n})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,n,o){"use strict";function i(e){return a.has(e)?"."+a.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,o=n.__importStar(o);const r=new Map(Object.entries({zip:"zipper",rar:"zipper",tar:"zipper",gz:"zipper",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",webp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"lines",doc:"word",docx:"word",odt:"word"})),a=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt","public.jpeg":"jpeg","public.png":"png","com.compuserve.gif":"gif","org.webmproject.webp":"webp"}));t.formatFilesize=function(e,t=2){let n="Byte";return e>=1e3&&(e/=1e3,n="kB"),e>=1e3&&(e/=1e3,n="MB"),e>=1e3&&(e/=1e3,n="GB"),e>=1e3&&(e/=1e3,n="TB"),o.formatNumeric(e,-t)+" "+n},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const n=e.substr(t+1);if(r.has(n))return r.get(n)}return""},t.getExtensionByMimeType=i,t.blobToFile=function(e,t){const n=i(e.type);return new File([e],t+n,{type:e.type})}})),define("WoltLabSuite/Core/List",["require","exports"],(function(e,t){"use strict";return class{_set=new Set;add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=void 0,t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let n=e.toString().split("e"),o=n[1]?+n[1]-t:-t;return n=(e=Math.round(+`${n[0]}e${o}`)).toString().split("e"),o=n[1]?+n[1]+t:t,+`${n[0]}e${o}`}})),define("WoltLabSuite/Core/ObjectMap",["require","exports"],(function(e,t){"use strict";return class{_map=new WeakMap;set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function n(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");o.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const o=new Map;t.add=n,t.addObject=function(e){Object.keys(e).forEach((t=>n(t,e[t])))},t.get=function(e){return!!o.has(e)&&o.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,n,o){this.type=e,this.content=t,this.alias=n,this.length=0|(o||"").length}function n(e,t,n,o){var i,r;return e.lastIndex=t,(i=e.exec(n))&&o&&i[1]&&(r=i[1].length,i.index+=r,i[0]=i[0].slice(r)),i}function o(e,i,s,l,c,d){var u,p,h,f,g,b,v,w,y,_,E,S,L,C,k,x,T,M,I,D,A,P,j,O,q;for(u in s)if(s.hasOwnProperty(u)&&s[u])for(p=s[u],p=Array.isArray(p)?p:[p],h=0;h<p.length;++h){if(d&&d.cause==u+","+h)return;for(g=(f=p[h]).inside,b=!!f.lookbehind,v=!!f.greedy,w=f.alias,v&&!f.pattern.global&&(y=f.pattern.toString().match(/[imsuy]*$/)[0],f.pattern=RegExp(f.pattern.source,y+"g")),_=f.pattern||f,E=l.next,S=c;E!==i.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){if(L=E.value,i.length>e.length)return;if(!(L instanceof t)){if(C=1,v){if(!(k=n(_,S,e,b))||k.index>=e.length)break;for(x=k.index,T=k.index+k[0].length,M=S,M+=E.value.length;x>=M;)M+=(E=E.next).value.length;if(S=M-=E.value.length,E.value instanceof t)continue;for(I=E;I!==i.tail&&(M<T||"string"==typeof I.value);I=I.next)C++,M+=I.value.length;C--,L=e.slice(S,M),k.index-=S}else if(!(k=n(_,0,L,b)))continue;x=k.index,D=k[0],A=L.slice(0,x),P=L.slice(x+D.length),j=S+L.length,d&&j>d.reach&&(d.reach=j),O=E.prev,A&&(O=r(i,O,A),S+=A.length),a(i,O,C),E=r(i,O,new t(u,g?m.tokenize(D,g):D,w,D)),P&&r(i,E,P),C>1&&(q={cause:u+","+h,reach:j},o(e,i,s,E.prev,S,q),d&&q.reach>d.reach&&(d.reach=q.reach))}}}}function i(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function r(e,t,n){var o=t.next,i={value:n,prev:t,next:o};return t.next=i,o.prev=i,e.length++,i}function a(e,t,n){var o,i=t.next;for(o=0;o<n&&i!==e.tail;o++)i=i.next;t.next=i,i.prev=t,e.length-=o}function s(){m.manual||m.highlightAll()}var l,c,d=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,u=0,p={},m={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof t?new t(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++u}),e.__id},clone:function e(t,n){var o,i,r;switch(n=n||{},m.util.type(t)){case"Object":if(i=m.util.objId(t),n[i])return n[i];for(r in o={},n[i]=o,t)t.hasOwnProperty(r)&&(o[r]=e(t[r],n));return o;case"Array":return i=m.util.objId(t),n[i]?n[i]:(o=[],n[i]=o,t.forEach((function(t,i){o[i]=e(t,n)})),o);default:return t}},getLanguage:function(e){for(;e;){var t=d.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(d,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){var e,t,n;if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(o){if(e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.stack)||[])[1])for(n in t=document.getElementsByTagName("script"))if(t[n].src==e)return t[n];return null}},isActive:function(e,t,n){for(var o,i="no-"+t;e;){if((o=e.classList).contains(t))return!0;if(o.contains(i))return!1;e=e.parentElement}return!!n}},languages:{plain:p,plaintext:p,text:p,txt:p,extend:function(e,t){var n,o=m.util.clone(m.languages[e]);for(n in t)o[n]=t[n];return o},insertBefore:function(e,t,n,o){var i,r,a,s,l;for(a in i=(o=o||m.languages)[e],r={},i)if(i.hasOwnProperty(a)){if(a==t)for(s in n)n.hasOwnProperty(s)&&(r[s]=n[s]);n.hasOwnProperty(a)||(r[a]=i[a])}return l=o[e],o[e]=r,m.languages.DFS(m.languages,(function(t,n){n===l&&t!=e&&(this[t]=r)})),r},DFS:function e(t,n,o,i){var r,a,s,l;for(a in i=i||{},r=m.util.objId,t)t.hasOwnProperty(a)&&(n.call(t,a,t[a],o||a),s=t[a],"Object"!==(l=m.util.type(s))||i[r(s)]?"Array"!==l||i[r(s)]||(i[r(s)]=!0,e(s,n,a,i)):(i[r(s)]=!0,e(s,n,null,i)))}},plugins:{},highlightAll:function(e,t){m.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var o,i,r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};for(m.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),m.hooks.run("before-all-elements-highlight",r),o=0;i=r.elements[o++];)m.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,o){function i(e){s.highlightedCode=e,m.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,m.hooks.run("after-highlight",s),m.hooks.run("complete",s),o&&o.call(s.element)}var r,a,s,l,c=m.util.getLanguage(t),d=m.languages[c];if(m.util.setLanguage(t,c),(r=t.parentElement)&&"pre"===r.nodeName.toLowerCase()&&m.util.setLanguage(r,c),a=t.textContent,s={element:t,language:c,grammar:d,code:a},m.hooks.run("before-sanity-check",s),(r=s.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!s.code)return m.hooks.run("complete",s),void(o&&o.call(s.element));m.hooks.run("before-highlight",s),s.grammar?n&&e.Worker?((l=new Worker(m.filename)).onmessage=function(e){i(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):i(m.highlight(s.code,s.grammar,s.language)):i(m.util.encode(s.code))},highlight:function(e,n,o){var i={code:e,grammar:n,language:o};if(m.hooks.run("before-tokenize",i),!i.grammar)throw new Error('The language "'+i.language+'" has no grammar.');return i.tokens=m.tokenize(i.code,i.grammar),m.hooks.run("after-tokenize",i),t.stringify(m.util.encode(i.tokens),i.language)},tokenize:function(e,t){var n,a,s=t.rest;if(s){for(n in s)t[n]=s[n];delete t.rest}return r(a=new i,a.head,e),o(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=m.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n,o,i=m.hooks.all[e];if(i&&i.length)for(n=0;o=i[n++];)o(t)}},Token:t};return e.Prism=m,t.stringify=function e(t,n){var o,i,r,a,s;if("string"==typeof t)return t;if(Array.isArray(t))return o="",t.forEach((function(t){o+=e(t,n)})),o;for(s in i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},(r=t.alias)&&(Array.isArray(r)?Array.prototype.push.apply(i.classes,r):i.classes.push(r)),m.hooks.run("wrap",i),a="",i.attributes)a+=" "+s+'="'+(i.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+a+">"+i.content+"</"+i.tag+">"},e.document?((l=m.util.currentScript())&&(m.filename=l.src,l.hasAttribute("data-manual")&&(m.manual=!0)),m.manual||("loading"===(c=document.readyState)||"interactive"===c&&l&&l.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),m):e.addEventListener?(m.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),o=n.language,i=n.code,r=n.immediateClose;e.postMessage(m.highlight(i,m.languages[o],o)),r&&e.close()}),!1),m):m}(_self),"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),define("prism/prism",(function(){})),window.Prism=window.Prism||{},window.Prism.manual=!0,define("WoltLabSuite/Core/Prism",["prism/prism"],(function(){return window.Prism.hooks.add("wrap",(e=>{e.classes=e.classes.map((e=>`prism-${e}`))})),Prism})),define("WoltLabSuite/Core/Template",["require","exports"],(function(e,t){"use strict";return window.WoltLabTemplate})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=void 0,t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let n,o=document.createElement("span");for(;n=t.nextNode();){const t=n,i=t.data.split(/\r?\n/);for(let n=0,r=i.length;n<r;n++){const r=i[n];n>=1&&(o.appendChild(document.createTextNode("\n")),yield o,o=document.createElement("span"));let a=document.createTextNode(r),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(a),a=e,s=s.parentNode}o.appendChild(a)}}yield o}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper"],(function(e,t,n,o,i,r,a,s){"use strict";async function l(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s);class c{static chunkSize=50;container;codeContainer;language;constructor(e){this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e)))?.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new c(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("button");t.type="button",t.innerHTML='<fa-icon size="24" name="copy"></fa-icon>',t.classList.add("jsTooltip"),t.title=o.get("wcf.message.bbcode.code.copy");const n=async()=>{await i.copyElementTextToClipboard(this.codeContainer),r.show(o.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",(()=>n())),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");const t=(await new Promise(((t,n)=>{e(["../prism-meta"],t,n)})).then(n.__importStar)).default;if(!t[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((n,o)=>{e(["prism/components/prism-"+t[this.language].file],n,o)})).then(n.__importStar),await l();const o=a.default.languages[this.language];if(!o)throw new Error(`Invalid language '${this.language}' given.`);const i=document.createElement("div");i.innerHTML=a.default.highlight(this.codeContainer.textContent,o,this.language),await l();const r=this.codeContainer.querySelectorAll(".codeBoxLine > span"),d=s.splitIntoLines(i);for(let e=0,t=r.length;e<t;e+=c.chunkSize){await l();const n=Math.min(e+c.chunkSize,t);for(let t=e;t<n;t++){const e=r[t],n=d.next().value;e.parentNode.replaceChild(n,e)}}this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}}return c})),define("WoltLabSuite/Core/Bbcode/Collapsible",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(e.classList.toggle("collapsed")){if(t.forEach((e=>{const t=e.dataset.titleExpand,n=e.querySelector("fa-icon");n?(n.setIcon("up-right-and-down-left-from-center"),e.title=t):e.textContent=t})),n instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse,n=e.querySelector("fa-icon");n?(n.setIcon("down-left-and-up-right-to-center"),e.title=t):e.textContent=t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),o=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,o){t.forEach((o=>{o.classList.add("jsToggleButtonEnabled"),o.addEventListener("click",(o=>n(e,t,o))),o.addEventListener("keydown",(o=>{"Enter"!==o.key&&" "!==o.key||(o.preventDefault(),n(e,t))}))})),0!==o.scrollTop&&(o.scrollTop=0,n(e,t)),o.addEventListener("scroll",(()=>{o.scrollTop=0,e.classList.contains("collapsed")&&n(e,t)}))}(e,t,o),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Component/Confirmation/Custom",["require","exports","tslib","../Dialog","../../Language"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationCustom=void 0,i=n.__importStar(i),t.ConfirmationCustom=class{#_;constructor(e){this.#_=e}async message(e){if(""===e.trim())throw new Error("An empty message for the delete confirmation was provided. Please use `defaultMessage()` if you do not want to provide a custom message.");const t=(0,o.dialogFactory)().fromHtml(`<p>${e}</p>`).asConfirmation({primary:i.get("wcf.dialog.button.primary.confirm")});return t.show(this.#_),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async withFormElements(e){const t=(0,o.dialogFactory)().withoutContent().asConfirmation({primary:i.get("wcf.dialog.button.primary.confirm")});return e(t),t.show(this.#_),new Promise((e=>{t.addEventListener("primary",(()=>{e({result:!0,dialog:t})})),t.addEventListener("cancel",(()=>{e({result:!1,dialog:t})}))}))}async withoutMessage(){const e=(0,o.dialogFactory)().withoutContent().asConfirmation({primary:i.get("wcf.dialog.button.primary.confirm")});return e.show(this.#_),new Promise((t=>{e.addEventListener("primary",(()=>t(!0))),e.addEventListener("cancel",(()=>t(!1)))}))}}})),define("WoltLabSuite/Core/Component/Confirmation",["require","exports","tslib","./Dialog","../Language","../Dom/Util","./Confirmation/Custom"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.confirmationFactory=void 0,r=n.__importStar(r);class s{custom(e){return new a.ConfirmationCustom(e)}async delete(e){const t=`<p>${(0,i.getPhrase)("wcf.dialog.confirmation.cannotBeUndone")}</p>`,n=(0,o.dialogFactory)().fromHtml(t).asConfirmation({primary:(0,i.getPhrase)("wcf.dialog.button.primary.delete")});let r;return r=void 0===e?(0,i.getPhrase)("wcf.dialog.confirmation.delete.indeterminate"):(0,i.getPhrase)("wcf.dialog.confirmation.delete",{title:e}),n.show(r),new Promise((e=>{n.addEventListener("primary",(()=>e(!0))),n.addEventListener("cancel",(()=>e(!1)))}))}async restore(e){const t=(0,o.dialogFactory)().withoutContent().asConfirmation();let n;return n=void 0===e?(0,i.getPhrase)("wcf.dialog.confirmation.restore.indeterminate"):(0,i.getPhrase)("wcf.dialog.confirmation.restore",{title:e}),t.show(n),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async softDelete(e,t=!1){let n;if(n=void 0===e?(0,i.getPhrase)("wcf.dialog.confirmation.softDelete.indeterminate"):(0,i.getPhrase)("wcf.dialog.confirmation.softDelete",{title:e}),t)return this.withReason(n,!0);const r=(0,o.dialogFactory)().withoutContent().asConfirmation();return r.show(n),new Promise((e=>{r.addEventListener("primary",(()=>{e({result:!0})})),r.addEventListener("cancel",(()=>{e({result:!1})}))}))}async withReason(e,t){const n=(0,o.dialogFactory)().withoutContent().asConfirmation(),a=r.getUniqueId(),s=(0,i.getPhrase)(t?"wcf.dialog.confirmation.reason.optional":"wcf.dialog.confirmation.reason"),l=document.createElement("dl");l.innerHTML=`\n      <dt><label for="${a}">${s}</label></dt>\n      <dd><textarea id="${a}" cols="40" rows="3"></textarea></dd>\n    `;const c=l.querySelector("textarea");return n.content.append(l),n.show(e),new Promise((e=>{n.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),n.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,o={add(e,t){if(n.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");n.set(e,t)},delete(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);n.delete(e)},has:e=>n.has(e),getData(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return n.get(e)()},setupDialog(e,t){let n;return e.addEventListener("validate",(e=>{o.has(t)&&(n=o.getData(t),o.delete(t),n instanceof Promise&&(e.detail.push(new Promise((e=>{n.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==n?n instanceof Promise?n.then((e=>{t(e)})):t(n):t({})}))}))}};return o})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return n(e,"ArrowDown",40)},t.ArrowLeft=function(e){return n(e,"ArrowLeft",37)},t.ArrowRight=function(e){return n(e,"ArrowRight",39)},t.ArrowUp=function(e){return n(e,"ArrowUp",38)},t.Comma=function(e){return n(e,",",44)},t.End=function(e){return n(e,"End",35)},t.Enter=function(e){return n(e,"Enter",13)},t.Escape=function(e){return n(e,"Escape",27)},t.Home=function(e){return n(e,"Home",36)},t.Space=function(e){return n(e,"Space",32)},t.Tab=function(e){return n(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=void 0,t.promiseMutex=function(e){let t=!1;return function(...n){return!t&&(t=!0,e(...n).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t,n){const i=u.get(e);if(void 0===n&&void 0===(n=Array.from(i.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);i.element.value=t.toString(),o.triggerEvent(i.element,"change"),i.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),i.dropdownToggle.append(r),u.set(e,i),"function"==typeof i.callback&&i.callback(n)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const n=document.createElement("input");n.type="hidden",n.name=e,n.value=d(e).toString(),t.appendChild(n)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,n,o,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=n.toString(),m.appendChild(h)),function(e,t,n,o,c,d){function m(t){const n=t.currentTarget,o=~~n.dataset.languageId,i=b.querySelector(".active");null!==i&&i.classList.remove("active"),o&&n.classList.add("active"),s(e,o,n)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(o).forEach((([e,t])=>{const o=document.createElement("li");o.className="boxFlag",o.addEventListener("click",m),o.dataset.languageId=e,void 0!==t.languageCode&&(o.dataset.languageCode=t.languageCode),b.appendChild(o);const i=document.createElement("a");i.className="box24",i.href="#",i.addEventListener("click",(e=>e.preventDefault())),o.appendChild(i);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",i.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,i.appendChild(a),+e===n&&(g.innerHTML=i.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const o=document.createElement("a");o.textContent=i.get("wcf.global.language.noSelection"),t.appendChild(o),0===n&&(g.innerHTML=o.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===n){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const n=document.createElement("span");n.textContent=i.get("wcf.global.language.noSelection"),n.append(t),e.appendChild(n)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const w=t.closest("form");if(null!==w){w.addEventListener("submit",l);let t=p.get(w);void 0===t&&(t=[],p.set(w,t)),t.push(e)}}(t,h,n,o,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid  input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t,n){const o=d.get(e),i=r.default.getDropdownMenu(o.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=i?i.textContent:"";if(o.languageId!==t){const i=p.get(e);if(o.languageId){const e=o.callbacks.get("beforeSelect");e&&e(o.element),i.set(o.languageId,o.element.value)}if(0===t?p.set(e,new Map):(o.buttonLabel.classList.contains("active")||n)&&(o.element.value=i.get(t)||""),o.buttonLabel.textContent=a,o.buttonLabel.querySelector("fa-icon")?.remove(),t){o.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),o.buttonLabel.append(e)}else o.buttonLabel.classList.remove("active");o.languageId=t}n||(o.element.blur(),o.element.focus()),o.callbacks.has("select")&&o.callbacks.get("select")(o.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),o=document.getElementById(e).dataset.inputId,i=d.get(o),a=p.get(o);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;i.languageId&&(n=t===i.languageId?""===i.element.value.trim():!a.get(t));const o=e.querySelector("span");if(o.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),o.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const n=d.get(e);if(!n.isEnabled)return;const o=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&o.set(n.languageId,n.element.value),o.size&&(o.forEach((function(n,o){const i=document.createElement("input");i.type="hidden",i.name=`${e}_i18n[${o}]`,i.value=n,t.appendChild(i)})),n.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,n,o){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,n,o,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const n=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),n&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=i.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const o=~~n.dataset.languageId,i=f.querySelector(".active");null!==i&&i.classList.remove("active"),o&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,o,r)};if(Object.entries(o).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const o=document.createElement("span");o.textContent=t,n.appendChild(o),n.addEventListener("click",g),f.appendChild(n)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const n=document.createElement("span");n.textContent=i.get("wcf.global.button.disabledI18n"),t.appendChild(n),f.appendChild(t)}let b;(a||n.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,n,o)},t.registerCallback=function(e,t,n){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,n)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const n=p.get(e);return n.set(t.languageId,t.element.value),n},t.setValues=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);n.element.value="";const o=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(o.has(0))return n.element.value=o.get(0),o.delete(0),p.set(e,o),void s(e,0,!0);p.set(e,o),n.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const n=t.buttonLabel.parentElement;o.default.hide(n),n.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const n=t.buttonLabel.parentElement;o.default.show(n),n.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!n.isEnabled)return!0;const o=p.get(e),i=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&o.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(i.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(o.has(t)&&0!==o.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenToCkeditor=t.dispatchToCkeditor=void 0;class n{#E;constructor(e){this.#E=e}collectMetaData(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class o{#E;constructor(e){this.#E=e}bbcode(e){return this.#E.addEventListener("ckeditor5:bbcode",(t=>{const n=e(t.detail);if(!0===n)t.preventDefault();else if(!1!==n)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#E.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#E.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#E.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#E.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#E.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#E.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#E.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#E.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#E.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#E.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#E.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#E.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#E.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#E.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#E.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new o(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function o(e,t,o){const i={abortController:o,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(i),new Promise((e=>{i.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:i})=>{if(!i.attachment)return;const r=function(e){const t=document.querySelector(`.messageTabMenu[data-wysiwyg-container-id="${e.id}"]`);if(!t)return[];const n=t.querySelector(".formAttachmentContent > .formAttachmentList");return n?Array.from(n.querySelectorAll('.formAttachmentListItem[data-is-image="1"]')).map((e=>parseInt(e.dataset.objectId))):[]}(e);t.woltlabAttachment={inlineImageIds:r,resolveAttachmentUrl(e,t){let n="";return t&&(n="&thumbnail=1"),`${window.WSC_API_URL}index.php?attachment/${e}/${n}`}},t.woltlabUpload={uploadImage:(t,n)=>o(e,t,n),uploadOther:t=>o(e,t)},(0,n.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,n.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:n})=>{""===n?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(`<img src="${n}" class="woltlabAttachment" data-attachment-id="${t.toString()}">`)}))}(e),function(e){(0,n.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)}))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,n;if(e&&e.__esModule)return e;if(t={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,n){"use strict";function o(e,t,o){const i={abortController:o,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(i),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(t){(0,n.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:n})=>{e.woltlabMedia={resolveMediaUrl(e,t){let n="";return"original"!==t&&(n=`&thumbnail=${t}`),`${window.WSC_API_URL}index.php?media/${e}/${n}`}},!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>o(t,e,n),uploadOther:e=>o(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,n)=>{e(["../../Media/Manager/Editor"],t,n)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Ajax/Backend","../../Dom/Util","./Event"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){if(e.length>24)return[];const t=new URL(window.WSC_API_URL+"index.php?editor-get-mention-suggestions/");return t.searchParams.set("query",e),(await(0,n.prepareRequest)(t.toString()).get().allowCaching().disableLoadingIndicator().fetchAsJson()).map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'<fa-icon name="users"></fa-icon>',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,o.createFragmentFromHtml)(`\n            <span class="ckeditor5__mention">${e.icon} ${e.text}</span>\n          `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,o.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,o.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:o,content:i,link:r}=t;var a;t.isText&&(a=i,i=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'</p><p><br data-cke-filler="true"></p><p>')).split("\n\n").map((e=>`<p>${e=e.replaceAll("\n","<br>")}</p>`)).join("")),o=(0,n.escapeHTML)(o),r=(0,n.escapeHTML)(r),e.insertHtml(`<woltlab-quote data-author="${o}" data-link="${r}">${i}</woltlab-quote>\n    <p><br data-cke-filler="true"></p>`)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,o,i,r){"use strict";function a(e){return`${(0,n.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeAutosave=t.setupRestoreDraft=t.deleteDraft=void 0,t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let n;try{const e=window.localStorage.getItem(a(t));null!==e&&(n=JSON.parse(e))}catch{return void s(t)}if(void 0===n)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=n.timestamp)return;const c=e.data.get();if(c===n.html)return;e.data.set(n.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n    <div class="ckeditor5__restoreDraft__question">\n      ${(0,i.escapeHTML)((0,o.getPhrase)("wcf.editor.restoreDraft"))}\n    </div>\n    <div class="ckeditor5__restoreDraft__buttons">\n      <button type="button" class="button buttonPrimary small" data-type="submit">\n        ${(0,i.escapeHTML)((0,o.getPhrase)("wcf.dialog.button.primary.restore"))}\n      </button>\n      <button type="button" class="button small" data-type="cancel">\n        ${(0,i.escapeHTML)((0,o.getPhrase)("wcf.dialog.button.cancel"))}\n      </button>\n      <button type="button" class="button small" data-type="preview">\n        ${(0,i.escapeHTML)((0,o.getPhrase)("wcf.editor.restoreDraft.preview"))}\n      </button>\n    </div>\n  `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const m=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n    <button type="button" class="ck ck-button">\n      ${(0,i.escapeHTML)((0,o.getPhrase)("wcf.editor.restoreDraft.restoreOrDiscard"))}\n    </button>\n  `,e}(),n=e.ui.view.toolbar.element,r=Array.from(n.children);r.forEach((e=>e.hidden=!0)),n.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,n){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let n,o;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{o=JSON.parse(n)}catch{}if(void 0===o||o.timestamp<e)try{localStorage.removeItem(t)}catch{}}}))}(),t.autosave={save:t=>(function(e,t,n){if(""===n)return void s(t);const o={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(o)),(0,r.dispatchToCkeditor)(e).autosave(o)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,n,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(n))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(n)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=void 0;class o{#S;#L="|";#C=[];#k=[];#x={};constructor(e){this.#S=e}#T(){this.#S.undo?this.#k.push("undo","redo"):this.#C.push("Undo")}#M(){this.#k.push("bold","italic")}#I(){const e=[];this.#S.heading?e.push("heading"):this.#C.push("Heading"),this.#S.underline?e.push("underline"):this.#C.push("Underline"),this.#S.strikethrough?e.push("strikethrough"):this.#C.push("Strikethrough"),e.push(this.#L),this.#S.mark?e.push("highlight"):this.#C.push("Highlight"),this.#S.fontColor?e.push("fontColor"):this.#C.push("FontColor"),this.#S.fontFamily?e.push("fontFamily"):this.#C.push("FontFamily"),this.#S.fontSize?e.push("fontSize"):this.#C.push("FontSize"),e.push(this.#L),this.#S.subscript?e.push("subscript"):this.#C.push("Subscript"),this.#S.superscript?e.push("superscript"):this.#C.push("Superscript"),0!==e.length&&e.push(this.#L,"removeFormat"),e.length>0&&(this.#k.push({label:"woltlabToolbarGroup_format",items:e}),this.#x.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#D(){this.#S.list?(this.#k.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#x.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#C.push("List")}#A(){this.#S.alignment?this.#k.push("alignment"):this.#C.push("Alignment")}#P(){this.#S.link?this.#k.push("link"):this.#C.push("Link","LinkImage")}#j(){this.#S.image?(this.#k.push("insertImage"),this.#S.attachment||this.#C.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#S.link&&this.#C.push("LinkImage")}#O(){this.#S.codeBlock?this.#k.push("codeBlock"):this.#C.push("CodeBlock","WoltlabCodeBlock"),this.#S.code?this.#k.push("code"):this.#C.push("Code","WoltlabCode")}#q(){this.#S.table?this.#k.push("insertTable"):this.#C.push("Table","TableToolbar"),this.#S.quoteBlock?this.#k.push("blockQuote"):this.#C.push("BlockQuote","WoltlabBlockQuote"),this.#S.spoiler?this.#k.push("spoiler"):this.#C.push("WoltlabSpoiler"),this.#S.html?this.#k.push("htmlEmbed"):this.#C.push("HtmlEmbed","WoltlabHtmlEmbed")}#B(){this.#k.push(this.#L)}#N(){this.#S.media||this.#C.push("WoltlabMedia")}#U(){this.#S.mention||this.#C.push("Mention","WoltlabMention")}#F(){let e=!1;return this.#k.filter((t=>"string"==typeof t&&t===this.#L?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#C.length>0||this.#k.length>0)throw new Error("Cannot build the configuration twice.");this.#T(),this.#B(),this.#B(),this.#M(),this.#P(),this.#I(),this.#B(),this.#D(),this.#A(),this.#B(),this.#j(),this.#O(),this.#q(),this.#B(),this.#N(),this.#U()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:o}=window.CKEDITOR_TRANSLATIONS[t];return o.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),o.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),o["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),o.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),o["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),o.Spoiler=(0,n.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,n.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,n.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,n.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,n.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#C,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#F(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#x,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new o(e);return t.build(),t.toConfig()}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e,t){e.editing.view.document.on("enter",((e,o)=>{if(o.isSoft)return;o.preventDefault(),e.stop();const i=t.getHtml();""!==i&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:i})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,o){"use strict";function i(e,t){const n=e.closest("p");if(null===n)return;const o=document.createElement("figure");o.classList.add("image",t),o.append(e),n.insertAdjacentElement("beforebegin",o),""===n.innerHTML&&n.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&o.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const n=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const n=e.childNodes[0];n instanceof HTMLBRElement&&"true"!==n.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,n=e.length;t<n;t++){const o=e[t];let i=0;for(;t+i+1<n;){const n=e[t+i+1];if(o.nextElementSibling!==n)break;i++}if(0===i)o.remove();else{const n=i+1,o=Math.ceil(n/2);e.slice(t,t+o).forEach((e=>{e.remove()})),t+=i}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?i(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&i(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,o=n.__importDefault(o),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a <textarea>.");e.value=r(e.value)}})),define("WoltLabSuite/Core/Component/Ckeditor/Keyboard",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSubmitShortcut=void 0,t.setupSubmitShortcut=function(e){const t=e.element.closest("form, .message, .jsOuterEditorContainer");if(null===t)return;const o=t.querySelector(".formSubmit");if(null===o)return;const i=o.querySelector('input[type="submit"], button[data-type="save"], button[accesskey="s"]');if(null===i)return;i.removeAttribute("accesskey");const r=function(e){return t=>{if("KeyS"!==t.code)return;let n;n=window.navigator.platform.startsWith("Mac")?t.ctrlKey&&t.altKey:t.altKey&&!t.ctrlKey,n&&(t.preventDefault(),t.stopPropagation(),e.click())}}(i);t.addEventListener("keydown",r),(0,n.listenToCkeditor)(e.element).destroy((()=>{t.removeEventListener("keydown",r)}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Layer",["require","exports","../../Helper/PageOverlay"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const o=["ck-body-wrapper","ck-inspector-wrapper","ck-inspector-portal"];let i=!1;t.setup=function(){i||(i=!0,new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)if(e instanceof HTMLElement)for(const t of o)e.classList.contains(t)&&(0,n.getPageOverlayContainer)().append(e)})).observe(document.body,{childList:!0}))}})),define("WoltLabSuite/Core/Component/Ckeditor",["require","exports","tslib","./Ckeditor/Attachment","./Ckeditor/Media","./Ckeditor/Mention","./Ckeditor/Quote","./Ckeditor/Autosave","./Ckeditor/Configuration","./Ckeditor/Event","./Ckeditor/SubmitOnEnter","./Ckeditor/Normalizer","../Ui/Scroll","../Devtools","./Ckeditor/Keyboard","./Ckeditor/Layer","../Environment"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,m,h,f,g){"use strict";function*b(e,t,n){if(e.is("element",t)&&Object.entries(n).every((([t,n])=>!!e.hasAttribute(t)&&String(e.getAttribute(t))===n.toString())))yield e;else for(const o of e.getChildren())o.is("element")&&(yield*b(o,t,n))}function v(e,t){for(const n of e)if("string"==typeof n){if(n===t)return!0}else if(v(n.items,t))return!0;return!1}function w(e){return y.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getCkeditorById=t.getCkeditor=t.setupCkeditor=void 0,m=n.__importDefault(m);const y=new WeakMap;class _{#H;#S;constructor(e,t){this.#H=e,this.#S=t}async destroy(){(0,c.dispatchToCkeditor)(this.sourceElement).destroy(),await this.#H.destroy()}discardDraft(){this.#S.autosave&&(0,s.deleteDraft)(this.#S.autosave)}focus(){const e=this.#H.ui.element,{bottom:t,top:n}=e.getBoundingClientRect(),o=window.innerHeight;let i=!1;(n>0&&n<o||t>0&&t<o)&&(i=!0),i?this.#H.editing.view.focus():(0,p.element)(e,(()=>{this.#H.editing.view.focus()}))}getHtml(){return this.#H.data.get()}insertHtml(e){e=(0,u.normalizeLegacyHtml)(e),this.#H.model.change((t=>{const n=this.#H.data.processor.toView(e),o=this.#H.data.toModel(n),i=this.#H.model.insertContent(o);t.setSelection(i.end),this.focus()}))}insertText(e){const t=document.createElement("div");t.textContent=e,this.insertHtml(t.innerHTML)}isVisible(){return 0!==this.#H.ui.element.clientWidth}setHtml(e,t=!0){e=(0,u.normalizeLegacyHtml)(e),this.#H.model.change((n=>{let o=this.#H.model.createRangeIn(this.#H.model.document.getRoot());const i=this.#H.data.processor.toView(e),r=this.#H.data.toModel(i);o=this.#H.model.insertContent(r,o),n.setSelection(o.end),t&&this.focus()}))}removeAll(e,t){this.#H.model.change((n=>{const o=b(this.#H.model.document.getRoot(),e,t);for(const e of o)n.remove(e)}))}reset(){if(this.setHtml("",!1),(0,c.dispatchToCkeditor)(this.sourceElement).reset({ckeditor:this}),"safari"===(0,g.browser)()&&!(0,g.touch)()){const e=this.#H.ui.element;e.focus(),window.setTimeout((()=>{e.blur()}),0)}}get element(){return this.#H.ui.element}get features(){return this.#S}get sourceElement(){return this.#H.sourceElement}}t.setupCkeditor=async function(t,p,g,b,w){if(y.has(t))throw new TypeError(`Cannot initialize the editor for '${t.id}' twice.`);(0,f.setup)();const{create:E,CKEditor5:S}=await new Promise(((t,n)=>{e(["@woltlab/editor"],t,n)})).then(n.__importStar);await new Promise((e=>{window.requestAnimationFrame(e)})),function(e,t){(0,c.dispatchToCkeditor)(e).setupFeatures({features:t}),t.autosave&&!1===m.default._internal_.editorAutosave()&&(t.autosave=""),Object.freeze(t)}(t,p),p.attachment&&(0,o.setup)(t),p.media&&(0,i.setup)(t),(0,r.setup)(t),p.quoteBlock&&(0,a.setup)(t);const L=function(e,t,n,o,i){const r=(0,l.createConfigurationFor)(t);r.codeBlock={languages:o},r.woltlabBbcode=n,""!==t.autosave&&(0,s.initializeAutosave)(e,r,t.autosave),(0,c.dispatchToCkeditor)(e).setupConfiguration({configuration:r,features:t,modules:i});const a=r.toolbar;for(let{name:e}of n)e=`woltlabBbcode_${e}`,v(a,e)||a.push(e);return r}(t,p,g,b,S);w&&(L.licenseKey=w),(0,u.normalizeLegacyMessage)(t);const C=await E(t,L),k=new _(C,p);return p.autosave&&(0,s.setupRestoreDraft)(C,p.autosave),y.set(t,k),(0,c.dispatchToCkeditor)(t).ready({ckeditor:k}),p.submitOnEnter&&(0,d.setup)(C,k),""===k.getHtml()&&(0,c.dispatchToCkeditor)(t).discardRecoveredData(),(0,h.setupSubmitShortcut)(k),function(e,t){e.model.document.on("change:data",(()=>{(0,c.dispatchToCkeditor)(t).changeData()}))}(C,t),window.ENABLE_DEBUG_MODE&&window.ENABLE_DEVELOPER_TOOLS&&m.default._internal_.editorInspector()&&new Promise(((t,n)=>{e(["@ckeditor/ckeditor5-inspector"],t,n)})).then(n.__importStar).then((e=>{e.default.attach(C)})),k},t.getCkeditor=w,t.getCkeditorById=function(e,t=!0){const n=document.getElementById(e);if(null!==n)return w(n);if(t)throw new Error(`Unable to find an element with the id '${e}'.`)}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,n,o,i){"use strict";function r(e){(0,i.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,i.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),t.init=function(e,t,n,i){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected <textarea class="wysiwygTextarea" /> for id '${e}'.`);o.init(e,t,n,i),o.registerCallback(e,"select",r),o.registerCallback(e,"submit",a),o.registerCallback(e,"beforeSelect",a)}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Ui/Suggestion",["require","exports","tslib","../Ajax","../Core","./Dropdown/Simple"],(function(e,t,n,o,i,r){"use strict";return o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),class{ajaxPayload;callbackSelect;dropdownMenu=null;excludedSearchValues;element;threshold;value="";constructor(e,t){const n=document.getElementById(e);if(null===n)throw new Error("Expected a valid element id.");if(this.element=n,this.ajaxPayload=i.extend({actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},t.ajax),"function"!=typeof t.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this.callbackSelect=t.callbackSelect,this.excludedSearchValues=new Set(Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[]),this.threshold=void 0===t.threshold?3:t.threshold,this.element.addEventListener("click",(e=>e.preventDefault())),this.element.addEventListener("keydown",(e=>this.keyDown(e))),this.element.addEventListener("keyup",(e=>this.keyUp(e)))}addExcludedValue(e){this.excludedSearchValues.add(e)}removeExcludedValue(e){this.excludedSearchValues.delete(e)}isActive(){return null!==this.dropdownMenu&&r.default.isOpen(this.element.id)}keyDown(e){if(!this.isActive())return!0;if(-1===["ArrowDown","ArrowUp","Enter","Escape"].indexOf(e.key))return!0;let t,n=0;const o=this.dropdownMenu.childElementCount;for(;n<o&&(t=this.dropdownMenu.children[n],!t.classList.contains("active"));)n++;if("Enter"===e.key)r.default.close(this.element.id),this.select(void 0,t);else if("Escape"===e.key){if(!r.default.isOpen(this.element.id))return!0;r.default.close(this.element.id)}else{let i=0;"ArrowUp"===e.key?i=(0===n?o:n)-1:"ArrowDown"===e.key&&(i=n+1,i===o&&(i=0)),i!==n&&(t.classList.remove("active"),this.dropdownMenu.children[i].classList.add("active"))}return e.preventDefault(),!1}select(e,t){e instanceof MouseEvent&&(t=e.currentTarget.parentNode);const n=t.children[0];this.callbackSelect(this.element.id,{objectId:+(n.dataset.objectId||0),value:t.textContent||"",type:n.dataset.type||""}),e instanceof MouseEvent&&this.element.focus()}keyUp(e){const t=e.currentTarget.value.trim();if(this.value!==t){if(t.length<this.threshold)return null!==this.dropdownMenu&&r.default.close(this.element.id),void(this.value=t);this.value=t,o.api(this,{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:t}}})}}_ajaxSetup(){return{data:this.ajaxPayload}}_ajaxSuccess(e){null===this.dropdownMenu?(this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="dropdownMenu",r.default.initFragment(this.element,this.dropdownMenu)):this.dropdownMenu.innerHTML="",Array.isArray(e.returnValues)&&e.returnValues.length>0?(e.returnValues.forEach(((e,t)=>{const n=document.createElement("a");e.icon?(n.className="box16",n.innerHTML=`${e.icon} <span></span>`,n.children[1].textContent=e.label):n.textContent=e.label,n.dataset.objectId=e.objectID.toString(),e.type&&(n.dataset.type=e.type),n.addEventListener("click",(e=>this.select(e)));const o=document.createElement("li");0===t&&(o.className="active"),o.appendChild(n),this.dropdownMenu.appendChild(o)})),r.default.open(this.element.id,!0)):r.default.close(this.element.id)}}})),define("WoltLabSuite/Core/Ui/ItemList",["require","exports","tslib","../Core","../Dom/Traverse","../Language","./Suggestion","./Dropdown/Simple","../Dom/Util"],(function(e,t,n,o,i,r,a,s,l){"use strict";function c(e){const t=_.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems}function d(e){const t=_.get(e);c(e)?(l.default.show(t.element),l.default.hide(t.limitReached),t.list.dataset.acceptsNewItems="true"):(l.default.hide(t.element),l.default.show(t.limitReached),t.list.dataset.acceptsNewItems="false")}function u(e){const t=e.currentTarget,n=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==n&&(n.classList.contains("active")?b(n):n.classList.add("active")):"Escape"===e.key&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")}function p(e){if("Enter"===e.key){e.preventDefault();const t=e.currentTarget;if(_.get(t.id).options.restricted)return;const n=t.value.trim();n.length&&g(t.id,{objectId:0,value:n})}}function m(e){const t=e.currentTarget;if(_.get(t.id).options.restricted)return;let n=t.value;n.includes(",")&&(n=n.replace(/,/g,""),n.length?g(t.id,{objectId:0,value:n}):t.value=n)}function h(e){e.preventDefault();const t=e.clipboardData.getData("text/plain"),n=e.currentTarget,o=n.id,i=+n.maxLength;t.split(/,/).forEach((e=>{e=e.trim(),-1!==i&&e.length>i&&(e=e.substr(0,i)),e.length>0&&c(o)&&g(o,{objectId:0,value:e})}))}function f(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}function g(e,t){const n=_.get(e),o=document.createElement("li");o.className="item";const i=document.createElement("span");if(i.className="content",i.dataset.objectId=t.objectId.toString(),t.type&&(i.dataset.type=t.type),i.textContent=t.value,o.appendChild(i),!n.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",b),o.appendChild(e)}n.list.insertBefore(o,n.listItem),n.suggestion.addExcludedValue(t.value),n.element.value="",n.element.disabled||d(e);let r=v(n);"function"==typeof n.options.callbackChange&&(null===r&&(r=y(e)),n.options.callbackChange(e,r))}function b(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const n=e.parentElement.dataset.elementId||"",o=_.get(n);e.children[0].textContent&&o.suggestion.removeExcludedValue(e.children[0].textContent),e.remove(),t||o.element.focus(),d(n);let i=v(o);"function"==typeof o.options.callbackChange&&(null===i&&(i=y(n)),o.options.callbackChange(n,i))}function v(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);const t=y(e.element.id);return e.shadow.value=y(e.element.id).map((e=>e.value)).join(","),t}function w(e){const t=e.currentTarget,n=_.get(t.id);if(n.options.restricted)return;const o=t.value.trim();o.length&&(n.suggestion&&n.suggestion.isActive()||g(t.id,{objectId:0,value:o}))}function y(e){const t=_.get(e);if(!t)throw new Error("Element id '"+e+"' is unknown.");const n=[];return t.list.querySelectorAll(".item > span").forEach((e=>{n.push({objectId:+(e.dataset.objectId||""),value:e.textContent.trim(),type:e.dataset.type})})),n}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l);const _=new Map;t.init=function(e,t,n){const d=document.getElementById(e);if(null===d)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(_.has(e)){const t=_.get(e);Object.keys(t).forEach((e=>{const n=t[e];n instanceof Element&&n.parentNode&&n.remove()})),s.default.destroy(e),_.delete(e)}const b=o.extend({ajax:{actionName:"getSearchResultList",className:"",parameters:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},n),v=i.parentByTag(d,"FORM");if(null!==v)if(b.isCSV)v.addEventListener("submit",(()=>{if(c(e)){const t=_.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}}));else{if(!b.submitFieldName.length&&"function"!=typeof b.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");v.addEventListener("submit",(()=>{if(c(e)){const t=_.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}const t=y(e);b.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=b.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,v.appendChild(t)})):b.callbackSubmit(v,t)}))}const E=function(e,t){const n=e.parentElement,o=document.createElement("ol");o.className="inputItemList"+(e.disabled?" disabled":""),o.dataset.acceptsNewItems="true",o.dataset.elementId=e.id,o.addEventListener("click",(t=>{t.target===o&&e.focus()}));const i=document.createElement("li");i.className="input",o.appendChild(i),e.addEventListener("input",m),e.addEventListener("keydown",u),e.addEventListener("keypress",p),e.addEventListener("keyup",f),e.addEventListener("paste",h);const a=e===document.activeElement;a&&e.blur(),e.addEventListener("blur",w),n.insertBefore(o,e),i.appendChild(e),a&&window.setTimeout((()=>{e.focus()}),1),-1!==t.maxLength&&(e.maxLength=t.maxLength);const s=document.createElement("span");s.className="inputItemListLimitReached",s.textContent=r.get("wcf.global.form.input.maxItems"),l.default.hide(s),i.appendChild(s);let c=null;const d=[];if(t.isCSV&&(c=document.createElement("input"),c.className="itemListInputShadow",c.type="hidden",c.name=e.name,e.removeAttribute("name"),o.parentNode.insertBefore(c,o),e.value.split(",").forEach((e=>{(e=e.trim())&&d.push(e)})),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentNode.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,limitReached:s,list:o,shadow:c,values:d}}(d,b),S=new a.default(e,{ajax:b.ajax,callbackSelect:g,excludedSearchValues:b.excludedSearchValues});_.set(e,{dropdownMenu:null,element:E.element,limitReached:E.limitReached,list:E.list,listItem:E.element.parentElement,options:b,shadow:E.shadow,suggestion:S}),t=b.callbackSetupValues?b.callbackSetupValues():E.values.length?E.values:t,Array.isArray(t)&&t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),g(e,t)}))},t.getValues=y,t.setValues=function(e,t){const n=_.get(e);if(!n)throw new Error("Element id '"+e+"' is unknown.");i.childrenByClass(n.list,"item").forEach((e=>{b(e,!0)})),t.forEach((t=>{g(e,t)}))}})),define("WoltLabSuite/Core/Ui/Pagination",["require","exports"],(function(e,t){"use strict";return class{#R;#W;#V;constructor(e,t){"function"==typeof t.callbackSwitch&&(this.#R=t.callbackSwitch),"function"==typeof t.callbackShouldSwitch&&(this.#W=t.callbackShouldSwitch),this.#V=document.createElement("woltlab-core-pagination"),this.#V.count=t.maxPage,this.#V.page=t.activePage,e.append(this.#V),this.#$()}#$(){this.#V.addEventListener("switchPage",(e=>{void 0===this.#W||!1!==this.#W(e.detail)?this.#R&&this.#R(e.detail):e.preventDefault()}))}getActivePage(){return this.#V.page}getElement(){return this.#V.parentElement}getMaxPage(){return this.#V.count}switchPage(e,t){if(t instanceof MouseEvent){t.preventDefault();const e=t.currentTarget;if(e&&e.dataset.tooltip){const t=document.getElementById("balloonTooltip");if(t){const n=new Event("mouseleave",{bubbles:!0,cancelable:!0});e.dispatchEvent(n),t.style.removeProperty("top"),t.style.removeProperty("bottom")}}}if((e=~~e)>0&&this.#V.page!==e&&e<=this.#V.count){if(void 0!==this.#W&&!this.#W(e))return;this.#V.jumpToPage(e),void 0!==this.#R&&this.#R(e)}}}})),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["require","exports","https://connect.facebook.net/en_US/sdk.js"],(function(e,t){"use strict";return FB.init({version:"v7.0"}),FB})),define("WoltLabSuite/Core/Component/Comment/GuestDialog",["require","exports","tslib","../../Controller/Captcha","../../Language","../Dialog"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showGuestDialog=void 0,o=n.__importDefault(o),t.showGuestDialog=function(e){const t="commentAdd",n=(0,r.dialogFactory)().fromHtml(e).asPrompt();n.show((0,i.getPhrase)("wcf.comment.guestDialog.title"));const a=n.content.querySelector("input[name=username]");return n.incomplete=""===a.value.trim(),a.addEventListener("input",(()=>{n.incomplete=""===a.value.trim()})),n.addEventListener("afterClose",(()=>{o.default.has(t)&&o.default.delete(t)})),new Promise((e=>{const i=o.default.setupDialog(n,t);n.addEventListener("primary",(()=>{const t={data:{username:a.value}};i.then((n=>{e({...t,...n})}))})),n.addEventListener("cancel",(()=>{e(void 0)}))}))}})),define("WoltLabSuite/Core/Component/Comment/Add",["require","exports","tslib","../../Ajax","../../Ui/Scroll","../../Ui/Notification","../../Language","../../Event/Handler","../../Dom/Util","./GuestDialog","../../Core","../Ckeditor","../Ckeditor/Event"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentAdd=void 0,i=n.__importStar(i),r=n.__importStar(r),s=n.__importStar(s),l=n.__importDefault(l),d=n.__importStar(d),t.CommentAdd=class{#z;#l;#Y;#X;#G;#K;#Q;#J;#H;constructor(e,t,n,o){this.#z=e,this.#l=this.#z.querySelector(".commentAdd__content"),this.#Y=this.#z.querySelector(".commentAdd__editor"),this.#X=this.#z.querySelector(".wysiwygTextarea"),this.#G=t,this.#K=n,this.#Q=this.#z.querySelector(".commentAdd__placeholder"),this.#J=o,this.#Z()}#Z(){this.#Q.addEventListener("click",(e=>{this.#l.classList.contains("commentAdd__content--collapsed")&&(e.preventDefault(),this.#l.classList.remove("commentAdd__content--collapsed"),this.#z.classList.remove("commentAdd--collapsed"),this.#Q.hidden=!0,this.#Y.hidden=!1,this.#ee())})),this.#z.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#te()})),(0,p.listenToCkeditor)(this.#X).setupFeatures((({features:e})=>{e.heading=!1,e.quoteBlock=!1,e.spoiler=!1,e.table=!1}))}#ee(){window.setTimeout((()=>{i.element(this.#z,(()=>{this.#ne().focus()}))}),0)}#oe(){this.#z.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#ne().getHtml();if(""===e)return this.#ie(this.#ne().element,(0,a.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#ne(),message:e,valid:!0};return s.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#te(e={}){if(!this.#oe())return;this.#re();const t=this.#ae();let n;s.fire("com.woltlab.wcf.ckeditor5","submit_text",t.data);try{n=await(0,o.dboAction)("addComment","wcf\\data\\comment\\CommentAction").payload(d.extend(t,e)).disableLoadingIndicator().dispatch()}catch(e){return void await(0,o.handleValidationErrors)(e,(e=>(this.#ie(this.#ne().element,e.errorType),this.#se(),!0)))}if(n.guestDialog){const e=await(0,c.showGuestDialog)(n.guestDialog);void 0===e?this.#se():this.#te(e)}else this.#J(n.template),r.show((0,a.getPhrase)("wcf.global.success.add")),this.#le(),this.#se()}#ne(){return void 0===this.#H&&(this.#H=(0,u.getCkeditor)(this.#X)),this.#H}#re(){if(this.#l.classList.contains("commentAdd__content--loading"))return;const e=document.createElement("div");e.className="commentAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#l.classList.add("commentAdd__content--loading"),this.#l.appendChild(e)}#ie(e,t){l.default.innerError(e,"empty"===t?(0,a.getPhrase)("wcf.global.form.error.empty"):t)}#ae(){return{data:{message:this.#ne().getHtml(),objectID:this.#K,objectTypeID:this.#G}}}#le(){this.#ne().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#l.classList.add("commentAdd__content--collapsed"),this.#z.classList.add("commentAdd--collapsed"),this.#Y.hidden=!0,this.#Q.hidden=!1}#se(){this.#l.classList.remove("commentAdd__content--loading");const e=this.#l.querySelector(".commentAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Component/Comment/Response/Add",["require","exports","tslib","../../../Dom/Util","../../../Language","../../../Event/Handler","../../../Ui/Scroll","../../../Ajax","../../../Core","../../../Ui/Notification","../../../Ajax/Error","../GuestDialog","../../Ckeditor","../../Ckeditor/Event"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentResponseAdd=void 0,o=n.__importDefault(o),r=n.__importStar(r),a=n.__importStar(a),l=n.__importStar(l),c=n.__importStar(c),t.CommentResponseAdd=class{container;#l;#X;#J;#ce=new Map;#H;#de;constructor(e,t){this.container=e,this.#l=this.container.querySelector(".commentResponseAdd__content"),this.#X=this.container.querySelector(".wysiwygTextarea"),this.#J=t,this.#Z()}#Z(){this.container.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#te()})),(0,m.listenToCkeditor)(this.#X).setupFeatures((({features:e})=>{e.heading=!1,e.quoteBlock=!1,e.spoiler=!1,e.table=!1}))}show(e){this.#de&&this.#ce.set(this.#de,this.#ue()),this.#pe(this.#ce.get(e)||""),this.#de=e,this.container.hidden=!1}#oe(){this.container.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#ne().getHtml();if(""===e)return this.#ie(this.#ne().element,(0,i.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#ne(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#te(e={}){if(!this.#oe())return;this.#re();const t=this.#ae();let n;r.fire("com.woltlab.wcf.ckeditor","submit_text",t.data);try{n=await(0,s.dboAction)("addResponse","wcf\\data\\comment\\CommentAction").objectIds([this.#de]).payload(l.extend(t,e)).disableLoadingIndicator().dispatch()}catch(e){if(!(e instanceof d.StatusNotOk))throw e;{const t=await e.response.clone().json();412===t.code&&t.returnValues&&this.#ie(this.#ne().element,t.returnValues.errorType)}return void this.#se()}if(n.guestDialog){const e=await(0,u.showGuestDialog)(n.guestDialog);void 0===e?this.#se():this.#te(e)}else this.#J(this.#de,n.template),c.show((0,i.getPhrase)("wcf.global.success.add")),this.#le(),this.#se()}#le(){this.#ne().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#ce.delete(this.#de),this.container.hidden=!0}#ie(e,t){o.default.innerError(e,"empty"===t?(0,i.getPhrase)("wcf.global.form.error.empty"):t)}#ne(){return void 0===this.#H&&(this.#H=(0,p.getCkeditor)(this.#X)),this.#H}#ue(){return this.#ne().getHtml()}#pe(e){this.#ne().setHtml(e);const t=this.#X.parentElement.querySelector(".innerError");null!==t&&t.remove(),this.#ee()}#ee(){window.setTimeout((()=>{a.element(this.container,(()=>{this.#ne().focus()}))}),0)}#ae(){return{data:{message:this.#ue()}}}#re(){if(this.#l.classList.contains("commentResponseAdd__content--loading"))return;const e=document.createElement("div");e.className="commentResponseAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#l.classList.add("commentResponseAdd__content--loading"),this.#l.appendChild(e)}#se(){this.#l.classList.remove("commentResponseAdd__content--loading");const e=this.#l.querySelector(".commentResponseAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Ui/Reaction/Handler",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../Alignment","../CloseOverlay","../Screen","focus-trap"],(function(e,t,n,o,i,r,a,s,l,c,d){"use strict";o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l),c=n.__importStar(c);const u=Object.values(window.REACTION_TYPES);return class{activeButton=void 0;_cache=new Map;focusTrap=void 0;_containers=new Map;_options;_objects=new Map;_objectType;_popoverCurrentObjectId=0;_popover;_popoverContent;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._popover=null,this._popoverContent=null,this._options=i.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},t),this.initReactButtons(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/Handler-${e}`,(()=>this.initReactButtons())),l.default.add("WoltLabSuite/Core/Ui/Reaction/Handler",(()=>this._closePopover()))}initReactButtons(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const n=a.default.identify(t);if(this._containers.has(n))return;const o=~~t.dataset.objectId,i={reactButton:null,objectId:o,element:t};this._containers.set(n,i),this._initReactButton(t,i);const r=this._objects.get(o)||[];r.push(i),this._objects.set(o,r),e=!0})),e&&r.default.trigger()}_initReactButton(e,t){if(this._options.isSingleItem?t.reactButton=document.querySelector(this._options.buttonSelector):t.reactButton=e.querySelector(this._options.buttonSelector),null!==t.reactButton){if(1===u.length){const e=u[0];t.reactButton.title=e.title,t.reactButton.querySelector(".invisible").textContent=e.title}t.reactButton.setAttribute("role","button"),u.length>1&&(t.reactButton.setAttribute("aria-haspopup","true"),t.reactButton.setAttribute("aria-expanded","false")),t.reactButton.addEventListener("click",(e=>{this._toggleReactPopover(t.objectId,t.reactButton,e)})),t.reactButton.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleReactPopover(t.objectId,t.reactButton,null))}))}}_updateReactButton(e,t){this._objects.get(e).forEach((e=>{null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),e.reactButton.dataset.reactionTypeId=t.toString()):(e.reactButton.dataset.reactionTypeId="0",e.reactButton.classList.remove("active")))}))}_markReactionAsActive(){let e=null;for(const t of this._objects.get(this._popoverCurrentObjectId))null!==t.reactButton&&(e=~~t.reactButton.dataset.reactionTypeId);if(null===e)throw new Error("Unable to find react button for current popover.");const t=this._getPopover();t.querySelectorAll(".reactionTypeButton.active").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-selected")}));const n=t.querySelector(".reactionPopoverContent");if(e){const o=t.querySelector(`.reactionTypeButton[data-reaction-type-id="${e}"]`);o.classList.add("active"),o.setAttribute("aria-selected","true"),0==~~o.dataset.isAssignable&&a.default.show(o),this._scrollReactionIntoView(n,o)}else c.is("screen-xs")&&(t.classList.contains("inverseOrder")?n.scrollTop=0:n.scrollTop=n.scrollHeight-n.clientHeight)}_scrollReactionIntoView(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2}_toggleReactPopover(e,t,n){if(null!==n&&(n.preventDefault(),n.stopPropagation()),1===u.length){const t=u[0];this._popoverCurrentObjectId=e,this._react(t.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover()}_openReactPopover(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,s.set(this._getPopover(),t,{pointer:!0,horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:c.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");const n=this._getPopover();"auto"===n.style.getPropertyValue("bottom")?n.classList.add("inverseOrder"):n.classList.remove("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),n.classList.remove("forceHide"),n.classList.add("active"),this.activeButton=t,u.length>1&&this.activeButton.setAttribute("aria-expanded","true"),this.getFocusTrap().activate()}_getPopover(){if(null==this._popover){this._popover=document.createElement("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=document.createElement("div"),this._popoverContent.className="reactionPopoverContent";const e=document.createElement("ul");e.className="reactionTypeButtonList",this._getSortedReactionTypes().forEach((t=>{const n=document.createElement("li");n.tabIndex=0,n.setAttribute("role","button"),n.className="reactionTypeButton jsTooltip",n.dataset.reactionTypeId=t.reactionTypeID.toString(),n.dataset.title=t.title,n.dataset.isAssignable=t.isAssignable.toString(),n.title=t.title;const o=document.createElement("span");o.className="reactionTypeButtonTitle",o.innerHTML=t.title,n.innerHTML=t.renderedIcon,n.appendChild(o),n.addEventListener("click",(()=>this._react(t.reactionTypeID))),n.addEventListener("keydown",(e=>this.keydown(e))),t.isAssignable||a.default.hide(n),e.appendChild(n)})),this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",(()=>this._rebuildOverflowIndicator()),{passive:!0}),this._popover.appendChild(this._popoverContent);const t=document.createElement("span");t.className="elementPointer",t.appendChild(document.createElement("span")),this._popover.appendChild(t),document.body.appendChild(this._popover),r.default.trigger()}return this._popover}keydown(e){if("Enter"===e.key||" "===e.key){e.preventDefault();const t=this.activeButton,n=~~e.currentTarget.dataset.reactionTypeId;this._react(n),t.focus()}}_rebuildOverflowIndicator(){const e=this._popoverContent;e.scrollTop>0?e.classList.add("overflowTop"):e.classList.remove("overflowTop"),e.scrollTop+e.clientHeight<e.scrollHeight?e.classList.add("overflowBottom"):e.classList.remove("overflowBottom")}_getSortedReactionTypes(){return u.sort(((e,t)=>e.showOrder-t.showOrder))}_closePopover(){if(0!==this._popoverCurrentObjectId){const e=this._getPopover();e.classList.remove("active"),e.querySelectorAll('.reactionTypeButton[data-is-assignable="0"]').forEach((e=>a.default.hide(e))),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach((e=>{e.reactButton.closest("nav").style.cssText=""})),u.length>1&&this.activeButton.setAttribute("aria-expanded","false"),this.activeButton=void 0,this._popoverCurrentObjectId=0,this.getFocusTrap().deactivate()}}_react(e){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=e,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,o.api(this,{parameters:this._options.parameters}),this._closePopover())}_ajaxSuccess(e){const t=~~e.returnValues.objectID,n=new Map;Object.entries(e.returnValues.reactions).forEach((([e,t])=>{n.set(parseInt(e),t)}));const o=document.querySelector(`woltlab-core-reaction-summary[object-type="${this._objectType}"][object-id="${t}"]`);o?.setData(n,e.returnValues.reactionTypeID),this._updateReactButton(t,e.returnValues.reactionTypeID)}_ajaxSetup(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,d.createFocusTrap)(this._popover,{allowOutsideClick:!0,escapeDeactivates:()=>(this._closePopover(),!1),preventScroll:!0})),this.focusTrap}}})),define("WoltLabSuite/Core/Component/Comment/List",["require","exports","tslib","../../Ajax","../../Dom/Change/Listener","../../Dom/Util","../../Helper/Selector","../../Language","./Add","./Response/Add","../../Ui/Scroll","../../Ui/Reaction/Handler"],(function(e,t,n,o,i,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importDefault(i),r=n.__importDefault(r),d=n.__importStar(d),u=n.__importDefault(u);class p{#z;#me;constructor(e){this.#z=e,this.#he(),this.#fe(),this.#ge(),this.#be(),this.#ve(),this.#we()}#we(){"true"===this.#z.dataset.enableReactions&&(new u.default("com.woltlab.wcf.comment",{containerSelector:`#${this.#z.id} .commentList__item`,buttonSelector:".comment__button--react"}),new u.default("com.woltlab.wcf.comment.response",{containerSelector:`#${this.#z.id} .commentResponseList__item`,buttonSelector:".commentResponse__button--react"}))}#ve(){window.addEventListener("hashchange",(()=>{this.#ye()})),this.#ye()}#ye(){const e=window.location.hash.match(/^#(?:[^/]+\/)?comment(\d+)(?:\/response(\d+))?/);if(e){const t=this.#z.querySelector(`.commentList__item[data-comment-id="${e[1]}"]`);if(t)if(e[2]){const n=this.#z.querySelector(`.commentResponseList__item[data-response-id="${e[2]}"]`);n?this.#_e(n,!0):this.#Ee(t,parseInt(e[2]))}else this.#_e(t,!0);else this.#Se(parseInt(e[1]),e[2]?parseInt(e[2]):0)}}async#Se(e,t){let n,i=this.#z.querySelector(".commentPermalink");i&&i.remove(),i=document.createElement("div"),i.classList.add("commentList__item","commentPermalink","commentPermalink--loading"),i.innerHTML='<woltlab-core-loading-indicator size="48" hide-text></woltlab-core-loading-indicator>',this.#z.querySelector(".commentList")?.prepend(i);try{n=await(0,o.dboAction)("loadComment","wcf\\data\\comment\\CommentAction").objectIds([e]).payload({responseID:t,objectTypeID:this.#z.dataset.objectTypeId}).dispatch()}catch(e){return void await(0,o.handleValidationErrors)(e,(()=>(i.remove(),!0)))}const{template:a,response:s}=n;r.default.insertHtml(a,i,"before"),i.remove();const l=this.#z.querySelector(`.commentList__item[data-comment-id="${e}"]`);if(l.classList.add("commentPermalink"),s){const e=document.createElement("div");e.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),e.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',l.querySelector(".commentResponseList").prepend(e),this.#Le(s)}else this.#_e(l,!0)}#Le(e){const t=this.#z.querySelector(".commentResponsePermalink");r.default.insertHtml(e,t,"before");const n=t.previousElementSibling;t.classList.add("commentResponsePermalink"),t.remove(),this.#_e(n,!0)}async#Ee(e,t){let n,i=e.querySelector(".commentResponsePermalink");i&&i.remove(),i=document.createElement("div"),i.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),i.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',e.querySelector(".commentResponseList").prepend(i);try{n=await(0,o.dboAction)("loadResponse","wcf\\data\\comment\\CommentAction").payload({responseID:t,objectTypeID:this.#z.dataset.objectTypeId}).dispatch()}catch(e){return void await(0,o.handleValidationErrors)(e,(()=>(i.remove(),!0)))}this.#Le(n.template)}#_e(e,t=!1){d.element(e,(()=>{t&&(e.classList.contains("comment__highlight__target")&&e.classList.remove("comment__highlight__target"),e.classList.add("comment__highlight__target"))}))}#be(){"true"===this.#z.dataset.canAdd&&(new l.CommentAdd(this.#z.querySelector(".commentAdd"),parseInt(this.#z.dataset.objectTypeId),parseInt(this.#z.dataset.objectId),(e=>{this.#Ce(e)})),this.#me=new c.CommentResponseAdd(this.#z.querySelector(".commentResponseAdd"),((e,t)=>{this.#ke(e,t)})))}#he(){(0,a.wheneverFirstSeen)("woltlab-core-comment",(e=>{this.#z.contains(e)&&(e.addEventListener("reply",(()=>{this.#xe(e,e.commentId)})),e.addEventListener("delete",(()=>{e.parentElement?.remove()})),this.#Te(e.parentElement))}))}#fe(){(0,a.wheneverFirstSeen)("woltlab-core-comment-response",(e=>{this.#z.contains(e)&&e.addEventListener("delete",(()=>{e.parentElement?.remove()}))}))}#Te(e){const t=e.querySelectorAll(".commentResponse").length,n=parseInt(e.dataset.responses);if(t<n){const o=(0,s.getPhrase)("wcf.comment.response.more",{count:n-t});if(e.querySelector(".commentLoadNextResponses"))e.querySelector(".commentLoadNextResponses__button").textContent=o;else{const t=document.createElement("div");t.classList.add("commentResponseList__item","commentLoadNextResponses"),e.querySelector(".commentResponseList").append(t);const n=document.createElement("button");n.type="button",n.classList.add("button","small","commentLoadNextResponses__button"),n.textContent=o,t.append(n),n.addEventListener("click",(()=>{this.#Me(e)}))}}else e.querySelector(".commentLoadNextResponses")?.remove()}async#Me(e,t=!1){e.querySelector(".commentLoadNextResponses__button").disabled=!0;const n=await(0,o.dboAction)("loadResponses","wcf\\data\\comment\\response\\CommentResponseAction").payload({data:{commentID:e.dataset.commentId,lastResponseTime:e.dataset.lastResponseTime,lastResponseID:e.dataset.lastResponseId,loadAllResponses:t?1:0}}).dispatch(),a=r.default.createFragmentFromHtml(n.template);a.querySelectorAll(".commentResponseList__item").forEach((t=>{e.querySelector(`.commentResponseList__item[data-response-id="${t.dataset.responseId}"]`)?.remove()})),e.querySelector(".commentResponseList").insertBefore(a,e.querySelector(".commentLoadNextResponses")),i.default.trigger(),e.dataset.lastResponseTime=n.lastResponseTime.toString(),e.dataset.lastResponseId=n.lastResponseID.toString(),this.#Te(e)}#ge(){if(this.#Ie<this.#De&&!this.#z.querySelector(".commentLoadNext")){const e=document.createElement("div");e.classList.add("commentList__item","commentLoadNext"),this.#z.querySelector(".commentList").append(e);const t=document.createElement("button");t.type="button",t.classList.add("button","small","commentLoadNext__button"),t.textContent=(0,s.getPhrase)("wcf.comment.more"),e.append(t),t.addEventListener("click",(()=>{this.#Ae()}))}}async#Ae(){const e=this.#z.querySelector(".commentLoadNext__button");e.disabled=!0;const t=await(0,o.dboAction)("loadComments","wcf\\data\\comment\\CommentAction").payload({data:{objectID:this.#z.dataset.objectId,objectTypeID:this.#z.dataset.objectTypeId,lastCommentTime:this.#z.dataset.lastCommentTime}}).dispatch(),n=r.default.createFragmentFromHtml(t.template);n.querySelectorAll(".commentList__item").forEach((e=>{this.#z.querySelector(`.commentList__item[data-comment-id="${e.dataset.commentId}"]`)?.remove()})),this.#z.querySelector(".commentList").insertBefore(n,this.#z.querySelector(".commentLoadNext")),i.default.trigger(),this.#z.dataset.lastCommentTime=t.lastCommentTime.toString(),this.#Ie<this.#De?e.disabled=!1:this.#z.querySelector(".commentLoadNext").hidden=!0}#xe(e,t){e.parentElement.append(this.#me.container),this.#me.show(t)}#Ce(e){const t=this.#z.querySelector(".commentAdd").parentElement;r.default.insertHtml(e,t,"after"),i.default.trigger();const n=t.nextElementSibling;window.setTimeout((()=>{d.element(n)}),100)}#ke(e,t){const n=this.#z.querySelector(`.commentList__item[data-comment-id="${e}"]`);let o=n.querySelector(".commentResponseList");if(!o){const e=document.createElement("div");e.classList.add("comment__responses"),n.append(e),o=document.createElement("div"),o.classList.add("commentResponseList"),o.dataset.responses="1",e.append(o)}r.default.insertHtml(t,o,"append"),i.default.trigger();const a=o.firstElementChild;window.setTimeout((()=>{d.element(a)}),100)}get#Ie(){return this.#z.querySelectorAll(".comment").length}get#De(){return parseInt(this.#z.dataset.comments)}}t.setup=function(e){const t=document.getElementById(e);t?new p(t):console.debug(`Unable to find the container identified by '${e}'`)}})),define("WoltLabSuite/Core/Component/Comment/woltlab-core-comment",["require","exports","tslib","../../Ajax","../../Dom/Util","../../Ui/Dropdown/Simple","../../Ui/Notification","../Confirmation","../../Ui/Scroll","../../Event/Handler","../../Language","../Ckeditor"],(function(e,t,n,o,i,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentElement=void 0,i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importStar(a),l=n.__importStar(l),c=n.__importStar(c);class p extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".comment__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#Pe()}));const t=this.menu.querySelector(".comment__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#je()}));const n=this.menu.querySelector(".comment__option--edit");n?.addEventListener("click",(e=>{e.preventDefault(),this.#Oe()}))}const e=this.querySelector(".comment__button--reply");e?.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("reply"))}))}async#Pe(){await(0,o.dboAction)("enable","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).dispatch(),this.querySelector(".comment__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".comment__option--enable").hidden=!0)}async#je(){await(0,s.confirmationFactory)().delete()&&(await(0,o.dboAction)("delete","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).dispatch(),a.show(),this.dispatchEvent(new CustomEvent("delete")))}async#Oe(){this.menu.querySelector(".comment__option--edit").hidden=!0;const{template:e}=await(0,o.dboAction)("beginEdit","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).dispatch();this.#qe(e)}#qe(e){this.querySelector(".htmlContent").hidden=!0,i.default.insertHtml(e,this.#Y,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#Be()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#Ne()})),c.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#Ue}`,(e=>{e.cancel=!0,this.#Be()})),window.setTimeout((()=>{l.element(this)}),250)}async#Be(){const e={data:{message:(0,u.getCkeditorById)(this.#Ue).getHtml()}};if(!this.#Fe(e))return;let t;c.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#Ue}`,e),this.#r();try{t=await(0,o.dboAction)("save","wcf\\data\\comment\\CommentAction").objectIds([this.commentId]).payload(e).dispatch()}catch(e){return await(0,o.handleValidationErrors)(e,(({errorType:e})=>(i.default.innerError(document.getElementById(this.#Ue),e),!0))),void this.#He()}i.default.setInnerHtml(this.querySelector(".htmlContent"),t.message),this.#He(),this.#Ne(),a.show()}#r(){let e=this.querySelector(".comment__loading");e||(e=document.createElement("div"),e.classList.add("comment__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".comment__message").append(e)),this.#Y.hidden=!0,e.hidden=!1}#He(){this.#Y.hidden=!1;const e=this.querySelector(".comment__loading");e&&(e.hidden=!0)}#Fe(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,u.getCkeditorById)(this.#Ue);if(""===t.getHtml())return i.default.innerError(t.element,(0,d.getPhrase)("wcf.global.form.error.empty")),!1;const n={api:this,parameters:e,valid:!0};return c.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#Ue}`,n),n.valid}#Ne(){(0,u.getCkeditorById)(this.#Ue).destroy(),this.#Y.remove(),this.menu.querySelector(".comment__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#Y(){let e=this.querySelector(".comment__editor");return e||(e=document.createElement("div"),e.classList.add("comment__editor"),this.querySelector(".comment__message").append(e)),e}get commentId(){return parseInt(this.getAttribute("comment-id"))}get menu(){let e=r.default.getDropdownMenu(`commentOptions${this.commentId}`);return void 0===e&&(e=this.querySelector(".comment__menu .dropdownMenu")||void 0),e}get#Ue(){return`commentEditor${this.commentId}`}}t.WoltlabCoreCommentElement=p,window.customElements.define("woltlab-core-comment",p),t.default=p})),define("WoltLabSuite/Core/Ui/Search/Input",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";return o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),class{activeItem=void 0;ajaxPayload;autoFocus;callbackDropdownInit=void 0;callbackSelect=void 0;delay;dropdownContainerId="";element;excludedSearchValues=new Set;list=void 0;lastValue="";minLength;noResultPlaceholder;preventSubmit;request=void 0;suppressErrors;timerDelay=void 0;constructor(e,t){if(this.element=e,!(this.element instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this.element.nodeName||"search"!==this.element.type&&"text"!==this.element.type)throw new Error('Expected an input[type="text"].');t=i.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:void 0,callbackSelect:void 0,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1,suppressErrors:!1},t),this.ajaxPayload=t.ajax,this.autoFocus=t.autoFocus,this.callbackDropdownInit=t.callbackDropdownInit,this.callbackSelect=t.callbackSelect,this.delay=t.delay,t.excludedSearchValues.forEach((e=>{this.addExcludedSearchValues(e)})),this.minLength=t.minLength,this.noResultPlaceholder=t.noResultPlaceholder,this.preventSubmit=t.preventSubmit,this.suppressErrors=t.suppressErrors||!1,this.element.autocomplete="off",this.element.addEventListener("keydown",(e=>this.keydown(e))),this.element.addEventListener("keyup",(e=>this.keyup(e)))}addExcludedSearchValues(e){this.excludedSearchValues.add(e)}removeExcludedSearchValues(e){this.excludedSearchValues.delete(e)}keydown(e){(this.activeItem&&a.default.isOpen(this.dropdownContainerId)||this.preventSubmit)&&"Enter"===e.key&&e.preventDefault(),["ArrowUp","ArrowDown","Escape"].includes(e.key)&&e.preventDefault()}keyup(e){if(this.activeItem||!this.autoFocus)if(a.default.isOpen(this.dropdownContainerId)){if("ArrowUp"===e.key)return e.preventDefault(),this.keyboardPreviousItem();if("ArrowDown"===e.key)return e.preventDefault(),this.keyboardNextItem();if("Enter"===e.key)return e.preventDefault(),this.keyboardSelectItem()}else this.activeItem=void 0;if("Escape"===e.key)return void a.default.close(this.dropdownContainerId);const t=this.element.value.trim();this.lastValue!==t&&(this.lastValue=t,t.length<this.minLength?this.dropdownContainerId&&(a.default.close(this.dropdownContainerId),this.activeItem=void 0):this.delay?(this.timerDelay&&window.clearTimeout(this.timerDelay),this.timerDelay=window.setTimeout((()=>{this.search(t)}),this.delay)):this.search(t))}search(e){this.request&&this.request.abortPrevious(),this.request=o.api(this,this.getParameters(e))}getParameters(e){return{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:e}}}}keyboardNextItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.nextElementSibling&&(e=this.activeItem.nextElementSibling)),this.activeItem=e||this.list.children[0],this.activeItem.classList.add("active")}keyboardPreviousItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.previousElementSibling&&(e=this.activeItem.previousElementSibling)),this.activeItem=e||this.list.children[this.list.childElementCount-1],this.activeItem.classList.add("active")}keyboardSelectItem(){this.selectItem(this.activeItem)}clickSelectItem(e){this.selectItem(e.currentTarget)}selectItem(e){this.callbackSelect&&!this.callbackSelect(e)?this.element.value="":this.element.value=e.dataset.label||"",this.activeItem=void 0,a.default.close(this.dropdownContainerId)}_ajaxSuccess(e){let t=!1;if(this.list?this.list.innerHTML="":(this.list=document.createElement("ul"),this.list.className="dropdownMenu",t=!0,"function"==typeof this.callbackDropdownInit&&this.callbackDropdownInit(this.list)),"object"==typeof e.returnValues){const t=this.clickSelectItem.bind(this);Object.keys(e.returnValues).forEach((n=>{const o=this.createListItem(e.returnValues[n]);o.addEventListener("click",t),this.list.appendChild(o)}))}if(t){this.element.insertAdjacentElement("afterend",this.list);const e=this.element.parentElement;a.default.initFragment(e,this.list),this.dropdownContainerId=r.default.identify(e)}if(this.dropdownContainerId)if(this.activeItem=void 0,this.list.childElementCount||this.handleEmptyResult()){a.default.open(this.dropdownContainerId,!0,this.element);const e=this.list.childElementCount?this.list.children[0]:void 0;this.autoFocus&&e&&~~(e.dataset.objectId||"")&&(this.activeItem=e,this.activeItem.classList.add("active"))}else a.default.close(this.dropdownContainerId)}handleEmptyResult(){if(!this.noResultPlaceholder)return!1;const e=document.createElement("li");e.className="dropdownText";const t=document.createElement("span");return t.textContent=this.noResultPlaceholder,e.appendChild(t),this.list.appendChild(e),!0}createListItem(e){const t=document.createElement("li");t.dataset.objectId=e.objectID.toString(),t.dataset.label=e.label;const n=document.createElement("span");return n.textContent=e.label,t.appendChild(n),t}_ajaxSetup(){return{data:this.ajaxPayload,silent:this.suppressErrors,ignoreError:this.suppressErrors}}}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding/Suggestion",["require","exports","tslib","../../../Ui/Search/Input"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o);class i extends o.default{#Re;constructor(e,t,n){super(e,t),this.#Re=n}search(e){this.#Re.geocode({address:e},((e,t)=>{if(t===google.maps.GeocoderStatus.OK){const t={actionName:"",objectIDs:[],returnValues:{}};e.forEach((e=>{t.returnValues[e.formatted_address]={label:e.formatted_address,objectID:e.formatted_address}})),this._ajaxSuccess(t)}}))}}t.setup=function(e,t,n){new i(e,{callbackSelect:n},t)}})),define("WoltLabSuite/Core/Component/GoogleMaps/woltlab-core-google-maps",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreGoogleMapsElement=void 0;let n=!1;const o=new Promise((e=>{window.woltlab_core_google_maps_callback=e}));class i extends HTMLElement{#We;#Ve;#$e;#ze=!1;#Re;constructor(){super(),this.#Ve=new Promise((e=>{this.#$e=e}))}connectedCallback(){this.hidden||this.#Ye()}attributeChangedCallback(e,t,n){"hidden"===e&&null===n&&this.#Ye()}static get observedAttributes(){return["hidden"]}#Ye(){this.#ze||(this.#oe(),this.#ze=!0,(e=>{if(!n){const t=document.createElement("script");t.src="https://maps.googleapis.com/maps/api/js?"+(e?`key=${e}&`:"")+"callback=woltlab_core_google_maps_callback",document.head.appendChild(t),n=!0}return o})(this.apiKey).then((()=>{this.hasAttribute("access-user-location")?navigator.geolocation.getCurrentPosition((e=>{this.setAttribute("lat",e.coords.latitude.toString()),this.setAttribute("lng",e.coords.longitude.toString()),this.#Xe()}),(()=>{this.#Xe()})):this.#Xe()})))}#Xe(){this.#We=new google.maps.Map(this,{zoom:this.zoom,center:{lat:this.lat,lng:this.lng}}),this.#Ge(),this.#$e&&(this.#$e(),this.#$e=void 0)}async#Ge(){await this.#Ve;const e=this.bounds;e&&this.#We.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.southWest.latitude,e.southWest.longitude),new google.maps.LatLng(e.northEast.latitude,e.northEast.longitude)))}#oe(){if(!this.apiKey)throw new TypeError("Must provide an api key.")}get apiKey(){return this.getAttribute("api-key")||""}async getMap(){return await this.#Ve,this.#We}get lat(){return this.getAttribute("lat")?parseFloat(this.getAttribute("lat")):0}get lng(){return this.getAttribute("lng")?parseFloat(this.getAttribute("lng")):0}get zoom(){return this.getAttribute("zoom")?parseInt(this.getAttribute("zoom")):13}get bounds(){return this.getAttribute("bounds")?JSON.parse(this.getAttribute("bounds")):null}async getGeocoder(){return await this.#Ve,void 0===this.#Re&&(this.#Re=new google.maps.Geocoder),this.#Re}}t.WoltlabCoreGoogleMapsElement=i,window.customElements.define("woltlab-core-google-maps",i),t.default=i})),define("WoltLabSuite/Core/Component/GoogleMaps/Marker",["require","exports","./woltlab-core-google-maps"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDraggableMarker=t.addMarker=void 0,t.addMarker=async function(e,t,n,o,i){const r=await e.getMap(),a=new google.maps.Marker({map:r,position:new google.maps.LatLng(t,n),title:o});i&&r.setCenter(a.getPosition())},t.addDraggableMarker=async function(e,t,n){const o=await e.getMap();void 0===t&&(t=e.lat),void 0===n&&(n=e.lng);const i=new google.maps.Marker({map:o,position:new google.maps.LatLng(t,n),draggable:!0,clickable:!1});return o.setCenter(i.getPosition()),i}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding",["require","exports","../../Helper/Selector","./Geocoding/Suggestion","./Marker","./woltlab-core-google-maps"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;class r{#E;#We;#Ke;#Qe;constructor(e,t){this.#E=e,this.#We=t,this.#Z(),this.#We.getGeocoder().then((t=>{this.#E.hasAttribute("data-google-maps-marker")&&this.#Je(),e.value&&this.#Ze(e.value),(0,o.setup)(this.#E,t,(e=>(this.#Ze(e.dataset.label),!0)))}))}#Z(){this.#E.addEventListener("geocoding:move-marker",(e=>{this.#et(e.detail.latitude,e.detail.longitude)})),this.#E.addEventListener("geocoding:resolve",(e=>{this.#We.getGeocoder().then((t=>{const n=new google.maps.LatLng(e.detail.latitude,e.detail.longitude);t.geocode({location:n},((t,n)=>{n===google.maps.GeocoderStatus.OK&&e.detail.callback(t[0].formatted_address)}))}))})),this.#E.addEventListener("geocoding:reset-marker",(()=>{this.#Qe&&this.#et(this.#Qe.lat(),this.#Qe.lng())}))}async#Je(){this.#Ke=await(0,i.addDraggableMarker)(this.#We),this.#Qe=this.#Ke.getPosition(),this.#Ke.addListener("dragend",(()=>{this.#We.getGeocoder().then((e=>{e.geocode({location:this.#Ke.getPosition()},((e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#E.value=e[0].formatted_address,this.#tt(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}))}))}async#et(e,t){const n=new google.maps.LatLng(e,t);this.#Ke?.setPosition(n),(await this.#We.getMap()).setCenter(n),this.#tt(e,t)}async#Ze(e){(await this.#We.getGeocoder()).geocode({address:e},(async(e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#Ke?.setPosition(e[0].geometry.location),(await this.#We.getMap()).setCenter(e[0].geometry.location),this.#tt(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}#tt(e,t){this.#E.dataset.googleMapsLat=e.toString(),this.#E.dataset.googleMapsLng=t.toString();const n=this.#E.dataset.googleMapsGeocodingStore;null!=n&&this.#E.form&&this.#nt(n,e,t)}#nt(e,t,n){const o=e+"coordinates";let i=this.#E.form.querySelector(`input[name="${o}"]`);i||(i=document.createElement("input"),i.type="hidden",i.name=o,this.#E.form.append(i)),i.value=`${t},${n}`}}t.setup=function(){(0,n.wheneverFirstSeen)("[data-google-maps-geocoding]",(e=>{const t=document.getElementById(e.dataset.googleMapsGeocoding);new r(e,t)}))}})),define("WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader",["require","exports","tslib","../../Ajax","../Dialog","../../Dom/Util","@googlemaps/markerclusterer","./woltlab-core-google-maps"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=n.__importDefault(r);class s{#We;#ot;#it;#rt;#at;#st;#w=[];constructor(e,t,n){this.#We=e,this.#ot=t,this.#it=n,this.#rt=new a.MarkerClusterer({map:e}),this.#lt()}async#lt(){this.#We.getBounds()&&await this.#ct(),this.#We.addListener("idle",(()=>{this.#ct()}))}async#ct(){const e=this.#We.getBounds().getNorthEast(),t=this.#We.getBounds().getSouthWest();this.#dt(e,t)&&(await(0,o.dboAction)("getMapMarkers",this.#ot).payload({...this.#it,excludedObjectIDs:JSON.stringify(this.#w),eastLongitude:e.lng(),northLatitude:e.lat(),southLatitude:t.lat(),westLongitude:t.lng()}).dispatch()).markers.forEach((e=>{this.#ut(e)}))}#ut(e){const t=new google.maps.Marker({map:this.#We,position:new google.maps.LatLng(e.latitude,e.longitude),title:e.title});if(this.#rt.addMarker(t),e.infoWindow){const n=document.createElement("div");r.default.setInnerHtml(n,e.infoWindow);const o=new google.maps.InfoWindow({content:n});if(t.addListener("click",(()=>{o.open(this.#We,t)})),e.dialog){let t;o.addListener("domready",(()=>{const o=n.querySelector(".jsButtonShowDialog");o?.addEventListener("click",(()=>{t||(t=(0,i.dialogFactory)().fromHtml(e.dialog).withoutControls()),t.show(o.dataset.title||o.textContent)}))}))}}e.objectID&&this.#w.push(e.objectID),e.objectIDs&&this.#w.push(...e.objectIDs)}#dt(e,t){return!(this.#at&&this.#at.lat()>=e.lat()&&this.#at.lng()>=e.lng()&&this.#st.lat()<=t.lat()&&this.#st.lng()<=t.lng()||(this.#at=e,this.#st=t,0))}}t.setup=async function(e,t,n){const o=await e.getMap();new s(o,t,n)}})),define("WoltLabSuite/Core/Component/User/List",["require","exports","tslib","../../Ajax","../../Ui/Pagination","../Dialog","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserList=void 0,i=n.__importDefault(i),a=n.__importDefault(a),t.UserList=class{#pt;#mt;#ht=1;#ft=0;#e;constructor(e,t){this.#pt=e,this.#mt=t}open(){this.#ht=1,this.#gt(this.#ht)}#bt(e,t){e&&(this.#ht=e);const n=this.#vt();if(a.default.setInnerHtml(n.content,t),n.show(this.#mt),this.#ft>1){const e=n.content.querySelector(".jsPagination");null!==e&&new i.default(e,{activePage:this.#ht,maxPage:this.#ft,callbackSwitch:e=>{this.#gt(e)}})}}async#gt(e){if(0!==this.#ft&&(e<1||e>this.#ft))throw new RangeError(`pageNo must be between 1 and ${this.#ft} (${e} given).`);this.#pt.parameters.pageNo=e;const t=await(0,o.dboAction)("getGroupedUserList",this.#pt.className).payload(this.#pt.parameters).dispatch();t.pageCount&&(this.#ft=t.pageCount),this.#bt(e,t.template)}#vt(){return void 0===this.#e&&(this.#e=(0,r.dialogFactory)().withoutContent().withoutControls()),this.#e}}})),define("WoltLabSuite/Core/Controller/Moderation/AssignUser",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","../../Component/Dialog","../../Language","../../Ui/Notification"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){e.addEventListener("click",(0,n.promiseMutex)((()=>async function(e){const{ok:t,result:n}=await(0,o.dialogFactory)().usingFormBuilder().fromEndpoint(e);var a;t&&(function(e){const t=document.getElementById("moderationAssignedUser");if(null===e)t.textContent=(0,i.getPhrase)("wcf.moderation.assignedUser.nobody");else{const n=document.createElement("a");n.href=e.link,n.dataset.objectId=e.userID.toString(),n.classList.add("userLink"),n.innerHTML=e.username,t.innerHTML="",t.append(n)}}(n.assignee),a=n.status,document.getElementById("moderationQueueStatus").textContent=a,(0,r.show)())}(e.dataset.url))))}})),define("WoltLabSuite/Core/Controller/Style/ColorScheme",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=document.querySelector('meta[name="theme-color"]');e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{document.documentElement.dataset.colorScheme=t.matches?"dark":"light",e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor")}))}})),define("WoltLabSuite/Core/Controller/User/Profile",["require","exports","../../Component/User/List"],(function(e,t,n){"use strict";function o(e,t,o){const i=document.getElementById(t);if(i){let t;i.addEventListener("click",(()=>{void 0===t&&(t=new n.UserList({className:o,parameters:{userID:e}},i.dataset.dialogTitle)),t.open()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){!function(e){o(e,"followingAll","wcf\\data\\user\\follow\\UserFollowingAction")}(e),function(e){o(e,"followerAll","wcf\\data\\user\\follow\\UserFollowAction")}(e),function(e){o(e,"visitorAll","wcf\\data\\user\\profile\\visitor\\UserProfileVisitorAction")}(e)}})),define("WoltLabSuite/Core/Form/Builder/Dialog",["require","exports","tslib","../../Core","../../Ui/Dialog","../../Ajax","./Manager"],(function(e,t,n,o,i,r,a){"use strict";return o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importStar(a),class{_actionName;_className;_dialogContent;_dialogId;_formId;_options;_additionalSubmitButtons;constructor(e,t,n,o){this.init(e,t,n,o)}init(e,t,n,r){if(this._dialogId=e,this._className=t,this._actionName=n,this._options=o.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:/\w+\\data\\/.test(this._className)},r),this._options.dialog=o.extend(this._options.dialog||{},{onClose:()=>this._dialogOnClose()}),i.default.getDialog(this._dialogId))throw new Error(`The dialogId ${this._dialogId} is already in use.`);this._formId="",this._dialogContent=""}_ajaxSetup(){const e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+o.getXsrfToken(),e.withCredentials=!0),e}_ajaxSuccess(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");!function(e){if(void 0===e.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.formId)throw new Error("Missing form id in return data.")}(e.returnValues),this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&void 0!==(t=e.returnValues).dialog&&void 0!==t.formId){if(e.returnValues.formId!==this._formId)throw new Error("Mismatch between form ids: expected '"+this._formId+"' but got '"+e.returnValues.formId+"'.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog)}else this.destroy(),"function"==typeof this._options.successCallback&&this._options.successCallback(e.returnValues||{});break;default:throw new Error("Cannot handle action '"+e.actionName+"'.")}var t}_closeDialog(){i.default.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()}_dialogOnClose(){this._options.destroyOnClose&&this.destroy()}_dialogSetup(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}}_dialogSubmit(){this.getData().then((e=>this._submitForm(e)))}_openDialogContent(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;const n=i.default.open(this,this._dialogContent),r=n.content.querySelector("button[data-type=cancel]");null===r||o.stringToBool(r.dataset.hasEventListener||"")||(r.addEventListener("click",(()=>this._closeDialog())),r.dataset.hasEventListener="1"),this._additionalSubmitButtons=Array.from(n.content.querySelectorAll(':not(.formSubmit) button[type="submit"]')),this._additionalSubmitButtons.forEach((e=>{e.addEventListener("click",(()=>{this._additionalSubmitButtons.forEach((t=>{t.dataset.isClicked=t===e?"1":"0"})),setTimeout((()=>i.default.submit(this._dialogId)),0)}))}))}_submitForm(e){const t=i.default.getDialog(this).content.querySelector("button[data-type=submit]");"function"==typeof this._options.onSubmit?this._options.onSubmit(e,t):"string"==typeof this._options.submitActionName&&(t.disabled=!0,this._additionalSubmitButtons.forEach((e=>e.disabled=!0)),r.api(this,{actionName:this._options.submitActionName,parameters:{data:e,formId:this._formId}}))}destroy(e=!1){""!==this._formId&&(a.hasForm(this._formId)&&a.unregisterForm(this._formId),!0!==e&&i.default.destroy(this))}getData(){if(""===this._formId)throw new Error("Form has not been requested yet.");return a.getData(this._formId)}open(){i.default.getDialog(this._dialogId)?i.default.open(this):r.api(this)}}})),define("WoltLabSuite/Core/Helper/Dom/View",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomView=void 0,o=n.__importDefault(o);class i{#wt;constructor(e){this.#wt=this.#yt(e)}get root(){return this.#wt}#yt(e){if(e instanceof HTMLElement)return e;if("string"==typeof e&&(e=o.default.createFragmentFromHtml(e)),1===e.children.length)return e.children[0];const t=document.createElement("div");return t.append(e),t}}t.DomView=i,t.default=i})),function(e){!function(t){function n(e,t){return function(n,o){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:o}),t&&t(n,o)}}var o="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=n(e);void 0===o.Reflect?o.Reflect=e:i=n(o.Reflect,i),function(e){function t(e,t,n){var o,i=O.get(e);if(d(i)){if(!n)return;i=new P,O.set(e,i)}if(d(o=i.get(t))){if(!n)return;o=new P,i.set(t,o)}return o}function n(e,t,i){var r;return!!o(e,t,i)||!u(r=_(t))&&n(e,r,i)}function o(e,n,o){var i=t(n,o,!1);return!d(i)&&!!i.has(e)}function i(e,t,n){var a;return o(e,t,n)?r(e,t,n):u(a=_(t))?void 0:i(e,a,n)}function r(e,n,o){var i=t(n,o,!1);if(!d(i))return i.get(e)}function a(e,n,o,i){t(o,i,!0).set(e,n)}function s(e,t){var n,o,i,r,a,c,d,u,p=l(e,t),m=_(e);if(null===m)return p;if((n=s(m,t)).length<=0)return p;if(p.length<=0)return n;for(o=new j,i=[],r=0,a=p;r<a.length;r++)c=a[r],o.has(c)||(o.add(c),i.push(c));for(d=0,u=n;d<u.length;d++)c=u[d],o.has(c)||(o.add(c),i.push(c));return i}function l(e,n){var o,i,r,a,s=[],l=t(e,n,!1);if(d(l))return s;for(o=function(e){var t,n=v(e,k);if(!g(n))throw new TypeError;if(!p(t=n.call(e)))throw new TypeError;return t}(l.keys()),i=0;;){if(!(r=w(o)))return s.length=i,s;a=r.value;try{s[i]=a}catch(e){try{y(o)}finally{throw e}}i++}}function c(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function d(e){return void 0===e}function u(e){return null===e}function p(e){return"object"==typeof e?null!==e:"function"==typeof e}function m(e,t){var n,o,i;switch(c(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}if(n=3===t?"string":5===t?"number":"default",void 0!==(o=v(e,C))){if(p(i=o.call(e,n)))throw new TypeError;return i}return function(e,t){var n,o,i,r;if("string"===t){if(g(n=e.toString)&&!p(o=n.call(e)))return o;if(g(i=e.valueOf)&&!p(o=i.call(e)))return o}else{if(g(i=e.valueOf)&&!p(o=i.call(e)))return o;if(g(r=e.toString)&&!p(o=r.call(e)))return o}throw new TypeError}(e,"default"===n?"number":n)}function h(e){var t=m(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function f(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function g(e){return"function"==typeof e}function b(e){return"function"==typeof e}function v(e,t){var n=e[t];if(null!=n){if(!g(n))throw new TypeError;return n}}function w(e){var t=e.next();return!t.done&&t}function y(e){var t=e.return;t&&t.call(e)}function _(e){var t,n,o,i=Object.getPrototypeOf(e);return"function"!=typeof e||e===D||i!==D||null==(n=(t=e.prototype)&&Object.getPrototypeOf(t))||n===Object.prototype||"function"!=typeof(o=n.constructor)||o===e?i:o}function E(e){return e.__=void 0,delete e.__,e}var S=Object.prototype.hasOwnProperty,L="function"==typeof Symbol,C=L&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",k=L&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",x="function"==typeof Object.create,T={__proto__:[]}instanceof Array,M=!x&&!T,I={create:x?function(){return E(Object.create(null))}:T?function(){return E({__proto__:null})}:function(){return E({})},has:M?function(e,t){return S.call(e,t)}:function(e,t){return t in e},get:M?function(e,t){return S.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},D=Object.getPrototypeOf(Function),A="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,P=A||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){function e(e,t){return e}function t(e,t){return t}function n(e,t){return[e,t]}var o={},i=[],r=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[k]=function(){return this},e.prototype.next=function(){var e,t=this._index;return t>=0&&t<this._keys.length?(e=this._selector(this._keys[t],this._values[t]),t+1>=this._keys.length?(this._index=-1,this._keys=i,this._values=i):this._index++,{value:e,done:!1}):{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=i,this._values=i),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=i,this._values=i),{value:e,done:!0}},e}();return function(){function i(){this._keys=[],this._values=[],this._cacheKey=o,this._cacheIndex=-2}return Object.defineProperty(i.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),i.prototype.has=function(e){return this._find(e,!1)>=0},i.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},i.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},i.prototype.delete=function(e){var t,n,i=this._find(e,!1);if(i>=0){for(t=this._keys.length,n=i+1;n<t;n++)this._keys[n-1]=this._keys[n],this._values[n-1]=this._values[n];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=o,this._cacheIndex=-2),!0}return!1},i.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=o,this._cacheIndex=-2},i.prototype.keys=function(){return new r(this._keys,this._values,e)},i.prototype.values=function(){return new r(this._keys,this._values,t)},i.prototype.entries=function(){return new r(this._keys,this._values,n)},i.prototype["@@iterator"]=function(){return this.entries()},i.prototype[k]=function(){return this.entries()},i.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},i}()}():Map,j=A||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new P}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[k]=function(){return this.keys()},e}():Set,O=new(A||"function"!=typeof WeakMap?function(){function e(){var e;do{e="@@WeakMap@@"+o()}while(I.has(r,e));return r[e]=!0,e}function t(e,t){if(!S.call(e,a)){if(!t)return;Object.defineProperty(e,a,{value:I.create()})}return e[a]}function n(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function o(){var e,t,o,r,a=(r=i,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(r)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(r)):n(new Uint8Array(r),r):n(new Array(r),r));for(a[6]=79&a[6]|64,a[8]=191&a[8]|128,e="",t=0;t<i;++t)4!==t&&6!==t&&8!==t||(e+="-"),(o=a[t])<16&&(e+="0"),e+=o.toString(16).toLowerCase();return e}var i=16,r=I.create(),a=e();return function(){function n(){this._key=e()}return n.prototype.has=function(e){var n=t(e,!1);return void 0!==n&&I.has(n,this._key)},n.prototype.get=function(e){var n=t(e,!1);return void 0!==n?I.get(n,this._key):void 0},n.prototype.set=function(e,n){return t(e,!0)[this._key]=n,this},n.prototype.delete=function(e){var n=t(e,!1);return void 0!==n&&delete n[this._key]},n.prototype.clear=function(){this._key=e()},n}()}():WeakMap);e("decorate",(function(e,t,n,o){if(d(n)){if(!f(e))throw new TypeError;if(!b(t))throw new TypeError;return function(e,t){var n,o;for(n=e.length-1;n>=0;--n)if(!d(o=(0,e[n])(t))&&!u(o)){if(!b(o))throw new TypeError;t=o}return t}(e,t)}if(!f(e))throw new TypeError;if(!p(t))throw new TypeError;if(!p(o)&&!d(o)&&!u(o))throw new TypeError;return u(o)&&(o=void 0),function(e,t,n,o){var i,r;for(i=e.length-1;i>=0;--i)if(!d(r=(0,e[i])(t,n,o))&&!u(r)){if(!p(r))throw new TypeError;o=r}return o}(e,t,n=h(n),o)})),e("metadata",(function(e,t){return function(n,o){if(!p(n))throw new TypeError;if(!d(o)&&!function(e){switch(c(e)){case 3:case 4:return!0;default:return!1}}(o))throw new TypeError;a(e,t,n,o)}})),e("defineMetadata",(function(e,t,n,o){if(!p(n))throw new TypeError;return d(o)||(o=h(o)),a(e,t,n,o)})),e("hasMetadata",(function(e,t,o){if(!p(t))throw new TypeError;return d(o)||(o=h(o)),n(e,t,o)})),e("hasOwnMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),o(e,t,n)})),e("getMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),i(e,t,n)})),e("getOwnMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),r(e,t,n)})),e("getMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),s(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),l(e,t)})),e("deleteMetadata",(function(e,n,o){var i,r;if(!p(n))throw new TypeError;return d(o)||(o=h(o)),!d(i=t(n,o,!1))&&!!i.delete(e)&&(i.size>0||((r=O.get(n)).delete(o),r.size>0||O.delete(n),!0))}))}(i)}()}(Reflect||(Reflect={})),define("reflect-metadata",(function(){})),define("WoltLabSuite/Core/Helper/Dom/Element",["require","exports","./View","reflect-metadata"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomElementList=t.DomElement=void 0,t.DomElement=function(e,t){return function(o,i){if(!(o instanceof n.DomView))throw new Error("@DomElement() is only supported on `DomView`");const{nullable:r,type:a}=Object.assign({nullable:!1,type:Reflect.getMetadata("design:type",o,i)},t);Object.defineProperty(o,i,{configurable:!0,get(){const t=this.root.querySelector(e);if(null===t){if(r)return null;throw new Error(`Unable to find an element with the selector '${e}'.`)}if(!(t instanceof a))throw new Error(`Expected an element of type '${a.name}' but found '${t.nodeName}'.`);return t}})}},t.DomElementList=function(e,t){return function(o,i){if(!(o instanceof n.DomView))throw new Error("@DomElementList() is only supported on `DomView`");if(Reflect.getMetadata("design:type",o,i).prototype!==Array.prototype)throw new Error("The type must be an array of elements.");const{type:r}=t;Object.defineProperty(o,i,{configurable:!0,get(){const t=Array.from(this.root.querySelectorAll(e));for(const e of t)if(!(e instanceof r))throw new Error(`Expected an element of type '${r.name}' but found '${e.nodeName}'.`);return t}})}}})),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["require","exports","tslib","../../Core","./Simple"],(function(e,t,n,o,i){"use strict";function r(e){if(!(e instanceof HTMLUListElement))throw new TypeError("Expected a reference to an <ul> element.");if(!e.classList.contains("dropdownMenu"))throw new Error("List does not appear to be a dropdown menu.")}function a(e){const t=document.createElement("li");if("divider"===e)return t.className="dropdownDivider",t;"string"==typeof e.identifier&&(t.dataset.identifier=e.identifier);const n=document.createElement("a");if(n.href="string"==typeof e.href?e.href:"#","function"==typeof e.callback)n.addEventListener("click",(t=>{t.preventDefault(),e.callback(n)}));else if("#"===n.href)throw new Error("Expected either a `href` value or a `callback`.");if(e.attributes&&o.isPlainObject(e.attributes)&&Object.keys(e.attributes).forEach((t=>{const o=e.attributes[t];if("string"!=typeof o)throw new Error("Expected only string values.");-1!==t.indexOf("-")?n.setAttribute(`data-${t}`,o):n.dataset[t]=o})),t.appendChild(n),void 0!==e.icon&&o.isPlainObject(e.icon)){if("string"!=typeof e.icon.name)throw new TypeError("Expected a valid icon name.");let t=16;"number"==typeof e.icon.size&&-1!==c.indexOf(~~e.icon.size)&&(t=~~e.icon.size);const o=document.createElement("fa-icon");o.size=t,o.setIcon(e.icon.name,!!e.icon.forceSolid),n.appendChild(o)}const i="string"==typeof e.label?e.label.trim():"",r="string"==typeof e.labelHtml?e.labelHtml.trim():"";if(""===i&&""===r)throw new TypeError("Expected either a label or a `labelHtml`.");const a=document.createElement("span");return a[i?"textContent":"innerHTML"]=i||r,n.appendChild(document.createTextNode(" ")),n.appendChild(a),t}function s(e,t){r(e),e.appendChild(a(t))}function l(e,t){if(r(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");const n=t.length;if(0===n)throw new Error("Expected a non-empty list of items.");if(1===n)s(e,t[0]);else{const n=document.createDocumentFragment();t.forEach((e=>{n.appendChild(a(e))})),e.appendChild(n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.divider=t.attach=t.setItems=t.appendItems=t.appendItem=t.buildItem=t.create=void 0,o=n.__importStar(o),i=n.__importDefault(i);const c=[16,24,32,48,64,96,144];t.create=function(e,t){const n=document.createElement("ul");return n.className="dropdownMenu","string"==typeof t&&(n.dataset.identifier=t),Array.isArray(e)&&e.length>0&&l(n,e),n},t.buildItem=function(e){return a(e)},t.appendItem=s,t.appendItems=l,t.setItems=function(e,t){r(e),e.innerHTML="",l(e,t)},t.attach=function(e,t){r(e),i.default.initFragment(t,e),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),i.default.toggleDropdown(t.id)}))},t.divider=function(){return"divider"}})),define("WoltLabSuite/Core/Ui/ItemList/Static",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Language","../Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";function s(e){const t=p.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.placeholder=r.get("wcf.global.form.input.maxItems")))}function l(e,t,n){const o=p.get(e),i=document.createElement("li");i.className="item";const r=document.createElement("span");if(r.className="content",r.dataset.objectId=t.objectId.toString(),r.textContent=t.value,i.appendChild(r),n||!o.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",(e=>c(e))),i.appendChild(e)}o.list.insertBefore(i,o.listItem),o.element.value="",o.element.disabled||s(e);let a=d(o);"function"==typeof o.options.callbackChange&&(null===a&&(a=u(e)),o.options.callbackChange(e,a))}function c(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const n=e.parentElement.dataset.elementId,o=p.get(n);e.remove(),t||o.element.focus(),s(n);let i=d(o);"function"==typeof o.options.callbackChange&&(null===i&&(i=u(n)),o.options.callbackChange(n,i))}function d(e){if(!e.options.isCSV)return null;const t=u(e.element.id);return e.shadow.value=t.map((e=>e.value)).join(","),t}function u(e){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const t=p.get(e),n=[];return t.list.querySelectorAll(".item > span").forEach((e=>{n.push({objectId:~~e.dataset.objectId,value:e.textContent})})),n}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a);const p=new Map;t.init=function(e,t,n){const r=document.getElementById(e);if(null===r)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(p.has(e)){const t=p.get(e);Object.values(t).forEach((e=>{e instanceof HTMLElement&&e.parentElement&&e.remove()})),a.default.destroy(e),p.delete(e)}const s=o.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},n),d=i.parentByTag(r,"FORM");if(null!==d&&!s.isCSV){if(!s.submitFieldName.length&&"function"!=typeof s.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");d.addEventListener("submit",(()=>{const t=u(e);s.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=s.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,d.appendChild(t)})):s.callbackSubmit(d,t)}))}const m=function(e,t){const n=document.createElement("ol");n.className="inputItemList"+(e.disabled?" disabled":""),n.dataset.elementId=e.id,n.addEventListener("click",(t=>{t.target===n&&e.focus()}));const o=document.createElement("li");let i;o.className="input",n.appendChild(o),e.addEventListener("keydown",(e=>function(e){const t=e.currentTarget,n=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==n&&(n.classList.contains("active")?c(n):n.classList.add("active")):"Escape"===e.key&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")}(e))),e.addEventListener("keypress",(e=>function(e){if("Enter"===e.key||","===e.key){e.preventDefault();const t=e.currentTarget,n=t.value.trim();n.length&&l(t.id,{objectId:0,value:n})}}(e))),e.addEventListener("keyup",(e=>function(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}(e))),e.addEventListener("paste",(e=>function(e){const t=e.currentTarget;e.clipboardData.getData("text/plain").split(",").map((e=>e.trim())).filter((e=>e.length>0)).forEach((e=>{l(t.id,{objectId:0,value:e})})),e.preventDefault()}(e))),e.addEventListener("blur",(e=>function(e){const t=e.currentTarget;window.setTimeout((()=>{const e=t.value.trim();e.length&&l(t.id,{objectId:0,value:e})}),100)}(e))),e.insertAdjacentElement("beforebegin",n),o.appendChild(e),-1!==t.maxLength&&(e.maxLength=t.maxLength);let r=[];if(t.isCSV&&(i=document.createElement("input"),i.className="itemListInputShadow",i.type="hidden",i.name=e.name,e.removeAttribute("name"),n.insertAdjacentElement("beforebegin",i),r=e.value.split(",").map((e=>e.trim())).filter((e=>e.length>0)),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentElement.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,list:n,shadow:i,values:r}}(r,s);if(p.set(e,{dropdownMenu:null,element:m.element,list:m.list,listItem:m.element.parentElement,options:s,shadow:m.shadow}),t=m.values.length?m.values:t,Array.isArray(t)){const n=!m.element.disabled;t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),l(e,t,n)}))}},t.getValues=u,t.setValues=function(e,t){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const n=p.get(e);i.childrenByClass(n.list,"item").forEach((e=>c(e,!0))),t.forEach((t=>l(e,t)))}})),define("WoltLabSuite/Core/Ui/ItemList/User",["require","exports","tslib","../ItemList"],(function(e,t,n,o){"use strict";function i(e){const t=r(e.element.id),n=[],o=[];t.forEach((e=>{e.type&&"group"===e.type?o.push(e.objectId):n.push(e.value)}));const i=e.shadow;return i.value=n.join(","),e._shadowGroups||(e._shadowGroups=document.createElement("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=`${i.name}GroupIDs`,i.insertAdjacentElement("beforebegin",e._shadowGroups)),e._shadowGroups.value=o.join(","),t}function r(e){return o.getValues(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.init=void 0,o=n.__importStar(o),t.init=function(e,t){o.init(e,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:t.includeUserGroups?~~t.includeUserGroups:0,restrictUserGroupIDs:Array.isArray(t.restrictUserGroupIDs)?t.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof t.callbackChange?t.callbackChange:null,callbackSyncShadow:t.csvPerType?i:null,callbackSetupValues:"function"==typeof t.callbackSetupValues?t.callbackSetupValues:null,excludedSearchValues:Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[],isCSV:!0,maxItems:t.maxItems?~~t.maxItems:-1,restricted:!0})},t.getValues=r})),define("WoltLabSuite/Core/Ui/Like/Handler",["require","exports","tslib","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil","../Reaction/Handler","../../User"],(function(e,t,n,o,i,r,a,s,l){"use strict";o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s),l=n.__importDefault(l);const c=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new WeakMap;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=o.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},t),this.initContainers(),i.default.add(`WoltLabSuite/Core/Ui/Like/Handler-${e}`,(()=>this.initContainers())),new s.default(this._objectType,{containerSelector:this._options.containerSelector})}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{if(this._containers.has(t))return;const n={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~t.dataset.likeDislikes,liked:~~t.dataset.likeLiked,likes:~~t.dataset.likeLikes,objectId:~~t.dataset.objectId,users:JSON.parse(t.dataset.likeUsers)};this._containers.set(t,n),this._buildWidget(t,n),e=!0})),e&&i.default.trigger()}_buildWidget(e,t){let n,o=!0;if(n=this._options.isSingleItem?document.querySelector(this._options.summarySelector):e.querySelector(this._options.summarySelector),null===n&&(n=this._options.isSingleItem?document.querySelector(this._options.badgeContainerSelector):e.querySelector(this._options.badgeContainerSelector),o=!1),null!==n){const e=document.createElement("ul");if(e.classList.add("reactionSummaryList"),o?e.classList.add("likesSummary"):e.classList.add("reactionSummaryListTiny"),Object.entries(t.users).forEach((([t,n])=>{const o=c.get(t);if("reactionTypeID"===t||!o)return;const i=document.createElement("li");i.className="reactCountButton",i.setAttribute("reaction-type-id",t);const r=document.createElement("span");r.className="reactionCount",r.innerHTML=a.shortUnit(~~n),i.appendChild(r),i.innerHTML=o.renderedIcon+i.innerHTML,e.appendChild(i)})),o)this._options.summaryPrepend?n.insertAdjacentElement("afterbegin",e):n.insertAdjacentElement("beforeend",e);else if("OL"===n.nodeName||"UL"===n.nodeName){const t=document.createElement("li");t.appendChild(e),n.appendChild(t)}else n.appendChild(e);t.badge=e}if(this._options.canLike&&(l.default.userId!=~~e.dataset.userId||this._options.canLikeOwnContent)){let n=null;this._options.buttonAppendToSelector&&(n=this._options.isSingleItem?document.querySelector(this._options.buttonAppendToSelector):e.querySelector(this._options.buttonAppendToSelector));let o=null;if(this._options.buttonBeforeSelector&&(o=this._options.isSingleItem?document.querySelector(this._options.buttonBeforeSelector):e.querySelector(this._options.buttonBeforeSelector)),null===o&&null===n)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,o,n)}}_createButton(e,t,n,o){const i=r.get("wcf.reactions.react"),a=document.createElement("li");a.className="wcfReactButton";const s=document.createElement("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=i;const l=document.createElement("fa-icon");l.setIcon("smile"),void 0===t||0==t?l.dataset.reactionTypeId="0":(s.dataset.reactionTypeId=t.toString(),s.classList.add("active")),s.appendChild(l);const c=document.createElement("span");return c.className="invisible",c.innerHTML=i,s.appendChild(document.createTextNode(" ")),s.appendChild(c),a.appendChild(s),n?n.insertAdjacentElement("beforebegin",a):o.insertAdjacentElement("beforeend",a),s}}})),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["require","exports","tslib","WoltLabSuite/Core/Component/Ckeditor/Event","../../Ajax","../../Component/Ckeditor","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../Language","../Dropdown/Reusable","../Notification","../Screen","../Scroll"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,m,h){"use strict";return i=n.__importStar(i),a=n.__importStar(a),s=n.__importDefault(s),l=n.__importDefault(l),c=n.__importStar(c),d=n.__importStar(d),u=n.__importStar(u),p=n.__importStar(p),m=n.__importStar(m),h=n.__importStar(h),class{_activeDropdownElement;_activeElement;_dropdownMenu;_elements;_options;constructor(e){this.init(e)}init(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new WeakMap,this._options=a.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.default.add(`Ui/Message/InlineEdit_${this._options.className}`,(()=>this.rebuild()))}rebuild(){document.querySelectorAll(this._options.messageSelector).forEach((e=>{if(this._elements.has(e))return;const t=e.querySelector(".jsMessageEditButton");if(null!==t){const n=a.stringToBool(e.dataset.canEdit||""),o=a.stringToBool(e.dataset.canEditInline||"");this._options.canEditInline||o?(t.addEventListener("click",(t=>this._clickDropdown(e,t))),t.classList.add("jsDropdownEnabled"),n&&t.addEventListener("dblclick",(t=>this._click(e,t)))):n&&t.addEventListener("click",(t=>this._click(e,t)))}const n=e.querySelector(".messageBody"),o=e.querySelector(".messageFooter"),i=o.querySelector(".messageFooterButtons"),r=e.querySelector(".messageHeader"),s=n.querySelector(".messageText");this._elements.set(e,{button:t,messageBody:n,messageBodyEditor:null,messageFooter:o,messageFooterButtons:i,messageHeader:r,messageText:s})}))}_click(e,t){null===e&&(e=this._activeDropdownElement),t&&t.preventDefault(),null===this._activeElement?(this._activeElement=e,this._prepare(),i.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(e)}})):this._activeElement!==e&&p.show("wcf.message.error.editorAlreadyInUse",void 0,"warning")}_clickDropdown(e,t){t.preventDefault();const n=t.currentTarget;if(!n.classList.contains("dropdownToggle")){if(n.classList.add("dropdownToggle"),n.parentElement.classList.add("dropdown"),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this._activeDropdownElement=e;let o=n;if(m.is("screen-sm-down")&&0===n.clientWidth){const e=n.closest(this._options.messageSelector);o=this._elements.get(e).messageHeader.querySelector(".messageQuickOptions")}u.toggleDropdown(this._options.dropdownIdentifier,o)})),null===this._dropdownMenu){this._dropdownMenu=document.createElement("ul"),this._dropdownMenu.className="dropdownMenu";const e=this._dropdownGetItems();c.fire("com.woltlab.wcf.inlineEditor",`dropdownInit_${this._options.dropdownIdentifier}`,{items:e}),this._dropdownBuild(e),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,((e,t)=>this._dropdownToggle(e,t)))}setTimeout((()=>n.click()),10)}}_dropdownBuild(e){e.forEach((e=>{const t=document.createElement("li");if(t.dataset.item=e.item,"divider"===e.item)t.className="dropdownDivider";else{const n=document.createElement("span");n.textContent=d.get(e.label),t.appendChild(n),"editItem"===e.item?t.addEventListener("click",(e=>this._click(null,e))):t.addEventListener("click",(e=>this._clickDropdownItem(e)))}this._dropdownMenu.appendChild(t)}))}_dropdownToggle(e,t){const n=this._elements.get(this._activeDropdownElement),o=n.button.parentElement;if("close"===t)return o.classList.remove("dropdownOpen"),void n.messageFooterButtons.classList.remove("forceVisible");o.classList.add("dropdownOpen"),n.messageFooterButtons.classList.add("forceVisible");const i=new Map(Object.entries(this._dropdownOpen()));c.fire("com.woltlab.wcf.inlineEditor",`dropdownOpen_${this._options.dropdownIdentifier}`,{element:this._activeDropdownElement,visibility:i});const r=this._dropdownMenu;let a=!1;const s=Array.from(r.children);s.forEach(((e,t)=>{const n=e.dataset.item;if("divider"===n)a?(l.default.show(e),a=!1):l.default.hide(e);else if(!1===i.get(n)){if(l.default.hide(e),t>0&&t+1===s.length){const t=e.previousElementSibling;"divider"===t.dataset.item&&l.default.hide(t)}}else l.default.show(e),a=!0}))}_dropdownGetItems(){return[]}_dropdownOpen(){return{}}_dropdownSelect(e){}_clickDropdownItem(e){e.preventDefault();const t=e.currentTarget.dataset.item,n={cancel:!1,element:this._activeDropdownElement,item:t};c.fire("com.woltlab.wcf.inlineEditor",`dropdownItemClick_${this._options.dropdownIdentifier}`,n),n.cancel?e.preventDefault():this._dropdownSelect(t)}_prepare(){const e=this._elements.get(this._activeElement),t=document.createElement("div");t.className="messageBody editor",e.messageBodyEditor=t;const n=document.createElement("fa-icon");n.size=48,n.setIcon("spinner"),t.appendChild(n),e.messageBody.insertAdjacentElement("afterend",t),l.default.hide(e.messageBody),h.element(this._activeElement,void 0,"instant")}_showEditor(e){const t=this._getEditorId(),n=this._activeElement,o=this._elements.get(n);n.classList.add("jsInvalidQuoteTarget");const i=n.parentElement;i.classList.contains("anchorFixedHeader")&&i.classList.add("disableAnchorFixedHeader"),o.messageBodyEditor.querySelector("fa-icon").remove();const r=o.messageBodyEditor,a=document.createElement("div");a.className="editorContainer",l.default.setInnerHtml(a,e.returnValues.template),r.appendChild(a);const s=a.querySelector(".formSubmit");s.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save())),s.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),c.add("com.woltlab.wcf.ckeditor5",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()})),l.default.hide(o.messageHeader),l.default.hide(o.messageFooter),window.setTimeout((()=>{this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(n,void 0,"instant")}),250)}_restoreMessage(){const e=this._activeElement,t=this._elements.get(e);this._destroyEditor(),t.messageBodyEditor.remove(),t.messageBodyEditor=null,l.default.show(t.messageBody),l.default.show(t.messageFooter),l.default.show(t.messageHeader),e.classList.remove("jsInvalidQuoteTarget");const n=e.parentElement;n.classList.contains("anchorFixedHeader")&&n.classList.remove("disableAnchorFixedHeader"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()}_save(){const e=this._getEditorId(),t=(0,r.getCkeditorById)(e),n={containerID:this._options.containerId,data:{message:t.getHtml()},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},a=document.getElementById(`settings_${e}`);a&&a.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(n,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);n[t]=e.value.trim()}));let s=this._validate(n);s instanceof Promise||(s=!1===s?Promise.reject():Promise.resolve()),s.then((()=>{(0,o.dispatchToCkeditor)(t.sourceElement).collectMetaData({metaData:n}),i.api(this,{actionName:"save",parameters:n}),this._hideEditor()}),(e=>{const t=e.message;console.log(`Validation of post edit failed: ${t}`)}))}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t={api:this,parameters:e,valid:!0,promises:[]};return c.fire("com.woltlab.wcf.ckeditor5",`validate_${this._getEditorId()}`,t),t.valid?t.promises.push(Promise.resolve()):t.promises.push(Promise.reject()),Promise.all(t.promises)}throwError(e,t){l.default.innerError(e,t)}_showMessage(e){const t=this._activeElement,n=this._elements.get(t);if(l.default.setInnerHtml(n.messageBody.querySelector(".messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){n.messageFooter.querySelectorAll(".attachmentThumbnailList, .attachmentFileList").forEach((e=>e.remove()));const t=document.createElement("div");let o;for(l.default.setInnerHtml(t,e.returnValues.attachmentList);t.childNodes.length;)o=t.childNodes[t.childNodes.length-1],n.messageFooter.insertBefore(o,n.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){const t=n.messageBody.querySelector(".pollContainer");if(null!==t&&t.parentElement.remove(),""!==e.returnValues.poll){const t=document.createElement("div");t.className="jsInlineEditorHideContent",l.default.setInnerHtml(t,e.returnValues.poll),n.messageBody.insertAdjacentElement("afterbegin",t)}}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),p.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())}_hideEditor(){const e=this._elements.get(this._activeElement),t=e.messageBodyEditor.querySelector(".editorContainer");l.default.hide(t);const n=document.createElement("fa-icon");n.size=48,n.setIcon("spinner"),e.messageBodyEditor.appendChild(n)}_restoreEditor(){const e=this._elements.get(this._activeElement).messageBodyEditor;e.querySelector('fa-icon[name="spinner"]').remove();const t=e.querySelector(".editorContainer");null!==t&&l.default.show(t)}_destroyEditor(){const e=(0,r.getCkeditorById)(this._getEditorId(),!1);e?.destroy().then((()=>{e.discardDraft()}))}_getHash(e){return`#message${e}`}_updateHistory(e){window.location.hash=e}_getEditorId(){return this._options.editorPrefix+this._getObjectId(this._activeElement).toString()}_getObjectId(e){return e.dataset.objectId||""}_ajaxFailure(e){const t=this._elements.get(this._activeElement).messageBodyEditor.querySelector(".ck.ck-editor");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(l.default.innerError(t,e.returnValues.realErrorMessage),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}}legacyEdit(e){this._click(document.getElementById(e),null)}}})),define("WoltLabSuite/Core/Ui/Message/Manager",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil"],(function(e,t,n,o,i,r,a,s){"use strict";return o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s),class{_elements=new Map;_options;constructor(e){this._options=i.extend({className:"",selector:""},e),this.rebuild(),r.default.add(`Ui/Message/Manager${this._options.className}`,this.rebuild.bind(this))}rebuild(){this._elements.clear(),document.querySelectorAll(this._options.selector).forEach((e=>{this._elements.set(e.dataset.objectId,e)}))}getPermission(e,t){t="can"+s.ucfirst(t);const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);return i.stringToBool(n.dataset[s.toCamelCase(t)]||"")}getPropertyValue(e,t,n){const o=this._elements.get(e);if(void 0===o)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const r=o.dataset[s.toCamelCase(t)]||"";return n?i.stringToBool(r):r}update(e,t,n){o.api(this,{actionName:t,parameters:n||{},objectIDs:[e]})}updateItems(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{const n=this._elements.get(e);void 0!==n&&Object.entries(t).forEach((([e,t])=>{this._update(n,e,t)}))}))}updateAllItems(e){const t=Array.from(this._elements.keys());this.updateItems(t,e)}setNote(e,t,n){const o=this._elements.get(e);if(void 0===o)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const i=o.querySelector(".messageFooterNotes");let r=i.querySelector(`.${t}`);n?(null===r&&(r=document.createElement("p"),r.className="messageFooterNote "+t,i.appendChild(r)),r.innerHTML=n):null!==r&&r.remove()}_update(e,t,n){e.dataset[t]=n.toString();const o=1==n||!0===n||"true"===n;this._updateState(e,t,n,o)}_updateState(e,t,n,o){switch(t){case"isDeleted":o?e.classList.add("messageDeleted"):e.classList.remove("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",o);break;case"isDisabled":o?e.classList.add("messageDisabled"):e.classList.remove("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",o)}}_toggleMessageStatus(e,t,n,o,i){let r=e.querySelector(".messageStatus");if(null===r){const t=e.querySelector(".messageHeaderMetaData");if(null===t)return;r=document.createElement("ul"),r.className="messageStatus",t.insertAdjacentElement("afterend",r)}let s=r.querySelector(`.${t}`);if(i){if(null!==s)return;s=document.createElement("span"),s.className=`badge label ${o} ${t}`,s.textContent=a.get(n);const e=document.createElement("li");e.appendChild(s),r.appendChild(e)}else{if(null===s)return;s.parentElement.remove()}}_getAttributeName(e){return-1!==e.indexOf("-")?e:e.split(/([A-Z][a-z]+)/).map((e=>e.trim().toLowerCase())).filter((e=>e.length>0)).join("-")}_ajaxSuccess(e){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")}_ajaxSetup(){return{data:{className:this._options.className}}}}})),define("WoltLabSuite/Core/Ui/Message/Share",["require","exports","tslib","../../Event/Handler","../../StringUtil"],(function(e,t,n,o,i){"use strict";function r(e,t,n,o){o||(o=s),window.open(t.replace("{pageURL}",o).replace("{text}",a+(n?`%20${o}`:"")),e,"height=600,width=600")}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importStar(i);let a="",s="";t.init=function(){const e=document.querySelector('meta[property="og:title"]');null!==e&&(a=encodeURIComponent(e.content));const t=document.querySelector('meta[property="og:url"]');null!==t&&(s=encodeURIComponent(t.content)),document.querySelectorAll(".jsMessageShareButtons").forEach((e=>{e.classList.remove("jsMessageShareButtons");let t=encodeURIComponent(i.unescapeHTML(e.dataset.url||""));t||(t=s);const n={facebook:{link:e.querySelector('.messageShareProvider[data-identifier="Facebook"]'),share(e){e.preventDefault(),r("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{link:e.querySelector('.messageShareProvider[data-identifier="Reddit"]'),share(e){e.preventDefault(),r("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{link:e.querySelector('.messageShareProvider[data-identifier="Twitter"]'),share(e){e.preventDefault(),r("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{link:e.querySelector('.messageShareProvider[data-identifier="LinkedIn"]'),share(e){e.preventDefault(),r("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{link:e.querySelector('.messageShareProvider[data-identifier="Pinterest"]'),share(e){e.preventDefault(),r("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{link:e.querySelector('.messageShareProvider[data-identifier="XING"]'),share(e){e.preventDefault(),r("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{link:e.querySelector('.messageShareProvider[data-identifier="WhatsApp"]'),share(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+a+"%20"+s}}};o.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:n,pageDescription:a,pageUrl:s}),Object.values(n).forEach((e=>{null!==e.link&&e.link.addEventListener("click",(t=>e.share(t)))}))}))}})),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["require","exports","https://platform.twitter.com/widgets.js"],(function(e,t){"use strict";async function n(e,t,n=!1){const i=await o,r="dark"===document.documentElement.dataset.colorScheme?"dark":"light",a=await i.widgets.createTweet(t,e,{dnt:!0,lang:document.documentElement.lang,theme:r});if(a&&n){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.embedAll=t.embedTweet=void 0;const o=new Promise((e=>{twttr.ready(e)}));t.embedTweet=n,t.embedAll=function(){document.querySelectorAll("[data-wsc-twitter-tweet]").forEach((e=>{const t=e.dataset.wscTwitterTweet;t&&(delete e.dataset.wscTwitterTweet,n(e,t,!0))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAllAsRead",["require","exports","tslib","../../Ajax","../Notification"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),t.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),async function(){await(0,o.dboAction)("markAllAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").dispatch(),document.querySelectorAll(".moderationQueueEntryList .new").forEach((e=>{e.classList.remove("new")})),document.querySelector("#outstandingModeration .badgeUpdate")?.remove(),i.show()}()}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAsRead",["require","exports","../../Ajax"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const o=new WeakSet;t.setup=function(){document.querySelectorAll(".moderationQueueEntryList .new .columnAvatar").forEach((e=>{o.has(e)||(o.add(e),e.addEventListener("dblclick",(t=>{t.preventDefault();const o=e.closest(".moderationQueueEntry");o.classList.contains("new")&&async function(e){const t=parseInt(e.dataset.queueId,10);await(0,n.dboAction)("markAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").objectIds([t]).dispatch(),e.classList.remove("new"),e.querySelector(".columnAvatar p")?.removeAttribute("title")}(o)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/Report",["require","exports","tslib","../../Ajax","../../Component/Dialog","../../Dom/Util","../../Helper/Selector","../../Language","../Notification"],(function(e,t,n,o,i,r,a,s,l){"use strict";function c(e){(function(e){return""===e.dataset.reportContent?(console.error("Missing the value for [data-report-content]",e),!1):!!parseInt(e.dataset.objectId||"")||(console.error("Expected a valid integer for [data-object-id]",e),!1)})(e)&&e.addEventListener("click",(t=>{"A"!==e.tagName&&"true"!==e.dataset.isLegacyButton||t.preventDefault(),async function(e){const t=parseInt(e.dataset.objectId||""),n=e.dataset.reportContent,a=await(0,o.dboAction)("prepareReport","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({objectID:t,objectType:n}).dispatch();let c;a.alreadyReported?c=(0,i.dialogFactory)().fromHtml(a.template).asAlert():(c=(0,i.dialogFactory)().fromHtml(a.template).asPrompt(),c.addEventListener("validate",(e=>{(function(e){const t=e.content.querySelector(".jsReportMessage"),n=t.closest("dl");return""===t.value.trim()?(n.classList.add("formError"),(0,r.innerError)(t,s.get("wcf.global.form.error.empty")),!1):(n.classList.remove("formError"),(0,r.innerError)(t,!1),!0)})(c)||e.preventDefault()})),c.addEventListener("primary",(()=>{!async function(e,t,n){const i=e.content.querySelector(".jsReportMessage").value.trim();await(0,o.dboAction)("report","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({message:i,objectID:n,objectType:t}).dispatch(),l.show()}(c,n,t)}))),c.show(s.get("wcf.moderation.report.reportContent"))}(e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.registerLegacyButton=void 0,s=n.__importStar(s),l=n.__importStar(l),t.registerLegacyButton=function(e,t){e.dataset.reportContent=t,e.dataset.isLegacyButton="true",c(e)},t.setup=function(){(0,a.wheneverFirstSeen)("[data-report-content]",(e=>c(e)))}})),define("WoltLabSuite/Core/Ui/Pagination/JumpToPage",["require","exports","../../Component/Dialog","../../Helper/Selector","../../Language"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,o.wheneverFirstSeen)("woltlab-core-pagination",(e=>{e.addEventListener("jumpToPage",(()=>{!function(e){const t=`\n    <dl>\n      <dt></dt>\n      <dd>\n        <input\n          class="tiny"\n          type="number"\n          min="1"\n          max="${e.count}"\n          value="${e.count}"\n          aria-label="${(0,i.getPhrase)("wcf.page.jumpTo.pageNo")}"\n          required\n        >\n        <small>${(0,i.getPhrase)("wcf.page.jumpTo.description",{pages:e.count})}</small>\n      </dd>\n    </dl>\n  `,o=(0,n.dialogFactory)().fromHtml(t).asPrompt(),r=o.content.querySelector('input[type="number"]');o.addEventListener("primary",(()=>{e.jumpToPage(parseInt(r.value))})),o.show((0,i.getPhrase)("wcf.page.jumpTo")),r.select()}(e)}))}))}})),define("WoltLabSuite/Core/Ui/Poll/View/Participants",["require","exports","../../../Component/User/List"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Participants=void 0;class o{pollManager;button;userList=void 0;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showPollParticipantsButton");if(!t)throw new Error(`Could not find button with selector "showPollParticipantsButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(e=>{e&&e.preventDefault(),this.open()}))}open(){this.userList||(this.userList=new n.UserList({className:"wcf\\data\\poll\\PollAction",parameters:{pollID:this.pollManager.pollId}},this.pollManager.question)),this.userList.open()}showButton(){this.button.hidden=!1}hideButton(){this.button.hidden=!0}}t.Participants=o,t.default=o})),define("WoltLabSuite/Core/Ui/Poll/View/Results",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Results=void 0,o=n.__importStar(o);class r{pollManager;button;constructor(e,t){this.pollManager=e,this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(i.PollViews.results)?this.pollManager.displayView(i.PollViews.results):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=o.dboAction("getResultTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(i.PollViews.results,t.template),this.pollManager.displayView(i.PollViews.results)}checkVisibility(e){e===i.PollViews.results?this.button.hidden=!0:this.button.hidden=!1}}t.Results=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/View/Vote",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,o=n.__importStar(o);class r{pollManager;button;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showVoteFormButton");if(!t)throw new Error(`Could not find button with selector ".showVoteFormButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(i.PollViews.vote)?this.pollManager.displayView(i.PollViews.vote):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=o.dboAction("getVoteTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(i.PollViews.vote,t.template),this.pollManager.displayView(i.PollViews.vote)}checkVisibility(e){e!==i.PollViews.vote&&this.pollManager.canVote?this.button.hidden=!1:this.button.hidden=!0}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Vote",["require","exports","tslib","./Poll","../../Ajax"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,i=n.__importStar(i);class r{pollManager;button;inputs;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".votePollButton");if(!t)throw new Error(`Could not find vote button for poll "${this.pollManager.pollId}".`);this.button=t,this.button.addEventListener("click",(()=>this.submit())),this.initSelects()}initSelects(){if(this.pollManager.hasView(o.PollViews.vote)){const e=this.pollManager.getView(o.PollViews.vote);this.inputs=Array.from(e.querySelectorAll("input")),this.inputs.forEach((e=>{e.addEventListener("change",(()=>this.checkInputs()))})),this.checkInputs()}}checkInputs(){let e=0;this.inputs.forEach((t=>{t.checked&&e++,this.pollManager.maxVotes>1&&(t.disabled=!1)})),0===e?this.button.disabled=!0:(e>=this.pollManager.maxVotes&&this.pollManager.maxVotes>1&&this.inputs.forEach((e=>{e.checked||(e.disabled=!0)})),this.button.disabled=!1)}getSelectedOptions(){return this.inputs.filter((e=>e.checked)).map((e=>parseInt(e.value,10)))}async submit(){this.button.disabled=!0;const e=this.getSelectedOptions(),t=i.dboAction("vote","wcf\\data\\poll\\PollAction");t.objectIds([this.pollManager.pollId]),t.payload({optionIDs:e});const n=await t.dispatch();this.pollManager.canVote=!!n.changeableVote,this.pollManager.canViewResults=!0,this.pollManager.addView(o.PollViews.results,n.template),this.pollManager.displayView(o.PollViews.results),this.pollManager.changeTotalVotes(n.totalVotes,n.totalVotesTooltip),this.button.disabled=!1}checkVisibility(e){this.button.hidden=e!==o.PollViews.vote}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Poll",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../StringUtil","./View/Participants","./View/Results","./View/Vote","./Vote"],(function(e,t,n,o,i,r,a,s,l,c){"use strict";function d(){document.querySelectorAll(".pollContainer").forEach((e=>{if(!e.dataset.pollId)throw new Error("Invalid poll element given. Missing pollID.");if(h.has(e))return;const t=parseInt(e.dataset.pollId,10);new m(t),h.add(e)}))}function u(){o.default.add("WoltLabSuite/Core/Ui/Poll/Manager/Poll",(()=>{d()})),d()}var p;Object.defineProperty(t,"__esModule",{value:!0}),t.setupAll=t.Poll=t.PollViews=void 0,o=n.__importDefault(o),i=n.__importDefault(i),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l),c=n.__importDefault(c),function(e){e.vote="vote",e.results="results"}(p||(t.PollViews=p={}));class m{pollId;element;voteView=void 0;resultsView=void 0;participants=void 0;voteHandler=void 0;views=new Map;constructor(e){const t=document.getElementById(`poll${e}`);if(null===t)throw new Error(`Could not find poll with id "${e}".`);this.element=t,this.pollId=e,this.getInnerContainer().querySelectorAll("div").forEach((e=>{e.dataset.key&&this.views.set(e.dataset.key,e)}));const n=this.element.querySelector(".showResultsButton");this.canViewResults&&null!==n&&(this.resultsView=new s.default(this,n)),this.canVote&&(this.voteView=new l.default(this),this.voteHandler=new c.default(this)),this.canViewParticipants()&&(this.participants=new a.default(this))}getElement(){return this.element}hasView(e){return this.views.has(e)}getView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);return this.views.get(e)}displayView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);this.views.forEach((e=>{e.hidden=!0})),this.views.get(e).hidden=!1,this.voteView?.checkVisibility(e),this.resultsView?.checkVisibility(e),this.voteHandler?.checkVisibility(e),this.canViewParticipants()&&(e===p.results?(this.participants||(this.participants=new a.default(this)),this.participants.showButton()):this.participants?.hideButton())}addView(e,t){const n=document.createElement("div");n.dataset.key=e,n.hidden=!0,i.default.setInnerHtml(n,t),this.getInnerContainer().append(n),this.views.has(e)&&this.views.get(e).remove(),this.views.set(e,n),e===p.vote&&this.voteHandler.initSelects()}canViewParticipants(){return this.canViewResults&&this.isPublic}getInnerContainer(){const e=this.element.querySelector(".pollInnerContainer");if(!e)throw new Error(`Could not find inner container for poll "${this.pollId}"`);return e}changeTotalVotes(e,t){const n=this.getElement().querySelector(".pollTotalVotesBadge");if(!n)throw new Error("Could not find total votes badge.");n.textContent=(0,r.formatNumeric)(e),n.dataset.tooltip=t}get isPublic(){return"true"===this.element.dataset.isPublic}get maxVotes(){return parseInt(this.element.dataset.maxVotes,10)}get question(){return this.element.dataset.question}get canVote(){return"true"===this.element.dataset.canVote}set canVote(e){this.element.dataset.canVote=e?"true":"false"}get canViewResults(){return"true"===this.element.dataset.canViewResult}set canViewResults(e){this.element.dataset.canViewResult=e?"true":"false"}}t.Poll=m;const h=new WeakSet;t.setupAll=u,t.default=u})),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../StringUtil","../Dialog"],(function(e,t,n,o,i,r,a,s,l,c){"use strict";o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importDefault(c);const d=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new Map;_currentObjectId=0;_objects=new Map;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=i.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},t),this.initContainers(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/CountButtons-${e}`,(()=>this.initContainers()))}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const n=a.default.identify(t);if(this._containers.has(n))return;const o=~~t.dataset.objectId,i={reactButton:null,summary:null,objectId:o,element:t};this._containers.set(n,i),this._initReactionCountButtons(t,i);const r=this._objects.get(o)||[];r.push(i),this._objects.set(o,r),e=!0})),e&&r.default.trigger()}updateCountButtons(e,t){let n=!1;this._objects.get(e).forEach((e=>{let o;if(o=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.element.querySelector(this._options.summaryListSelector),null===o)return;const i=new Map(Object.entries(t)),r=new Map;o.querySelectorAll(".reactCountButton").forEach((e=>{const t=e.dataset.reactionTypeId;i.has(t)?r.set(t,e):e.remove()})),i.forEach(((e,t)=>{if(r.has(t))r.get(t).querySelector(".reactionCount").innerHTML=l.shortUnit(e);else if(d.has(t)){const i=document.createElement("span");i.className="reactCountButton",i.innerHTML=d.get(t).renderedIcon,i.dataset.reactionTypeId=t;const r=document.createElement("span");r.className="reactionCount",r.innerHTML=l.shortUnit(e),i.appendChild(r),o.appendChild(i),n=!0}})),o.childElementCount>0?a.default.show(o):a.default.hide(o)})),n&&r.default.trigger()}_initReactionCountButtons(e,t){let n;n=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.querySelector(this._options.summaryListSelector),null!==n&&n.addEventListener("click",(e=>this._showReactionOverlay(t.objectId,e)))}_showReactionOverlay(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()}_showOverlay(){this._options.parameters.data.containerID=`${this._objectType}-${this._currentObjectId}`,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,o.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){s.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),c.default.open(this,e.returnValues.template),c.default.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)}_ajaxSetup(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}}_dialogSetup(){return{id:`userReactionOverlay-${this._objectType}`,options:{title:""},source:null}}}})),define("WoltLabSuite/Core/Ui/Reaction/SummaryDetails",["require","exports","../../Ajax","../../Component/Dialog","../../Helper/Selector"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,i.wheneverFirstSeen)("woltlab-core-reaction-summary",(e=>{e.addEventListener("showDetails",(()=>{!async function(e,t){const i=await(0,n.dboAction)("getReactionDetails","wcf\\data\\reaction\\ReactionAction").payload({data:{objectID:e,objectType:t}}).dispatch();(0,o.dialogFactory)().fromHtml(i.template).withoutControls().show(i.title)}(e.objectId,e.objectType)}))}))}})),define("WoltLabSuite/Core/Ui/Search/Page",["require","exports","tslib","../../Core","../../Dom/Util","../Dropdown/Simple","../Screen","./Input"],(function(e,t,n,o,i,r,a,s){"use strict";function l(e){e.preventDefault();const t=e.currentTarget,n=t.dataset.objectType,i=t.dataset.extendedLink;i&&(document.querySelector(".pageHeaderSearchExtendedLink").href=i),d.clear();try{const e=JSON.parse(t.dataset.parameters||"");o.isPlainObject(e)&&Object.keys(e).forEach((t=>{d.set(t,e[t])}))}catch(e){}n&&"everywhere"!==n&&d.set("type",n),document.getElementById("pageHeaderSearchInputContainer").querySelector(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").textContent=t.textContent}function c(e,t){const n=new URL(e.action);n.search+=""!==n.search?"&":"?",n.search+=new URLSearchParams([["q",t.value.trim()],...Array.from(d)]).toString(),window.location.href=n.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importDefault(s);const d=new Map;t.init=function(e){const t=document.getElementById("pageHeaderSearchInput"),n=t.form;new s.default(t,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit(e){if(e.classList.add("dropdownMenuPageSearch"),a.is("screen-lg")){e.dataset.dropdownAlignmentHorizontal="right";const n=t.clientWidth;e.style.setProperty("min-width",`${n}px`,"");const o=t.parentElement,r=i.default.offset(o).left+o.clientWidth-(i.default.offset(t).left+n),a=i.default.styleAsInt(window.getComputedStyle(o),"padding-bottom");e.style.setProperty("transform",`translateX(-${Math.ceil(r)}px) translateY(-${a}px)`,"")}},callbackSelect:()=>(setTimeout((()=>{c(n,t)}),1),!0),suppressErrors:!0});const o=document.querySelector(".pageHeaderSearchType"),d=r.default.getDropdownMenu(i.default.identify(o));d.querySelectorAll("a[data-object-type]").forEach((e=>{e.addEventListener("click",l)})),d.querySelector('a[data-object-type="'+e+'"]').click(),n.addEventListener("submit",(e=>{e.preventDefault(),c(n,t)}))}})),define("WoltLabSuite/Core/Ui/Toggle/Input",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,o){"use strict";return o=n.__importDefault(o),class{element;hide;show;constructor(e,t){const n=document.querySelector(e);if(null===n)throw new Error("Unable to find element by selector '"+e+"'.");const o="INPUT"===n.nodeName?n.type:"";if("checkbox"!==o&&"radio"!==o)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this.element=n,this.hide=this.getElements("hide",Array.isArray(t.hide)?t.hide:[]),this.show=this.getElements("show",Array.isArray(t.show)?t.show:[]),this.element.addEventListener("change",(e=>this.change(e))),this.updateVisibility(this.show,this.element.checked),this.updateVisibility(this.hide,!this.element.checked)}getElements(e,t){const n=[];return t.forEach((t=>{let o=null;if("string"==typeof t){if(o=document.querySelector(t),null===o)throw new Error(`Unable to find an element with the selector '${t}'.`)}else{if(!(t instanceof HTMLElement))throw new TypeError(`The array '${e}' may only contain string selectors or DOM elements.`);o=t}n.push(o)})),n}change(e){const t=e.currentTarget.checked;this.updateVisibility(this.show,t),this.updateVisibility(this.hide,!t)}updateVisibility(e,t){e.forEach((e=>{o.default[t?"show":"hide"](e)}))}}})),define("WoltLabSuite/Core/Ui/User/List",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dialog","../Pagination"],(function(e,t,n,o,i,r,a,s){"use strict";return o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importDefault(s),class{cache=new Map;options;pageCount=0;pageNo=1;constructor(e){this.options=i.extend({className:"",dialogTitle:"",parameters:{}},e)}open(){this.pageNo=1,this.showPage()}showPage(e){if("number"==typeof e&&(this.pageNo=+e),0!==this.pageCount&&(this.pageNo<1||this.pageNo>this.pageCount))throw new RangeError(`pageNo must be between 1 and ${this.pageCount} (${this.pageNo} given).`);if(this.cache.has(this.pageNo)){const e=a.default.open(this,this.cache.get(this.pageNo));if(this.pageCount>1){const t=e.content.querySelector(".jsPagination");null!==t&&new s.default(t,{activePage:this.pageNo,maxPage:this.pageCount,callbackSwitch:this.showPage.bind(this)});const n=e.content.parentElement;n.scrollTop>0&&(n.scrollTop=0)}}else this.options.parameters.pageNo=this.pageNo,o.api(this,{parameters:this.options.parameters})}_ajaxSuccess(e){void 0!==e.returnValues.pageCount&&(this.pageCount=~~e.returnValues.pageCount),this.cache.set(this.pageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserList",className:this.options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}}_dialogSetup(){return{id:r.default.getUniqueId(),options:{title:this.options.dialogTitle},source:null}}}})),define("WoltLabSuite/Core/Ui/User/ObjectWatch",["require","exports","tslib","../../Ajax","../Notification","../../Language","../../Event/Handler"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a);const s=new Map;t.setup=function(){document.querySelectorAll(".userObjectWatchDropdown").forEach((e=>{if(!e.dataset.objectId)throw new Error("Missing objectId for '.userObjectWatchDropdown' element.");const t=parseInt(e.dataset.objectId,10);s.has(t)||s.set(t,new Set),s.get(t).add(e),e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{if(!e.dataset.subscribe)throw new Error("Missing 'data-subscribe' attribute for '.userObjectWatchSelect' element.");e.addEventListener("click",(t=>{t.preventDefault(),async function(e){const t=e.closest(".userObjectWatchDropdown"),n=parseInt(e.dataset.subscribe,10),l=parseInt(t.dataset.objectId,10),c=t.dataset.objectType;await o.dboAction("saveSubscription","wcf\\data\\user\\object\\watch\\UserObjectWatchAction").payload({enableNotification:1,objectID:l,objectType:c,subscribe:n}).dispatch(),s.has(l)&&s.get(l).forEach((e=>{e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{parseInt(e.dataset.subscribe,10)===n?e.classList.add("active"):e.classList.remove("active")}))})),document.querySelectorAll(`.userObjectWatchDropdownToggle[data-object-type="${c}"][data-object-id="${l}"]`).forEach((e=>{const t=e.querySelector("fa-icon"),o=e.querySelector("span:not(.icon)");n?(e.classList.add("active"),t.setIcon("bookmark",!0),o.textContent=r.get("wcf.user.objectWatch.button.subscribed")):(e.classList.remove("active"),t.setIcon("bookmark"),o.textContent=r.get("wcf.user.objectWatch.button.subscribe")),e.dataset.isSubscribed=n.toString()})),a.fire("com.woltlab.wcf.objectWatch","updatedSubscription"),i.show()}(e)}))}))}))}})),define("WoltLabSuite/Core/Component/Comment/Response/woltlab-core-comment-response",["require","exports","tslib","../../../Ajax","../../../Dom/Util","../../../Ui/Dropdown/Simple","../../../Ui/Notification","../../Confirmation","../../../Event/Handler","../../../Ui/Scroll","../../../Language","../../Ckeditor"],(function(e,t,n,o,i,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentResponseElement=void 0,i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importStar(a),l=n.__importStar(l),c=n.__importStar(c);class p extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".commentResponse__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#Pe()}));const t=this.menu.querySelector(".commentResponse__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#je()}));const n=this.menu.querySelector(".commentResponse__option--edit");n?.addEventListener("click",(e=>{e.preventDefault(),this.#Oe()}))}}async#Pe(){await(0,o.dboAction)("enable","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).dispatch(),this.querySelector(".commentResponse__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".commentResponse__option--enable").hidden=!0)}async#je(){await(0,s.confirmationFactory)().delete()&&(await(0,o.dboAction)("delete","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).dispatch(),a.show(),this.dispatchEvent(new CustomEvent("delete")))}async#Oe(){this.menu.querySelector(".commentResponse__option--edit").hidden=!0;const{template:e}=await(0,o.dboAction)("beginEdit","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).dispatch();this.#qe(e)}#qe(e){this.querySelector(".htmlContent").hidden=!0,i.default.insertHtml(e,this.#Y,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#Be()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#Ne()})),l.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#Ue}`,(e=>{e.cancel=!0,this.#Be()})),window.setTimeout((()=>{c.element(this)}),250)}async#Be(){const e={data:{message:(0,u.getCkeditorById)(this.#Ue).getHtml()}};if(!this.#Fe(e))return;let t;l.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#Ue}`,e),this.#r();try{t=await(0,o.dboAction)("save","wcf\\data\\comment\\response\\CommentResponseAction").objectIds([this.responseId]).payload(e).dispatch()}catch(e){return await(0,o.handleValidationErrors)(e,(({errorType:e})=>(i.default.innerError(document.getElementById(this.#Ue),e),!0))),void this.#He()}i.default.setInnerHtml(this.querySelector(".htmlContent"),t.message),this.#He(),this.#Ne(),a.show()}#r(){let e=this.querySelector(".commentResponse__loading");e||(e=document.createElement("div"),e.classList.add("commentResponse__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".commentResponse__message").append(e)),this.#Y.hidden=!0,e.hidden=!1}#He(){this.#Y.hidden=!1;const e=this.querySelector(".commentResponse__loading");e&&(e.hidden=!0)}#Fe(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,u.getCkeditorById)(this.#Ue);if(""===t.getHtml())return i.default.innerError(t.element,(0,d.getPhrase)("wcf.global.form.error.empty")),!1;const n={api:this,parameters:e,valid:!0};return l.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#Ue}`,n),n.valid}#Ne(){(0,u.getCkeditorById)(this.#Ue).destroy(),this.#Y.remove(),this.menu.querySelector(".commentResponse__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#Y(){let e=this.querySelector(".commentResponse__editor");return e||(e=document.createElement("div"),e.classList.add("commentResponse__editor"),this.querySelector(".commentResponse__message").append(e)),e}get responseId(){return parseInt(this.getAttribute("response-id"))}get menu(){let e=r.default.getDropdownMenu(`commentResponseOptions${this.responseId}`);return void 0===e&&(e=this.querySelector(".commentResponse__menu .dropdownMenu")||void 0),e}get#Ue(){return`commentResponseEditor${this.responseId}`}}t.WoltlabCoreCommentResponseElement=p,window.customElements.define("woltlab-core-comment-response",p),t.default=p})),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["require","exports","tslib","../../../Ui/Dropdown/Simple","../../../Event/Handler"],(function(e,t,n,o,i){"use strict";return o=n.__importDefault(o),i=n.__importStar(i),class{_formId;_suffixField;_suffixDropdownMenu;_suffixDropdownToggle;constructor(e,t){this._formId=e,this._suffixField=document.getElementById(t),this._suffixDropdownMenu=o.default.getDropdownMenu(t+"_dropdown"),this._suffixDropdownToggle=o.default.getDropdown(t+"_dropdown").getElementsByClassName("dropdownToggle")[0],Array.from(this._suffixDropdownMenu.children).forEach((e=>{e.addEventListener("click",(e=>this._changeSuffixSelection(e)))})),i.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",(e=>this._destroyDropdown(e)))}_changeSuffixSelection(e){const t=e.currentTarget;t.classList.contains("disabled")||(Array.from(this._suffixDropdownMenu.children).forEach((e=>{e===t?e.classList.add("active"):e.classList.remove("active")})),this._suffixField.value=t.dataset.value,this._suffixDropdownToggle.innerHTML=t.dataset.label+' <fa-icon name="caret-down" solid></fa-icon>')}_destroyDropdown(e){e.formId===this._formId&&o.default.destroy(this._suffixDropdownMenu.id)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["require","exports","tslib","./Field"],(function(e,t,n,o){"use strict";o=n.__importDefault(o);class i extends o.default{_aclList;_getData(){return{[this._fieldId]:this._aclList.getData()}}_readField(){}setAclList(e){return this._aclList=e,this}}return i})),define("WoltLabSuite/Core/Form/Builder/Field/Button",["require","exports","tslib","./Field"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0,o=n.__importDefault(o);class i extends o.default{_getData(){const e={};return"1"===this._field.dataset.isClicked&&(e[this._fieldId]=this._field.value),e}}t.Button=i,t.default=i})),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["require","exports","tslib","./Field","../../../Controller/Captcha"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importDefault(i);class r extends o.default{_getData(){return i.default.has(this._fieldId)?i.default.getData(this._fieldId):{}}_readField(){}destroy(){i.default.has(this._fieldId)&&i.default.delete(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o);class r extends o.default{_fields;constructor(e){super(e),this._fields=Array.from(document.querySelectorAll(`input[name="${(0,i.escapeAttributeSelector)(this._fieldId)}[]"]`))}_getData(){const e=this._fields.map((e=>e.checked?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["require","exports","tslib","./Field"],(function(e,t,n,o){"use strict";o=n.__importDefault(o);class i extends o.default{_getData(){return{[this._fieldId]:this._field.checked?"1":"0"}}}return i})),define("WoltLabSuite/Core/Form/Builder/Field/CheckedVoid",["require","exports","tslib","./Field"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckedVoid=void 0,o=n.__importDefault(o);class i extends o.default{_getData(){return this._field.checked?{[this._fieldId]:1}:{}}}t.CheckedVoid=i,t.default=i})),define("WoltLabSuite/Core/Form/Builder/Field/Ckeditor",["require","exports","tslib","./Field","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Ckeditor"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ckeditor=void 0,o=n.__importDefault(o);class a extends o.default{_getData(){const e=(0,r.getCkeditorById)(this._fieldId);return{[this._fieldId]:e.getHtml()}}destroy(){(0,i.dispatchToCkeditor)(this._field).destroy()}}t.Ckeditor=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Date",["require","exports","tslib","./Field","../../../Date/Picker"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importDefault(i);class r extends o.default{_getData(){return{[this._fieldId]:i.default.getValue(this._field)}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["require","exports","tslib","./Field","../../../Ui/ItemList/Static"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{_getData(){const e=[];return i.getValues(this._fieldId).forEach((t=>{t.objectId?e[t.objectId]=t.value:e.push(t.value)})),{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText",["require","exports","tslib","../Confirmation","../../Language","../../Dom/Util"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiItemListLineBreakSeparatedText=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r);class a{addButton=void 0;clearButton=void 0;itemInput=void 0;itemList;items=new Set;mutationObserver;options;submitField=void 0;uiDisabled=!1;constructor(e,t={}){if(this.itemList=e,this.options=t,!this.options.submitFieldName){const e=this.itemList.nextElementSibling;if(!(e instanceof HTMLInputElement&&"hidden"===e.type))throw new Error("Missing `submitFieldName` option");this.submitField=e}this.itemList.closest("form").addEventListener("submit",(()=>this.submit())),this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{"readonly"===e.attributeName&&(e.target.readOnly?this.disableUi():this.enableUi())}))})),this.initValues(),this.buildUi()}addItem(e){if(e.preventDefault(),this.uiDisabled)return;const t=this.itemInput,n=t.value.trim();""===n?r.default.innerError(t.parentElement,i.get("wcf.global.form.error.empty")):this.items.has(n)?r.default.innerError(t.parentElement,i.get("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:n}),!0):(this.insertItem(n),this.resetInput()),t.focus()}buildUi(){const e=document.createElement("div");e.classList.add("itemListFilter"),this.itemList.insertAdjacentElement("beforebegin",e),e.appendChild(this.itemList);const t=document.createElement("div");t.classList.add("inputAddon"),e.appendChild(t),this.itemInput=document.createElement("input"),this.itemInput.classList.add("long"),this.itemInput.type="text",this.itemInput.placeholder=i.get("wcf.acp.option.type.lineBreakSeparatedText.placeholder"),this.itemInput.addEventListener("keydown",(e=>this.keydown(e))),this.itemInput.addEventListener("paste",(e=>this.paste(e))),t.appendChild(this.itemInput),this.mutationObserver.observe(this.itemInput,{attributes:!0}),this.addButton=document.createElement("a"),this.addButton.href="#",this.addButton.classList.add("button","inputSuffix","jsTooltip"),this.addButton.title=i.get("wcf.global.button.add"),this.addButton.innerHTML='<fa-icon name="plus" solid></fa-icon>',this.addButton.addEventListener("click",(e=>this.addItem(e))),t.appendChild(this.addButton),this.clearButton=document.createElement("a"),this.clearButton.href="#",this.clearButton.classList.add("button","inputSuffix","jsTooltip"),this.clearButton.title=i.get("wcf.global.button.delete"),this.clearButton.innerHTML='<fa-icon name="times" solid></fa-icon>',this.clearButton.addEventListener("click",(e=>this.clearList(e))),t.appendChild(this.clearButton),0===this.items.size&&r.default.hide(this.clearButton)}clearList(e){e.preventDefault(),this.uiDisabled||o.show({confirm:()=>{this.itemList.innerHTML="",this.items.clear(),this.hideList()},message:i.get("wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage"),messageIsHtml:!0})}deleteItem(e){if(this.uiDisabled)return;const t=e.currentTarget,n=t.closest("li").dataset.value;o.show({confirm:()=>{t.closest("li").remove(),0===this.itemList.childElementCount&&this.hideList(),this.items.delete(n)},message:i.get("wcf.button.delete.confirmMessage",{objectTitle:n}),messageIsHtml:!0})}disableUi(){this.addButton.classList.add("disabled"),this.clearButton.classList.add("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.add("disabled"))),this.uiDisabled=!0}enableUi(){this.addButton.classList.remove("disabled"),this.clearButton.classList.remove("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.remove("disabled"))),this.uiDisabled=!1}hideList(){r.default.hide(this.itemList),r.default.hide(this.clearButton)}initValues(){Array.from(this.itemList.children).forEach((e=>{this.items.add(e.dataset.value),e.querySelector(".jsDeleteItem").addEventListener("click",(e=>this.deleteItem(e)))}))}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const n=document.createElement("span");n.innerHTML='<fa-icon name="xmark" solid></fa-icon>',n.classList.add("jsDeleteItem","jsTooltip","pointer"),n.title=i.get("wcf.global.button.delete"),n.addEventListener("click",(e=>this.deleteItem(e))),t.append(n),t.append(document.createTextNode(" "));const o=document.createElement("span");o.innerText=e,t.append(o);const r=Array.from(this.itemList.children).find((t=>t.dataset.value>e));r?this.itemList.insertBefore(t,r):this.itemList.append(t),this.showList()}keydown(e){"Enter"===e.key&&this.addItem(e)}paste(e){if(this.uiDisabled)return;const t=e.clipboardData.getData("text/plain").split("\n");t.length>1&&(e.preventDefault(),t.forEach((e=>{""===(e=e.trim())||this.items.has(e)||this.insertItem(e)})),this.resetInput())}resetInput(){r.default.innerError(this.itemInput.parentElement,""),this.itemInput.value=""}showList(){r.default.show(this.itemList),r.default.show(this.clearButton)}submit(){const e=Array.from(this.items).join("\n");if(this.submitField)this.submitField.value=e;else{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}}}t.UiItemListLineBreakSeparatedText=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.MultilineItemListFormField=void 0,o=n.__importStar(o),r=n.__importDefault(r);const a=new Map;class s extends o.UiItemListLineBreakSeparatedText{constructor(e,t){super(e,t),null!=t.submitFieldName?a.set(t.submitFieldName,this):a.set(this.submitField.id,this)}getItems(){return this.items}initValues(){super.initValues(),Array.from(this.itemList.children).forEach((e=>{e.querySelector(".jsEditItem").addEventListener("click",(e=>{this.editItem(e)}))}))}editItem(e){if(this.uiDisabled)return;const t=e.currentTarget,n=t.closest("li"),o=n.querySelector(".jsDeleteItem"),a=n.querySelector("span"),s=t.closest("li").dataset.value;r.default.hide(o),r.default.hide(t),r.default.hide(a);const l=document.createElement("input");l.type="text",l.value=s;const c=document.createElement("button");c.classList.add("jsSaveItem","jsTooltip"),c.title=(0,i.getPhrase)("wcf.global.button.save");let d=document.createElement("fa-icon");d.setIcon("save"),c.append(d);const u=document.createElement("button");u.classList.add("jsCancelItem","jsTooltip"),u.title=(0,i.getPhrase)("wcf.global.button.cancel"),d=document.createElement("fa-icon"),d.setIcon("times"),u.append(d);const p=()=>{l.remove(),c.remove(),u.remove(),r.default.show(o),r.default.show(t),r.default.show(a)},m=e=>{if(e.preventDefault(),this.uiDisabled)return;const n=l.value.trim();""===n?r.default.innerError(l.parentElement,(0,i.getPhrase)("wcf.global.form.error.empty")):this.items.has(n)&&n!==s?r.default.innerError(l.parentElement,(0,i.getPhrase)("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:n}),!0):(r.default.innerError(l.parentElement,""),t.closest("li").dataset.value=n,a.textContent=n,this.items.delete(s),this.items.add(n),p()),l.focus()};l.addEventListener("keydown",(e=>{"Enter"===e.key?m(e):"Escape"===e.key&&p()})),c.addEventListener("click",(e=>{m(e)})),u.addEventListener("click",(()=>{p()})),n.append(c,u,l),l.focus()}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const n=document.createElement("button");n.type="button",n.classList.add("jsDeleteItem","jsTooltip"),n.title=(0,i.getPhrase)("wcf.global.button.delete"),n.addEventListener("click",(e=>{this.deleteItem(e)}));let o=document.createElement("fa-icon");o.setIcon("trash"),n.append(o);const r=document.createElement("button");r.type="button",r.classList.add("jsEditItem","jsTooltip"),r.title=(0,i.getPhrase)("wcf.global.button.edit"),r.addEventListener("click",(e=>{this.editItem(e)})),o=document.createElement("fa-icon"),o.setIcon("pencil"),r.append(o);const a=document.createElement("span");a.innerText=e,t.append(r,n," ",a);const s=Array.from(this.itemList.children).find((t=>t.dataset.value>e));s?this.itemList.insertBefore(t,s):this.itemList.append(t),this.showList()}submit(){this.submitField?this.submitField.value=Array.from(this.items).join("\n"):Array.from(this.items).forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}))}}t.MultilineItemListFormField=s,t.getValues=function(e){if(!a.has(e))throw new Error(`Element id '${e}' is unknown.`);return a.get(e).getItems()}})),define("WoltLabSuite/Core/Form/Builder/Field/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","./Controller/MultilineItemList"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultilineItemList=void 0,o=n.__importDefault(o);class r extends o.default{_getData(){return{[this._fieldId]:(0,i.getValues)(this._fieldId)}}}t.MultilineItemList=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o);class r extends o.default{_fields;constructor(e){super(e),this._fields=Array.from(document.querySelectorAll(`input[name="${(0,i.escapeAttributeSelector)(this._fieldId)}"]`))}_getData(){const e={};return this._fields.some((t=>!!t.checked&&(e[this._fieldId]=t.value,!0))),e}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o);class r extends o.default{_getData(){const e=Array.from(document.querySelectorAll(`input[name="${(0,i.escapeAttributeSelector)(this._fieldId)}[group][]"]`)).map((e=>e.value)),t=Array.from(document.querySelectorAll(`input[name="${(0,i.escapeAttributeSelector)(this._fieldId)}[user][]"]`)).map((e=>e.value));return{[this._fieldId]:{group:e,user:t}}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{_getData(){const e=i.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/User",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{_getData(){const e=i.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e.join(",")}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Value",["require","exports","tslib","./Field"],(function(e,t,n,o){"use strict";o=n.__importDefault(o);class i extends o.default{_getData(){return{[this._fieldId]:this._field.value}}}return i})),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["require","exports","tslib","./Field","../../../Language/Input"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{_getData(){const e={},t=i.getValues(this._fieldId);return t.size>1?(Object.prototype.hasOwnProperty.call(e,this._fieldId+"_i18n")||(e[this._fieldId+"_i18n"]={}),t.forEach(((t,n)=>{e[this._fieldId+"_i18n"][n]=t}))):e[this._fieldId]=t.get(0),e}destroy(){i.unregister(this._fieldId)}}return r})),define("WoltLabSuite/Core/Ui/Object/Action/Toogle",["require","exports","./Toggle"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return n.setup}})})),define("WoltLabSuite/Core/Ui/User/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,n,o,i){"use strict";o=n.__importStar(o),i=n.__importDefault(i);class r extends i.default{constructor(e,t){const n=o.isPlainObject(t)&&!0===t.includeUserGroups;super(e,t=o.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:n?1:0}}}},t))}createListItem(e){const t=super.createListItem(e);t.dataset.type=e.type;const n=document.createElement("div");return n.className="box16",n.innerHTML="group"===e.type?'<fa-icon name="users" solid></fa-icon>':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["require","exports","tslib","../../../../Core","../../../../Dom/Util","../../../../Language","../../../../Ui/Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";return o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),class{_formFieldContainer;_input;_labelChooser;_options;constructor(e,t,n){this._formFieldContainer=document.getElementById(e+"Container"),this._labelChooser=this._formFieldContainer.getElementsByClassName("labelChooser")[0],this._options=o.extend({forceSelection:!1,showWithoutSelection:!1},n),this._input=document.createElement("input"),this._input.type="hidden",this._input.id=e,this._input.name=e,this._input.value=t,this._formFieldContainer.appendChild(this._input);const s=i.identify(this._labelChooser);let l=a.default.getDropdownMenu(s);null===l&&(a.default.init(this._labelChooser.getElementsByClassName("dropdownToggle")[0]),l=a.default.getDropdownMenu(s));let c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=document.createElement("ul"),l.appendChild(c);const e=document.createElement("li");e.classList.add("dropdownDivider"),c.appendChild(e)}if(this._options.showWithoutSelection){const e=document.createElement("li");e.dataset.labelId="-1",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const n=document.createElement("span");n.classList.add("badge","label"),n.innerHTML=r.get("wcf.label.withoutSelection"),t.appendChild(n)}if(!this._options.forceSelection){const e=document.createElement("li");e.dataset.labelId="0",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const n=document.createElement("span");n.classList.add("badge","label"),n.innerHTML=r.get("wcf.label.none"),t.appendChild(n)}l.querySelectorAll("li:not(.dropdownDivider)").forEach((e=>{e.addEventListener("click",(e=>this._click(e))),t&&e.dataset.labelId===t&&this._selectLabel(e)}))}_blockScroll(e){e.addEventListener("wheel",(e=>e.preventDefault()),{passive:!1})}_click(e){e.preventDefault(),this._selectLabel(e.currentTarget)}_selectLabel(e){let t=e.dataset.labelId;t||(t="0");const n=e.querySelector("span > span"),o=this._labelChooser.querySelector(".dropdownToggle > span");o.className=n.className,o.textContent=n.textContent,this._input.value=t}}})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["require","exports","tslib","../../../../Environment"],(function(e,t,n,o){"use strict";return o=n.__importStar(o),class{_field;_input;_ratingElements;constructor(e,t){if(this._field=document.getElementById(e+"Container"),null===this._field)throw new Error("Unknown field with id '"+e+"'");this._input=document.createElement("input"),this._input.id=e,this._input.name=e,this._input.type="hidden",this._input.value=t,this._field.appendChild(this._input),this._ratingElements=new Map;const n=this._field.querySelector(".ratingList");n.addEventListener("mouseleave",(()=>this._restoreRating())),n.querySelectorAll("li").forEach((e=>{e.classList.contains("ratingMetaButton")?(e.addEventListener("click",(e=>this._metaButtonClick(e))),e.addEventListener("mouseenter",(()=>this._restoreRating()))):(this._ratingElements.set(e.dataset.rating,e),e.addEventListener("click",(e=>this._listItemClick(e))),e.addEventListener("mouseenter",(e=>this._listItemMouseEnter(e))),e.addEventListener("mouseleave",(()=>this._listItemMouseLeave())))}))}_listItemClick(e){const t=e.currentTarget;this._input.value=t.dataset.rating,"desktop"!==o.platform()&&this._restoreRating()}_listItemMouseEnter(e){const t=e.currentTarget.dataset.rating;this._ratingElements.forEach(((e,n)=>{const o=e.querySelector("fa-icon");this._toggleIcon(o,~~n<=~~t)}))}_listItemMouseLeave(){this._ratingElements.forEach((e=>{const t=e.querySelector("fa-icon");this._toggleIcon(t,!1)}))}_metaButtonClick(e){"removeRating"===e.currentTarget.dataset.action&&(this._input.value="",this._listItemMouseLeave())}_restoreRating(){this._ratingElements.forEach(((e,t)=>{const n=e.querySelector("fa-icon");this._toggleIcon(n,~~t<=~~this._input.value)}))}_toggleIcon(e,t=!1){t?e.setIcon("star",!0):e.setIcon("star")}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","./Manager"],(function(e,t,n,o,i){"use strict";return i=n.__importStar(i),class{_dependentElement;_field;_fields;_noField;constructor(e,t){this.init(e,t)}checkDependency(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")}getDependentNode(){return this._dependentElement}getField(){return this._field}getFields(){return this._fields}init(e,t){if(this._dependentElement=document.getElementById(e),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+e+"Container'.");if(this._field=document.getElementById(t),null===this._field){if(this._fields=[],document.querySelectorAll(`input[type=radio][name="${(0,o.escapeAttributeSelector)(t)}"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length&&(document.querySelectorAll(`input[type=checkbox][name="${(0,o.escapeAttributeSelector)(t)}[]"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length))throw new Error("Unknown field with id '"+t+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.nodeName&&"radio"===this._field.type&&""!==this._field.dataset.noInputId){if(this._noField=document.getElementById(this._field.dataset.noInputId),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+t+"'");this._fields.push(this._noField)}i.addDependency(this)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["require","exports","tslib","./Abstract"],(function(e,t,n,o){"use strict";o=n.__importDefault(o);class i extends o.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return!e.checked;case"radio":return!(!this._noField||!this._noField.checked)||!e.checked;default:return 0===e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0===this._field.querySelectorAll("option:checked").length:"0"==e.value||0===e.value.length}case"TEXTAREA":return 0===this._field.value.trim().length}return this._fields.every((e=>!e.checked))}}return i})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/IsNotClicked",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsNotClicked=void 0,o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{constructor(e,t){super(e,t),this._field.addEventListener("click",(()=>{this._field.dataset.isClicked="1",i.checkDependencies()}))}checkDependency(){return"1"!==this._field.dataset.isClicked}}t.IsNotClicked=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["require","exports","tslib","./Abstract"],(function(e,t,n,o){"use strict";o=n.__importDefault(o);class i extends o.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return e.checked;case"radio":return(!this._noField||!this._noField.checked)&&e.checked;default:return 0!==e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0!==e.querySelectorAll("option:checked").length:"0"!=e.value&&0!==e.value.length}case"TEXTAREA":return 0!==this._field.value.trim().length}return this._fields.some((e=>e.checked))}}return i})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{_isNegated=!1;_values;checkDependency(){if(!this._values)throw new Error("Values have not been set.");const e=[];if(this._field){if(i.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else{let t=!0;if(this._fields.forEach((n=>{if(n.checked){if(i.isHiddenByDependencies(n))return t=!1,!1;e.push(n.value)}})),!t)return!1}let t=!1;return this._values.forEach((n=>{e.forEach((e=>{n==e&&(t=!0)}))})),t?!this._isNegated:this._isNegated}negate(e){return this._isNegated=e,this}values(e){return this._values=e,this}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/ValueInterval",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueInterval=void 0,o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{_maximum=null;_minimum=null;checkDependency(){if(this._field){if(i.isHiddenByDependencies(this._field))return!1;const e=parseFloat(this._field.value);return!(isNaN(e)||null!==this._minimum&&this._minimum>e||null!==this._maximum&&this._maximum<e)}throw new Error("'ValueInterval' is only supported for individual fields.")}maximum(e){return this._maximum=e,this}minimum(e){return this._minimum=e,this}}t.ValueInterval=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["require","exports","tslib","../Value","../../../../Language/Chooser"],(function(e,t,n,o,i){"use strict";o=n.__importDefault(o),i=n.__importStar(i);class r extends o.default{destroy(){i.removeChooser(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["require","exports","tslib","../Value"],(function(e,t,n,o){"use strict";o=n.__importDefault(o);class i extends o.default{constructor(e){super(e+"_tmpHash")}}return i})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Poll",["require","exports","tslib","../Field"],(function(e,t,n,o){"use strict";o=n.__importDefault(o);class i extends o.default{_pollEditor;_getData(){return this._pollEditor.getData()}_readField(){}setPollEditor(e){this._pollEditor=e}}return i})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["require","exports","tslib","../Manager"],(function(e,t,n,o){"use strict";return o=n.__importStar(o),class{_container;constructor(e){this.init(e)}checkContainer(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")}init(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=document.getElementById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");o.addContainerCheckCallback((()=>this.checkContainer()))}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["require","exports","tslib","./Abstract","../../../../../Core","../Manager","../../../../../Dom/Util"],(function(e,t,n,o,i,r,a){"use strict";o=n.__importDefault(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a);class s extends o.default{checkContainer(){if(i.stringToBool(this._container.dataset.ignoreDependencies||""))return;if(r.isHiddenByDependencies(this._container))return;const e=!a.default.isHidden(this._container),t=Array.from(this._container.children).some(((e,t)=>(0!==t||"H2"!==e.tagName&&"HEADER"!==e.tagName)&&!a.default.isHidden(e)));e!==t&&(t?a.default.show(this._container):a.default.hide(this._container),r.checkContainers())}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,n,o,i,r,a){"use strict";o=n.__importDefault(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a);class s extends o.default{checkContainer(){if(i.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=Array.from(this._container.children).some((e=>!r.isHidden(e)));if(e!==t){const e=this._container.parentNode.parentNode.querySelector("#"+r.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]");if(null===e)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)r.show(this._container),r.show(e);else{r.hide(this._container),r.hide(e);const t=a.getTabMenu(r.identify(e.closest(".tabMenuContainer")));t.getActiveTab()===e&&t.selectFirstVisible()}i.checkContainers()}}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,n,o,i,r,a){"use strict";o=n.__importDefault(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a);class s extends o.default{checkContainer(){if(i.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=this._container.parentNode.querySelectorAll("#"+r.identify(this._container)+" > nav > ul > li"),n=Array.from(t).some((e=>!r.isHidden(e)));e!==n&&(n?(r.show(this._container),a.getTabMenu(r.identify(this._container)).selectFirstVisible()):r.hide(this._container),i.checkContainers())}}return s})),function(e){function t(){for(;o.length&&"function"==typeof o[0];)o.shift()()}var n=e.require,o=[],i=0;e.orgRequire=n,e.require=function(r,a,s){if(!Array.isArray(r))return n.apply(e,arguments);var l=new Promise((function(e,a){var s=i++;o.push(s),n(r,(function(){var n=arguments;o[o.indexOf(s)]=function(){e(n)},t()}),(function(e){o[o.indexOf(s)]=function(){a(e)},t()}))}));return a&&(l=l.then((function(t){return a.apply(e,t)}))),s&&l.catch(s),l},e.require.config=n.config}(window),define("require.linearExecution",(function(){}));
-//# sourceMappingURL=../proxy_sourcemap.php?xb-hZQIxqolkRn-83A1MLEpEz-cHVNWZrK8qrme5dGOexyQnaK12qWfkCzu_Iyo2DGesNjeYhjQo0UTCYema-N7Fr-g5prEGbr7LMKOv07coKHvz_oFfKyIWRT0bB1e9Zo4KS1qzSqWfPiedq-L4T7tC-Fmv6MmOpm6KkV3bZ9eF7BlSCcsMPG7SfI5NkFF-WFrJ1OPZmJJ4gvLyzW3ESHVYTMu0rg5DqmnZE_OEF0mlJjzMgn2vdlg15FzxAiXCpECJuFD2en128FW5FNk_vnQO9K_W2DeLVjQAs0Br-xPPsKr2wXIxf7UbatPiVMkND0MrMM0ShSCTZwHI82a0Pg/WCF/10d632a2dcc63c2a4f3bcf98059b0e065a2d920bbff37f4b986ccf2e370b6c15
\ No newline at end of file
+var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__createBinding,__addDisposableResource,__disposeResources,_self,Prism,__setModuleDefault,Reflect;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,i){return t&&eachProp(t,(function(t,o){!n&&hasProp(e,o)||(!i||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,n,i)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,n){var i,o,r,a,s,l,c,d,u,p,m=t&&t.split("/"),h=x.map,f=h&&h["*"];if(e&&(l=(e=e.split("/")).length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),function(e){var t,n,i=e.length;for(t=0;t<i;t++)if("."===(n=e[t]))e.splice(t,1),t-=1;else if(".."===n){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),n&&h&&(m||f)){e:for(r=(o=e.split("/")).length;r>0;r-=1){if(s=o.slice(0,r).join("/"),m)for(a=m.length;a>0;a-=1)if((i=getOwn(h,m.slice(0,a).join("/")))&&(i=getOwn(i,s))){c=i,d=r;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),p=r)}!c&&u&&(c=u,d=p),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(x.pkgs,e)||e}function n(e){var t,n,i,o;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}t-=1,(n=(i=queue.shift())[0])in L||n in k||(n in M?v.apply(undef,i):k[n]=i)}e&&(o=getOwn(x.shim,e)||{},v(e,o.deps||[],o.exportsFn))}function i(e,i){var o=function(t,r,a,s){var l,c;if(i&&n(),"string"==typeof t){if(_[t])return _[t](e);if(!((l=w(t,e,!0).id)in L))throw new Error("Not loaded: "+l);return L[l]}return t&&!Array.isArray(t)&&(c=t,t=undef,Array.isArray(r)&&(t=r,r=a,a=s),i)?o.config(c)(t,r,a):(r=r||function(){return slice.call(arguments,0)},F.then((function(){return n(),v(undef,t||[],r,a,e)})))};return o.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,o.nameToUrl=function(e,t,n){var i,r,a,s,l,c,d=getOwn(x.pkgs,e);if(d&&(e=d),c=getOwn(R,e))return o.nameToUrl(c,t,n);if(urlRegExp.test(e))s=e+(t||"");else{for(i=x.paths,a=(r=e.split("/")).length;a>0;a-=1)if(l=getOwn(i,r.slice(0,a).join("/"))){Array.isArray(l)&&(l=l[0]),r.splice(0,a,l);break}s=r.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||n?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+s}return x.urlArgs&&!/^blob\:/.test(s)?s+x.urlArgs(e,s):s},o.toUrl=function(n){var i,r=n.lastIndexOf("."),a=n.split("/")[0];return-1!==r&&(!("."===a||".."===a)||r>1)&&(i=n.substring(r,n.length),n=n.substring(0,r)),o.nameToUrl(t(n,e),i,!0)},o.defined=function(t){return w(t,e,!0).id in L},o.specified=function(t){return(t=w(t,e,!0).id)in L||t in M},o}function o(e,t,n){e&&(L[e]=n,requirejs.onResourceLoad&&requirejs.onResourceLoad(C,t.map,t.deps)),t.finished=!0,t.resolve(n)}function r(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function a(e){e.factoryCalled=!0;var t,n=e.map.id;try{t=C.execCb(n,e.factory,e.values,L[n])}catch(t){return r(e,t)}n?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=L[n])):I.splice(I.indexOf(e),1),o(n,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||a(this))}function l(e,t){var n={};return n.promise=new Promise((function(t,i){n.resolve=t,n.reject=function(t){e||I.splice(I.indexOf(n),1),i(t)}})),n.map=e?t||w(e):{},n.depCount=0,n.depMax=0,n.values=[],n.depDefined=[],n.depFinished=s,n.map.pr&&(n.deps=[w(n.map.pr)]),n}function c(e,t){var n;return e?(n=e in M&&M[e])||(n=M[e]=l(e,t)):(n=l(),I.push(n)),n}function d(e,t){return function(n){e.rejected||(n.dynaId||(n.dynaId="id"+(O+=1),n.requireModules=[t]),r(e,n))}}function u(e,t,n,i){n.depMax+=1,y(e,t).then((function(e){n.depFinished(e,i)}),d(n,e.id)).catch(d(n,n.map.id))}function p(e,t,a){e.load(t.n,i(a),function(e){function t(t){i||o(e,c(e),t)}var i;return t.error=function(t){r(c(e),t)},t.fromText=function(t,o){var a,s=c(e),l=w(w(e).n),d=l.id;i=!0,s.factory=function(e,t){return t},o&&(t=o),hasProp(x.config,e)&&(x.config[d]=x.config[e]);try{b.exec(t)}catch(e){(a=new Error("fromText eval for "+d+" failed: "+e)).requireType="fromtexteval",r(s,a)}n(d),s.deps=[l],u(l,null,s,s.deps.length)},t}(t.id),x)}function m(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function h(e,t,n){var i=e.map.id;t[i]=!0,!e.finished&&e.deps&&e.deps.forEach((function(i){var o=i.id,r=!hasProp(_,o)&&c(o,i);!r||r.finished||n[o]||(hasProp(t,o)?e.deps.forEach((function(t,n){t.id===o&&e.depFinished(L[o],n)})):h(r,t,n))})),n[i]=!0}function f(e){var t,n,i,o=[],a=1e3*x.waitSeconds,s=a&&j+a<(new Date).getTime();if(0===D&&(e?e.finished||h(e,{},{}):I.length&&I.forEach((function(e){h(e,{},{})}))),s){for(n in M)(i=M[n]).finished||o.push(i.map.id);(t=new Error("Timeout for modules: "+o)).requireModules=o,t.requireType="timeout",o.forEach((function(e){r(c(e),t)}))}else(D||I.length)&&(E||(E=!0,setTimeout((function(){E=!1,f()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&q[e.dynaId]||(q[e.dynaId]=!0,b.onError(e))})),e}var b,v,w,y,_,E,S,C,L=obj(),k=obj(),x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},T=obj(),I=[],M=obj(),A=obj(),P=obj(),D=0,j=(new Date).getTime(),O=0,q=obj(),B=obj(),R=obj(),F=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;B[t]||(B[t]=!0,c(e.id),importScripts(t),n(e.id))}:function(e){var t,i=e.id,o=e.url;B[o]||(B[o]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",i),t.type=x.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,D+=1,t.addEventListener("load",(function(){D-=1,n(i)}),!1),t.addEventListener("error",(function(){var e,n,o;D-=1,(n=getOwn(x.paths,i))&&Array.isArray(n)&&n.length>1?(t.parentNode.removeChild(t),n.shift(),(o=c(i)).map=w(i),o.map.url=b.nameToUrl(i),S(o.map)):((e=new Error("Load failed: "+i+": "+t.src)).requireModules=[i],e.requireType="scripterror",r(c(i),e))}),!1),t.src=o,x.onNodeCreated&&x.onNodeCreated(t,x,i,o),10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},y=function(e,t){var n,i,o=e.id,r=x.shim[o];if(o in k)n=k[o],delete k[o],v.apply(undef,n);else if(!(o in M))if(e.pr){if(!(i=getOwn(R,o)))return y(w(e.pr)).then((function(n){var i=e.prn?e:w(o,t,!0),r=i.id,a=getOwn(x.shim,r);return r in P||(P[r]=!0,a&&a.deps?b(a.deps,(function(){p(n,i,t)})):p(n,i,t)),c(r).promise}));e.url=b.nameToUrl(i),S(e)}else r&&r.deps?b(r.deps,(function(){S(e)})):S(e);return c(o).promise},w=function(e,n,i){if("string"!=typeof e)return e;var o,r,a,s,l,c,d=e+" & "+(n||"")+" & "+!!i;return s=(a=m(e))[0],e=a[1],!s&&d in T?T[d]:(s&&(o=(s=t(s,n,i))in L&&L[s]),s?o&&o.normalize?(e=o.normalize(e,function(e){return function(n){return t(n,e,!0)}}(n)),c=!0):e=-1===e.indexOf("!")?t(e,n,i):e:(s=(a=m(e=t(e,n,i)))[0],e=a[1],r=b.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&c},s||(T[d]=l),l)},_={require:function(e){return i(e)},exports:function(e){var t=L[e];return void 0!==t?t:L[e]={}},module:function(e,t){return{id:e,uri:t||"",exports:_.exports(e),config:function(){return getOwn(x.config,e)||{}}}}},v=function(e,t,n,i,r){if(e){if(e in A)return;A[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(n=t,t=[]),t=t?slice.call(t,0):null,i||(hasProp(x,"defaultErrback")?x.defaultErrback&&(i=x.defaultErrback):i=g),i&&s.promise.catch(i),r=r||e,"function"==typeof n?(!t.length&&n.length&&(n.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,n){t.push(n)})),t=(1===n.length?["require"]:["require","exports","module"]).concat(t)),s.factory=n,s.deps=t,s.depending=!0,t.forEach((function(n,i){var o;t[i]=o=w(n,r,!0),"require"===(n=o.id)?s.values[i]=_.require(e):"exports"===n?(s.values[i]=_.exports(e),s.usingExports=!0):"module"===n?s.values[i]=s.cjsModule=_.module(e,s.map.url):void 0===n?s.values[i]=void 0:u(o,r,s,i)})),s.depending=!1,s.depCount===s.depMax&&a(s)):e&&o(e,s,n),j=(new Date).getTime(),e||f(s),s.promise},(b=i(null,!0)).config=function(t){var n,i,o,r;return t.context&&t.context!==e?(n=getOwn(contexts,t.context))?n.req.config(t):newContext(t.context).config(t):(T=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(i=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+i}),o=x.shim,r={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){r[t]?(x[t]||(x[t]={}),mixin(x[t],e,!0,!0)):x[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(R[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),o[t]=e})),x.shim=o),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(x.paths[t]=e.location),x.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&b(t.deps,t.callback),b)},b.onError=function(e){throw e},C={id:e,defined:L,waiting:k,config:x,deferreds:M,req:b,execCb:function(e,t,n,i){return t.apply(i,n)}},contexts[e]=C,b}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{"focus-trap":"3rdParty/focus-trap/focus-trap.umd.min","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min","reflect-metadata":"3rdParty/reflect-metadata",tabbable:"3rdParty/focus-trap/index.umd.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn","@googlemaps/markerclusterer":"3rdParty/googlemaps/markerclusterer/index.umd","@ckeditor/ckeditor5-inspector":"3rdParty/ckeditor/ckeditor5-inspector/inspector","@woltlab/editor":"3rdParty/ckeditor/ckeditor5.bundle","ckeditor5-translation":"3rdParty/ckeditor/translations","diff-match-patch":"3rdParty/diff-match-patch/diff_match_patch.min"},packages:[{name:"codemirror",location:"3rdParty/codemirror",main:"lib/codemirror"},{name:"@woltlab/visual-dom-diff",location:"3rdParty/visual-dom-diff",main:"index"}],shim:{"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){var n;e.elAttr=function(e,t,n){if(void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elAttrBool=function(e,t){var n=elAttr(e,t);return"1"===n||"true"===n},e.elByClass=function(e,n){return(n||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,n){return(n||t).querySelector(e)},e.elBySelAll=function(e,n,i){var o=(n||t).querySelectorAll(e);return"function"==typeof i&&Array.prototype.forEach.call(o,i),o},e.elByTag=function(e,n){return(n||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,n){if(t="data-"+t,void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elDataBool=function(e,t){var n=elData(e,t);return"1"===n||"true"===n},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,n){var i,o,r,a=e.parentNode;if(null===a)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return o=e,(i=a).classList.contains("inputAddon")&&(i=a.parentElement,o=a),null!==(r=o.nextElementSibling)&&"SMALL"===r.nodeName&&r.classList.contains("innerError")||(""===t?r=null:((r=elCreate("small")).className="innerError",i.insertBefore(r,o.nextSibling))),""===t?null!==r&&(a.removeChild(r),r=null):r[n?"innerHTML":"textContent"]=t,r},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,n){var i;return function(){var o=this,r=arguments;clearTimeout(i),i=setTimeout((function(){i=null,n||e.apply(o,r)}),t),n&&!i&&e.apply(o,r)}},Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),n=0,function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++n},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}(),e.addEventListener("popstate",(function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})),e.String.prototype.hashCode=function(){var e,t,n=0;if(this.length)for(e=0,t=this.length;e<t;e++)n=(n<<5)-n+this.charCodeAt(e),n&=n;return n},Object.defineProperty(e,"SECURITY_TOKEN",{configurable:!1,get(){const e=t.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[n,i]=e.split(/=/,2);return decodeURIComponent(i.trim())}})}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==n&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,i){return e[n]=t?t(n,i):i}}var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(i){e(t(n,t(i)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(n,t(module.exports))):e(t(n))}((function(e){var t,n,i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};__extends=function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__assign=Object.assign||function(e){var t,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__rest=function(e,t){var n,i,o={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]]);return o},__decorate=function(e,t,n,i){var o,r,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},__param=function(e,t){return function(n,i){t(n,i,e)}},__esDecorate=function(e,t,n,i,o,r){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}var s,l,c,d,u,p=i.kind,m="getter"===p?"get":"setter"===p?"set":"value",h=!t&&e?i.static?e:e.prototype:null,f=t||(h?Object.getOwnPropertyDescriptor(h,i.name):{}),g=!1;for(l=n.length-1;l>=0;l--){for(d in c={},i)c[d]="access"===d?{}:i[d];for(d in i.access)c.access[d]=i.access[d];if(c.addInitializer=function(e){if(g)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(e||null))},u=(0,n[l])("accessor"===p?{get:f.get,set:f.set}:f[m],c),"accessor"===p){if(void 0===u)continue;if(null===u||"object"!=typeof u)throw new TypeError("Object expected");(s=a(u.get))&&(f.get=s),(s=a(u.set))&&(f.set=s),(s=a(u.init))&&o.unshift(s)}else(s=a(u))&&("field"===p?o.unshift(s):f[m]=s)}h&&Object.defineProperty(h,i.name,f),g=!0},__runInitializers=function(e,t,n){var i,o=arguments.length>2;for(i=0;i<t.length;i++)n=o?t[i].call(e,n):t[i].call(e);return o?n:void 0},__propKey=function(e){return"symbol"==typeof e?e:"".concat(e)},__setFunctionName=function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))},__generator=function(e,t){function n(n){return function(l){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,n[0]&&(s=0)),s;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){s.label=n[1];break}if(6===n[0]&&s.label<r[1]){s.label=r[1],r=n;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(n);break}r[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,l])}}var i,o,r,a,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},__exportStar=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,n)},__createBinding=Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var n,i,o,r,a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;n=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return o},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,n,i,o,r,a,s;for(e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(i=Array(e),o=0,t=0;t<n;t++)for(a=0,s=(r=arguments[t]).length;a<s;a++,o++)i[o]=r[a];return i},__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,n){function i(e){c[e]&&(l[e]=function(t){return new Promise((function(n,i){d.push([e,t,n,i])>1||o(e,t)}))})}function o(e,t){try{(n=c[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(r,a):s(d[0][2],n)}catch(e){s(d[0][3],e)}var n}function r(e){o("next",e)}function a(e){o("throw",e)}function s(e,t){e(t),d.shift(),d.length&&o(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=n.apply(e,t||[]),d=[];return l={},i("next"),i("throw"),i("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,o){n[t]=e[t]?function(n){return(i=!i)?{value:__await(e[t](n)),done:!1}:o?o(n):n}:o}var n,i;return n={},t("next"),t("throw",(function(e){throw e})),t("return"),n[Symbol.iterator]=function(){return this},n},__asyncValues=function(e){function t(t){n[t]=e[t]&&function(n){return new Promise((function(i,o){!function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)}(i,o,(n=e[t](n)).done,n.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var n,i;if(e&&e.__esModule)return e;if(n={},null!=e)for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&__createBinding(n,e,i);return t(n,e),n},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},__classPrivateFieldSet=function(e,t,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(e,n):o?o.value=n:t.set(e,n),n},__classPrivateFieldIn=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__addDisposableResource=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t},n="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i},__disposeResources=function(e){function t(t){e.error=e.hasError?new n(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(var i,o;e.stack.length;){i=e.stack.pop();try{if(o=i.dispose&&i.dispose.call(i.value),i.async)return Promise.resolve(o).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__esDecorate",__esDecorate),e("__runInitializers",__runInitializers),e("__propKey",__propKey),e("__setFunctionName",__setFunctionName),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__spreadArray",__spreadArray),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateObject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet),e("__classPrivateFieldIn",__classPrivateFieldIn),e("__addDisposableResource",__addDisposableResource),e("__disposeResources",__disposeResources)})),define("WoltLabSuite/Core/Ajax/Status",["require","exports"],(function(e,t){"use strict";function n(){return void 0===o&&(o=new i),o}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0;class i{_activeRequests=0;_overlay;_timer=null;constructor(){this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("woltlab-core-loading-indicator");e.size=48,this._overlay.append(e),document.body.append(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._overlay.classList.remove("active"))}}let o;t.show=function(){n().show()},t.hide=function(){n().hide()}})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function n(e){return r(e)}function i(e,...t){const r=n(e=e||{});for(let n=0,a=t.length;n<a;n++){const a=t[n];a&&Object.keys(a).forEach((t=>{Array.isArray(a[t])||"object"!=typeof a[t]?r[t]=a[t]:o(a[t])?r[t]=i(e[t],a[t]):r[t]=a[t]}))}return r}function o(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.getXsrfToken=t.enableLegacyInheritance=t.debounce=t.stringToBool=t.getStoragePrefix=t.triggerEvent=t.serialize=t.getUuid=t.getType=t.isPlainObject=t.inherit=t.extend=t.convertLegacyUrl=t.clone=void 0;const r=function(e){return"object"==typeof e&&(Array.isArray(e)||o(e))?a(e):e},a=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((n=>t[n]=r(e[n]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=n,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const n=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,i=n.length;e<i;e++){const i=n[e].trim();i.length&&(t.length&&(t+="-"),t+=i.toLowerCase())}return`index.php?${t}/&`}))},t.extend=i,t.inherit=function(e,t,n){if(null==e)throw new TypeError("The constructor must not be undefined or null.");if(null==t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=i(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),n||{})},t.isPlainObject=o,t.getType=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1")},t.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,n){if(null===t)return"";const i=[];return Object.keys(t).forEach((o=>{const r=n?n+"["+o+"]":o,a=t[o];"object"==typeof a?i.push(e(a,r)):i.push(encodeURIComponent(r)+"="+encodeURIComponent(a))})),i.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const n=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(n)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,n={isImmediate:!1}){let i;return function(...o){const r=n.isImmediate&&void 0===i;void 0!==i&&clearTimeout(i),i=setTimeout((()=>{i=void 0,n.isImmediate||e.apply(this,o)}),t),r&&e.apply(this,o)}},t.enableLegacyInheritance=function(e){console.error("Relying on the legacy inheritance is no longer supported. Please migrate your code to use ES6 classes and inheritance.",e)},t.getXsrfToken=function(){const e=document.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[t,n]=e.split(/=/,2);return decodeURIComponent(n.trim())}})),define("WoltLabSuite/Core/CallbackList",["require","exports"],(function(e,t){"use strict";return class{_callbacks=new Map;add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){null===e?this._callbacks.forEach(((e,n)=>{e.forEach(t)})):this._callbacks.get(e)?.forEach(t)}}})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,n,i){"use strict";const o=new((i=n.__importDefault(i)).default);let r=!1;return{add:o.add.bind(o),remove:o.remove.bind(o),trigger(){if(!r)try{r=!0,o.forEach(null,(e=>e()))}finally{r=!1}}}})),define("WoltLabSuite/Core/Language",["require","exports"],(function(e,t){"use strict";function n(e,t={}){return window.WoltLabLanguage.getPhrase(e,t)}function i(e,t){window.WoltLabLanguage.registerPhrase(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.addObject=t.add=t.get=t.registerPhrase=t.getPhrase=void 0,t.getPhrase=n,t.registerPhrase=i,t.get=function(e,t={}){return n(e,t)},t.add=function(e,t){i(e,t)},t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{i(e,t)}))}})),define("WoltLabSuite/Core/Component/Dialog/Controls",["require","exports","tslib","../../Language"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogControls=void 0,i=n.__importStar(i);class o{#e;constructor(e){this.#e=e}asAlert(e){const t={cancel:void 0,extra:void 0,isAlert:!0,primary:e?.primary||i.get("wcf.dialog.button.primary")};return this.#e.attachControls(t),this.#e}asConfirmation(e){const t={cancel:"",extra:void 0,isAlert:!0,primary:e?.primary||i.get("wcf.dialog.button.primary.confirm")};return this.#e.attachControls(t),this.#e}asPrompt(e){const t={cancel:"",extra:e?.extra,isAlert:!1,primary:e?.primary||i.get("wcf.dialog.button.primary.submit")};return this.#e.attachControls(t),this.#e}withoutControls(){return this.#e}}t.DialogControls=o,t.default=o})),define("WoltLabSuite/Core/StringUtil",["require","exports"],(function(e,t){"use strict";function n(e,t){const n=t?-t:2;return e.toLocaleString(document.documentElement.lang,{maximumFractionDigits:n}).replace("-","−")}function i(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCase=t.shortUnit=t.unescapeHTML=t.ucfirst=t.lcfirst=t.formatNumeric=t.escapeRegExp=t.escapeHTML=t.addThousandsSeparator=void 0,t.addThousandsSeparator=function(e){return e.toLocaleString(document.documentElement.lang)},t.escapeHTML=function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=n,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=i,t.unescapeHTML=function(e){return String(e).replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},t.shortUnit=function(e){let t="";return e>=1e6?((e/=1e6)>10&&(e=Math.floor(e)),t="M"):e>=1e3&&((e/=1e3)>10&&(e=Math.floor(e)),t="k"),n(e,-1)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=i(e)),e))).join(""):e}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,n,i){"use strict";function o(e,t,n){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let i,o=e;const r=n+"Sibling";for(;null!==o&&o!==t;){if(null!==o[n+"ElementSibling"])return!1;if(o[r])for(i=o[r];i;){if(""!==i.textContent.trim())return!1;i=i[r]}o=o.parentNode}return!0}i=n.__importStar(i);let r=0;const a={createFragmentFromHtml(e){const t=document.createElement("div");a.setInnerHtml(t,e);const n=document.createDocumentFragment();for(;t.childNodes.length;)n.appendChild(t.childNodes[0]);return n},getUniqueId(){let e;do{e="wcf"+r++}while(null!==document.getElementById(e));return e},escapeAttributeSelector:e=>e.replace(/(["\\])/g,"\\$1"),identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=a.getUniqueId(),e.id=t),t},outerHeight(e,t){t=t||window.getComputedStyle(e);let n=e.offsetHeight;return n+=~~t.marginTop+~~t.marginBottom,n},outerWidth(e,t){t=t||window.getComputedStyle(e);let n=e.offsetWidth;return n+=~~t.marginLeft+~~t.marginRight,n},outerDimensions(e){const t=window.getComputedStyle(e);return{height:a.outerHeight(e,t),width:a.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let n=!1;Object.keys(t).forEach((i=>{/ !important$/.test(t[i])?(n=!0,t[i]=t[i].replace(/ !important$/,"")):n=!1,"important"!==e.style.getPropertyPriority(i)||n||e.style.removeProperty(i),e.style.setProperty(i,t[i],n?"important":"")}))},styleAsInt(e,t){const n=e.getPropertyValue(t);return null===n?0:parseInt(n,10)},setInnerHtml(e,t){let n;e.innerHTML=t,n=e instanceof HTMLTemplateElement?e.content:e;const i=n.querySelectorAll("script");for(let e=0,t=i.length;e<t;e++){const t=i[e],o=document.createElement("script");t.src?o.src=t.src:o.textContent=t.textContent,n.appendChild(o),t.remove()}},insertHtml(e,t,n){const i=document.createElement("template");a.setInnerHtml(i,e);const o=document.importNode(i.content,!0);switch(n){case"append":t.appendChild(o);break;case"after":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'after'.");t.parentNode.insertBefore(o,t.nextSibling);break;case"prepend":t.insertBefore(o,t.firstChild);break;case"before":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'before'.");t.parentNode.insertBefore(o,t);break;default:throw new Error("Unknown insert method '"+n+"'.")}},contains:(e,t)=>e.contains(t),getDataAttributes(e,t,n,o){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),n=!0===n,o=!0===o;const r={};for(let a=0,s=e.attributes.length;a<s;a++){const s=e.attributes[a];if(0===s.name.indexOf(t)){let e=s.name.replace(new RegExp("^"+t),"");if(n){const t=e.split("-");e="";for(let n=0,r=t.length;n<r;n++)e.length&&(o&&"id"===t[n]?t[n]="ID":t[n]=i.ucfirst(t[n])),e+=t[n]}r[e]=s.value}}return r},unwrapChildNodes(e){if(null===e.parentNode)throw new Error("The element has no parent.");const t=e.parentNode;for(;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);e.remove()},replaceElement(e,t){if(null===e.parentNode)throw new Error("The old element has no parent.");for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),e.remove()},isAtNodeStart:(e,t)=>o(e,t,"previous"),isAtNodeEnd:(e,t)=>o(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){a.isHidden(e)?a.show(e):a.hide(e)},innerError(e,t,n){const i=e.parentNode;if(null===i)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=i,r=e;o.classList.contains("inputAddon")&&(o=i.parentElement,r=i);let a=r.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=document.createElement("small"),a.className="innerError",o.insertBefore(a,r.nextSibling))),""===t?null!==a&&(a.remove(),a=null):n?a.innerHTML=t:a.textContent=t,a},innerSuccess(e,t,n){const i=e.parentNode;if(null===i)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerSuccess")||(""===t?o=null:(o=document.createElement("small"),o.className="innerSuccess",i.insertBefore(o,e.nextSibling))),""===t?null!==o&&(o.remove(),o=null):n?o.innerHTML=t:o.textContent=t,o},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=a,a})),define("WoltLabSuite/Core/Ajax/Error",["require","exports","tslib","../Component/Dialog","../Core","../Language","../StringUtil"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerGlobalRejectionHandler=t.InvalidJson=t.ExpectedJson=t.StatusNotOk=t.ConnectionError=t.ApiError=void 0,o=n.__importStar(o),r=n.__importStar(r);class s extends Error{name="ApiError"}t.ApiError=s;class l extends s{originalError;constructor(e){let t="Unknown error";e instanceof Error&&(t=e.message),super(t),this.name="ConnectionError",this.originalError=e}}t.ConnectionError=l;class c extends s{response;constructor(e){super("The API request returned a status code outside of the 200-299 range."),this.name="StatusNotOk",this.response=e}}t.StatusNotOk=c;class d extends s{response;constructor(e){super("The API did not return a JSON response."),this.name="ExpectedJson",this.response=e}}t.ExpectedJson=d;class u extends s{response;constructor(e){super("Failed to decode the JSON response from the API."),this.name="InvalidJson",this.response=e}}t.InvalidJson=u;let p=!1;t.registerGlobalRejectionHandler=function(){p||(window.addEventListener("unhandledrejection",(e=>{e.reason instanceof s&&(e.preventDefault(),async function(e){const t=await async function(e){let t="",n="";if(e instanceof l)n=e.originalError instanceof TypeError?r.get("wcf.global.error.ajax.network",{message:e.message}):e.message;else if(e instanceof u)n=await e.response.clone().text();else if(e instanceof d||e instanceof c){let i;try{i=await e.response.clone().json()}catch(t){n=await e.response.clone().text()}if(i&&o.isPlainObject(i)&&Object.keys(i).length>0)i.returnValues&&i.returnValues.description&&(t+=`<br><p>Description:</p><p>${i.returnValues.description}</p>`),i.file&&i.line&&(t+=`<br><p>File:</p><p>${i.file} in line ${i.line}</p>`),i.exception?t+=`<br>Exception: <div style="white-space: pre;">${(0,a.escapeHTML)(i.exception)}</div>`:i.stacktrace?t+=`<br><p>Stacktrace:</p><p>${i.stacktrace}</p>`:i.exceptionID&&(t+=`<br><p>Exception ID: <code>${i.exceptionID}</code></p>`),n=i.message,i.previous&&i.previous.forEach((e=>{t+=`<hr><p>${e.message}</p>`,t+=`<br><p>Stacktrace</p><p>${e.stacktrace}</p>`}));else if(void 0===i){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=n,e}}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return"";n="fetch() failed without a response body. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${n}</p>${t}</div>`}(e);if(t instanceof HTMLIFrameElement){const e=(0,i.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(r.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else""!==t&&(0,i.dialogFactory)().fromHtml(t).asAlert().show(r.get("wcf.global.error.title"))}(e.reason))})),p=!0)}})),define("WoltLabSuite/Core/Ajax/Backend",["require","exports","tslib","./Status","./Error","../Core"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0,i=n.__importStar(i);class a{url;constructor(e){this.url=e}delete(){return new l(this.url,0)}get(){return new c(this.url,1)}post(e){return new l(this.url,2,e)}}let s=!1;window.addEventListener("beforeunload",(()=>s=!0));class l{#t=new Map;#n;#i;#o;#r;#a=!0;#s=!1;constructor(e,t,n){this.#n=e,this.#i=t,this.#o=n}getAbortController(){return void 0===this.#r&&(this.#r=new AbortController),this.#r}disableLoadingIndicator(){return this.#a=!1,this}withHeader(e,t){return this.#t.set(e,t),this}allowCaching(){return this.#s=!0,this}async fetchAsJson(){const e=await this.#l({headers:{accept:"application/json"}});if(void 0===e)return;const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new o.ExpectedJson(e);let n;try{n=await e.json()}catch(t){throw new o.InvalidJson(e)}return n}async fetchAsResponse(){return this.#l()}async#l(t={}){(0,o.registerGlobalRejectionHandler)(),this.#t.set("X-Requested-With","XMLHttpRequest"),this.#t.set("X-XSRF-TOKEN",(0,r.getXsrfToken)());const a=Object.fromEntries(this.#t),l=(0,r.extend)({headers:a,mode:"same-origin",credentials:"same-origin",cache:this.#s?"default":"no-store",redirect:"error"},t);2===this.#i?(l.method="POST",this.#o&&(this.#o instanceof Blob?(l.headers["Content-Type"]="application/octet-stream",l.body=this.#o):this.#o instanceof FormData?(l.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8",l.body=this.#o):(l.headers["Content-Type"]="application/json; charset=UTF-8",l.body=JSON.stringify(this.#o)))):0===this.#i?l.method="DELETE":l.method="GET",this.#r&&(l.signal=this.#r.signal);const c=this.#a;c&&i.show();try{const t=await fetch(this.#n,l);if(!t.ok)throw new o.StatusNotOk(t);return"yes"===t.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),t}catch(e){if(e instanceof o.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new o.ConnectionError(e)}finally{c&&i.hide()}}}class c extends l{allowCaching(){return super.allowCaching(),this}}t.prepareRequest=function(e){return new a(e.toString())}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function n(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(i))}let i={editorAutosave:!0,editorInspector:!1,eventLogging:!1};const o={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(o).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){i.editorAutosave=!e&&!i.editorAutosave,n(),window.console.log("%c\tEditor autosave "+(i.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEditorInspector(e){i.editorInspector=!!e||!i.editorInspector,n(),window.console.log("%c\tEditor inspector "+(i.editorInspector?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){i.eventLogging=!!e||!i.eventLogging,n(),window.console.log("%c\tEvent logging "+(i.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=o,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(i=JSON.parse(e))}catch(e){}i.editorAutosave||o.toggleEditorAutosave(!0),i.editorInspector&&o.toggleEditorInspector(!0),i.eventLogging&&o.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>i.editorAutosave,editorInspector:()=>i.editorInspector,eventLog(e,t){i.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return o})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,n,i,o){"use strict";function r(e,t){"string"!=typeof t&&(t=void 0);const n=a.get(e);void 0!==n&&(void 0===t?a.delete(e):n.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,i=n.__importStar(i),o=n.__importDefault(o);const a=new Map;t.add=function(e,t,n){if("function"!=typeof n)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let o=a.get(e);void 0===o&&(o=new Map,a.set(e,o));let r=o.get(t);void 0===r&&(r=new Map,o.set(t,r));const s=i.getUuid();return r.set(s,n),s},t.fire=function(e,t,n){o.default._internal_.eventLog(e,t),n=n||{},a.get(e)?.get(t)?.forEach((e=>e(n)))},t.remove=function(e,t,n){a.get(e)?.get(t)?.delete(n)},t.removeAll=r,t.removeAllBySuffix=function(e,t){const n=a.get(e);if(void 0===n)return;const i=-1*(t="_"+t).length;n.forEach(((n,o)=>{o.substr(i)===t&&r(e,o)}))}})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports"],(function(e,t){"use strict";return class{_fieldId;_field;constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,n,i,o){"use strict";function r(){!0!==p?(p=!0,m=!1,o.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),p=!1,m&&r()):m=!0}function a(){const e=[];d.forEach(((t,n)=>{const o=document.getElementById(n);if(null===o)return void e.push(n);let r=!0;var a;t.forEach((e=>{var t;e.checkDependency()||(t=o,i.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&i.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,n=e.getAttribute("max");n&&(t.set("max",n),e.removeAttribute("max"));const i=e.getAttribute("maxlength");i&&(t.set("maxlength",i),e.removeAttribute("maxlength"));const o=e.getAttribute("min");o&&(t.set("min",o),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),r=!1)})),r&&(a=o,i.default.show(a),s.delete(a),a.classList.contains("tabMenuContent")&&a.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===a.dataset.name&&i.default.show(e)})),a.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==a&&!i.default.isHidden(t);)t=t.parentNode;if(t===a&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),r()}Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=t.isHiddenByDependencies=t.checkDependencies=t.checkContainers=t.addDependency=t.addContainerCheckCallback=void 0,i=n.__importDefault(i),o=n.__importStar(o);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let p=!1,m=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");o.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=i.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>a())):e.addEventListener("change",(()=>a())))}))},t.checkContainers=r,t.checkDependencies=a,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((n=>{n.contains(e)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,n)=>{t.contains(document.getElementById(n))&&d.delete(n),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))}})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterForm=t.registerForm=t.registerField=t.hasForm=t.hasField=t.getForm=t.getField=t.getData=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);const c=new Map,d=new Map;t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const n=e.getData();if(!(n instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(n)})),Promise.all(t).then((e=>e.reduce(((e,t)=>i.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof r.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const n=t.getId();if(s(e,n))throw new Error("Form field with id '"+n+"' has already been registered for form with id '"+e+"'.");c.get(e).set(n,t),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");o.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),a.unregister(e),o.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}})),define("WoltLabSuite/Core/Component/FormBuilder/Setup",["require","exports","tslib","../../Ajax/Backend","../../Dom/Util","../../Form/Builder/Manager"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderSetup=void 0,o=n.__importStar(o),r=n.__importStar(r);class a{async fromEndpoint(t){const a=await(0,i.prepareRequest)(t).get().fetchAsJson(),{dialogFactory:s}=await new Promise(((t,n)=>{e(["../Dialog"],t,n)})).then(n.__importStar),l=s().fromHtml(a.dialog).asPrompt();return new Promise((e=>{l.addEventListener("validate",(n=>{const s=r.getData(a.formId).then((async n=>{n instanceof Promise&&(n=await n);const s=await(0,i.prepareRequest)(t).post(n).fetchAsJson();return"dialog"in s?(r.unregisterForm(a.formId),o.setInnerHtml(l.content,s.dialog),!1):(l.addEventListener("primary",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!0,result:s.result})})),!0)}));n.detail.push(s)})),l.addEventListener("afterClose",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!1,result:void 0})})),l.show(a.title)}))}}t.FormBuilderSetup=a,t.default=a})),define("WoltLabSuite/Core/Component/Dialog/Setup",["require","exports","tslib","./Controls","../../Dom/Util","../FormBuilder/Setup"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogSetup=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r);class a{fromElement(e){e instanceof HTMLTemplateElement&&(e=e.content.cloneNode(!0));const t=document.createElement("woltlab-core-dialog");return t.content.append(e),e instanceof HTMLElement&&(e.hidden=!1),new i.default(t)}fromId(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find the element identified by '${e}'.`);return this.fromElement(t)}fromHtml(e){const t=o.createFragmentFromHtml(e);if(0===t.childElementCount&&""===t.textContent.trim())throw new TypeError("The provided HTML string was empty.");return this.fromElement(t)}usingFormBuilder(){return new r.default}withoutContent(){const e=document.createElement("woltlab-core-dialog");return new i.default(e)}}t.DialogSetup=a,t.default=a})),define("WoltLabSuite/Core/Helper/PageOverlay",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPageOverlayContainer=t.releasePageOverlayContainer=t.adoptPageOverlayContainer=void 0;const n=document.createElement("div");n.id="pageOverlayContainer";const i=[];t.adoptPageOverlayContainer=function(e){i.push(e),e.append(n)},t.releasePageOverlayContainer=function(e){if(!i.includes(e))throw new Error("Cannot release the page overlay from a container that (no longer) adopts it.",{cause:{element:e}});const t=i.indexOf(e);if(0===t)throw new Error("Cannot release the page overlay, there is no previous owner.",{cause:{element:e}});t!==i.length-1?i.splice(t,1):(i.pop(),i[i.length-1].append(n))},t.getPageOverlayContainer=function(){return n}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core"],(function(e,t,n,i){"use strict";function o(e){return r(e).mql.matches}function r(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");m.has(e)&&(e=m.get(e)),p.has(e)&&(e=p.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(a),s.set(e,t),e!==t.mql.media&&m.set(t.mql.media,e)),t}function a(e){const t=r(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()})),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setDialogContainer=t.pageOverlayIsActive=t.pageOverlayClose=t.pageOverlayOpen=t.scrollEnable=t.scrollDisable=t.is=t.remove=t.on=void 0,i=n.__importStar(i);const s=new Map;let l,c=0,d=0,u=0;const p=new Map(Object.entries({"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: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),m=new Map;t.on=function(e,t){const n=i.getUuid(),o=r(e);return"function"==typeof t.match&&o.callbacksMatch.set(n,t.match),"function"==typeof t.unmatch&&o.callbacksUnmatch.set(n,t.unmatch),"function"==typeof t.setup&&(o.mql.matches?t.setup():o.callbacksSetup.set(n,t.setup)),n},t.remove=function(e,t){const n=r(e);n.callbacksMatch.delete(t),n.callbacksUnmatch.delete(t),n.callbacksSetup.delete(t)},t.is=o,t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.removeProperty("position"),e.style.removeProperty("top")),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){}})),define("WoltLabSuite/Core/Element/woltlab-core-dialog",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Language","../Ui/Screen"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogElement=void 0,i=n.__importDefault(i),r=n.__importStar(r);const s=document.createElement("div");class l extends HTMLElement{#c;#e;#d;#u;constructor(){super(),this.#c=document.createElement("div"),this.#e=document.createElement("dialog"),this.#u=document.createElement("div")}show(e){if(0===e.trim().length)throw new Error("Cannot open the modal dialog without a title.");this.#u.textContent=e,this.open||(null===s.parentElement&&document.getElementById("content").append(s),this.parentElement!==s&&s.append(this),this.#e.showModal(),(0,o.adoptPageOverlayContainer)(this.#e),(0,a.scrollDisable)())}close(){this.#e.close(),this.#p()}#p(){if(null===this.parentNode)return;const e=new CustomEvent("afterClose");this.dispatchEvent(e),(0,o.releasePageOverlayContainer)(this.#e),(0,a.scrollEnable)(),this.remove()}get dialog(){return this.#e}get content(){return this.#c}get open(){return this.#e.open}get incomplete(){return this.hasAttribute("incomplete")}set incomplete(e){e?this.setAttribute("incomplete",""):this.removeAttribute("incomplete")}attachControls(e){if(void 0!==this.#d)throw new Error("There is already a form control attached to this dialog.");void 0!==e.extra&&void 0===e.cancel&&(e.cancel="");const t=document.createElement("woltlab-core-dialog-control");t.primary=e.primary,void 0!==e.cancel&&(t.cancel=e.cancel),void 0!==e.extra&&(t.extra=e.extra),this.#d=document.createElement("form"),this.#d.method="dialog",this.#d.classList.add("dialog__form"),this.#c.insertAdjacentElement("beforebegin",this.#d),this.#d.append(this.#c,t),e.isAlert&&(void 0===e.cancel?this.#e.setAttribute("role","alert"):this.#e.setAttribute("role","alertdialog")),this.#d.addEventListener("submit",(e=>{if(this.incomplete)return void e.preventDefault();const t=new CustomEvent("validate",{cancelable:!0,detail:[]});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():t.detail.length>0?(e.preventDefault(),this.incomplete=!0,Promise.all(t.detail).then((e=>{this.incomplete=!1,e.some((e=>!1===e))||(this.#m(),this.#h()&&this.close())}))):this.#h()||(e.preventDefault(),this.#m())})),this.#e.addEventListener("close",(()=>{""===this.#e.returnValue||this.#m(),this.#p()})),t.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this.#h()&&this.close()})),void 0!==e.extra&&t.addEventListener("extra",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)}))}#m(){const e=new CustomEvent("primary");this.dispatchEvent(e)}connectedCallback(){if(null!==this.#e.parentElement)return;let e;const t=this.#e.getAttribute("role");"alert"!==t&&"alertdialog"!==t&&(e=document.createElement("button"),e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialog__closeButton","jsTooltip"),e.title=r.get("wcf.dialog.button.close"),e.addEventListener("click",(()=>{if(this.#h()){const e=new CustomEvent("cancel",{cancelable:!1});this.dispatchEvent(e),this.close()}})));const n=document.createElement("div");n.classList.add("dialog__header"),this.#u.classList.add("dialog__title"),n.append(this.#u),e&&n.append(e);const o=document.createElement("div");o.classList.add("dialog__document"),o.setAttribute("role","document"),o.append(n),this.#c.classList.add("dialog__content"),this.#d?o.append(this.#d):o.append(this.#c),this.#e.append(o),this.#e.classList.add("dialog"),this.#e.setAttribute("aria-labelledby",i.default.identify(this.#u)),this.#e.addEventListener("cancel",(e=>{const t=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():this.#h()?this.#p():e.preventDefault()})),this.#e.addEventListener("mousedown",(e=>{if(e.target===this.#e){const e=new CustomEvent("backdrop",{cancelable:!0});if(this.dispatchEvent(e),e.defaultPrevented)return;this.#h()&&this.close()}})),this.append(this.#e)}#h(){const e=new CustomEvent("close",{cancelable:!0});return this.dispatchEvent(e),!1===e.defaultPrevented}}t.WoltlabCoreDialogElement=l,window.customElements.define("woltlab-core-dialog",l),t.default=l})),define("WoltLabSuite/Core/Element/woltlab-core-dialog-control",["require","exports","tslib","../Language"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogControlElement=void 0,i=n.__importStar(i);class o extends HTMLElement{#f;#g;#b;set primary(e){this.setAttribute("primary",e)}get primary(){let e=this.getAttribute("primary");return e||(e=i.get("wcf.dialog.button.primary")),e}set cancel(e){void 0===e?this.removeAttribute("cancel"):this.setAttribute("cancel",e)}get cancel(){let e=this.getAttribute("cancel");if(null!==e)return""===e&&(e=i.get("wcf.global.confirmation.cancel")),e}set extra(e){void 0===e?this.removeAttribute("extra"):this.setAttribute("extra",e)}get extra(){const e=this.getAttribute("extra");if(null!==e)return e}connectedCallback(){const e=this.closest("woltlab-core-dialog");this.classList.add("dialog__control"),this.hasAttribute("primary")||this.setAttribute("primary",""),void 0===this.#b&&(this.#b=document.createElement("button"),this.#b.type="submit",this.#b.value="primary",this.#b.autofocus=!0,this.#b.classList.add("button","buttonPrimary","dialog__control__button","dialog__control__button--primary"),this.#b.textContent=this.primary,this.append(this.#b),new MutationObserver((()=>{this.#b.disabled=e.incomplete})).observe(e,{attributeFilter:["incomplete"]}),e.incomplete&&(this.#b.disabled=!0)),void 0===this.#f&&void 0!==this.cancel&&(this.#f=document.createElement("button"),this.#f.type="button",this.#f.value="cancel",this.#f.classList.add("button","dialog__control__button","dialog__control__button--cancel"),this.#f.textContent=this.cancel,this.#f.addEventListener("click",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e)})),this.append(this.#f),e.addEventListener("backdrop",(e=>{e.preventDefault(),this.#f.click()}))),void 0===this.#g&&void 0!==this.extra&&(this.#g=document.createElement("button"),this.#g.type="button",this.#g.value="extra",this.#g.classList.add("button","dialog__control__button","dialog__control__button--extra"),this.#g.textContent=this.extra,this.#g.addEventListener("click",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)})),this.append(this.#g))}}t.WoltlabCoreDialogControlElement=o,window.customElements.define("woltlab-core-dialog-control",o),t.default=o})),define("WoltLabSuite/Core/Component/Dialog",["require","exports","./Dialog/Setup","../Element/woltlab-core-dialog","../Element/woltlab-core-dialog-control"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dialogFactory=void 0,t.dialogFactory=function(){return new n.DialogSetup}})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Language","../Component/Dialog","../StringUtil"],(function(e,t,n,i,o,r,a,s,l){"use strict";i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);let c=!1,d=!1;return class{_options;_data;_xhr;constructor(e){this._options=o.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),c||(c=!0,window.addEventListener("beforeunload",(()=>d=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||i.show(),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.responseType&&this._xhr.setRequestHeader("Accept",this._options.responseType),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=o.clone(this._options),n=this._xhr;if(n.onload=()=>{n.readyState===XMLHttpRequest.DONE&&(n.status>=200&&n.status<300||304===n.status?204===n.status?this._success(n,t):t.responseType&&this.getContentType(n)!==t.responseType?this._failure(n,t):this._success(n,t):this._failure(n,t))},n.onerror=()=>{this._failure(n,t)},this._options.progress&&(n.onprogress=this._options.progress),this._options.uploadProgress&&(n.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==o.getType(e)&&(e=o.serialize(e)),n.send(e)}else n.send()}abortPrevious(){void 0!==this._xhr&&(this._xhr.abort(),this._xhr=void 0,this._options.silent||i.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==o.getType(e)&&(e=o.extend(this._data,e)),this._options.data=e}_success(t,o){if(o.silent||i.hide(),"function"==typeof o.success){let i=null;if("application/json"===this.getContentType(t)){try{i=JSON.parse(t.responseText)}catch(e){return void this._failure(t,o)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim()),"yes"===t.getResponseHeader("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke()))}o.success(i||{},t.responseText,t,o.data)}this._finalize(t,o)}_failure(e,t){if(d)return;t.silent||i.hide();let n=null;try{n=JSON.parse(e.responseText)}catch(e){}let o=!0;if("function"==typeof t.failure&&(o=!1!==t.failure(n||{},e.responseText||"",e,t.data)),!0!==t.ignoreError&&o){const t=this.getErrorHtml(n,e);if(t instanceof HTMLIFrameElement){const e=(0,s.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(a.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else t&&(0,s.dialogFactory)().fromHtml(t).asAlert().show(a.get("wcf.global.error.title"))}this._finalize(e,t)}getErrorHtml(e,t){let n,i="";if(null!==e&&Object.keys(e).length>0)e.returnValues&&e.returnValues.description&&(i+=`<br><p>Description:</p><p>${e.returnValues.description}</p>`),e.file&&e.line&&(i+=`<br><p>File:</p><p>${e.file} in line ${e.line}</p>`),e.extraInformation&&(i+="<br>",i+=e.extraInformation.map((([e,t])=>`<p>${e}: <code>${t.toString()}</code></p>`)).join("")),e.exception?i+=`<br>Exception: <div style="white-space: pre;">${(0,l.escapeHTML)(e.exception)}</div>`:e.stacktrace?i+=`<br><p>Stacktrace:</p><pre>${e.stacktrace}</pre>`:e.exceptionID&&(i+=`<br><p>Exception ID: <code>${e.exceptionID}</code></p>`),n=e.message,e.previous&&e.previous.forEach((e=>{i+=`<hr><p>${e.message}</p>`,i+=`<br><p>Stacktrace</p><pre>${e.stacktrace}</pre>`}));else{if(t.getResponseHeader("content-type")?.startsWith("text/html")){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=t.responseText,e}n=t.responseText}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return null;n="XMLHttpRequest failed without a responseText. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${n}</p>${i}</div>`}_finalize(e,t){"function"==typeof t.finalize&&t.finalize(e),this._xhr===e&&(this._xhr=void 0),r.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}getContentType(e){const t=e.getResponseHeader("content-type");return null===t?null:t.split(";",1)[0].trim()}}})),define("WoltLabSuite/Core/Ajax/DboAction",["require","exports","tslib","./Error","./Status","../Core"],(function(e,t,n,i,o,r){"use strict";async function a(e){const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new i.ExpectedJson(e);let n;try{n=await e.json()}catch(t){throw new i.InvalidJson(e)}return n}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.DboAction=void 0,o=n.__importStar(o),r=n.__importStar(r);class l{#v;#w;#y=[];#o={};#a=!0;#_;constructor(e,t){this.#v=e,this.#w=t}static prepare(e,t){return void 0===s&&(s=!1,window.addEventListener("beforeunload",(()=>{s=!0}))),new l(e,t)}getAbortController(){return void 0===this.#_&&(this.#_=new AbortController),this.#_}objectIds(e){return this.#y=e,this}payload(e){return this.#o=e,this}disableLoadingIndicator(){return this.#a=!1,this}async dispatch(){(0,i.registerGlobalRejectionHandler)();const t=window.WSC_API_URL+"index.php?ajax-proxy/&t="+r.getXsrfToken(),l={actionName:this.#v,className:this.#w};this.#y&&(l.objectIDs=this.#y),this.#o&&(l.parameters=this.#o);const c={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":r.getXsrfToken(),Accept:"application/json"},body:r.serialize(l),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error"};this.#_&&(c.signal=this.#_.signal);const d=this.#a;d&&o.show();try{const o=await fetch(t,c);if(!o.ok)throw new i.StatusNotOk(o);const r=await a(o);return"yes"===o.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),r.returnValues}catch(e){if(e instanceof i.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new i.ConnectionError(e)}finally{d&&o.hide()}}}t.DboAction=l,t.default=l,t.handleValidationErrors=async function(e,t){if(!(e instanceof i.StatusNotOk))throw e;const n=e.response.clone();try{const e=await a(n);if(function(e){return"code"in e&&"returnValues"in e}(e)&&412===e.code&&!0===t(e.returnValues))return}catch{}throw e}})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request","./Core","./Ajax/DboAction","./Ajax/DboAction"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.dboAction=t.getRequestObject=t.apiOnce=t.api=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r);const s=new WeakMap;t.api=function(e,t,n,r){"object"!=typeof t&&(t={});let a=s.get(e);if(void 0===a){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),t.withCredentials=!0),a=new i.default(t),s.set(e,a)}let l=null,c=null;return"function"==typeof n&&(l=a.getOption("success"),a.setOption("success",n)),"function"==typeof r&&(c=a.getOption("failure"),a.setOption("failure",r)),a.setData(t),a.sendRequest(),null!==l&&a.setOption("success",l),null!==c&&a.setOption("failure",c),a},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),e.withCredentials=!0),new i.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!s.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return s.get(e)},t.dboAction=function(e,t){return r.default.prepare(e,t)},Object.defineProperty(t,"handleValidationErrors",{enumerable:!0,get:function(){return a.handleValidationErrors}})})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,i=n.__importStar(i);class o{_invocations=0;_isBusy=!1;_url;constructor(e){this._url=e}invoke(){this._isBusy||(this._isBusy=!0,i.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let r;t.setUrl=function(e){r||(r=new o(e))},t.invoke=function(){r?r.invoke():console.error("The background queue has not been initialized yet.")}})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,i=n.__importStar(i);const o=document.documentElement.lang,r=new Intl.DateTimeFormat(o,{dateStyle:"long"}),a=new Intl.DateTimeFormat(o,{hour:"numeric",minute:"numeric"}),s=new Intl.DateTimeFormat(o,{year:"numeric",day:"numeric",month:"long",hour:"numeric",minute:"numeric"});t.formatDate=function(e){return r.format(e)},t.formatTime=function(e){return a.format(e)},t.formatDateTime=function(e){return s.format(e)},t.format=function(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let n="";for(let o=0,r=t.length;o<r;o++){let a;switch(t[o]){case"s":a=e.getSeconds().toString().padStart(2,"0");break;case"i":a=e.getMinutes().toString().padStart(2,"0");break;case"a":a=e.getHours()>11?"pm":"am";break;case"g":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString(),a=a.padStart(2,"0");break}case"A":a=e.getHours()>11?"PM":"AM";break;case"G":a=e.getHours().toString();break;case"H":a=e.getHours().toString().padStart(2,"0");break;case"d":a=e.getDate().toString().padStart(2,"0");break;case"j":a=e.getDate().toString();break;case"l":a=i.get("__days")[e.getDay()];break;case"D":a=i.get("__daysShort")[e.getDay()];break;case"S":a="";break;case"m":a=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":a=(e.getMonth()+1).toString();break;case"F":a=i.get("__months")[e.getMonth()];break;case"M":a=i.get("__monthsShort")[e.getMonth()];break;case"y":a=e.getFullYear().toString().slice(-2);break;case"Y":a=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();a=t>0?"-":"+",t=Math.abs(t),a+=(~~(t/60)).toString().padStart(2,"0"),a+=":",a+=(t%60).toString().padStart(2,"0");break}case"r":a=e.toString();break;case"U":a=Math.round(e.getTime()/1e3).toString();break;case"\\":a="",o+1<r&&(a=t[++o]);break;default:a=t[o]}n+=a}return n},t.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)},t.getTimeElement=function(e){const t=document.createElement("woltlab-core-date-time");return t.date=e,e.getTime()>Date.now()&&(t.static=!0),t},t.getTimezoneDate=function(e,t){const n=6e4*new Date(e).getTimezoneOffset();return new Date(e+n+t)}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const i=[];for(let o=0;o<e.childElementCount;o++)r.get(t)(e.children[o],n)&&i.push(e.children[o]);return i}function i(e,t,n,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");let o=e.parentNode;for(;o instanceof Element;){if(o===i)return null;if(r.get(t)(o,n))return o;o=o.parentNode}return null}function o(e,t,n,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&r.get(n)(e[t],i)?e[t]:null}Object.defineProperty(t,"__esModule",{value:!0}),t.prevByTag=t.prevByClass=t.prevBySel=t.prev=t.nextByTag=t.nextByClass=t.nextBySel=t.next=t.parentByTag=t.parentByClass=t.parentBySel=t.childrenByTag=t.childrenByClass=t.childrenBySel=t.childByTag=t.childByClass=t.childBySel=void 0;const r=new Map([[0,()=>!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]]);t.childBySel=function(e,t){return n(e,1,t)[0]||null},t.childByClass=function(e,t){return n(e,2,t)[0]||null},t.childByTag=function(e,t){return n(e,3,t)[0]||null},t.childrenBySel=function(e,t){return n(e,1,t)},t.childrenByClass=function(e,t){return n(e,2,t)},t.childrenByTag=function(e,t){return n(e,3,t)},t.parentBySel=function(e,t,n){return i(e,1,t,n)},t.parentByClass=function(e,t,n){return i(e,2,t,n)},t.parentByTag=function(e,t,n){return i(e,3,t,n)},t.next=function(e){return o(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return o(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return o(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return o(e,"nextElementSibling",3,t)},t.prev=function(e){return o(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return o(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return o(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return o(e,"previousElementSibling",3,t)}})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.touch=t.platform=t.browser=t.setup=void 0;let n="other",i="desktop",o=!1;t.setup=function(){if("object"==typeof window.chrome)n="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,i=e.length;t<i;t++){const i=e[t];0===i.indexOf("-ms-")?n="microsoft":0===i.indexOf("-moz-")?n="firefox":"firefox"!==n&&0===i.indexOf("-webkit-")&&(n="safari")}}const e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("crios")?(n="chrome",i="ios"):/(?:iphone|ipad|ipod)/.test(e)?(n="safari",i="ios"):-1!==e.indexOf("android")?i="android":-1!==e.indexOf("iemobile")&&(n="microsoft",i="windows"),"desktop"!==i||-1===e.indexOf("mobile")&&-1===e.indexOf("tablet")||(i="mobile"),o="ontouchstart"in window||"msMaxTouchPoints"in window.navigator&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(n="safari",i="ios")},t.browser=function(){return n},t.platform=function(){return i},t.touch=function(){return o}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language","../Environment"],(function(e,t,n,i,o,r,a,s){"use strict";function l(e,t,n,i,o,r,a){let s="auto",l="auto",c=!0,d=50;const u=document.getElementById("pageHeaderPanel");if(null!==u){const e=window.getComputedStyle(u).position;d="fixed"===e||"static"===e?u.offsetHeight:0}if(a)if("top"===e){const e=i.top-r;s=o-e,e-t.height<d&&(c=!1)}else l=i.top+n.height+r,l+t.height>o&&(c=!1);else{const a=i.top+window.scrollY;if("top"===e){const{clientHeight:e}=document.body;s=e-a+r,e-(s+t.height)<window.scrollY+d&&(c=!1)}else l=a+n.height+r,l+t.height-window.scrollY>o&&(c=!1)}return{align:e,bottom:s,top:l,result:c}}function c(e,t,n,i,o){let r="auto",a="auto",s=!0;return"left"===e?(r=i.left,r+t.width>o&&(s=!1)):"right"===e?i.left+n.width<t.width?s=!1:(a=o-(i.left+n.width),a<0&&(s=!1)):(r=i.left+n.width/2-t.width/2,r=~~r,(r<0||r+t.width>o)&&(s=!1)),{align:e,left:r,right:a,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s),t.set=function(e,t,n){let d;n=i.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},n||{}),Array.isArray(n.pointerClassNames)&&n.pointerClassNames.length===(n.pointer?1:2)||(n.pointerClassNames=[]),-1===["left","right","center"].indexOf(n.horizontal)&&(n.horizontal="left"),"bottom"!==n.vertical&&(n.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(n.allowFlip)&&(n.allowFlip="both"),"none"===window.getComputedStyle(e).display&&(d=e.style.getPropertyValue("display"),e.style.setProperty("display","block")),r.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const u=r.default.outerDimensions(e),p=r.default.outerDimensions(n.refDimensionsElement instanceof HTMLElement?n.refDimensionsElement:t),m=t.getBoundingClientRect(),h=window.innerHeight,f=document.body.clientWidth;let g=null,b=!1;if("center"===n.horizontal&&(b=!0,g=c(n.horizontal,u,p,m,f),g.result||("both"===n.allowFlip||"horizontal"===n.allowFlip?n.horizontal="left":g.result=!0)),"rtl"===a.get("wcf.global.pageDirection")&&(n.horizontal="left"===n.horizontal?"right":"left"),null===g||!g.result){const e=g;if(g=c(n.horizontal,u,p,m,f),!g.result&&("both"===n.allowFlip||"horizontal"===n.allowFlip)){const t=c("left"===n.horizontal?"right":"left",u,p,m,f);if(t.result)g=t;else if(b)g=e;else if(u.width===f)g={align:"left",left:0,result:!0,right:0};else if(u.width<f){const e=f-(m.left+p.width),t=m.left<=e;g={align:t?"left":"right",left:t?0:"auto",result:!0,right:t?"auto":0}}}}const v="fixed"===window.getComputedStyle(e).position,w=g.left,y=g.right;let _=l(n.vertical,u,p,m,h,n.verticalOffset,v);if(!_.result&&("both"===n.allowFlip||"vertical"===n.allowFlip)){const e=l("top"===n.vertical?"bottom":"top",u,p,m,h,n.verticalOffset,v);if(e.result)_=e;else if("desktop"!==s.platform())if(u.height===h)_={align:"top",bottom:0,result:!0,top:0};else if(u.height<h){const e=h-(m.top+p.height),t=m.top<=e;_={align:t?"top":"bottom",bottom:t?0:"auto",result:!0,top:t?"auto":0}}}const E=_.bottom,S=_.top;if(n.pointer){const t=o.childrenByClass(e,"elementPointer")[0]||null;if(null===t)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===g.align?(t.classList.add("center"),t.classList.remove("left","right")):(t.classList.add(g.align),t.classList.remove("center"),t.classList.remove("left"===g.align?"right":"left")),"top"===_.align?t.classList.add("flipVertical"):t.classList.remove("flipVertical")}else 2===n.pointerClassNames.length&&(e.classList["auto"===S?"add":"remove"](n.pointerClassNames[0]),e.classList["auto"===w?"add":"remove"](n.pointerClassNames[1]));r.default.setStyles(e,{bottom:"auto"===E?E:Math.round(E).toString()+"px",left:"auto"===w?w:Math.ceil(w).toString()+"px",right:"auto"===y?y:Math.floor(y).toString()+"px",top:"auto"===S?S:Math.round(S).toString()+"px"}),r.default.show(e),e.style.removeProperty("visibility"),void 0!==d&&(""===d?e.style.removeProperty("display"):e.style.setProperty("display",d))}})),define("WoltLabSuite/Core/Ui/CloseOverlay",["require","exports","tslib","../CallbackList"],(function(e,t,n,i){"use strict";function o(e,t){s.add(e,t),c||(document.body.addEventListener("click",(()=>{a(l.Document)})),c=!0)}function r(e){s.remove(e)}function a(e,t){s.forEach(null,(n=>n(e,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.remove=t.add=t.Origin=void 0;const s=new((i=n.__importDefault(i)).default);var l;!function(e){e.Document="document",e.DropDown="dropdown",e.Search="search"}(l||(t.Origin=l={}));let c=!1;t.add=o,t.remove=r,t.execute=a;const d={add:o,remove:r,execute:a};t.default=d})),function(e,t){var n,i;"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("tabbable",["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.tabbable,t(i=e.tabbable={}),i.noConflict=function(){return e.tabbable=n,i})}(this,(function(e){"use strict";var t=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=t.join(","),i="undefined"==typeof Element,o=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!i&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},a=function e(t,n){var i,o;return void 0===n&&(n=!0),""===(o=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert"))||"true"===o||n&&t&&e(t.parentNode)},s=function(e,t,i){if(a(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(n));return t&&o.call(e,n)&&r.unshift(e),r.filter(i)},l=function e(t,i,r){var s,l,c,d,u,p,m,h;for(s=[],l=Array.from(t);l.length;)c=l.shift(),a(c,!1)||("SLOT"===c.tagName?(u=e((d=c.assignedElements()).length?d:c.children,!0,r),r.flatten?s.push.apply(s,u):s.push({scopeParent:c,candidates:u})):(o.call(c,n)&&r.filter(c)&&(i||!t.includes(c))&&s.push(c),p=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),m=!a(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c)),p&&m?(h=e(!0===p?c.children:p.children,!0,r),r.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})):l.unshift.apply(l,c.children)));return s},c=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},d=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!c(e)?0:e.tabIndex},u=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return"INPUT"===e.tagName},m=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return 0===n&&0===i},h=function(e,t){return!(t.disabled||a(t)||function(e){return p(e)&&"hidden"===e.type}(t)||function(e,t){var n,i,a,s,l=t.displayCheck,c=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;if(n=o.call(e,"details>summary:first-of-type")?e.parentElement:e,o.call(n,"details:not([open]) *"))return!0;if(l&&"full"!==l&&"legacy-full"!==l){if("non-zero-area"===l)return m(e)}else{if("function"==typeof c){for(i=e;e;){if(a=e.parentElement,s=r(e),a&&!a.shadowRoot&&!0===c(a))return m(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,i,o,a,s,l,c=e&&r(e),d=null===(t=c)||void 0===t?void 0:t.host,u=!1;if(c&&c!==e)for(u=!!(null!==(n=d)&&void 0!==n&&null!==(i=n.ownerDocument)&&void 0!==i&&i.contains(d)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&d;)u=!(null===(s=d=null===(a=c=r(d))||void 0===a?void 0:a.host)||void 0===s||null===(l=s.ownerDocument)||void 0===l||!l.contains(d));return u}(e))return!e.getClientRects().length;if("legacy-full"!==l)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){var t,n,i;if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(n=0;n<t.children.length;n++)if("LEGEND"===(i=t.children.item(n)).tagName)return!!o.call(t,"fieldset[disabled] *")||!i.contains(e);return!0}t=t.parentElement}return!1}(t))},f=function(e,t){return!(function(e){return function(e){return p(e)&&"radio"===e.type}(e)&&!function(e){var t,n,i,o;if(!e.name)return!0;if(n=e.form||r(e),i=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')},"undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}return o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form),!o||o===e}(e)}(t)||d(t)<0||!h(e,t))},g=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},b=function e(t){var n=[],i=[];return t.forEach((function(t,o){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var n=d(e);return n<0&&t&&!c(e)?0:n}(a,r),l=r?e(t.candidates):a;0===s?r?n.push.apply(n,l):n.push(a):i.push({documentOrder:o,tabIndex:s,item:t,isScope:r,content:l})})),i.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},v=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,h.bind(null,t))},e.getTabIndex=d,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,v)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,n)&&f(t,e)},e.tabbable=function(e,t){var n;return n=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:f.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):s(e,t.includeContainer,f.bind(null,t)),b(n)},Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){var n,i;"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define("focus-trap",["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.focusTrap,t(i=e.focusTrap={},e.tabbable),i.noConflict=function(){return e.focusTrap=n,i})}(this,(function(e,t){"use strict";function n(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)),i}function i(e){var t,i;for(t=1;t<arguments.length;t++)i=null!=arguments[t]?arguments[t]:{},t%2?n(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}));return e}function o(e,t,n){return(t=function(e){var t=function(e,t){var n,i;if("object"!=typeof e||null===e)return e;if(void 0!==(n=e[Symbol.toPrimitive])){if("object"!=typeof(i=n.call(e,"string")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},a=function(e){return r(e)&&!e.shiftKey},s=function(e){return r(e)&&e.shiftKey},l=function(e){return setTimeout(e,0)},c=function(e,t){var n=-1;return e.every((function(e,i){return!t(e)||(n=i,!1)})),n},d=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return"function"==typeof e?e.apply(void 0,n):e},u=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},p=[];e.createFocusTrap=function(e,n){var o,m=(null==n?void 0:n.document)||document,h=(null==n?void 0:n.trapStack)||p,f=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:a,isKeyBackward:s},n),g={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b=function(e,t,n){return e&&void 0!==e[t]?e[t]:f[n||t]},v=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return g.containerGroups.findIndex((function(t){var i=t.container,o=t.tabbableNodes;return i.contains(e)||(null==n?void 0:n.includes(i))||o.find((function(t){return t===e}))}))},w=function(e){var t,n,i,o,r=f[e];if("function"==typeof r){for(t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r=r.apply(void 0,n)}if(!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}if(o=r,"string"==typeof r&&!(o=m.querySelector(r)))throw new Error("`".concat(e,"` as selector refers to no known node"));return o},y=function(){var e,n=w("initialFocus");if(!1===n)return!1;if(void 0!==n&&t.isFocusable(n,f.tabbableOptions)||(n=v(m.activeElement)>=0?m.activeElement:(e=g.tabbableGroups[0])&&e.firstTabbableNode||w("fallbackFocus")),!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},_=function(){if(g.containerGroups=g.containers.map((function(e){var n=t.tabbable(e,f.tabbableOptions),i=t.focusable(e,f.tabbableOptions),o=n.length>0?n[0]:void 0,r=n.length>0?n[n.length-1]:void 0,a=i.find((function(e){return t.isTabbable(e)})),s=i.slice().reverse().find((function(e){return t.isTabbable(e)})),l=!!n.find((function(e){return t.getTabIndex(e)>0}));return{container:e,tabbableNodes:n,focusableNodes:i,posTabIndexesFound:l,firstTabbableNode:o,lastTabbableNode:r,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.indexOf(e);return r<0?o?i.slice(i.indexOf(e)+1).find((function(e){return t.isTabbable(e)})):i.slice(0,i.indexOf(e)).reverse().find((function(e){return t.isTabbable(e)})):n[r+(o?1:-1)]}}})),g.tabbableGroups=g.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),g.tabbableGroups.length<=0&&!w("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(g.containerGroups.find((function(e){return e.posTabIndexesFound}))&&g.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},E=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!f.preventScroll}),g.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(y()))},S=function(e){var t=w("setReturnFocus",e);return t||!1!==t&&e},C=function(e){var n,i,o,a,s,l,d,p,m,h=e.target,b=e.event,y=e.isBackward,E=void 0!==y&&y;return h=h||u(b),_(),n=null,g.tabbableGroups.length>0?(o=(i=v(h,b))>=0?g.containerGroups[i]:void 0,i<0?n=E?g.tabbableGroups[g.tabbableGroups.length-1].lastTabbableNode:g.tabbableGroups[0].firstTabbableNode:E?(a=c(g.tabbableGroups,(function(e){var t=e.firstTabbableNode;return h===t})),a<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h,!1))&&(a=i),a>=0?(s=0===a?g.tabbableGroups.length-1:a-1,l=g.tabbableGroups[s],n=t.getTabIndex(h)>=0?l.lastTabbableNode:l.lastDomTabbableNode):r(b)||(n=o.nextTabbableNode(h,!1))):(d=c(g.tabbableGroups,(function(e){var t=e.lastTabbableNode;return h===t})),d<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h))&&(d=i),d>=0?(p=d===g.tabbableGroups.length-1?0:d+1,m=g.tabbableGroups[p],n=t.getTabIndex(h)>=0?m.firstTabbableNode:m.firstDomTabbableNode):r(b)||(n=o.nextTabbableNode(h)))):n=w("fallbackFocus"),n},L=function(e){var t=u(e);v(t,e)>=0||(d(f.clickOutsideDeactivates,e)?o.deactivate({returnFocus:f.returnFocusOnDeactivate}):d(f.allowOutsideClick,e)||e.preventDefault())},k=function(e){var n,i,o,r,a,s=u(e),l=v(s,e)>=0;l||s instanceof Document?l&&(g.mostRecentlyFocusedNode=s):(e.stopImmediatePropagation(),i=!0,g.mostRecentlyFocusedNode?t.getTabIndex(g.mostRecentlyFocusedNode)>0?(o=v(g.mostRecentlyFocusedNode),(r=g.containerGroups[o].tabbableNodes).length>0&&(a=r.findIndex((function(e){return e===g.mostRecentlyFocusedNode})),a>=0&&(f.isKeyForward(g.recentNavEvent)?a+1<r.length&&(n=r[a+1],i=!1):a-1>=0&&(n=r[a-1],i=!1)))):g.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return t.getTabIndex(e)>0}))}))||(i=!1):i=!1,i&&(n=C({target:g.mostRecentlyFocusedNode,isBackward:f.isKeyBackward(g.recentNavEvent)})),E(n||g.mostRecentlyFocusedNode||y())),g.recentNavEvent=void 0},x=function(e){if(("Escape"===(null==(t=e)?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode))&&!1!==d(f.escapeDeactivates,e))return e.preventDefault(),void o.deactivate();var t;(f.isKeyForward(e)||f.isKeyBackward(e))&&function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.recentNavEvent=e,(t=C({event:e,isBackward:n}))&&(r(e)&&e.preventDefault(),E(t))}(e,f.isKeyBackward(e))},T=function(e){var t=u(e);v(t,e)>=0||d(f.clickOutsideDeactivates,e)||d(f.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},I=function(){if(g.active)return function(e,t){var n,i;e.length>0&&(n=e[e.length-1])!==t&&n.pause(),-1===(i=e.indexOf(t))||e.splice(i,1),e.push(t)}(h,o),g.delayInitialFocusTimer=f.delayInitialFocus?l((function(){E(y())})):E(y()),m.addEventListener("focusin",k,!0),m.addEventListener("mousedown",L,{capture:!0,passive:!1}),m.addEventListener("touchstart",L,{capture:!0,passive:!1}),m.addEventListener("click",T,{capture:!0,passive:!1}),m.addEventListener("keydown",x,{capture:!0,passive:!1}),o},M=function(){if(g.active)return m.removeEventListener("focusin",k,!0),m.removeEventListener("mousedown",L,!0),m.removeEventListener("touchstart",L,!0),m.removeEventListener("click",T,!0),m.removeEventListener("keydown",x,!0),o},A="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===g.mostRecentlyFocusedNode}))}))&&E(y())})):void 0,P=function(){A&&(A.disconnect(),g.active&&!g.paused&&g.containers.map((function(e){A.observe(e,{subtree:!0,childList:!0})})))};return(o={get active(){return g.active},get paused(){return g.paused},activate:function(e){var t,n,i,o;return g.active?this:(t=b(e,"onActivate"),n=b(e,"onPostActivate"),(i=b(e,"checkCanFocusTrap"))||_(),g.active=!0,g.paused=!1,g.nodeFocusedBeforeActivation=m.activeElement,null==t||t(),o=function(){i&&_(),I(),P(),null==n||n()},i?(i(g.containers.concat()).then(o,o),this):(o(),this))},deactivate:function(e){var t,n,r,a,s,c;return g.active?(t=i({onDeactivate:f.onDeactivate,onPostDeactivate:f.onPostDeactivate,checkCanReturnFocus:f.checkCanReturnFocus},e),clearTimeout(g.delayInitialFocusTimer),g.delayInitialFocusTimer=void 0,M(),g.active=!1,g.paused=!1,P(),function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}(h,o),n=b(t,"onDeactivate"),r=b(t,"onPostDeactivate"),a=b(t,"checkCanReturnFocus"),s=b(t,"returnFocus","returnFocusOnDeactivate"),null==n||n(),c=function(){l((function(){s&&E(S(g.nodeFocusedBeforeActivation)),null==r||r()}))},s&&a?(a(S(g.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)):this},pause:function(e){if(g.paused||!g.active)return this;var t=b(e,"onPause"),n=b(e,"onPostPause");return g.paused=!0,null==t||t(),M(),P(),null==n||n(),this},unpause:function(e){if(!g.paused||!g.active)return this;var t=b(e,"onUnpause"),n=b(e,"onPostUnpause");return g.paused=!1,null==t||t(),_(),I(),P(),null==n||n(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return g.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),g.active&&_(),P(),this}}).updateContainerElements(e),o},Object.defineProperty(e,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Helper/Selector",["require","exports"],(function(e,t){"use strict";function n(e){for(const[t,n]of a.entries()){e.matches(t)&&i(e,n);const o=e.querySelectorAll(t);for(const e of o)i(e,n)}}function i(e,t){for(const n of t)n(e)}function o(e,t){a.has(e)||a.set(e,[]),a.get(e).push(t),n(document.body),void 0===r&&(r=new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)})),r.observe(document,{subtree:!0,childList:!0}))}let r;Object.defineProperty(t,"__esModule",{value:!0}),t.wheneverFirstSeen=t.wheneverSeen=void 0;const a=new Map;t.wheneverSeen=o,t.wheneverFirstSeen=function(e,t){const n=new WeakSet;o(e,(e=>{n.has(e)||(n.add(e),t(e))}))}})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util","../Helper/PageOverlay","focus-trap","../Helper/Selector"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p){"use strict";function m(e,t,n){const i=n?"minDate":"maxDate";let o=(e.dataset[i]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(o))o=new Date(o).getTime().toString();else if("now"===o)o=t.getTime().toString();else if(/^\d{1,3}$/.exec(o)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~o*(n?-1:1)),o=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(o)){if(o=RegExp.$1,null===document.getElementById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}-\d{2}-\d{2}T/.test(o)?new Date(o).getTime().toString():new Date(n?1902:2038,0,1).getTime().toString();e.dataset[i]=o}function h(e){let t=A.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function f(e){e.stopPropagation(),function(){if(null!==U)return;U=document.createElement("div"),U.className="datePicker",U.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");U.appendChild(e),R=document.createElement("button"),R.type="button",R.className="previous jsTooltip",R.title=a.get("wcf.date.datePicker.previousMonth"),R.setAttribute("aria-label",a.get("wcf.date.datePicker.previousMonth")),R.innerHTML='<fa-icon name="arrow-left" solid></fa-icon>',R.addEventListener("click",(()=>W.previousMonth())),e.appendChild(R);const t=document.createElement("span");e.appendChild(t),q=document.createElement("select"),q.className="month jsTooltip",q.title=a.get("wcf.date.datePicker.month"),q.setAttribute("aria-label",a.get("wcf.date.datePicker.month")),q.addEventListener("change",y),t.appendChild(q);let n="";const i=new Intl.DateTimeFormat(document.documentElement.lang,{month:"long"});for(let e=0;e<12;e++)n+=`<option value="${e}">${i.format(new Date(2e3,e,15))}</option>`;q.innerHTML=n,N=document.createElement("select"),N.className="year jsTooltip",N.title=a.get("wcf.date.datePicker.year"),N.setAttribute("aria-label",a.get("wcf.date.datePicker.year")),N.addEventListener("change",_),t.appendChild(N),B=document.createElement("button"),B.type="button",B.className="next jsTooltip",B.title=a.get("wcf.date.datePicker.nextMonth"),B.setAttribute("aria-label",a.get("wcf.date.datePicker.nextMonth")),B.innerHTML='<fa-icon name="arrow-right" solid></fa-icon>',B.addEventListener("click",(()=>W.nextMonth())),e.appendChild(B),D=document.createElement("ul"),U.appendChild(D);const o=document.createElement("li");o.className="weekdays",D.appendChild(o);const r=new Intl.DateTimeFormat(document.documentElement.lang,{weekday:"short"}),s=new Date,l=s.getDay()-x;for(let e=0;e<7;e++){const t=e-l,n=new Date((new Date).setDate(s.getDate()+t)),i=document.createElement("span");i.textContent=r.format(n),o.appendChild(i)}for(let e=0;e<6;e++){const e=document.createElement("li");D.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",E),P.push(t),e.appendChild(t)}}F=document.createElement("footer"),U.appendChild(F),j=document.createElement("select"),j.className="hour",j.title=a.get("wcf.date.datePicker.hour"),j.setAttribute("aria-label",a.get("wcf.date.datePicker.hour")),j.addEventListener("change",w);const c=new Date(2e3,0,1),p=new Intl.DateTimeFormat(document.documentElement.lang,{hour:"numeric"});let m="";for(let e=0;e<24;e++){c.setHours(e);let t=p.formatToParts(c);const n=t.some((e=>"dayPeriod"===e.type));2!==t.length||n||(t=t.filter((e=>"literal"!==e.type))),m+=`<option value="${e}">${t.map((e=>e.value)).join("")}</option>`}j.innerHTML=m,F.appendChild(j),F.appendChild(document.createTextNode(" : ")),O=document.createElement("select"),O.className="minute",O.title=a.get("wcf.date.datePicker.minute"),O.setAttribute("aria-label",a.get("wcf.date.datePicker.minute")),O.addEventListener("change",w),m="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;m+=`<option value="${e}">${t}</option>`}O.innerHTML=m,F.appendChild(O),(0,d.getPageOverlayContainer)().appendChild(U),C=(0,u.createFocusTrap)(U,{allowOutsideClick:!0,escapeDeactivates:()=>(g(),!1)})}();const t=e.currentTarget,n="INPUT"===t.nodeName?t:t.previousElementSibling;if(n===A)return void g();const o=n.closest(".dialogContent");null!==o&&(i.stringToBool(o.dataset.hasDatepickerScrollListener||"")||(o.addEventListener("scroll",b),o.dataset.hasDatepickerScrollListener="1")),A=n;const r=T.get(A),l=A.dataset.value;let c;l?(c=new Date(parseInt(l,10)),"Invalid Date"===c.toString()&&(c=new Date)):c=new Date,M=h("minDate"),M.getTime()>c.getTime()&&(c=M),I=h("maxDate"),A.dataset.maxDate&&I.getTime()<c.getTime()&&(c=I),r.isDateTime?(j.value=c.getHours().toString(),O.value=c.getMinutes().toString(),U.classList.add("datePickerTime")):U.classList.remove("datePickerTime"),U.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),function(e,t,n){v(e,t,n);let i="";for(let e=M.getFullYear(),t=I.getFullYear();e<=t;e++)i+=`<option value="${e}">${e}</option>`;N.innerHTML=i,N.value=n.toString(),q.value=t.toString(),U.classList.add("active")}(c.getDate(),c.getMonth(),c.getFullYear()),L=()=>{s.set(U,A)},L(),window.addEventListener("scroll",L,{passive:!1}),A.nextElementSibling.setAttribute("aria-expanded","true"),C.activate()}function g(){if(null===U||!U.classList.contains("active"))return;U.classList.remove("active");const e=T.get(A);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:A}),void 0!==L&&(window.removeEventListener("scroll",L),L=void 0),A.nextElementSibling.setAttribute("aria-expanded","false"),A=null,C.deactivate()}function b(e){if(null===A)return;const t=e.currentTarget,n=c.default.offset(A),i=c.default.offset(t);n.top+A.clientHeight<=i.top||n.top>=i.top+t.offsetHeight||n.left<=i.left||n.left>=i.left+t.offsetWidth?g():s.set(U,A)}function v(e,t,n){const i=void 0!==e,r=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||D.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof n&&(n=parseInt(n||"0",10)),r||n){let a=0!==n;const s=document.createDocumentFragment();s.appendChild(D),r||(t=parseInt(D.dataset.month,10)),n||(n=parseInt(D.dataset.year,10));let l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(l<M?(n=M.getFullYear(),t=M.getMonth(),e=M.getDate(),q.value=t.toString(),N.value=n.toString(),a=!0):l>I&&(n=I.getFullYear(),t=I.getMonth(),e=I.getDate(),q.value=t.toString(),N.value=n.toString(),a=!0),l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");l.getDay()!==x;)l.setDate(l.getDate()-1);c.default.show(P[35].parentNode);const d=new Date(M.getFullYear(),M.getMonth(),M.getDate());for(let e=0;e<42;e++){if(35===e&&l.getMonth()!==t){c.default.hide(P[35].parentNode);break}const n=P[e];n.textContent=l.getDate().toString();const i=l.getMonth()===t;i?n.classList.remove("otherMonth"):n.classList.add("otherMonth");let r=!0;(l<d||l>I)&&(r=!1),r?n.classList.remove("disabled"):n.classList.add("disabled"),i&&r&&(n.href="#",n.setAttribute("role","button"),n.tabIndex=0,n.title=o.formatDate(l),n.setAttribute("aria-label",o.formatDate(l))),l.setDate(l.getDate()+1)}if(D.dataset.month=t.toString(),D.dataset.year=n.toString(),U.insertBefore(s,F),!i&&(l=new Date(n,t,e),l.getDate()!==e)){for(;l.getMonth()!==t;)l.setDate(l.getDate()-1);e=l.getDate()}if(a){for(let e=0;e<12;e++){const t=q.children[e];t.disabled=n===M.getFullYear()&&+t.value<M.getMonth()||n===I.getFullYear()&&+t.value>I.getMonth()}const e=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),B.classList[e<I?"add":"remove"]("active");const i=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");i.setDate(i.getDate()-1),R.classList[i>M?"add":"remove"]("active")}}if(e){for(let t=0;t<37;t++){const n=P[t];let i=+n.textContent===e;(n.classList.contains("otherMonth")||n.classList.contains("disabled"))&&(i=!1),i?n.classList.add("active"):n.classList.remove("active")}D.dataset.day=e.toString()}w()}function w(){const e=T.get(A);let t;i.stringToBool(A.dataset.empty||"")||(t=e.isDateTime?new Date(+D.dataset.year,+D.dataset.month,+D.dataset.day,+j.value,+O.value):new Date(+D.dataset.year,+D.dataset.month,+D.dataset.day),W.setDate(A,t))}function y(e){v(void 0,+e.currentTarget.value)}function _(e){v(void 0,void 0,+e.currentTarget.value)}function E(e){e.preventDefault();const t=e.currentTarget;t.classList.contains("otherMonth")||t.classList.contains("disabled")||(A.dataset.empty="false",v(+t.textContent),T.get(A).isDateTime||g())}function S(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&T.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l),c=n.__importDefault(c);let C,L,k=!1,x=0;const T=new Map;let I,M,A=null;const P=[];let D,j,O,q,B,R,F,N,U=null;const W={init(){k||(k=!0,x=parseInt(a.get("wcf.date.firstDayOfTheWeek"),10),(0,p.wheneverSeen)('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)',(e=>{const t=new Date;e.classList.add("inputDatePicker"),e.readOnly=!0;const n="datetime"===e.getAttribute("type"),r=n&&i.stringToBool(e.dataset.timeOnly||""),s=i.stringToBool(e.dataset.disableClear||""),l=n&&i.stringToBool(e.dataset.ignoreTimezone||""),c=e.classList.contains("birthday");e.dataset.isDateTime=n?"true":"false",e.dataset.isTimeOnly=r?"true":"false";let d=null,u=e.value;u||(u=e.getAttribute("value")||"");const p=/^\d+-\d+-\d+$/.test(u);if(u){if(r){d=new Date;const e=u.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||p){let e=new Date(u).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const n=Math.floor(e/60).toString(),i=(e%60).toString();t+=2===n.length?n:"0"+n,t+=":",t+=2===i.length?i:"0"+i,c||p?u+="T00:00:00"+t:u=u.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(u)}const t=d.getTime();isNaN(t)?u="":(e.dataset.value=t.toString(),u=r?o.formatTime(d):n?o.formatDateTime(d):o.formatDate(d))}const h=0===u.length;if(c?(e.dataset.minDate="120",e.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(e.min&&(e.dataset.minDate=e.min),e.max&&(e.dataset.maxDate=e.max)),m(e,t,!0),m(e,t,!1),(e.dataset.minDate||"")===(e.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+e.id+"').");e.type="text",e.value=u,e.dataset.empty=h?"true":"false";const g=e.dataset.placeholder||"";g&&(e.placeholder=g);const b=document.createElement("input");b.id=e.id+"DatePicker",b.name=e.name,b.type="hidden",null!==d&&(b.value=r?o.format(d,"H:i"):l?o.format(d,"Y-m-dTH:i:s"):o.format(d,n?"c":"Y-m-d")),e.parentNode.insertBefore(b,e),e.removeAttribute("name"),e.addEventListener("click",f);const v=document.createElement("div");v.className="inputAddon inputAddonDatePicker";const w=document.createElement("button");w.type="button",w.className="inputSuffix button jsTooltip",w.title=r?a.getPhrase("wcf.date.datePicker.time"):a.getPhrase("wcf.date.datePicker"),w.setAttribute("aria-haspopup","true"),w.setAttribute("aria-expanded","false"),w.addEventListener("click",(t=>{e.disabled||f(t)})),v.appendChild(w);let y=document.createElement("fa-icon");r?y.setIcon("clock"):y.setIcon("calendar"),w.appendChild(y),e.parentNode.insertBefore(v,e),v.insertBefore(e,w);let _=null;s||(_=document.createElement("button"),_.type="button",_.className="inputSuffix button jsTooltip",_.title=r?a.getPhrase("wcf.date.datePicker.time.clear"):a.getPhrase("wcf.date.datePicker.clear"),_.addEventListener("click",(()=>{e.disabled||W.clear(e)})),h&&(_.hidden=!0),v.appendChild(_),y=document.createElement("fa-icon"),y.setIcon("xmark"),_.appendChild(y));const E=["tiny","short","medium","long"];let S=!1;for(let t=0;t<4;t++)e.classList.contains(E[t])&&(S=!0);S||e.classList.add("short"),new MutationObserver((()=>{e.disabled?(w.classList.add("disabled"),_?.classList.add("disabled")):(w.classList.remove("disabled"),_?.classList.remove("disabled"))})).observe(e,{attributeFilter:["disabled"]}),e.disabled&&(w.classList.add("disabled"),_?.classList.add("disabled")),T.set(e,{clearButton:_,shadow:b,disableClear:s,isDateTime:n,isEmpty:h,isTimeOnly:r,ignoreTimezone:l,onClose:null})})),l.default.add("WoltLabSuite/Core/Date/Picker",(()=>g())))},previousMonth(){"0"===q.value?(q.value="11",N.value=(+N.value-1).toString()):q.value=(+q.value-1).toString(),v(void 0,+q.value,+N.value)},nextMonth(){"11"===q.value?(q.value="0",N.value=(+N.value+1).toString()):q.value=(+q.value+1).toString(),v(void 0,+q.value,+N.value)},getDate(e){const t=(e=S(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=S(e);const n=T.get(e);e.dataset.value=t.getTime().toString();let i,r="";n.isDateTime?n.isTimeOnly?(i=o.formatTime(t),r="H:i"):n.ignoreTimezone?(i=o.formatDateTime(t),r="Y-m-dTH:i:s"):(i=o.formatDateTime(t),r="c"):(i=o.formatDate(t),r="Y-m-d"),e.value=i,n.shadow.value=o.format(t,r),n.disableClear||(n.clearButton.hidden=!1)},getValue(e){e=S(e);const t=T.get(e);return t?t.shadow.value:""},clear(e){e=S(e);const t=T.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||(t.clearButton.hidden=!0),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=S(e);const t=T.get(e),n=e.parentNode;n.parentNode.insertBefore(e,n),n.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",f),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,T.delete(e)},setCloseCallback(e,t){e=S(e),T.get(e).onClose=t}};return window.__wcf_bc_datePicker=W,W})),define("WoltLabSuite/Core/Form/XsrfToken",["require","exports","../Core","../Helper/Selector"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=(0,n.getXsrfToken)();(0,i.wheneverFirstSeen)(".xsrfTokenInput",(t=>{(function(e){return"INPUT"===e.nodeName})(t)&&(t.value=e,t.classList.add("xsrfTokenInputHandled"))}))}})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./CloseOverlay","focus-trap","../Helper/PageOverlay"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p){"use strict";i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d);let m,h=null;const f=new Map;let g=!1;const b=new WeakMap,v=new Map;let w;const y=["onBeforeClose","onClose","onShow"],_=["number","password","search","tel","text","url"],E={setup(){m=document.createElement("div"),m.classList.add("dialogOverlay"),m.setAttribute("aria-hidden","true"),m.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),m.addEventListener("wheel",(e=>{e.target===m&&e.preventDefault()}),{passive:!1});let e=!1;new MutationObserver((()=>{"true"===m.getAttribute("aria-hidden")?((0,p.releasePageOverlayContainer)(m),e=!1):e||((0,p.adoptPageOverlayContainer)(m),e=!0)})).observe(m,{attributes:!0,attributeFilter:["aria-hidden"]}),document.getElementById("content").appendChild(m),w=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName){const e=f.get(h);return!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!1))}}return!0},r.on("screen-xs",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),this._initStaticDialogs(),o.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{f.forEach((e=>{i.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const n=document.getElementById(t);null!==n&&(n.classList.remove("jsStaticDialogContent"),n.dataset.isStaticDialog="true",a.default.hide(n),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(n.id,null,{title:n.dataset.title||""})})))}}))},open(t,o){let r=b.get(t);if(r&&i.isPlainObject(r))return this.openStatic(r.id,void 0===o?null:o);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!i.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(r={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),a.default.show(c)}else if(null===s.source)s.source=o;else if("function"==typeof s.source)s.source();else if(i.isPlainObject(s.source)){if("string"!=typeof o||""===o.trim())return new Promise(((t,n)=>{e(["../Ajax"],t,n)})).then(n.__importStar).then((e=>{const n=s.source;e.api(this,n.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof n.after&&n.after(f.get(l).content,e))}))})),{};s.source=o}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,a.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return b.set(t,r),v.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,o,a){this.isOpen(t)||r.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||r.scrollDisable()),f.has(t)?this._updateDialog(t,o):((a=i.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},a||{})).closable||(a.backdropCloseOnClick=!1),a.closeConfirmMessage&&(a.onBeforeClose=t=>{new Promise(((t,n)=>{e(["./Confirmation"],t,n)})).then(n.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:a.closeConfirmMessage||""})}))}),this._createDialog(t,o,a));const c=f.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{c.content.querySelector("input, textarea")?.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const n=f.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const i=n.dialog.querySelector(".dialogTitle");i&&(i.textContent=t)},setCallback(e,t,n){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const i=f.get(e);if(void 0===i)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===y.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof n&&null!==n)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof n+"' given).");i[t]=n},removeCallback(e,t){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const n=f.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===y.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");n[t]=void 0},_createDialog(e,t,n){let i=null;if(null===t&&(i=document.getElementById(e),null===i))throw new Error("Expected either a HTML string or an existing element id.");const o=document.createElement("div");o.classList.add("dialogContainer"),o.setAttribute("aria-hidden","true"),o.setAttribute("role","dialog"),o.dataset.id=e;const r=document.createElement("header");o.appendChild(r);const s=a.default.getUniqueId();o.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=n.title,l.id=s,r.appendChild(l),n.closable){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialogCloseButton","jsTooltip"),e.title=n.closeButtonLabel,e.setAttribute("aria-label",n.closeButtonLabel),e.addEventListener("click",(()=>this._close())),r.appendChild(e)}new ResizeObserver((()=>{if("false"===o.getAttribute("aria-hidden")){const e=Math.floor(o.getBoundingClientRect().width/2);o.style.setProperty("--translate-x",`-${e}px`)}})).observe(o);const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),n.disableContentPadding&&c.classList.add("dialogContentNoPadding"),o.appendChild(c),c.addEventListener("wheel",(e=>{let t,n,i,o=!1,r=e.target;for(;;){if(t=r.clientHeight,n=r.scrollHeight,t<n){if(i=r.scrollTop,e.deltaY<0&&i>0){o=!0;break}if(e.deltaY>0&&i+t<n){o=!0;break}}if(!r||r===c)break;r=r.parentNode}o||e.preventDefault()}),{passive:!1}),null===i)if("string"==typeof t)d=document.createElement("div"),d.id=e,a.default.setInnerHtml(d,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");{const n=[];let i;for(let e=0,o=t.childNodes.length;e<o;e++)i=t.childNodes[e],i.nodeType===Node.ELEMENT_NODE&&n.push(i);"DIV"!==n[0].nodeName||n.length>1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=n[0]}}else d=i;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&a.default.show(d);const p=(0,u.createFocusTrap)(o,{allowOutsideClick:!0,escapeDeactivates:()=>(f.get(e).closable&&E.close(e),!1),fallbackFocus:o});f.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,closable:n.closable,content:d,dialog:o,focusTrap:p,header:r,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow,submitButton:null,inputFields:new Set}),m.insertBefore(o,m.firstChild),"function"==typeof n.onSetup&&n.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const n=f.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&a.default.setInnerHtml(n.content,t),i.stringToBool(n.dialog.getAttribute("aria-hidden"))){d.default.execute(),n.closable&&i.stringToBool(m.getAttribute("aria-hidden"))&&window.addEventListener("keyup",w),n.dialog.parentNode.insertBefore(n.dialog,n.dialog.parentNode.firstChild),n.dialog.setAttribute("aria-hidden","false"),m.setAttribute("aria-hidden","false"),m.setAttribute("close-on-click",n.backdropCloseOnClick?"true":"false"),h=e;const t=n.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),t&&t.removeAttribute("inert"),"function"==typeof n.onShow&&n.onShow(n.content),i.stringToBool(n.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:n.content,id:e})}this.rebuild(e),o.default.trigger(),n.focusTrap.activate()},rebuild(e){const t=this._getDialogId(e),n=f.get(t);if(void 0===n)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(i.stringToBool(n.dialog.getAttribute("aria-hidden")))return;const o=n.content.parentNode,r=n.content.querySelector(".formSubmit");let s=0;null!==r?(o.classList.add("dialogForm"),r.classList.add("dialogFormSubmit"),s+=a.default.outerHeight(r),s-=1,o.style.setProperty("margin-bottom",`${s}px`,"")):(o.classList.remove("dialogForm"),o.style.removeProperty("margin-bottom")),s+=a.default.outerHeight(n.header);const l=window.innerHeight*(g?1:.8)-s;if(o.style.setProperty("max-height",~~l+"px",""),""===n.dialog.style.getPropertyValue("--translate-x")){const e=Math.floor(n.dialog.getBoundingClientRect().width/2);n.dialog.style.setProperty("--translate-x",`-${e}px`)}const c=v.get(t);if(void 0!==c&&"function"==typeof c._dialogSubmit){const e=n.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),i=n.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===i)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",n.content));if(n.submitButton!==i){n.submitButton=i,i.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const o=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let r;for(let t=0,i=e.length;t<i;t++)r=e[t],n.inputFields.has(r)||(-1!==_.indexOf(r.type)?(n.inputFields.add(r),r.addEventListener("keydown",o)):console.warn("Unsupported input type.",r))}}},_submit(e){const t=f.get(e);let n=!0;if(t.inputFields.forEach((e=>{e.required&&(""===e.value.trim()?(a.default.innerError(e,s.get("wcf.global.form.error.empty")),e.closest("dl")?.classList.add("formError"),n=!1):(a.default.innerError(e,!1),e.closest("dl")?.classList.remove("formError")))})),n){const t=v.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(){const e=f.get(h);return void 0===e||!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!0))},_closeOnBackdrop(e){e.target===m&&(i.stringToBool(m.getAttribute("close-on-click"))?(e.preventDefault(),this._close()):e.preventDefault())},close(e){e=this._getDialogId(e);let t=f.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");try{t.focusTrap.deactivate()}catch(e){const t="Your focus-trap must have at least one container with at least one tabbable node in it at all times";if(e.message!==t)throw e}t.dialog.setAttribute("aria-hidden","true");const n=document.activeElement;n.closest(".dialogContainer")===t.dialog&&n.blur(),"function"==typeof t.onClose&&t.onClose(e),h=null;for(let e=0;e<m.childElementCount;e++){const t=m.children[e];if(t.classList.contains("dialogContainer")&&!i.stringToBool(t.getAttribute("aria-hidden"))){h=t.dataset.id||"";break}}r.pageOverlayClose(),null===h?(m.setAttribute("aria-hidden","true"),m.dataset.closeOnClick="false",t.closable&&window.removeEventListener("keyup",w)):(t=f.get(h),m.dataset.closeOnClick=t.backdropCloseOnClick?"true":"false"),"desktop"!==l.platform()&&r.scrollEnable()},getDialog(e){return f.get(this._getDialogId(e))},isOpen(e){const t=this.getDialog(e);return void 0!==t&&"false"===t.dialog.getAttribute("aria-hidden")},destroy(e){if("object"!=typeof e)throw new TypeError("Expected the callback object as parameter.");if(b.has(e)){const t=b.get(e).id;this.isOpen(t)&&this.close(t),f.has(t)&&(f.get(t).dialog.remove(),f.delete(t)),b.delete(e)}},_getDialogId(e){if("object"==typeof e){const t=b.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:()=>({})};return E})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay","../../Helper/PageOverlay","../../Helper/Selector"],(function(e,t,n,i,o,r,a,s,l,c,d){"use strict";function u(e){const t=e.currentTarget,n=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,i=n.length;e<i;e++){const i=n[e],o=a.default.identify(i),r=a.default.offset(i),s=a.default.offset(t);r.top+i.clientHeight<=s.top||r.top>=s.top+t.offsetHeight||r.left<=s.left||r.left>=s.left+t.offsetWidth?C.toggleDropdown(o):C.setAlignment(w.get(o),y.get(o))}}function p(){w.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(o.stringToBool(e.dataset.isOverlayDropdownButton||""))C.setAlignment(e,y.get(t));else{const n=y.get(e.id);o.stringToBool(n.dataset.dropdownIgnorePageScroll||"")||C.close(t)}}))}function m(e,t){b.forEach(e,(n=>{n(e,t)}))}function h(e,t,n,i){if(null!==e){e.preventDefault(),e.stopPropagation();const n=e.currentTarget;t=n.dataset.target,void 0===i&&e instanceof MouseEvent&&(o.stringToBool(n.dataset.isKeyboardClick||"")?delete n.dataset.isKeyboardClick:i=!0)}S=!0;try{l.default.execute(l.Origin.DropDown,t)}finally{S=!1}let a=w.get(t),s=!1;if(void 0!==a){let n,l;if(e&&(n=e.currentTarget,l=n.parentNode,l!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,w.set(t,l))),void 0===i&&(n=a.closest(".dropdownToggle"),n||(n=a.querySelector(".dropdownToggle"),!n&&a.id&&(n=document.querySelector('[data-target="'+a.id+'"]'))),n&&o.stringToBool(n.dataset.dropdownLazyInit||"")&&(i=!0)),o.stringToBool(a.dataset.dropdownPreventToggle||"")&&a.classList.contains("dropdownOpen")&&(s=!0),""===a.dataset.isOverlayDropdownButton){const e=r.parentByClass(a,"dialogContent");a.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",u)}}return E="",w.forEach(((e,r)=>{const a=y.get(r);if(e.classList.contains("dropdownOpen"))if(s)E=t;else{e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),m(r,"close")}else if(r===t&&a.childElementCount>0){E=t,e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen");const s=e.querySelector(".dropdownToggle");s&&s.setAttribute("aria-expanded","true");const l=a.childElementCount>0?a.children[0]:null;if(l&&o.stringToBool(l.dataset.scrollToActive||"")){delete l.dataset.scrollToActive;let e=null;for(let t=0,n=l.childElementCount;t<n;t++)if(l.children[t].classList.contains("active")){e=l.children[t];break}e&&(l.scrollTop=Math.max(e.offsetTop+e.clientHeight-a.clientHeight,0))}const c=a.querySelector(".scrollableDropdownMenu");null!==c&&c.classList[c.scrollHeight>c.clientHeight?"add":"remove"]("forceScrollbar"),m(r,"open");let d=null;if(!i){a.setAttribute("role","menu"),a.tabIndex=-1,a.removeEventListener("keydown",g),a.addEventListener("keydown",g);const e=Array.from(a.querySelectorAll("li")).filter((e=>e.clientHeight>0));d=e.find((e=>e.classList.contains("active")))||e[0]||null,e.forEach((e=>{e.setAttribute("role","menuitem"),e.tabIndex=-1}))}C.setAlignment(e,a,n),null!==d&&d.focus()}})),null===e}function f(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):h(e)))}function g(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const n=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||n.reverse();let i=null;const o=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let r=n.indexOf(t);"End"!==e.key&&"Home"!==e.key||(r=-1);for(let e=r+1;e<n.length;e++)if(o(n[e])){i=n[e];break}null===i&&(i=n.find(o)||null),null!==i&&i.focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();let n=t;1!==n.childElementCount||"SPAN"!==n.children[0].nodeName&&"A"!==n.children[0].nodeName||(n=n.children[0]);const i=w.get(E),r=i.querySelector(".dropdownToggle"),a=i.dataset.a11yMouseEvent||"click";o.triggerEvent(n,a),r&&r.focus()}else if("Escape"===e.key||"Tab"===e.key){e.preventDefault();const t=w.get(E);let n=t.querySelector(".dropdownToggle");null!==n||t.classList.contains("dropdown")||(n=t),h(null,E),n&&n.focus()}}i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);const b=new i.default;let v=!1;const w=new Map,y=new Map;let _,E="",S=!1;const C={setup(){v||(v=!0,_=document.createElement("div"),_.className="dropdownMenuContainer",(0,c.getPageOverlayContainer)().append(_),l.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>C.closeAll())),(0,d.wheneverFirstSeen)(".dropdownToggle",(e=>C.init(e,!1))),document.addEventListener("scroll",p),window.bc_wcfSimpleDropdown=this)},init(e,t){if(C.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const n=r.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a parent with .dropdown.");const i=r.nextByClass(e,"dropdownMenu");if(null===i)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a menu as next sibling.");_.appendChild(i);const s=a.default.identify(n);if(!w.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",h),e.addEventListener("keydown",f),w.set(s,n),y.set(s,i),/^wcf\d+$/.test(s)||(i.dataset.source=s),i.childElementCount&&i.children[0].classList.contains("scrollableDropdownMenu"))){const e=i.children[0];e.dataset.scrollToActive="true";let t=null,n=null;e.addEventListener("wheel",(i=>{null===t&&(t=e.clientHeight),null===n&&(n=e.scrollHeight),(i.deltaY<0&&0===e.scrollTop||i.deltaY>0&&e.scrollTop+t===n)&&i.preventDefault()}),{passive:!1})}return e.dataset.target=s,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",o.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){C.setup();const n=a.default.identify(e);w.has(n)||(w.set(n,e),_.appendChild(t),y.set(n,t))},registerCallback(e,t){b.add(e,t)},getDropdown:e=>w.get(e),getDropdownMenu:e=>y.get(e),toggleDropdown(e,t,n){h(null,e,t,n)},setAlignment(e,t,n){const i=e.querySelector(".dropdownToggle"),o=null!==i?i.parentNode:null;let r;o&&o.classList.contains("inputAddonTextarea")&&(r=i),s.set(t,n||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=w.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const n=y.get(e);C.setAlignment(t,n)},isOpen(e){const t=y.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t,n){const i=y.get(e);void 0===i||i.classList.contains("dropdownOpen")||C.toggleDropdown(e,n,t)},close(e){const t=w.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),y.get(e).classList.remove("dropdownOpen"))},closeAll(){S||w.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen")){e.classList.remove("dropdownOpen"),y.get(t).classList.remove("dropdownOpen");const n=e.querySelector(".dropdownToggle");n&&n.setAttribute("aria-expanded","false"),m(t,"close")}}))},destroy(e){if(!w.has(e))return!1;try{C.close(e),y.get(e)?.remove()}catch(e){}return y.delete(e),w.delete(e),!0},_toggle:(e,t,n,i)=>h(e,t,n,i)};return C})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,n,i){"use strict";function o(e){if(!r.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return r.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleDropdown=t.registerCallback=t.getDropdownMenu=t.init=void 0,i=n.__importDefault(i);const r=new Map;let a=0;t.init=function(e,t){if(r.has(e))return;const n=document.createElement("div");n.id="reusableDropdownGhost"+a++,i.default.initFragment(n,t),r.set(e,n.id)},t.getDropdownMenu=function(e){return i.default.getDropdownMenu(o(e))},t.registerCallback=function(e,t){i.default.registerCallback(o(e),t)},t.toggleDropdown=function(e,t){i.default.toggleDropdown(o(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Container",["require","exports","tslib","focus-trap","../../Screen","../../CloseOverlay","../../../Dom/Util"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuContainer=void 0,r=n.__importDefault(r),a=n.__importDefault(a);class s{container=document.createElement("div");content=document.createElement("div");focusTrap=void 0;provider;constructor(e){this.provider=e,this.container.hidden=!0;const t=a.default.identify(this.provider.getMenuButton());r.default.add(`WoltLabSuite/Core/Ui/PageMenu/Container-${t}`,(()=>{this.container.hidden||this.close()}))}open(){r.default.execute(),this.buildElements(),0===this.content.childElementCount&&this.content.append(this.provider.getContent()),this.provider.getMenuButton().setAttribute("aria-expanded","true"),(0,o.pageOverlayOpen)(),(0,o.scrollDisable)(),this.container.hidden=!1,this.provider.wakeup(),this.getFocusTrap().activate()}close(){this.provider.getMenuButton().setAttribute("aria-expanded","false"),(0,o.pageOverlayClose)(),(0,o.scrollEnable)(),this.container.hidden=!0,this.getFocusTrap().deactivate(),this.provider.sleep()}toggle(){this.container.hidden?this.open():this.close()}getContent(){return this.content}buildElements(){this.container.classList.contains("pageMenuContainer")||(this.container.classList.add("pageMenuContainer"),this.container.hidden=!0,this.container.addEventListener("click",(e=>{e.target===this.container&&this.close()})),this.content.classList.add("pageMenuContent"),this.content.addEventListener("click",(e=>{e.stopPropagation()})),this.container.append(this.content),document.body.append(this.container))}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,i.createFocusTrap)(this.content,{allowOutsideClick:!0})),this.focusTrap}}t.PageMenuContainer=s,t.default=s})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","./Container","../../../Language","../../../Dom/Util","../../Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuMain=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);class s{container;mainMenu;mainMenuButton;menuItemBadges=new Map;menuItemProvider;observer;constructor(e){this.mainMenu=document.querySelector(".mainMenu"),this.menuItemProvider=e,this.mainMenuButton=document.querySelector(".pageHeaderMenuMobile"),this.mainMenuButton.addEventListener("click",(e=>{e.stopPropagation(),this.container.toggle()})),this.container=new i.default(this),this.observer=new MutationObserver((e=>{let t=!1;e.forEach((e=>{(e.addedNodes.length>0||e.removedNodes.length>0||"characterData"===e.type)&&(t=!0)})),t&&this.refreshUnreadIndicator()})),this.watchForChanges()}enable(){this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars")}getContent(){const e=document.createElement("div");e.classList.add("pageMenuMainContainer"),e.addEventListener("scroll",(()=>this.updateOverflowIndicator(e)),{passive:!0}),e.append(this.buildMainMenu());const t=this.buildLanguageMenu();t&&e.append(t);const n=this.buildFooterMenu();n&&e.append(n);const i=new ResizeObserver((()=>this.updateOverflowIndicator(e)));Array.from(e.children).forEach((e=>{i.observe(e)}));const o=document.createDocumentFragment();return o.append(e),o}getMenuButton(){return this.mainMenuButton}sleep(){this.watchForChanges()}wakeup(){this.observer.disconnect(),this.refreshUnreadIndicator()}watchForChanges(){this.observer.observe(this.mainMenu,{childList:!0,subtree:!0})}buildMainMenu(){const e=this.mainMenu.querySelector(".boxMenu"),t=this.buildMenu(e);return t.setAttribute("aria-label",window.PAGE_TITLE),t.setAttribute("role","navigation"),this.showActiveMenuItem(t),t}showActiveMenuItem(e){const t=e.querySelector('.pageMenuMainItemLink[aria-current="page"]');if(t){let e=t;for(;e&&e.parentElement;)if(e=e.parentElement.closest(".pageMenuMainItemList"),e){e.hidden=!1;const t=e.previousElementSibling;t?.setAttribute("aria-expanded","true")}const n=t.nextElementSibling;n&&(n.setAttribute("aria-expanded","true"),n.nextElementSibling.hidden=!1)}}buildLanguageMenu(){const e=a.getDropdownMenu("pageLanguageContainer");if(void 0===e)return null;const t=[],n=new Map;Array.from(e.children).forEach((e=>{const i=e.dataset.languageCode,o=e.querySelector("span").textContent.trim(),r=e.querySelector("img.iconFlag")||void 0;n.set(i,e.querySelector("a")),t.push({active:!1,children:[],counter:0,depth:1,identifier:i,title:o,icon:r})}));const i=document.createElement("fa-icon");i.setIcon("language"),i.size=24;const r=[{active:!1,children:t,counter:0,depth:0,identifier:"language",title:o.get("wcf.user.language"),icon:i}],s=document.createElement("nav");return s.classList.add("pageMenuMainNavigation","pageMenuMainNavigationLanguage"),s.append(this.buildMenuItemList(r,!0)),s.querySelectorAll(".pageMenuMainItemList .pageMenuMainItemLabel[data-identifier]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const i=e.dataset.identifier;n.get(i)?.click()}))})),s}buildFooterMenu(){const e=document.querySelector('.box[data-box-identifier="com.woltlab.wcf.FooterMenu"]');if(null===e)return null;const t=e.querySelector(".boxMenu"),n=this.buildMenu(t);n.classList.add("pageMenuMainNavigationFooter");const i=e.querySelector("nav").getAttribute("aria-label");return n.setAttribute("aria-label",i),n}buildMenu(e){const t=this.menuItemProvider.getMenuItems(e),n=document.createElement("nav");return n.classList.add("pageMenuMainNavigation"),n.append(this.buildMenuItemList(t,!1)),n}buildMenuItemList(e,t){const n=document.createElement("ul");return n.classList.add("pageMenuMainItemList"),e.filter((e=>!(!t&&!e.link&&0===e.children.length))).forEach((e=>{n.append(this.buildMenuItem(e,t))})),n}buildMenuItem(e,t){const n=document.createElement("li");if(n.dataset.depth=e.depth.toString(),n.classList.add("pageMenuMainItem"),e.link){const t=document.createElement("a");if(t.classList.add("pageMenuMainItemLink"),t.href=e.link,t.textContent=e.title,e.active&&t.setAttribute("aria-current","page"),e.identifier&&(t.dataset.identifier=e.identifier),e.openInNewWindow&&(t.target="_blank"),e.counter>0){const n=document.createElement("span");n.classList.add("pageMenuMainItemCounter","badge","badgeUpdate"),n.setAttribute("aria-hidden","true"),n.textContent=e.counter.toString(),null!==e.identifier&&this.menuItemBadges.set(e.identifier,n),t.append(n)}n.append(t)}else{const i=document.createElement("a");if(i.classList.add("pageMenuMainItemLabel"),i.href="#",e.icon){i.append(e.icon);const t=document.createElement("span");t.textContent=e.title,i.append(t)}else i.textContent=e.title;e.identifier&&(i.dataset.identifier=e.identifier),t&&"language"!==e.identifier||(i.addEventListener("click",(e=>{e.preventDefault(),i.nextElementSibling.click()})),i.setAttribute("aria-hidden","true")),n.append(i)}if(e.children.length){n.classList.add("pageMenuMainItemExpandable");const i=r.default.getUniqueId(),a=document.createElement("button");a.type="button",a.classList.add("pageMenuMainItemToggle"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",i),a.innerHTML='<fa-icon size="24" name="angle-down"></fa-icon>';let s=e.title;e.link&&(s=o.get("wcf.menu.page.button.toggle",{title:e.title})),a.setAttribute("aria-label",s);const l=this.buildMenuItemList(e.children,t);l.id=i,l.hidden=!0,a.addEventListener("click",(()=>{this.toggleList(a,l)})),l.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.toggleList(a,l))})),n.append(a,l)}return n}toggleList(e,t){t.hidden?(e.setAttribute("aria-expanded","true"),t.hidden=!1):(e.setAttribute("aria-expanded","false"),t.hidden=!0,document.activeElement!==e&&e.focus())}refreshUnreadIndicator(){null!==this.mainMenu.querySelector(".boxMenuLinkOutstandingItems")?this.mainMenu.classList.add("pageMenuMobileButtonHasContent"):this.mainMenu.classList.remove("pageMenuMobileButtonHasContent"),this.menuItemProvider.getMenuItems(this.mainMenu).forEach((e=>this.refreshUnreadBage(e)))}refreshUnreadBage(e){if(null!==e.identifier){const t=this.menuItemBadges.get(e.identifier);t&&(0===e.counter?(t.remove(),this.menuItemBadges.delete(e.identifier)):parseInt(t.textContent,10)!==e.counter&&(t.textContent=e.counter.toString()))}e.children.forEach((e=>this.refreshUnreadBage(e)))}updateOverflowIndicator(e){e.clientHeight<e.scrollHeight?(e.scrollTop>0?e.classList.add("pageMenuMainContainerOverflowTop"):e.classList.remove("pageMenuMainContainerOverflowTop"),e.clientHeight+e.scrollTop<e.scrollHeight?e.classList.add("pageMenuMainContainerOverflowBottom"):e.classList.remove("pageMenuMainContainerOverflowBottom")):e.classList.remove("pageMenuMainContainerOverflowTop","pageMenuMainContainerOverflowBottom")}}t.PageMenuMain=s,t.default=s})),define("WoltLabSuite/Core/Ui/User/Menu/Manager",["require","exports","tslib","../../Alignment","../../CloseOverlay","../../../Event/Handler","../../../Dom/Util","../../Screen","../../../Helper/PageOverlay"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e){o.default.execute();const t=p(e);t.open();const n=e.getPanelButton();n.querySelector("a").setAttribute("aria-expanded","true"),n.classList.add("open"),d(t.getElement(),n)}function d(e,t){if(i.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==a.default.getFixedParent(t)){const{top:n,height:i}=t.getBoundingClientRect();e.style.setProperty("top",`${n+i}px`)}}function u(e){if(!g.has(e))return;const t=e.getPanelButton();t.classList.contains("open")&&(p(e).close(),t.classList.remove("open"),t.querySelector("a").setAttribute("aria-expanded","false"))}function p(e){if(!g.has(e)){const t=e.getView(),n=t.getElement();m().append(n),n.addEventListener("shouldClose",(()=>u(e))),g.set(e,t)}return g.get(e)}function m(){return void 0===h&&(h=document.createElement("div"),h.classList.add("dropdownMenuContainer"),(0,l.getPageOverlayContainer)().append(h)),h}let h;Object.defineProperty(t,"__esModule",{value:!0}),t.registerProvider=t.getContainer=t.updateCounter=t.getUserMenuProviders=void 0,i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s);const f=new Set,g=new Map;t.getUserMenuProviders=function(){return f},t.updateCounter=function(e,t){Array.from(f).filter((t=>t.getIdentifier()===e)).forEach((e=>{e.getPanelButton().dispatchEvent(new CustomEvent("updateCounter",{detail:{counter:t}}))}))},t.getContainer=m,t.registerProvider=function(e){0===f.size&&(o.default.add("WoltLabSuite/Ui/User/Menu",(()=>{f.forEach((e=>u(e)))})),r.add("com.woltlab.wcf.UserMenuMobile","more",(e=>{f.forEach((t=>{e.identifier===t.getIdentifier()&&c(t)}))})),window.addEventListener("resize",(()=>{f.forEach((e=>{const t=e.getPanelButton();t.classList.contains("open")&&d(p(e).getElement(),t)}))}),{passive:!0}),s.on("screen-md-down",{match(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))},setup(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))}})),function(e){f.add(e);const t=e.getPanelButton();t.addEventListener("click",(n=>{n.preventDefault(),n.stopPropagation(),t.classList.contains("open")?u(e):c(e)}))}(e)}})),define("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",["require","exports","tslib","../../CloseOverlay","./Manager","focus-trap","../../Alignment","../../../Dom/Util"],(function(e,t,n,i,o,r,a,s){"use strict";function l(){u.deactivate(),d.hidden=!0,c.classList.remove("open"),p.setAttribute("aria-expanded","false")}let c,d,u,p;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.getElement=void 0,i=n.__importDefault(i),a=n.__importStar(a),s=n.__importDefault(s),t.getElement=function(){return d};let m=!1;t.setup=function(){m||(c=document.getElementById("userMenu"),d=c.querySelector(".userMenu"),p=c.querySelector("a"),i.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",(()=>l())),(0,o.getContainer)().append(d),d.addEventListener("click",(e=>e.stopPropagation())),c.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.hidden?d.hidden&&(i.default.execute(),d.hidden=!1,c.classList.add("open"),p.setAttribute("aria-expanded","true"),u.activate(),function(e,t){if(a.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==s.default.getFixedParent(t)){const{top:n,height:i}=t.getBoundingClientRect();e.style.setProperty("top",`${n+i}px`)}}(d,c)):l()})),u=(0,r.createFocusTrap)(d,{allowOutsideClick:!0,escapeDeactivates:()=>(l(),!1),fallbackFocus:d}),m=!0)}})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","./Container","../../../Language","../../User/Menu/Manager","../../../Dom/Util","../../User/Menu/ControlPanel","../../../Event/Handler","../../Screen"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasValidUserMenu=t.PageMenuUser=void 0,i=n.__importDefault(i),o=n.__importStar(o),a=n.__importDefault(a),l=n.__importStar(l);class d{activeTab=void 0;container;legacyUserPanels=new Map;observer;userMenuProviders=new Map;tabOrigins=new Map;tabPanels=new Map;tabs=[];userMenu;userMenuButton;constructor(){this.userMenu=document.querySelector(".userPanel"),this.userMenuButton=document.querySelector(".pageHeaderUserMobile"),this.userMenuButton.addEventListener("click",(t=>{t.stopPropagation(),e.then((()=>this.container.toggle()))})),this.container=new i.default(this);const e=new Promise((e=>{"complete"===document.readyState?e():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&e()}))}));(0,c.on)("screen-lg",{match:()=>this.detachViewsFromPanel(),unmatch:()=>this.detachViewsFromPanel()}),this.observer=new MutationObserver((()=>{this.refreshTabUnreadIndicators()}))}enable(){this.userMenuButton.setAttribute("aria-expanded","false"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.userMenuButton.setAttribute("aria-expanded","false")}getContent(){const e=document.createDocumentFragment();return e.append(this.buildTabMenu()),e}getMenuButton(){return this.userMenuButton}sleep(){this.activeTab&&this.closeTab(this.activeTab),this.detachViewsFromPanel(),this.refreshUnreadIndicator()}wakeup(){this.activeTab?this.openTab(this.activeTab):this.isInMaintenanceMode()?this.openTab(this.tabs[0]):this.openNotifications(),this.refreshTabUnreadIndicators(),this.refreshUnreadIndicator()}isInMaintenanceMode(){return"wcf"===document.body.dataset.application&&"offline"===document.body.dataset.template}openNotifications(){const e=this.tabs.find((e=>"userNotifications"===e.dataset.origin));if(!e)throw new Error("Unable to find the notifications tab.");this.openTab(e)}openTab(e){this.closeActiveTab(),e.setAttribute("aria-selected","true"),e.tabIndex=0;const t=this.tabPanels.get(e);t.hidden=!1,document.activeElement!==e&&e.focus(),this.attachViewToPanel(e),this.activeTab=e,this.observer.observe(t,{attributeFilter:["data-is-unread"],childList:!0,subtree:!0})}closeActiveTab(){this.activeTab&&(this.closeTab(this.activeTab),this.activeTab=void 0)}closeTab(e){e.setAttribute("aria-selected","false"),e.tabIndex=-1,this.tabPanels.get(e).hidden=!0;const t=this.legacyUserPanels.get(e);t&&t.close(),this.observer.disconnect(),this.refreshTabUnreadIndicators()}attachViewToPanel(e){const t=e.dataset.origin,n=this.tabPanels.get(e);if("userMenu"===t){const e=(0,s.getElement)();e.hidden=!1,0===n.childElementCount&&(this.tabOrigins.set(n,e.parentElement),n.append(e))}else if(0===n.childElementCount){const t=this.userMenuProviders.get(e);if(t){const e=t.getView(),i=e.getElement();this.tabOrigins.set(n,i.parentElement),n.append(i),e.open()}else{const t=this.legacyUserPanels.get(e);t.open();const{top:i}=n.getBoundingClientRect();t.getDropdown().getContainer()[0].style.setProperty("--offset-top",`${i}px`)}}}detachViewsFromPanel(){this.tabPanels.forEach(((e,t)=>{if(e.childElementCount){const n=this.tabOrigins.get(e);if(n)if("userMenu"===t.dataset.origin){const t=e.children[0];t.hidden=!0,n.append(t)}else{const e=this.userMenuProviders.get(t);if(e){const t=e.getView().getElement();t.hidden=!0,n.append(t)}}}}))}keydown(e){const t=e.currentTarget;if("Enter"===e.key||" "===e.key)return e.preventDefault(),void this.openTab(t);if(!["ArrowLeft","ArrowRight","End","Home"].includes(e.key))return;e.preventDefault();const n=this.tabs.indexOf(t),i=this.tabs.length-1;let o;o="ArrowLeft"===e.key?0===n?i:n-1:"ArrowRight"===e.key?n===i?0:n+1:"End"===e.key?i:0,this.tabs[o].focus()}buildTabMenu(){const e=document.createElement("div");e.classList.add("pageMenuUserTabContainer");const t=document.createElement("div");return t.classList.add("pageMenuUserTabList"),t.setAttribute("role","tablist"),t.setAttribute("aria-label",o.get("wcf.menu.user")),e.append(t),this.buildControlPanelTab(t,e),(0,r.getUserMenuProviders)().forEach((n=>{const[i,o]=this.buildTab(n);t.append(i),e.append(o),this.tabs.push(i),this.tabPanels.set(i,o),this.userMenuProviders.set(i,n)})),this.buildLegacyTabs(t,e),e}buildTab(e){const t=e.getPanelButton(),n=t.querySelector("a");let i=n.querySelector("fa-icon")?.outerHTML;void 0===i&&(i='<fa-icon size="32" name="question"></fa-icon>');const o={icon:i,label:n.dataset.title||n.title,origin:t.id};return this.buildTabComponents(o)}buildControlPanelTab(e,t){const n=document.getElementById("userMenu"),i=n.querySelector("a"),o={icon:this.userMenuButton.querySelector(".userAvatarImage").outerHTML,label:i.dataset.title||i.title,origin:n.id},[r,a]=this.buildTabComponents(o);e.append(r),t.append(a),this.tabs.push(r),this.tabPanels.set(r,a)}buildLegacyTabs(e,t){const n=document.querySelector(".userPanelItems"),i={panels:[]};l.fire("com.woltlab.wcf.pageMenu","legacyMenu",i),Array.from(n.children).filter((e=>void 0!==i.panels.find((t=>t.element===e)))).map((e=>{const t=e.querySelector("a");return{icon:t.querySelector(".icon").outerHTML,label:t.dataset.title||t.title,origin:e.id}})).forEach((n=>{const[o,r]=this.buildTabComponents(n);e.append(o),t.append(r),this.tabs.push(o),this.tabPanels.set(o,r);const a=i.panels.find((e=>e.element.id===n.origin));this.legacyUserPanels.set(o,a.api)}))}buildTabComponents(e){const t=a.default.getUniqueId(),n=a.default.getUniqueId(),i=document.createElement("button");i.type="button",i.classList.add("pageMenuUserTab"),i.dataset.hasUnreadContent="false",i.dataset.origin=e.origin,i.id=t,i.setAttribute("aria-controls",n),i.setAttribute("aria-selected","false"),i.setAttribute("role","tab"),i.tabIndex=-1,i.setAttribute("aria-label",e.label),i.innerHTML=e.icon,i.addEventListener("click",(e=>{e.preventDefault(),this.openTab(i)})),i.addEventListener("keydown",(e=>this.keydown(e)));const o=document.createElement("div");return o.classList.add("pageMenuUserTabPanel"),o.id=n,o.hidden=!0,o.setAttribute("aria-labelledby",t),o.setAttribute("role","tabpanel"),o.tabIndex=0,[i,o]}refreshUnreadIndicator(){null!==this.userMenu.querySelector(".badge.badgeUpdate")?this.userMenu.classList.add("pageMenuMobileButtonHasContent"):this.userMenu.classList.remove("pageMenuMobileButtonHasContent")}refreshTabUnreadIndicators(){this.userMenuProviders.forEach(((e,t)=>{e.hasUnreadContent()?t.dataset.hasUnreadContent="true":t.dataset.hasUnreadContent="false"}))}}t.PageMenuUser=d,t.hasValidUserMenu=function(){return document.getElementById("topMenu").classList.contains("userPanelLoggedIn")},t.default=d})),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","focus-trap","../Core","../Dom/Change/Listener","../Dom/Util","../Environment","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen","../Language"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h){"use strict";function f(){B=!0,g(),b(),F&&(U=new u.PageMenuMain(H),U.enable(),(0,p.hasValidUserMenu)()&&(W=new p.PageMenuUser,W.enable())),c.default.add("WoltLabSuite/Core/Ui/Mobile",v),r.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{g(),b()})),document.addEventListener("scroll",(()=>E()),{passive:!0})}function g(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const n=document.createElement("button");n.type="button",n.innerHTML='<fa-icon size="24" name="ellipsis-vertical"></fa-icon>',n.classList.add("dropdownLabel"),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),v(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(n,e.firstChild)}))}function b(){document.querySelectorAll(".message").forEach((e=>{if(N.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const n=e.querySelector(".messageQuickOptions");if(n&&t.childElementCount){n.classList.add("active");let i=n.querySelector(".messageQuickOptionsMobile");null===i&&(i=document.createElement("li"),i.innerHTML=`\n            <button type="button" aria-label="${h.get("wcf.global.button.more")}">\n              <fa-icon name="ellipsis-vertical"></fa-icon>\n            </button>\n          `,i.classList.add("messageQuickOptionsMobile"),n.append(i)),i.querySelector("button").addEventListener("click",(i=>{i.stopPropagation(),S(e,n,t)}))}}N.add(e)}))}function v(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),B&&O&&E()}function w(){V=!0}function y(){V=!1,z.forEach((function(e){e.classList.remove("open")}))}function _(){z.forEach((function(e){e.addEventListener("mousedown",(function(t){V&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),V=!0}function E(){O?.classList.remove("dropdownOpen")}function S(e,t,n){if(null===O)O=document.createElement("ul"),O.className="dropdownMenu",d.init("com.woltlab.wcf.jsMobileNavigation",O);else if(O.classList.contains("dropdownOpen")&&(E(),j.deactivate(),j=void 0,q===e))return;O.innerHTML="",c.default.execute(),x(n);const o=n.previousElementSibling;if(o&&o.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",O.appendChild(e),x(o)}l.set(O,t,{horizontal:"right",allowFlip:"vertical"}),O.classList.add("dropdownOpen"),q=e,j=(0,i.createFocusTrap)(O,{allowOutsideClick:!0,escapeDeactivates:()=>(S(e,t,n),!1),setReturnFocus:t}),j.activate()}function C(){R=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(t=>{R&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const n=e.parentElement,i=t.target;n.contains(i)||i===n||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}),{passive:!1})}))}function L(){R=!0}function k(){R=!1}function x(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const n=e.querySelector("span:not(.icon)");t.innerHTML=`<a href="#">${n.textContent}</a>`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():o.triggerEvent(e,"click"),E()})),O.appendChild(t)}))}function T(){c.default.execute(),B=!0,F&&(U.enable(),W?.enable())}function I(){$&&P($,".messageGroupLink")}function M(){c.default.execute(),B=!1,F&&(U.disable(),W?.disable())}function A(){$&&D($),O&&E()}function P(e,t){Array.from(e).forEach((e=>{const n=e.parentElement;let i=n.querySelector(".mobileLinkShadow");if(null===i){const o=e.querySelector(t);o.href&&(i=document.createElement("a"),i.className="mobileLinkShadow",i.href=o.href,i.setAttribute("aria-labelledby",a.default.identify(o)),n.appendChild(i),n.classList.add("mobileLinkShadowContainer"))}}))}function D(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeShadow=t.rebuildShadow=t.disableShadow=t.disable=t.enableShadow=t.enable=t.setup=void 0,o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importDefault(c),d=n.__importStar(d),m=n.__importStar(m),h=n.__importStar(h);let j,O=null,q=null,B=!1,R=!1,F=!1;const N=new WeakSet;let U,W,H,V=!1,$=null;const z=[];t.setup=function(e,t){F=e,H=t,document.querySelectorAll(".boxesSidebarLeft").forEach((e=>{z.push(e)})),s.touch()&&document.documentElement.classList.add("touch"),"desktop"!==s.platform()&&document.documentElement.classList.add("mobile");const n=document.querySelector(".messageGroupList");n&&($=n.getElementsByClassName("messageGroup")),m.on("screen-md-down",{match:T,unmatch:M,setup:f}),m.on("screen-sm-down",{match:I,unmatch:A,setup:I}),m.on("screen-md-down",{match:w,unmatch:y,setup:_}),!s.touch()||"ios"!==s.platform()&&"android"!==s.platform()||m.on("screen-lg",{match:L,unmatch:k,setup:C})},t.enable=T,t.enableShadow=I,t.disable=M,t.disableShadow=A,t.rebuildShadow=P,t.removeShadow=D})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language","../../Ui/Screen"],(function(e,t,n,i,o,r){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==g?(e>=b?(m.classList.contains("initiallyHidden")&&m.classList.remove("initiallyHidden"),m.setAttribute("aria-hidden","false")):m.setAttribute("aria-hidden","true"),l(),-1!==g&&h.classList[e<g?"remove":"add"]("scrolledDown"),g=-1):v()}function s(e){e.preventDefault(),document.getElementById("top").scrollIntoView({behavior:"smooth"})}function l(){const e=Array.from(p.children).find((e=>"false"===e.getAttribute("aria-hidden")));p.classList[e?"add":"remove"]("active"),e?h.classList.add("pageActionHasContextButtons"):h.classList.remove("pageActionHasContextButtons")}function c(){if(f)return;f=!0,h=document.createElement("div"),h.className="pageAction",p=document.createElement("div"),p.className="pageActionButtons",h.appendChild(p),m=function(){const e=document.createElement("button");return e.type="button",e.classList.add("button","buttonPrimary","pageActionButtonToTop","initiallyHidden","jsTooltip"),e.title=o.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='<fa-icon size="32" name="angle-up" solid></fa-icon>',e.addEventListener("click",s),e}(),h.appendChild(m),document.body.appendChild(h);const e=i.debounce(a,100);window.addEventListener("scroll",(()=>{-1===g&&(g=window.pageYOffset,window.setTimeout((()=>{a(),g=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==g&&(g=-1)}),{passive:!0}),r.on("screen-sm-down",{match(){b=50},unmatch(){b=300},setup(){b=50}}),a()}function d(e){const t=u.get(e);t&&(t.parentElement.setAttribute("aria-hidden","true"),l())}Object.defineProperty(t,"__esModule",{value:!0}),t.show=t.hide=t.remove=t.get=t.has=t.add=t.setup=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r);const u=new Map;let p,m,h,f=!1,g=-1,b=300;const v=i.debounce((()=>{g=-1}),50);t.setup=c,t.add=function(e,t,n){c();const i=document.createElement("div");i.className="pageActionButton",i.dataset.name=e,i.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),i.appendChild(t);let o=null;n&&(o=u.get(n)||null,o&&(o=o.parentElement)),!o&&p.childElementCount&&(o=p.children[0]),o||(o=p.firstChild),p.insertBefore(i,o),h.classList.remove("scrolledDown"),u.set(e,t),i.offsetParent,i.setAttribute("aria-hidden","false"),l()},t.has=function(e){return u.has(e)},t.get=function(e){return u.get(e)},t.remove=function(e){const t=u.get(e);if(void 0!==t){const n=t.parentElement,o=()=>{try{i.stringToBool(n.getAttribute("aria-hidden"))&&(p.removeChild(n),u.delete(e)),n.removeEventListener("transitionend",o)}catch(e){}};n.addEventListener("transitionend",o),d(e)}},t.hide=d,t.show=function(e){const t=u.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),h.classList.remove("scrolledDown"),l()}}})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler","WoltLabSuite/Core/Ui/CloseOverlay"],(function(e,t,n,i,o,r,a,s){"use strict";i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s);class l{container;containers=new Map;isLegacy=!1;store=null;tabs=new Map;constructor(e){this.container=e}validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=i.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;i.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=o.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const n=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+n+"') exists more than once.");const i=this.containers.get(t);if(void 0===i)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+n+"').");if(i.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+n+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+t+"'] (tab menu id: '"+n+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+n+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEach((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(){this.tabs.forEach((e=>{const t=e.children[0];if(t.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let e=!1;t.addEventListener("touchstart",(()=>{e=!0})),t.addEventListener("touchmove",(()=>{e=!1})),t.addEventListener("touchend",(t=>{e&&(e=!1,t.preventDefault(),this._onClick(t))}))}}));let e=null;const t=l.getIdentifierFromHash();let n;if(""!==t&&(n=this.tabs.get(t),n)){const t=this.container.parentElement;t?.classList.contains("tabMenuContainer")&&(e=this.container)}if(!n){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){n||o.default.isHidden(e)||e.previousElementSibling&&!o.default.isHidden(e.previousElementSibling)||(n=e)})):"string"==typeof e&&"false"!==e&&(n=this.tabs.get(e))}n&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,n,!0));const i=this.container.dataset.store;if(i){const e=document.createElement("input");e.type="hidden",e.name=i,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}return e}select(t,i,o){if(t=t?t.toString():"",!(i=i||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((n=>{e===t&&(i=n),e++}))}if(!i)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||i.dataset.name||"";const r=this.getActiveTab();let c=null;if(r){const e=r.dataset.name;if(e===t)return;o||a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:r,tabName:e}),r.classList.remove("active"),c=this.containers.get(r.dataset.name||""),c.classList.remove("active"),c.classList.add("hidden"),this.isLegacy&&(r.classList.remove("ui-state-active"),c.classList.remove("ui-state-active"))}i.classList.add("active");const d=this.containers.get(t);if(d.classList.add("active"),d.classList.remove("hidden"),this.isLegacy&&(i.classList.add("ui-state-active"),d.classList.add("ui-state-active")),this.store&&(this.store.value=t),!o){a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:i,activeName:t,previous:r,previousName:r?r.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(i),oldTab:e(r),newPanel:e(d),oldPanel:e(c)});let n=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?n+=window.location.hash:n+="#"+t,window.history.replaceState(void 0,"",n)}s.default.execute(),new Promise(((t,n)=>{e(["../TabMenu"],t,n)})).then(n.__importStar).then((e=>{e.scrollToTab(i)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||o.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const n=e.children[0];/#([^#]+)$/.exec(n.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,n,i){"use strict";function o(){null!==l&&window.clearTimeout(l),l=window.setTimeout((()=>{for(const e of a)e();window.removeEventListener("scroll",o),a=[],r=void 0,l=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,i=n.__importDefault(i);let r,a=[],s=null,l=null;t.element=function(e,t,n="smooth"){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(a.length>0&&e!==r)throw new Error("Cannot scroll to element, a concurrent request is running.");if(t&&a.push(t),void 0!==r)return;r=e,window.addEventListener("scroll",o);let l=i.default.offset(e).top;if(null===s){s=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;s="fixed"===t||"static"===t?e.offsetHeight:0}}s>0&&(l<=s?l=0:l-=s);const c=window.pageYOffset;window.scrollTo({left:0,top:l,behavior:n}),window.setTimeout((()=>{c===window.pageYOffset&&o()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=o.default.identify(e);if(w.has(t))return;let n=new r.default(e);if(!n.validate())return;const i=n.init();if(w.set(t,n),i instanceof HTMLElement){const e=f(i.parentNode.id);e&&(n=e,n.select(i.id,void 0,!0))}const a=document.querySelector("#"+t+" > nav > ul");a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===a?(a.classList.add("active"),b=a):(a.classList.remove("active"),b=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){n=null,h(e)}let n=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==n&&window.clearTimeout(n),n=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{if(!t.defaultPrevented)for(const n of e.querySelectorAll("input, select, textarea"))if(!n.checkValidity()){t.preventDefault();const e=f(n.closest(".tabMenuContainer").id),i=n.closest(".tabMenuContent");return e.select(i.dataset.name||""),void l.element(n,(()=>{n.reportValidity()}))}}))}}))}function d(){w.forEach((e=>{let t=!1;e.getContainers().forEach((n=>{t||null===n.querySelector(".formError")||(t=!0,e.select(n.id))}))}))}function u(e){v=!0,w.forEach((t=>{const n=t.getActiveTab();e?h(n.closest(".menu, .tabMenu")):g(n)}))}function p(){v=!1}function m(e,t,n,i,o,r){(r||t>0)&&(t-=15),n!==(t=t<0?0:Math.min(t,i-o))&&(e.classList.add("enableAnimation"),n<t?e.firstElementChild.style.setProperty("margin-left",n-t+"px",""):e.style.setProperty("padding-left",n-t+"px",""),setTimeout((()=>{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function h(e){if(!v)return;const t=e.clientWidth,n=e.querySelector("ul"),i=n.scrollLeft,o=n.scrollWidth,r=i>0;let a=e.querySelector(".tabMenuOverlayLeft");r?(null===a&&(a=document.createElement("button"),a.type="button",a.innerHTML='<fa-icon size="24" name="angle-left"></fa-icon>',a.className="tabMenuOverlayLeft",a.addEventListener("click",(()=>{const e=n.clientWidth;m(n,n.scrollLeft-~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");const s=t+i<o;let l=e.querySelector(".tabMenuOverlayRight");s?(null===l&&(l=document.createElement("button"),l.type="button",l.innerHTML='<fa-icon size="24" name="angle-right"></fa-icon>',l.className="tabMenuOverlayRight",l.addEventListener("click",(()=>{const e=n.clientWidth;m(n,n.scrollLeft+~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function f(e){return w.get(e)}function g(e){if(!v)return;const t=e.closest("ul"),n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;if(n===o)return;const r=e.offsetLeft;let a=!1;r<i&&(a=!0);let s=!1;if(!a){const t=n-(r-i);let o=e.clientWidth;null!==e.nextElementSibling&&(s=!0,o+=20),t<o&&(a=!0)}a&&m(t,r,i,o,n,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToTab=t.getTabMenu=t.setup=t.selectErroneousTabs=void 0,i=n.__importDefault(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);let b=null,v=!1;const w=new Map;t.selectErroneousTabs=d,t.setup=function(){c(),d(),i.default.add("WoltLabSuite/Core/Ui/TabMenu",c),a.default.add("WoltLabSuite/Core/Ui/TabMenu",(()=>{b&&(b.classList.remove("active"),b=null)})),s.on("screen-sm-down",{match(){u(!1)},unmatch:p,setup(){u(!0)}}),window.addEventListener("hashchange",(()=>{const e=r.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&w.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=r.default.getIdentifierFromHash();e&&window.setTimeout((()=>{const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const n=t.parentNode;let i=n.offsetTop-50;if(i<0&&(i=0),e>i){let e=o.default.offset(n).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=f,t.scrollToTab=g})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Environment","../Helper/PageOverlay","../Helper/Selector","./Alignment"],(function(e,t,n,i,o,r,a){"use strict";function s(e){const t=e.currentTarget;let n=t.title.trim();""!==n&&(t.dataset.tooltip=n,t.setAttribute("aria-label",n),t.removeAttribute("title")),n=t.dataset.tooltip||"",d.style.removeProperty("top"),d.style.removeProperty("left"),n.length?(d.classList.add("active"),c.textContent=n,a.set(d,t,{horizontal:"center",verticalOffset:4,vertical:"top"})):d.classList.remove("active")}function l(){d.classList.remove("active")}let c,d;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),a=n.__importStar(a),t.setup=function(){"desktop"===i.platform()&&(d=document.createElement("div"),d.id="balloonTooltip",d.classList.add("balloonTooltip"),d.addEventListener("transitionend",(()=>{d.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{d.style.removeProperty(e)}))})),c=document.createElement("span"),c.id="balloonTooltipText",d.appendChild(c),(0,o.getPageOverlayContainer)().append(d),(0,r.wheneverSeen)(".jsTooltip",(e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),e.addEventListener("click",l))})),window.addEventListener("scroll",l))}})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),o=n.__importDefault(o);class r{activeElement;description;elements=new Map;input;submitButton;init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const n=e.dataset.link;t=n?e=>{window.location.href=n.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((n=>{n.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,o.default.open(this);const n=e.dataset.pages||"0";this.input.value=n,this.input.max=n,this.input.select(),this.description.textContent=i.get("wcf.page.jumpTo.description").replace(/#pages#/,n)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),o.default.close(this)}_dialogSetup(){const e=`<dl>\n        <dt><label for="jsPaginationPageNo">${i.get("wcf.page.jumpTo")}</label></dt>\n                <dd>\n          <input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny">\n          <small></small>\n        </dd>\n      </dl>\n      <div class="formSubmit">\n        <button type="button" class="button buttonPrimary">${i.get("wcf.global.button.submit")}</button>\n      </div>`;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:i.get("wcf.global.page.pagination")},source:e}}}let a=null;t.init=function(e,t){(null===a&&(a=new r),a).init(e,t)}})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,n,i,o){"use strict";function r(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.activeElement,n=document.createElement("div");n.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",n),n.appendChild(e);const i=document.createElement("button");i.type="button",i.title=o.get("wcf.global.form.password.button.show"),i.classList.add("button","inputSuffix","jsTooltip"),i.setAttribute("aria-hidden","true"),n.appendChild(i);const r=document.createElement("fa-icon");r.setIcon("eye"),i.appendChild(r),i.addEventListener("click",(()=>{a(e,i,r)})),e.form?.addEventListener("submit",(()=>{"password"!==e.type&&a(e,i,r)})),t===e&&e.focus()}(e)}))}function a(e,t,n){"password"===e.type?(n.setIcon("eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.hide"),e.type="text"):(n.setIcon("eye"),t.dataset.tooltip=o.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importDefault(i),o=n.__importStar(o);const s=new WeakSet;t.setup=function(){r(),i.default.add("WoltLabSuite/Core/Ui/Password",(()=>r()))}})),define("WoltLabSuite/Core/Ui/Empty",["require","exports","tslib","../Dom/Change/Listener"],(function(e,t,n,i){"use strict";function o(){document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((e=>{e.classList.remove("jsReloadPageWhenEmpty"),r.observe(e,{childList:!0})}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importDefault(i);const r=new MutationObserver((e=>{e.forEach((e=>{const t=e.target;(0===t.childElementCount||Array.from(t.children).every((e=>"ignore"===e.dataset.reloadPageWhenEmpty)))&&window.location.reload()}))}));t.setup=function(){o(),i.default.add("WoltLabSuite/Core/Ui/Empty",(()=>o()))}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,n,i,o,r){"use strict";function a(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r);class s{_active=!1;parameters;confirmButton;_content;dialog;text;callbackCancel;callbackConfirm;constructor(){this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.type="button",this.confirmButton.dataset.type="submit",this.confirmButton.classList.add("button","buttonPrimary"),this.confirmButton.textContent=o.get("wcf.global.confirmation.confirm"),e.appendChild(this.confirmButton);const t=document.createElement("button");t.type="button",t.classList.add("button"),t.textContent=o.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{r.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,r.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,r.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){window.setTimeout((()=>{this.confirmButton.blur(),this.confirmButton.focus()}),1)}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:o.get("wcf.global.confirmation.title")}}}_dialogSubmit(){this._confirm()}}let l;t.show=function(e){if(!a().active){if((e=i.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");a().open(e)}},t.getContentElement=function(){return a().content}})),define("WoltLabSuite/Core/Ui/Object/Action",["require","exports","tslib","../../Ajax","../../Event/Handler","../Confirmation","../../Language","../../StringUtil","../../Dom/Change/Listener"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(`${d} ${u} ${p}`).forEach((e=>{m.has(e)||(e.addEventListener("click",(e=>function(e){function t(){i.apiOnce({data:{actionName:l,className:c,objectIDs:[p],parameters:m},success:e=>function(e,t){"reload"===e.dataset.objectActionSuccess?window.location.reload():o.fire("WoltLabSuite/Core/Ui/Object/Action",e.dataset.objectAction,{containerElement:e.closest(d),data:t,objectElement:e.closest(u)})}(n,e)})}e.preventDefault();const n=e.currentTarget,l=n.dataset.objectAction;let c=n.closest(d).dataset.objectActionClassName;n.dataset.objectActionClassName&&(c=n.dataset.objectActionClassName);let p=n.closest(u).dataset.objectId;n.dataset.objectId&&(p=n.dataset.objectId);const m={};Object.entries(n.dataset).forEach((([e,t])=>{let n=/^objectActionParameterData(.+)/.exec(e);if(n)Object.prototype.hasOwnProperty.call(m,"data")||(m.data={}),m.data[s.lcfirst(n[1])]=t;else if(n=/^objectActionParameter(.+)/.exec(e),n){const e=s.lcfirst(n[1]);if("data"===e)throw new Error("Additional object action parameters may not use 'data' as key.");m[e]=t}})),n.dataset.confirmMessage?r.show({confirm:t,message:a.get(n.dataset.confirmMessage),messageIsHtml:!0}):t()}(e))),m.add(e))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l);const d=".jsObjectActionContainer[data-object-action-class-name]",u=".jsObjectActionObject[data-object-id]",p=".jsObjectAction[data-object-action]",m=new Set;t.setup=function(){c(),l.default.add("WoltLabSuite/Core/Ui/Action",(()=>c()))}})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p){"use strict";function m(){return f||(f=new h),f}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d),u=n.__importStar(u),p=n.__importStar(p);class h{containers=new Map;editors=new Map;editorDropdowns=new Map;itemData=new WeakMap;knownCheckboxes=new WeakSet;pageClassNames=[];pageObjectId=0;reloadPageOnSuccess=new Map;setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),r.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=a.default.identify(e);let n=this.containers.get(t);if(void 0===n){const i=e.querySelector(".jsClipboardMarkAll");null!==i&&(i.dataset.containerId=t,i.addEventListener("click",(e=>this.markAll(e)))),n={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:i,markedObjectIds:new Set},this.containers.set(t,n)}Array.from(n.checkboxes).forEach((e=>{this.knownCheckboxes.has(e)||(e.dataset.containerId=t,null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e))}))}))}loadMarkedItems(){i.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,n="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,n);const i=[],o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type;Array.from(r.checkboxes).forEach((e=>{const o=~~e.dataset.objectId;n?e.checked||(e.checked=!0,r.markedObjectIds.add(o),i.push(o)):e.checked&&(e.checked=!1,r.markedObjectIds.delete(o),i.push(o)),this.setParentAsMarked(e,n);const a=t.closest(".jsClipboardObject");null!==a&&(n?a.classList.add("jsMarked"):a.classList.remove("jsMarked"))})),this.saveState(a,i,n)}mark(e){const t=e instanceof Event?e.currentTarget:e,n=~~t.dataset.objectId,i=t.checked,o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type,s=t.closest(".jsClipboardObject");i?(r.markedObjectIds.add(n),s.classList.add("jsMarked")):(r.markedObjectIds.delete(n),s.classList.remove("jsMarked")),null!==r.markAll&&(r.markAll.checked=!Array.from(r.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(r.markAll,i)),this.setParentAsMarked(t,t.checked),this.saveState(a,[n],i)}saveState(e,t,n){i.api(this,{actionName:n?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=n.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:i,listItem:n,responseData:null})}const n=e.currentTarget,i=this.itemData.get(n);if(i.url)return void(window.location.href=i.url);const r="string"==typeof i.internalData.confirmMessage?i.internalData.confirmMessage:"";let a=!0;if(o.isPlainObject(i.parameters)&&i.parameters.actionName&&i.parameters.className){if("unmarkAll"===i.parameters.actionName||Array.isArray(i.parameters.objectIDs))if(r.length){const e="string"==typeof i.internalData.template?i.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const n=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[n]=e.value);break;case"SELECT":t[n]=e.value;break;case"TEXTAREA":t[n]=e.value.trim()}})),this.executeProxyAction(n,i,t)},message:r,template:e})}else this.executeProxyAction(n,i)}else r.length&&(a=!1,c.show({confirm:t,message:r}));a&&t()}executeProxyAction(e,t,n={}){const r="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],a={data:n};o.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{a[e]=t})),i.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:r,parameters:a},(n=>{if("unmarkAll"!==t.actionName){const i=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",i,{data:t,listItem:e,responseData:n});const o=this.reloadPageOnSuccess.get(i);if(o&&o.includes(n.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;i.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=o.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const n=e.element.dataset.type,i=Array.isArray(t[n])?t[n]:[];this.rebuildMarkings(e,i)}));const n=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{n.includes(t)||(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let i=!1,o=this.editors.get(e),r=this.editorDropdowns.get(e);void 0===o?(i=!0,o=document.createElement("a"),o.className="dropdownToggle",o.textContent=t.label,this.editors.set(e,o),r=document.createElement("ol"),r.className="dropdownMenu",this.editorDropdowns.set(e,r)):(o.textContent=t.label,r.innerHTML=""),Object.values(t.items).forEach((t=>{const n=document.createElement("li"),i=document.createElement("span");i.textContent=t.label,n.appendChild(i),r.appendChild(n),n.dataset.type=e,n.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(n,t)}));const a=document.createElement("li");a.classList.add("dropdownDivider"),r.appendChild(a);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),r.appendChild(s),-1!==n.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):(u.add(t,o),i=!0)}if(i){const e=o.parentElement;e.classList.add("dropdown"),e.appendChild(r),d.default.init(o)}}))}rebuildMarkings(e,t){let n=!0;if(Array.from(e.checkboxes).forEach((e=>{const i=e.closest(".jsClipboardObject"),o=t.includes(~~e.dataset.objectId);o||(n=!1),e.checked=o,o?i.classList.add("jsMarked"):i.classList.remove("jsMarked"),this.setParentAsMarked(e,o)})),null!==e.markAll){e.markAll.checked=n,this.setParentAsMarked(e.markAll,n);const t=e.markAll.closest(".columnMark")?.parentNode;t&&(n?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const n=e.parentElement;"checkbox"===n.getAttribute("role")&&n.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),p.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),p.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let f;t.setup=function(e){m().setup(e)},t.reload=function(){m().reload()},t.hideEditor=function(e){m().hideEditor(e)},t.showEditor=function(){m().showEditor()},t.unmark=function(e,t){m().unmark(e,t)}})),define("WoltLabSuite/Core/Ui/Object/Action/Handler",["require","exports","tslib","../../../Event/Handler","../../../Controller/Clipboard"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i=n.__importStar(i),o=n.__importStar(o),t.default=class{objectAction;constructor(e,t,n){this.objectAction=n,i.add("WoltLabSuite/Core/Ui/Object/Action",e,(e=>this.handleObjectAction(e))),document.querySelectorAll(".jsClipboardContainer[data-type]").forEach((e=>{i.add("com.woltlab.wcf.clipboard",e.dataset.type,(e=>{null!==e.responseData&&-1!==t.indexOf(e.responseData.actionName)&&this.handleClipboardAction(e)}))}))}handleClipboardAction(e){const t=e.listItem.dataset.type;document.querySelectorAll(`.jsClipboardContainer[data-type="${t}"] .jsClipboardObject`).forEach((t=>{const n=t.dataset.objectId;e.responseData.objectIDs.forEach((i=>{~~i==~~n&&this.objectAction({containerElement:t.closest(".jsObjectActionContainer"),data:e.responseData,objectElement:t})}))}))}handleObjectAction(e){this.objectAction(e),o.reload()}}})),define("WoltLabSuite/Core/Ui/Object/Action/Delete",["require","exports","tslib","./Handler"],(function(e,t,n,i){"use strict";function o(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="delete"]');if(!t||t.dataset.objectActionHandler)return;const n=e.objectElement.querySelector(".jsObjectActionObjectChildren");n&&Array.from(n.children).forEach((t=>{e.objectElement.insertAdjacentElement("beforebegin",t)})),e.objectElement.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importDefault(i),t.setup=function(){new i.default("delete",["delete"],o)}})),define("WoltLabSuite/Core/Ui/Object/Action/Toggle",["require","exports","tslib","../../../Language","./Handler"],(function(e,t,n,i,o){"use strict";function r(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="toggle"]');if(!t||t.dataset.objectActionHandler)return;const n="FA-ICON"===t.nodeName?t:t.querySelector("fa-icon");if(n)if("square"===n.name){n.setIcon("square-check");const e=t.dataset.disableTitle||i.get("wcf.global.button.disable");t.title=e}else{n.setIcon("square");const e=t.dataset.enableTitle||i.get("wcf.global.button.enable");t.title=e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),o=n.__importDefault(o),t.setup=function(){new o.default("toggle",["enable","disable"],r)}})),define("WoltLabSuite/Core/Ui/Search",["require","exports","tslib","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Simple","./Screen","../Environment","../Dom/Util"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";function d(){r.default.execute(r.Origin.Search),h.classList.add("searchBarOpen"),y?.parentElement.classList.add("open"),m||o.set(g,w,{horizontal:"right"}),g.style.setProperty("top",`${f.clientHeight}px`,""),v.focus(),window.setTimeout((()=>{const e=v.value.length;v.selectionStart=e,v.selectionEnd=e}),1)}function u(){if(!h.classList.contains("searchBarOpen")&&!g.classList.contains("open"))return;h.classList.remove("searchBarOpen"),g.classList.remove("open"),y?.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{g.style.removeProperty(e)})),"ios"===l.platform()&&(s.scrollEnable(),void 0!==p&&(document.body.scrollTop=p,p=void 0)),m&&v.blur();const e=document.getElementById("pageHeaderSearchMobile");e&&(e.setAttribute("aria-expanded","false"),e.querySelector("fa-icon").setIcon("magnifying-glass"));const t=g.querySelector(".pageHeaderSearchType");a.default.close(t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);let p,m=!1;document.body.classList.contains("wcfAcp");const h=document.getElementById("pageHeader"),f=document.getElementById("pageHeaderPanel"),g=document.getElementById("pageHeaderSearch");let b;const v=document.getElementById("pageHeaderSearchInput"),w=document.getElementById("topMenu"),y=document.getElementById("userPanelSearchButton");t.init=function(){null!==g&&(function(){g.addEventListener("click",(e=>e.stopPropagation()));const e=document.querySelector(".pageHeaderSearchType"),t=(0,c.identify)(e);a.default.getDropdownMenu(t).addEventListener("click",(e=>{e.stopPropagation(),a.default.close(t)})),y?.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),h.classList.contains("searchBarOpen")?u():d()})),r.default.add("WoltLabSuite/Core/Ui/Search",((e,t)=>{if(e!==r.Origin.Search){if(e===r.Origin.DropDown){if(document.getElementById("pageHeaderSearchTypeSelect").dataset.target===t)return;if(v.parentElement.id===t)return}u(),b?.setAttribute("aria-expanded","false")}}))}(),s.on("screen-md-down",{match(){m=!0},unmatch(){m=!1,p=void 0},setup(){m=!0,function(){const e=document.getElementById("pageHeaderSearchMobile");b=e,e.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"true"===e.getAttribute("aria-expanded")?u():("ios"===l.platform()&&(p=document.body.scrollTop,s.scrollDisable()),d(),g.style.setProperty("top",`${h.offsetHeight}px`,""),g.classList.add("open"),v.focus(),"ios"===l.platform()&&(document.body.scrollTop=0),e.setAttribute("aria-expanded","true"),e.querySelector("fa-icon").setIcon("xmark"))})),g.addEventListener("click",(e=>{e.stopPropagation(),e.target===g&&(e.preventDefault(),u())}))}()}}),i.add("com.woltlab.wcf.Search","close",(()=>u())))}})),define("WoltLabSuite/Core/LazyLoader",["require","exports"],(function(e,t){"use strict";function n(e){void 0!==r.get(e)&&window.cancelAnimationFrame(r.get(e)),r.set(e,window.requestAnimationFrame((()=>{for(const t of o.keys())if(e.matches(t)||null!==e.querySelector(t)){for(const e of o.get(t))a.then((()=>e()));o.delete(t)}r.delete(e)})))}let i;Object.defineProperty(t,"__esModule",{value:!0}),t.whenFirstSeen=void 0;const o=new Map,r=new Map,a=new Promise((e=>{"loading"===document.readyState?document.addEventListener("readystatechange",(()=>e()),{once:!0}):e()}));t.whenFirstSeen=function(e,t){o.has(e)||o.set(e,[]),o.get(e).push(t),n(document.body),void 0===i&&(i=new MutationObserver((e=>{if(0!==o.size)for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)}))),i.observe(document,{subtree:!0,childList:!0})}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(e=e||self).PerfectScrollbar=t()}(this,(function(){"use strict";function e(e){return getComputedStyle(e)}function t(e,t){var n,i;for(n in t)"number"==typeof(i=t[n])&&(i+="px"),e.style[n]=i;return e}function n(e){var t=document.createElement("div");return t.className=e,t}function i(e,t){if(!v)throw new Error("No element matching method supported");return v.call(e,t)}function o(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function r(e,t){return Array.prototype.filter.call(e.children,(function(e){return i(e,t)}))}function a(e,t){var n=e.element.classList,i=w.state.scrolling(t);n.contains(i)?clearTimeout(y[t]):n.add(i)}function s(e,t){y[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(w.state.scrolling(t))}),e.settings.scrollingThreshold)}function l(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function c(e,t,n,i,o){var r;if(void 0===i&&(i=!0),void 0===o&&(o=!1),"top"===t)r=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");r=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,i,o){var r,c=n[0],d=n[1],u=n[2],p=n[3],m=n[4],h=n[5];void 0===i&&(i=!0),void 0===o&&(o=!1),r=e.element,e.reach[p]=null,r[u]<1&&(e.reach[p]="start"),r[u]>e[c]-e[d]-1&&(e.reach[p]="end"),t&&(r.dispatchEvent(l("ps-scroll-"+p)),t<0?r.dispatchEvent(l("ps-scroll-"+m)):t>0&&r.dispatchEvent(l("ps-scroll-"+h)),i&&function(e,t){a(e,t),s(e,t)}(e,p)),e.reach[p]&&(t||o)&&r.dispatchEvent(l("ps-"+p+"-reach-"+e.reach[p]))}(e,n,r,i,o)}function d(e){return parseInt(e,10)||0}function u(e){var n=e.element,i=Math.floor(n.scrollTop),a=n.getBoundingClientRect();e.containerWidth=Math.round(a.width),e.containerHeight=Math.round(a.height),e.contentWidth=n.scrollWidth,e.contentHeight=n.scrollHeight,n.contains(e.scrollbarXRail)||(r(n,w.element.rail("x")).forEach((function(e){return o(e)})),n.appendChild(e.scrollbarXRail)),n.contains(e.scrollbarYRail)||(r(n,w.element.rail("y")).forEach((function(e){return o(e)})),n.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=p(e,d(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=d((e.negativeScrollAdjustment+n.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=p(e,d(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=d(i*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,n){var i,o={width:n.railXWidth},r=Math.floor(e.scrollTop);n.isRtl?o.left=n.negativeScrollAdjustment+e.scrollLeft+n.containerWidth-n.contentWidth:o.left=e.scrollLeft,n.isScrollbarXUsingBottom?o.bottom=n.scrollbarXBottom-r:o.top=n.scrollbarXTop+r,t(n.scrollbarXRail,o),i={top:r,height:n.railYHeight},n.isScrollbarYUsingRight?n.isRtl?i.right=n.contentWidth-(n.negativeScrollAdjustment+e.scrollLeft)-n.scrollbarYRight-n.scrollbarYOuterWidth-9:i.right=n.scrollbarYRight-e.scrollLeft:n.isRtl?i.left=n.negativeScrollAdjustment+e.scrollLeft+2*n.containerWidth-n.contentWidth-n.scrollbarYLeft-n.scrollbarYOuterWidth:i.left=n.scrollbarYLeft+e.scrollLeft,t(n.scrollbarYRail,i),t(n.scrollbarX,{left:n.scrollbarXLeft,width:n.scrollbarXWidth-n.railBorderXWidth}),t(n.scrollbarY,{top:n.scrollbarYTop,height:n.scrollbarYHeight-n.railBorderYWidth})}(n,e),e.scrollbarXActive?n.classList.add(w.state.active("x")):(n.classList.remove(w.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,n.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?n.classList.add(w.state.active("y")):(n.classList.remove(w.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,n.scrollTop=0)}function p(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 m(e,t){function n(t){t.touches&&t.touches[0]&&(t[c]=t.touches[0].pageY),b[h]=v+_*(t[c]-y),a(e,f),u(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function i(){s(e,f),e[g].classList.remove(w.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",n)}function o(t,o){v=b[h],o&&t.touches&&(t[c]=t.touches[0].pageY),y=t[c],_=(e[l]-e[r])/(e[d]-e[m]),o?e.event.bind(e.ownerDocument,"touchmove",n):(e.event.bind(e.ownerDocument,"mousemove",n),e.event.once(e.ownerDocument,"mouseup",i),t.preventDefault()),e[g].classList.add(w.state.clicking),t.stopPropagation()}var r=t[0],l=t[1],c=t[2],d=t[3],p=t[4],m=t[5],h=t[6],f=t[7],g=t[8],b=e.element,v=null,y=null,_=null;e.event.bind(e[p],"mousedown",(function(e){o(e)})),e.event.bind(e[p],"touchstart",(function(e){o(e,!0)}))}var h,f,g,b,v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),w={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},y={x:null,y:null},_=function(e){this.element=e,this.handlers={}},E={isEmpty:{configurable:!0}};return _.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,{passive:!1})},_.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(i){return!(!t||i===t)||(n.element.removeEventListener(e,i,!1),!1)}))},_.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},E.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(_.prototype,E),(h=function(){this.eventElements=[]}).prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new _(e),this.eventElements.push(t)),t},h.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},h.prototype.unbind=function(e,t,n){var i=this.eventElement(e);i.unbind(t,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},h.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},h.prototype.once=function(e,t,n){var i=this.eventElement(e),o=function(e){i.unbind(t,o),n(e)};i.bind(t,o)},f={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},g={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=n*e.containerHeight,u(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=n*e.containerWidth,u(e),t.stopPropagation()}))},"drag-thumb":function(e){m(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),m(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(n){var o,r,a,s;if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(i(t,":hover")||i(e.scrollbarX,":focus")||i(e.scrollbarY,":focus"))){if(o=document.activeElement?document.activeElement:e.ownerDocument.activeElement){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(i(s=o,"input,[contenteditable]")||i(s,"select,[contenteditable]")||i(s,"textarea,[contenteditable]")||i(s,"button,[contenteditable]"))return}switch(r=0,a=0,n.which){case 37:r=n.metaKey?-e.contentWidth:n.altKey?-e.containerWidth:-30;break;case 38:a=n.metaKey?e.contentHeight:n.altKey?e.containerHeight:30;break;case 39:r=n.metaKey?e.contentWidth:n.altKey?e.containerWidth:30;break;case 40:a=n.metaKey?-e.contentHeight:n.altKey?-e.containerHeight:-30;break;case 32:a=n.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:a=e.containerHeight;break;case 34:a=-e.containerHeight;break;case 36:a=e.contentHeight;break;case 35:a=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==r||e.settings.suppressScrollY&&0!==a||(t.scrollTop-=a,t.scrollLeft+=r,u(e),function(n,i){var o,r=Math.floor(t.scrollTop);if(0===n){if(!e.scrollbarYActive)return!1;if(0===r&&i>0||r>=e.contentHeight-e.containerHeight&&i<0)return!e.settings.wheelPropagation}if(o=t.scrollLeft,0===i){if(!e.scrollbarXActive)return!1;if(0===o&&n<0||o>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}(r,a)&&n.preventDefault())}}))},wheel:function(t){function n(n){var o,r=function(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!=t&&n!=n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}(n),a=r[0],s=r[1];(function(t,n,o){var r,a,s,l;if(!f.isWebKit&&i.querySelector("select:focus"))return!0;if(!i.contains(t))return!1;for(r=t;r&&r!==i;){if(r.classList.contains(w.element.consuming))return!0;if(a=e(r),o&&a.overflowY.match(/(scroll|auto)/)&&(s=r.scrollHeight-r.clientHeight)>0&&(r.scrollTop>0&&o<0||r.scrollTop<s&&o>0))return!0;if(n&&a.overflowX.match(/(scroll|auto)/)&&(l=r.scrollWidth-r.clientWidth)>0&&(r.scrollLeft>0&&n<0||r.scrollLeft<l&&n>0))return!0;r=r.parentNode}return!1})(n.target,a,s)||(o=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?i.scrollTop-=s*t.settings.wheelSpeed:i.scrollTop+=a*t.settings.wheelSpeed,o=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(a?i.scrollLeft+=a*t.settings.wheelSpeed:i.scrollLeft-=s*t.settings.wheelSpeed,o=!0):(i.scrollTop-=s*t.settings.wheelSpeed,i.scrollLeft+=a*t.settings.wheelSpeed),u(t),o=o||function(e,n){var o=Math.floor(i.scrollTop),r=0===i.scrollTop,a=o+i.offsetHeight===i.scrollHeight,s=0===i.scrollLeft,l=i.scrollLeft+i.offsetWidth===i.scrollWidth;return!(Math.abs(n)>=Math.abs(e)?r&&n>0||a&&n<0:s&&e>0||l&&e<0)||!t.settings.wheelPropagation}(a,s),o&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault()))}var i=t.element;void 0!==window.onwheel?t.event.bind(i,"wheel",n):void 0!==window.onmousewheel&&t.event.bind(i,"mousewheel",n)},touch:function(t){function n(e,n){l.scrollTop-=n,l.scrollLeft-=e,u(t)}function i(e){return e.targetTouches?e.targetTouches[0]:e}function o(e){return!(e.pointerType&&"pen"===e.pointerType&&0===e.buttons||(!e.targetTouches||1!==e.targetTouches.length)&&(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function r(e){if(o(e)){var t=i(e);c.pageX=t.pageX,c.pageY=t.pageY,d=(new Date).getTime(),null!==m&&clearInterval(m)}}function a(r){var a,s,u,m,h,g;if(o(r)){if(u=(s={pageX:(a=i(r)).pageX,pageY:a.pageY}).pageX-c.pageX,m=s.pageY-c.pageY,function(t,n,i){var o,r,a,s;if(!l.contains(t))return!1;for(o=t;o&&o!==l;){if(o.classList.contains(w.element.consuming))return!0;if(r=e(o),i&&r.overflowY.match(/(scroll|auto)/)&&(a=o.scrollHeight-o.clientHeight)>0&&(o.scrollTop>0&&i<0||o.scrollTop<a&&i>0))return!0;if(n&&r.overflowX.match(/(scroll|auto)/)&&(s=o.scrollWidth-o.clientWidth)>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<s&&n>0))return!0;o=o.parentNode}return!1}(r.target,u,m))return;n(u,m),c=s,(g=(h=(new Date).getTime())-d)>0&&(p.x=u/g,p.y=m/g,d=h),function(e,n){var i=Math.floor(l.scrollTop),o=l.scrollLeft,r=Math.abs(e),a=Math.abs(n);if(a>r){if(n<0&&i===t.contentHeight-t.containerHeight||n>0&&0===i)return 0===window.scrollY&&n>0&&f.isChrome}else if(r>a&&(e<0&&o===t.contentWidth-t.containerWidth||e>0&&0===o))return!0;return!0}(u,m)&&r.preventDefault()}}function s(){t.settings.swipeEasing&&(clearInterval(m),m=setInterval((function(){t.isInitialized?clearInterval(m):p.x||p.y?Math.abs(p.x)<.01&&Math.abs(p.y)<.01?clearInterval(m):t.element?(n(30*p.x,30*p.y),p.x*=.8,p.y*=.8):clearInterval(m):clearInterval(m)}),10))}var l,c,d,p,m;(f.supportsTouch||f.supportsIePointer)&&(l=t.element,c={},d=0,p={},m=null,f.supportsTouch?(t.event.bind(l,"touchstart",r),t.event.bind(l,"touchmove",a),t.event.bind(l,"touchend",s)):f.supportsIePointer&&(window.PointerEvent?(t.event.bind(l,"pointerdown",r),t.event.bind(l,"pointermove",a),t.event.bind(l,"pointerup",s)):window.MSPointerEvent&&(t.event.bind(l,"MSPointerDown",r),t.event.bind(l,"MSPointerMove",a),t.event.bind(l,"MSPointerUp",s))))}},(b=function(i,o){var r,a,s,l,c,p,m,f=this;if(void 0===o&&(o={}),"string"==typeof i&&(i=document.querySelector(i)),!i||!i.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(r in this.element=i,i.classList.add(w.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},o)this.settings[r]=o[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null,a=function(){return i.classList.add(w.state.focus)},s=function(){return i.classList.remove(w.state.focus)},this.isRtl="rtl"===e(i).direction,!0===this.isRtl&&i.classList.add(w.rtl),this.isNegativeScroll=(p=i.scrollLeft,null,i.scrollLeft=-1,m=i.scrollLeft<0,i.scrollLeft=p,m),this.negativeScrollAdjustment=this.isNegativeScroll?i.scrollWidth-i.clientWidth:0,this.event=new h,this.ownerDocument=i.ownerDocument||document,this.scrollbarXRail=n(w.element.rail("x")),i.appendChild(this.scrollbarXRail),this.scrollbarX=n(w.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null,l=e(this.scrollbarXRail),this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=d(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=d(l.borderLeftWidth)+d(l.borderRightWidth),t(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=d(l.marginLeft)+d(l.marginRight),t(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=n(w.element.rail("y")),i.appendChild(this.scrollbarYRail),this.scrollbarY=n(w.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null,c=e(this.scrollbarYRail),this.scrollbarYRight=parseInt(c.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=d(c.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var n=e(t);return d(n.width)+d(n.paddingLeft)+d(n.paddingRight)+d(n.borderLeftWidth)+d(n.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=d(c.borderTopWidth)+d(c.borderBottomWidth),t(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=d(c.marginTop)+d(c.marginBottom),t(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:i.scrollLeft<=0?"start":i.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:i.scrollTop<=0?"start":i.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return g[e](f)})),this.lastScrollTop=Math.floor(i.scrollTop),this.lastScrollLeft=i.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return f.onScroll(e)})),u(this)}).prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,t(this.scrollbarXRail,{display:"block"}),t(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=d(e(this.scrollbarXRail).marginLeft)+d(e(this.scrollbarXRail).marginRight),this.railYMarginHeight=d(e(this.scrollbarYRail).marginTop)+d(e(this.scrollbarYRail).marginBottom),t(this.scrollbarXRail,{display:"none"}),t(this.scrollbarYRail,{display:"none"}),u(this),c(this,"top",0,!1,!0),c(this,"left",0,!1,!0),t(this.scrollbarXRail,{display:""}),t(this.scrollbarYRail,{display:""}))},b.prototype.onScroll=function(e){this.isAlive&&(u(this),c(this,"top",this.element.scrollTop-this.lastScrollTop),c(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},b.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},b.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")},b})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Form/XsrfToken","./Language","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password","./Ui/Empty","./Ui/Object/Action","./Ui/Object/Action/Delete","./Ui/Object/Action/Toggle","./Ui/Search","./LazyLoader","./Helper/PageOverlay","perfect-scrollbar"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h,f,g,b,v,w,y,_,E,S,C,L){"use strict";function k(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importStar(d),u=n.__importDefault(u),p=n.__importDefault(p),m=n.__importStar(m),h=n.__importStar(h),f=n.__importStar(f),g=n.__importStar(g),b=n.__importStar(b),v=n.__importStar(v),w=n.__importStar(w),y=n.__importStar(y),_=n.__importStar(_),E=n.__importStar(E),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=l,t.setup=function(t){t=i.extend({colorScheme:"light",enableMobileMenu:!0,pageMenuMainProvider:void 0},t),c.setup(),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),(0,L.adoptPageOverlayContainer)(document.body),s.setup(),o.default.init(),p.default.setup(),m.setup(t.enableMobileMenu,t.pageMenuMainProvider),f.setup(),u.default.setup(),g.setup(),v.setup(),w.setup(),y.setup(),_.setup(),E.setup(),(0,S.init)(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===s.browser()&&(window.onbeforeunload=()=>{});let l=0;l=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(l),window.jQuery((()=>{h.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==s.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),window.requestAnimationFrame((()=>{const e=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.setProperty("--scrollbar-width",`${e}px`)})),k(),a.default.add("WoltLabSuite/Core/Bootstrap",(()=>k)),t.dynamicColorScheme&&new Promise(((t,n)=>{e(["./Controller/Style/ColorScheme"],t,n)})).then(n.__importStar).then((({setup:e})=>{e()})),(0,C.whenFirstSeen)("[data-report-content]",(()=>{new Promise(((t,n)=>{e(["./Ui/Moderation/Report"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-pagination",(()=>{new Promise(((t,n)=>{e(["./Ui/Pagination/JumpToPage"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-google-maps",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/woltlab-core-google-maps"],t,n)})).then(n.__importStar)})),(0,C.whenFirstSeen)("[data-google-maps-geocoding]",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/Geocoding"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-file",(()=>{new Promise(((t,n)=>{e(["./Component/File/woltlab-core-file"],t,n)})).then(n.__importStar)})),(0,C.whenFirstSeen)("woltlab-core-file-upload",(()=>{new Promise(((t,n)=>{e(["./Component/File/woltlab-core-file"],t,n)})).then(n.__importStar),new Promise(((t,n)=>{e(["./Component/File/Upload"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes){if(!(e instanceof HTMLElement))continue;if(null===e.querySelector(".g-recaptcha-bubble-arrow"))continue;const t=e.querySelector("iframe");if(!t)continue;const n="a-"+t.name.split("-")[1],i=document.querySelector(`iframe[name="${n}"]`);i&&(i.closest("woltlab-core-dialog")&&((0,L.getPageOverlayContainer)().append(e),e.classList.add("g-recaptcha-container")))}})).observe(document.body,{childList:!0})}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,n,i){"use strict";function o(){for(let e=0,t=a.length;e<t;e++){const t=a[e];s.has(t)||(t.addEventListener("click",r,{once:!0}),s.add(t))}}function r(e){e.preventDefault();const t=e.currentTarget;t.classList.remove("ignoredUserMessage"),s.delete(t),window.getSelection().removeAllRanges()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importDefault(i);const a=document.getElementsByClassName("ignoredUserMessage"),s=new Set;t.init=function(){o(),i.default.add("WoltLabSuite/Core/Ui/User/Ignore",o)}})),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["require","exports","tslib","../../../Environment","../../../Language","../../Screen"],(function(e,t,n,i,o,r){"use strict";function a(){f=!0,"safari"===i.browser()?window.setTimeout(c,1e3):window.requestAnimationFrame((()=>c()))}function s(){f=!1}function l(e){g=Math.min(g+e,0),m.style.setProperty("margin-left",`${g}px`,"")}function c(){if(!f)return;b=[],v=[];const e=h.clientWidth,t=h.scrollWidth;!p&&t>e&&(u=document.createElement("a"),u.className="mainMenuShowNext",u.href="#",u.innerHTML='<fa-icon size="32" name="angle-right" solid></fa-icon>',u.setAttribute("aria-hidden","true"),u.addEventListener("click",(e=>{e.preventDefault(),function(){if(v.length){const e=v.slice(0,3).pop();l(h.clientWidth-(e.offsetLeft+e.clientWidth)),h.lastElementChild===e&&u.classList.remove("active"),p.classList.add("active")}}()})),h.insertAdjacentElement("beforebegin",u),p=document.createElement("a"),p.className="mainMenuShowPrevious",p.href="#",p.innerHTML='<fa-icon size="32" name="angle-left" solid></fa-icon>',p.setAttribute("aria-hidden","true"),p.addEventListener("click",(e=>{e.preventDefault(),function(){if(b.length){const e=b.slice(-3)[0];l(-1*e.offsetLeft),h.firstElementChild===e&&p.classList.remove("active"),u.classList.add("active")}}()})),h.insertAdjacentElement("afterend",p)),(t>e||g<0)&&Array.from(h.children).forEach((t=>{const n=t.offsetLeft;n<0?b.push(t):n+t.clientWidth>e&&v.push(t)})),p?.classList[b.length?"add":"remove"]("active"),u?.classList[v.length?"add":"remove"]("active")}function d(){m.addEventListener("transitionend",c),new ResizeObserver((()=>{m.style.setProperty("margin-left","0px",""),g=0,c()})).observe(h),a(),h.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const n=document.createElement("button");n.type="button",n.className="visuallyHidden",n.setAttribute("aria-label",o.get("wcf.global.button.showMenu")),e.insertBefore(n,t.nextSibling);let i=!1;n.addEventListener("click",(()=>{i=!i,t.setAttribute("aria-expanded",i?"true":"false"),n.setAttribute("aria-label",o.get(i?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r);let u,p,m,h,f=!1,g=0,b=[],v=[];t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");h=e,m=t,r.on("screen-lg",{match:a,unmatch:s,setup:d})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class n{userId;username;link;guestTokenDialogEndpoint;constructor(e,t,n,i){this.userId=e,this.username=t,this.link=n,this.guestTokenDialogEndpoint=i}}let i;return{getLink:()=>i.link,init(e,t,o,r=""){if(i)throw new Error("User has already been initialized.");i=new n(e,t,o,r)},get userId(){return i.userId},get username(){return i.username},get guestTokenDialogEndpoint(){return i.guestTokenDialogEndpoint}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l);class c{enableAll=!1;constructor(){"all"===window.sessionStorage.getItem(`${r.getStoragePrefix()}user-consent`)&&(this.enableAll=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){this.enableAll?this.enableAllExternalMedia():(0,i.wheneverFirstSeen)(".jsButtonMessageUserConsentEnable",(e=>{e.addEventListener("click",(e=>this.click(e)))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),l.default.userId?o.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${r.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){if(e.dataset.target)document.getElementById(e.dataset.target).hidden=!1;else{const t=atob(e.dataset.payload);s.default.insertHtml(t,e,"before")}e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let d;t.init=function(){d||(d=new c)}})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function n(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyElementTextToClipboard=t.copyTextToClipboard=void 0,t.copyTextToClipboard=n,t.copyElementTextToClipboard=async function(e){return n(e.textContent.replace(/\u200B/g,"").replace(/\u00A0/g," "))}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","../Helper/PageOverlay","../Language"],(function(e,t,n,i){"use strict";function o(){clearTimeout(s),a.classList.remove("active"),null!==c&&c(),l=!1}Object.defineProperty(t,"__esModule",{value:!0}),t.show=void 0;let r,a,s,l=!1,c=null,d=!1;t.show=function(e,t,u){l||(l=!0,d||(d=!0,a=document.createElement("div"),a.id="systemNotification",r=document.createElement("p"),r.addEventListener("click",o),a.appendChild(r),(0,n.getPageOverlayContainer)().appendChild(a)),c="function"==typeof t?t:null,r.className=u||"success",r.textContent=(0,i.getPhrase)(e||"wcf.global.success"),a.classList.add("active"),s=window.setTimeout(o,2e3))}})),define("WoltLabSuite/Core/Ui/Message/Share/Providers",["require","exports"],(function(e,t){"use strict";function n(e){i.add(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getShareProviders=t.addShareProviders=t.addShareProvider=void 0;const i=new Set;t.addShareProvider=n,t.addShareProviders=function(e){e.forEach((e=>n(e)))},t.getShareProviders=function(){return i}})),define("WoltLabSuite/Core/Ui/Message/Share/Dialog",["require","exports","tslib","../../../Dom/Traverse","../../../Clipboard","../../Notification","../../../StringUtil","../../../Dom/Change/Listener","./Providers","../../../Component/Dialog","WoltLabSuite/Core/Language","../../../Event/Handler"],(function(e,t,n,i,o,r,a,s,l,c,d,u){"use strict";function p(e,t){return`\n    <dl>\n      <dt>${(0,d.getPhrase)(e)}</dt>\n      <dd>\n        <div class="inputAddon">\n          <input type="text" class="long" readonly value="${a.escapeHTML(t)}">\n          <button type="button" class="inputSuffix button jsTooltip shareDialogCopyButton" title="${(0,d.getPhrase)("wcf.message.share.copy")}">\n            <fa-icon name="copy"></fa-icon>\n          </button>\n        </div>\n      </dd>\n    </dl>\n  `}function m(e){e.preventDefault();const t=e.currentTarget,n=f(t),s=function(){const e=Array.from((0,l.getShareProviders)()).map((e=>{const[t,n,i]=e;return`\n      <li>\n        <button type="button" class="button small messageShareProvider" title="${n}" aria-label="${n}" data-identifier="${t}">\n          ${i}\n        </button>\n      </li>\n    `})).join("\n");return e?`<ul class="inlineList">${e}</ul>`:""}();let m="";s&&(m=`\n        <dl class="messageShareButtons jsMessageShareButtons" data-url="${a.escapeHTML(n)}">\n          <dt>${(0,d.getPhrase)("wcf.message.share.socialMedia")}</dt>\n          <dd>${s}</dd>\n        </dl>\n      `);let h="";w&&(h=`\n        <dl>\n          <dt></dt>\n          <dd>\n              <button type="button" class="button shareDialogNativeButton" data-url="${a.escapeHTML(n)}" data-title="${a.escapeHTML(t.dataset.linkTitle||"")}">\n                ${(0,d.getPhrase)("wcf.message.share.nativeShare")}\n              </button>\n          </dd>\n        </dl>\n      `);const v=`\n      <div class="shareContentDialog">\n        ${function(e){let t=p("wcf.message.share.permalink",f(e));return function(e){const t={bbcodes:[]},n=new CustomEvent("share:bbcodes",{cancelable:!0,detail:t}),i=f(e);return e.dispatchEvent(n),n.defaultPrevented?t.bbcodes:e.dataset.bbcode?[["wcf.message.share.permalink.bbcode",e.dataset.bbcode]]:i&&e.dataset.linkTitle?[["wcf.message.share.permalink.bbcode",`[url='${i}']${e.dataset.linkTitle}[/url]`]]:[]}(e).forEach((([e,n])=>{t+=p(e,n)})),function(e){const t={permalinkHtml:[]},n=new CustomEvent("share:permalink-html",{cancelable:!0,detail:t}),i=f(e);return e.dispatchEvent(n),n.defaultPrevented?t.permalinkHtml:i&&e.dataset.linkTitle?[["wcf.message.share.permalink.html",`<a href="${a.escapeHTML(i)}">${a.escapeHTML(e.dataset.linkTitle)}</a>`]]:[]}(e).forEach((([e,n])=>{t+=p(e,n)})),t}(t)}\n        ${m}\n        ${h}\n      </div>\n    `,y=(0,c.dialogFactory)().fromHtml(v).withoutControls();y.content.querySelectorAll(".shareDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n=i.prevBySel(t,'input[type="text"]');await o.copyTextToClipboard(n.value),r.show((0,d.getPhrase)("wcf.message.share.copy.success"))}(e))))),w&&y.content.querySelector(".shareDialogNativeButton").addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n={url:t.dataset.url};t.dataset.title&&(n.title=t.dataset.title),await window.navigator.share(n)}(e))),s&&function(e,t){const n={facebook:{selector:'.messageShareProvider[data-identifier="Facebook"]',share(){g("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{selector:'.messageShareProvider[data-identifier="Reddit"]',share(){g("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{selector:'.messageShareProvider[data-identifier="Twitter"]',share(){g("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{selector:'.messageShareProvider[data-identifier="LinkedIn"]',share(){g("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{selector:'.messageShareProvider[data-identifier="Pinterest"]',share(){g("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{selector:'.messageShareProvider[data-identifier="XING"]',share(){g("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{selector:'.messageShareProvider[data-identifier="WhatsApp"]',share(){window.location.href="https://api.whatsapp.com/send?text="+b()+"%20"+t}}};u.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:n,pageDescription:b(),pageUrl:t}),Object.values(n).forEach((t=>{e.querySelector(t.selector)?.addEventListener("click",(()=>t.share()))}))}(y.content,n),y.show((0,d.getPhrase)("wcf.message.share"))}function h(){document.querySelectorAll(".shareButton, .wsShareButton").forEach((e=>{v.has(e)||(e.addEventListener("click",(e=>m(e))),v.add(e))}))}function f(e){return e instanceof HTMLAnchorElement?e.href:e.dataset.link}function g(e,t,n,i){window.open(t.replace("{pageURL}",i).replace("{text}",b()+(n?`%20${i}`:"")),e,"height=600,width=600")}function b(){const e=document.querySelector('meta[property="og:title"]');return null!==e?encodeURIComponent(e.content):""}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s),u=n.__importStar(u);const v=new WeakSet,w=void 0!==window.navigator.share;t.setup=function(){h(),s.default.add("WoltLabSuite/Core/Ui/Message/Share/Dialog",(()=>h()))}})),define("WoltLabSuite/Core/Ui/Feed/Dialog",["require","exports","tslib","../Dialog","../../StringUtil","../../Language","../../Clipboard","../Notification"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),t.setup=function(){document.querySelectorAll("a.rssFeed").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget,n=t.href,l=n.replace(/(\\?|&)at=[^&]*&?/,"$1").replace(/(\?|&)$/,"");i.default.openStatic("feedLinkDialog",`\n<woltlab-core-notice type="info">${r.get("wcf.global.rss.accessToken.info")}</woltlab-core-notice>\n<dl>\n  <dt>${r.get("wcf.global.rss.withoutAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${o.escapeHTML(l)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </button>\n    </div>\n  </dd>\n</dl>\n<dl>\n  <dt>${r.get("wcf.global.rss.withAccessToken")}</dt>\n  <dd>\n    <div class="inputAddon">\n      <input type="text" class="long" readonly value="${o.escapeHTML(n)}">\n      <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n        <fa-icon name="copy"></fa-icon>\n      </a>\n    </div>\n  </dd>\n</dl>\n`,{onShow(e){e.querySelectorAll(".feedLinkDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget.parentNode.querySelector('input[type="text"]');await a.copyTextToClipboard(t.value),s.show(r.get("wcf.global.rss.copy.success"))}(e)))))},title:t.title||r.get("wcf.global.button.rss")})}(e)))}))}})),define("WoltLabSuite/Core/Ui/Page/Menu/Main/Frontend",["require","exports"],(function(e,t){"use strict";function n(e,t){const i=e.querySelector(".boxMenuLink"),o=i.querySelector(".boxMenuLinkTitle").textContent;let r=0;const a=i.querySelector(".boxMenuLinkOutstandingItems");a&&(r=parseInt(a.textContent.replace(/[^0-9]/,""),10));const s=e.querySelector("ol");let l=[];if(s instanceof HTMLOListElement){let e=t;e<3&&(e=t+1),l=Array.from(s.children).map((t=>n(t,e)))}const c=i.getAttribute("href");let d,u;return c&&"#"!==c&&(d=i.href,"_blank"===i.target&&(u=!0)),{active:e.classList.contains("active"),children:l,counter:r,depth:t,identifier:i.parentElement.dataset.identifier,link:d,openInNewWindow:u,title:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.UiPageMenuMainFrontend=void 0;class i{getMenuItems(e){return Array.from(e.children).map((e=>n(e,0)))}}t.UiPageMenuMainFrontend=i,t.default=i})),define("WoltLabSuite/Core/Notification/ServiceWorker",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,n){"use strict";function i(){return"https:"===location.protocol&&"serviceWorker"in window.navigator&&"PushManager"in window&&"showNotification"in ServiceWorkerRegistration.prototype&&(!("Notification"in window)||"denied"!==Notification.permission)}function o(){r?.register()}Object.defineProperty(t,"__esModule",{value:!0}),t.registerServiceWorker=t.setup=t.serviceWorkerSupported=void 0;let r=null;class a{#E;#S;#C;#L;constructor(e,t,n){this.#E=e,this.#S=t,this.#C=n,window.navigator.serviceWorker.register(this.#S,{scope:"/"}),this.#L=window.navigator.serviceWorker.ready}async register(){const e=await(await this.#L).pushManager.getSubscription();if(e&&this.#k(e))return;await this.unsubscribe(e);const t=await(await this.#L).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:this.#x(this.#E)});t&&await this.#T(t)}async unsubscribe(e){e&&(await this.#T(e,!0),await e.unsubscribe())}#k(e){let t=window.btoa(String.fromCharCode(...new Uint8Array(e.options.applicationServerKey)));return t=t.replace(/\+/g,"-").replace(/\//g,"_"),t=t.replace(/=+$/,""),t===this.#E}async#T(e,t=!1){const i=e.getKey("p256dh"),o=e.getKey("auth"),r=(PushManager.supportedContentEncodings||["aes128gcm"])[0];try{await(0,n.prepareRequest)(this.#C).post({remove:t,endpoint:e.endpoint,publicKey:i?window.btoa(String.fromCharCode(...new Uint8Array(i))):null,authToken:o?window.btoa(String.fromCharCode(...new Uint8Array(o))):null,contentEncoding:r}).disableLoadingIndicator().fetchAsResponse()}catch(e){}}#x(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),n=window.atob(t),i=new Uint8Array(n.length);for(let e=0;e<n.length;++e)i[e]=n.charCodeAt(e);return i}}t.serviceWorkerSupported=i,t.setup=function(e,t,n){i()&&(r=new a(e,t,n),"granted"===Notification.permission&&o())},t.registerServiceWorker=o})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent","./Ui/Message/Share/Dialog","./Ui/Message/Share/Providers","./Ui/Feed/Dialog","./User","./Ui/Page/Menu/Main/Frontend","./LazyLoader","./Ajax/Backend","./Notification/ServiceWorker"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importStar(l),d=n.__importStar(d),u=n.__importDefault(u),p=n.__importDefault(p),t.setup=function(t){var r;t.backgroundQueue.url=window.WSC_API_URL+t.backgroundQueue.url.substr(window.WCF_PATH.length),o.setup({dynamicColorScheme:t.dynamicColorScheme,enableMobileMenu:!0,pageMenuMainProvider:new p.default}),a.init(),t.styleChanger&&new Promise(((t,n)=>{e(["./Controller/Style/Changer"],t,n)})).then(n.__importStar).then((e=>{e.setup()})),""!==(r=t.endpointUserPopover)&&(0,m.whenFirstSeen)(".userLink",(()=>{new Promise(((t,n)=>{e(["./Component/Popover"],t,n)})).then(n.__importStar).then((({setupFor:e})=>{e({endpoint:r,identifier:"com.woltlab.wcf.user",selector:".userLink"})}))})),void 0!==t.executeCronjobs&&(0,h.prepareRequest)(t.executeCronjobs).get().disableLoadingIndicator().fetchAsResponse().catch((()=>{})),i.setUrl(t.backgroundQueue.url),(Math.random()<.1||t.backgroundQueue.force)&&i.invoke(),s.init(),t.shareButtonProviders&&(0,c.addShareProviders)(t.shareButtonProviders),l.setup(),u.default.userId&&(d.setup(),t.serviceWorker&&(0,f.setup)(t.serviceWorker.publicKey,t.serviceWorker.serviceWorkerJsUrl,t.serviceWorker.registerUrl)),(0,m.whenFirstSeen)("woltlab-core-reaction-summary",(()=>{new Promise(((t,n)=>{e(["./Ui/Reaction/SummaryDetails"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,m.whenFirstSeen)("woltlab-core-comment",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/woltlab-core-comment"],t,n)})).then(n.__importStar)})),(0,m.whenFirstSeen)("woltlab-core-comment-response",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/Response/woltlab-core-comment-response"],t,n)})).then(n.__importStar)})),(0,m.whenFirstSeen)("[data-follow-user]",(()=>{new Promise(((t,n)=>{e(["./Component/User/Follow"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,m.whenFirstSeen)("[data-ignore-user]",(()=>{new Promise(((t,n)=>{e(["./Component/User/Ignore"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))}))}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(e>359)throw new TypeError("Hue cannot be larger than 359°");t/=100,n/=100;const i=(1-Math.abs(2*n-1))*t,o=i*(1-Math.abs(e/60%2-1)),r=n-i/2,[a,s,l]=0<=e&&e<60&&[i,o,0]||60<=e&&e<120&&[o,i,0]||120<=e&&e<180&&[0,i,o]||180<=e&&e<240&&[0,o,i]||240<=e&&e<300&&[o,0,i]||300<=e&&e<360&&[i,0,o];return{r:Math.round(255*(a+r)),g:Math.round(255*(s+r)),b:Math.round(255*(l+r))}}function i(e,t,n){const i={r:0,g:0,b:0},o=Math.floor(e/60),r=e/60-o,a=(n/=100)*(1-(t/=100)),s=n*(1-t*r),l=n*(1-t*(1-r));if(0==t)i.r=i.g=i.b=n;else switch(o){case 1:i.r=s,i.g=n,i.b=a;break;case 2:i.r=a,i.g=n,i.b=l;break;case 3:i.r=a,i.g=s,i.b=n;break;case 4:i.r=l,i.g=a,i.b=n;break;case 5:i.r=n,i.g=a,i.b=s;break;case 0:case 6:i.r=n,i.g=l,i.b=a}return{r:Math.round(255*i.r),g:Math.round(255*i.g),b:Math.round(255*i.b)}}function o(e,t,n){let i,o;e/=255,t/=255,n/=255;const r=Math.max(e,t,n),a=Math.min(e,t,n),s=r-a;if(i=0,r!==a){switch(r){case e:i=(t-n)/s*60;break;case t:i=60*(2+(n-e)/s);break;case n:i=60*(4+(e-t)/s)}i<0&&(i+=360)}const l=(r+a)/2;return o=0===s?0:s/(1-Math.abs(2*l-1)),{h:Math.round(i),s:Math.round(100*o),l:Math.round(100*l)}}function r(e,t,n){let i,o;e/=255,t/=255,n/=255;const r=Math.max(Math.max(e,t),n),a=Math.min(Math.min(e,t),n),s=r-a;if(i=0,r!==a){switch(r){case e:i=(t-n)/s*60;break;case t:i=60*(2+(n-e)/s);break;case n:i=60*(4+(e-t)/s)}i<0&&(i+=360)}return o=0===r?0:s/r,{h:Math.round(i),s:Math.round(100*o),v:Math.round(100*r)}}function a(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function s(e){if(e<0||e>255)throw new Error(`Invalid RGB component value '${e}' given.`);return e.toString(16).padStart(2,"0").toUpperCase()}function l(e,t,n){if(void 0===t){const i=/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString());if(!i)throw new Error("Invalid RGB data given.");e=+i[1],t=+i[2],n=+i[3]}return s(e)+s(t)+s(n)}function c(e){if(e<0||e>1)throw new Error(`Invalid alpha value '${e}' given.`);return Math.round(255*e).toString(16).padStart(2,"0").toUpperCase()}function d(e,t,n,i){if(void 0===t){const t=e;return l(t.r,t.g,t.b)+c(t.a)}return l(e,t,n)+c(i)}function u(e){return`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}function p(){let e=document.getElementById("jsColorUtilColorChecker");return null===e&&(e=document.createElement("span"),e.id="jsColorUtilColorChecker",document.body.appendChild(e)),e}function m(e){const t=p();return t.style.color="",t.style.color=e,""!==t.style.color}function h(e){if(!m(e))throw new Error(`Given string '${e}' is no valid color.`);const t=p();t.style.color=e;const n=window.getComputedStyle(t).color,i=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/.exec(n);if(i)return{r:+i[1],g:+i[2],b:+i[3],a:1};{const e=/^rgba\((\d+), ?(\d+), ?(\d+), ?([0-9.]+)\)$/.exec(n);if(e)return{r:+e[1],g:+e[2],b:+e[3],a:+e[4]}}throw new Error(`Cannot process color '${e}'.`)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringToRgba=t.isValidColor=t.rgbaToString=t.rgbaToHex=t.rgbToHex=t.hexToRgb=t.rgbToHsv=t.rgbToHsl=t.hsvToRgb=t.hslToRgb=void 0,t.hslToRgb=n,t.hsvToRgb=i,t.rgbToHsl=o,t.rgbToHsv=r,t.hexToRgb=a,t.rgbToHex=l,t.rgbaToHex=d,t.rgbaToString=u,t.isValidColor=m,t.stringToRgba=h,window.__wcf_bc_colorUtil={hexToRgb:a,hslToRgb:n,hsvToRgb:i,isValidColor:m,rgbaToHex:d,rgbaToString:u,rgbToHex:l,rgbToHsv:r,rgbToHsl:o,stringToRgba:h}})),define("WoltLabSuite/Core/Dictionary",["require","exports"],(function(e,t){"use strict";class n{_dictionary=new Map;set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,n=e.length;t<n;t++)e[t].forEach(((e,t)=>this.set(t,e)))}toObject(){const e={};return this._dictionary.forEach(((t,n)=>e[n]=t)),e}static fromObject(e){const t=new n;return Object.keys(e).forEach((n=>{t.set(n,e[n])})),t}get size(){return this._dictionary.size}}return n})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,n,i){"use strict";function o(e){return a.has(e)?"."+a.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,i=n.__importStar(i);const r=new Map(Object.entries({zip:"zipper",rar:"zipper",tar:"zipper",gz:"zipper",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",webp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"lines",doc:"word",docx:"word",odt:"word"})),a=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt","public.jpeg":"jpeg","public.png":"png","com.compuserve.gif":"gif","org.webmproject.webp":"webp"}));t.formatFilesize=function(e,t=2){let n="Byte";return e>=1e3&&(e/=1e3,n="kB"),e>=1e3&&(e/=1e3,n="MB"),e>=1e3&&(e/=1e3,n="GB"),e>=1e3&&(e/=1e3,n="TB"),i.formatNumeric(e,-t)+" "+n},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const n=e.substr(t+1);if(r.has(n))return r.get(n)}return""},t.getExtensionByMimeType=o,t.blobToFile=function(e,t){const n=o(e.type);return new File([e],t+n,{type:e.type})}})),define("WoltLabSuite/Core/List",["require","exports"],(function(e,t){"use strict";return class{_set=new Set;add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=void 0,t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let n=e.toString().split("e"),i=n[1]?+n[1]-t:-t;return n=(e=Math.round(+`${n[0]}e${i}`)).toString().split("e"),i=n[1]?+n[1]+t:t,+`${n[0]}e${i}`}})),define("WoltLabSuite/Core/ObjectMap",["require","exports"],(function(e,t){"use strict";return class{_map=new WeakMap;set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function n(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");i.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const i=new Map;t.add=n,t.addObject=function(e){Object.keys(e).forEach((t=>n(t,e[t])))},t.get=function(e){return!!i.has(e)&&i.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,n,i){this.type=e,this.content=t,this.alias=n,this.length=0|(i||"").length}function n(e,t,n,i){var o,r;return e.lastIndex=t,(o=e.exec(n))&&i&&o[1]&&(r=o[1].length,o.index+=r,o[0]=o[0].slice(r)),o}function i(e,o,s,l,c,d){var u,p,h,f,g,b,v,w,y,_,E,S,C,L,k,x,T,I,M,A,P,D,j,O,q;for(u in s)if(s.hasOwnProperty(u)&&s[u])for(p=s[u],p=Array.isArray(p)?p:[p],h=0;h<p.length;++h){if(d&&d.cause==u+","+h)return;for(g=(f=p[h]).inside,b=!!f.lookbehind,v=!!f.greedy,w=f.alias,v&&!f.pattern.global&&(y=f.pattern.toString().match(/[imsuy]*$/)[0],f.pattern=RegExp(f.pattern.source,y+"g")),_=f.pattern||f,E=l.next,S=c;E!==o.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){if(C=E.value,o.length>e.length)return;if(!(C instanceof t)){if(L=1,v){if(!(k=n(_,S,e,b))||k.index>=e.length)break;for(x=k.index,T=k.index+k[0].length,I=S,I+=E.value.length;x>=I;)I+=(E=E.next).value.length;if(S=I-=E.value.length,E.value instanceof t)continue;for(M=E;M!==o.tail&&(I<T||"string"==typeof M.value);M=M.next)L++,I+=M.value.length;L--,C=e.slice(S,I),k.index-=S}else if(!(k=n(_,0,C,b)))continue;x=k.index,A=k[0],P=C.slice(0,x),D=C.slice(x+A.length),j=S+C.length,d&&j>d.reach&&(d.reach=j),O=E.prev,P&&(O=r(o,O,P),S+=P.length),a(o,O,L),E=r(o,O,new t(u,g?m.tokenize(A,g):A,w,A)),D&&r(o,E,D),L>1&&(q={cause:u+","+h,reach:j},i(e,o,s,E.prev,S,q),d&&q.reach>d.reach&&(d.reach=q.reach))}}}}function o(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function r(e,t,n){var i=t.next,o={value:n,prev:t,next:i};return t.next=o,i.prev=o,e.length++,o}function a(e,t,n){var i,o=t.next;for(i=0;i<n&&o!==e.tail;i++)o=o.next;t.next=o,o.prev=t,e.length-=i}function s(){m.manual||m.highlightAll()}var l,c,d=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,u=0,p={},m={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof t?new t(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++u}),e.__id},clone:function e(t,n){var i,o,r;switch(n=n||{},m.util.type(t)){case"Object":if(o=m.util.objId(t),n[o])return n[o];for(r in i={},n[o]=i,t)t.hasOwnProperty(r)&&(i[r]=e(t[r],n));return i;case"Array":return o=m.util.objId(t),n[o]?n[o]:(i=[],n[o]=i,t.forEach((function(t,o){i[o]=e(t,n)})),i);default:return t}},getLanguage:function(e){for(;e;){var t=d.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(d,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){var e,t,n;if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){if(e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1])for(n in t=document.getElementsByTagName("script"))if(t[n].src==e)return t[n];return null}},isActive:function(e,t,n){for(var i,o="no-"+t;e;){if((i=e.classList).contains(t))return!0;if(i.contains(o))return!1;e=e.parentElement}return!!n}},languages:{plain:p,plaintext:p,text:p,txt:p,extend:function(e,t){var n,i=m.util.clone(m.languages[e]);for(n in t)i[n]=t[n];return i},insertBefore:function(e,t,n,i){var o,r,a,s,l;for(a in o=(i=i||m.languages)[e],r={},o)if(o.hasOwnProperty(a)){if(a==t)for(s in n)n.hasOwnProperty(s)&&(r[s]=n[s]);n.hasOwnProperty(a)||(r[a]=o[a])}return l=i[e],i[e]=r,m.languages.DFS(m.languages,(function(t,n){n===l&&t!=e&&(this[t]=r)})),r},DFS:function e(t,n,i,o){var r,a,s,l;for(a in o=o||{},r=m.util.objId,t)t.hasOwnProperty(a)&&(n.call(t,a,t[a],i||a),s=t[a],"Object"!==(l=m.util.type(s))||o[r(s)]?"Array"!==l||o[r(s)]||(o[r(s)]=!0,e(s,n,a,o)):(o[r(s)]=!0,e(s,n,null,o)))}},plugins:{},highlightAll:function(e,t){m.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var i,o,r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};for(m.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),m.hooks.run("before-all-elements-highlight",r),i=0;o=r.elements[i++];)m.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,n,i){function o(e){s.highlightedCode=e,m.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,m.hooks.run("after-highlight",s),m.hooks.run("complete",s),i&&i.call(s.element)}var r,a,s,l,c=m.util.getLanguage(t),d=m.languages[c];if(m.util.setLanguage(t,c),(r=t.parentElement)&&"pre"===r.nodeName.toLowerCase()&&m.util.setLanguage(r,c),a=t.textContent,s={element:t,language:c,grammar:d,code:a},m.hooks.run("before-sanity-check",s),(r=s.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!s.code)return m.hooks.run("complete",s),void(i&&i.call(s.element));m.hooks.run("before-highlight",s),s.grammar?n&&e.Worker?((l=new Worker(m.filename)).onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):o(m.highlight(s.code,s.grammar,s.language)):o(m.util.encode(s.code))},highlight:function(e,n,i){var o={code:e,grammar:n,language:i};if(m.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=m.tokenize(o.code,o.grammar),m.hooks.run("after-tokenize",o),t.stringify(m.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n,a,s=t.rest;if(s){for(n in s)t[n]=s[n];delete t.rest}return r(a=new o,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=m.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n,i,o=m.hooks.all[e];if(o&&o.length)for(n=0;i=o[n++];)i(t)}},Token:t};return e.Prism=m,t.stringify=function e(t,n){var i,o,r,a,s;if("string"==typeof t)return t;if(Array.isArray(t))return i="",t.forEach((function(t){i+=e(t,n)})),i;for(s in o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},(r=t.alias)&&(Array.isArray(r)?Array.prototype.push.apply(o.classes,r):o.classes.push(r)),m.hooks.run("wrap",o),a="",o.attributes)a+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},e.document?((l=m.util.currentScript())&&(m.filename=l.src,l.hasAttribute("data-manual")&&(m.manual=!0)),m.manual||("loading"===(c=document.readyState)||"interactive"===c&&l&&l.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),m):e.addEventListener?(m.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),i=n.language,o=n.code,r=n.immediateClose;e.postMessage(m.highlight(o,m.languages[i],i)),r&&e.close()}),!1),m):m}(_self),"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),define("prism/prism",(function(){})),window.Prism=window.Prism||{},window.Prism.manual=!0,define("WoltLabSuite/Core/Prism",["prism/prism"],(function(){return window.Prism.hooks.add("wrap",(e=>{e.classes=e.classes.map((e=>`prism-${e}`))})),Prism})),define("WoltLabSuite/Core/Template",["require","exports"],(function(e,t){"use strict";return window.WoltLabTemplate})),define("WoltLabSuite/Core/Api/Error",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=t.ApiError=void 0,t.ApiError=class{type;code;message;param;statusCode;constructor(e,t,n,i,o){this.type=e,this.code=t,this.message=n,this.param=i,this.statusCode=o}getValidationError(){if("invalid_request_error"===this.type&&400===this.statusCode)return new n(this.code,this.message,this.param)}};class n{code;message;param;constructor(e,t,n){this.code=e,this.message=t,this.param=n}}t.ValidationError=n})),define("WoltLabSuite/Core/Api/Result",["require","exports","../Ajax/Error","../Core","./Error"],(function(e,t,n,i,o){"use strict";async function r(e){const{response:t}=e;if(void 0===t)throw e;const n=t.headers.get("content-type");if(!n||!n.includes("application/json"))throw e;let r;try{r=await t.json()}catch{throw e}if((0,i.isPlainObject)(r)&&Object.hasOwn(r,"type")&&("api_error"===r.type||"invalid_request_error"===r.type)&&"string"==typeof r.code&&"string"==typeof r.message&&"string"==typeof r.param){const e=new o.ApiError(r.type,r.code,r.message,r.param,t.status);return{ok:!1,error:e,unwrap(){throw e}}}throw e}Object.defineProperty(t,"__esModule",{value:!0}),t.apiResultFromStatusNotOk=t.apiResultFromError=t.apiResultFromValue=void 0,t.apiResultFromValue=function(e){return{ok:!0,value:e,unwrap:()=>e}},t.apiResultFromError=async function(e){if(e instanceof n.StatusNotOk)return r(e);throw e},t.apiResultFromStatusNotOk=r})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=void 0,t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let n,i=document.createElement("span");for(;n=t.nextNode();){const t=n,o=t.data.split(/\r?\n/);for(let n=0,r=o.length;n<r;n++){const r=o[n];n>=1&&(i.appendChild(document.createTextNode("\n")),yield i,i=document.createElement("span"));let a=document.createTextNode(r),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(a),a=e,s=s.parentNode}i.appendChild(a)}}yield i}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper"],(function(e,t,n,i,o,r,a,s){"use strict";async function l(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s);class c{static chunkSize=50;container;codeContainer;language;constructor(e){this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e)))?.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new c(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("button");t.type="button",t.innerHTML='<fa-icon size="24" name="copy"></fa-icon>',t.classList.add("jsTooltip"),t.title=i.get("wcf.message.bbcode.code.copy");const n=async()=>{await o.copyElementTextToClipboard(this.codeContainer),r.show(i.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",(()=>n())),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");const t=(await new Promise(((t,n)=>{e(["../prism-meta"],t,n)})).then(n.__importStar)).default;if(!t[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((n,i)=>{e(["prism/components/prism-"+t[this.language].file],n,i)})).then(n.__importStar),await l();const i=a.default.languages[this.language];if(!i)throw new Error(`Invalid language '${this.language}' given.`);const o=document.createElement("div");o.innerHTML=a.default.highlight(this.codeContainer.textContent,i,this.language),await l();const r=this.codeContainer.querySelectorAll(".codeBoxLine > span"),d=s.splitIntoLines(o);for(let e=0,t=r.length;e<t;e+=c.chunkSize){await l();const n=Math.min(e+c.chunkSize,t);for(let t=e;t<n;t++){const e=r[t],n=d.next().value;e.parentNode.replaceChild(n,e)}}this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}}return c})),define("WoltLabSuite/Core/Bbcode/Collapsible",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(e.classList.toggle("collapsed")){if(t.forEach((e=>{const t=e.dataset.titleExpand,n=e.querySelector("fa-icon");n?(n.setIcon("up-right-and-down-left-from-center"),e.title=t):e.textContent=t})),n instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse,n=e.querySelector("fa-icon");n?(n.setIcon("down-left-and-up-right-to-center"),e.title=t):e.textContent=t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),i=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,i){t.forEach((i=>{i.classList.add("jsToggleButtonEnabled"),i.addEventListener("click",(i=>n(e,t,i))),i.addEventListener("keydown",(i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),n(e,t))}))})),0!==i.scrollTop&&(i.scrollTop=0,n(e,t)),i.addEventListener("scroll",(()=>{i.scrollTop=0,e.classList.contains("collapsed")&&n(e,t)}))}(e,t,i),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Component/Confirmation/Custom",["require","exports","tslib","../Dialog","../../Language"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationCustom=void 0,o=n.__importStar(o),t.ConfirmationCustom=class{#I;constructor(e){this.#I=e}async message(e){if(""===e.trim())throw new Error("An empty message for the delete confirmation was provided. Please use `defaultMessage()` if you do not want to provide a custom message.");const t=(0,i.dialogFactory)().fromHtml(`<p>${e}</p>`).asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return t.show(this.#I),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async withFormElements(e){const t=(0,i.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e(t),t.show(this.#I),new Promise((e=>{t.addEventListener("primary",(()=>{e({result:!0,dialog:t})})),t.addEventListener("cancel",(()=>{e({result:!1,dialog:t})}))}))}async withoutMessage(){const e=(0,i.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e.show(this.#I),new Promise((t=>{e.addEventListener("primary",(()=>t(!0))),e.addEventListener("cancel",(()=>t(!1)))}))}}})),define("WoltLabSuite/Core/Component/Confirmation",["require","exports","tslib","./Dialog","../Language","../Dom/Util","./Confirmation/Custom"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.confirmationFactory=void 0,r=n.__importStar(r);class s{custom(e){return new a.ConfirmationCustom(e)}async delete(e){const t=`<p>${(0,o.getPhrase)("wcf.dialog.confirmation.cannotBeUndone")}</p>`,n=(0,i.dialogFactory)().fromHtml(t).asConfirmation({primary:(0,o.getPhrase)("wcf.dialog.button.primary.delete")});let r;return r=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.delete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.delete",{title:e}),n.show(r),new Promise((e=>{n.addEventListener("primary",(()=>e(!0))),n.addEventListener("cancel",(()=>e(!1)))}))}async restore(e){const t=(0,i.dialogFactory)().withoutContent().asConfirmation();let n;return n=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.restore.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.restore",{title:e}),t.show(n),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async softDelete(e,t=!1){let n;if(n=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.softDelete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.softDelete",{title:e}),t)return this.withReason(n,!0);const r=(0,i.dialogFactory)().withoutContent().asConfirmation();return r.show(n),new Promise((e=>{r.addEventListener("primary",(()=>{e({result:!0})})),r.addEventListener("cancel",(()=>{e({result:!1})}))}))}async withReason(e,t){const n=(0,i.dialogFactory)().withoutContent().asConfirmation(),a=r.getUniqueId(),s=(0,o.getPhrase)(t?"wcf.dialog.confirmation.reason.optional":"wcf.dialog.confirmation.reason"),l=document.createElement("dl");l.innerHTML=`\n      <dt><label for="${a}">${s}</label></dt>\n      <dd><textarea id="${a}" cols="40" rows="3"></textarea></dd>\n    `;const c=l.querySelector("textarea");return n.content.append(l),n.show(e),new Promise((e=>{n.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),n.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=void 0,o=n.__importDefault(o),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,i.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class i{#M=new Map;#A;constructor(e){this.#A=new URL(e)}async get(e){let t=this.#M.get(e);if(void 0!==t)return t;this.#A.searchParams.set("id",e.toString());const i=await(0,n.prepareRequest)(this.#A).get().fetchAsResponse();return i?.ok?(t=await i.text(),this.#M.set(e,t),t):""}reset(e){this.#M.delete(e)}}t.SharedCache=i,t.default=i})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.setupFor=void 0,i=n.__importDefault(i),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l);class c{#P;#D=void 0;#j=!0;#O;#q;#B=void 0;#R=void 0;constructor(e,t,n){this.#P=e,this.#O=t,this.#q=n,t.addEventListener("mouseenter",(()=>{this.#F()})),t.addEventListener("mouseleave",(()=>{this.#N()}));const i=window.matchMedia("(hover:hover)");this.#U(i.matches),i.addEventListener("change",(e=>{this.#U(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#U(!1)})),this.#F()}#F(){this.#j&&(this.#R?.stop(),void 0===this.#B?this.#B=new a.default((e=>{e.stop();const t=this.#W();this.#P.get(t).then((e=>{if(""===e)return;const t=this.#H();i.default.setInnerHtml(t,e),s.set(t,this.#O,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#B.restart())}#N(){this.#j&&(this.#B?.stop(),void 0===this.#R?this.#R=new a.default((e=>{e.stop(),this.#D?.setAttribute("aria-hidden","true")}),500):this.#R.restart())}#U(e){this.#j=e,this.#D?.setAttribute("aria-hidden","true")}#W(){return parseInt(this.#O.dataset.objectId)}#H(){return void 0===this.#D&&(this.#D=document.createElement("div"),this.#D.classList.add("popoverContainer"),this.#D.dataset.identifier=this.#q,this.#D.setAttribute("aria-hidden","true"),this.#D.addEventListener("transitionend",(()=>{"true"===this.#D.getAttribute("aria-hidden")&&this.#D.remove()})),this.#D.addEventListener("mouseenter",(()=>{this.#R?.stop()})),this.#D.addEventListener("mouseleave",(()=>{this.#N()}))),null===this.#D.parentNode&&(0,o.getPageOverlayContainer)().append(this.#D),this.#D}}const d=new Map;t.setupFor=function(e){const{identifier:t,endpoint:n,selector:i}=e,o=new l.default(n);d.set(t,o),(0,r.wheneverFirstSeen)(i,(e=>{null===e.closest(".popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,i={add(e,t){if(n.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");n.set(e,t)},delete(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);n.delete(e)},has:e=>n.has(e),getData(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return n.get(e)()},setupDialog(e,t){let n;return e.addEventListener("validate",(e=>{i.has(t)&&(n=i.getData(t),i.delete(t),n instanceof Promise&&(e.detail.push(new Promise((e=>{n.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==n?n instanceof Promise?n.then((e=>{t(e)})):t(n):t({})}))}))}};return i})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,n,i,o,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.ajaxApi=t.setContent=t.init=void 0,i=n.__importStar(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((n=>{const i=r.default.identify(n);if(this.cache.has(i))return;if(null!==n.closest(".popover"))return void this.cache.set(i,{content:null,state:0});const o=e.legacy?i:~~n.getAttribute(e.attributeName);if(0===o)return;n.addEventListener("mouseenter",(e=>this.mouseEnter(e))),n.addEventListener("mouseleave",(()=>this.mouseLeave())),n instanceof HTMLAnchorElement&&n.href&&n.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;n.dataset.cacheId=a,this.elements.set(i,{element:n,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,n){const i=`${e}-${t}`,o=this.cache.get(i);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(n);a.childElementCount||(a=r.default.createFragmentFromHtml("<p>"+n+"</p>")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===i&&this.show()}resetCache(e,t){const n=`${e}-${t}`;this.cache.has(n)&&this.cache.set(n,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const n=t.element.dataset.cacheId,i=this.cache.get(n);switch(i.state){case 2:this.popoverContent.appendChild(i.content),this.rebuild();break;case 0:{i.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const n=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},n,n)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,n){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");i.api(this,e,t,n)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,n){l().setContent(e,t,n)},t.ajaxApi=function(e,t,n){l().ajaxApi(e,t,n)},t.resetCache=function(e,t){l().resetCache(e,t)}})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return n(e,"ArrowDown",40)},t.ArrowLeft=function(e){return n(e,"ArrowLeft",37)},t.ArrowRight=function(e){return n(e,"ArrowRight",39)},t.ArrowUp=function(e){return n(e,"ArrowUp",38)},t.Comma=function(e){return n(e,",",44)},t.End=function(e){return n(e,"End",35)},t.Enter=function(e){return n(e,"Enter",13)},t.Escape=function(e){return n(e,"Escape",27)},t.Home=function(e){return n(e,"Home",36)},t.Space=function(e){return n(e,"Space",32)},t.Tab=function(e){return n(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=void 0,t.promiseMutex=function(e){let t=!1;return function(...n){return!t&&(t=!0,e(...n).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t,n){const o=u.get(e);if(void 0===n&&void 0===(n=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),i.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(n)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const n=document.createElement("input");n.type="hidden",n.name=e,n.value=d(e).toString(),t.appendChild(n)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,n,i,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=n.toString(),m.appendChild(h)),function(e,t,n,i,c,d){function m(t){const n=t.currentTarget,i=~~n.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active"),s(e,i,n)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(i).forEach((([e,t])=>{const i=document.createElement("li");i.className="boxFlag",i.addEventListener("click",m),i.dataset.languageId=e,void 0!==t.languageCode&&(i.dataset.languageCode=t.languageCode),b.appendChild(i);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),i.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===n&&(g.innerHTML=o.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const i=document.createElement("a");i.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(i),0===n&&(g.innerHTML=i.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===n){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const n=document.createElement("span");n.textContent=o.get("wcf.global.language.noSelection"),n.append(t),e.appendChild(n)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const w=t.closest("form");if(null!==w){w.addEventListener("submit",l);let t=p.get(w);void 0===t&&(t=[],p.set(w,t)),t.push(e)}}(t,h,n,i,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid  input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t,n){const i=d.get(e),o=r.default.getDropdownMenu(i.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(i.languageId!==t){const o=p.get(e);if(i.languageId){const e=i.callbacks.get("beforeSelect");e&&e(i.element),o.set(i.languageId,i.element.value)}if(0===t?p.set(e,new Map):(i.buttonLabel.classList.contains("active")||n)&&(i.element.value=o.get(t)||""),i.buttonLabel.textContent=a,i.buttonLabel.querySelector("fa-icon")?.remove(),t){i.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),i.buttonLabel.append(e)}else i.buttonLabel.classList.remove("active");i.languageId=t}n||(i.element.blur(),i.element.focus()),i.callbacks.has("select")&&i.callbacks.get("select")(i.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),i=document.getElementById(e).dataset.inputId,o=d.get(i),a=p.get(i);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;o.languageId&&(n=t===o.languageId?""===o.element.value.trim():!a.get(t));const i=e.querySelector("span");if(i.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),i.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const n=d.get(e);if(!n.isEnabled)return;const i=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&i.set(n.languageId,n.element.value),i.size&&(i.forEach((function(n,i){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${i}]`,o.value=n,t.appendChild(o)})),n.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,n,i){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,n,i,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const n=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),n&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const i=~~n.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,i,r)};if(Object.entries(i).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const i=document.createElement("span");i.textContent=t,n.appendChild(i),n.addEventListener("click",g),f.appendChild(n)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const n=document.createElement("span");n.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(n),f.appendChild(t)}let b;(a||n.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,n,i)},t.registerCallback=function(e,t,n){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,n)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const n=p.get(e);return n.set(t.languageId,t.element.value),n},t.setValues=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);n.element.value="";const i=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(i.has(0))return n.element.value=i.get(0),i.delete(0),p.set(e,i),void s(e,0,!0);p.set(e,i),n.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const n=t.buttonLabel.parentElement;i.default.hide(n),n.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const n=t.buttonLabel.parentElement;i.default.show(n),n.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!n.isEnabled)return!0;const i=p.get(e),o=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&i.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(i.has(t)&&0!==i.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenToCkeditor=t.dispatchToCkeditor=void 0;class n{#O;constructor(e){this.#O=e}collectMetaData(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class i{#O;constructor(e){this.#O=e}bbcode(e){return this.#O.addEventListener("ckeditor5:bbcode",(t=>{const n=e(t.detail);if(!0===n)t.preventDefault();else if(!1!==n)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#O.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#O.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#O.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#O.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#O.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#O.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#O.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#O.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#O.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#O.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#O.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#O.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#O.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#O.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#O.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new i(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})})).catch((()=>{}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{o.attachment&&(t.woltlabUpload={uploadImage:(t,n)=>i(e,t,n),uploadOther:t=>i(e,t)},(0,n.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,n.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:n})=>{""===n?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(`<img src="${n}" class="image woltlabAttachment" data-attachment-id="${t.toString()}">`)}))}(e),function(e){(0,n.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)})))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,n;if(e&&e.__esModule)return e;if(t={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(o),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(t){(0,n.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:n})=>{!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>i(t,e,n),uploadOther:e=>i(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,n)=>{e(["../../Media/Manager/Editor"],t,n)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Api/Messages/MentionSuggestions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mentionSuggestions=void 0,t.mentionSuggestions=async function(e){const t=new URL(window.WSC_API_URL+"index.php?api/rpc/core/messages/mentionsuggestions");let o;t.searchParams.set("query",e);try{o=await(0,n.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){return e.length>24?[]:(await(0,o.mentionSuggestions)(e)).unwrap().map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'<fa-icon name="users"></fa-icon>',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,n.createFragmentFromHtml)(`\n            <span class="ckeditor5__mention">${e.icon} ${e.text}</span>\n          `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,i.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:i,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'</p><p><br data-cke-filler="true"></p><p>')).split("\n\n").map((e=>`<p>${e=e.replaceAll("\n","<br>")}</p>`)).join("")),i=(0,n.escapeHTML)(i),r=(0,n.escapeHTML)(r),e.insertHtml(`<woltlab-quote data-author="${i}" data-link="${r}">${o}</woltlab-quote>\n    <p><br data-cke-filler="true"></p>`)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,i,o,r){"use strict";function a(e){return`${(0,n.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeAutosave=t.setupRestoreDraft=t.deleteDraft=void 0,t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let n;try{const e=window.localStorage.getItem(a(t));null!==e&&(n=JSON.parse(e))}catch{return void s(t)}if(void 0===n)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=n.timestamp)return;const c=e.data.get();if(c===n.html)return;e.data.set(n.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n    <div class="ckeditor5__restoreDraft__question">\n      ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft"))}\n    </div>\n    <div class="ckeditor5__restoreDraft__buttons">\n      <button type="button" class="button buttonPrimary small" data-type="submit">\n        ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.dialog.button.primary.restore"))}\n      </button>\n      <button type="button" class="button small" data-type="cancel">\n        ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.dialog.button.cancel"))}\n      </button>\n      <button type="button" class="button small" data-type="preview">\n        ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft.preview"))}\n      </button>\n    </div>\n  `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const m=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n    <button type="button" class="ck ck-button">\n      ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft.restoreOrDiscard"))}\n    </button>\n  `,e}(),n=e.ui.view.toolbar.element,r=Array.from(n.children);r.forEach((e=>e.hidden=!0)),n.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,n){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let n,i;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{i=JSON.parse(n)}catch{}if(void 0===i||i.timestamp<e)try{localStorage.removeItem(t)}catch{}}}))}(),t.autosave={save:t=>(function(e,t,n){if(""===n)return void s(t);const i={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(i)),(0,r.dispatchToCkeditor)(e).autosave(i)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,n,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(n))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(n)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=void 0;class i{#V;#$="|";#z=[];#Y=[];#X={};constructor(e){this.#V=e}#G(){this.#V.undo?this.#Y.push("undo","redo"):this.#z.push("Undo")}#K(){this.#Y.push("bold","italic")}#J(){const e=[];this.#V.heading?e.push("heading"):this.#z.push("Heading"),this.#V.underline?e.push("underline"):this.#z.push("Underline"),this.#V.strikethrough?e.push("strikethrough"):this.#z.push("Strikethrough"),e.push(this.#$),this.#V.mark?e.push("highlight"):this.#z.push("Highlight"),this.#V.fontColor?e.push("fontColor"):this.#z.push("FontColor"),this.#V.fontFamily?e.push("fontFamily"):this.#z.push("FontFamily"),this.#V.fontSize?e.push("fontSize"):this.#z.push("FontSize"),e.push(this.#$),this.#V.subscript?e.push("subscript"):this.#z.push("Subscript"),this.#V.superscript?e.push("superscript"):this.#z.push("Superscript"),0!==e.length&&e.push(this.#$,"removeFormat"),e.length>0&&(this.#Y.push({label:"woltlabToolbarGroup_format",items:e}),this.#X.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#Q(){this.#V.list?(this.#Y.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#X.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#z.push("List")}#Z(){this.#V.alignment?this.#Y.push("alignment"):this.#z.push("Alignment")}#ee(){this.#V.link?this.#Y.push("link"):this.#z.push("Link","LinkImage")}#te(){this.#V.image?(this.#Y.push("insertImage"),this.#V.attachment||this.#z.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#V.link&&this.#z.push("LinkImage")}#ne(){this.#V.codeBlock?this.#Y.push("codeBlock"):this.#z.push("CodeBlock","WoltlabCodeBlock"),this.#V.code?this.#Y.push("code"):this.#z.push("Code","WoltlabCode")}#ie(){this.#V.table?this.#Y.push("insertTable"):this.#z.push("Table","TableToolbar"),this.#V.quoteBlock?this.#Y.push("blockQuote"):this.#z.push("BlockQuote","WoltlabBlockQuote"),this.#V.spoiler?this.#Y.push("spoiler"):this.#z.push("WoltlabSpoiler"),this.#V.html?this.#Y.push("htmlEmbed"):this.#z.push("HtmlEmbed","WoltlabHtmlEmbed")}#oe(){this.#Y.push(this.#$)}#re(){this.#V.media||this.#z.push("WoltlabMedia")}#ae(){this.#V.mention||this.#z.push("Mention","WoltlabMention")}#se(){let e=!1;return this.#Y.filter((t=>"string"==typeof t&&t===this.#$?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#z.length>0||this.#Y.length>0)throw new Error("Cannot build the configuration twice.");this.#G(),this.#oe(),this.#oe(),this.#K(),this.#ee(),this.#J(),this.#oe(),this.#Q(),this.#Z(),this.#oe(),this.#te(),this.#ne(),this.#ie(),this.#oe(),this.#re(),this.#ae()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:i}=window.CKEDITOR_TRANSLATIONS[t];return i.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),i.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),i["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),i.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),i["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),i.Spoiler=(0,n.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,n.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,n.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,n.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,n.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#z,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#se(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#X,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new i(e);return t.build(),t.toConfig()}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e,t){e.editing.view.document.on("enter",((e,i)=>{if(i.isSoft)return;i.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";function o(e,t){const n=e.closest("p");if(null===n)return;const i=document.createElement("figure");i.classList.add("image",t),i.append(e),n.insertAdjacentElement("beforebegin",i),""===n.innerHTML&&n.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&i.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const n=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const n=e.childNodes[0];n instanceof HTMLBRElement&&"true"!==n.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,n=e.length;t<n;t++){const i=e[t];let o=0;for(;t+o+1<n;){const n=e[t+o+1];if(i.nextElementSibling!==n)break;o++}if(0===o)i.remove();else{const n=o+1,i=Math.ceil(n/2);e.slice(t,t+i).forEach((e=>{e.remove()})),t+=o}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,i=n.__importDefault(i),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a <textarea>.");e.value=r(e.value)}})),define("WoltLabSuite/Core/Component/Ckeditor/Keyboard",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSubmitShortcut=void 0,t.setupSubmitShortcut=function(e){const t=e.element.closest("form, .message, .jsOuterEditorContainer");if(null===t)return;const i=t.querySelector(".formSubmit");if(null===i)return;const o=i.querySelector('input[type="submit"], button[data-type="save"], button[accesskey="s"]');if(null===o)return;o.removeAttribute("accesskey");const r=function(e){return t=>{if("KeyS"!==t.code)return;let n;n=window.navigator.platform.startsWith("Mac")?t.ctrlKey&&t.altKey:t.altKey&&!t.ctrlKey,n&&(t.preventDefault(),t.stopPropagation(),e.click())}}(o);t.addEventListener("keydown",r),(0,n.listenToCkeditor)(e.element).destroy((()=>{t.removeEventListener("keydown",r)}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Layer",["require","exports","../../Helper/PageOverlay"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const i=["ck-body-wrapper","ck-inspector-wrapper","ck-inspector-portal"];let o=!1;t.setup=function(){o||(o=!0,new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)if(e instanceof HTMLElement)for(const t of i)e.classList.contains(t)&&(0,n.getPageOverlayContainer)().append(e)})).observe(document.body,{childList:!0}))}})),define("WoltLabSuite/Core/Component/Ckeditor",["require","exports","tslib","./Ckeditor/Attachment","./Ckeditor/Media","./Ckeditor/Mention","./Ckeditor/Quote","./Ckeditor/Autosave","./Ckeditor/Configuration","./Ckeditor/Event","./Ckeditor/SubmitOnEnter","./Ckeditor/Normalizer","../Ui/Scroll","../Devtools","./Ckeditor/Keyboard","./Ckeditor/Layer","../Environment"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h,f,g){"use strict";function*b(e,t,n){if(e.is("element",t)&&Object.entries(n).every((([t,n])=>!!e.hasAttribute(t)&&String(e.getAttribute(t))===n.toString())))yield e;else for(const i of e.getChildren())i.is("element")&&(yield*b(i,t,n))}function v(e,t){for(const n of e)if("string"==typeof n){if(n===t)return!0}else if(v(n.items,t))return!0;return!1}function w(e){return y.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getCkeditorById=t.getCkeditor=t.setupCkeditor=void 0,m=n.__importDefault(m);const y=new WeakMap;class _{#le;#V;constructor(e,t){this.#le=e,this.#V=t}async destroy(){(0,c.dispatchToCkeditor)(this.sourceElement).destroy(),await this.#le.destroy()}discardDraft(){this.#V.autosave&&(0,s.deleteDraft)(this.#V.autosave)}focus(){const e=this.#le.ui.element,{bottom:t,top:n}=e.getBoundingClientRect(),i=window.innerHeight;let o=!1;(n>0&&n<i||t>0&&t<i)&&(o=!0),o?this.#le.editing.view.focus():(0,p.element)(e,(()=>{this.#le.editing.view.focus()}))}getHtml(){return this.#le.data.get()}insertHtml(e){e=(0,u.normalizeLegacyHtml)(e),this.#le.model.change((t=>{const n=this.#le.data.processor.toView(e),i=this.#le.data.toModel(n),o=this.#le.model.insertContent(i);t.setSelection(o.end),this.focus()}))}insertText(e){const t=document.createElement("div");t.textContent=e,this.insertHtml(t.innerHTML)}isVisible(){return 0!==this.#le.ui.element.clientWidth}setHtml(e,t=!0){e=(0,u.normalizeLegacyHtml)(e),this.#le.model.change((n=>{let i=this.#le.model.createRangeIn(this.#le.model.document.getRoot());const o=this.#le.data.processor.toView(e),r=this.#le.data.toModel(o);i=this.#le.model.insertContent(r,i),n.setSelection(i.end),t&&this.focus()}))}removeAll(e,t){this.#le.model.change((n=>{const i=b(this.#le.model.document.getRoot(),e,t);for(const e of i)n.remove(e)}))}reset(){if(this.setHtml("",!1),(0,c.dispatchToCkeditor)(this.sourceElement).reset({ckeditor:this}),"safari"===(0,g.browser)()&&!(0,g.touch)()){const e=this.#le.ui.element;e.focus(),window.setTimeout((()=>{e.blur()}),0)}}get element(){return this.#le.ui.element}get features(){return this.#V}get sourceElement(){return this.#le.sourceElement}}t.setupCkeditor=async function(t,p,g,b,w,E){if(y.has(t))throw new TypeError(`Cannot initialize the editor for '${t.id}' twice.`);(0,f.setup)();const{create:S,CKEditor5:C}=await new Promise(((t,n)=>{e(["@woltlab/editor"],t,n)})).then(n.__importStar);await new Promise((e=>{window.requestAnimationFrame(e)})),function(e,t){(0,c.dispatchToCkeditor)(e).setupFeatures({features:t}),t.autosave&&!1===m.default._internal_.editorAutosave()&&(t.autosave=""),Object.freeze(t)}(t,p),p.attachment&&(0,i.setup)(t),p.media&&(0,o.setup)(t),(0,r.setup)(t),p.quoteBlock&&(0,a.setup)(t);const L=function(e,t,n,i,o,r){const a=(0,l.createConfigurationFor)(t);a.codeBlock={languages:o},a.woltlabBbcode=n,a.woltlabSmileys=i,""!==t.autosave&&(0,s.initializeAutosave)(e,a,t.autosave),(0,c.dispatchToCkeditor)(e).setupConfiguration({configuration:a,features:t,modules:r});const d=a.toolbar;for(let{name:e}of n)e=`woltlabBbcode_${e}`,v(d,e)||d.push(e);return a}(t,p,g,b,w,C);E&&(L.licenseKey=E),(0,u.normalizeLegacyMessage)(t);const k=await S(t,L),x=new _(k,p);return p.autosave&&(0,s.setupRestoreDraft)(k,p.autosave),y.set(t,x),(0,c.dispatchToCkeditor)(t).ready({ckeditor:x}),p.submitOnEnter&&(0,d.setup)(k,x),""===x.getHtml()&&(0,c.dispatchToCkeditor)(t).discardRecoveredData(),(0,h.setupSubmitShortcut)(x),function(e,t){e.model.document.on("change:data",(()=>{(0,c.dispatchToCkeditor)(t).changeData()}))}(k,t),window.ENABLE_DEBUG_MODE&&window.ENABLE_DEVELOPER_TOOLS&&m.default._internal_.editorInspector()&&new Promise(((t,n)=>{e(["@ckeditor/ckeditor5-inspector"],t,n)})).then(n.__importStar).then((e=>{e.default.attach(k)})),x},t.getCkeditor=w,t.getCkeditorById=function(e,t=!0){const n=document.getElementById(e);if(null!==n)return w(n);if(t)throw new Error(`Unable to find an element with the id '${e}'.`)}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,n,i,o){"use strict";function r(e){(0,o.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,o.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),t.init=function(e,t,n,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected <textarea class="wysiwygTextarea" /> for id '${e}'.`);i.init(e,t,n,o),i.registerCallback(e,"select",r),i.registerCallback(e,"submit",a),i.registerCallback(e,"beforeSelect",a)}})),define("WoltLabSuite/Core/Ui/Suggestion",["require","exports","tslib","../Ajax","../Core","./Dropdown/Simple"],(function(e,t,n,i,o,r){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),class{ajaxPayload;callbackSelect;dropdownMenu=null;excludedSearchValues;element;threshold;value="";constructor(e,t){const n=document.getElementById(e);if(null===n)throw new Error("Expected a valid element id.");if(this.element=n,this.ajaxPayload=o.extend({actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},t.ajax),"function"!=typeof t.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this.callbackSelect=t.callbackSelect,this.excludedSearchValues=new Set(Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[]),this.threshold=void 0===t.threshold?3:t.threshold,this.element.addEventListener("click",(e=>e.preventDefault())),this.element.addEventListener("keydown",(e=>this.keyDown(e))),this.element.addEventListener("keyup",(e=>this.keyUp(e)))}addExcludedValue(e){this.excludedSearchValues.add(e)}removeExcludedValue(e){this.excludedSearchValues.delete(e)}isActive(){return null!==this.dropdownMenu&&r.default.isOpen(this.element.id)}keyDown(e){if(!this.isActive())return!0;if(-1===["ArrowDown","ArrowUp","Enter","Escape"].indexOf(e.key))return!0;let t,n=0;const i=this.dropdownMenu.childElementCount;for(;n<i&&(t=this.dropdownMenu.children[n],!t.classList.contains("active"));)n++;if("Enter"===e.key)r.default.close(this.element.id),this.select(void 0,t);else if("Escape"===e.key){if(!r.default.isOpen(this.element.id))return!0;r.default.close(this.element.id)}else{let o=0;"ArrowUp"===e.key?o=(0===n?i:n)-1:"ArrowDown"===e.key&&(o=n+1,o===i&&(o=0)),o!==n&&(t.classList.remove("active"),this.dropdownMenu.children[o].classList.add("active"))}return e.preventDefault(),!1}select(e,t){e instanceof MouseEvent&&(t=e.currentTarget.parentNode);const n=t.children[0];this.callbackSelect(this.element.id,{objectId:+(n.dataset.objectId||0),value:t.textContent||"",type:n.dataset.type||""}),e instanceof MouseEvent&&this.element.focus()}keyUp(e){const t=e.currentTarget.value.trim();if(this.value!==t){if(t.length<this.threshold)return null!==this.dropdownMenu&&r.default.close(this.element.id),void(this.value=t);this.value=t,i.api(this,{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:t}}})}}_ajaxSetup(){return{data:this.ajaxPayload}}_ajaxSuccess(e){null===this.dropdownMenu?(this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="dropdownMenu",r.default.initFragment(this.element,this.dropdownMenu)):this.dropdownMenu.innerHTML="",Array.isArray(e.returnValues)&&e.returnValues.length>0?(e.returnValues.forEach(((e,t)=>{const n=document.createElement("a");e.icon?(n.className="box16",n.innerHTML=`${e.icon} <span></span>`,n.children[1].textContent=e.label):n.textContent=e.label,n.dataset.objectId=e.objectID.toString(),e.type&&(n.dataset.type=e.type),n.addEventListener("click",(e=>this.select(e)));const i=document.createElement("li");0===t&&(i.className="active"),i.appendChild(n),this.dropdownMenu.appendChild(i)})),r.default.open(this.element.id,!0)):r.default.close(this.element.id)}}})),define("WoltLabSuite/Core/Ui/ItemList",["require","exports","tslib","../Core","../Dom/Traverse","../Language","./Suggestion","./Dropdown/Simple","../Dom/Util"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e){const t=_.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems}function d(e){const t=_.get(e);c(e)?(l.default.show(t.element),l.default.hide(t.limitReached),t.list.dataset.acceptsNewItems="true"):(l.default.hide(t.element),l.default.show(t.limitReached),t.list.dataset.acceptsNewItems="false")}function u(e){const t=e.currentTarget,n=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==n&&(n.classList.contains("active")?b(n):n.classList.add("active")):"Escape"===e.key&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")}function p(e){if("Enter"===e.key){e.preventDefault();const t=e.currentTarget;if(_.get(t.id).options.restricted)return;const n=t.value.trim();n.length&&g(t.id,{objectId:0,value:n})}}function m(e){const t=e.currentTarget;if(_.get(t.id).options.restricted)return;let n=t.value;n.includes(",")&&(n=n.replace(/,/g,""),n.length?g(t.id,{objectId:0,value:n}):t.value=n)}function h(e){e.preventDefault();const t=e.clipboardData.getData("text/plain"),n=e.currentTarget,i=n.id,o=+n.maxLength;t.split(/,/).forEach((e=>{e=e.trim(),-1!==o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&c(i)&&g(i,{objectId:0,value:e})}))}function f(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}function g(e,t){const n=_.get(e),i=document.createElement("li");i.className="item";const o=document.createElement("span");if(o.className="content",o.dataset.objectId=t.objectId.toString(),t.type&&(o.dataset.type=t.type),o.textContent=t.value,i.appendChild(o),!n.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",b),i.appendChild(e)}n.list.insertBefore(i,n.listItem),n.suggestion.addExcludedValue(t.value),n.element.value="",n.element.disabled||d(e);let r=v(n);"function"==typeof n.options.callbackChange&&(null===r&&(r=y(e)),n.options.callbackChange(e,r))}function b(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const n=e.parentElement.dataset.elementId||"",i=_.get(n);e.children[0].textContent&&i.suggestion.removeExcludedValue(e.children[0].textContent),e.remove(),t||i.element.focus(),d(n);let o=v(i);"function"==typeof i.options.callbackChange&&(null===o&&(o=y(n)),i.options.callbackChange(n,o))}function v(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);const t=y(e.element.id);return e.shadow.value=y(e.element.id).map((e=>e.value)).join(","),t}function w(e){const t=e.currentTarget,n=_.get(t.id);if(n.options.restricted)return;const i=t.value.trim();i.length&&(n.suggestion&&n.suggestion.isActive()||g(t.id,{objectId:0,value:i}))}function y(e){const t=_.get(e);if(!t)throw new Error("Element id '"+e+"' is unknown.");const n=[];return t.list.querySelectorAll(".item > span").forEach((e=>{n.push({objectId:+(e.dataset.objectId||""),value:e.textContent.trim(),type:e.dataset.type})})),n}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l);const _=new Map;t.init=function(e,t,n){const d=document.getElementById(e);if(null===d)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(_.has(e)){const t=_.get(e);Object.keys(t).forEach((e=>{const n=t[e];n instanceof Element&&n.parentNode&&n.remove()})),s.default.destroy(e),_.delete(e)}const b=i.extend({ajax:{actionName:"getSearchResultList",className:"",parameters:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},n),v=o.parentByTag(d,"FORM");if(null!==v)if(b.isCSV)v.addEventListener("submit",(()=>{if(c(e)){const t=_.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}}));else{if(!b.submitFieldName.length&&"function"!=typeof b.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");v.addEventListener("submit",(()=>{if(c(e)){const t=_.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}const t=y(e);b.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=b.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,v.appendChild(t)})):b.callbackSubmit(v,t)}))}const E=function(e,t){const n=e.parentElement,i=document.createElement("ol");i.className="inputItemList"+(e.disabled?" disabled":""),i.dataset.acceptsNewItems="true",i.dataset.elementId=e.id,i.addEventListener("click",(t=>{t.target===i&&e.focus()}));const o=document.createElement("li");o.className="input",i.appendChild(o),e.addEventListener("input",m),e.addEventListener("keydown",u),e.addEventListener("keypress",p),e.addEventListener("keyup",f),e.addEventListener("paste",h);const a=e===document.activeElement;a&&e.blur(),e.addEventListener("blur",w),n.insertBefore(i,e),o.appendChild(e),a&&window.setTimeout((()=>{e.focus()}),1),-1!==t.maxLength&&(e.maxLength=t.maxLength);const s=document.createElement("span");s.className="inputItemListLimitReached",s.textContent=r.get("wcf.global.form.input.maxItems"),l.default.hide(s),o.appendChild(s);let c=null;const d=[];if(t.isCSV&&(c=document.createElement("input"),c.className="itemListInputShadow",c.type="hidden",c.name=e.name,e.removeAttribute("name"),i.parentNode.insertBefore(c,i),e.value.split(",").forEach((e=>{(e=e.trim())&&d.push(e)})),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentNode.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,limitReached:s,list:i,shadow:c,values:d}}(d,b),S=new a.default(e,{ajax:b.ajax,callbackSelect:g,excludedSearchValues:b.excludedSearchValues});_.set(e,{dropdownMenu:null,element:E.element,limitReached:E.limitReached,list:E.list,listItem:E.element.parentElement,options:b,shadow:E.shadow,suggestion:S}),t=b.callbackSetupValues?b.callbackSetupValues():E.values.length?E.values:t,Array.isArray(t)&&t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),g(e,t)}))},t.getValues=y,t.setValues=function(e,t){const n=_.get(e);if(!n)throw new Error("Element id '"+e+"' is unknown.");o.childrenByClass(n.list,"item").forEach((e=>{b(e,!0)})),t.forEach((t=>{g(e,t)}))}})),define("WoltLabSuite/Core/Ui/Pagination",["require","exports"],(function(e,t){"use strict";return class{#ce;#de;#ue;constructor(e,t){"function"==typeof t.callbackSwitch&&(this.#ce=t.callbackSwitch),"function"==typeof t.callbackShouldSwitch&&(this.#de=t.callbackShouldSwitch),this.#ue=document.createElement("woltlab-core-pagination"),this.#ue.count=t.maxPage,this.#ue.page=t.activePage,e.append(this.#ue),this.#pe()}#pe(){this.#ue.addEventListener("switchPage",(e=>{void 0===this.#de||!1!==this.#de(e.detail)?this.#ce&&this.#ce(e.detail):e.preventDefault()}))}getActivePage(){return this.#ue.page}getElement(){return this.#ue.parentElement}getMaxPage(){return this.#ue.count}switchPage(e,t){if(t instanceof MouseEvent){t.preventDefault();const e=t.currentTarget;if(e&&e.dataset.tooltip){const t=document.getElementById("balloonTooltip");if(t){const n=new Event("mouseleave",{bubbles:!0,cancelable:!0});e.dispatchEvent(n),t.style.removeProperty("top"),t.style.removeProperty("bottom")}}}if((e=~~e)>0&&this.#ue.page!==e&&e<=this.#ue.count){if(void 0!==this.#de&&!this.#de(e))return;this.#ue.jumpToPage(e),void 0!==this.#ce&&this.#ce(e)}}}})),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["require","exports","https://connect.facebook.net/en_US/sdk.js"],(function(e,t){"use strict";return FB.init({version:"v7.0"}),FB})),define("WoltLabSuite/Core/Api/Comments/EditComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editComment=void 0,t.editComment=async function(e){const t=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}/edit`);let o;try{o=await(0,n.prepareRequest)(t).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Comments/RenderComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderComment=void 0,t.renderComment=async function(e,t=undefined,o=!1,r=undefined){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}/render`);let s;a.searchParams.set("messageOnly",o.toString()),void 0!==t&&a.searchParams.set("responseID",t.toString()),void 0!==r&&a.searchParams.set("objectTypeID",r.toString());try{s=await(0,n.prepareRequest)(a).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Api/Comments/RenderComments",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderComments=void 0,t.renderComments=async function(e,t,o=0){const r=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/render`);let a;r.searchParams.set("objectTypeID",e.toString()),r.searchParams.set("objectID",t.toString()),r.searchParams.set("lastCommentTime",o.toString());try{a=await(0,n.prepareRequest)(r).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(a)}})),define("WoltLabSuite/Core/Api/Files/DeleteFile",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteFile=void 0,t.deleteFile=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/files/${e}`).delete().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Files/GenerateThumbnails",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateThumbnails=void 0,t.generateThumbnails=async function(e){const t=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/files/${e}/generatethumbnails`);let o;try{o=await(0,n.prepareRequest)(t).post().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Files/Upload",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=void 0,t.upload=async function(e,t,o,r,a){const s=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/files/upload`),l={filename:e,fileSize:t,fileHash:o,objectType:r,context:a};let c;try{c=await(0,n.prepareRequest)(s).post(l).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(c)}})),define("WoltLabSuite/Core/Component/File/Helper",["require","exports","WoltLabSuite/Core/Language","WoltLabSuite/Core/FileUtil"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertFileInformation=t.fileInitializationFailed=t.removeUploadProgress=t.trackUploadProgress=void 0,t.trackUploadProgress=function(e,t){const n=document.createElement("progress");n.classList.add("fileList__item__progress__bar"),n.max=100;const i=document.createElement("span");i.classList.add("fileList__item__progress__readout"),t.addEventListener("uploadProgress",(t=>{if(n.value=t.detail,i.textContent=`${t.detail}%`,null===n.parentNode){e.classList.add("fileProcessor__item--uploading");const t=document.createElement("div");t.classList.add("fileList__item__progress"),t.append(n,i),e.append(t)}}))},t.removeUploadProgress=function(e){e.classList.contains("fileProcessor__item--uploading")&&(e.classList.remove("fileProcessor__item--uploading"),e.querySelector(".fileList__item__progress")?.remove())},t.fileInitializationFailed=function(e,t,i){if(i instanceof Error)throw i;if(void 0===t.apiError)return;let o;const r=t.apiError.getValidationError();if(void 0!==r)switch(r.param){case"preflight":o=(0,n.getPhrase)(`wcf.upload.error.${r.code}`);break;case"validation":o=(0,n.getPhrase)(`wcf.upload.validation.error.${r.code}`);break;default:o="Unrecognized error type: "+JSON.stringify(r)}else o=`Unexpected server error: [${t.apiError.type}] ${t.apiError.message}`;!function(e,t){e.classList.add("fileList__item--error");const n=document.createElement("div");n.classList.add("fileList__item__errorMessage"),n.textContent=t,e.append(n)}(e,o)},t.insertFileInformation=function(e,t){const n=document.createElement("div");n.classList.add("fileList__item__file"),n.append(t);const o=document.createElement("div");o.classList.add("fileList__item__filename"),o.textContent=t.filename||t.dataset.filename;const r=document.createElement("div");r.classList.add("fileList__item__fileSize"),r.textContent=(0,i.formatFilesize)(t.fileSize||parseInt(t.dataset.fileSize)),e.append(n,o,r)}})),define("WoltLabSuite/Core/Component/Attachment/Entry",["require","exports","tslib","WoltLabSuite/Core/Ui/Dropdown/Simple","WoltLabSuite/Core/Dom/Change/Listener","../Ckeditor/Event","WoltLabSuite/Core/Api/Files/DeleteFile","WoltLabSuite/Core/Language","WoltLabSuite/Core/Component/File/Helper"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e,t,n){const i=document.createElement("button");return i.type="button",i.textContent=(0,s.getPhrase)("wcf.attachment.insert"),i.addEventListener("click",(()=>{(0,r.dispatchToCkeditor)(n).insertAttachment({attachmentId:e,url:t})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.createAttachmentFromFile=void 0,o=n.__importDefault(o),t.createAttachmentFromFile=function(e,t){const n=document.createElement("li");return n.classList.add("fileList__item","attachment__item"),(0,l.insertFileInformation)(n,e),e.ready.then((()=>{!function(e,t,n){const l=t.data;if(void 0===l)throw new Error("No meta data was returned from the server.",{cause:{file:t}});const d=t.fileId;if(void 0===d)throw new Error("The file id is not set.",{cause:{file:t}});const u=[];let p;if(t.isImage()){const i=t.thumbnails.find((e=>"tiny"===e.identifier));void 0!==i?t.thumbnail=i:t.link&&(t.previewUrl=t.link);const r=t.thumbnails.find((e=>""===e.identifier))?.link;if(void 0!==r){p=c(l.attachmentID,r,n);const e=c(l.attachmentID,t.link,n);e.textContent=(0,s.getPhrase)("wcf.attachment.insertFull"),u.push(e)}else p=c(l.attachmentID,t.link?t.link:"",n);if(void 0!==t.link&&void 0!==t.filename){const n=document.createElement("a");n.href=t.link,n.classList.add("jsImageViewer"),n.title=t.filename,n.textContent=t.filename;const i=e.querySelector(".fileList__item__filename");i.innerHTML="",i.append(n),o.default.trigger()}}else p=c(l.attachmentID,t.isImage()&&t.link?t.link:"",n);const m=document.createElement("ul");m.classList.add("dropdownMenu");for(const e of u){const t=document.createElement("li");t.append(e),m.append(t)}if(0!==m.childElementCount){const e=document.createElement("li");e.classList.add("dropdownDivider"),m.append(e)}const h=document.createElement("li");h.append(function(e,t,n,i){const o=document.createElement("button");return o.type="button",o.textContent=(0,s.getPhrase)("wcf.global.button.delete"),o.addEventListener("click",(()=>{(0,a.deleteFile)(e).then((e=>{e.unwrap(),(0,r.dispatchToCkeditor)(n).removeAttachment({attachmentId:t}),i.remove()}))})),o}(d,l.attachmentID,n,e)),m.append(h);const f=document.createElement("button");f.classList.add("button","small"),f.type="button",f.setAttribute("aria-label",(0,s.getPhrase)("wcf.global.button.more")),f.innerHTML='<fa-icon name="ellipsis-vertical"></fa-icon>';const g=document.createElement("div");g.classList.add("fileList__item__buttons"),p.classList.add("button","small"),g.append(p,f),e.append(g),(0,i.initFragment)(f,m),f.addEventListener("click",(e=>{e.stopPropagation(),(0,i.toggleDropdown)(f.id)}))}(n,e,t)})).catch((t=>{(0,l.fileInitializationFailed)(n,e,t)})).finally((()=>{(0,l.removeUploadProgress)(n)})),(0,l.trackUploadProgress)(n,e),n}})),define("WoltLabSuite/Core/Component/File/woltlab-core-file",["require","exports","WoltLabSuite/Core/FileUtil"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreFileElement=t.Thumbnail=void 0;class i{#q;#me;constructor(e,t){this.#q=e,this.#me=t}get identifier(){return this.#q}get link(){return this.#me}}t.Thumbnail=i;class o extends HTMLElement{#M=void 0;#he="";#fe=void 0;#ge=void 0;#me=void 0;#be=void 0;#ve=0;#we=void 0;#ye=[];#_e;#Ee;#Se;constructor(){super(),this.#Se=new Promise(((e,t)=>{this.#Ee=e,this.#_e=t}))}connectedCallback(){let e=!1;0===this.#ve&&(e=this.#Ce()),this.#Le(),e&&this.#Ee()}#Ce(){if(void 0===this.#fe){this.#he=this.dataset.filename||"unknown.bin",delete this.dataset.filename,this.#ge=parseInt(this.dataset.fileSize||"0"),delete this.dataset.fileSize,this.#be=this.dataset.mimeType||"application/octet-stream",delete this.dataset.mimeType;const e=parseInt(this.getAttribute("file-id")||"0");if(!e)return this.#ve=1,!1;this.#fe=e}if(this.dataset.thumbnails){const e=JSON.parse(this.dataset.thumbnails);for(const t of e)this.#ye.push(new i(t.identifier,t.link));delete this.dataset.thumbnails}return this.dataset.metaData&&(this.#M=JSON.parse(this.dataset.metaData),delete this.dataset.metaData),this.#me=this.dataset.link,delete this.dataset.link,this.#ve=3,!0}#Le(){switch(this.#ve){case 1:case 2:this.#ke("spinner");break;case 3:if(this.previewUrl)this.#xe(this.previewUrl);else{const e=this.iconName||"file";this.#ke(e)}break;case 4:this.#ke("triangle-exclamation");break;default:throw new Error("Unreachable",{cause:{state:this.#ve}})}}#xe(e){let t=this.querySelector("img");null===t&&(this.innerHTML="",t=document.createElement("img"),t.alt="",this.append(t)),t.src=e,this.unbounded?(t.removeAttribute("height"),t.removeAttribute("width")):(t.height=64,t.width=64)}#ke(e){let t=this.querySelector("fa-icon");return null===t?(this.innerHTML="",t=document.createElement("fa-icon"),t.size=64,t.setIcon(e),this.append(t)):t.setIcon(e),t}get fileId(){return this.#fe}get iconName(){if(void 0===this.mimeType)return;const e=(0,n.getExtensionByMimeType)(this.mimeType);if(""===e)return;const t=(0,n.getIconNameByFilename)(e);return""!==t?`file-${t}`:void 0}get previewUrl(){return this.dataset.previewUrl}set previewUrl(e){this.dataset.previewUrl=e,this.#Le()}get unbounded(){return"unbounded"===this.getAttribute("dimensions")}set unbounded(e){e?this.setAttribute("dimensions","unbounded"):this.removeAttribute("dimensions"),this.#Le()}get filename(){return this.#he}get fileSize(){return this.#ge}get mimeType(){return this.#be}get data(){return this.#M}get link(){return this.#me}isImage(){if(void 0===this.mimeType)return!1;switch(this.mimeType){case"image/gif":case"image/jpeg":case"image/png":case"image/webp":return!0;default:return!1}}uploadFailed(e){1===this.#ve&&(this.#ve=4,this.#we=e,this.#Le(),this.#_e())}uploadCompleted(e,t,n,i,o){1===this.#ve&&(this.#M=i,this.#fe=e,this.#me=n,this.#be=t,this.setAttribute("file-id",e.toString()),o?(this.#ve=2,this.#Le()):(this.#ve=3,this.#Le(),this.#Ee()))}setThumbnails(e){if(2===this.#ve){for(const t of e)this.#ye.push(new i(t.identifier,t.link));this.#ve=3,this.#Le(),this.#Ee()}}isFailedUpload(){return 4===this.#ve}set thumbnail(e){this.#ye.includes(e)&&this.#xe(e.link)}get thumbnails(){return[...this.#ye]}get ready(){return this.#Se}get apiError(){return this.#we}}t.WoltlabCoreFileElement=o,t.default=o,window.customElements.define("woltlab-core-file",o)})),define("WoltLabSuite/Core/Component/Attachment/List",["require","exports","./Entry","../Ckeditor/Event","../File/woltlab-core-file"],(function(e,t,n,i){"use strict";function o(e,t,i){e.append((0,n.createAttachmentFromFile)(t,i))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){const t=document.getElementById(`attachments_${e}`);if(null===t)throw new Error(`The attachments container for '${e}' does not exist.`);const n=document.getElementById(e);if(null===n)throw new Error(`The editor element for '${e}' does not exist.`);const r=t.querySelector("woltlab-core-file-upload");if(null===r)throw new Error("Expected the container to contain an upload button",{cause:{container:t}});let a=t.querySelector(".fileList");null===a&&(a=document.createElement("ol"),a.classList.add("fileList"),r.insertAdjacentElement("afterend",a)),r.addEventListener("uploadStart",(e=>{o(a,e.detail,n)})),(0,i.listenToCkeditor)(n).uploadAttachment((e=>{const t=new CustomEvent("ckeditorDrop",{detail:e});r.dispatchEvent(t)}));const s=t.querySelector(".attachment__list__existingFiles");null!==s&&(s.querySelectorAll("woltlab-core-file").forEach((e=>{o(a,e,n)})),s.remove())}})),define("WoltLabSuite/Core/Api/Comments/CreateComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createComment=void 0,t.createComment=async function(e,t,o,r=""){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments`),s={objectTypeID:e,objectID:t,message:o,guestToken:r};let l;try{l=await(0,n.prepareRequest)(a).post(s).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(l)}})),define("WoltLabSuite/Core/Component/Comment/Add",["require","exports","tslib","../../Ui/Scroll","../../Ui/Notification","../../Language","../../Event/Handler","../../Dom/Util","../Ckeditor","../Ckeditor/Event","WoltLabSuite/Core/Api/Comments/CreateComment","../GuestTokenDialog","WoltLabSuite/Core/User"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentAdd=void 0,i=n.__importStar(i),o=n.__importStar(o),a=n.__importStar(a),s=n.__importDefault(s),p=n.__importDefault(p),t.CommentAdd=class{#D;#c;#Te;#Ie;#Me;#Ae;#Pe;#De;#le;constructor(e,t,n,i){this.#D=e,this.#c=this.#D.querySelector(".commentAdd__content"),this.#Te=this.#D.querySelector(".commentAdd__editor"),this.#Ie=this.#D.querySelector(".wysiwygTextarea"),this.#Me=t,this.#Ae=n,this.#Pe=this.#D.querySelector(".commentAdd__placeholder"),this.#De=i,this.#je()}#je(){this.#Pe.addEventListener("click",(e=>{this.#c.classList.contains("commentAdd__content--collapsed")&&(e.preventDefault(),this.#c.classList.remove("commentAdd__content--collapsed"),this.#D.classList.remove("commentAdd--collapsed"),this.#Pe.hidden=!0,this.#Te.hidden=!1,this.#Oe())})),this.#D.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#qe()})),(0,c.listenToCkeditor)(this.#Ie).setupFeatures((({features:e})=>{e.heading=!1,e.spoiler=!1,e.table=!1}))}#Oe(){window.setTimeout((()=>{i.element(this.#D,(()=>{this.#Be().focus()}))}),0)}#Re(){this.#D.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#Be().getHtml();if(""===e)return this.#Fe(this.#Be().element,(0,r.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#Be(),message:e,valid:!0};return a.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#qe(){if(!this.#Re())return;this.#Ne();let e="";if(!p.default.userId&&(e=await(0,u.getGuestToken)(),void 0===e))return void this.#Ue();const t=await(0,d.createComment)(this.#Me,this.#Ae,this.#Be().getHtml(),e);if(!t.ok){const e=t.error.getValidationError();if(void 0===e)throw t.error;return this.#Fe(this.#Be().element,e.code),void this.#Ue()}this.#De(t.value.commentID),o.show((0,r.getPhrase)("wcf.global.success.add")),this.#We(),this.#Ue()}#Be(){return void 0===this.#le&&(this.#le=(0,l.getCkeditor)(this.#Ie)),this.#le}#Ne(){if(this.#c.classList.contains("commentAdd__content--loading"))return;const e=document.createElement("div");e.className="commentAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#c.classList.add("commentAdd__content--loading"),this.#c.appendChild(e)}#Fe(e,t){s.default.innerError(e,"empty"===t?(0,r.getPhrase)("wcf.global.form.error.empty"):t)}#We(){this.#Be().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#c.classList.add("commentAdd__content--collapsed"),this.#D.classList.add("commentAdd--collapsed"),this.#Te.hidden=!0,this.#Pe.hidden=!1}#Ue(){this.#c.classList.remove("commentAdd__content--loading");const e=this.#c.querySelector(".commentAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Api/Comments/Responses/CreateResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponse=void 0,t.createResponse=async function(e,t,o=""){const r=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses`),a={commentID:e,message:t,guestToken:o};let s;try{s=await(0,n.prepareRequest)(r).post(a).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Component/Comment/Response/Add",["require","exports","tslib","../../../Dom/Util","../../../Language","../../../Event/Handler","../../../Ui/Scroll","../../../Ui/Notification","../../Ckeditor","../../Ckeditor/Event","WoltLabSuite/Core/User","../../GuestTokenDialog","WoltLabSuite/Core/Api/Comments/Responses/CreateResponse"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentResponseAdd=void 0,i=n.__importDefault(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),d=n.__importDefault(d),t.CommentResponseAdd=class{container;#c;#Ie;#De;#He=new Map;#le;#Ve;constructor(e,t){this.container=e,this.#c=this.container.querySelector(".commentResponseAdd__content"),this.#Ie=this.container.querySelector(".wysiwygTextarea"),this.#De=t,this.#je()}#je(){this.container.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#qe()})),(0,c.listenToCkeditor)(this.#Ie).setupFeatures((({features:e})=>{e.heading=!1,e.spoiler=!1,e.table=!1}))}show(e){this.#Ve&&this.#He.set(this.#Ve,this.#$e()),this.#ze(this.#He.get(e)||""),this.#Ve=e,this.container.hidden=!1}#Re(){this.container.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#Be().getHtml();if(""===e)return this.#Fe(this.#Be().element,(0,o.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#Be(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#qe(){if(!this.#Re())return;this.#Ne();let e="";if(!d.default.userId&&(e=await(0,u.getGuestToken)(),void 0===e))return void this.#Ue();const t=await(0,p.createResponse)(this.#Ve,this.#Be().getHtml(),e);if(!t.ok){const e=t.error.getValidationError();if(void 0===e)throw t.error;return this.#Fe(this.#Be().element,e.code),void this.#Ue()}this.#De(this.#Ve,t.value.responseID),s.show((0,o.getPhrase)("wcf.global.success.add")),this.#We(),this.#Ue()}#We(){this.#Be().reset(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#He.delete(this.#Ve),this.container.hidden=!0}#Fe(e,t){i.default.innerError(e,"empty"===t?(0,o.getPhrase)("wcf.global.form.error.empty"):t)}#Be(){return void 0===this.#le&&(this.#le=(0,l.getCkeditor)(this.#Ie)),this.#le}#$e(){return this.#Be().getHtml()}#ze(e){this.#Be().setHtml(e);const t=this.#Ie.parentElement.querySelector(".innerError");null!==t&&t.remove(),this.#Oe()}#Oe(){window.setTimeout((()=>{a.element(this.container,(()=>{this.#Be().focus()}))}),0)}#Ne(){if(this.#c.classList.contains("commentResponseAdd__content--loading"))return;const e=document.createElement("div");e.className="commentResponseAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#c.classList.add("commentResponseAdd__content--loading"),this.#c.appendChild(e)}#Ue(){this.#c.classList.remove("commentResponseAdd__content--loading");const e=this.#c.querySelector(".commentResponseAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Ui/Reaction/Handler",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../Alignment","../CloseOverlay","../Screen","focus-trap"],(function(e,t,n,i,o,r,a,s,l,c,d){"use strict";i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l),c=n.__importStar(c);const u=Object.values(window.REACTION_TYPES);return class{activeButton=void 0;_cache=new Map;focusTrap=void 0;_containers=new Map;_options;_objects=new Map;_objectType;_popoverCurrentObjectId=0;_popover;_popoverContent;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._popover=null,this._popoverContent=null,this._options=o.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},t),this.initReactButtons(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/Handler-${e}`,(()=>this.initReactButtons())),l.default.add("WoltLabSuite/Core/Ui/Reaction/Handler",(()=>this._closePopover()))}initReactButtons(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const n=a.default.identify(t);if(this._containers.has(n))return;const i=~~t.dataset.objectId,o={reactButton:null,objectId:i,element:t};this._containers.set(n,o),this._initReactButton(t,o);const r=this._objects.get(i)||[];r.push(o),this._objects.set(i,r),e=!0})),e&&r.default.trigger()}_initReactButton(e,t){if(this._options.isSingleItem?t.reactButton=document.querySelector(this._options.buttonSelector):t.reactButton=e.querySelector(this._options.buttonSelector),null!==t.reactButton){if(1===u.length){const e=u[0];t.reactButton.title=e.title,t.reactButton.querySelector(".invisible").textContent=e.title}t.reactButton.setAttribute("role","button"),u.length>1&&(t.reactButton.setAttribute("aria-haspopup","true"),t.reactButton.setAttribute("aria-expanded","false")),t.reactButton.addEventListener("click",(e=>{this._toggleReactPopover(t.objectId,t.reactButton,e)})),t.reactButton.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleReactPopover(t.objectId,t.reactButton,null))}))}}_updateReactButton(e,t){this._objects.get(e).forEach((e=>{null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),e.reactButton.dataset.reactionTypeId=t.toString()):(e.reactButton.dataset.reactionTypeId="0",e.reactButton.classList.remove("active")))}))}_markReactionAsActive(){let e=null;for(const t of this._objects.get(this._popoverCurrentObjectId))null!==t.reactButton&&(e=~~t.reactButton.dataset.reactionTypeId);if(null===e)throw new Error("Unable to find react button for current popover.");const t=this._getPopover();t.querySelectorAll(".reactionTypeButton.active").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-selected")}));const n=t.querySelector(".reactionPopoverContent");if(e){const i=t.querySelector(`.reactionTypeButton[data-reaction-type-id="${e}"]`);i.classList.add("active"),i.setAttribute("aria-selected","true"),0==~~i.dataset.isAssignable&&a.default.show(i),this._scrollReactionIntoView(n,i)}else c.is("screen-xs")&&(t.classList.contains("inverseOrder")?n.scrollTop=0:n.scrollTop=n.scrollHeight-n.clientHeight)}_scrollReactionIntoView(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2}_toggleReactPopover(e,t,n){if(null!==n&&(n.preventDefault(),n.stopPropagation()),1===u.length){const t=u[0];this._popoverCurrentObjectId=e,this._react(t.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover()}_openReactPopover(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,s.set(this._getPopover(),t,{horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:c.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");const n=this._getPopover();"auto"===n.style.getPropertyValue("bottom")?n.classList.add("inverseOrder"):n.classList.remove("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),n.classList.remove("forceHide"),n.classList.add("active"),this.activeButton=t,u.length>1&&this.activeButton.setAttribute("aria-expanded","true"),this.getFocusTrap().activate()}_getPopover(){if(null==this._popover){this._popover=document.createElement("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=document.createElement("div"),this._popoverContent.className="reactionPopoverContent";const e=document.createElement("ul");e.className="reactionTypeButtonList",this._getSortedReactionTypes().forEach((t=>{const n=document.createElement("li");n.tabIndex=0,n.setAttribute("role","button"),n.className="reactionTypeButton jsTooltip",n.dataset.reactionTypeId=t.reactionTypeID.toString(),n.dataset.title=t.title,n.dataset.isAssignable=t.isAssignable.toString(),n.title=t.title;const i=document.createElement("span");i.className="reactionTypeButtonTitle",i.innerHTML=t.title,n.innerHTML=t.renderedIcon,n.appendChild(i),n.addEventListener("click",(()=>this._react(t.reactionTypeID))),n.addEventListener("keydown",(e=>this.keydown(e))),t.isAssignable||a.default.hide(n),e.appendChild(n)})),this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",(()=>this._rebuildOverflowIndicator()),{passive:!0}),this._popover.appendChild(this._popoverContent),document.body.appendChild(this._popover),r.default.trigger()}return this._popover}keydown(e){if("Enter"===e.key||" "===e.key){e.preventDefault();const t=this.activeButton,n=~~e.currentTarget.dataset.reactionTypeId;this._react(n),t.focus()}}_rebuildOverflowIndicator(){const e=this._popoverContent;e.scrollTop>0?e.classList.add("overflowTop"):e.classList.remove("overflowTop"),e.scrollTop+e.clientHeight<e.scrollHeight?e.classList.add("overflowBottom"):e.classList.remove("overflowBottom")}_getSortedReactionTypes(){return u.sort(((e,t)=>e.showOrder-t.showOrder))}_closePopover(){if(0!==this._popoverCurrentObjectId){const e=this._getPopover();e.classList.remove("active"),e.querySelectorAll('.reactionTypeButton[data-is-assignable="0"]').forEach((e=>a.default.hide(e))),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach((e=>{e.reactButton.closest("nav").style.cssText=""})),u.length>1&&this.activeButton.setAttribute("aria-expanded","false"),this.activeButton=void 0,this._popoverCurrentObjectId=0,this.getFocusTrap().deactivate()}}_react(e){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=e,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,i.api(this,{parameters:this._options.parameters}),this._closePopover())}_ajaxSuccess(e){const t=~~e.returnValues.objectID,n=new Map;Object.entries(e.returnValues.reactions).forEach((([e,t])=>{n.set(parseInt(e),t)}));const i=document.querySelector(`woltlab-core-reaction-summary[object-type="${this._objectType}"][object-id="${t}"]`);i?.setData(n,e.returnValues.reactionTypeID),this._updateReactButton(t,e.returnValues.reactionTypeID)}_ajaxSetup(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,d.createFocusTrap)(this._popover,{allowOutsideClick:!0,escapeDeactivates:()=>(this._closePopover(),!1),preventScroll:!0})),this.focusTrap}}})),define("WoltLabSuite/Core/Api/Comments/Responses/RenderResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderResponse=void 0,t.renderResponse=async function(e,t=!1,o=undefined){const r=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}/render`);let a;r.searchParams.set("messageOnly",t.toString()),void 0!==o&&r.searchParams.set("objectTypeID",o.toString());try{a=await(0,n.prepareRequest)(r).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(a)}})),define("WoltLabSuite/Core/Api/Comments/Responses/RenderResponses",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderResponses=void 0,t.renderResponses=async function(e,t,o,r){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/render`);let s;a.searchParams.set("commentID",e.toString()),a.searchParams.set("lastResponseTime",t.toString()),a.searchParams.set("lastResponseID",o.toString()),a.searchParams.set("loadAllResponses",r.toString());try{s=await(0,n.prepareRequest)(a).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Component/Comment/List",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../Helper/Selector","../../Language","./Add","./Response/Add","../../Ui/Scroll","../../Ui/Reaction/Handler","WoltLabSuite/Core/Api/Comments/RenderComment","WoltLabSuite/Core/Api/Comments/RenderComments","WoltLabSuite/Core/Api/Comments/Responses/RenderResponse","WoltLabSuite/Core/Api/Comments/Responses/RenderResponses"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importDefault(i),o=n.__importDefault(o),c=n.__importStar(c),d=n.__importDefault(d);class f{#D;#Ye;constructor(e){this.#D=e,this.#Xe(),this.#Ge(),this.#Ke(),this.#Je(),this.#Qe(),this.#Ze()}#Ze(){"true"===this.#D.dataset.enableReactions&&(new d.default("com.woltlab.wcf.comment",{containerSelector:`#${this.#D.id} .commentList__item`,buttonSelector:".comment__button--react"}),new d.default("com.woltlab.wcf.comment.response",{containerSelector:`#${this.#D.id} .commentResponseList__item`,buttonSelector:".commentResponse__button--react"}))}#Qe(){window.addEventListener("hashchange",(()=>{this.#et()})),this.#et()}#et(){const e=window.location.hash.match(/^#(?:[^/]+\/)?comment(\d+)(?:\/response(\d+))?/);if(e){const t=this.#D.querySelector(`.commentList__item[data-comment-id="${e[1]}"]`);if(t)if(e[2]){const n=this.#D.querySelector(`.commentResponseList__item[data-response-id="${e[2]}"]`);n?this.#tt(n,!0):this.#nt(t,parseInt(e[2]))}else this.#tt(t,!0);else this.#it(parseInt(e[1]),e[2]?parseInt(e[2]):0)}}async#it(e,t){let n=this.#D.querySelector(".commentPermalink");n&&n.remove(),n=document.createElement("div"),n.classList.add("commentList__item","commentPermalink","commentPermalink--loading"),n.innerHTML='<woltlab-core-loading-indicator size="48" hide-text></woltlab-core-loading-indicator>',this.#D.querySelector(".commentList")?.prepend(n);const i=await(0,u.renderComment)(e,t||void 0,!1,parseInt(this.#D.dataset.objectTypeId));if(!i.ok)return void n.remove();const{template:r,response:a}=i.unwrap();o.default.insertHtml(r,n,"before"),n.remove();const s=this.#D.querySelector(`.commentList__item[data-comment-id="${e}"]`);if(s.classList.add("commentPermalink"),a){const e=document.createElement("div");e.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),e.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',s.querySelector(".commentResponseList").prepend(e),this.#ot(a)}else this.#tt(s,!0)}#ot(e){const t=this.#D.querySelector(".commentResponsePermalink");o.default.insertHtml(e,t,"before");const n=t.previousElementSibling;t.classList.add("commentResponsePermalink"),t.remove(),this.#tt(n,!0)}async#nt(e,t){let n=e.querySelector(".commentResponsePermalink");n&&n.remove(),n=document.createElement("div"),n.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),n.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',e.querySelector(".commentResponseList").prepend(n);const i=await(0,m.renderResponse)(t,!1,parseInt(this.#D.dataset.objectTypeId));i.ok?this.#ot(i.value.template):n.remove()}#tt(e,t=!1){c.element(e,(()=>{t&&(e.classList.contains("comment__highlight__target")&&e.classList.remove("comment__highlight__target"),e.classList.add("comment__highlight__target"))}))}#Je(){"true"===this.#D.dataset.canAdd&&(new s.CommentAdd(this.#D.querySelector(".commentAdd"),parseInt(this.#D.dataset.objectTypeId),parseInt(this.#D.dataset.objectId),(e=>{this.#rt(e)})),this.#Ye=new l.CommentResponseAdd(this.#D.querySelector(".commentResponseAdd"),((e,t)=>{this.#at(e,t)})))}#Xe(){(0,r.wheneverFirstSeen)("woltlab-core-comment",(e=>{this.#D.contains(e)&&(e.addEventListener("reply",(()=>{this.#st(e,e.commentId)})),e.addEventListener("delete",(()=>{e.parentElement?.remove()})),this.#lt(e.parentElement))}))}#Ge(){(0,r.wheneverFirstSeen)("woltlab-core-comment-response",(e=>{this.#D.contains(e)&&e.addEventListener("delete",(()=>{e.parentElement?.remove()}))}))}#lt(e){const t=e.querySelectorAll(".commentResponse").length,n=parseInt(e.dataset.responses);if(t<n){const i=(0,a.getPhrase)("wcf.comment.response.more",{count:n-t});if(e.querySelector(".commentLoadNextResponses"))e.querySelector(".commentLoadNextResponses__button").textContent=i;else{const t=document.createElement("div");t.classList.add("commentResponseList__item","commentLoadNextResponses"),e.querySelector(".commentResponseList").append(t);const n=document.createElement("button");n.type="button",n.classList.add("button","small","commentLoadNextResponses__button"),n.textContent=i,t.append(n),n.addEventListener("click",(()=>{this.#ct(e)}))}}else e.querySelector(".commentLoadNextResponses")?.remove()}async#ct(e,t=!1){e.querySelector(".commentLoadNextResponses__button").disabled=!0;const n=(await(0,h.renderResponses)(parseInt(e.dataset.commentId),parseInt(e.dataset.lastResponseTime),parseInt(e.dataset.lastResponseId),t)).unwrap(),r=o.default.createFragmentFromHtml(n.template);r.querySelectorAll(".commentResponseList__item").forEach((t=>{e.querySelector(`.commentResponseList__item[data-response-id="${t.dataset.responseId}"]`)?.remove()})),e.querySelector(".commentResponseList").insertBefore(r,e.querySelector(".commentLoadNextResponses")),i.default.trigger(),e.dataset.lastResponseTime=n.lastResponseTime.toString(),e.dataset.lastResponseId=n.lastResponseID.toString(),this.#lt(e)}#Ke(){if(this.#dt<this.#ut&&!this.#D.querySelector(".commentLoadNext")){const e=document.createElement("div");e.classList.add("commentList__item","commentLoadNext"),this.#D.querySelector(".commentList").append(e);const t=document.createElement("button");t.type="button",t.classList.add("button","small","commentLoadNext__button"),t.textContent=(0,a.getPhrase)("wcf.comment.more"),e.append(t),t.addEventListener("click",(()=>{this.#pt()}))}}async#pt(){const e=this.#D.querySelector(".commentLoadNext__button");e.disabled=!0;const t=(await(0,p.renderComments)(parseInt(this.#D.dataset.objectTypeId),parseInt(this.#D.dataset.objectId),parseInt(this.#D.dataset.lastCommentTime))).unwrap(),n=o.default.createFragmentFromHtml(t.template);n.querySelectorAll(".commentList__item").forEach((e=>{this.#D.querySelector(`.commentList__item[data-comment-id="${e.dataset.commentId}"]`)?.remove()})),this.#D.querySelector(".commentList").insertBefore(n,this.#D.querySelector(".commentLoadNext")),i.default.trigger(),this.#D.dataset.lastCommentTime=t.lastCommentTime.toString(),this.#dt<this.#ut?e.disabled=!1:this.#D.querySelector(".commentLoadNext").hidden=!0}#st(e,t){e.parentElement.append(this.#Ye.container),this.#Ye.show(t)}async#rt(e){const t=await(0,u.renderComment)(e);if(!t.ok){if(void 0===t.error.getValidationError())throw t.error;return}const n=this.#D.querySelector(".commentAdd").parentElement;o.default.insertHtml(t.value.template,n,"after"),i.default.trigger();const r=n.nextElementSibling;window.setTimeout((()=>{c.element(r)}),100)}async#at(e,t){const n=await(0,m.renderResponse)(t);if(!n.ok){if(void 0===n.error.getValidationError())throw n.error;return}const r=this.#D.querySelector(`.commentList__item[data-comment-id="${e}"]`);let a=r.querySelector(".commentResponseList");if(!a){const e=document.createElement("div");e.classList.add("comment__responses"),r.append(e),a=document.createElement("div"),a.classList.add("commentResponseList"),a.dataset.responses="1",e.append(a)}o.default.insertHtml(n.value.template,a,"append"),i.default.trigger();const s=a.firstElementChild;window.setTimeout((()=>{c.element(s)}),100)}get#dt(){return this.#D.querySelectorAll(".comment").length}get#ut(){return parseInt(this.#D.dataset.comments)}}t.setup=function(e){const t=document.getElementById(e);t?new f(t):console.debug(`Unable to find the container identified by '${e}'`)}})),define("WoltLabSuite/Core/Api/Comments/DeleteComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteComment=void 0,t.deleteComment=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}`).delete().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/EnableComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableComment=void 0,t.enableComment=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}/enable`).post().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/UpdateComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateComment=void 0,t.updateComment=async function(e,t){try{await(0,n.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/${e}`).post({message:t}).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Component/Comment/woltlab-core-comment",["require","exports","tslib","../../Dom/Util","../../Ui/Dropdown/Simple","../../Ui/Notification","../Confirmation","../../Ui/Scroll","../../Event/Handler","../../Language","../Ckeditor","WoltLabSuite/Core/Api/Comments/DeleteComment","WoltLabSuite/Core/Api/Comments/EnableComment","WoltLabSuite/Core/Api/Comments/EditComment","WoltLabSuite/Core/Api/Comments/UpdateComment","WoltLabSuite/Core/Api/Comments/RenderComment"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentElement=void 0,i=n.__importDefault(i),o=n.__importDefault(o),r=n.__importStar(r),s=n.__importStar(s),l=n.__importStar(l);class g extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".comment__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#mt()}));const t=this.menu.querySelector(".comment__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#ht()}));const n=this.menu.querySelector(".comment__option--edit");n?.addEventListener("click",(e=>{e.preventDefault(),this.#ft()}))}const e=this.querySelector(".comment__button--reply");e?.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("reply"))}))}async#mt(){(await(0,p.enableComment)(this.commentId)).unwrap(),this.querySelector(".comment__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".comment__option--enable").hidden=!0)}async#ht(){await(0,a.confirmationFactory)().delete()&&((await(0,u.deleteComment)(this.commentId)).unwrap(),r.show(),this.dispatchEvent(new CustomEvent("delete")))}async#ft(){this.menu.querySelector(".comment__option--edit").hidden=!0;const{template:e}=(await(0,m.editComment)(this.commentId)).unwrap();this.#gt(e)}#gt(e){this.querySelector(".htmlContent").hidden=!0,i.default.insertHtml(e,this.#Te,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#bt()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#vt()})),l.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#wt}`,(e=>{e.cancel=!0,this.#bt()})),window.setTimeout((()=>{s.element(this)}),250)}async#bt(){const e=(0,d.getCkeditorById)(this.#wt),t={data:{message:e.getHtml()}};if(!this.#yt(t))return;l.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#wt}`,t),this.#a();const n=await(0,h.updateComment)(this.commentId,e.getHtml());if(!n.ok){const e=n.error.getValidationError();if(void 0===e)throw n.error;return i.default.innerError(document.getElementById(this.#wt),e.code),void this.#_t()}const{template:o}=(await(0,f.renderComment)(this.commentId,void 0,!0)).unwrap();i.default.setInnerHtml(this.querySelector(".htmlContent"),o),this.#_t(),this.#vt(),r.show()}#a(){let e=this.querySelector(".comment__loading");e||(e=document.createElement("div"),e.classList.add("comment__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".comment__message").append(e)),this.#Te.hidden=!0,e.hidden=!1}#_t(){this.#Te.hidden=!1;const e=this.querySelector(".comment__loading");e&&(e.hidden=!0)}#yt(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,d.getCkeditorById)(this.#wt);if(""===t.getHtml())return i.default.innerError(t.element,(0,c.getPhrase)("wcf.global.form.error.empty")),!1;const n={api:this,parameters:e,valid:!0};return l.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#wt}`,n),n.valid}#vt(){(0,d.getCkeditorById)(this.#wt).destroy(),this.#Te.remove(),this.menu.querySelector(".comment__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#Te(){let e=this.querySelector(".comment__editor");return e||(e=document.createElement("div"),e.classList.add("comment__editor"),this.querySelector(".comment__message").append(e)),e}get commentId(){return parseInt(this.getAttribute("comment-id"))}get menu(){let e=o.default.getDropdownMenu(`commentOptions${this.commentId}`);return void 0===e&&(e=this.querySelector(".comment__menu .dropdownMenu")||void 0),e}get#wt(){return`commentEditor${this.commentId}`}}t.WoltlabCoreCommentElement=g,window.customElements.define("woltlab-core-comment",g),t.default=g})),define("WoltLabSuite/Core/Api/Files/Chunk/Chunk",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadChunk=void 0,t.uploadChunk=async function(e,t,o,r){const a=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/files/upload/${e}/chunk/${t}`);let s;try{s=await(0,n.prepareRequest)(a).post(r).withHeader("chunk-checksum-sha256",o).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function n(e){return e===s||e===l||e===c}function i(...e){let t=0;const n=e.reduce(((e,t)=>e+t.length),0),i=new Uint8Array(n);return e.forEach((e=>{i.set(e,t),t+=e.length})),i}async function o(e){return new Promise(((t,n)=>{const i=new FileReader;i.addEventListener("error",(()=>{i.abort(),n(i.error)})),i.addEventListener("load",(()=>{t(new Uint8Array(i.result))})),i.readAsArrayBuffer(e)}))}async function r(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");let r=t;for(let e=2;e<r.length&&255===r[e];){const t=2+(r[e+2]<<8|r[e+3]);if(r[e+1]===a.APP1){let o="";for(let t=e+4;0!==r[t]&&t<r.length;t++)o+=String.fromCharCode(r[t]);if(n(o)){const n=r.slice(0,e),o=r.slice(e+t);r=i(n,o)}else e+=t}else e+=t}return new Blob([r],{type:e.type})}Object.defineProperty(t,"__esModule",{value:!0}),t.setExifData=t.removeExifData=t.getExifBytesFromJpeg=void 0;const a={SOI:216,APP0:224,APP1:225,APP2:226,APP3:227,APP4:228,APP5:229,APP6:230,APP7:231,APP8:232,APP9:233,APP10:234,APP11:235,APP12:236,APP13:237,APP14:238,COM:254},s="Exif",l="http://ns.adobe.com/xap/1.0/",c="http://ns.adobe.com/xmp/extension/";t.getExifBytesFromJpeg=async function(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);let r=new Uint8Array(0);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");for(let e=2;e<t.length&&255===t[e];){const o=2+(t[e+2]<<8|t[e+3]);if(t[e+1]===a.APP1){let a="";for(let n=e+4;0!==t[n]&&n<t.length;n++)a+=String.fromCharCode(t[n]);n(a)&&(r=i(r,t.slice(e,o+e)))}e+=o}return r},t.removeExifData=r,t.setExifData=async function(e,t){e=await r(e);const n=await o(e);let s=2;255===n[2]&&n[3]===a.APP0&&(s+=2+(n[4]<<8|n[5]));const l=i(n.slice(0,s),t,n.slice(s));return new Blob([l],{type:e.type})}})),define("WoltLabSuite/Core/Image/Resizer",["require","exports","tslib","../FileUtil","./ExifUtil","pica"],(function(e,t,n,i,o,r){"use strict";i=n.__importStar(i),o=n.__importStar(o);const a=new((r=n.__importDefault(r)).default)({features:["js","wasm","ww"]}),s="image/jpeg";return class{maxWidth=800;maxHeight=600;quality=.8;fileType=s;setMaxWidth(e){return null==e&&(e=800),this.maxWidth=e,this}setMaxHeight(e){return null==e&&(e=600),this.maxHeight=e,this}setQuality(e){return null==e&&(e=.8),this.quality=e,this}setFileType(e){return null==e&&(e=s),this.fileType=e,this}async saveFile(e,t,n=this.fileType,r=this.quality){const s=/(.+)(\..+?)$/.exec(t);let l=await a.toBlob(e.image,n,r);return"image/jpeg"===n&&void 0!==e.exif&&(l=await o.setExifData(l,e.exif)),i.blobToFile(l,s[1])}async loadFile(e){let t=Promise.resolve(void 0),n=e;"image/jpeg"===e.type&&(t=o.getExifBytesFromJpeg(e),n=await o.removeExifData(n));const i=new Promise(((e,t)=>{const i=new FileReader,o=new Image;i.addEventListener("load",(()=>{o.src=i.result})),i.addEventListener("error",(()=>{i.abort(),t(i.error)})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),i.readAsDataURL(n)})),[r,a]=await Promise.all([t,i]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,n=this.maxHeight,i=this.quality,o=!1,r){const s=document.createElement("canvas");if(window.createImageBitmap&&(await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965");const l=Math.min(t,e.width),c=Math.min(n,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);s.width=Math.floor(e.width*d),s.height=Math.floor(e.height*d);let u=1;i>=.8?u=3:i>=.4&&(u=2);const p={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,p)}}})),define("WoltLabSuite/Core/Component/File/Upload",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Api/Files/Upload","WoltLabSuite/Core/Api/Files/Chunk/Chunk","WoltLabSuite/Core/Api/Files/GenerateThumbnails","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Language"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";async function d(e,t){const n=e.dataset.objectType,i=await m(await t.arrayBuffer()),a=document.createElement("woltlab-core-file");a.dataset.filename=t.name,a.dataset.fileSize=t.size.toString();const s=new CustomEvent("uploadStart",{detail:a});e.dispatchEvent(s);const l=await(0,o.upload)(t.name,t.size,i,n,e.dataset.context||"");if(!l.ok){if(void 0===l.error.getValidationError())throw a.uploadFailed(l.error),l.error;return void a.uploadFailed(l.error)}const{identifier:c,numberOfChunks:d}=l.value,h=Math.ceil(t.size/d);u(a,0,d);for(let e=0;e<d;e++){const n=e*h,i=n+h,o=t.slice(n,i),s=await m(await o.arrayBuffer()),l=await(0,r.uploadChunk)(c,e,s,o);if(!l.ok)throw a.uploadFailed(l.error),l.error;if(u(a,e+1,d),await p(a,l.value),l.value.completed)return l.value}}function u(e,t,n){if(1===n)return;const i=new CustomEvent("uploadProgress",{detail:Math.floor(t/n*100)});e.dispatchEvent(i)}async function p(e,t){if(t.completed&&(e.uploadCompleted(t.fileID,t.mimeType,t.link,t.data,t.generateThumbnails),t.generateThumbnails)){const n=await(0,a.generateThumbnails)(t.fileID);e.setThumbnails(n.unwrap())}}async function m(e){const t=await window.crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}function h(e){e.parentElement?.querySelectorAll(".innerError").forEach((e=>e.remove()))}async function f(e,t){switch(t.type){case"image/jpeg":case"image/png":case"image/webp":break;default:return t}const n=new Promise((e=>{window.setTimeout((()=>e(t)),1e4)})),i=JSON.parse(e.dataset.resizeConfiguration),o=new s.default,{image:r,exif:a}=await o.loadFile(t),l=-1===i.maxHeight?r.height:i.maxHeight;let c=-1===i.maxWidth?r.width:i.maxWidth;if(window.devicePixelRatio>=2){const e=window.screen.width*window.devicePixelRatio,t=window.screen.height*window.devicePixelRatio;e===r.width&&t===r.height&&(c=Math.min(c,window.screen.width))}const d=await o.resize(r,c,l,i.quality,!0,n);if(void 0===d)return t;let u=i.fileType;return u="image/jpeg"===u||"image/webp"===u?"image/webp":t.type,await o.saveFile({exif:a,image:d},t.name,u,i.quality)}function g(e,t){const n=(e.dataset.fileExtensions||"*").split(",");for(const e of n){if("*"===e)return!0;if(t.name.endsWith(e))return!0}return(0,l.innerError)(e,(0,c.getPhrase)("wcf.upload.error.fileExtensionNotPermitted",{filename:t.name})),!1}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.clearPreviousErrors=void 0,s=n.__importDefault(s),t.clearPreviousErrors=h,t.setup=function(){(0,i.wheneverFirstSeen)("woltlab-core-file-upload",(e=>{e.addEventListener("upload",(t=>{const n=t.detail;h(e),function(e){const t=e.maximumCount;return-1===t||Array.from(e.parentElement.querySelectorAll("woltlab-core-file")).filter((e=>!e.isFailedUpload())).length+1<=t||((0,l.innerError)(e,(0,c.getPhrase)("wcf.upload.error.maximumCountReached",{maximumCount:t})),!1)}(e)&&g(e,n)&&function(e,t){let n=!1;switch(t.type){case"image/gif":case"image/jpeg":case"image/png":case"image/webp":n=!0}if(n)return!0;const i=e.maximumSize;return-1===i||t.size<=i||((0,l.innerError)(e,(0,c.getPhrase)("wcf.upload.error.fileSizeTooLarge",{filename:t.name})),!1)}(e,n)&&f(e,n).then((t=>{d(e,t)}))})),e.addEventListener("ckeditorDrop",(t=>{const{file:n}=t.detail;let i,o;t.detail.promise=new Promise(((e,t)=>{i=e,o=t})),h(e),g(e,n)?f(e,n).then((async t=>{try{const n=await d(e,t);if(void 0===n||"number"!=typeof n.data.attachmentID)o();else{const e={attachmentId:n.data.attachmentID,url:n.link};i(e)}}catch(e){throw o(),e}})):o()}))}))}})),define("WoltLabSuite/Core/Ui/Search/Input",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),class{activeItem=void 0;ajaxPayload;autoFocus;callbackDropdownInit=void 0;callbackSelect=void 0;delay;dropdownContainerId="";element;excludedSearchValues=new Set;list=void 0;lastValue="";minLength;noResultPlaceholder;preventSubmit;request=void 0;suppressErrors;timerDelay=void 0;constructor(e,t){if(this.element=e,!(this.element instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this.element.nodeName||"search"!==this.element.type&&"text"!==this.element.type)throw new Error('Expected an input[type="text"].');t=o.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:void 0,callbackSelect:void 0,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1,suppressErrors:!1},t),this.ajaxPayload=t.ajax,this.autoFocus=t.autoFocus,this.callbackDropdownInit=t.callbackDropdownInit,this.callbackSelect=t.callbackSelect,this.delay=t.delay,t.excludedSearchValues.forEach((e=>{this.addExcludedSearchValues(e)})),this.minLength=t.minLength,this.noResultPlaceholder=t.noResultPlaceholder,this.preventSubmit=t.preventSubmit,this.suppressErrors=t.suppressErrors||!1,this.element.autocomplete="off",this.element.addEventListener("keydown",(e=>this.keydown(e))),this.element.addEventListener("keyup",(e=>this.keyup(e)))}addExcludedSearchValues(e){this.excludedSearchValues.add(e)}removeExcludedSearchValues(e){this.excludedSearchValues.delete(e)}keydown(e){(this.activeItem&&a.default.isOpen(this.dropdownContainerId)||this.preventSubmit)&&"Enter"===e.key&&e.preventDefault(),["ArrowUp","ArrowDown","Escape"].includes(e.key)&&e.preventDefault()}keyup(e){if(this.activeItem||!this.autoFocus)if(a.default.isOpen(this.dropdownContainerId)){if("ArrowUp"===e.key)return e.preventDefault(),this.keyboardPreviousItem();if("ArrowDown"===e.key)return e.preventDefault(),this.keyboardNextItem();if("Enter"===e.key)return e.preventDefault(),this.keyboardSelectItem()}else this.activeItem=void 0;if("Escape"===e.key)return void a.default.close(this.dropdownContainerId);const t=this.element.value.trim();this.lastValue!==t&&(this.lastValue=t,t.length<this.minLength?this.dropdownContainerId&&(a.default.close(this.dropdownContainerId),this.activeItem=void 0):this.delay?(this.timerDelay&&window.clearTimeout(this.timerDelay),this.timerDelay=window.setTimeout((()=>{this.search(t)}),this.delay)):this.search(t))}search(e){this.request&&this.request.abortPrevious(),this.request=i.api(this,this.getParameters(e))}getParameters(e){return{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:e}}}}keyboardNextItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.nextElementSibling&&(e=this.activeItem.nextElementSibling)),this.activeItem=e||this.list.children[0],this.activeItem.classList.add("active")}keyboardPreviousItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.previousElementSibling&&(e=this.activeItem.previousElementSibling)),this.activeItem=e||this.list.children[this.list.childElementCount-1],this.activeItem.classList.add("active")}keyboardSelectItem(){this.selectItem(this.activeItem)}clickSelectItem(e){this.selectItem(e.currentTarget)}selectItem(e){this.callbackSelect&&!this.callbackSelect(e)?this.element.value="":this.element.value=e.dataset.label||"",this.activeItem=void 0,a.default.close(this.dropdownContainerId)}_ajaxSuccess(e){let t=!1;if(this.list?this.list.innerHTML="":(this.list=document.createElement("ul"),this.list.className="dropdownMenu",t=!0,"function"==typeof this.callbackDropdownInit&&this.callbackDropdownInit(this.list)),"object"==typeof e.returnValues){const t=this.clickSelectItem.bind(this);Object.keys(e.returnValues).forEach((n=>{const i=this.createListItem(e.returnValues[n]);i.addEventListener("click",t),this.list.appendChild(i)}))}if(t){this.element.insertAdjacentElement("afterend",this.list);const e=this.element.parentElement;a.default.initFragment(e,this.list),this.dropdownContainerId=r.default.identify(e)}if(this.dropdownContainerId)if(this.activeItem=void 0,this.list.childElementCount||this.handleEmptyResult()){a.default.open(this.dropdownContainerId,!0,this.element);const e=this.list.childElementCount?this.list.children[0]:void 0;this.autoFocus&&e&&~~(e.dataset.objectId||"")&&(this.activeItem=e,this.activeItem.classList.add("active"))}else a.default.close(this.dropdownContainerId)}handleEmptyResult(){if(!this.noResultPlaceholder)return!1;const e=document.createElement("li");e.className="dropdownText";const t=document.createElement("span");return t.textContent=this.noResultPlaceholder,e.appendChild(t),this.list.appendChild(e),!0}createListItem(e){const t=document.createElement("li");t.dataset.objectId=e.objectID.toString(),t.dataset.label=e.label;const n=document.createElement("span");return n.textContent=e.label,t.appendChild(n),t}_ajaxSetup(){return{data:this.ajaxPayload,silent:this.suppressErrors,ignoreError:this.suppressErrors}}}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding/Suggestion",["require","exports","tslib","../../../Ui/Search/Input"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importDefault(i);class o extends i.default{#Et;constructor(e,t,n){super(e,t),this.#Et=n}search(e){this.#Et.geocode({address:e},((e,t)=>{if(t===google.maps.GeocoderStatus.OK){const t={actionName:"",objectIDs:[],returnValues:{}};e.forEach((e=>{t.returnValues[e.formatted_address]={label:e.formatted_address,objectID:e.formatted_address}})),this._ajaxSuccess(t)}}))}}t.setup=function(e,t,n){new o(e,{callbackSelect:n},t)}})),define("WoltLabSuite/Core/Component/GoogleMaps/woltlab-core-google-maps",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreGoogleMapsElement=void 0;let n=!1;const i=new Promise((e=>{window.woltlab_core_google_maps_callback=e}));class o extends HTMLElement{#St;#Ct;#Lt;#kt=!1;#Et;constructor(){super(),this.#Ct=new Promise((e=>{this.#Lt=e}))}connectedCallback(){this.hidden||this.#xt()}attributeChangedCallback(e,t,n){"hidden"===e&&null===n&&this.#xt()}static get observedAttributes(){return["hidden"]}#xt(){this.#kt||(this.#Re(),this.#kt=!0,(e=>{if(!n){const t=document.createElement("script");t.src="https://maps.googleapis.com/maps/api/js?"+(e?`key=${e}&`:"")+"callback=woltlab_core_google_maps_callback",document.head.appendChild(t),n=!0}return i})(this.apiKey).then((()=>{this.hasAttribute("access-user-location")?navigator.geolocation.getCurrentPosition((e=>{this.setAttribute("lat",e.coords.latitude.toString()),this.setAttribute("lng",e.coords.longitude.toString()),this.#Tt()}),(()=>{this.#Tt()})):this.#Tt()})))}#Tt(){this.#St=new google.maps.Map(this,{zoom:this.zoom,center:{lat:this.lat,lng:this.lng}}),this.#It(),this.#Lt&&(this.#Lt(),this.#Lt=void 0)}async#It(){await this.#Ct;const e=this.bounds;e&&this.#St.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.southWest.latitude,e.southWest.longitude),new google.maps.LatLng(e.northEast.latitude,e.northEast.longitude)))}#Re(){if(!this.apiKey)throw new TypeError("Must provide an api key.")}get apiKey(){return this.getAttribute("api-key")||""}async getMap(){return await this.#Ct,this.#St}get lat(){return this.getAttribute("lat")?parseFloat(this.getAttribute("lat")):0}get lng(){return this.getAttribute("lng")?parseFloat(this.getAttribute("lng")):0}get zoom(){return this.getAttribute("zoom")?parseInt(this.getAttribute("zoom")):13}get bounds(){return this.getAttribute("bounds")?JSON.parse(this.getAttribute("bounds")):null}async getGeocoder(){return await this.#Ct,void 0===this.#Et&&(this.#Et=new google.maps.Geocoder),this.#Et}}t.WoltlabCoreGoogleMapsElement=o,window.customElements.define("woltlab-core-google-maps",o),t.default=o})),define("WoltLabSuite/Core/Component/GoogleMaps/Marker",["require","exports","./woltlab-core-google-maps"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDraggableMarker=t.addMarker=void 0,t.addMarker=async function(e,t,n,i,o){const r=await e.getMap(),a=new google.maps.Marker({map:r,position:new google.maps.LatLng(t,n),title:i});o&&r.setCenter(a.getPosition())},t.addDraggableMarker=async function(e,t,n){const i=await e.getMap();void 0===t&&(t=e.lat),void 0===n&&(n=e.lng);const o=new google.maps.Marker({map:i,position:new google.maps.LatLng(t,n),draggable:!0,clickable:!1});return i.setCenter(o.getPosition()),o}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding",["require","exports","../../Helper/Selector","./Geocoding/Suggestion","./Marker","./woltlab-core-google-maps"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;class r{#O;#St;#Mt;#At;constructor(e,t){this.#O=e,this.#St=t,this.#je(),this.#St.getGeocoder().then((t=>{this.#O.hasAttribute("data-google-maps-marker")&&this.#Pt(),e.value&&this.#Dt(e.value),(0,i.setup)(this.#O,t,(e=>(this.#Dt(e.dataset.label),!0)))}))}#je(){this.#O.addEventListener("geocoding:move-marker",(e=>{this.#jt(e.detail.latitude,e.detail.longitude)})),this.#O.addEventListener("geocoding:resolve",(e=>{this.#St.getGeocoder().then((t=>{const n=new google.maps.LatLng(e.detail.latitude,e.detail.longitude);t.geocode({location:n},((t,n)=>{n===google.maps.GeocoderStatus.OK&&e.detail.callback(t[0].formatted_address)}))}))})),this.#O.addEventListener("geocoding:reset-marker",(()=>{this.#At&&this.#jt(this.#At.lat(),this.#At.lng())}))}async#Pt(){this.#Mt=await(0,o.addDraggableMarker)(this.#St),this.#At=this.#Mt.getPosition(),this.#Mt.addListener("dragend",(()=>{this.#St.getGeocoder().then((e=>{e.geocode({location:this.#Mt.getPosition()},((e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#O.value=e[0].formatted_address,this.#Ot(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}))}))}async#jt(e,t){const n=new google.maps.LatLng(e,t);this.#Mt?.setPosition(n),(await this.#St.getMap()).setCenter(n),this.#Ot(e,t)}async#Dt(e){(await this.#St.getGeocoder()).geocode({address:e},(async(e,t)=>{t===google.maps.GeocoderStatus.OK&&(this.#Mt?.setPosition(e[0].geometry.location),(await this.#St.getMap()).setCenter(e[0].geometry.location),this.#Ot(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}#Ot(e,t){this.#O.dataset.googleMapsLat=e.toString(),this.#O.dataset.googleMapsLng=t.toString();const n=this.#O.dataset.googleMapsGeocodingStore;null!=n&&this.#O.form&&this.#qt(n,e,t)}#qt(e,t,n){const i=e+"coordinates";let o=this.#O.form.querySelector(`input[name="${i}"]`);o||(o=document.createElement("input"),o.type="hidden",o.name=i,this.#O.form.append(o)),o.value=`${t},${n}`}}t.setup=function(){(0,n.wheneverFirstSeen)("[data-google-maps-geocoding]",(e=>{const t=document.getElementById(e.dataset.googleMapsGeocoding);new r(e,t)}))}})),define("WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader",["require","exports","tslib","../../Ajax","../Dialog","../../Dom/Util","@googlemaps/markerclusterer","./woltlab-core-google-maps"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=n.__importDefault(r);class s{#St;#Bt;#Rt;#Ft;#Nt;#Ut;#y=[];constructor(e,t,n){this.#St=e,this.#Bt=t,this.#Rt=n,this.#Ft=new a.MarkerClusterer({map:e}),this.#Wt()}async#Wt(){this.#St.getBounds()&&await this.#Ht(),this.#St.addListener("idle",(()=>{this.#Ht()}))}async#Ht(){const e=this.#St.getBounds().getNorthEast(),t=this.#St.getBounds().getSouthWest();this.#Vt(e,t)&&(await(0,i.dboAction)("getMapMarkers",this.#Bt).payload({...this.#Rt,excludedObjectIDs:JSON.stringify(this.#y),eastLongitude:e.lng(),northLatitude:e.lat(),southLatitude:t.lat(),westLongitude:t.lng()}).dispatch()).markers.forEach((e=>{this.#$t(e)}))}#$t(e){const t=new google.maps.Marker({map:this.#St,position:new google.maps.LatLng(e.latitude,e.longitude),title:e.title});if(this.#Ft.addMarker(t),e.infoWindow){const n=document.createElement("div");r.default.setInnerHtml(n,e.infoWindow);const i=new google.maps.InfoWindow({content:n});if(t.addListener("click",(()=>{i.open(this.#St,t)})),e.dialog){let t;i.addListener("domready",(()=>{const i=n.querySelector(".jsButtonShowDialog");i?.addEventListener("click",(()=>{t||(t=(0,o.dialogFactory)().fromHtml(e.dialog).withoutControls()),t.show(i.dataset.title||i.textContent)}))}))}}e.objectID&&this.#y.push(e.objectID),e.objectIDs&&this.#y.push(...e.objectIDs)}#Vt(e,t){return!(this.#Nt&&this.#Nt.lat()>=e.lat()&&this.#Nt.lng()>=e.lng()&&this.#Ut.lat()<=t.lat()&&this.#Ut.lng()<=t.lng()||(this.#Nt=e,this.#Ut=t,0))}}t.setup=async function(e,t,n){const i=await e.getMap();new s(i,t,n)}})),define("WoltLabSuite/Core/Component/User/Follow",["require","exports","tslib","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,s=n.__importStar(s),t.setup=function(){(0,r.wheneverFirstSeen)("[data-follow-user]",(e=>{e.addEventListener("click",(0,o.promiseMutex)((()=>async function(e){"1"!==e.dataset.following?(await(0,i.prepareRequest)(e.dataset.followUser).post({action:"follow"}).fetchAsResponse(),e.dataset.following="1",e.dataset.tooltip=(0,a.getPhrase)("wcf.user.button.unfollow"),e.querySelector("fa-icon")?.setIcon("circle-minus")):(await(0,i.prepareRequest)(e.dataset.followUser).post({action:"unfollow"}).fetchAsResponse(),e.dataset.following="0",e.dataset.tooltip=(0,a.getPhrase)("wcf.user.button.follow"),e.querySelector("fa-icon")?.setIcon("circle-plus")),s.show()}(e))))}))}})),define("WoltLabSuite/Core/Component/User/Ignore",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Component/Dialog"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,i.wheneverFirstSeen)("[data-ignore-user]",(e=>{e.addEventListener("click",(0,n.promiseMutex)((()=>async function(e){const{ok:t,result:n}=await(0,a.dialogFactory)().usingFormBuilder().fromEndpoint(e.dataset.ignoreUser);t&&(n.type?(e.dataset.ignored="1",e.dataset.tooltip=(0,o.getPhrase)("wcf.user.button.unignore"),e.querySelector("fa-icon")?.setIcon("eye",!0)):(e.dataset.ignored="0",e.dataset.tooltip=(0,o.getPhrase)("wcf.user.button.ignore"),e.querySelector("fa-icon")?.setIcon("eye-slash",!0)),(0,r.show)())}(e))))}))}})),define("WoltLabSuite/Core/Component/User/List",["require","exports","tslib","../../Ajax","../../Ui/Pagination","../Dialog","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserList=void 0,o=n.__importDefault(o),a=n.__importDefault(a),t.UserList=class{#zt;#Yt;#Xt=1;#Gt=0;#e;constructor(e,t){this.#zt=e,this.#Yt=t}open(){this.#Xt=1,this.#Kt(this.#Xt)}#Jt(e,t){e&&(this.#Xt=e);const n=this.#Qt();if(a.default.setInnerHtml(n.content,t),n.show(this.#Yt),this.#Gt>1){const e=n.content.querySelector(".jsPagination");null!==e&&new o.default(e,{activePage:this.#Xt,maxPage:this.#Gt,callbackSwitch:e=>{this.#Kt(e)}})}}async#Kt(e){if(0!==this.#Gt&&(e<1||e>this.#Gt))throw new RangeError(`pageNo must be between 1 and ${this.#Gt} (${e} given).`);this.#zt.parameters.pageNo=e;const t=await(0,i.dboAction)("getGroupedUserList",this.#zt.className).payload(this.#zt.parameters).dispatch();t.pageCount&&(this.#Gt=t.pageCount),this.#Jt(e,t.template)}#Qt(){return void 0===this.#e&&(this.#e=(0,r.dialogFactory)().withoutContent().withoutControls()),this.#e}}})),define("WoltLabSuite/Core/Controller/Moderation/AssignUser",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","../../Component/Dialog","../../Language","../../Ui/Notification"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){e.addEventListener("click",(0,n.promiseMutex)((()=>async function(e){const{ok:t,result:n}=await(0,i.dialogFactory)().usingFormBuilder().fromEndpoint(e);var a;t&&(function(e){const t=document.getElementById("moderationAssignedUser");if(null===e)t.textContent=(0,o.getPhrase)("wcf.moderation.assignedUser.nobody");else{const n=document.createElement("a");n.href=e.link,n.dataset.objectId=e.userID.toString(),n.classList.add("userLink"),n.innerHTML=e.username,t.innerHTML="",t.append(n)}}(n.assignee),a=n.status,document.getElementById("moderationQueueStatus").textContent=a,(0,r.show)())}(e.dataset.url))))}})),define("WoltLabSuite/Core/Controller/Style/ColorScheme",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=document.querySelector('meta[name="theme-color"]');e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{document.documentElement.dataset.colorScheme=t.matches?"dark":"light",e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor")}))}})),define("WoltLabSuite/Core/Controller/User/Profile",["require","exports","../../Component/User/List"],(function(e,t,n){"use strict";function i(e,t,i){const o=document.getElementById(t);if(o){let t;o.addEventListener("click",(()=>{void 0===t&&(t=new n.UserList({className:i,parameters:{userID:e}},o.dataset.dialogTitle)),t.open()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){!function(e){i(e,"followingAll","wcf\\data\\user\\follow\\UserFollowingAction")}(e),function(e){i(e,"followerAll","wcf\\data\\user\\follow\\UserFollowAction")}(e),function(e){i(e,"visitorAll","wcf\\data\\user\\profile\\visitor\\UserProfileVisitorAction")}(e)}})),define("WoltLabSuite/Core/Controller/User/Registration",["require","exports","tslib","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Language","../../Dom/Util"],(function(e,t,n,i,o,r){"use strict";function a(e,t){const n=e.closest("dl");n.classList.add("formError"),n.classList.remove("formSuccess"),r.default.innerError(e,(0,o.getPhrase)(t))}function s(e){const t=e.closest("dl");t.classList.remove("formError"),t.classList.add("formSuccess"),r.default.innerError(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=n.__importDefault(r),t.setup=function(e,t,n,o){e.addEventListener("blur",(()=>{!async function(e,t){const n=e.value.trim();if(!n)return void a(e,"wcf.global.form.error.empty");if(n.length<t.minlength||n.length>t.maxlength)return void a(e,"wcf.user.username.error.invalid");const o=await(0,i.prepareRequest)(e.dataset.validationEndpoint).post({username:n}).fetchAsJson();o.ok?s(e):a(e,`wcf.user.username.error.${o.error}`)}(e,o)})),t.addEventListener("blur",(()=>{!async function(e){const t=e.value.trim();if(!t)return void a(e,"wcf.global.form.error.empty");const n=await(0,i.prepareRequest)(e.dataset.validationEndpoint).post({email:t}).fetchAsJson();n.ok?s(e):a(e,`wcf.user.email.error.${n.error}`)}(t)})),n.addEventListener("blur",(()=>{!function(e){e.value.trim()||a(e,"wcf.global.form.error.empty")}(n)}))}})),define("WoltLabSuite/Core/Form/Builder/Dialog",["require","exports","tslib","../../Core","../../Ui/Dialog","../../Ajax","./Manager"],(function(e,t,n,i,o,r,a){"use strict";return i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importStar(a),class{_actionName;_className;_dialogContent;_dialogId;_formId;_options;_additionalSubmitButtons;constructor(e,t,n,i){this.init(e,t,n,i)}init(e,t,n,r){if(this._dialogId=e,this._className=t,this._actionName=n,this._options=i.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:/\w+\\data\\/.test(this._className)},r),this._options.dialog=i.extend(this._options.dialog||{},{onClose:()=>this._dialogOnClose()}),o.default.getDialog(this._dialogId))throw new Error(`The dialogId ${this._dialogId} is already in use.`);this._formId="",this._dialogContent=""}_ajaxSetup(){const e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+i.getXsrfToken(),e.withCredentials=!0),e}_ajaxSuccess(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");!function(e){if(void 0===e.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.formId)throw new Error("Missing form id in return data.")}(e.returnValues),this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&void 0!==(t=e.returnValues).dialog&&void 0!==t.formId){if(e.returnValues.formId!==this._formId)throw new Error("Mismatch between form ids: expected '"+this._formId+"' but got '"+e.returnValues.formId+"'.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog)}else this.destroy(),"function"==typeof this._options.successCallback&&this._options.successCallback(e.returnValues||{});break;default:throw new Error("Cannot handle action '"+e.actionName+"'.")}var t}_closeDialog(){o.default.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()}_dialogOnClose(){this._options.destroyOnClose&&this.destroy()}_dialogSetup(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}}_dialogSubmit(){this.getData().then((e=>this._submitForm(e)))}_openDialogContent(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;const n=o.default.open(this,this._dialogContent),r=n.content.querySelector("button[data-type=cancel]");null===r||i.stringToBool(r.dataset.hasEventListener||"")||(r.addEventListener("click",(()=>this._closeDialog())),r.dataset.hasEventListener="1"),this._additionalSubmitButtons=Array.from(n.content.querySelectorAll(':not(.formSubmit) button[type="submit"]')),this._additionalSubmitButtons.forEach((e=>{e.addEventListener("click",(()=>{this._additionalSubmitButtons.forEach((t=>{t.dataset.isClicked=t===e?"1":"0"})),setTimeout((()=>o.default.submit(this._dialogId)),0)}))}))}_submitForm(e){const t=o.default.getDialog(this).content.querySelector("button[data-type=submit]");"function"==typeof this._options.onSubmit?this._options.onSubmit(e,t):"string"==typeof this._options.submitActionName&&(t.disabled=!0,this._additionalSubmitButtons.forEach((e=>e.disabled=!0)),r.api(this,{actionName:this._options.submitActionName,parameters:{data:e,formId:this._formId}}))}destroy(e=!1){""!==this._formId&&(a.hasForm(this._formId)&&a.unregisterForm(this._formId),!0!==e&&o.default.destroy(this))}getData(){if(""===this._formId)throw new Error("Form has not been requested yet.");return a.getData(this._formId)}open(){o.default.getDialog(this._dialogId)?o.default.open(this):r.api(this)}}})),define("WoltLabSuite/Core/Helper/Dom/View",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomView=void 0,i=n.__importDefault(i);class o{#Zt;constructor(e){this.#Zt=this.#en(e)}get root(){return this.#Zt}#en(e){if(e instanceof HTMLElement)return e;if("string"==typeof e&&(e=i.default.createFragmentFromHtml(e)),1===e.children.length)return e.children[0];const t=document.createElement("div");return t.append(e),t}}t.DomView=o,t.default=o})),function(e){!function(t){function n(e,t){return function(n,i){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:i}),t&&t(n,i)}}var i="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=n(e);void 0===i.Reflect?i.Reflect=e:o=n(i.Reflect,o),function(e){function t(e,t,n){var i,o=O.get(e);if(d(o)){if(!n)return;o=new D,O.set(e,o)}if(d(i=o.get(t))){if(!n)return;i=new D,o.set(t,i)}return i}function n(e,t,o){var r;return!!i(e,t,o)||!u(r=_(t))&&n(e,r,o)}function i(e,n,i){var o=t(n,i,!1);return!d(o)&&!!o.has(e)}function o(e,t,n){var a;return i(e,t,n)?r(e,t,n):u(a=_(t))?void 0:o(e,a,n)}function r(e,n,i){var o=t(n,i,!1);if(!d(o))return o.get(e)}function a(e,n,i,o){t(i,o,!0).set(e,n)}function s(e,t){var n,i,o,r,a,c,d,u,p=l(e,t),m=_(e);if(null===m)return p;if((n=s(m,t)).length<=0)return p;if(p.length<=0)return n;for(i=new j,o=[],r=0,a=p;r<a.length;r++)c=a[r],i.has(c)||(i.add(c),o.push(c));for(d=0,u=n;d<u.length;d++)c=u[d],i.has(c)||(i.add(c),o.push(c));return o}function l(e,n){var i,o,r,a,s=[],l=t(e,n,!1);if(d(l))return s;for(i=function(e){var t,n=v(e,k);if(!g(n))throw new TypeError;if(!p(t=n.call(e)))throw new TypeError;return t}(l.keys()),o=0;;){if(!(r=w(i)))return s.length=o,s;a=r.value;try{s[o]=a}catch(e){try{y(i)}finally{throw e}}o++}}function c(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function d(e){return void 0===e}function u(e){return null===e}function p(e){return"object"==typeof e?null!==e:"function"==typeof e}function m(e,t){var n,i,o;switch(c(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}if(n=3===t?"string":5===t?"number":"default",void 0!==(i=v(e,L))){if(p(o=i.call(e,n)))throw new TypeError;return o}return function(e,t){var n,i,o,r;if("string"===t){if(g(n=e.toString)&&!p(i=n.call(e)))return i;if(g(o=e.valueOf)&&!p(i=o.call(e)))return i}else{if(g(o=e.valueOf)&&!p(i=o.call(e)))return i;if(g(r=e.toString)&&!p(i=r.call(e)))return i}throw new TypeError}(e,"default"===n?"number":n)}function h(e){var t=m(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function f(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function g(e){return"function"==typeof e}function b(e){return"function"==typeof e}function v(e,t){var n=e[t];if(null!=n){if(!g(n))throw new TypeError;return n}}function w(e){var t=e.next();return!t.done&&t}function y(e){var t=e.return;t&&t.call(e)}function _(e){var t,n,i,o=Object.getPrototypeOf(e);return"function"!=typeof e||e===A||o!==A||null==(n=(t=e.prototype)&&Object.getPrototypeOf(t))||n===Object.prototype||"function"!=typeof(i=n.constructor)||i===e?o:i}function E(e){return e.__=void 0,delete e.__,e}var S=Object.prototype.hasOwnProperty,C="function"==typeof Symbol,L=C&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",k=C&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",x="function"==typeof Object.create,T={__proto__:[]}instanceof Array,I=!x&&!T,M={create:x?function(){return E(Object.create(null))}:T?function(){return E({__proto__:null})}:function(){return E({})},has:I?function(e,t){return S.call(e,t)}:function(e,t){return t in e},get:I?function(e,t){return S.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},A=Object.getPrototypeOf(Function),P="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,D=P||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){function e(e,t){return e}function t(e,t){return t}function n(e,t){return[e,t]}var i={},o=[],r=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[k]=function(){return this},e.prototype.next=function(){var e,t=this._index;return t>=0&&t<this._keys.length?(e=this._selector(this._keys[t],this._values[t]),t+1>=this._keys.length?(this._index=-1,this._keys=o,this._values=o):this._index++,{value:e,done:!1}):{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=o,this._values=o),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=o,this._values=o),{value:e,done:!0}},e}();return function(){function o(){this._keys=[],this._values=[],this._cacheKey=i,this._cacheIndex=-2}return Object.defineProperty(o.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),o.prototype.has=function(e){return this._find(e,!1)>=0},o.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},o.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},o.prototype.delete=function(e){var t,n,o=this._find(e,!1);if(o>=0){for(t=this._keys.length,n=o+1;n<t;n++)this._keys[n-1]=this._keys[n],this._values[n-1]=this._values[n];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=i,this._cacheIndex=-2),!0}return!1},o.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=i,this._cacheIndex=-2},o.prototype.keys=function(){return new r(this._keys,this._values,e)},o.prototype.values=function(){return new r(this._keys,this._values,t)},o.prototype.entries=function(){return new r(this._keys,this._values,n)},o.prototype["@@iterator"]=function(){return this.entries()},o.prototype[k]=function(){return this.entries()},o.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},o}()}():Map,j=P||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new D}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[k]=function(){return this.keys()},e}():Set,O=new(P||"function"!=typeof WeakMap?function(){function e(){var e;do{e="@@WeakMap@@"+i()}while(M.has(r,e));return r[e]=!0,e}function t(e,t){if(!S.call(e,a)){if(!t)return;Object.defineProperty(e,a,{value:M.create()})}return e[a]}function n(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function i(){var e,t,i,r,a=(r=o,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(r)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(r)):n(new Uint8Array(r),r):n(new Array(r),r));for(a[6]=79&a[6]|64,a[8]=191&a[8]|128,e="",t=0;t<o;++t)4!==t&&6!==t&&8!==t||(e+="-"),(i=a[t])<16&&(e+="0"),e+=i.toString(16).toLowerCase();return e}var o=16,r=M.create(),a=e();return function(){function n(){this._key=e()}return n.prototype.has=function(e){var n=t(e,!1);return void 0!==n&&M.has(n,this._key)},n.prototype.get=function(e){var n=t(e,!1);return void 0!==n?M.get(n,this._key):void 0},n.prototype.set=function(e,n){return t(e,!0)[this._key]=n,this},n.prototype.delete=function(e){var n=t(e,!1);return void 0!==n&&delete n[this._key]},n.prototype.clear=function(){this._key=e()},n}()}():WeakMap);e("decorate",(function(e,t,n,i){if(d(n)){if(!f(e))throw new TypeError;if(!b(t))throw new TypeError;return function(e,t){var n,i;for(n=e.length-1;n>=0;--n)if(!d(i=(0,e[n])(t))&&!u(i)){if(!b(i))throw new TypeError;t=i}return t}(e,t)}if(!f(e))throw new TypeError;if(!p(t))throw new TypeError;if(!p(i)&&!d(i)&&!u(i))throw new TypeError;return u(i)&&(i=void 0),function(e,t,n,i){var o,r;for(o=e.length-1;o>=0;--o)if(!d(r=(0,e[o])(t,n,i))&&!u(r)){if(!p(r))throw new TypeError;i=r}return i}(e,t,n=h(n),i)})),e("metadata",(function(e,t){return function(n,i){if(!p(n))throw new TypeError;if(!d(i)&&!function(e){switch(c(e)){case 3:case 4:return!0;default:return!1}}(i))throw new TypeError;a(e,t,n,i)}})),e("defineMetadata",(function(e,t,n,i){if(!p(n))throw new TypeError;return d(i)||(i=h(i)),a(e,t,n,i)})),e("hasMetadata",(function(e,t,i){if(!p(t))throw new TypeError;return d(i)||(i=h(i)),n(e,t,i)})),e("hasOwnMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),i(e,t,n)})),e("getMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),o(e,t,n)})),e("getOwnMetadata",(function(e,t,n){if(!p(t))throw new TypeError;return d(n)||(n=h(n)),r(e,t,n)})),e("getMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),s(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!p(e))throw new TypeError;return d(t)||(t=h(t)),l(e,t)})),e("deleteMetadata",(function(e,n,i){var o,r;if(!p(n))throw new TypeError;return d(i)||(i=h(i)),!d(o=t(n,i,!1))&&!!o.delete(e)&&(o.size>0||((r=O.get(n)).delete(i),r.size>0||O.delete(n),!0))}))}(o)}()}(Reflect||(Reflect={})),define("reflect-metadata",(function(){})),define("WoltLabSuite/Core/Helper/Dom/Element",["require","exports","./View","reflect-metadata"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomElementList=t.DomElement=void 0,t.DomElement=function(e,t){return function(i,o){if(!(i instanceof n.DomView))throw new Error("@DomElement() is only supported on `DomView`");const{nullable:r,type:a}=Object.assign({nullable:!1,type:Reflect.getMetadata("design:type",i,o)},t);Object.defineProperty(i,o,{configurable:!0,get(){const t=this.root.querySelector(e);if(null===t){if(r)return null;throw new Error(`Unable to find an element with the selector '${e}'.`)}if(!(t instanceof a))throw new Error(`Expected an element of type '${a.name}' but found '${t.nodeName}'.`);return t}})}},t.DomElementList=function(e,t){return function(i,o){if(!(i instanceof n.DomView))throw new Error("@DomElementList() is only supported on `DomView`");if(Reflect.getMetadata("design:type",i,o).prototype!==Array.prototype)throw new Error("The type must be an array of elements.");const{type:r}=t;Object.defineProperty(i,o,{configurable:!0,get(){const t=Array.from(this.root.querySelectorAll(e));for(const e of t)if(!(e instanceof r))throw new Error(`Expected an element of type '${r.name}' but found '${e.nodeName}'.`);return t}})}}})),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["require","exports","tslib","../../Core","./Simple"],(function(e,t,n,i,o){"use strict";function r(e){if(!(e instanceof HTMLUListElement))throw new TypeError("Expected a reference to an <ul> element.");if(!e.classList.contains("dropdownMenu"))throw new Error("List does not appear to be a dropdown menu.")}function a(e){const t=document.createElement("li");if("divider"===e)return t.className="dropdownDivider",t;"string"==typeof e.identifier&&(t.dataset.identifier=e.identifier);const n=document.createElement("a");if(n.href="string"==typeof e.href?e.href:"#","function"==typeof e.callback)n.addEventListener("click",(t=>{t.preventDefault(),e.callback(n)}));else if("#"===n.href)throw new Error("Expected either a `href` value or a `callback`.");if(e.attributes&&i.isPlainObject(e.attributes)&&Object.keys(e.attributes).forEach((t=>{const i=e.attributes[t];if("string"!=typeof i)throw new Error("Expected only string values.");-1!==t.indexOf("-")?n.setAttribute(`data-${t}`,i):n.dataset[t]=i})),t.appendChild(n),void 0!==e.icon&&i.isPlainObject(e.icon)){if("string"!=typeof e.icon.name)throw new TypeError("Expected a valid icon name.");let t=16;"number"==typeof e.icon.size&&-1!==c.indexOf(~~e.icon.size)&&(t=~~e.icon.size);const i=document.createElement("fa-icon");i.size=t,i.setIcon(e.icon.name,!!e.icon.forceSolid),n.appendChild(i)}const o="string"==typeof e.label?e.label.trim():"",r="string"==typeof e.labelHtml?e.labelHtml.trim():"";if(""===o&&""===r)throw new TypeError("Expected either a label or a `labelHtml`.");const a=document.createElement("span");return a[o?"textContent":"innerHTML"]=o||r,n.appendChild(document.createTextNode(" ")),n.appendChild(a),t}function s(e,t){r(e),e.appendChild(a(t))}function l(e,t){if(r(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");const n=t.length;if(0===n)throw new Error("Expected a non-empty list of items.");if(1===n)s(e,t[0]);else{const n=document.createDocumentFragment();t.forEach((e=>{n.appendChild(a(e))})),e.appendChild(n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.divider=t.attach=t.setItems=t.appendItems=t.appendItem=t.buildItem=t.create=void 0,i=n.__importStar(i),o=n.__importDefault(o);const c=[16,24,32,48,64,96,144];t.create=function(e,t){const n=document.createElement("ul");return n.className="dropdownMenu","string"==typeof t&&(n.dataset.identifier=t),Array.isArray(e)&&e.length>0&&l(n,e),n},t.buildItem=function(e){return a(e)},t.appendItem=s,t.appendItems=l,t.setItems=function(e,t){r(e),e.innerHTML="",l(e,t)},t.attach=function(e,t){r(e),o.default.initFragment(t,e),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),o.default.toggleDropdown(t.id)}))},t.divider=function(){return"divider"}})),define("WoltLabSuite/Core/Ui/ItemList/Static",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Language","../Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";function s(e){const t=p.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.placeholder=r.get("wcf.global.form.input.maxItems")))}function l(e,t,n){const i=p.get(e),o=document.createElement("li");o.className="item";const r=document.createElement("span");if(r.className="content",r.dataset.objectId=t.objectId.toString(),r.textContent=t.value,o.appendChild(r),n||!i.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",(e=>c(e))),o.appendChild(e)}i.list.insertBefore(o,i.listItem),i.element.value="",i.element.disabled||s(e);let a=d(i);"function"==typeof i.options.callbackChange&&(null===a&&(a=u(e)),i.options.callbackChange(e,a))}function c(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const n=e.parentElement.dataset.elementId,i=p.get(n);e.remove(),t||i.element.focus(),s(n);let o=d(i);"function"==typeof i.options.callbackChange&&(null===o&&(o=u(n)),i.options.callbackChange(n,o))}function d(e){if(!e.options.isCSV)return null;const t=u(e.element.id);return e.shadow.value=t.map((e=>e.value)).join(","),t}function u(e){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const t=p.get(e),n=[];return t.list.querySelectorAll(".item > span").forEach((e=>{n.push({objectId:~~e.dataset.objectId,value:e.textContent})})),n}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a);const p=new Map;t.init=function(e,t,n){const r=document.getElementById(e);if(null===r)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(p.has(e)){const t=p.get(e);Object.values(t).forEach((e=>{e instanceof HTMLElement&&e.parentElement&&e.remove()})),a.default.destroy(e),p.delete(e)}const s=i.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},n),d=o.parentByTag(r,"FORM");if(null!==d&&!s.isCSV){if(!s.submitFieldName.length&&"function"!=typeof s.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");d.addEventListener("submit",(()=>{const t=u(e);s.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=s.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,d.appendChild(t)})):s.callbackSubmit(d,t)}))}const m=function(e,t){const n=document.createElement("ol");n.className="inputItemList"+(e.disabled?" disabled":""),n.dataset.elementId=e.id,n.addEventListener("click",(t=>{t.target===n&&e.focus()}));const i=document.createElement("li");let o;i.className="input",n.appendChild(i),e.addEventListener("keydown",(e=>function(e){const t=e.currentTarget,n=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==n&&(n.classList.contains("active")?c(n):n.classList.add("active")):"Escape"===e.key&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")}(e))),e.addEventListener("keypress",(e=>function(e){if("Enter"===e.key||","===e.key){e.preventDefault();const t=e.currentTarget,n=t.value.trim();n.length&&l(t.id,{objectId:0,value:n})}}(e))),e.addEventListener("keyup",(e=>function(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}(e))),e.addEventListener("paste",(e=>function(e){const t=e.currentTarget;e.clipboardData.getData("text/plain").split(",").map((e=>e.trim())).filter((e=>e.length>0)).forEach((e=>{l(t.id,{objectId:0,value:e})})),e.preventDefault()}(e))),e.addEventListener("blur",(e=>function(e){const t=e.currentTarget;window.setTimeout((()=>{const e=t.value.trim();e.length&&l(t.id,{objectId:0,value:e})}),100)}(e))),e.insertAdjacentElement("beforebegin",n),i.appendChild(e),-1!==t.maxLength&&(e.maxLength=t.maxLength);let r=[];if(t.isCSV&&(o=document.createElement("input"),o.className="itemListInputShadow",o.type="hidden",o.name=e.name,e.removeAttribute("name"),n.insertAdjacentElement("beforebegin",o),r=e.value.split(",").map((e=>e.trim())).filter((e=>e.length>0)),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentElement.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,list:n,shadow:o,values:r}}(r,s);if(p.set(e,{dropdownMenu:null,element:m.element,list:m.list,listItem:m.element.parentElement,options:s,shadow:m.shadow}),t=m.values.length?m.values:t,Array.isArray(t)){const n=!m.element.disabled;t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),l(e,t,n)}))}},t.getValues=u,t.setValues=function(e,t){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const n=p.get(e);o.childrenByClass(n.list,"item").forEach((e=>c(e,!0))),t.forEach((t=>l(e,t)))}})),define("WoltLabSuite/Core/Ui/ItemList/User",["require","exports","tslib","../ItemList"],(function(e,t,n,i){"use strict";function o(e){const t=r(e.element.id),n=[],i=[];t.forEach((e=>{e.type&&"group"===e.type?i.push(e.objectId):n.push(e.value)}));const o=e.shadow;return o.value=n.join(","),e._shadowGroups||(e._shadowGroups=document.createElement("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=`${o.name}GroupIDs`,o.insertAdjacentElement("beforebegin",e._shadowGroups)),e._shadowGroups.value=i.join(","),t}function r(e){return i.getValues(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.init=void 0,i=n.__importStar(i),t.init=function(e,t){i.init(e,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:t.includeUserGroups?~~t.includeUserGroups:0,restrictUserGroupIDs:Array.isArray(t.restrictUserGroupIDs)?t.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof t.callbackChange?t.callbackChange:null,callbackSyncShadow:t.csvPerType?o:null,callbackSetupValues:"function"==typeof t.callbackSetupValues?t.callbackSetupValues:null,excludedSearchValues:Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[],isCSV:!0,maxItems:t.maxItems?~~t.maxItems:-1,restricted:!0})},t.getValues=r})),define("WoltLabSuite/Core/Ui/Like/Handler",["require","exports","tslib","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil","../Reaction/Handler","../../User"],(function(e,t,n,i,o,r,a,s,l){"use strict";i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s),l=n.__importDefault(l);const c=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new WeakMap;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=i.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},t),this.initContainers(),o.default.add(`WoltLabSuite/Core/Ui/Like/Handler-${e}`,(()=>this.initContainers())),new s.default(this._objectType,{containerSelector:this._options.containerSelector})}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{if(this._containers.has(t))return;const n={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~t.dataset.likeDislikes,liked:~~t.dataset.likeLiked,likes:~~t.dataset.likeLikes,objectId:~~t.dataset.objectId,users:JSON.parse(t.dataset.likeUsers)};this._containers.set(t,n),this._buildWidget(t,n),e=!0})),e&&o.default.trigger()}_buildWidget(e,t){let n,i=!0;if(n=this._options.isSingleItem?document.querySelector(this._options.summarySelector):e.querySelector(this._options.summarySelector),null===n&&(n=this._options.isSingleItem?document.querySelector(this._options.badgeContainerSelector):e.querySelector(this._options.badgeContainerSelector),i=!1),null!==n){const e=document.createElement("ul");if(e.classList.add("reactionSummaryList"),i?e.classList.add("likesSummary"):e.classList.add("reactionSummaryListTiny"),Object.entries(t.users).forEach((([t,n])=>{const i=c.get(t);if("reactionTypeID"===t||!i)return;const o=document.createElement("li");o.className="reactCountButton",o.setAttribute("reaction-type-id",t);const r=document.createElement("span");r.className="reactionCount",r.innerHTML=a.shortUnit(~~n),o.appendChild(r),o.innerHTML=i.renderedIcon+o.innerHTML,e.appendChild(o)})),i)this._options.summaryPrepend?n.insertAdjacentElement("afterbegin",e):n.insertAdjacentElement("beforeend",e);else if("OL"===n.nodeName||"UL"===n.nodeName){const t=document.createElement("li");t.appendChild(e),n.appendChild(t)}else n.appendChild(e);t.badge=e}if(this._options.canLike&&(l.default.userId!=~~e.dataset.userId||this._options.canLikeOwnContent)){let n=null;this._options.buttonAppendToSelector&&(n=this._options.isSingleItem?document.querySelector(this._options.buttonAppendToSelector):e.querySelector(this._options.buttonAppendToSelector));let i=null;if(this._options.buttonBeforeSelector&&(i=this._options.isSingleItem?document.querySelector(this._options.buttonBeforeSelector):e.querySelector(this._options.buttonBeforeSelector)),null===i&&null===n)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,i,n)}}_createButton(e,t,n,i){const o=r.get("wcf.reactions.react"),a=document.createElement("li");a.className="wcfReactButton";const s=document.createElement("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=o;const l=document.createElement("fa-icon");l.setIcon("smile"),void 0===t||0==t?l.dataset.reactionTypeId="0":(s.dataset.reactionTypeId=t.toString(),s.classList.add("active")),s.appendChild(l);const c=document.createElement("span");return c.className="invisible",c.innerHTML=o,s.appendChild(document.createTextNode(" ")),s.appendChild(c),a.appendChild(s),n?n.insertAdjacentElement("beforebegin",a):i.insertAdjacentElement("beforeend",a),s}}})),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["require","exports","tslib","WoltLabSuite/Core/Component/Ckeditor/Event","../../Ajax","../../Component/Ckeditor","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../Language","../Dropdown/Reusable","../Notification","../Screen","../Scroll"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h){"use strict";return o=n.__importStar(o),a=n.__importStar(a),s=n.__importDefault(s),l=n.__importDefault(l),c=n.__importStar(c),d=n.__importStar(d),u=n.__importStar(u),p=n.__importStar(p),m=n.__importStar(m),h=n.__importStar(h),class{_activeDropdownElement;_activeElement;_dropdownMenu;_elements;_options;constructor(e){this.init(e)}init(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new WeakMap,this._options=a.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.default.add(`Ui/Message/InlineEdit_${this._options.className}`,(()=>this.rebuild()))}rebuild(){document.querySelectorAll(this._options.messageSelector).forEach((e=>{if(this._elements.has(e))return;const t=e.querySelector(".jsMessageEditButton");if(null!==t){const n=a.stringToBool(e.dataset.canEdit||""),i=a.stringToBool(e.dataset.canEditInline||"");this._options.canEditInline||i?(t.addEventListener("click",(t=>this._clickDropdown(e,t))),t.classList.add("jsDropdownEnabled"),n&&t.addEventListener("dblclick",(t=>this._click(e,t)))):n&&t.addEventListener("click",(t=>this._click(e,t)))}const n=e.querySelector(".messageBody"),i=e.querySelector(".messageFooter"),o=i.querySelector(".messageFooterButtons"),r=e.querySelector(".messageHeader"),s=n.querySelector(".messageText");this._elements.set(e,{button:t,messageBody:n,messageBodyEditor:null,messageFooter:i,messageFooterButtons:o,messageHeader:r,messageText:s})}))}_click(e,t){null===e&&(e=this._activeDropdownElement),t&&t.preventDefault(),null===this._activeElement?(this._activeElement=e,this._prepare(),o.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(e)}})):this._activeElement!==e&&p.show("wcf.message.error.editorAlreadyInUse",void 0,"warning")}_clickDropdown(e,t){t.preventDefault();const n=t.currentTarget;if(!n.classList.contains("dropdownToggle")){if(n.classList.add("dropdownToggle"),n.parentElement.classList.add("dropdown"),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this._activeDropdownElement=e;let i=n;if(m.is("screen-sm-down")&&0===n.clientWidth){const e=n.closest(this._options.messageSelector);i=this._elements.get(e).messageHeader.querySelector(".messageQuickOptions")}u.toggleDropdown(this._options.dropdownIdentifier,i)})),null===this._dropdownMenu){this._dropdownMenu=document.createElement("ul"),this._dropdownMenu.className="dropdownMenu";const e=this._dropdownGetItems();c.fire("com.woltlab.wcf.inlineEditor",`dropdownInit_${this._options.dropdownIdentifier}`,{items:e}),this._dropdownBuild(e),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,((e,t)=>this._dropdownToggle(e,t)))}setTimeout((()=>n.click()),10)}}_dropdownBuild(e){e.forEach((e=>{const t=document.createElement("li");if(t.dataset.item=e.item,"divider"===e.item)t.className="dropdownDivider";else{const n=document.createElement("span");n.textContent=d.get(e.label),t.appendChild(n),"editItem"===e.item?t.addEventListener("click",(e=>this._click(null,e))):t.addEventListener("click",(e=>this._clickDropdownItem(e)))}this._dropdownMenu.appendChild(t)}))}_dropdownToggle(e,t){const n=this._elements.get(this._activeDropdownElement),i=n.button.parentElement;if("close"===t)return i.classList.remove("dropdownOpen"),void n.messageFooterButtons.classList.remove("forceVisible");i.classList.add("dropdownOpen"),n.messageFooterButtons.classList.add("forceVisible");const o=new Map(Object.entries(this._dropdownOpen()));c.fire("com.woltlab.wcf.inlineEditor",`dropdownOpen_${this._options.dropdownIdentifier}`,{element:this._activeDropdownElement,visibility:o});const r=this._dropdownMenu;let a=!1;const s=Array.from(r.children);s.forEach(((e,t)=>{const n=e.dataset.item;if("divider"===n)a?(l.default.show(e),a=!1):l.default.hide(e);else if(!1===o.get(n)){if(l.default.hide(e),t>0&&t+1===s.length){const t=e.previousElementSibling;"divider"===t.dataset.item&&l.default.hide(t)}}else l.default.show(e),a=!0}))}_dropdownGetItems(){return[]}_dropdownOpen(){return{}}_dropdownSelect(e){}_clickDropdownItem(e){e.preventDefault();const t=e.currentTarget.dataset.item,n={cancel:!1,element:this._activeDropdownElement,item:t};c.fire("com.woltlab.wcf.inlineEditor",`dropdownItemClick_${this._options.dropdownIdentifier}`,n),n.cancel?e.preventDefault():this._dropdownSelect(t)}_prepare(){const e=this._elements.get(this._activeElement),t=document.createElement("div");t.className="messageBody editor",e.messageBodyEditor=t;const n=document.createElement("fa-icon");n.size=48,n.setIcon("spinner"),t.appendChild(n),e.messageBody.insertAdjacentElement("afterend",t),l.default.hide(e.messageBody),h.element(this._activeElement,void 0,"instant")}_showEditor(e){const t=this._getEditorId(),n=this._activeElement,i=this._elements.get(n);n.classList.add("jsInvalidQuoteTarget");const o=n.parentElement;o.classList.contains("anchorFixedHeader")&&o.classList.add("disableAnchorFixedHeader"),i.messageBodyEditor.querySelector("fa-icon").remove();const r=i.messageBodyEditor,a=document.createElement("div");a.className="editorContainer",l.default.setInnerHtml(a,e.returnValues.template),r.appendChild(a);const s=a.querySelector(".formSubmit");s.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save())),s.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),c.add("com.woltlab.wcf.ckeditor5",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()})),l.default.hide(i.messageHeader),l.default.hide(i.messageFooter),window.setTimeout((()=>{this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(n,void 0,"instant")}),250)}_restoreMessage(){const e=this._activeElement,t=this._elements.get(e);this._destroyEditor(),t.messageBodyEditor.remove(),t.messageBodyEditor=null,l.default.show(t.messageBody),l.default.show(t.messageFooter),l.default.show(t.messageHeader),e.classList.remove("jsInvalidQuoteTarget");const n=e.parentElement;n.classList.contains("anchorFixedHeader")&&n.classList.remove("disableAnchorFixedHeader"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()}_save(){const e=this._getEditorId(),t=(0,r.getCkeditorById)(e),n={containerID:this._options.containerId,data:{message:t.getHtml()},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},a=document.getElementById(`settings_${e}`);a&&a.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(n,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);n[t]=e.value.trim()}));let s=this._validate(n);s instanceof Promise||(s=!1===s?Promise.reject():Promise.resolve()),s.then((()=>{(0,i.dispatchToCkeditor)(t.sourceElement).collectMetaData({metaData:n}),o.api(this,{actionName:"save",parameters:n}),this._hideEditor()}),(e=>{const t=e.message;console.log(`Validation of post edit failed: ${t}`)}))}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t={api:this,parameters:e,valid:!0,promises:[]};return c.fire("com.woltlab.wcf.ckeditor5",`validate_${this._getEditorId()}`,t),t.valid?t.promises.push(Promise.resolve()):t.promises.push(Promise.reject()),Promise.all(t.promises)}throwError(e,t){l.default.innerError(e,t)}_showMessage(e){const t=this._activeElement,n=this._elements.get(t);if(l.default.setInnerHtml(n.messageBody.querySelector(".messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){n.messageFooter.querySelectorAll(".attachmentThumbnailList, .attachmentFileList").forEach((e=>e.remove()));const t=document.createElement("div");let i;for(l.default.setInnerHtml(t,e.returnValues.attachmentList);t.childNodes.length;)i=t.childNodes[t.childNodes.length-1],n.messageFooter.insertBefore(i,n.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){const t=n.messageBody.querySelector(".pollContainer");if(null!==t&&t.parentElement.remove(),""!==e.returnValues.poll){const t=document.createElement("div");t.className="jsInlineEditorHideContent",l.default.setInnerHtml(t,e.returnValues.poll),n.messageBody.insertAdjacentElement("afterbegin",t)}}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),p.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())}_hideEditor(){const e=this._elements.get(this._activeElement),t=e.messageBodyEditor.querySelector(".editorContainer");l.default.hide(t);const n=document.createElement("fa-icon");n.size=48,n.setIcon("spinner"),e.messageBodyEditor.appendChild(n)}_restoreEditor(){const e=this._elements.get(this._activeElement).messageBodyEditor;e.querySelector('fa-icon[name="spinner"]').remove();const t=e.querySelector(".editorContainer");null!==t&&l.default.show(t)}_destroyEditor(){const e=(0,r.getCkeditorById)(this._getEditorId(),!1);e?.destroy().then((()=>{e.discardDraft()}))}_getHash(e){return`#message${e}`}_updateHistory(e){window.location.hash=e}_getEditorId(){return this._options.editorPrefix+this._getObjectId(this._activeElement).toString()}_getObjectId(e){return e.dataset.objectId||""}_ajaxFailure(e){const t=this._elements.get(this._activeElement).messageBodyEditor.querySelector(".ck.ck-editor");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(l.default.innerError(t,e.returnValues.realErrorMessage),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}}legacyEdit(e){this._click(document.getElementById(e),null)}}})),define("WoltLabSuite/Core/Ui/Message/Manager",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil"],(function(e,t,n,i,o,r,a,s){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s),class{_elements=new Map;_options;constructor(e){this._options=o.extend({className:"",selector:""},e),this.rebuild(),r.default.add(`Ui/Message/Manager${this._options.className}`,this.rebuild.bind(this))}rebuild(){this._elements.clear(),document.querySelectorAll(this._options.selector).forEach((e=>{this._elements.set(e.dataset.objectId,e)}))}getPermission(e,t){t="can"+s.ucfirst(t);const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);return o.stringToBool(n.dataset[s.toCamelCase(t)]||"")}getPropertyValue(e,t,n){const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const r=i.dataset[s.toCamelCase(t)]||"";return n?o.stringToBool(r):r}update(e,t,n){i.api(this,{actionName:t,parameters:n||{},objectIDs:[e]})}updateItems(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{const n=this._elements.get(e);void 0!==n&&Object.entries(t).forEach((([e,t])=>{this._update(n,e,t)}))}))}updateAllItems(e){const t=Array.from(this._elements.keys());this.updateItems(t,e)}setNote(e,t,n){const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const o=i.querySelector(".messageFooterNotes");let r=o.querySelector(`.${t}`);n?(null===r&&(r=document.createElement("p"),r.className="messageFooterNote "+t,o.appendChild(r)),r.innerHTML=n):null!==r&&r.remove()}_update(e,t,n){e.dataset[t]=n.toString();const i=1==n||!0===n||"true"===n;this._updateState(e,t,n,i)}_updateState(e,t,n,i){switch(t){case"isDeleted":i?e.classList.add("messageDeleted"):e.classList.remove("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",i);break;case"isDisabled":i?e.classList.add("messageDisabled"):e.classList.remove("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",i)}}_toggleMessageStatus(e,t,n,i,o){let r=e.querySelector(".messageStatus");if(null===r){const t=e.querySelector(".messageHeaderMetaData");if(null===t)return;r=document.createElement("ul"),r.className="messageStatus",t.insertAdjacentElement("afterend",r)}let s=r.querySelector(`.${t}`);if(o){if(null!==s)return;s=document.createElement("span"),s.className=`badge label ${i} ${t}`,s.textContent=a.get(n);const e=document.createElement("li");e.appendChild(s),r.appendChild(e)}else{if(null===s)return;s.parentElement.remove()}}_getAttributeName(e){return-1!==e.indexOf("-")?e:e.split(/([A-Z][a-z]+)/).map((e=>e.trim().toLowerCase())).filter((e=>e.length>0)).join("-")}_ajaxSuccess(e){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")}_ajaxSetup(){return{data:{className:this._options.className}}}}})),define("WoltLabSuite/Core/Ui/Message/Share",["require","exports","tslib","../../Event/Handler","../../StringUtil"],(function(e,t,n,i,o){"use strict";function r(e,t,n,i){i||(i=s),window.open(t.replace("{pageURL}",i).replace("{text}",a+(n?`%20${i}`:"")),e,"height=600,width=600")}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),o=n.__importStar(o);let a="",s="";t.init=function(){const e=document.querySelector('meta[property="og:title"]');null!==e&&(a=encodeURIComponent(e.content));const t=document.querySelector('meta[property="og:url"]');null!==t&&(s=encodeURIComponent(t.content)),document.querySelectorAll(".jsMessageShareButtons").forEach((e=>{e.classList.remove("jsMessageShareButtons");let t=encodeURIComponent(o.unescapeHTML(e.dataset.url||""));t||(t=s);const n={facebook:{link:e.querySelector('.messageShareProvider[data-identifier="Facebook"]'),share(e){e.preventDefault(),r("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{link:e.querySelector('.messageShareProvider[data-identifier="Reddit"]'),share(e){e.preventDefault(),r("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{link:e.querySelector('.messageShareProvider[data-identifier="Twitter"]'),share(e){e.preventDefault(),r("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{link:e.querySelector('.messageShareProvider[data-identifier="LinkedIn"]'),share(e){e.preventDefault(),r("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{link:e.querySelector('.messageShareProvider[data-identifier="Pinterest"]'),share(e){e.preventDefault(),r("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{link:e.querySelector('.messageShareProvider[data-identifier="XING"]'),share(e){e.preventDefault(),r("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{link:e.querySelector('.messageShareProvider[data-identifier="WhatsApp"]'),share(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+a+"%20"+s}}};i.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:n,pageDescription:a,pageUrl:s}),Object.values(n).forEach((e=>{null!==e.link&&e.link.addEventListener("click",(t=>e.share(t)))}))}))}})),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["require","exports","https://platform.twitter.com/widgets.js"],(function(e,t){"use strict";async function n(e,t,n=!1){const o=await i,r="dark"===document.documentElement.dataset.colorScheme?"dark":"light",a=await o.widgets.createTweet(t,e,{dnt:!0,lang:document.documentElement.lang,theme:r});if(a&&n){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.embedAll=t.embedTweet=void 0;const i=new Promise((e=>{twttr.ready(e)}));t.embedTweet=n,t.embedAll=function(){document.querySelectorAll("[data-wsc-twitter-tweet]").forEach((e=>{const t=e.dataset.wscTwitterTweet;t&&(delete e.dataset.wscTwitterTweet,n(e,t,!0))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAllAsRead",["require","exports","tslib","../../Ajax","../Notification"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),t.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),async function(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").dispatch(),document.querySelectorAll(".moderationQueueEntryList .new").forEach((e=>{e.classList.remove("new")})),document.querySelector("#outstandingModeration .badgeUpdate")?.remove(),o.show()}()}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/MarkAsRead",["require","exports","../../Ajax"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0;const i=new WeakSet;t.setup=function(){document.querySelectorAll(".moderationQueueEntryList .new .columnAvatar").forEach((e=>{i.has(e)||(i.add(e),e.addEventListener("dblclick",(t=>{t.preventDefault();const i=e.closest(".moderationQueueEntry");i.classList.contains("new")&&async function(e){const t=parseInt(e.dataset.queueId,10);await(0,n.dboAction)("markAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").objectIds([t]).dispatch(),e.classList.remove("new"),e.querySelector(".columnAvatar p")?.removeAttribute("title")}(i)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Ui/Moderation/Report",["require","exports","tslib","../../Ajax","../../Component/Dialog","../../Dom/Util","../../Helper/Selector","../../Language","../Notification"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e){(function(e){return""===e.dataset.reportContent?(console.error("Missing the value for [data-report-content]",e),!1):!!parseInt(e.dataset.objectId||"")||(console.error("Expected a valid integer for [data-object-id]",e),!1)})(e)&&e.addEventListener("click",(t=>{"A"!==e.tagName&&"true"!==e.dataset.isLegacyButton||t.preventDefault(),async function(e){const t=parseInt(e.dataset.objectId||""),n=e.dataset.reportContent,a=await(0,i.dboAction)("prepareReport","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({objectID:t,objectType:n}).dispatch();let c;a.alreadyReported?c=(0,o.dialogFactory)().fromHtml(a.template).asAlert():(c=(0,o.dialogFactory)().fromHtml(a.template).asPrompt(),c.addEventListener("validate",(e=>{(function(e){const t=e.content.querySelector(".jsReportMessage"),n=t.closest("dl");return""===t.value.trim()?(n.classList.add("formError"),(0,r.innerError)(t,s.get("wcf.global.form.error.empty")),!1):(n.classList.remove("formError"),(0,r.innerError)(t,!1),!0)})(c)||e.preventDefault()})),c.addEventListener("primary",(()=>{!async function(e,t,n){const o=e.content.querySelector(".jsReportMessage").value.trim();await(0,i.dboAction)("report","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({message:o,objectID:n,objectType:t}).dispatch(),l.show()}(c,n,t)}))),c.show(s.get("wcf.moderation.report.reportContent"))}(e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.registerLegacyButton=void 0,s=n.__importStar(s),l=n.__importStar(l),t.registerLegacyButton=function(e,t){e.dataset.reportContent=t,e.dataset.isLegacyButton="true",c(e)},t.setup=function(){(0,a.wheneverFirstSeen)("[data-report-content]",(e=>c(e)))}})),define("WoltLabSuite/Core/Ui/Pagination/JumpToPage",["require","exports","../../Component/Dialog","../../Helper/Selector","../../Language"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,i.wheneverFirstSeen)("woltlab-core-pagination",(e=>{e.addEventListener("jumpToPage",(()=>{!function(e){const t=`\n    <dl>\n      <dt></dt>\n      <dd>\n        <input\n          class="tiny"\n          type="number"\n          min="1"\n          max="${e.count}"\n          value="${e.count}"\n          aria-label="${(0,o.getPhrase)("wcf.page.jumpTo.pageNo")}"\n          required\n        >\n        <small>${(0,o.getPhrase)("wcf.page.jumpTo.description",{pages:e.count})}</small>\n      </dd>\n    </dl>\n  `,i=(0,n.dialogFactory)().fromHtml(t).asPrompt(),r=i.content.querySelector('input[type="number"]');i.addEventListener("primary",(()=>{e.jumpToPage(parseInt(r.value))})),i.show((0,o.getPhrase)("wcf.page.jumpTo")),r.select()}(e)}))}))}})),define("WoltLabSuite/Core/Ui/Poll/View/Participants",["require","exports","../../../Component/User/List"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Participants=void 0;class i{pollManager;button;userList=void 0;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showPollParticipantsButton");if(!t)throw new Error(`Could not find button with selector "showPollParticipantsButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(e=>{e&&e.preventDefault(),this.open()}))}open(){this.userList||(this.userList=new n.UserList({className:"wcf\\data\\poll\\PollAction",parameters:{pollID:this.pollManager.pollId}},this.pollManager.question)),this.userList.open()}showButton(){this.button.hidden=!1}hideButton(){this.button.hidden=!0}}t.Participants=i,t.default=i})),define("WoltLabSuite/Core/Ui/Poll/View/Results",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Results=void 0,i=n.__importStar(i);class r{pollManager;button;constructor(e,t){this.pollManager=e,this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.results)?this.pollManager.displayView(o.PollViews.results):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=i.dboAction("getResultTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.results,t.template),this.pollManager.displayView(o.PollViews.results)}checkVisibility(e){e===o.PollViews.results?this.button.hidden=!0:this.button.hidden=!1}}t.Results=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/View/Vote",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,i=n.__importStar(i);class r{pollManager;button;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showVoteFormButton");if(!t)throw new Error(`Could not find button with selector ".showVoteFormButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.vote)?this.pollManager.displayView(o.PollViews.vote):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=i.dboAction("getVoteTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.vote,t.template),this.pollManager.displayView(o.PollViews.vote)}checkVisibility(e){e!==o.PollViews.vote&&this.pollManager.canVote?this.button.hidden=!1:this.button.hidden=!0}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Vote",["require","exports","tslib","./Poll","../../Ajax"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,o=n.__importStar(o);class r{pollManager;button;inputs;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".votePollButton");if(!t)throw new Error(`Could not find vote button for poll "${this.pollManager.pollId}".`);this.button=t,this.button.addEventListener("click",(()=>this.submit())),this.initSelects()}initSelects(){if(this.pollManager.hasView(i.PollViews.vote)){const e=this.pollManager.getView(i.PollViews.vote);this.inputs=Array.from(e.querySelectorAll("input")),this.inputs.forEach((e=>{e.addEventListener("change",(()=>this.checkInputs()))})),this.checkInputs()}}checkInputs(){let e=0;this.inputs.forEach((t=>{t.checked&&e++,this.pollManager.maxVotes>1&&(t.disabled=!1)})),0===e?this.button.disabled=!0:(e>=this.pollManager.maxVotes&&this.pollManager.maxVotes>1&&this.inputs.forEach((e=>{e.checked||(e.disabled=!0)})),this.button.disabled=!1)}getSelectedOptions(){return this.inputs.filter((e=>e.checked)).map((e=>parseInt(e.value,10)))}async submit(){this.button.disabled=!0;const e=this.getSelectedOptions(),t=o.dboAction("vote","wcf\\data\\poll\\PollAction");t.objectIds([this.pollManager.pollId]),t.payload({optionIDs:e});const n=await t.dispatch();this.pollManager.canVote=!!n.changeableVote,this.pollManager.canViewResults=!0,this.pollManager.addView(i.PollViews.results,n.template),this.pollManager.displayView(i.PollViews.results),this.pollManager.changeTotalVotes(n.totalVotes,n.totalVotesTooltip),this.button.disabled=!1}checkVisibility(e){this.button.hidden=e!==i.PollViews.vote}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Poll",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../StringUtil","./View/Participants","./View/Results","./View/Vote","./Vote"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";function d(){document.querySelectorAll(".pollContainer").forEach((e=>{if(!e.dataset.pollId)throw new Error("Invalid poll element given. Missing pollID.");if(h.has(e))return;const t=parseInt(e.dataset.pollId,10);new m(t),h.add(e)}))}function u(){i.default.add("WoltLabSuite/Core/Ui/Poll/Manager/Poll",(()=>{d()})),d()}var p;Object.defineProperty(t,"__esModule",{value:!0}),t.setupAll=t.Poll=t.PollViews=void 0,i=n.__importDefault(i),o=n.__importDefault(o),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l),c=n.__importDefault(c),function(e){e.vote="vote",e.results="results"}(p||(t.PollViews=p={}));class m{pollId;element;voteView=void 0;resultsView=void 0;participants=void 0;voteHandler=void 0;views=new Map;constructor(e){const t=document.getElementById(`poll${e}`);if(null===t)throw new Error(`Could not find poll with id "${e}".`);this.element=t,this.pollId=e,this.getInnerContainer().querySelectorAll("div").forEach((e=>{e.dataset.key&&this.views.set(e.dataset.key,e)}));const n=this.element.querySelector(".showResultsButton");this.canViewResults&&null!==n&&(this.resultsView=new s.default(this,n)),this.canVote&&(this.voteView=new l.default(this),this.voteHandler=new c.default(this)),this.canViewParticipants()&&(this.participants=new a.default(this))}getElement(){return this.element}hasView(e){return this.views.has(e)}getView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);return this.views.get(e)}displayView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);this.views.forEach((e=>{e.hidden=!0})),this.views.get(e).hidden=!1,this.voteView?.checkVisibility(e),this.resultsView?.checkVisibility(e),this.voteHandler?.checkVisibility(e),this.canViewParticipants()&&(e===p.results?(this.participants||(this.participants=new a.default(this)),this.participants.showButton()):this.participants?.hideButton())}addView(e,t){const n=document.createElement("div");n.dataset.key=e,n.hidden=!0,o.default.setInnerHtml(n,t),this.getInnerContainer().append(n),this.views.has(e)&&this.views.get(e).remove(),this.views.set(e,n),e===p.vote&&this.voteHandler.initSelects()}canViewParticipants(){return this.canViewResults&&this.isPublic}getInnerContainer(){const e=this.element.querySelector(".pollInnerContainer");if(!e)throw new Error(`Could not find inner container for poll "${this.pollId}"`);return e}changeTotalVotes(e,t){const n=this.getElement().querySelector(".pollTotalVotesBadge");if(!n)throw new Error("Could not find total votes badge.");n.textContent=(0,r.formatNumeric)(e),n.dataset.tooltip=t}get isPublic(){return"true"===this.element.dataset.isPublic}get maxVotes(){return parseInt(this.element.dataset.maxVotes,10)}get question(){return this.element.dataset.question}get canVote(){return"true"===this.element.dataset.canVote}set canVote(e){this.element.dataset.canVote=e?"true":"false"}get canViewResults(){return"true"===this.element.dataset.canViewResult}set canViewResults(e){this.element.dataset.canViewResult=e?"true":"false"}}t.Poll=m;const h=new WeakSet;t.setupAll=u,t.default=u})),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../StringUtil","../Dialog"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importDefault(c);const d=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new Map;_currentObjectId=0;_objects=new Map;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=o.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},t),this.initContainers(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/CountButtons-${e}`,(()=>this.initContainers()))}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const n=a.default.identify(t);if(this._containers.has(n))return;const i=~~t.dataset.objectId,o={reactButton:null,summary:null,objectId:i,element:t};this._containers.set(n,o),this._initReactionCountButtons(t,o);const r=this._objects.get(i)||[];r.push(o),this._objects.set(i,r),e=!0})),e&&r.default.trigger()}updateCountButtons(e,t){let n=!1;this._objects.get(e).forEach((e=>{let i;if(i=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.element.querySelector(this._options.summaryListSelector),null===i)return;const o=new Map(Object.entries(t)),r=new Map;i.querySelectorAll(".reactCountButton").forEach((e=>{const t=e.dataset.reactionTypeId;o.has(t)?r.set(t,e):e.remove()})),o.forEach(((e,t)=>{if(r.has(t))r.get(t).querySelector(".reactionCount").innerHTML=l.shortUnit(e);else if(d.has(t)){const o=document.createElement("span");o.className="reactCountButton",o.innerHTML=d.get(t).renderedIcon,o.dataset.reactionTypeId=t;const r=document.createElement("span");r.className="reactionCount",r.innerHTML=l.shortUnit(e),o.appendChild(r),i.appendChild(o),n=!0}})),i.childElementCount>0?a.default.show(i):a.default.hide(i)})),n&&r.default.trigger()}_initReactionCountButtons(e,t){let n;n=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.querySelector(this._options.summaryListSelector),null!==n&&n.addEventListener("click",(e=>this._showReactionOverlay(t.objectId,e)))}_showReactionOverlay(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()}_showOverlay(){this._options.parameters.data.containerID=`${this._objectType}-${this._currentObjectId}`,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,i.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){s.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),c.default.open(this,e.returnValues.template),c.default.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)}_ajaxSetup(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}}_dialogSetup(){return{id:`userReactionOverlay-${this._objectType}`,options:{title:""},source:null}}}})),define("WoltLabSuite/Core/Ui/Reaction/SummaryDetails",["require","exports","../../Ajax","../../Component/Dialog","../../Helper/Selector"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){(0,o.wheneverFirstSeen)("woltlab-core-reaction-summary",(e=>{e.addEventListener("showDetails",(()=>{!async function(e,t){const o=await(0,n.dboAction)("getReactionDetails","wcf\\data\\reaction\\ReactionAction").payload({data:{objectID:e,objectType:t}}).dispatch();(0,i.dialogFactory)().fromHtml(o.template).withoutControls().show(o.title)}(e.objectId,e.objectType)}))}))}})),define("WoltLabSuite/Core/Ui/Search/Page",["require","exports","tslib","../../Core","../../Dom/Util","../Dropdown/Simple","../Screen","./Input"],(function(e,t,n,i,o,r,a,s){"use strict";function l(e){e.preventDefault();const t=e.currentTarget,n=t.dataset.objectType,o=t.dataset.extendedLink;o&&(document.querySelector(".pageHeaderSearchExtendedLink").href=o),d.clear();try{const e=JSON.parse(t.dataset.parameters||"");i.isPlainObject(e)&&Object.keys(e).forEach((t=>{d.set(t,e[t])}))}catch(e){}n&&"everywhere"!==n&&d.set("type",n),document.getElementById("pageHeaderSearchInputContainer").querySelector(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").textContent=t.textContent}function c(e,t){const n=new URL(e.action);n.search+=""!==n.search?"&":"?",n.search+=new URLSearchParams([["q",t.value.trim()],...Array.from(d)]).toString(),window.location.href=n.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importDefault(s);const d=new Map;t.init=function(e){const t=document.getElementById("pageHeaderSearchInput"),n=t.form;new s.default(t,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit(e){if(e.classList.add("dropdownMenuPageSearch"),a.is("screen-lg")){e.dataset.dropdownAlignmentHorizontal="right";const n=t.clientWidth;e.style.setProperty("min-width",`${n}px`,"");const i=t.parentElement,r=o.default.offset(i).left+i.clientWidth-(o.default.offset(t).left+n),a=o.default.styleAsInt(window.getComputedStyle(i),"padding-bottom");e.style.setProperty("transform",`translateX(-${Math.ceil(r)}px) translateY(-${a}px)`,"")}},callbackSelect:()=>(setTimeout((()=>{c(n,t)}),1),!0),suppressErrors:!0});const i=document.querySelector(".pageHeaderSearchType"),d=r.default.getDropdownMenu(o.default.identify(i));d.querySelectorAll("a[data-object-type]").forEach((e=>{e.addEventListener("click",l)})),d.querySelector('a[data-object-type="'+e+'"]').click(),n.addEventListener("submit",(e=>{e.preventDefault(),c(n,t)}))}})),define("WoltLabSuite/Core/Ui/Toggle/Input",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";return i=n.__importDefault(i),class{element;hide;show;constructor(e,t){const n=document.querySelector(e);if(null===n)throw new Error("Unable to find element by selector '"+e+"'.");const i="INPUT"===n.nodeName?n.type:"";if("checkbox"!==i&&"radio"!==i)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this.element=n,this.hide=this.getElements("hide",Array.isArray(t.hide)?t.hide:[]),this.show=this.getElements("show",Array.isArray(t.show)?t.show:[]),this.element.addEventListener("change",(e=>this.change(e))),this.updateVisibility(this.show,this.element.checked),this.updateVisibility(this.hide,!this.element.checked)}getElements(e,t){const n=[];return t.forEach((t=>{let i=null;if("string"==typeof t){if(i=document.querySelector(t),null===i)throw new Error(`Unable to find an element with the selector '${t}'.`)}else{if(!(t instanceof HTMLElement))throw new TypeError(`The array '${e}' may only contain string selectors or DOM elements.`);i=t}n.push(i)})),n}change(e){const t=e.currentTarget.checked;this.updateVisibility(this.show,t),this.updateVisibility(this.hide,!t)}updateVisibility(e,t){e.forEach((e=>{i.default[t?"show":"hide"](e)}))}}})),define("WoltLabSuite/Core/Ui/User/List",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dialog","../Pagination"],(function(e,t,n,i,o,r,a,s){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importDefault(s),class{cache=new Map;options;pageCount=0;pageNo=1;constructor(e){this.options=o.extend({className:"",dialogTitle:"",parameters:{}},e)}open(){this.pageNo=1,this.showPage()}showPage(e){if("number"==typeof e&&(this.pageNo=+e),0!==this.pageCount&&(this.pageNo<1||this.pageNo>this.pageCount))throw new RangeError(`pageNo must be between 1 and ${this.pageCount} (${this.pageNo} given).`);if(this.cache.has(this.pageNo)){const e=a.default.open(this,this.cache.get(this.pageNo));if(this.pageCount>1){const t=e.content.querySelector(".jsPagination");null!==t&&new s.default(t,{activePage:this.pageNo,maxPage:this.pageCount,callbackSwitch:this.showPage.bind(this)});const n=e.content.parentElement;n.scrollTop>0&&(n.scrollTop=0)}}else this.options.parameters.pageNo=this.pageNo,i.api(this,{parameters:this.options.parameters})}_ajaxSuccess(e){void 0!==e.returnValues.pageCount&&(this.pageCount=~~e.returnValues.pageCount),this.cache.set(this.pageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserList",className:this.options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}}_dialogSetup(){return{id:r.default.getUniqueId(),options:{title:this.options.dialogTitle},source:null}}}})),define("WoltLabSuite/Core/Ui/User/ObjectWatch",["require","exports","tslib","../../Ajax","../Notification","../../Language","../../Event/Handler"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a);const s=new Map;t.setup=function(){document.querySelectorAll(".userObjectWatchDropdown").forEach((e=>{if(!e.dataset.objectId)throw new Error("Missing objectId for '.userObjectWatchDropdown' element.");const t=parseInt(e.dataset.objectId,10);s.has(t)||s.set(t,new Set),s.get(t).add(e),e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{if(!e.dataset.subscribe)throw new Error("Missing 'data-subscribe' attribute for '.userObjectWatchSelect' element.");e.addEventListener("click",(t=>{t.preventDefault(),async function(e){const t=e.closest(".userObjectWatchDropdown"),n=parseInt(e.dataset.subscribe,10),l=parseInt(t.dataset.objectId,10),c=t.dataset.objectType;await i.dboAction("saveSubscription","wcf\\data\\user\\object\\watch\\UserObjectWatchAction").payload({enableNotification:1,objectID:l,objectType:c,subscribe:n}).dispatch(),s.has(l)&&s.get(l).forEach((e=>{e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{parseInt(e.dataset.subscribe,10)===n?e.classList.add("active"):e.classList.remove("active")}))})),document.querySelectorAll(`.userObjectWatchDropdownToggle[data-object-type="${c}"][data-object-id="${l}"]`).forEach((e=>{const t=e.querySelector("fa-icon"),i=e.querySelector("span:not(.icon)");n?(e.classList.add("active"),t.setIcon("bookmark",!0),i.textContent=r.get("wcf.user.objectWatch.button.subscribed")):(e.classList.remove("active"),t.setIcon("bookmark"),i.textContent=r.get("wcf.user.objectWatch.button.subscribe")),e.dataset.isSubscribed=n.toString()})),a.fire("com.woltlab.wcf.objectWatch","updatedSubscription"),o.show()}(e)}))}))}))}})),define("WoltLabSuite/Core/Api/Comments/Responses/EditResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editResponse=void 0,t.editResponse=async function(e){const t=new URL(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}/edit`);let o;try{o=await(0,n.prepareRequest)(t).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Comments/Responses/EnableResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableResponse=void 0,t.enableResponse=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}/enable`).post().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/Responses/DeleteResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteResponse=void 0,t.deleteResponse=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}`).delete().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/Responses/UpdateResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateResponse=void 0,t.updateResponse=async function(e,t){try{await(0,n.prepareRequest)(`${window.WSC_API_URL}index.php?api/rpc/core/comments/responses/${e}`).post({message:t}).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Component/Comment/Response/woltlab-core-comment-response",["require","exports","tslib","../../../Dom/Util","../../../Ui/Dropdown/Simple","../../../Ui/Notification","../../Confirmation","../../../Event/Handler","../../../Ui/Scroll","../../../Language","../../Ckeditor","WoltLabSuite/Core/Api/Comments/Responses/EnableResponse","WoltLabSuite/Core/Api/Comments/Responses/DeleteResponse","WoltLabSuite/Core/Api/Comments/Responses/EditResponse","WoltLabSuite/Core/Api/Comments/Responses/RenderResponse","WoltLabSuite/Core/Api/Comments/Responses/UpdateResponse"],(function(e,t,n,i,o,r,a,s,l,c,d,u,p,m,h,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentResponseElement=void 0,i=n.__importDefault(i),o=n.__importDefault(o),r=n.__importStar(r),s=n.__importStar(s),l=n.__importStar(l);class g extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".commentResponse__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#mt()}));const t=this.menu.querySelector(".commentResponse__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#ht()}));const n=this.menu.querySelector(".commentResponse__option--edit");n?.addEventListener("click",(e=>{e.preventDefault(),this.#ft()}))}}async#mt(){(await(0,u.enableResponse)(this.responseId)).unwrap(),this.querySelector(".commentResponse__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".commentResponse__option--enable").hidden=!0)}async#ht(){await(0,a.confirmationFactory)().delete()&&((await(0,p.deleteResponse)(this.responseId)).unwrap(),r.show(),this.dispatchEvent(new CustomEvent("delete")))}async#ft(){this.menu.querySelector(".commentResponse__option--edit").hidden=!0;const{template:e}=(await(0,m.editResponse)(this.responseId)).unwrap();this.#gt(e)}#gt(e){this.querySelector(".htmlContent").hidden=!0,i.default.insertHtml(e,this.#Te,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#bt()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#vt()})),s.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#wt}`,(e=>{e.cancel=!0,this.#bt()})),window.setTimeout((()=>{l.element(this)}),250)}async#bt(){const e=(0,d.getCkeditorById)(this.#wt),t={data:{message:e.getHtml()}};if(!this.#yt(t))return;s.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#wt}`,t),this.#a();const n=await(0,f.updateResponse)(this.responseId,e.getHtml());if(!n.ok){const e=n.error.getValidationError();if(void 0===e)throw n.error;return i.default.innerError(document.getElementById(this.#wt),e.code),void this.#_t()}const{template:o}=(await(0,h.renderResponse)(this.responseId,!0)).unwrap();i.default.setInnerHtml(this.querySelector(".htmlContent"),o),this.#_t(),this.#vt(),r.show()}#a(){let e=this.querySelector(".commentResponse__loading");e||(e=document.createElement("div"),e.classList.add("commentResponse__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".commentResponse__message").append(e)),this.#Te.hidden=!0,e.hidden=!1}#_t(){this.#Te.hidden=!1;const e=this.querySelector(".commentResponse__loading");e&&(e.hidden=!0)}#yt(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,d.getCkeditorById)(this.#wt);if(""===t.getHtml())return i.default.innerError(t.element,(0,c.getPhrase)("wcf.global.form.error.empty")),!1;const n={api:this,parameters:e,valid:!0};return s.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#wt}`,n),n.valid}#vt(){(0,d.getCkeditorById)(this.#wt).destroy(),this.#Te.remove(),this.menu.querySelector(".commentResponse__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#Te(){let e=this.querySelector(".commentResponse__editor");return e||(e=document.createElement("div"),e.classList.add("commentResponse__editor"),this.querySelector(".commentResponse__message").append(e)),e}get responseId(){return parseInt(this.getAttribute("response-id"))}get menu(){let e=o.default.getDropdownMenu(`commentResponseOptions${this.responseId}`);return void 0===e&&(e=this.querySelector(".commentResponse__menu .dropdownMenu")||void 0),e}get#wt(){return`commentResponseEditor${this.responseId}`}}t.WoltlabCoreCommentResponseElement=g,window.customElements.define("woltlab-core-comment-response",g),t.default=g})),define("WoltLabSuite/Core/Component/User/RecentActivity/Loader",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Language"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,r=n.__importDefault(r),t.setup=function(e){!function(e){if(e.querySelector(".recentActivityList__showMoreButton"))return;const t=document.createElement("div");t.classList.add("recentActivityList__showMoreButton"),e.append(t);const n=document.createElement("button");n.type="button",n.classList.add("button","small"),n.textContent=(0,s.getPhrase)("wcf.user.recentActivity.more"),t.append(n),n.addEventListener("click",(0,a.promiseMutex)((()=>async function(e){const t=await(0,i.dboAction)("load","wcf\\data\\user\\activity\\event\\UserActivityEventAction").payload({lastEventTime:e.dataset.lastEventTime,lastEventID:e.dataset.lastEventId||0,userID:e.dataset.userId||0,boxID:e.dataset.boxId||0,filteredByFollowedUsers:(0,o.stringToBool)(e.dataset.filteredByFollowedUsers||"")}).dispatch();if(t.template){e.dataset.lastEventTime=t.lastEventTime.toString(),e.dataset.lastEventId=t.lastEventID.toString();const n=r.default.createFragmentFromHtml(t.template);e.insertBefore(n,e.querySelector(".recentActivityList__showMoreButton"))}else e.querySelector(".recentActivityList__showMoreButton")?.remove(),function(e){const t=document.createElement("div");t.classList.add("recentActivityList__showMoreButton"),e.append(t);const n=document.createElement("small");n.textContent=(0,s.getPhrase)("wcf.user.recentActivity.noMoreEntries"),t.append(n)}(e)}(e))))}(e),function(e){e.querySelectorAll(".recentActivityList__switchContextButton").forEach((t=>{t.addEventListener("click",(0,a.promiseMutex)((()=>async function(e){await(0,i.dboAction)("switchContext","wcf\\data\\user\\activity\\event\\UserActivityEventAction").dispatch(),window.location.hash=`#${e.id}`,window.location.reload()}(e))))}))}(e)}})),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["require","exports","tslib","../../../Ui/Dropdown/Simple","../../../Event/Handler"],(function(e,t,n,i,o){"use strict";return i=n.__importDefault(i),o=n.__importStar(o),class{_formId;_suffixField;_suffixDropdownMenu;_suffixDropdownToggle;constructor(e,t){this._formId=e,this._suffixField=document.getElementById(t),this._suffixDropdownMenu=i.default.getDropdownMenu(t+"_dropdown"),this._suffixDropdownToggle=i.default.getDropdown(t+"_dropdown").getElementsByClassName("dropdownToggle")[0],Array.from(this._suffixDropdownMenu.children).forEach((e=>{e.addEventListener("click",(e=>this._changeSuffixSelection(e)))})),o.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",(e=>this._destroyDropdown(e)))}_changeSuffixSelection(e){const t=e.currentTarget;t.classList.contains("disabled")||(Array.from(this._suffixDropdownMenu.children).forEach((e=>{e===t?e.classList.add("active"):e.classList.remove("active")})),this._suffixField.value=t.dataset.value,this._suffixDropdownToggle.innerHTML=t.dataset.label+' <fa-icon name="caret-down" solid></fa-icon>')}_destroyDropdown(e){e.formId===this._formId&&i.default.destroy(this._suffixDropdownMenu.id)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_aclList;_getData(){return{[this._fieldId]:this._aclList.getData()}}_readField(){}setAclList(e){return this._aclList=e,this}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Button",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0,i=n.__importDefault(i);class o extends i.default{_getData(){const e={};return"1"===this._field.dataset.isClicked&&(e[this._fieldId]=this._field.value),e}}t.Button=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["require","exports","tslib","./Field","../../../Controller/Captcha"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importDefault(o);class r extends i.default{_getData(){return o.default.has(this._fieldId)?o.default.getData(this._fieldId):{}}_readField(){}destroy(){o.default.has(this._fieldId)&&o.default.delete(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i);class r extends i.default{_getData(){const e=this._fields.map((e=>e.checked?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e}}_readField(){}get _fields(){return Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[]"]`))}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_getData(){return{[this._fieldId]:this._field.checked?"1":"0"}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/CheckedVoid",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckedVoid=void 0,i=n.__importDefault(i);class o extends i.default{_getData(){return this._field.checked?{[this._fieldId]:1}:{}}}t.CheckedVoid=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Ckeditor",["require","exports","tslib","./Field","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Ckeditor"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ckeditor=void 0,i=n.__importDefault(i);class a extends i.default{_getData(){const e=(0,r.getCkeditorById)(this._fieldId);return{[this._fieldId]:e.getHtml()}}destroy(){(0,o.dispatchToCkeditor)(this._field).destroy()}}t.Ckeditor=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Date",["require","exports","tslib","./Field","../../../Date/Picker"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importDefault(o);class r extends i.default{_getData(){return{[this._fieldId]:o.default.getValue(this._field)}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor",["require","exports","tslib","WoltLabSuite/Core/Language","WoltLabSuite/Core/Api/Files/DeleteFile","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Component/File/Helper","WoltLabSuite/Core/Component/File/Upload"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.FileProcessor=void 0,r=n.__importDefault(r);const l=new Map;t.FileProcessor=class{#D;#tn;#nn;#in=void 0;#on;#rn;#an;#sn;#ln;constructor(e,t=!1,n=!1,i=[]){if(this.#nn=e,this.#rn=n,this.#an=t,this.#sn=i,this.#D=document.getElementById(e+"Container"),null===this.#D)throw new Error("Unknown field with id '"+e+"'");this.#tn=this.#D.querySelector("woltlab-core-file-upload"),this.#tn.addEventListener("uploadStart",(e=>{void 0!==this.#ln&&this.#ln(),this.#cn(e.detail)})),this.#on=this.#tn.shadowRoot.querySelector('input[type="file"]'),this.#D.querySelectorAll("woltlab-core-file").forEach((e=>{this.#cn(e,e.parentElement)})),l.set(e,this)}get classPrefix(){return this.#rn?"fileUpload__preview__":"fileList__"}addButtons(e,t){const n=document.createElement("ul");n.classList.add("buttonList"),n.classList.add(this.classPrefix+"item__buttons");let i=document.createElement("li");i.append(this.getDeleteButton(t)),n.append(i),this.#an&&(i=document.createElement("li"),i.append(this.getReplaceButton(t)),n.append(i)),this.#sn.forEach((e=>{const i=document.createElement("button");i.type="button",i.classList.add("button","small"),void 0===e.icon?i.textContent=e.title:(i.classList.add("jsTooltip"),i.title=e.title,i.innerHTML=e.icon),i.addEventListener("click",(()=>{t.dispatchEvent(new CustomEvent("fileProcessorCustomAction",{detail:e.actionName,bubbles:!0}))}));const o=document.createElement("li");o.append(i),n.append(o)})),e.append(n)}#dn(e,t,n){(0,a.fileInitializationFailed)(e,t,n),e.classList.add("innerError")}getDeleteButton(e){const t=document.createElement("button");return t.type="button",t.classList.add("button","small"),t.textContent=(0,i.getPhrase)("wcf.global.button.delete"),t.addEventListener("click",(async()=>{await(0,o.deleteFile)(e.fileId),this.#un(e)})),t}getReplaceButton(e){const t=document.createElement("button");return t.type="button",t.classList.add("button","small"),t.textContent=(0,i.getPhrase)("wcf.global.button.replace"),t.addEventListener("click",(()=>{const t=this.#tn.dataset.context,n=JSON.parse(t);n.__replace=!0,this.#tn.dataset.context=JSON.stringify(n),this.#in=e,this.#un(e),(0,s.clearPreviousErrors)(this.#tn);const i=()=>{this.#on.removeEventListener("cancel",o),new Promise((e=>{this.#ln=e})).then((()=>{this.#ln=void 0,this.#tn.dataset.context=t}))},o=()=>{this.#tn.dataset.context=t,this.#cn(this.#in),this.#in=void 0,this.#on.removeEventListener("change",i)};this.#on.addEventListener("cancel",o,{once:!0}),this.#on.addEventListener("change",i,{once:!0}),this.#on.click()})),t}#un(e){this.#rn?e.parentElement.innerHTML="":e.parentElement.parentElement.remove()}#cn(e,t=null){null===t&&(this.#rn?(null===(t=this.#D.querySelector(".fileUpload__preview"))&&((t=document.createElement("div")).classList.add("fileUpload__preview"),this.#tn.insertAdjacentElement("beforebegin",t)),t.append(e)):((t=document.createElement("li")).classList.add("fileList__item"),this.#D.querySelector(".fileList").append(t))),this.#rn||(0,a.insertFileInformation)(t,e),(0,a.trackUploadProgress)(t,e),e.ready.then((()=>{void 0!==this.#in&&((0,o.deleteFile)(this.#in.fileId),this.#in=void 0),this.#pn(e,t)})).catch((n=>{if(void 0!==this.#in&&(this.#cn(this.#in),this.#in=void 0,this.#rn)){const n=document.createElement("div");n.append(e),this.#tn.insertAdjacentElement("afterend",n),t=n}this.#dn(t,e,n)})).finally((()=>{(0,a.removeUploadProgress)(t)}))}#pn(e,t){if(this.#rn)e.dataset.previewUrl=e.link,e.unbounded=!0;else if(e.isImage()){const n=e.thumbnails.find((e=>"tiny"===e.identifier));if(void 0!==n?e.thumbnail=n:(e.dataset.previewUrl=e.link,e.unbounded=!1),void 0!==e.link&&void 0!==e.filename){const i=document.createElement("a");i.href=e.link,i.title=e.filename,i.textContent=e.filename,i.classList.add("jsImageViewer");const o=document.createElement("img");o.src=void 0!==n?n.link:e.link,o.alt=e.filename,o.style.display="none",o.loading="lazy",o.classList.add(this.classPrefix+"item__previewImage"),i.append(o);const a=t.querySelector("."+this.classPrefix+"item__filename");a.innerHTML="",a.append(i),r.default.trigger()}}const n=document.createElement("input");n.type="hidden",n.name=this.#an?this.#nn:this.#nn+"[]",n.value=e.fileId.toString(),t.append(n),this.addButtons(t,e)}get values(){if(this.#an){const e=this.#D.querySelector('input[type="hidden"]');if(null===e)return;return parseInt(e.value)}return new Set(Array.from(this.#D.querySelectorAll('input[type="hidden"]')).map((e=>parseInt(e.value))))}},t.getValues=function(e){const t=l.get(e);if(void 0===t)throw new Error("Unknown field with id '"+e+"'");return t.values}})),define("WoltLabSuite/Core/Form/Builder/Field/FileProcessor",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i=n.__importDefault(i);class r extends i.default{_getData(){const e=(0,o.getValues)(this._fieldId);return void 0===e?{}:{[this._fieldId]:e}}_readField(){}}t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["require","exports","tslib","./Field","../../../Ui/ItemList/Static"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e=[];return o.getValues(this._fieldId).forEach((t=>{t.objectId?e[t.objectId]=t.value:e.push(t.value)})),{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText",["require","exports","tslib","../Confirmation","../../Language","../../Dom/Util"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiItemListLineBreakSeparatedText=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r);class a{addButton=void 0;clearButton=void 0;itemInput=void 0;itemList;items=new Set;mutationObserver;options;submitField=void 0;uiDisabled=!1;constructor(e,t={}){if(this.itemList=e,this.options=t,!this.options.submitFieldName){const e=this.itemList.nextElementSibling;if(!(e instanceof HTMLInputElement&&"hidden"===e.type))throw new Error("Missing `submitFieldName` option");this.submitField=e}this.itemList.closest("form").addEventListener("submit",(()=>this.submit())),this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{"readonly"===e.attributeName&&(e.target.readOnly?this.disableUi():this.enableUi())}))})),this.initValues(),this.buildUi()}addItem(e){if(e.preventDefault(),this.uiDisabled)return;const t=this.itemInput,n=t.value.trim();""===n?r.default.innerError(t.parentElement,o.get("wcf.global.form.error.empty")):this.items.has(n)?r.default.innerError(t.parentElement,o.get("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:n}),!0):(this.insertItem(n),this.resetInput()),t.focus()}buildUi(){const e=document.createElement("div");e.classList.add("itemListFilter"),this.itemList.insertAdjacentElement("beforebegin",e),e.appendChild(this.itemList);const t=document.createElement("div");t.classList.add("inputAddon"),e.appendChild(t),this.itemInput=document.createElement("input"),this.itemInput.classList.add("long"),this.itemInput.type="text",this.itemInput.placeholder=o.get("wcf.acp.option.type.lineBreakSeparatedText.placeholder"),this.itemInput.addEventListener("keydown",(e=>this.keydown(e))),this.itemInput.addEventListener("paste",(e=>this.paste(e))),t.appendChild(this.itemInput),this.mutationObserver.observe(this.itemInput,{attributes:!0}),this.addButton=document.createElement("a"),this.addButton.href="#",this.addButton.classList.add("button","inputSuffix","jsTooltip"),this.addButton.title=o.get("wcf.global.button.add"),this.addButton.innerHTML='<fa-icon name="plus" solid></fa-icon>',this.addButton.addEventListener("click",(e=>this.addItem(e))),t.appendChild(this.addButton),this.clearButton=document.createElement("a"),this.clearButton.href="#",this.clearButton.classList.add("button","inputSuffix","jsTooltip"),this.clearButton.title=o.get("wcf.global.button.delete"),this.clearButton.innerHTML='<fa-icon name="times" solid></fa-icon>',this.clearButton.addEventListener("click",(e=>this.clearList(e))),t.appendChild(this.clearButton),0===this.items.size&&r.default.hide(this.clearButton)}clearList(e){e.preventDefault(),this.uiDisabled||i.show({confirm:()=>{this.itemList.innerHTML="",this.items.clear(),this.hideList()},message:o.get("wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage"),messageIsHtml:!0})}deleteItem(e){if(this.uiDisabled)return;const t=e.currentTarget,n=t.closest("li").dataset.value;i.show({confirm:()=>{t.closest("li").remove(),0===this.itemList.childElementCount&&this.hideList(),this.items.delete(n)},message:o.get("wcf.button.delete.confirmMessage",{objectTitle:n}),messageIsHtml:!0})}disableUi(){this.addButton.classList.add("disabled"),this.clearButton.classList.add("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.add("disabled"))),this.uiDisabled=!0}enableUi(){this.addButton.classList.remove("disabled"),this.clearButton.classList.remove("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.remove("disabled"))),this.uiDisabled=!1}hideList(){r.default.hide(this.itemList),r.default.hide(this.clearButton)}initValues(){Array.from(this.itemList.children).forEach((e=>{this.items.add(e.dataset.value),e.querySelector(".jsDeleteItem").addEventListener("click",(e=>this.deleteItem(e)))}))}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const n=document.createElement("span");n.innerHTML='<fa-icon name="xmark" solid></fa-icon>',n.classList.add("jsDeleteItem","jsTooltip","pointer"),n.title=o.get("wcf.global.button.delete"),n.addEventListener("click",(e=>this.deleteItem(e))),t.append(n),t.append(document.createTextNode(" "));const i=document.createElement("span");i.innerText=e,t.append(i);const r=Array.from(this.itemList.children).find((t=>t.dataset.value>e));r?this.itemList.insertBefore(t,r):this.itemList.append(t),this.showList()}keydown(e){"Enter"===e.key&&this.addItem(e)}paste(e){if(this.uiDisabled)return;const t=e.clipboardData.getData("text/plain").split("\n");t.length>1&&(e.preventDefault(),t.forEach((e=>{""===(e=e.trim())||this.items.has(e)||this.insertItem(e)})),this.resetInput())}resetInput(){r.default.innerError(this.itemInput.parentElement,""),this.itemInput.value=""}showList(){r.default.show(this.itemList),r.default.show(this.clearButton)}submit(){const e=Array.from(this.items).join("\n");if(this.submitField)this.submitField.value=e;else{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}}}t.UiItemListLineBreakSeparatedText=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.MultilineItemListFormField=void 0,i=n.__importStar(i),r=n.__importDefault(r);const a=new Map;class s extends i.UiItemListLineBreakSeparatedText{constructor(e,t){super(e,t),null!=t.submitFieldName?a.set(t.submitFieldName,this):a.set(this.submitField.id,this)}getItems(){return this.items}initValues(){super.initValues(),Array.from(this.itemList.children).forEach((e=>{e.querySelector(".jsEditItem").addEventListener("click",(e=>{this.editItem(e)}))}))}editItem(e){if(this.uiDisabled)return;const t=e.currentTarget,n=t.closest("li"),i=n.querySelector(".jsDeleteItem"),a=n.querySelector("span"),s=t.closest("li").dataset.value;r.default.hide(i),r.default.hide(t),r.default.hide(a);const l=document.createElement("input");l.type="text",l.value=s;const c=document.createElement("button");c.classList.add("jsSaveItem","jsTooltip"),c.title=(0,o.getPhrase)("wcf.global.button.save");let d=document.createElement("fa-icon");d.setIcon("save"),c.append(d);const u=document.createElement("button");u.classList.add("jsCancelItem","jsTooltip"),u.title=(0,o.getPhrase)("wcf.global.button.cancel"),d=document.createElement("fa-icon"),d.setIcon("times"),u.append(d);const p=()=>{l.remove(),c.remove(),u.remove(),r.default.show(i),r.default.show(t),r.default.show(a)},m=e=>{if(e.preventDefault(),this.uiDisabled)return;const n=l.value.trim();""===n?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.global.form.error.empty")):this.items.has(n)&&n!==s?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:n}),!0):(r.default.innerError(l.parentElement,""),t.closest("li").dataset.value=n,a.textContent=n,this.items.delete(s),this.items.add(n),p()),l.focus()};l.addEventListener("keydown",(e=>{"Enter"===e.key?m(e):"Escape"===e.key&&p()})),c.addEventListener("click",(e=>{m(e)})),u.addEventListener("click",(()=>{p()})),n.append(c,u,l),l.focus()}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const n=document.createElement("button");n.type="button",n.classList.add("jsDeleteItem","jsTooltip"),n.title=(0,o.getPhrase)("wcf.global.button.delete"),n.addEventListener("click",(e=>{this.deleteItem(e)}));let i=document.createElement("fa-icon");i.setIcon("trash"),n.append(i);const r=document.createElement("button");r.type="button",r.classList.add("jsEditItem","jsTooltip"),r.title=(0,o.getPhrase)("wcf.global.button.edit"),r.addEventListener("click",(e=>{this.editItem(e)})),i=document.createElement("fa-icon"),i.setIcon("pencil"),r.append(i);const a=document.createElement("span");a.innerText=e,t.append(r,n," ",a);const s=Array.from(this.itemList.children).find((t=>t.dataset.value>e));s?this.itemList.insertBefore(t,s):this.itemList.append(t),this.showList()}submit(){this.submitField?this.submitField.value=Array.from(this.items).join("\n"):Array.from(this.items).forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}))}}t.MultilineItemListFormField=s,t.getValues=function(e){if(!a.has(e))throw new Error(`Element id '${e}' is unknown.`);return a.get(e).getItems()}})),define("WoltLabSuite/Core/Form/Builder/Field/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","./Controller/MultilineItemList"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultilineItemList=void 0,i=n.__importDefault(i);class r extends i.default{_getData(){return{[this._fieldId]:(0,o.getValues)(this._fieldId)}}}t.MultilineItemList=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i);class r extends i.default{_fields;constructor(e){super(e),this._fields=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}"]`))}_getData(){const e={};return this._fields.some((t=>!!t.checked&&(e[this._fieldId]=t.value,!0))),e}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i);class r extends i.default{_getData(){const e=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[group][]"]`)).map((e=>e.value)),t=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[user][]"]`)).map((e=>e.value));return{[this._fieldId]:{group:e,user:t}}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/User",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e.join(",")}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Value",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_getData(){return{[this._fieldId]:this._field.value}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["require","exports","tslib","./Field","../../../Language/Input"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e={},t=o.getValues(this._fieldId);return t.size>1?(Object.prototype.hasOwnProperty.call(e,this._fieldId+"_i18n")||(e[this._fieldId+"_i18n"]={}),t.forEach(((t,n)=>{e[this._fieldId+"_i18n"][n]=t}))):e[this._fieldId]=t.get(0),e}destroy(){o.unregister(this._fieldId)}}return r})),define("WoltLabSuite/Core/Ui/Object/Action/Toogle",["require","exports","./Toggle"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return n.setup}})})),define("WoltLabSuite/Core/Ui/User/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,n,i,o){"use strict";i=n.__importStar(i),o=n.__importDefault(o);class r extends o.default{constructor(e,t){const n=i.isPlainObject(t)&&!0===t.includeUserGroups;super(e,t=i.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:n?1:0}}}},t))}createListItem(e){const t=super.createListItem(e);t.dataset.type=e.type;const n=document.createElement("div");return n.className="box16",n.innerHTML="group"===e.type?'<fa-icon name="users" solid></fa-icon>':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["require","exports","tslib","../../../../Core","../../../../Dom/Util","../../../../Language","../../../../Ui/Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),class{_formFieldContainer;_input;_labelChooser;_options;constructor(e,t,n){this._formFieldContainer=document.getElementById(e+"Container"),this._labelChooser=this._formFieldContainer.getElementsByClassName("labelChooser")[0],this._options=i.extend({forceSelection:!1,showWithoutSelection:!1},n),this._input=document.createElement("input"),this._input.type="hidden",this._input.id=e,this._input.name=e,this._input.value=t,this._formFieldContainer.appendChild(this._input);const s=o.identify(this._labelChooser);let l=a.default.getDropdownMenu(s);null===l&&(a.default.init(this._labelChooser.getElementsByClassName("dropdownToggle")[0]),l=a.default.getDropdownMenu(s));let c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=document.createElement("ul"),l.appendChild(c);const e=document.createElement("li");e.classList.add("dropdownDivider"),c.appendChild(e)}if(this._options.showWithoutSelection){const e=document.createElement("li");e.dataset.labelId="-1",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const n=document.createElement("span");n.classList.add("badge","label"),n.innerHTML=r.get("wcf.label.withoutSelection"),t.appendChild(n)}if(!this._options.forceSelection){const e=document.createElement("li");e.dataset.labelId="0",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const n=document.createElement("span");n.classList.add("badge","label"),n.innerHTML=r.get("wcf.label.none"),t.appendChild(n)}l.querySelectorAll("li:not(.dropdownDivider)").forEach((e=>{e.addEventListener("click",(e=>this._click(e))),t&&e.dataset.labelId===t&&this._selectLabel(e)}))}_blockScroll(e){e.addEventListener("wheel",(e=>e.preventDefault()),{passive:!1})}_click(e){e.preventDefault(),this._selectLabel(e.currentTarget)}_selectLabel(e){let t=e.dataset.labelId;t||(t="0");const n=e.querySelector("span > span"),i=this._labelChooser.querySelector(".dropdownToggle > span");i.className=n.className,i.textContent=n.textContent,this._input.value=t}}})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["require","exports","tslib","../../../../Environment"],(function(e,t,n,i){"use strict";return i=n.__importStar(i),class{_field;_input;_ratingElements;constructor(e,t){if(this._field=document.getElementById(e+"Container"),null===this._field)throw new Error("Unknown field with id '"+e+"'");this._input=document.createElement("input"),this._input.id=e,this._input.name=e,this._input.type="hidden",this._input.value=t,this._field.appendChild(this._input),this._ratingElements=new Map;const n=this._field.querySelector(".ratingList");n.addEventListener("mouseleave",(()=>this._restoreRating())),n.querySelectorAll("li").forEach((e=>{e.classList.contains("ratingMetaButton")?(e.addEventListener("click",(e=>this._metaButtonClick(e))),e.addEventListener("mouseenter",(()=>this._restoreRating()))):(this._ratingElements.set(e.dataset.rating,e),e.addEventListener("click",(e=>this._listItemClick(e))),e.addEventListener("mouseenter",(e=>this._listItemMouseEnter(e))),e.addEventListener("mouseleave",(()=>this._listItemMouseLeave())))}))}_listItemClick(e){const t=e.currentTarget;this._input.value=t.dataset.rating,"desktop"!==i.platform()&&this._restoreRating()}_listItemMouseEnter(e){const t=e.currentTarget.dataset.rating;this._ratingElements.forEach(((e,n)=>{const i=e.querySelector("fa-icon");this._toggleIcon(i,~~n<=~~t)}))}_listItemMouseLeave(){this._ratingElements.forEach((e=>{const t=e.querySelector("fa-icon");this._toggleIcon(t,!1)}))}_metaButtonClick(e){"removeRating"===e.currentTarget.dataset.action&&(this._input.value="",this._listItemMouseLeave())}_restoreRating(){this._ratingElements.forEach(((e,t)=>{const n=e.querySelector("fa-icon");this._toggleIcon(n,~~t<=~~this._input.value)}))}_toggleIcon(e,t=!1){t?e.setIcon("star",!0):e.setIcon("star")}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","./Manager"],(function(e,t,n,i,o){"use strict";return o=n.__importStar(o),class{_dependentElement;_field;_fields;_noField;constructor(e,t){this.init(e,t)}checkDependency(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")}getDependentNode(){return this._dependentElement}getField(){return this._field}getFields(){return this._fields}init(e,t){if(this._dependentElement=document.getElementById(e),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+e+"Container'.");if(this._field=document.getElementById(t),null===this._field){if(this._fields=[],document.querySelectorAll(`input[type=radio][name="${(0,i.escapeAttributeSelector)(t)}"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length&&(document.querySelectorAll(`input[type=checkbox][name="${(0,i.escapeAttributeSelector)(t)}[]"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length))throw new Error("Unknown field with id '"+t+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.nodeName&&"radio"===this._field.type&&""!==this._field.dataset.noInputId){if(this._noField=document.getElementById(this._field.dataset.noInputId),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+t+"'");this._fields.push(this._noField)}o.addDependency(this)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["require","exports","tslib","./Abstract"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return!e.checked;case"radio":return!(!this._noField||!this._noField.checked)||!e.checked;default:return 0===e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0===this._field.querySelectorAll("option:checked").length:"0"==e.value||0===e.value.length}case"TEXTAREA":return 0===this._field.value.trim().length}return this._fields.every((e=>!e.checked))}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/IsNotClicked",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsNotClicked=void 0,i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{constructor(e,t){super(e,t),this._field.addEventListener("click",(()=>{this._field.dataset.isClicked="1",o.checkDependencies()}))}checkDependency(){return"1"!==this._field.dataset.isClicked}}t.IsNotClicked=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["require","exports","tslib","./Abstract"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return e.checked;case"radio":return(!this._noField||!this._noField.checked)&&e.checked;default:return 0!==e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0!==e.querySelectorAll("option:checked").length:"0"!=e.value&&0!==e.value.length}case"TEXTAREA":return 0!==this._field.value.trim().length}return this._fields.some((e=>e.checked))}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_isNegated=!1;_values;checkDependency(){if(!this._values)throw new Error("Values have not been set.");const e=[];if(this._field){if(o.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else{let t=!0;if(this._fields.forEach((n=>{if(n.checked){if(o.isHiddenByDependencies(n))return t=!1,!1;e.push(n.value)}})),!t)return!1}let t=!1;return this._values.forEach((n=>{e.forEach((e=>{n==e&&(t=!0)}))})),t?!this._isNegated:this._isNegated}negate(e){return this._isNegated=e,this}values(e){return this._values=e,this}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/ValueInterval",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueInterval=void 0,i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_maximum=null;_minimum=null;checkDependency(){if(this._field){if(o.isHiddenByDependencies(this._field))return!1;const e=parseFloat(this._field.value);return!(isNaN(e)||null!==this._minimum&&this._minimum>e||null!==this._maximum&&this._maximum<e)}throw new Error("'ValueInterval' is only supported for individual fields.")}maximum(e){return this._maximum=e,this}minimum(e){return this._minimum=e,this}}t.ValueInterval=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["require","exports","tslib","../Value","../../../../Language/Chooser"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{destroy(){o.removeChooser(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["require","exports","tslib","../Value"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{constructor(e){super(e+"_tmpHash")}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Poll",["require","exports","tslib","../Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_pollEditor;_getData(){return this._pollEditor.getData()}_readField(){}setPollEditor(e){this._pollEditor=e}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["require","exports","tslib","../Manager"],(function(e,t,n,i){"use strict";return i=n.__importStar(i),class{_container;constructor(e){this.init(e)}checkContainer(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")}init(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=document.getElementById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");i.addContainerCheckCallback((()=>this.checkContainer()))}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["require","exports","tslib","./Abstract","../../../../../Core","../Manager","../../../../../Dom/Util"],(function(e,t,n,i,o,r,a){"use strict";i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a);class s extends i.default{checkContainer(){if(o.stringToBool(this._container.dataset.ignoreDependencies||""))return;if(r.isHiddenByDependencies(this._container))return;const e=!a.default.isHidden(this._container),t=Array.from(this._container.children).some(((e,t)=>(0!==t||"H2"!==e.tagName&&"HEADER"!==e.tagName)&&!a.default.isHidden(e)));e!==t&&(t?a.default.show(this._container):a.default.hide(this._container),r.checkContainers())}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,n,i,o,r,a){"use strict";i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a);class s extends i.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=Array.from(this._container.children).some((e=>!r.isHidden(e)));if(e!==t){const e=this._container.parentNode.parentNode.querySelector("#"+r.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]");if(null===e)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)r.show(this._container),r.show(e);else{r.hide(this._container),r.hide(e);const t=a.getTabMenu(r.identify(e.closest(".tabMenuContainer")));t.getActiveTab()===e&&t.selectFirstVisible()}o.checkContainers()}}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,n,i,o,r,a){"use strict";i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a);class s extends i.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=this._container.parentNode.querySelectorAll("#"+r.identify(this._container)+" > nav > ul > li"),n=Array.from(t).some((e=>!r.isHidden(e)));e!==n&&(n?(r.show(this._container),a.getTabMenu(r.identify(this._container)).selectFirstVisible()):r.hide(this._container),o.checkContainers())}}return s})),function(e){function t(){for(;i.length&&"function"==typeof i[0];)i.shift()()}var n=e.require,i=[],o=0;e.orgRequire=n,e.require=function(r,a,s){if(!Array.isArray(r))return n.apply(e,arguments);var l=new Promise((function(e,a){var s=o++;i.push(s),n(r,(function(){var n=arguments;i[i.indexOf(s)]=function(){e(n)},t()}),(function(e){i[i.indexOf(s)]=function(){a(e)},t()}))}));return a&&(l=l.then((function(t){return a.apply(e,t)}))),s&&l.catch(s),l},e.require.config=n.config}(window),define("require.linearExecution",(function(){}));
+//# sourceMappingURL=../proxy_sourcemap.php?g1lP_g0vUz3l0KDy79JE1shBA4ArWDzWI-clGaDTtxx0Q0QFY2Ql2ZbOHXBekbhtN2ICpUvZh0jFUsGtLyMb-P8WKsEgBXAbZAzinB9gS8yHMPitgjba3zxr_X6hTPfeLNq8f5WCQYq97LI-N26kbtQ7tGVupEac7QGir77z8LZ14psqOWT29rnUUij0dVPOG9tXtvWXBQspwQ4_JMaHb6XsDnsgAlHeYOCjsdp6LOmxMD7tT1tCV_GyrF1uWCQk5BgOVG1SuqQgzjZXqDvRg64gFhV_-9fj8C5sUvTlGLYx0hoZE72TjWOt4ydWVCfEEEtgyobcamGzmP_G6cFU0g/WCF/40b099ae0e9ddac2f1b28f82cf90c130ca604784f47b602eefd1c65876320814
\ No newline at end of file