Updating minified JavaScript files
authorroot <root@s1.woltlab.com>
Sat, 17 Oct 2020 12:35:39 +0000 (12:35 +0000)
committerroot <root@s1.woltlab.com>
Sat, 17 Oct 2020 12:35:39 +0000 (12:35 +0000)
wcfsetup/install/files/js/WoltLabSuite.Core.min.js
wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js

index d8e50bb2f14e13ef64036b0b5ee819f678f3e236..6631df4128a8aee1e966ed5014476636768ac200 100644 (file)
@@ -12,10 +12,10 @@ o.className="tabMenuOverlayLeft icon icon24 fa-angle-left",o.addEventListener(WC
 _enableExternalMedia:function(e){var t=atob(elData(e,"payload"));a.insertHtml(t,e,"before"),elRemove(e)},_enableAll:function(){elBySelAll(".messageUserConsent",void 0,this._enableExternalMedia.bind(this))}}}),define("WoltLabSuite/Core/BootstrapFrontend",["WoltLabSuite/Core/BackgroundQueue","WoltLabSuite/Core/Bootstrap","WoltLabSuite/Core/Controller/Style/Changer","WoltLabSuite/Core/Controller/Popover","WoltLabSuite/Core/Ui/User/Ignore","WoltLabSuite/Core/Ui/Page/Header/Menu","WoltLabSuite/Core/Ui/Message/UserConsent"],function(e,t,i,n,a,r,o){"use strict";return{setup:function(n){n.backgroundQueue.url=WSC_API_URL+n.backgroundQueue.url.substr(WCF_PATH.length),t.setup(),r.init(),n.styleChanger&&i.setup(),n.enableUserPopover&&this._initUserPopover(),e.setUrl(n.backgroundQueue.url),(Math.random()<.1||n.backgroundQueue.force)&&e.invoke(),a.init(),o.init()},_initUserPopover:function(){n.init({className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user"}),n.init({attributeName:"data-user-id",className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user.deprecated"})}}}),define("WoltLabSuite/Core/Clipboard",["Environment","Ui/Screen"],function(e,t){"use strict";return{copyTextToClipboard:function(i){if(navigator.clipboard)return navigator.clipboard.writeText(i);if(window.getSelection){var n=elCreate("textarea");n.contentEditable=!0,n.readOnly=!1;var a=!1;if("ios"===e.platform()){a=!0,t.scrollDisable();var r=~~(window.innerHeight/4)+window.pageYOffset;n.style.cssText="font-size: 16px; position: absolute; left: 1px; top: "+r+"px; width: 50px; height: 50px; overflow: hidden;border: 5px solid red;"}else n.style.cssText="position: absolute; left: -9999px; top: -9999px; width: 0; height: 0;";document.body.appendChild(n);try{n.value=i;var o=document.createRange();o.selectNodeContents(n);var s=window.getSelection();return s.removeAllRanges(),s.addRange(o),n.setSelectionRange(0,999999),document.execCommand("copy")?Promise.resolve():Promise.reject(new Error("execCommand('copy') failed"))}finally{elRemove(n),a&&t.scrollEnable()}}return Promise.reject(new Error("Neither navigator.clipboard, nor window.getSelection is supported."))},copyElementTextToClipboard:function(e){return this.copyTextToClipboard(e.textContent)}}}),define("WoltLabSuite/Core/ColorUtil",[],function(){"use strict";var e={hsvToRgb:function(e,t,i){var n,a,r,o,s,l={r:0,g:0,b:0};if(n=Math.floor(e/60),a=e/60-n,t/=100,i/=100,r=i*(1-t),o=i*(1-t*a),s=i*(1-t*(1-a)),0==t)l.r=l.g=l.b=i;else switch(n){case 1:l.r=o,l.g=i,l.b=r;break;case 2:l.r=r,l.g=i,l.b=s;break;case 3:l.r=r,l.g=o,l.b=i;break;case 4:l.r=s,l.g=r,l.b=i;break;case 5:l.r=i,l.g=r,l.b=o;break;case 0:case 6:l.r=i,l.g=s,l.b=r}return{r:Math.round(255*l.r),g:Math.round(255*l.g),b:Math.round(255*l.b)}},rgbToHsv:function(e,t,i){var n,a,r,o,s,l;if(e/=255,t/=255,i/=255,o=Math.max(Math.max(e,t),i),s=Math.min(Math.min(e,t),i),l=o-s,n=0,o!==s){switch(o){case e:n=(t-i)/l*60;break;case t:n=60*(2+(i-e)/l);break;case i:n=60*(4+(e-t)/l)}n<0&&(n+=360)}return a=0===o?0:l/o,r=o,{h:Math.round(n),s:Math.round(100*a),v:Math.round(100*r)}},hexToRgb:function(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){var 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},rgbToHex:function(e,t,i){var n="0123456789ABCDEF";return void 0===t&&e.toString().match(/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/)&&(e=RegExp.$1,t=RegExp.$2,i=RegExp.$3),n.charAt((e-e%16)/16)+""+n.charAt(e%16)+n.charAt((t-t%16)/16)+n.charAt(t%16)+n.charAt((i-i%16)/16)+n.charAt(i%16)}};return window.__wcf_bc_colorUtil=e,e}),define("WoltLabSuite/Core/FileUtil",["Dictionary","StringUtil"],function(e,t){"use strict";var i=e.fromObject({zip:"archive",rar:"archive",tar:"archive",gz:"archive",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:"text",doc:"word",docx:"word",odt:"word"}),n=e.fromObject({"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"});return{formatFilesize:function(e,i){void 0===i&&(i=2);var 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"),t.formatNumeric(e,-i)+" "+n},getIconNameByFilename:function(e){var t=e.lastIndexOf(".");if(!1!==t){var n=e.substr(t+1);if(i.has(n))return i.get(n)}return""},getExtensionByMimeType:function(e){return n.has(e)?"."+n.get(e):""},blobToFile:function(e,t){var i=this.getExtensionByMimeType(e.type),n=window.File;try{new n([],"ie11-check")}catch(e){n=function(e,t,i){var n=Blob.call(this,e,i);return n.name=t,n.lastModifiedDate=new Date,n},n.prototype=Object.create(window.File.prototype)}return new n([e],t+i,{type:e.type})}}}),define("WoltLabSuite/Core/Permission",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,i){if("boolean"!=typeof i)throw new TypeError("Permission value has to be boolean.");t.set(e,i)},addObject:function(e){for(var t in e)objOwns(e,t)&&this.add(t,e[t])},get:function(e){return!!t.has(e)&&t.get(e)}}});var _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,n,o,s,l,c){for(var u in o)if(o.hasOwnProperty(u)&&o[u]){var h=o[u];h=Array.isArray(h)?h:[h];for(var f=0;f<h.length;++f){if(c&&c.cause==u+","+f)return;var p=h[f],m=p.inside,g=!!p.lookbehind,v=!!p.greedy,_=0,b=p.alias;if(v&&!p.pattern.global){var w=p.pattern.toString().match(/[imsuy]*$/)[0];p.pattern=RegExp(p.pattern.source,w+"g")}for(var y=p.pattern||p,C=s.next,E=l;C!==n.tail&&!(c&&E>=c.reach);E+=C.value.length,C=C.next){var L=C.value;if(n.length>e.length)return;if(!(L instanceof t)){var S=1;if(v&&C!=n.tail.prev){y.lastIndex=E;var A=y.exec(e);if(!A)break;var I=A.index+(g&&A[1]?A[1].length:0),D=A.index+A[0].length,x=E;for(x+=C.value.length;I>=x;)C=C.next,x+=C.value.length;if(x-=C.value.length,E=x,C.value instanceof t)continue;for(var T=C;T!==n.tail&&(x<D||"string"==typeof T.value);T=T.next)S++,x+=T.value.length;S--,L=e.slice(E,x),A.index-=E}else{y.lastIndex=0;var A=y.exec(L)}if(A){g&&(_=A[1]?A[1].length:0);var I=A.index+_,B=A[0].slice(_),D=I+B.length,k=L.slice(0,I),N=L.slice(D),M=E+L.length;c&&M>c.reach&&(c.reach=M);var U=C.prev;k&&(U=a(n,U,k),E+=k.length),r(n,U,S);var j=new t(u,m?d.tokenize(B,m):B,b,B);C=a(n,U,j),N&&a(n,C,N),S>1&&i(e,n,o,C.prev,E,{cause:u+","+f,reach:M})}}}}}}function n(){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 a(e,t,i){var n=t.next,a={value:i,prev:t,next:n};return t.next=a,n.prev=a,e.length++,a}function r(e,t,i){for(var n=t.next,a=0;a<i&&n!==e.tail;a++)n=n.next;t.next=n,n.prev=t,e.length-=a}function o(e){for(var t=[],i=e.head.next;i!==e.tail;)t.push(i.value),i=i.next;return t}function s(){d.manual||d.highlightAll()}var l=/\blang(?:uage)?-([\w-]+)\b/i,c=0,d={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:++c}),e.__id},clone:function e(t,i){i=i||{};var n,a;switch(d.util.type(t)){case"Object":if(a=d.util.objId(t),i[a])return i[a];n={},i[a]=n;for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r],i));return n;case"Array":return a=d.util.objId(t),i[a]?i[a]:(n=[],i[a]=n,t.forEach(function(t,a){n[a]=e(t,i)}),n);default:return t}},getLanguage:function(e){for(;e&&!l.test(e.className);)e=e.parentElement;return e?(e.className.match(l)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(n){var e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(n.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var i in t)if(t[i].src==e)return t[i]}return null}},isActive:function(e,t,i){for(var n="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(n))return!1;e=e.parentElement}return!!i}},languages:{extend:function(e,t){var i=d.util.clone(d.languages[e]);for(var n in t)i[n]=t[n];return i},insertBefore:function(e,t,i,n){n=n||d.languages;var a=n[e],r={};for(var o in a)if(a.hasOwnProperty(o)){if(o==t)for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s]);i.hasOwnProperty(o)||(r[o]=a[o])}var l=n[e];return n[e]=r,d.languages.DFS(d.languages,function(t,i){i===l&&t!=e&&(this[t]=r)}),r},DFS:function e(t,i,n,a){a=a||{};var r=d.util.objId;for(var o in t)if(t.hasOwnProperty(o)){i.call(t,o,t[o],n||o);var s=t[o],l=d.util.type(s);"Object"!==l||a[r(s)]?"Array"!==l||a[r(s)]||(a[r(s)]=!0,e(s,i,o,a)):(a[r(s)]=!0,e(s,i,null,a))}}},plugins:{},highlightAll:function(e,t){d.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,i){var n={callback:i,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};d.hooks.run("before-highlightall",n),n.elements=Array.prototype.slice.apply(n.container.querySelectorAll(n.selector)),d.hooks.run("before-all-elements-highlight",n);for(var a,r=0;a=n.elements[r++];)d.highlightElement(a,!0===t,n.callback)},highlightElement:function(t,i,n){function a(e){u.highlightedCode=e,d.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,d.hooks.run("after-highlight",u),d.hooks.run("complete",u),n&&n.call(u.element)}var r=d.util.getLanguage(t),o=d.languages[r];t.className=t.className.replace(l,"").replace(/\s+/g," ")+" language-"+r;var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&(s.className=s.className.replace(l,"").replace(/\s+/g," ")+" language-"+r);var c=t.textContent,u={element:t,language:r,grammar:o,code:c};if(d.hooks.run("before-sanity-check",u),!u.code)return d.hooks.run("complete",u),void(n&&n.call(u.element));if(d.hooks.run("before-highlight",u),!u.grammar)return void a(d.util.encode(u.code));if(i&&e.Worker){var h=new Worker(d.filename);h.onmessage=function(e){a(e.data)},h.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else a(d.highlight(u.code,u.grammar,u.language))},highlight:function(e,i,n){var a={code:e,grammar:i,language:n};return d.hooks.run("before-tokenize",a),a.tokens=d.tokenize(a.code,a.grammar),d.hooks.run("after-tokenize",a),t.stringify(d.util.encode(a.tokens),a.language)},tokenize:function(e,t){var r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}var l=new n;return a(l,l.head,e),i(e,l,t,l.head,0),o(l)},hooks:{all:{},add:function(e,t){var i=d.hooks.all;i[e]=i[e]||[],i[e].push(t)},run:function(e,t){var i=d.hooks.all[e];if(i&&i.length)for(var n,a=0;n=i[a++];)n(t)}},Token:t};if(e.Prism=d,t.stringify=function e(t,i){if("string"==typeof t)return t;if(Array.isArray(t)){var n="";return t.forEach(function(t){n+=e(t,i)}),n}var a={type:t.type,content:e(t.content,i),tag:"span",classes:["token",t.type],attributes:{},language:i},r=t.alias;r&&(Array.isArray(r)?Array.prototype.push.apply(a.classes,r):a.classes.push(r)),d.hooks.run("wrap",a);var o="";for(var s in a.attributes)o+=" "+s+'="'+(a.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+o+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(d.disableWorkerMessageHandler||e.addEventListener("message",function(t){var i=JSON.parse(t.data),n=i.language,a=i.code,r=i.immediateClose;e.postMessage(d.highlight(a,d.languages[n],n)),r&&e.close()},!1),d):d;var u=d.util.currentScript();if(u&&(d.filename=u.src,u.hasAttribute("data-manual")&&(d.manual=!0)),!d.manual){var h=document.readyState;"loading"===h||"interactive"===h&&u&&u.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)}return d}(_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 Prism.wscSplitIntoLines=function(e){function t(){var e=elCreate("span");return elData(e,"number",o++),r.appendChild(e),e}var i,n,a,r=document.createDocumentFragment(),o=1;for(i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(){return NodeFilter.FILTER_ACCEPT},!1),a=t();n=i.nextNode();)n.data.split(/\r?\n/).forEach(function(i,r){var o,s;for(r>=1&&(a.appendChild(document.createTextNode("\n")),a=t()),o=document.createTextNode(i),s=n.parentNode;s!==e;){var l=s.cloneNode(!1);l.appendChild(o),o=l,s=s.parentNode}a.appendChild(o)});return r},Prism}),define("WoltLabSuite/Core/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse"],function(e,t,i,n,a,r){"use strict";function o(e,i,n){if(n=n||{},void 0===n.className)throw new Error("Missing class name.");if(this._options=t.extend({action:"upload",multiple:!1,acceptableFiles:null,name:"__files[]",singleFileRequests:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n),this._options.url=t.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(i),null===i)throw new Error("Element id '"+i+"' is unknown.");if(n.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._fileElements=[],this._internalFileId=0,this._multiFileUploadIds=[],this._createButton()}return o.prototype={_createButton:function(){this._fileUpload=elCreate("input"),elAttr(this._fileUpload,"type","file"),elAttr(this._fileUpload,"name",this._options.name),this._options.multiple&&elAttr(this._fileUpload,"multiple","true"),null!==this._options.acceptableFiles&&elAttr(this._fileUpload,"accept",this._options.acceptableFiles.join(",")),this._fileUpload.addEventListener("change",this._upload.bind(this)),this._button=elCreate("p"),this._button.className="button uploadButton",elAttr(this._button,"role","button"),this._fileUpload.addEventListener("focus",function(){this._fileUpload.classList.contains("focus-visible")&&this._button.classList.add("active")}.bind(this)),this._fileUpload.addEventListener("blur",function(){this._button.classList.remove("active")}.bind(this));var e=elCreate("span");e.textContent=n.get("wcf.global.button.upload"),this._button.appendChild(e),a.prepend(this._fileUpload,this._button),this._insertButton(),i.trigger()},_createFileElement:function(e){var t=elCreate("progress");if(elAttr(t,"max",100),"OL"===this._target.nodeName||"UL"===this._target.nodeName){var i=elCreate("li");return i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i}if("TBODY"===this._target.nodeName)return this._createFileTableRow(e);var n=elCreate("p");return n.appendChild(t),this._target.appendChild(n),n},_createFileElements:function(e){if(e.length){var t=this._fileElements.length;this._fileElements[t]=[];for(var n=0,a=e.length;n<a;n++){var r=e[n],o=this._createFileElement(r);o.classList.contains("uploadFailed")||(elData(o,"filename",r.name),elData(o,"internal-file-id",this._internalFileId++),this._fileElements[t][n]=o)}return i.trigger(),t}return null},_createFileTableRow:function(e){throw new Error("Has to be implemented in subclass.")},_failure:function(e,t,i,n,a){return!0},_getParameters:function(){return{}},_getFormData:function(){return{}},_insertButton:function(){a.prepend(this._button,this._buttonContainer)},_progress:function(e,t){var i=Math.round(t.loaded/t.total*100);for(var n in this._fileElements[e]){var a=elByTag("PROGRESS",this._fileElements[e][n]);1===a.length&&elAttr(a[0],"value",i)}},_removeButton:function(){elRemove(this._button),i.trigger()},_success:function(e,t,i,n,a){},_upload:function(e,t,i){for(var n=r.childrenByClass(this._target,"uploadFailed"),a=0,o=n.length;a<o;a++)elRemove(n[a]);var s=null,l=[];if(t)l.push(t);else if(i){var c="";switch(i.type){case"image/jpeg":c=".jpg";break;case"image/gif":c=".gif";break;case"image/png":c=".png"}l.push({name:"pasted-from-clipboard"+c})}else l=this._fileUpload.files;if(l.length&&this.validateUpload(l))if(this._options.singleFileRequests){s=[];for(var a=0,o=l.length;a<o;a++){var d=this._uploadFiles([l[a]],i);1!==l.length&&this._multiFileUploadIds.push(d),s.push(d)}}else s=this._uploadFiles(l,i);return this._removeButton(),this._createButton(),s},validateUpload:function(e){return!0},_uploadFiles:function(t,i){var n=this._createFileElements(t);if(!this._fileElements[n].length)return null;for(var a=new FormData,r=0,o=t.length;r<o;r++)if(this._fileElements[n][r]){var s=elData(this._fileElements[n][r],"internal-file-id");i?a.append("__files["+s+"]",i,t[r].name):a.append("__files["+s+"]",t[r])}a.append("actionName",this._options.action),a.append("className",this._options.className),"upload"===this._options.action&&a.append("interfaceName","wcf\\data\\IUploadAction");var l=function(e,t){t=t||"";for(var i in e)if("object"==typeof e[i]){var n=0===t.length?i:t+"["+i+"]";l(e[i],n)}else{var r=0===t.length?i:t+"["+i+"]";a.append(r,e[i])}};return l(this._getParameters(),"parameters"),l(this._getFormData()),new e({data:a,contentType:!1,failure:this._failure.bind(this,n),silent:!0,success:this._success.bind(this,n),uploadProgress:this._progress.bind(this,n),url:this._options.url,withCredentials:!0}).sendRequest(),n},hasPendingUploads:function(){for(var e in this._fileElements)for(var t in this._fileElements[e]){var i=elByTag("PROGRESS",this._fileElements[e][t]);if(1===i.length)return!0}return!1},uploadBlob:function(e){return this._upload(null,null,e)},uploadFile:function(e){return this._upload(null,e)}},o}),define("WoltLabSuite/Core/Ajax/Jsonp",["Core"],function(e){"use strict";return{send:function(t,i,n,a){if(t="string"==typeof t?t.trim():"",0===t.length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof i)throw new TypeError("Expected a valid callback function for parameter 'success'.");a=e.extend({parameterName:"callback",timeout:10},a||{});var r,o="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),s=window.setTimeout(function(){"function"==typeof n&&n(),window[o]=void 0,elRemove(r)},1e3*(~~a.timeout||10));window[o]=function(){window.clearTimeout(s),i.apply(null,arguments),window[o]=void 0,elRemove(r)},t+=-1===t.indexOf("?")?"?":"&",t+=a.parameterName+"="+o,r=elCreate("script"),r.async=!0,elAttr(r,"src",t),document.head.appendChild(r)}}}),define("WoltLabSuite/Core/Ui/Notification",["Language"],function(e){"use strict";var t=!1,i=null,n=null,a=null,r=null,o=null;return{show:function(s,l,c){t||(this._init(),i="function"==typeof l?l:null,n.className=c||"success",n.textContent=e.get(s||"wcf.global.success"),t=!0,a.classList.add("active"),r=setTimeout(o,2e3))},_init:function(){null===a&&(o=this._hide.bind(this),a=elCreate("div"),a.id="systemNotification",n=elCreate("p"),n.addEventListener(WCF_CLICK_EVENT,o),a.appendChild(n),document.body.appendChild(a))},_hide:function(){clearTimeout(r),a.classList.remove("active"),null!==i&&i(),t=!1}}}),define("prism/prism-meta",[],function(){return{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"},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"},asciidoc:{title:"AsciiDoc",file:"asciidoc"},aspnet:{title:"ASP.NET (C#)",file:"aspnet"},asm6502:{title:"6502 Assembly",file:"asm6502"},autohotkey:{title:"AutoHotkey",file:"autohotkey"},autoit:{title:"AutoIt",file:"autoit"},bash:{title:"Bash",file:"bash"},basic:{title:"BASIC",file:"basic"},batch:{title:"Batch",file:"batch"},bbcode:{title:"BBcode",file:"bbcode"},bison:{title:"Bison",file:"bison"},bnf:{title:"BNF",file:"bnf"},brainfuck:{title:"Brainfuck",file:"brainfuck"},brightscript:{title:"BrightScript",file:"brightscript"},bro:{title:"Bro",file:"bro"},c:{title:"C",file:"c"},csharp:{title:"C#",file:"csharp"},cpp:{title:"C++",file:"cpp"},cil:{title:"CIL",file:"cil"},clojure:{title:"Clojure",file:"clojure"},cmake:{title:"CMake",file:"cmake"},coffeescript:{title:"CoffeeScript",file:"coffeescript"},concurnas:{title:"Concurnas",file:"concurnas"},csp:{title:"Content-Security-Policy",file:"csp"},crystal:{title:"Crystal",file:"crystal"},"css-extras":{title:"CSS Extras",file:"css-extras"},cypher:{title:"Cypher",file:"cypher"},d:{title:"D",file:"d"},dart:{title:"Dart",file:"dart"},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"},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"},"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"},gcode:{title:"G-code",file:"gcode"},gdscript:{title:"GDScript",file:"gdscript"},gedcom:{title:"GEDCOM",file:"gedcom"},gherkin:{title:"Gherkin",file:"gherkin"},git:{title:"Git",file:"git"},glsl:{title:"GLSL",file:"glsl"},go:{title:"Go",file:"go"},graphql:{title:"GraphQL",file:"graphql"},groovy:{title:"Groovy",file:"groovy"},haml:{title:"Haml",file:"haml"},handlebars:{title:"Handlebars",file:"handlebars"},haskell:{title:"Haskell",file:"haskell"},haxe:{title:"Haxe",file:"haxe"},hcl:{title:"HCL",file:"hcl"},hlsl:{title:"HLSL",file:"hlsl"},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"},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"},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"},keyman:{title:"Keyman",file:"keyman"},kotlin:{title:"Kotlin",file:"kotlin"},kts:{title:"Kotlin Script",file:"kotlin"},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"},lolcode:{title:"LOLCODE",file:"lolcode"},lua:{title:"Lua",file:"lua"},makefile:{title:"Makefile",file:"makefile"},markdown:{title:"Markdown",file:"markdown"},"markup-templating":{title:"Markup templating",file:"markup-templating"},matlab:{title:"MATLAB",file:"matlab"},mel:{title:"MEL",file:"mel"},mizar:{title:"Mizar",file:"mizar"},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"},nasm:{title:"NASM",file:"nasm"},neon:{title:"NEON",file:"neon"},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"},opencl:{title:"OpenCL",file:"opencl"},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"},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"},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"},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"},python:{title:"Python",file:"python"},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"},jsx:{title:"React JSX",file:"jsx"},tsx:{title:"React TSX",file:"tsx"},reason:{title:"Reason",file:"reason"},regex:{title:"Regex",file:"regex"},renpy:{title:"Ren'py",file:"renpy"},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"},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"},iecst:{title:"Structured Text (IEC 61131-3)",file:"iecst"},stylus:{title:"Stylus",file:"stylus"},swift:{title:"Swift",file:"swift"},"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"},turtle:{title:"Turtle",file:"turtle"},twig:{title:"Twig",file:"twig"},typescript:{title:"TypeScript",file:"typescript"},unrealscript:{title:"UnrealScript",file:"unrealscript"},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"},wiki:{title:"Wiki markup",file:"wiki"},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/Bbcode/Code",["Language","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Clipboard","WoltLabSuite/Core/Prism","prism/prism-meta"],function(e,t,i,n,a){"use strict";function r(e){var t;this.container=e,this.codeContainer=elBySel(".codeBoxCode > code",this.container),this.language=null;for(var i=0;i<this.codeContainer.classList.length;i++)(t=this.codeContainer.classList[i].match(/language-(.*)/))&&(this.language=t[1])}var o=function(e){return function(){var t=arguments;return new Promise(function(i,n){var a=function(){try{i(e.apply(null,t))}catch(e){n(e)}};window.requestIdleCallback?window.requestIdleCallback(a,{timeout:5e3}):setTimeout(a,0)})}};return r.processAll=function(){elBySelAll(".codeBox:not([data-processed])",document,function(e){elData(e,"processed","1");var t=new r(e);t.language&&t.highlight(),t.createCopyButton()})},r.prototype={createCopyButton:function(){var n=elBySel(".codeBoxHeader",this.container),a=elCreate("span");a.className="icon icon24 fa-files-o pointer jsTooltip",a.setAttribute("title",e.get("wcf.message.bbcode.code.copy")),a.addEventListener("click",function(){i.copyElementTextToClipboard(this.codeContainer).then(function(){t.show(e.get("wcf.message.bbcode.code.copy.success"))})}.bind(this)),n.appendChild(a)},highlight:function(){return this.language?a[this.language]?(this.container.classList.add("highlighting"),require(["prism/components/prism-"+a[this.language].file]).then(o(function(){var e=n.languages[this.language]
 ;if(!e)throw new Error("Invalid language "+language+" given.");var t=elCreate("div");return t.innerHTML=n.highlight(this.codeContainer.textContent,e,this.language),t}.bind(this))).then(o(function(e){var t=n.wscSplitIntoLines(e),i=elBySelAll("[data-number]",t),a=elBySelAll(".codeBoxLine > span",this.codeContainer);if(i.length!==a.length)throw new Error("Unreachable");for(var r=[],s=0,l=i.length;s<l;s+=50)r.push(o(function(e){for(var t=Math.min(e+50,l),n=e;n<t;n++)a[n].parentNode.replaceChild(i[n],a[n])})(s));return Promise.all(r)}.bind(this))).then(function(){this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}.bind(this))):Promise.reject(new Error("Unknown language "+this.language)):Promise.reject(new Error("No language detected"))}},r}),define("WoltLabSuite/Core/Bbcode/Collapsible",[],function(){"use strict";var e=elByClass("jsCollapsibleBbcode");return{observe:function(){for(var t,i,n;e.length;)t=e[0],i=[],elBySelAll(".toggleButton:not(.jsToggleButtonEnabled)",t,function(e){e.closest(".jsCollapsibleBbcode")===t&&i.push(e)}),n=elBySel(".collapsibleBbcodeOverflow",t)||t,i.length>0&&function(e,t){var i=function(i){if(e.classList.toggle("collapsed")){if(t.forEach(function(e){e.classList.contains("icon")?(e.classList.remove("fa-compress"),e.classList.add("fa-expand"),e.title=elData(e,"title-expand")):e.textContent=elData(e,"title-expand")}),i instanceof Event){var n=e.getBoundingClientRect().top;if(n<0){var a=window.pageYOffset+(n-100);a<0&&(a=0),window.scrollTo(window.pageXOffset,a)}}}else t.forEach(function(e){e.classList.contains("icon")?(e.classList.add("fa-compress"),e.classList.remove("fa-expand"),e.title=elData(e,"title-collapse")):e.textContent=elData(e,"title-collapse")})};t.forEach(function(e){e.classList.add("jsToggleButtonEnabled"),e.addEventListener(WCF_CLICK_EVENT,i)}),0!==n.scrollTop&&(n.scrollTop=0,i()),n.addEventListener("scroll",function(){n.scrollTop=0,e.classList.contains("collapsed")&&i()})}(t,i),t.classList.remove("jsCollapsibleBbcode")}}}),define("WoltLabSuite/Core/Bbcode/Spoiler",["Language"],function(e){"use strict";var t=elByClass("jsSpoilerBox");return{observe:function(){for(var e,i;t.length;)e=t[0],e.classList.remove("jsSpoilerBox"),i=elBySel(".jsSpoilerToggle",e),e=i.parentNode.nextElementSibling,i.addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this,e,i))},_onClick:function(t,i,n){n.preventDefault(),i.classList.toggle("active");var a=i.classList.contains("active");window[a?"elShow":"elHide"](t),elAttr(i,"aria-expanded",a),elAttr(t,"aria-hidden",!a),elDataBool(i,"has-custom-label")||(i.textContent=e.get(i.classList.contains("active")?"wcf.bbcode.spoiler.hide":"wcf.bbcode.spoiler.show"))}}}),define("WoltLabSuite/Core/Controller/Captcha",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,i){if(t.has(e))throw new Error("Captcha with id '"+e+"' is already registered.");if("function"!=typeof i)throw new TypeError("Expected a valid callback for parameter 'callback'.");t.set(e,i)},delete:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");t.delete(e)},has:function(e){return t.has(e)},getData:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");return t.get(e)()}}}),define("WoltLabSuite/Core/Controller/Clipboard",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Page/Action","Ui/Screen"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,f){"use strict";var p=new i,m=new i,g=new i,v=elByClass("jsClipboardContainer"),_=new o,b=new r,w={},y=new i,C=null,E=null,L=null,S='.messageCheckboxLabel > input[type="checkbox"], .message .messageClipboardCheckbox > input[type="checkbox"], .messageGroupList .columnMark > label > input[type="checkbox"]';return{setup:function(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");if(null===C)C=this._mark.bind(this),E=this._executeAction.bind(this),L=this._unmarkAll.bind(this),w=t.extend({hasMarkedItems:!1,pageClassNames:[e.pageClassName],pageObjectId:0},e),delete w.pageClassName;else{if(e.pageObjectId)throw new Error("Cannot load secondary clipboard with page object id set.");w.pageClassNames.push(e.pageClassName)}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector),this._initContainers(),w.hasMarkedItems&&v.length&&this._loadMarkedItems(),s.add("WoltLabSuite/Core/Controller/Clipboard",this._initContainers.bind(this))},reload:function(){p.size&&this._loadMarkedItems()},_initContainers:function(){for(var e=0,t=v.length;e<t;e++){var i=v[e],n=c.identify(i),o=p.get(n);if(void 0===o){var s=elBySel(".jsClipboardMarkAll",i);if(null!==s){if(s.matches(S)){var l=s.closest("label");elAttr(l,"role","checkbox"),elAttr(l,"tabindex","0"),elAttr(l,"aria-checked",!1),elAttr(l,"aria-label",a.get("wcf.clipboard.item.markAll")),l.addEventListener("keyup",function(e){13!==e.keyCode&&32!==e.keyCode||h.click()})}elData(s,"container-id",n),s.addEventListener(WCF_CLICK_EVENT,this._markAll.bind(this))}o={checkboxes:elByClass("jsClipboardItem",i),element:i,markAll:s,markedObjectIds:new r},p.set(n,o)}for(var d=0,u=o.checkboxes.length;d<u;d++){var h=o.checkboxes[d];b.has(h)||(elData(h,"container-id",n),function(e){if(e.matches(S)){var t=e.closest("label");elAttr(t,"role","checkbox"),elAttr(t,"tabindex","0"),elAttr(t,"aria-checked",!1),elAttr(t,"aria-label",a.get("wcf.clipboard.item.mark")),t.addEventListener("keyup",function(t){13!==t.keyCode&&32!==t.keyCode||e.click()})}null===e.closest("a")?e.addEventListener(WCF_CLICK_EVENT,C):e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),window.setTimeout(function(){e.checked=!e.checked,C(null,e)},10)})}(h),b.add(h))}}},_loadMarkedItems:function(){e.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:w.pageClassNames,pageObjectID:w.pageObjectId}})},_markAll:function(e){var t=e.currentTarget,i="INPUT"!==t.nodeName||t.checked;"checkbox"===elAttr(t.parentNode,"role")&&elAttr(t.parentNode,"aria-checked",i);for(var n=[],a=elData(t,"container-id"),r=p.get(a),o=elData(r.element,"type"),s=0,c=r.checkboxes.length;s<c;s++){var d=r.checkboxes[s],u=~~elData(d,"object-id");i?d.checked||(d.checked=!0,r.markedObjectIds.add(u),n.push(u)):d.checked&&(d.checked=!1,r.markedObjectIds.delete(u),n.push(u)),"checkbox"===elAttr(d.parentNode,"role")&&elAttr(d.parentNode,"aria-checked",i);var h=l.parentByClass(t,"jsClipboardObject");null!==h&&h.classList[i?"addClass":"removeClass"]("jsMarked")}this._saveState(o,n,i)},_mark:function(e,t){t=e instanceof Event?e.currentTarget:t;var i=~~elData(t,"object-id"),n=t.checked,a=elData(t,"container-id"),r=p.get(a),o=elData(r.element,"type"),s=l.parentByClass(t,"jsClipboardObject");if(r.markedObjectIds[n?"add":"delete"](i),s.classList[n?"add":"remove"]("jsMarked"),null!==r.markAll){for(var c=!0,d=0,u=r.checkboxes.length;d<u;d++)if(!r.checkboxes[d].checked){c=!1;break}r.markAll.checked=c,"checkbox"===elAttr(r.markAll.parentNode,"role")&&elAttr(r.markAll.parentNode,"aria-checked",n)}"checkbox"===elAttr(t.parentNode,"role")&&elAttr(t.parentNode,"aria-checked",t.checked),this._saveState(o,[i],n)},_saveState:function(t,i,n){e.api(this,{actionName:n?"mark":"unmark",parameters:{pageClassNames:w.pageClassNames,pageObjectID:w.pageObjectId,objectIDs:i,objectType:t}})},_executeAction:function(e){var t=e.currentTarget,i=_.get(t);if(i.url)return void(window.location.href=i.url);var a=function(){var e=elData(t,"type");n.fire("com.woltlab.wcf.clipboard",e,{data:i,listItem:t,responseData:null})},r="string"==typeof i.internalData.confirmMessage?i.internalData.confirmMessage:"",o=!0;if("object"==typeof i.parameters&&i.parameters.actionName&&i.parameters.className){if("unmarkAll"===i.parameters.actionName||Array.isArray(i.parameters.objectIDs))if(r.length){var s="string"==typeof i.internalData.template?i.internalData.template:"";d.show({confirm:function(){var e={};if(s.length)for(var n=elBySelAll("input, select, textarea",d.getContentElement()),a=0,r=n.length;a<r;a++){var o=n[a],l=elAttr(o,"name");switch(o.nodeName){case"INPUT":("checkbox"!==o.type&&"radio"!==o.type||o.checked)&&(e[l]=elAttr(o,"value"));break;case"SELECT":e[l]=o.value;break;case"TEXTAREA":e[l]=o.value.trim()}}this._executeProxyAction(t,i,e)}.bind(this),message:r,template:s})}else this._executeProxyAction(t,i)}else r.length&&(o=!1,d.show({confirm:a,message:r}));o&&a()},_executeProxyAction:function(t,i,a){a=a||{};var r="unmarkAll"!==i.parameters.actionName?i.parameters.objectIDs:[],o={data:a};if("object"==typeof i.internalData.parameters)for(var s in i.internalData.parameters)i.internalData.parameters.hasOwnProperty(s)&&(o[s]=i.internalData.parameters[s]);e.api(this,{actionName:i.parameters.actionName,className:i.parameters.className,objectIDs:r,parameters:o},function(e){if("unmarkAll"!==i.actionName){var a=elData(t,"type");if(n.fire("com.woltlab.wcf.clipboard",a,{data:i,listItem:t,responseData:e}),y.has(a)&&-1!==y.get(a).indexOf(e.actionName))return void window.location.reload()}this._loadMarkedItems()}.bind(this))},_unmarkAll:function(t){var i=elData(t.currentTarget,"type");e.api(this,{actionName:"unmarkAll",parameters:{objectType:i}})},_ajaxSetup:function(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}},_ajaxSuccess:function(e){if("unmarkAll"===e.actionName)return void p.forEach(function(t){if(elData(t.element,"type")===e.returnValues.objectType){for(var i=elByClass("jsMarked",t.element);i.length;)i[0].classList.remove("jsMarked");null!==t.markAll&&(t.markAll.checked=!1,"checkbox"===elAttr(t.markAll.parentNode,"role")&&elAttr(t.markAll.parentNode,"aria-checked",!1));for(var n=0,a=t.checkboxes.length;n<a;n++)t.checkboxes[n].checked=!1,"checkbox"===elAttr(t.checkboxes[n].parentNode,"role")&&elAttr(t.checkboxes[n].parentNode,"aria-checked",!1);h.remove("wcfClipboard-"+e.returnValues.objectType)}}.bind(this));_=new o,y=new i,p.forEach(function(t){var i=elData(t.element,"type"),n=e.returnValues.markedItems&&e.returnValues.markedItems.hasOwnProperty(i)?e.returnValues.markedItems[i]:[];this._rebuildMarkings(t,n)}.bind(this));var t,n=[];if(e.returnValues&&e.returnValues.items)for(t in e.returnValues.items)e.returnValues.items.hasOwnProperty(t)&&n.push(t);if(m.forEach(function(e,t){-1===n.indexOf(t)&&(h.remove("wcfClipboard-"+t),g.get(t).innerHTML="")}),e.returnValues&&e.returnValues.items){var r,s,l,c,d,f,v,b,w,C,S;for(t in e.returnValues.items)if(e.returnValues.items.hasOwnProperty(t)){d=e.returnValues.items[t],y.set(t,d.reloadPageOnSuccess),s=!1,c=m.get(t),l=g.get(t),void 0===c?(s=!0,c=elCreate("a"),c.className="dropdownToggle",c.textContent=d.label,m.set(t,c),l=elCreate("ol"),l.className="dropdownMenu",g.set(t,l)):(c.textContent=d.label,l.innerHTML="");for(w in d.items)d.items.hasOwnProperty(w)&&(b=d.items[w],v=elCreate("li"),C=elCreate("span"),C.textContent=b.label,v.appendChild(C),l.appendChild(v),elData(v,"type",t),v.addEventListener(WCF_CLICK_EVENT,E),_.set(v,b));f=elCreate("li"),f.classList.add("dropdownDivider"),l.appendChild(f),S=elCreate("li"),elData(S,"type",t),C=elCreate("span"),C.textContent=a.get("wcf.clipboard.item.unmarkAll"),S.appendChild(C),S.addEventListener(WCF_CLICK_EVENT,L),l.appendChild(S),-1!==n.indexOf(t)&&(r="wcfClipboard-"+t,h.has(r)?h.show(r):h.add(r,c)),s&&(c.parentNode.classList.add("dropdown"),c.parentNode.appendChild(l),u.init(c))}}},_rebuildMarkings:function(e,t){for(var i=!0,n=0,a=e.checkboxes.length;n<a;n++){var r=e.checkboxes[n],o=l.parentByClass(r,"jsClipboardObject"),s=-1!==t.indexOf(~~elData(r,"object-id"));s||(i=!1),r.checked=s,o.classList[s?"add":"remove"]("jsMarked"),"checkbox"===elAttr(r.parentNode,"role")&&elAttr(r.parentNode,"aria-checked",s)}if(null!==e.markAll){e.markAll.checked=i,"checkbox"===elAttr(e.markAll.parentNode,"role")&&elAttr(e.markAll.parentNode,"aria-checked",i);for(var c=e.markAll;c=c.parentNode;)if(c instanceof Element&&c.classList.contains("columnMark")){c=c.parentNode;break}c&&c.classList[i?"add":"remove"]("jsMarked")}},hideEditor:function(e){h.remove("wcfClipboard-"+e),f.pageOverlayOpen()},showEditor:function(){this._loadMarkedItems(),f.pageOverlayClose()},unmark:function(e,t){this._saveState(e,t,!1)}}}),define("WoltLabSuite/Core/Image/ExifUtil",[],function(){"use strict";var e={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};return{getExifBytesFromJpeg:function(t){return new Promise(function(i,n){if(!(t instanceof Blob||t instanceof File))return n(new TypeError("The argument must be a Blob or a File"));var a=new FileReader;a.addEventListener("error",function(){a.abort(),n(a.error)}),a.addEventListener("load",function(){var t=a.result,r=new Uint8Array(t),o=new Uint8Array;if(255!==r[0]&&r[1]!==e.SOI)return n(new Error("Not a JPEG"));for(var s=2;s<r.length&&255===r[s];){var l=2+(r[s+2]<<8|r[s+3]);if(r[s+1]===e.APP1){for(var c="",d=s+4;0!==r[d]&&d<r.length;d++)c+=String.fromCharCode(r[d]);if("Exif"===c||"http://ns.adobe.com/xap/1.0/"===c){var u=Array.prototype.slice.call(r,s,l+s),h=new Uint8Array(o.length+u.length);h.set(o),h.set(u,o.length),o=h}}s+=l}i(o)}),a.readAsArrayBuffer(t)})},removeExifData:function(t){return new Promise(function(i,n){if(!(t instanceof Blob||t instanceof File))return n(new TypeError("The argument must be a Blob or a File"));var a=new FileReader;a.addEventListener("error",function(){a.abort(),n(a.error)}),a.addEventListener("load",function(){var r=a.result,o=new Uint8Array(r);if(255!==o[0]&&o[1]!==e.SOI)return n(new Error("Not a JPEG"));for(var s=2;s<o.length&&255===o[s];){var l=2+(o[s+2]<<8|o[s+3]);if(o[s+1]===e.APP1){for(var c="",d=s+4;0!==o[d]&&d<o.length;d++)c+=String.fromCharCode(o[d]);if("Exif"===c||"http://ns.adobe.com/xap/1.0/"===c){var u=Array.prototype.slice.call(o,0,s),h=Array.prototype.slice.call(o,s+l);o=new Uint8Array(u.length+h.length),o.set(u,0),o.set(h,u.length)}}else s+=l}i(new Blob([o],{type:t.type}))}),a.readAsArrayBuffer(t)})},setExifData:function(t,i){return this.removeExifData(t).then(function(t){return new Promise(function(n){var a=new FileReader;a.addEventListener("error",function(){a.abort(),reject(a.error)}),a.addEventListener("load",function(){var r=a.result,o=new Uint8Array(r),s=2;255===o[2]&&o[3]===e.APP0&&(s+=2+(o[4]<<8|o[5]));var l=Array.prototype.slice.call(o,0,s),c=Array.prototype.slice.call(o,s);o=new Uint8Array(l.length+i.length+c.length),o.set(l),o.set(i,s),o.set(c,s+i.length),n(new Blob([o],{type:t.type}))}),a.readAsArrayBuffer(t)})})}}}),define("WoltLabSuite/Core/Image/ImageUtil",[],function(){"use strict";return{containsTransparentPixels:function(e){for(var t=e.getContext("2d").getImageData(0,0,e.width,e.height),i=3,n=t.data.length;i<n;i+=4)if(255!==t.data[i])return!0;return!1}}}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("Pica",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.pica=e()}}(function(){return function(){function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){return a(t[o][1][e]||e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}return e}()({1:[function(e,t,i){"use strict";function n(e){var t=e||[],i={js:t.indexOf("js")>=0,wasm:t.indexOf("wasm")>=0};r.call(this,i),this.features={js:i.js,wasm:i.wasm&&this.has_wasm()},this.use(o),this.use(s)}var a=e("inherits"),r=e("multimath"),o=e("multimath/lib/unsharp_mask"),s=e("./mm_resize");a(n,r),n.prototype.resizeAndUnsharp=function(e,t){var i=this.resize(e,t);return e.unsharpAmount&&this.unsharp_mask(i,e.toWidth,e.toHeight,e.unsharpAmount,e.unsharpRadius,e.unsharpThreshold),i},t.exports=n},{"./mm_resize":4,inherits:15,multimath:16,"multimath/lib/unsharp_mask":19}],2:[function(e,t,i){"use strict";function n(e){return e<0?0:e>255?255:e}function a(e,t,i,a,r,o){var s,l,c,d,u,h,f,p,m,g,v,_=0,b=0;for(m=0;m<a;m++){for(u=0,g=0;g<r;g++){for(h=o[u++],f=o[u++],p=_+4*h|0,s=l=c=d=0;f>0;f--)v=o[u++],d=d+v*e[p+3]|0,c=c+v*e[p+2]|0,l=l+v*e[p+1]|0,s=s+v*e[p]|0,p=p+4|0;t[b+3]=n(d+8192>>14),t[b+2]=n(c+8192>>14),t[b+1]=n(l+8192>>14),t[b]=n(s+8192>>14),b=b+4*a|0}b=4*(m+1)|0,_=(m+1)*i*4|0}}function r(e,t,i,a,r,o){var s,l,c,d,u,h,f,p,m,g,v,_=0,b=0;for(m=0;m<a;m++){for(u=0,g=0;g<r;g++){for(h=o[u++],f=o[u++],p=_+4*h|0,s=l=c=d=0;f>0;f--)v=o[u++],d=d+v*e[p+3]|0,c=c+v*e[p+2]|0,l=l+v*e[p+1]|0,s=s+v*e[p]|0,p=p+4|0;t[b+3]=n(d+8192>>14),t[b+2]=n(c+8192>>14),t[b+1]=n(l+8192>>14),t[b]=n(s+8192>>14),b=b+4*a|0}b=4*(m+1)|0,_=(m+1)*i*4|0}}t.exports={convolveHorizontally:a,convolveVertically:r}},{}],3:[function(e,t,i){"use strict";t.exports="AGFzbQEAAAABFAJgBn9/f39/fwBgB39/f39/f38AAg8BA2VudgZtZW1vcnkCAAEDAwIAAQQEAXAAAAcZAghjb252b2x2ZQAACmNvbnZvbHZlSFYAAQkBAArmAwLBAwEQfwJAIANFDQAgBEUNACAFQQRqIRVBACEMQQAhDQNAIA0hDkEAIRFBACEHA0AgB0ECaiESAn8gBSAHQQF0IgdqIgZBAmouAQAiEwRAQQAhCEEAIBNrIRQgFSAHaiEPIAAgDCAGLgEAakECdGohEEEAIQlBACEKQQAhCwNAIBAoAgAiB0EYdiAPLgEAIgZsIAtqIQsgB0H/AXEgBmwgCGohCCAHQRB2Qf8BcSAGbCAKaiEKIAdBCHZB/wFxIAZsIAlqIQkgD0ECaiEPIBBBBGohECAUQQFqIhQNAAsgEiATagwBC0EAIQtBACEKQQAhCUEAIQggEgshByABIA5BAnRqIApBgMAAakEOdSIGQf8BIAZB/wFIG0EQdEGAgPwHcUEAIAZBAEobIAtBgMAAakEOdSIGQf8BIAZB/wFIG0EYdEEAIAZBAEobciAJQYDAAGpBDnUiBkH/ASAGQf8BSBtBCHRBgP4DcUEAIAZBAEobciAIQYDAAGpBDnUiBkH/ASAGQf8BSBtB/wFxQQAgBkEAShtyNgIAIA4gA2ohDiARQQFqIhEgBEcNAAsgDCACaiEMIA1BAWoiDSADRw0ACwsLIQACQEEAIAIgAyAEIAUgABAAIAJBACAEIAUgBiABEAALCw=="},{}],4:[function(e,t,i){"use strict";t.exports={name:"resize",fn:e("./resize"),wasm_fn:e("./resize_wasm"),wasm_src:e("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(e,t,i){"use strict";function n(e,t,i){for(var n=3,a=t*i*4|0;n<a;)e[n]=255,n=n+4|0}var a=e("./resize_filter_gen"),r=e("./convolve").convolveHorizontally,o=e("./convolve").convolveVertically;t.exports=function(e){var t=e.src,i=e.width,s=e.height,l=e.toWidth,c=e.toHeight,d=e.scaleX||e.toWidth/e.width,u=e.scaleY||e.toHeight/e.height,h=e.offsetX||0,f=e.offsetY||0,p=e.dest||new Uint8Array(l*c*4),m=void 0===e.quality?3:e.quality,g=e.alpha||!1,v=a(m,i,l,d,h),_=a(m,s,c,u,f),b=new Uint8Array(l*s*4);return r(t,b,i,s,l,v),o(b,p,s,l,c,_),g||n(p,l,c),p}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(e,t,i){"use strict";function n(e){return Math.round(e*((1<<r)-1))}var a=e("./resize_filter_info"),r=14;t.exports=function(e,t,i,r,o){var s,l,c,d,u,h,f,p,m,g,v,_,b,w,y,C,E,L=a[e].filter,S=1/r,A=Math.min(1,r),I=a[e].win/A,D=Math.floor(2*(I+1)),x=new Int16Array((D+2)*i),T=0,B=!x.subarray||!x.set;for(s=0;s<i;s++){for(l=(s+.5)*S+o,c=Math.max(0,Math.floor(l-I)),d=Math.min(t-1,Math.ceil(l+I)),u=d-c+1,h=new Float32Array(u),f=new Int16Array(u),p=0,m=c,g=0;m<=d;m++,g++)v=L((m+.5-l)*A),p+=v,h[g]=v;for(_=0,g=0;g<h.length;g++)b=h[g]/p,_+=b,f[g]=n(b);for(f[i>>1]+=n(1-_),w=0;w<f.length&&0===f[w];)w++;if(w<f.length){for(y=f.length-1;y>0&&0===f[y];)y--;if(C=c+w,E=y-w+1,x[T++]=C,x[T++]=E,B)for(g=w;g<=y;g++)x[T++]=f[g];else x.set(f.subarray(w,y+1),T),T+=E}else x[T++]=0,x[T++]=0}return x}},{"./resize_filter_info":7}],7:[function(e,t,i){"use strict";t.exports=[{win:.5,filter:function(e){return e>=-.5&&e<.5?1:0}},{win:1,filter:function(e){if(e<=-1||e>=1)return 0;if(e>-1.1920929e-7&&e<1.1920929e-7)return 1;var t=e*Math.PI;return Math.sin(t)/t*(.54+.46*Math.cos(t/1))}},{win:2,filter:function(e){if(e<=-2||e>=2)return 0;if(e>-1.1920929e-7&&e<1.1920929e-7)return 1;var t=e*Math.PI;return Math.sin(t)/t*Math.sin(t/2)/(t/2)}},{win:3,filter:function(e){if(e<=-3||e>=3)return 0;if(e>-1.1920929e-7&&e<1.1920929e-7)return 1;var t=e*Math.PI;return Math.sin(t)/t*Math.sin(t/3)/(t/3)}}]},{}],8:[function(e,t,i){"use strict";function n(e,t,i){for(var n=3,a=t*i*4|0;n<a;)e[n]=255,n=n+4|0}function a(e){return new Uint8Array(e.buffer,0,e.byteLength)}function r(e,t,i){if(s)return void t.set(a(e),i);for(var n=i,r=0;r<e.length;r++){var o=e[r];t[n++]=255&o,t[n++]=o>>8&255}}var o=e("./resize_filter_gen"),s=!0;try{s=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(e){}t.exports=function(e){var t=e.src,i=e.width,a=e.height,s=e.toWidth,l=e.toHeight,c=e.scaleX||e.toWidth/e.width,d=e.scaleY||e.toHeight/e.height,u=e.offsetX||0,h=e.offsetY||0,f=e.dest||new Uint8Array(s*l*4),p=void 0===e.quality?3:e.quality,m=e.alpha||!1,g=o(p,i,s,c,u),v=o(p,a,l,d,h),_=this.__align(0+Math.max(t.byteLength,f.byteLength)),b=this.__align(_+a*s*4),w=this.__align(b+g.byteLength),y=w+v.byteLength,C=this.__instance("resize",y),E=new Uint8Array(this.__memory.buffer),L=new Uint32Array(this.__memory.buffer),S=new Uint32Array(t.buffer);return L.set(S),r(g,E,b),r(v,E,w),(C.exports.convolveHV||C.exports._convolveHV)(b,w,_,i,a,s,l),new Uint32Array(f.buffer).set(new Uint32Array(this.__memory.buffer,0,l*s)),m||n(f,s,l),f}},{"./resize_filter_gen":6}],9:[function(e,t,i){"use strict";function n(e,t){this.create=e,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=t||2e3}n.prototype.acquire=function(){var e,t=this;return 0!==this.available.length?e=this.available.pop():(e=this.create(),e.id=this.lastId++,e.release=function(){return t.release(e)}),this.acquired[e.id]=e,e},n.prototype.release=function(e){var t=this;delete this.acquired[e.id],e.lastUsed=Date.now(),this.available.push(e),0===this.timeoutId&&(this.timeoutId=setTimeout(function(){return t.gc()},100))},n.prototype.gc=function(){var e=this,t=Date.now();this.available=this.available.filter(function(i){return!(t-i.lastUsed>e.idle)||(i.destroy(),!1)}),0!==this.available.length?this.timeoutId=setTimeout(function(){return e.gc()},100):this.timeoutId=0},t.exports=n},{}],10:[function(e,t,i){"use strict";t.exports=function(e,t,i,n,a,r){var o=i/e,s=n/t,l=(2*r+2+1)/a;if(l>.5)return[[i,n]];var c=Math.ceil(Math.log(Math.min(o,s))/Math.log(l));if(c<=1)return[[i,n]];for(var d=[],u=0;u<c;u++){var h=Math.round(Math.pow(Math.pow(e,c-u-1)*Math.pow(i,u+1),1/c)),f=Math.round(Math.pow(Math.pow(t,c-u-1)*Math.pow(n,u+1),1/c));d.push([h,f])}return d}},{}],11:[function(e,t,i){"use strict";function n(e){var t=Math.round(e);return Math.abs(e-t)<r?t:Math.floor(e)}function a(e){var t=Math.round(e);return Math.abs(e-t)<r?t:Math.ceil(e)}var r=1e-5;t.exports=function(e){var t=e.toWidth/e.width,i=e.toHeight/e.height,r=n(e.srcTileSize*t)-2*e.destTileBorder,o=n(e.srcTileSize*i)-2*e.destTileBorder;if(r<1||o<1)throw new Error("Internal error in pica: target tile width/height is too small.");var s,l,c,d,u,h,f,p=[];for(d=0;d<e.toHeight;d+=o)for(c=0;c<e.toWidth;c+=r)s=c-e.destTileBorder,s<0&&(s=0),u=c+r+e.destTileBorder-s,s+u>=e.toWidth&&(u=e.toWidth-s),l=d-e.destTileBorder,l<0&&(l=0),h=d+o+e.destTileBorder-l,l+h>=e.toHeight&&(h=e.toHeight-l),f={toX:s,toY:l,toWidth:u,toHeight:h,toInnerX:c,toInnerY:d,toInnerWidth:r,toInnerHeight:o,offsetX:s/t-n(s/t),offsetY:l/i-n(l/i),scaleX:t,scaleY:i,x:n(s/t),y:n(l/i),width:a(u/t),height:a(h/i)},p.push(f);return p}},{}],12:[function(e,t,i){"use strict";function n(e){return Object.prototype.toString.call(e)}t.exports.isCanvas=function(e){var t=n(e);return"[object HTMLCanvasElement]"===t||"[object Canvas]"===t},t.exports.isImage=function(e){return"[object HTMLImageElement]"===n(e)},t.exports.limiter=function(e){function t(){i<e&&n.length&&(i++,n.shift()())}var i=0,n=[];return function(e){return new Promise(function(a,r){n.push(function(){e().then(function(e){a(e),i--,t()},function(e){r(e),i--,t()})}),t()})}},t.exports.cib_quality_name=function(e){switch(e){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},t.exports.cib_support=function(){return Promise.resolve().then(function(){if("undefined"==typeof createImageBitmap||"undefined"==typeof document)return!1;var e=document.createElement("canvas");return e.width=100,e.height=100,createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then(function(t){var i=10===t.width;return t.close(),e=null,i})}).catch(function(){return!1})}},{}],13:[function(e,t,i){"use strict";t.exports=function(){var t,i=e("./mathlib");onmessage=function(e){var n=e.data.opts;t||(t=new i(e.data.features));var a=t.resizeAndUnsharp(n);postMessage({result:a},[a.buffer])}}},{"./mathlib":1}],14:[function(e,t,i){function n(e){e<.5&&(e=.5);var t=Math.exp(.527076)/e,i=Math.exp(-t),n=Math.exp(-2*t),a=(1-i)*(1-i)/(1+2*t*i-n);return o=a,s=a*(t-1)*i,l=a*(t+1)*i,c=-a*n,d=2*i,u=-n,h=(o+s)/(1-d-u),f=(l+c)/(1-d-u),new Float32Array([o,s,l,c,d,u,h,f])}function a(e,t,i,n,a,r){var o,s,l,c,d,u,h,f,p,m,g,v,_,b;for(p=0;p<r;p++){for(u=p*a,h=p,f=0,o=e[u],d=o*n[6],c=d,g=n[0],v=n[1],_=n[4],b=n[5],m=0;m<a;m++)s=e[u],l=s*g+o*v+c*_+d*b,d=c,c=l,o=s,i[f]=c,f++,u++;for(u--,f--,h+=r*(a-1),o=e[u],d=o*n[7],c=d,s=o,g=n[2],v=n[3],m=a-1;m>=0;m--)l=s*g+o*v+c*_+d*b,d=c,c=l,o=s,s=e[u],t[h]=i[f]+c,u--,f--,h-=r}}function r(e,t,i,r){if(r){var o=new Uint16Array(e.length),s=new Float32Array(Math.max(t,i)),l=n(r);a(e,o,s,l,t,i,r),a(o,e,s,l,i,t,r)}}var o,s,l,c,d,u,h,f;t.exports=r},{}],15:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],16:[function(e,t,i){"use strict";function n(e){if(!(this instanceof n))return new n(e);var t=a({},s,e||{});if(this.options=t,this.__cache={},this.__init_promise=null,this.__modules=t.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}var a=e("object-assign"),r=e("./lib/base64decode"),o=e("./lib/wa_detect"),s={js:!0,wasm:!0};n.prototype.has_wasm=o,n.prototype.use=function(e){return this.__modules[e.name]=e,this.options.wasm&&this.has_wasm()&&e.wasm_fn?this[e.name]=e.wasm_fn:this[e.name]=e.fn,this},n.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var e=this;return this.__init_promise=Promise.all(Object.keys(e.__modules).map(function(t){var i=e.__modules[t];return e.options.wasm&&e.has_wasm()&&i.wasm_fn?e.__wasm[t]?null:WebAssembly.compile(e.__base64decode(i.wasm_src)).then(function(i){e.__wasm[t]=i}):null})).then(function(){return e}),this.__init_promise},n.prototype.__base64decode=r,n.prototype.__reallocate=function(e){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(e/65536)}),this.__memory;var t=this.__memory.buffer.byteLength;return t<e&&this.__memory.grow(Math.ceil((e-t)/65536)),this.__memory},n.prototype.__instance=function(e,t,i){if(t&&this.__reallocate(t),!this.__wasm[e]){var n=this.__modules[e];this.__wasm[e]=new WebAssembly.Module(this.__base64decode(n.wasm_src))}if(!this.__cache[e]){var r={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[e]=new WebAssembly.Instance(this.__wasm[e],{env:a(r,i||{})})}return this.__cache[e]},n.prototype.__align=function(e,t){t=t||8;var i=e%t;return e+(i?t-i:0)},t.exports=n},{"./lib/base64decode":17,"./lib/wa_detect":23,"object-assign":24}],17:[function(e,t,i){"use strict";t.exports=function(e){for(var t=e.replace(/[\r\n=]/g,""),i=t.length,n=new Uint8Array(3*i>>2),a=0,r=0,o=0;o<i;o++)o%4==0&&o&&(n[r++]=a>>16&255,n[r++]=a>>8&255,n[r++]=255&a),a=a<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(t.charAt(o));var s=i%4*6;return 0===s?(n[r++]=a>>16&255,n[r++]=a>>8&255,n[r++]=255&a):18===s?(n[r++]=a>>10&255,n[r++]=a>>2&255):12===s&&(n[r++]=a>>4&255),n}},{}],18:[function(e,t,i){"use strict";t.exports=function(e,t,i){for(var n,a,r,o,s,l=t*i,c=new Uint16Array(l),d=0;d<l;d++)n=e[4*d],a=e[4*d+1],r=e[4*d+2],s=n>=a&&n>=r?n:a>=r&&a>=n?a:r,o=n<=a&&n<=r?n:a<=r&&a<=n?a:r,c[d]=257*(s+o)>>1;return c}},{}],19:[function(e,t,i){"use strict";t.exports={name:"unsharp_mask",fn:e("./unsharp_mask"),wasm_fn:e("./unsharp_mask_wasm"),wasm_src:e("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":20,"./unsharp_mask_wasm":21,"./unsharp_mask_wasm_base64":22}],20:[function(e,t,i){"use strict";var n=e("glur/mono16"),a=e("./hsl_l16");t.exports=function(e,t,i,r,o,s){var l,c,d,u,h,f,p,m,g,v,_,b,w;if(!(0===r||o<.5)){o>2&&(o=2);var y=a(e,t,i),C=new Uint16Array(y);n(C,t,i,o);for(var E=r/100*4096+.5|0,L=257*s|0,S=t*i,A=0;A<S;A++)b=2*(y[A]-C[A]),Math.abs(b)>=L&&(w=4*A,l=e[w],c=e[w+1],d=e[w+2],m=l>=c&&l>=d?l:c>=l&&c>=d?c:d,p=l<=c&&l<=d?l:c<=l&&c<=d?c:d,f=257*(m+p)>>1,p===m?u=h=0:(h=f<=32767?4095*(m-p)/(m+p)|0:4095*(m-p)/(510-m-p)|0,u=l===m?65535*(c-d)/(6*(m-p))|0:c===m?21845+(65535*(d-l)/(6*(m-p))|0):43690+(65535*(l-c)/(6*(m-p))|0)),f+=E*b+2048>>12,f>65535?f=65535:f<0&&(f=0),0===h?l=c=d=f>>8:(v=f<=32767?f*(4096+h)+2048>>12:f+((65535-f)*h+2048>>12),g=2*f-v>>8,v>>=8,_=u+21845&65535,l=_>=43690?g:_>=32767?g+(6*(v-g)*(43690-_)+32768>>16):_>=10922?v:g+(6*(v-g)*_+32768>>16),_=65535&u,c=_>=43690?g:_>=32767?g+(6*(v-g)*(43690-_)+32768>>16):_>=10922?v:g+(6*(v-g)*_+32768>>16),_=u-21845&65535,d=_>=43690?g:_>=32767?g+(6*(v-g)*(43690-_)+32768>>16):_>=10922?v:g+(6*(v-g)*_+32768>>16)),e[w]=l,e[w+1]=c,e[w+2]=d)}}},{"./hsl_l16":18,"glur/mono16":14}],21:[function(e,t,i){"use strict";t.exports=function(e,t,i,n,a,r){if(!(0===n||a<.5)){a>2&&(a=2);var o=t*i,s=4*o,l=2*o,c=2*o,d=4*Math.max(t,i),u=s,h=u+l,f=h+c,p=f+c,m=p+d,g=this.__instance("unsharp_mask",s+l+2*c+d+32,{exp:Math.exp}),v=new Uint32Array(e.buffer);new Uint32Array(this.__memory.buffer).set(v);var _=g.exports.hsl_l16||g.exports._hsl_l16;_(0,u,t,i),_=g.exports.blurMono16||g.exports._blurMono16,_(u,h,f,p,m,t,i,a),_=g.exports.unsharp||g.exports._unsharp,_(0,0,u,h,t,i,n,r),v.set(new Uint32Array(this.__memory.buffer,0,o))}}},{}],22:[function(e,t,i){"use strict"
 ;t.exports="AGFzbQEAAAABMQZgAXwBfGACfX8AYAZ/f39/f38AYAh/f39/f39/fQBgBH9/f38AYAh/f39/f39/fwACGQIDZW52A2V4cAAAA2VudgZtZW1vcnkCAAEDBgUBAgMEBQQEAXAAAAdMBRZfX2J1aWxkX2dhdXNzaWFuX2NvZWZzAAEOX19nYXVzczE2X2xpbmUAAgpibHVyTW9ubzE2AAMHaHNsX2wxNgAEB3Vuc2hhcnAABQkBAAqJEAXZAQEGfAJAIAFE24a6Q4Ia+z8gALujIgOaEAAiBCAEoCIGtjgCECABIANEAAAAAAAAAMCiEAAiBbaMOAIUIAFEAAAAAAAA8D8gBKEiAiACoiAEIAMgA6CiRAAAAAAAAPA/oCAFoaMiArY4AgAgASAEIANEAAAAAAAA8L+gIAKioiIHtjgCBCABIAQgA0QAAAAAAADwP6AgAqKiIgO2OAIIIAEgBSACoiIEtow4AgwgASACIAegIAVEAAAAAAAA8D8gBqGgIgKjtjgCGCABIAMgBKEgAqO2OAIcCwu3AwMDfwR9CHwCQCADKgIUIQkgAyoCECEKIAMqAgwhCyADKgIIIQwCQCAEQX9qIgdBAEgiCA0AIAIgAC8BALgiDSADKgIYu6IiDiAJuyIQoiAOIAq7IhGiIA0gAyoCBLsiEqIgAyoCALsiEyANoqCgoCIPtjgCACACQQRqIQIgAEECaiEAIAdFDQAgBCEGA0AgAiAOIBCiIA8iDiARoiANIBKiIBMgAC8BALgiDaKgoKAiD7Y4AgAgAkEEaiECIABBAmohACAGQX9qIgZBAUoNAAsLAkAgCA0AIAEgByAFbEEBdGogAEF+ai8BACIIuCINIAu7IhGiIA0gDLsiEqKgIA0gAyoCHLuiIg4gCrsiE6KgIA4gCbsiFKKgIg8gAkF8aioCALugqzsBACAHRQ0AIAJBeGohAiAAQXxqIQBBACAFQQF0ayEHIAEgBSAEQQF0QXxqbGohBgNAIAghAyAALwEAIQggBiANIBGiIAO4Ig0gEqKgIA8iECAToqAgDiAUoqAiDyACKgIAu6CrOwEAIAYgB2ohBiAAQX5qIQAgAkF8aiECIBAhDiAEQX9qIgRBAUoNAAsLCwvfAgIDfwZ8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIgyaEAAiDSANoCIPtjgCECAEIAxEAAAAAAAAAMCiEAAiDraMOAIUIAREAAAAAAAA8D8gDaEiCyALoiANIAwgDKCiRAAAAAAAAPA/oCAOoaMiC7Y4AgAgBCANIAxEAAAAAAAA8L+gIAuioiIQtjgCBCAEIA0gDEQAAAAAAADwP6AgC6KiIgy2OAIIIAQgDiALoiINtow4AgwgBCALIBCgIA5EAAAAAAAA8D8gD6GgIgujtjgCGCAEIAwgDaEgC6O2OAIcIAYEQCAFQQF0IQogBiEJIAIhCANAIAAgCCADIAQgBSAGEAIgACAKaiEAIAhBAmohCCAJQX9qIgkNAAsLIAVFDQAgBkEBdCEIIAUhAANAIAIgASADIAQgBiAFEAIgAiAIaiECIAFBAmohASAAQX9qIgANAAsLC7wBAQV/IAMgAmwiAwRAQQAgA2shBgNAIAAoAgAiBEEIdiIHQf8BcSECAn8gBEH/AXEiAyAEQRB2IgRB/wFxIgVPBEAgAyIIIAMgAk8NARoLIAQgBCAHIAIgA0kbIAIgBUkbQf8BcQshCAJAIAMgAk0EQCADIAVNDQELIAQgByAEIAMgAk8bIAIgBUsbQf8BcSEDCyAAQQRqIQAgASADIAhqQYECbEEBdjsBACABQQJqIQEgBkEBaiIGDQALCwvTBgEKfwJAIAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6CqIQ0gBSAEbCILBEAgB0GBAmwhDgNAQQAgAi8BACADLwEAayIGQQF0IgdrIAcgBkEASBsgDk8EQCAAQQJqLQAAIQUCfyAALQAAIgYgAEEBai0AACIESSIJRQRAIAYiCCAGIAVPDQEaCyAFIAUgBCAEIAVJGyAGIARLGwshCAJ/IAYgBE0EQCAGIgogBiAFTQ0BGgsgBSAFIAQgBCAFSxsgCRsLIgogCGoiD0GBAmwiEEEBdiERQQAhDAJ/QQAiCSAIIApGDQAaIAggCmsiCUH/H2wgD0H+AyAIayAKayAQQYCABEkbbSEMIAYgCEYEQCAEIAVrQf//A2wgCUEGbG0MAQsgBSAGayAGIARrIAQgCEYiBhtB//8DbCAJQQZsbUHVqgFBqtUCIAYbagshCSARIAcgDWxBgBBqQQx1aiIGQQAgBkEAShsiBkH//wMgBkH//wNIGyEGAkACfwJAIAxB//8DcSIFBEAgBkH//wFKDQEgBUGAIGogBmxBgBBqQQx2DAILIAZBCHYiBiEFIAYhBAwCCyAFIAZB//8Dc2xBgBBqQQx2IAZqCyIFQQh2IQcgBkEBdCAFa0EIdiIGIQQCQCAJQdWqAWpB//8DcSIFQanVAksNACAFQf//AU8EQEGq1QIgBWsgByAGa2xBBmxBgIACakEQdiAGaiEEDAELIAchBCAFQanVAEsNACAFIAcgBmtsQQZsQYCAAmpBEHYgBmohBAsCfyAGIgUgCUH//wNxIghBqdUCSw0AGkGq1QIgCGsgByAGa2xBBmxBgIACakEQdiAGaiAIQf//AU8NABogByIFIAhBqdUASw0AGiAIIAcgBmtsQQZsQYCAAmpBEHYgBmoLIQUgCUGr1QJqQf//A3EiCEGp1QJLDQAgCEH//wFPBEBBqtUCIAhrIAcgBmtsQQZsQYCAAmpBEHYgBmohBgwBCyAIQanVAEsEQCAHIQYMAQsgCCAHIAZrbEEGbEGAgAJqQRB2IAZqIQYLIAEgBDoAACABQQFqIAU6AAAgAUECaiAGOgAACyADQQJqIQMgAkECaiECIABBBGohACABQQRqIQEgC0F/aiILDQALCwsL"},{}],23:[function(e,t,i){"use strict";var n;t.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var e=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),t=new WebAssembly.Module(e);return 0!==new WebAssembly.Instance(t,{}).exports.test(4)&&(n=!0),n}catch(e){}return n}},{}],24:[function(e,t,i){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,s,l=n(e),c=1;c<arguments.length;c++){i=Object(arguments[c]);for(var d in i)r.call(i,d)&&(l[d]=i[d]);if(a){s=a(i);for(var u=0;u<s.length;u++)o.call(i,s[u])&&(l[s[u]]=i[s[u]])}}return l}},{}],25:[function(e,t,i){var n=arguments[3],a=arguments[4],r=arguments[5],o=JSON.stringify;t.exports=function(e,t){function i(e){g[e]=!0;for(var t in a[e][1]){var n=a[e][1][t];g[n]||i(n)}}for(var s,l=Object.keys(r),c=0,d=l.length;c<d;c++){var u=l[c],h=r[u].exports;if(h===e||h&&h.default===e){s=u;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},c=0,d=l.length;c<d;c++){var u=l[c];f[u]=u}a[s]=["function(require,module,exports){"+e+"(self); }",f]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,a[p]=["function(require,module,exports){var f = require("+o(s)+");(f.default ? f.default : f)(self);}",m];var g={};i(p);var v="("+n+")({"+Object.keys(g).map(function(e){return o(e)+":["+a[e][0]+","+o(a[e][1])+"]"}).join(",")+"},{},["+o(p)+"])",_=window.URL||window.webkitURL||window.mozURL||window.msURL,b=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return b;var w=_.createObjectURL(b),y=new Worker(w);return y.objectURL=w,y}},{}],"/":[function(e,t,i){"use strict";function n(e,t){return o(e)||r(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(e,t){var i=[],n=!0,a=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(i.push(o.value),!t||i.length!==t);n=!0);}catch(e){a=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}return i}function o(e){if(Array.isArray(e))return e}function s(){return{value:d(p),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var e=window.URL||window.webkitURL||window.mozURL||window.msURL;e&&e.revokeObjectURL&&this.value.objectURL&&e.revokeObjectURL(this.value.objectURL)}}}}function l(e){if(!(this instanceof l))return new l(e);this.options=c({},C,e||{});var t="lk_".concat(this.options.concurrency);this.__limit=v[t]||f.limiter(this.options.concurrency),v[t]||(v[t]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}var c=e("object-assign"),d=e("webworkify"),u=e("./lib/mathlib"),h=e("./lib/pool"),f=e("./lib/utils"),p=e("./lib/worker"),m=e("./lib/stepper"),g=e("./lib/tiler"),v={},_=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(_=navigator.userAgent.indexOf("Safari")>=0)}catch(e){}var b=1;"undefined"!=typeof navigator&&(b=Math.min(navigator.hardwareConcurrency||1,4));var w,y,C={tile:1024,concurrency:b,features:["js","wasm","ww"],idle:2e3},E={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0};l.prototype.init=function(){var t=this;if(this.__initPromise)return this.__initPromise;if(!1!==w&&!0!==w&&(w=!1,"undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray))try{new ImageData(new Uint8ClampedArray(400),10,10),w=!0}catch(e){}!1!==y&&!0!==y&&(y=!1,"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?y=!0:this.debug("ImageBitmap does not support .close(), disabled")));var i=this.options.features.slice();if(i.indexOf("all")>=0&&(i=["cib","wasm","js","ww"]),this.__requested_features=i,this.__mathlib=new u(i),i.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{e("webworkify")(function(){}).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));v[n]?this.__workersPool=v[n]:(this.__workersPool=new h(s,this.options.idle),v[n]=this.__workersPool)}catch(e){}var a,r=this.__mathlib.init().then(function(e){c(t.features,e.features)});return a=y?f.cib_support().then(function(e){if(t.features.cib&&i.indexOf("cib")<0)return void t.debug("createImageBitmap() resize supported, but disabled by config");i.indexOf("cib")>=0&&(t.features.cib=e)}):Promise.resolve(!1),this.__initPromise=Promise.all([r,a]).then(function(){return t}),this.__initPromise},l.prototype.resize=function(e,t,i){var a=this;this.debug("Start resize...");var r=c({},E);if(isNaN(i)?i&&(r=c(r,i)):r=c(r,{quality:i}),r.toWidth=t.width,r.toHeight=t.height,r.width=e.naturalWidth||e.width,r.height=e.naturalHeight||e.height,0===t.width||0===t.height)return Promise.reject(new Error("Invalid output size: ".concat(t.width,"x").concat(t.height)));r.unsharpRadius>2&&(r.unsharpRadius=2);var o=!1,s=null;r.cancelToken&&(s=r.cancelToken.then(function(e){throw o=!0,e},function(e){throw o=!0,e}));var l=Math.ceil(Math.max(3,2.5*r.unsharpRadius|0));return this.init().then(function(){if(o)return s;if(a.features.cib){var i=t.getContext("2d",{alpha:Boolean(r.alpha)});return a.debug("Resize via createImageBitmap()"),createImageBitmap(e,{resizeWidth:r.toWidth,resizeHeight:r.toHeight,resizeQuality:f.cib_quality_name(r.quality)}).then(function(e){if(o)return s;if(!r.unsharpAmount)return i.drawImage(e,0,0),e.close(),i=null,a.debug("Finished!"),t;a.debug("Unsharp result");var n=document.createElement("canvas");n.width=r.toWidth,n.height=r.toHeight;var l=n.getContext("2d",{alpha:Boolean(r.alpha)});l.drawImage(e,0,0),e.close();var c=l.getImageData(0,0,r.toWidth,r.toHeight);return a.__mathlib.unsharp_mask(c.data,r.toWidth,r.toHeight,r.unsharpAmount,r.unsharpRadius,r.unsharpThreshold),i.putImageData(c,0,0),c=l=n=i=null,a.debug("Finished!"),t})}var d={},u=function(e){return Promise.resolve().then(function(){return a.features.ww?new Promise(function(t,i){var n=a.__workersPool.acquire();s&&s.catch(function(e){return i(e)}),n.value.onmessage=function(e){n.release(),e.data.err?i(e.data.err):t(e.data.result)},n.value.postMessage({opts:e,features:a.__requested_features,preload:{wasm_nodule:a.__mathlib.__}},[e.src.buffer])}):a.__mathlib.resizeAndUnsharp(e,d)})},h=function(e,t,i){var n,r,c,d=function(t){return a.__limit(function(){if(o)return s;var l;if(f.isCanvas(e))a.debug("Get tile pixel data"),l=n.getImageData(t.x,t.y,t.width,t.height);else{a.debug("Draw tile imageBitmap/image to temporary canvas");var d=document.createElement("canvas");d.width=t.width,d.height=t.height;var h=d.getContext("2d",{alpha:Boolean(i.alpha)});h.globalCompositeOperation="copy",h.drawImage(r||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),a.debug("Get tile pixel data"),l=h.getImageData(0,0,t.width,t.height),h=d=null}var p={src:l.data,width:t.width,height:t.height,toWidth:t.toWidth,toHeight:t.toHeight,scaleX:t.scaleX,scaleY:t.scaleY,offsetX:t.offsetX,offsetY:t.offsetY,quality:i.quality,alpha:i.alpha,unsharpAmount:i.unsharpAmount,unsharpRadius:i.unsharpRadius,unsharpThreshold:i.unsharpThreshold};return a.debug("Invoke resize math"),Promise.resolve().then(function(){return u(p)}).then(function(e){if(o)return s;l=null;var i;if(a.debug("Convert raw rgba tile result to ImageData"),w)i=new ImageData(new Uint8ClampedArray(e),t.toWidth,t.toHeight);else if(i=c.createImageData(t.toWidth,t.toHeight),i.data.set)i.data.set(e);else for(var n=i.data.length-1;n>=0;n--)i.data[n]=e[n];return a.debug("Draw tile"),_?c.putImageData(i,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):c.putImageData(i,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null})})};return Promise.resolve().then(function(){if(c=t.getContext("2d",{alpha:Boolean(i.alpha)}),f.isCanvas(e))return n=e.getContext("2d",{alpha:Boolean(i.alpha)}),null;if(f.isImage(e))return y?(a.debug("Decode image via createImageBitmap"),createImageBitmap(e).then(function(e){r=e})):null;throw new Error('".from" should be image or canvas')}).then(function(){function e(){r&&(r.close(),r=null)}if(o)return s;a.debug("Calculate tiles");var n=g({width:i.width,height:i.height,srcTileSize:a.options.tile,toWidth:i.toWidth,toHeight:i.toHeight,destTileBorder:l}),c=n.map(function(e){return d(e)});return a.debug("Process tiles"),Promise.all(c).then(function(){return a.debug("Finished!"),e(),t},function(t){throw e(),t})})},p=m(r.width,r.height,r.toWidth,r.toHeight,a.options.tile,l);return function e(t,i,a,r){if(o)return s;var l=t.shift(),d=n(l,2),u=d[0],f=d[1],p=0===t.length;r=c({},r,{toWidth:u,toHeight:f,quality:p?r.quality:Math.min(1,r.quality)});var m;return p||(m=document.createElement("canvas"),m.width=u,m.height=f),h(i,p?a:m,r).then(function(){return p?a:(r.width=u,r.height=f,e(t,m,a,r))})}(p,e,t,r)})},l.prototype.resizeBuffer=function(e){var t=this,i=c({},E,e);return this.init().then(function(){return t.__mathlib.resizeAndUnsharp(i)})},l.prototype.toBlob=function(e,t,i){return t=t||"image/png",new Promise(function(n){if(e.toBlob)return void e.toBlob(function(e){return n(e)},t,i);for(var a=atob(e.toDataURL(t,i).split(",")[1]),r=a.length,o=new Uint8Array(r),s=0;s<r;s++)o[s]=a.charCodeAt(s);n(new Blob([o],{type:t}))})},l.prototype.debug=function(){},t.exports=l},{"./lib/mathlib":1,"./lib/pool":9,"./lib/stepper":10,"./lib/tiler":11,"./lib/utils":12,"./lib/worker":13,"object-assign":24,webworkify:25}]},{},[])("/")}),define("WoltLabSuite/Core/Image/Resizer",["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ExifUtil","Pica"],function(e,t,i){"use strict";function n(){}var a=new i({features:["js","wasm","ww"]});return n.prototype={maxWidth:800,maxHeight:600,quality:.8,fileType:"image/jpeg",setMaxWidth:function(e){return null==e&&(e=n.prototype.maxWidth),this.maxWidth=e,this},setMaxHeight:function(e){return null==e&&(e=n.prototype.maxHeight),this.maxHeight=e,this},setQuality:function(e){return null==e&&(e=n.prototype.quality),this.quality=e,this},setFileType:function(e){return null==e&&(e=n.prototype.fileType),this.fileType=e,this},saveFile:function(i,n,r,o){r=r||this.fileType,o=o||this.quality;var s=n.match(/(.+)(\..+?)$/);return a.toBlob(i.image,r,o).then(function(e){return"image/jpeg"===r&&void 0!==i.exif?t.setExifData(e,i.exif):e}).then(function(t){return e.blobToFile(t,s[1])})},loadFile:function(e){var i=void 0,n=Promise.resolve(e);"image/jpeg"===e.type&&(i=t.getExifBytesFromJpeg(e),n=n.then(t.removeExifData.bind(t)));var n=n.then(function(e){return new Promise(function(t,i){var n=new FileReader,a=new Image;n.addEventListener("load",function(){a.src=n.result}),n.addEventListener("error",function(){n.abort(),i(n.error)}),a.addEventListener("error",i),a.addEventListener("load",function(){t(a)}),n.readAsDataURL(e)})});return Promise.all([i,n]).then(function(e){return{exif:e[0],image:e[1]}})},resize:function(e,t,i,n,r,o){t=t||this.maxWidth,i=i||this.maxHeight,n=n||this.quality,r=r||!1;var s=document.createElement("canvas"),l=window.createImageBitmap?createImageBitmap(e).then(function(t){if(t.height!=e.height)throw new Error("Chrome Bug #1069965")}):Promise.resolve(),c=Math.min(t,e.width),d=Math.min(i,e.height);if(e.width<=c&&e.height<=d&&!r)return Promise.resolve(void 0);var u=Math.min(c/e.width,d/e.height);s.width=Math.floor(e.width*u),s.height=Math.floor(e.height*u);var h=1;n>=.8?h=3:n>=.4&&(h=2);var f={quality:h,cancelToken:o,alpha:!0};return l.then(function(){return a.resize(e,s,f)})}},n}),define("WoltLabSuite/Core/Language/Chooser",["Core","Dictionary","Language","Dom/Traverse","Dom/Util","ObjectMap","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o){"use strict";var s=new t,l=!1,c=new r,d=null;return{init:function(e,t,i,n,a,r){if(!s.has(t)){var o=elById(e);if(null===o)throw new Error("Expected a valid container id, cannot find '"+t+"'.");var l=elById(t);null===l&&(l=elCreate("input"),elAttr(l,"type","hidden"),elAttr(l,"id",t),elAttr(l,"name",t),elAttr(l,"value",i),o.appendChild(l)),this._initElement(t,l,i,n,a,r)}},_setup:function(){l||(l=!0,d=this._submit.bind(this))},_initElement:function(e,t,r,l,u,h){var f;"DD"===t.parentNode.nodeName?(f=elCreate("div"),f.className="dropdown",a.prepend(f,t.parentNode)):(f=t.parentNode,f.classList.add("dropdown")),elHide(t);var p=elCreate("a");p.className="dropdownToggle dropdownIndicator boxFlag box24 inputPrefix"+("DD"===t.parentNode.nodeName?" button":""),f.appendChild(p);var m=elCreate("ul");m.className="dropdownMenu",f.appendChild(m);var g,v,_,b,w=function(t){var i=~~elData(t.currentTarget,"language-id"),a=n.childByClass(m,"active");null!==a&&a.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,t.currentTarget)}.bind(this);for(var y in l)if(l.hasOwnProperty(y)){var C=l[y];_=elCreate("li"),_.className="boxFlag",_.addEventListener(WCF_CLICK_EVENT,w),elData(_,"language-id",y),void 0!==C.languageCode&&elData(_,"language-code",C.languageCode),m.appendChild(_),g=elCreate("a"),g.className="box24",_.appendChild(g),v=elCreate("img"),elAttr(v,"src",C.iconPath),elAttr(v,"alt",""),v.className="iconFlag",g.appendChild(v),b=elCreate("span"),b.textContent=C.languageName,g.appendChild(b),y==r&&(p.innerHTML=_.firstChild.innerHTML)}if(h)_=elCreate("li"),_.className="dropdownDivider",m.appendChild(_),_=elCreate("li"),elData(_,"language-id",0),_.addEventListener(WCF_CLICK_EVENT,w),m.appendChild(_),g=elCreate("a"),g.textContent=i.get("wcf.global.language.noSelection"),_.appendChild(g),0===r&&(p.innerHTML=_.firstChild.innerHTML),_.addEventListener(WCF_CLICK_EVENT,w);else if(0===r){p.innerHTML=null;var E=elCreate("div");p.appendChild(E),b=elCreate("span"),b.className="icon icon24 fa-question pointer",E.appendChild(b),b=elCreate("span"),b.textContent=i.get("wcf.global.language.noSelection"),E.appendChild(b)}o.init(p),s.set(e,{callback:u,dropdownMenu:m,dropdownToggle:p,element:t});var L=n.parentByTag(t,"FORM");if(null!==L){L.addEventListener("submit",d);var S=c.get(L);void 0===S&&(S=[],c.set(L,S)),S.push(e)}},_select:function(t,i,n){var a=s.get(t);if(void 0===n){for(var r=a.dropdownMenu.childNodes,o=0,l=r.length;o<l;o++){var c=r[o];if(~~elData(c,"language-id")===i){n=c;break}}if(void 0===n)throw new Error("Cannot select unknown language id '"+i+"'")}a.element.value=i,e.triggerEvent(a.element,"change"),a.dropdownToggle.innerHTML=n.firstChild.innerHTML,s.set(t,a),"function"==typeof a.callback&&a.callback(n)},_submit:function(e){for(var t,i=c.get(e.currentTarget),n=0,a=i.length;n<a;n++)t=elCreate("input"),t.type="hidden",t.name=i[n],t.value=this.getLanguageId(i[n]),e.currentTarget.appendChild(t)},getChooser:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid language chooser input element, '"+e+"' is not i18n input field.");return t},getLanguageId:function(e){return~~this.getChooser(e).element.value},removeChooser:function(e){s.has(e)&&s.delete(e)},setLanguageId:function(e,t){if(void 0===s.get(e))throw new Error("Expected a valid  input element, '"+e+"' is not i18n input field.");this._select(e,t)}}}),define("WoltLabSuite/Core/Language/Input",["Core","Dictionary","Language","ObjectMap","StringUtil","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o,s){"use strict";var l=new t,c=!1,d=new n,u=new t,h=null,f=null;return{init:function(e,i,n,r){if(!u.has(e)){var o=elById(e);if(null===o)throw new Error("Expected a valid element id, cannot find '"+e+"'.");this._setup();var s=new t;for(var l in i)i.hasOwnProperty(l)&&s.set(~~l,a.unescapeHTML(i[l]));u.set(e,s),this._initElement(e,o,s,n,r)}},registerCallback:function(e,t,i){if(!u.has(e))throw new Error("Unknown element id '"+e+"'.");l.get(e).callbacks.set(t,i)},unregister:function(e){if(!u.has(e))throw new Error("Unknown element id '"+e+"'.");u.delete(e),l.delete(e)},_setup:function(){c||(c=!0,h=this._dropdownToggle.bind(this),f=this._submit.bind(this))},_initElement:function(e,n,a,c,u){var p=n.parentNode;if(!p.classList.contains("inputAddon")){p=elCreate("div"),p.className="inputAddon"+("TEXTAREA"===n.nodeName?" inputAddonTextarea":""),elData(p,"input-id",e);var m=document.activeElement===n;n.parentNode.insertBefore(p,n),p.appendChild(n),m&&n.focus()}p.classList.add("dropdown");var g=elCreate("span");g.className="button dropdownToggle inputPrefix";var v=elCreate("span");v.textContent=i.get("wcf.global.button.disabledI18n"),g.appendChild(v),p.insertBefore(g,n);var _=elCreate("ul");_.className="dropdownMenu",o.insertAfter(_,g);var b,w=function(t,i){var n=~~elData(t.currentTarget,"language-id"),a=r.childByClass(_,"active");null!==a&&a.classList.remove("active"),n&&t.currentTarget.classList.add("active"),this._select(e,n,i||!1)}.bind(this);for(var y in c)c.hasOwnProperty(y)&&(b=elCreate("li"),elData(b,"language-id",y),v=elCreate("span"),v.textContent=c[y],b.appendChild(v),b.addEventListener(WCF_CLICK_EVENT,w),_.appendChild(b));!0!==u&&(b=elCreate("li"),b.className="dropdownDivider",_.appendChild(b),b=elCreate("li"),elData(b,"language-id",0),v=elCreate("span"),v.textContent=i.get("wcf.global.button.disabledI18n"),b.appendChild(v),b.addEventListener(WCF_CLICK_EVENT,w),_.appendChild(b));var C=null;if(!0===u||a.size)for(var E=0,L=_.childElementCount;E<L;E++)if(~~elData(_.children[E],"language-id")===LANGUAGE_ID){C=_.children[E];break}s.init(g),s.registerCallback(p.id,h),l.set(e,{buttonLabel:g.children[0],callbacks:new t,element:n,languageId:0,isEnabled:!0,forceSelection:u});var S=r.parentByTag(n,"FORM");if(null!==S){S.addEventListener("submit",f);var A=d.get(S);void 0===A&&(A=[],d.set(S,A)),A.push(e)}null!==C&&w({currentTarget:C},!0)},_select:function(e,i,n){for(var a,r=l.get(e),o=s.getDropdownMenu(r.element.closest(".inputAddon").id),c="",d=0,h=o.childElementCount;d<h;d++){a=o.children[d];var f=elData(a,"language-id");f.length&&i===~~f&&(c=a.children[0].textContent)}if(r.languageId!==i){var p=u.get(e);r.languageId&&p.set(r.languageId,r.element.value),0===i?u.set(e,new t):(r.buttonLabel.classList.contains("active")||!0===n)&&(r.element.value=p.has(i)?p.get(i):""),r.buttonLabel.textContent=c,r.buttonLabel.classList[i?"add":"remove"]("active"),r.languageId=i}n||(r.element.blur(),r.element.focus()),r.callbacks.has("select")&&r.callbacks.get("select")(r.element)},_dropdownToggle:function(e,t){if("open"===t)for(var i,n,a=s.getDropdownMenu(e),r=elData(elById(e),"input-id"),o=l.get(r),c=u.get(r),d=0,h=a.childElementCount;d<h;d++)if(i=a.children[d],n=~~elData(i,"language-id")){var f=!1;o.languageId&&(f=n===o.languageId?""===o.element.value.trim():!c.get(n)),i.classList[f?"add":"remove"]("missingValue")}},_submit:function(e){for(var t,i,n,a,r=d.get(e.currentTarget),o=0,s=r.length;o<s;o++)i=r[o],t=l.get(i),t.isEnabled&&(a=u.get(i),t.callbacks.has("submit")&&t.callbacks.get("submit")(t.element),t.languageId&&a.set(t.languageId,t.element.value),a.size&&(a.forEach(function(t,a){n=elCreate("input"),n.type="hidden",n.name=i+"_i18n["+a+"]",n.value=t,e.currentTarget.appendChild(n)}),t.element.removeAttribute("name")))},getValues:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");var i=u.get(e);return i.set(t.languageId,t.element.value),i},setValues:function(i,n){var a=l.get(i);if(void 0===a)throw new Error("Expected a valid i18n input element, '"+i+"' is not i18n input field.");if(e.isPlainObject(n)&&(n=t.fromObject(n)),a.element.value="",n.has(0))return a.element.value=n.get(0),n.delete(0),u.set(i,n),void this._select(i,0,!0);u.set(i,n),a.languageId=0,this._select(i,LANGUAGE_ID,!0)},disable:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid element, '"+e+"' is not an i18n input field.");if(t.isEnabled){t.isEnabled=!1,elHide(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.remove("inputAddon"),i.classList.remove("dropdown")}},enable:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(!t.isEnabled){t.isEnabled=!0,elShow(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.add("inputAddon"),i.classList.add("dropdown")}},isEnabled:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");return t.isEnabled},validate:function(e,t){var i=l.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;var n=u.get(e),a=s.getDropdownMenu(i.element.parentNode.id);i.languageId&&n.set(i.languageId,i.element.value);for(var r,o,c=!1,d=!1,h=0,f=a.childElementCount;h<f;h++)if(r=a.children[h],o=~~elData(r,"language-id"))if(n.has(o)&&0!==n.get(o).length){if(c)return!1;d=!0}else{if(d)return!1;c=!0}return!c||t}}}),define("WoltLabSuite/Core/Language/Text",["Core","./Input"],function(e,t){"use strict";return{init:function(e,i,n,a){var r=elById(e);if(!r||"TEXTAREA"!==r.nodeName||!r.classList.contains("wysiwygTextarea"))throw new Error('Expected <textarea class="wysiwygTextarea" /> for id \''+e+"'.");t.init(e,i,n,a),t.registerCallback(e,"select",this._callbackSelect.bind(this)),t.registerCallback(e,"submit",this._callbackSubmit.bind(this))},_callbackSelect:function(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)},_callbackSubmit:function(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}}}),define("WoltLabSuite/Core/Media/Upload",["Core","DateUtil","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload","User","WoltLabSuite/Core/FileUtil"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";function u(t,i,n){n=n||{},this._elementTagSize=144,n.elementTagSize&&(this._elementTagSize=n.elementTagSize),this._mediaManager=null,n.mediaManager&&(this._mediaManager=n.mediaManager,delete n.mediaManager),this._categoryId=null,l.call(this,t,i,e.extend({className:"wcf\\data\\media\\MediaAction",multiple:!!this._mediaManager,singleFileRequests:!0},n))}return e.inherit(u,l,{_createFileElement:function(e){var n;if("OL"===this._target.nodeName||"UL"===this._target.nodeName)n=elCreate("li");else{if("TBODY"===this._target.nodeName){var r=elByTag("TR",this._target)[0],s=this._target.parentNode.parentNode;"none"===s.style.getPropertyValue("display")?(n=r,s.style.removeProperty("display"),elRemove(elById(elData(this._target,"no-items-info")))):(n=r.cloneNode(!0),n.removeAttribute("id"),a.identify(n));for(var l,u=elByTag("TD",n),h=0,f=u.length;h<f;h++)if(l=u[h],l.classList.contains("columnMark"))elBySelAll("[data-object-id]",l,elHide);else if(l.classList.contains("columnIcon"))elBySelAll("[data-object-id]",l,elHide),elByClass("mediaEditButton",l)[0].classList.add("jsMediaEditButton"),elData(elByClass("jsDeleteButton",l)[0],"confirm-message-html",o.get("wcf.media.delete.confirmMessage",{title:e.name}));else if(l.classList.contains("columnFilename")){var p=elByTag("IMG",l);p.length||(p=elByClass("icon48",l));var m=elCreate("span");m.className="icon icon48 fa-spinner mediaThumbnail",a.replaceElement(p[0],m);var g=elBySelAll(".box48 > div > p",l);g[0].textContent=e.name;var v=elByTag("A",g[1])[0];v||(v=elCreate("a"),elByTag("SMALL",g[1])[0].appendChild(v)),v.setAttribute("href",c.getLink()),v.textContent=c.username}else l.classList.contains("columnUploadTime")?(l.innerHTML="",l.appendChild(t.getTimeElement(new Date))):l.classList.contains("columnDigits")?l.textContent=d.formatFilesize(e.size):l.innerHTML="";return a.prepend(n,this._target),n}n=elCreate("p")}var _=elCreate("div");_.className="mediaThumbnail",n.appendChild(_);var b=elCreate("span");b.className="icon icon144 fa-spinner",_.appendChild(b);var w=elCreate("div");w.className="mediaInformation",n.appendChild(w);var y=elCreate("p");y.className="mediaTitle",y.textContent=e.name,w.appendChild(y);var C=elCreate("progress");return elAttr(C,"max",100),w.appendChild(C),a.prepend(n,this._target),i.trigger(),n},_getParameters:function(){var t={elementTagSize:this._elementTagSize};if(this._mediaManager){t.imagesOnly=this._mediaManager.getOption("imagesOnly");var i=this._mediaManager.getCategoryId();i&&(t.categoryID=i)}return e.extend(u._super.prototype._getParameters.call(this),t)},_replaceFileIcon:function(e,t,i){if(t.elementTag)e.parentElement.innerHTML=t.elementTag;else if(t.tinyThumbnailType){var n=elCreate("img");elAttr(n,"src",t.tinyThumbnailLink),elAttr(n,"alt",""),n.style.setProperty("width",i+"px"),n.style.setProperty("height",i+"px"),a.replaceElement(e,n)}else{e.classList.remove("fa-spinner");var r=d.getIconNameByFilename(t.filename);r&&(r="-"+r),e.classList.add("fa-file"+r+"-o")}},_success:function(e,t){for(var a=this._fileElements[e],s=0,l=a.length;s<l;s++){var c=a[s],d=elData(c,"internal-file-id"),u=t.returnValues.media[d];if("TR"===c.tagName)if(u){for(var h=elBySelAll("[data-object-id]",c),s=0,l=h.length;s<l;s++)elData(h[s],"object-id",~~u.mediaID),elShow(h[s]);elByClass("columnMediaID",c)[0].textContent=u.mediaID;var f=elByClass("fa-spinner",c)[0];this._replaceFileIcon(f,u,48)}else{var p=t.returnValues.errors[d];p||(p={errorType:"uploadFailed",filename:elData(c,"filename")});var f=elByClass("fa-spinner",c)[0];f.classList.remove("fa-spinner"),f.classList.add("fa-remove"),f.classList.add("pointer"),f.classList.add("jsTooltip"),elAttr(f,"title",o.get("wcf.global.button.delete")),f.addEventListener(WCF_CLICK_EVENT,function(e){elRemove(e.currentTarget.parentNode.parentNode.parentNode),r.fire("com.woltlab.wcf.media.upload","removedErroneousUploadRow")}),c.classList.add("uploadFailed");var m=elBySelAll(".columnFilename .box48 > div > p",c)[1];elInnerError(m,o.get("wcf.media.upload.error."+p.errorType,{filename:p.filename})),elRemove(m)}else if(elRemove(n.childByTag(n.childByClass(c,"mediaInformation"),"PROGRESS")),u){var f=n.childByTag(n.childByClass(c,"mediaThumbnail"),"SPAN");this._replaceFileIcon(f,u,144),c.className="jsClipboardObject mediaFile",elData(c,"object-id",u.mediaID),this._mediaManager&&(this._mediaManager.setupMediaElement(u,c),this._mediaManager.addMedia(u,c))}else{var p=t.returnValues.errors[d];p||(p={errorType:"uploadFailed",filename:elData(c,"filename")});var f=n.childByTag(n.childByClass(c,"mediaThumbnail"),"SPAN");f.classList.remove("fa-spinner"),f.classList.add("fa-remove"),f.classList.add("pointer"),c.classList.add("uploadFailed"),c.classList.add("jsTooltip"),elAttr(c,"title",o.get("wcf.global.button.delete")),c.addEventListener(WCF_CLICK_EVENT,function(){elRemove(this)});var g=n.childByClass(n.childByClass(c,"mediaInformation"),"mediaTitle");g.innerText=o.get("wcf.media.upload.error."+p.errorType,{filename:p.filename})}i.trigger()}r.fire("com.woltlab.wcf.media.upload","success",{files:a,isMultiFileUpload:-1!==this._multiFileUploadIds.indexOf(e),media:t.returnValues.media,upload:this,uploadId:e})},_uploadFiles:function(e,t){return u._super.prototype._uploadFiles.call(this,e,t)}}),u}),define("WoltLabSuite/Core/Media/Replace",["Core","Dom/ChangeListener","Dom/Util","Language","Ui/Notification","./Upload"],function(e,t,i,n,a,r){"use strict";function o(t,i,n,a){this._mediaID=t,r.call(this,i,n,e.extend(a,{action:"replaceFile"}))}return e.inherit(o,r,{_createButton:function(){r.prototype._createButton.call(this),this._button.classList.add("small"),elBySel("span",this._button).textContent=n.get("wcf.media.button.replaceFile")},_createFileElement:function(){return this._target},_getFormData:function(){return{objectIDs:[this._mediaID]}},_success:function(e,i){for(var r=this._fileElements[e],o=0,s=r.length;o<s;o++){var l=r[o],c=elData(l,"internal-file-id"),d=i.returnValues.media[c];if(d)d.isImage&&(this._target.innerHTML=d.smallThumbnailTag),elById("mediaFilename").textContent=d.filename,elById("mediaFilesize").textContent=d.formattedFilesize,d.isImage&&(elById("mediaImageDimensions").textContent=d.imageDimensions),elById("mediaUploader").innerHTML=d.userLinkElement,this._options.mediaEditor.updateData(d),elInnerError(this._buttonContainer,""),a.show();else{var u=i.returnValues.errors[c];u||(u={errorType:"uploadFailed",filename:elData(l,"filename")}),elInnerError(this._buttonContainer,n.get("wcf.media.upload.error."+u.errorType,{filename:u.filename}))}t.trigger()}}}),o}),
-define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey","WoltLabSuite/Core/Media/Replace"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function f(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'.");this._media=null,this._availableLanguageCount=1,this._categoryIds=[],this._oldCategoryId=0,this._dialogs=new i}return f.prototype={_ajaxSetup:function(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}},_ajaxSuccess:function(e){l.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),s.close("mediaEditor_"+this._media.mediaID),this._media=null},_close:function(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()},_initEditor:function(e,t){this._availableLanguageCount=~~t.returnValues.availableLanguageCount,this._categoryIds=t.returnValues.categoryIDs.map(function(e){return~~e});t.returnValues.mediaData&&(this._media=t.returnValues.mediaData),setTimeout(function(){this._availableLanguageCount>1&&c.setLanguageId("mediaEditor_"+this._media.mediaID+"_languageID",this._media.languageID||LANGUAGE_ID),this._categoryIds.length&&(elBySel("select[name=categoryID]",e).value=~~this._media.categoryID);var t=elBySel("input[name=title]",e),a=elBySel("input[name=altText]",e),o=elBySel("textarea[name=caption]",e);if(this._availableLanguageCount>1&&this._media.isMultilingual?(elById("altText_"+this._media.mediaID)&&d.setValues("altText_"+this._media.mediaID,i.fromObject(this._media.altText||{})),elById("caption_"+this._media.mediaID)&&d.setValues("caption_"+this._media.mediaID,i.fromObject(this._media.caption||{})),d.setValues("title_"+this._media.mediaID,i.fromObject(this._media.title||{}))):(t.value=this._media.title?this._media.title[this._media.languageID||LANGUAGE_ID]:"",a&&(a.value=this._media.altText?this._media.altText[this._media.languageID||LANGUAGE_ID]:""),o&&(o.value=this._media.caption?this._media.caption[this._media.languageID||LANGUAGE_ID]:"")),this._availableLanguageCount>1){var s=elBySel("input[name=isMultilingual]",e);s.addEventListener("change",this._updateLanguageFields.bind(this)),this._updateLanguageFields(null,s)}var l=this._keyPress.bind(this);a&&a.addEventListener("keypress",l),t.addEventListener("keypress",l),elBySel("button[data-type=submit]",e).addEventListener(WCF_CLICK_EVENT,this._saveData.bind(this)),document.activeElement.blur(),elById("mediaEditor_"+this._media.mediaID).parentNode.scrollTop=0;var u=elByClass("mediaManagerMediaReplaceButton",e)[0],f=elByClass("mediaThumbnail",e)[0];f||(f=elCreate("div"),e.appendChild(f)),new h(this._media.mediaID,r.identify(u),r.identify(f),{mediaEditor:this}),n.trigger()}.bind(this),200)},_keyPress:function(e){u.Enter(e)&&(e.preventDefault(),this._saveData())},_saveData:function(){var t=s.getDialog("mediaEditor_"+this._media.mediaID).content,i=elBySel("select[name=categoryID]",t),n=elBySel("input[name=altText]",t),r=elBySel("textarea[name=caption]",t),l=elBySel("input[name=captionEnableHtml]",t),u=elBySel("input[name=title]",t),h=!1,f=!!n&&a.childByClass(n.parentNode.parentNode,"innerError"),p=!!r&&a.childByClass(r.parentNode.parentNode,"innerError"),m=a.childByClass(u.parentNode.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~i.value,-1===this._categoryIds.indexOf(this._media.categoryID)&&(this._media.categoryID=0)),this._availableLanguageCount>1?(this._media.isMultilingual=~~elBySel("input[name=isMultilingual]",t).checked,this._media.languageID=this._media.isMultilingual?null:c.getLanguageId("mediaEditor_"+this._media.mediaID+"_languageID")):this._media.languageID=LANGUAGE_ID,this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual){if(elById("altText_"+this._media.mediaID)&&!d.validate("altText_"+this._media.mediaID,!0)&&(h=!0,!f)){var g=elCreate("small");g.className="innerError",g.textContent=o.get("wcf.global.form.error.multilingual"),n.parentNode.parentNode.appendChild(g)}if(elById("caption_"+this._media.mediaID)&&!d.validate("caption_"+this._media.mediaID,!0)&&(h=!0,!p)){var g=elCreate("small");g.className="innerError",g.textContent=o.get("wcf.global.form.error.multilingual"),r.parentNode.parentNode.appendChild(g)}if(!d.validate("title_"+this._media.mediaID,!0)&&(h=!0,!m)){var g=elCreate("small");g.className="innerError",g.textContent=o.get("wcf.global.form.error.multilingual"),u.parentNode.parentNode.appendChild(g)}this._media.altText=elById("altText_"+this._media.mediaID)?d.getValues("altText_"+this._media.mediaID).toObject():"",this._media.caption=elById("caption_"+this._media.mediaID)?d.getValues("caption_"+this._media.mediaID).toObject():"",this._media.title=d.getValues("title_"+this._media.mediaID).toObject()}else this._media.altText[this._media.languageID]=n?n.value:"",this._media.caption[this._media.languageID]=r?r.value:"",this._media.title[this._media.languageID]=u.value;l&&(this._media.captionEnableHtml=~~l.checked);for(var v={allowAll:~~elById("mediaEditor_"+this._media.mediaID+"_aclAllowAll").checked,group:[],user:[]},_=elBySelAll('input[name="aclValues[group][]"]',t),b=0,w=_.length;b<w;b++)v.group.push(~~_[b].value);for(var y=elBySelAll('input[name="aclValues[user][]"]',t),b=0,w=y.length;b<w;b++)v.user.push(~~y[b].value);h||(f&&elRemove(f),p&&elRemove(p),m&&elRemove(m),e.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{aclValues:v,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}}))},_updateLanguageFields:function(e,t){e&&(t=e.currentTarget);var i=elById("mediaEditor_"+this._media.mediaID+"_languageIDContainer").parentNode;t.checked?(d.enable("title_"+this._media.mediaID),elById("caption_"+this._media.mediaID)&&d.enable("caption_"+this._media.mediaID),elById("altText_"+this._media.mediaID)&&d.enable("altText_"+this._media.mediaID),elHide(i)):(d.disable("title_"+this._media.mediaID),elById("caption_"+this._media.mediaID)&&d.disable("caption_"+this._media.mediaID),elById("altText_"+this._media.mediaID)&&d.disable("altText_"+this._media.mediaID),elShow(i))},edit:function(e){if("object"!=typeof e&&(e={mediaID:~~e}),null!==this._media)throw new Error("Cannot edit media with id '"+e.mediaID+"' while editing media with id '"+this._media.mediaID+"'");this._media=e,this._dialogs.has("mediaEditor_"+e.mediaID)||this._dialogs.set("mediaEditor_"+e.mediaID,{_dialogSetup:function(){return{id:"mediaEditor_"+e.mediaID,options:{backdropCloseOnClick:!1,onClose:this._close.bind(this),title:o.get("wcf.media.edit")},source:{after:this._initEditor.bind(this),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[e.mediaID]}}}}.bind(this)}),s.open(this._dialogs.get("mediaEditor_"+e.mediaID))},updateData:function(e){this._callbackObject._editorSuccess&&this._callbackObject._editorSuccess(e)}},f}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/Util","../Upload"],function(e,t,i){"use strict";function n(e,t,n){i.call(this,e,t,n)}return e.inherit(n,i,{_createButton:function(){n._super.prototype._createButton.call(this);var e=elBySel("span",this._button),i=document.createTextNode(" ");t.prepend(i,e);var a=elCreate("span");a.className="icon icon16 fa-upload",t.prepend(a,e)},_getParameters:function(){return this._options.categoryId?e.extend(n._super.prototype._getParameters.call(this),{categoryID:this._options.categoryId}):n._super.prototype._getParameters.call(this)}}),n}),define("WoltLabSuite/Core/Media/Clipboard",["Ajax","Dom/ChangeListener","EventHandler","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,a,r,o,s,l){"use strict";var c,d=[];return{init:function(e,t,n){o.setup({hasMarkedItems:t,pageClassName:e}),c=n,i.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",this._clipboardAction.bind(this))},_ajaxSetup:function(){return{data:{className:"wcf\\data\\media\\MediaAction"}}},_ajaxSuccess:function(e){switch(e.actionName){case"getSetCategoryDialog":a.open(this,e.returnValues.template);break;case"setCategory":a.close(this),r.show(),o.reload()}},_dialogSetup:function(){return{id:"mediaSetCategoryDialog",options:{onSetup:function(e){elBySel("button",e).addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),this._setCategory(~~elBySel('select[name="categoryID"]',e).value),t.currentTarget.disabled=!0}.bind(this))}.bind(this),title:n.get("wcf.media.setCategory")},source:null}},_clipboardAction:function(t){var i=t.data.parameters.objectIDs;switch(t.data.actionName){case"com.woltlab.wcf.media.delete":null!==t.responseData&&c.clipboardDeleteMedia(i);break;case"com.woltlab.wcf.media.insert":c.clipboardInsertMedia(i);break;case"com.woltlab.wcf.media.setCategory":d=i,e.api(this,{actionName:"getSetCategoryDialog"})}},_setCategory:function(t){e.api(this,{actionName:"setCategory",objectIDs:d,parameters:{categoryID:t}})}}}),define("WoltLabSuite/Core/Notification/Handler",["Ajax","Core","EventHandler","StringUtil"],function(e,t,i,n){"use strict";if(!("Promise"in window&&"Notification"in window))return{setup:function(){}};var a=!1,r="",o=0,s=window.TIME_NOW,l=null,c=0;return{setup:function(e){if(e=t.extend({enableNotifications:!1,icon:"",sessionKeepAlive:0},e),r=e.icon,c=60*e.sessionKeepAlive,this._prepareNextRequest(),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this)),window.addEventListener("storage",this._onStorage.bind(this)),this._onVisibilityChange(null),e.enableNotifications)switch(window.Notification.permission){case"granted":a=!0;break;case"default":window.Notification.requestPermission(function(e){"granted"===e&&(a=!0)})}},_onVisibilityChange:function(e){if(null!==e&&!document.hidden){(Date.now()-o)/6e4>4&&(this._resetTimer(),this._dispatchRequest())}o=document.hidden?Date.now():0},_getNextDelay:function(){if(0===o)return 5;var e=~~((Date.now()-o)/6e4);return e<15?5:e<30?10:15},_resetTimer:function(){null!==l&&(window.clearTimeout(l),l=null)},_prepareNextRequest:function(){this._resetTimer();var e=Math.min(this._getNextDelay(),c);l=window.setTimeout(this._dispatchRequest.bind(this),6e4*e)},_dispatchRequest:function(){var t={};i.fire("com.woltlab.wcf.notification","beforePoll",t),t.lastRequestTimestamp=s,e.api(this,{parameters:t})},_onStorage:function(){this._prepareNextRequest();var e,n,a=!1;try{e=window.localStorage.getItem(t.getStoragePrefix()+"notification"),n=window.localStorage.getItem(t.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),n=JSON.parse(n)}catch(e){a=!0}a||i.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:n})},_ajaxSuccess:function(e){var n=!1,a=e.returnValues.keepAliveData,r=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks({returnValues:a});try{window.localStorage.setItem(t.getStoragePrefix()+"notification",JSON.stringify(r)),window.localStorage.setItem(t.getStoragePrefix()+"keepAliveData",JSON.stringify(a))}catch(e){n=!0,window.console.log(e)}n||this._prepareNextRequest(),s=e.returnValues.lastRequestTimestamp,i.fire("com.woltlab.wcf.notification","afterPoll",r),this._showNotification(r)},_showNotification:function(e){if(a&&"object"==typeof e.notification&&"string"==typeof e.notification.message){var t=new window.Notification(e.notification.title,{body:n.unescapeHTML(e.notification.message),icon:r});t.onclick=function(){window.focus(),t.close(),window.location=e.notification.link}}},_ajaxSetup:function(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}}),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["Dictionary","EventHandler","Language"],function(e,t,i){"use strict";var n=!1,a=new e,r=!1,o=!1,s=null;return{init:function(e){n||this._setup(),a.set(e.uuid,{editor:e,element:null})},_dragOver:function(e){if(e.preventDefault(),e.dataTransfer&&e.dataTransfer.types){var t=!1;for(var n in e.dataTransfer)if(e.dataTransfer.hasOwnProperty(n)&&n.match(/^moz/)){t=!0;break}if(o=!1,t)"application/x-moz-file"===e.dataTransfer.types[0]&&(o=!0);else for(var s=0;s<e.dataTransfer.types.length;s++)if("Files"===e.dataTransfer.types[s]){o=!0;break}o&&(r||(r=!0,a.forEach(function(e,t){var n=e.editor.$editor[0];if(!n.parentNode)return void a.delete(t);var r=e.element;null===r&&(r=elCreate("div"),r.className="redactorDropArea",elData(r,"element-id",e.editor.$element[0].id),elData(r,"drop-here",i.get("wcf.attachment.dragAndDrop.dropHere")),elData(r,"drop-now",i.get("wcf.attachment.dragAndDrop.dropNow")),r.addEventListener("dragover",function(){r.classList.add("active")}),r.addEventListener("dragleave",function(){r.classList.remove("active")}),r.addEventListener("drop",this._drop.bind(this)),e.element=r),n.parentNode.insertBefore(r,n),r.style.setProperty("top",n.offsetTop+"px","")}.bind(this))))}},_drop:function(e){if(o&&e.dataTransfer&&e.dataTransfer.files.length){e.preventDefault();for(var i=elData(e.currentTarget,"element-id"),n=0,a=e.dataTransfer.files.length;n<a;n++)t.fire("com.woltlab.wcf.redactor2","dragAndDrop_"+i,{file:e.dataTransfer.files[n]});this._dragLeave()}},_dragLeave:function(){r&&o&&(null!==s&&window.clearTimeout(s),s=window.setTimeout(function(){r||a.forEach(function(e){e.element&&e.element.parentNode&&(e.element.classList.remove("active"),elRemove(e.element))}),s=null},100),r=!1)},_globalDrop:function(e){if(null===e.target.closest(".redactor-layer")){var i={cancelDrop:!0,event:e};a.forEach(function(e){t.fire("com.woltlab.wcf.redactor2","dragAndDrop_globalDrop_"+e.editor.$element[0].id,i)}),i.cancelDrop&&e.preventDefault()}this._dragLeave(e)},_setup:function(){window.addEventListener("dragend",function(e){e.preventDefault()}),window.addEventListener("dragover",this._dragOver.bind(this)),window.addEventListener("dragleave",this._dragLeave.bind(this)),window.addEventListener("drop",this._globalDrop.bind(this)),n=!0}}}),define("WoltLabSuite/Core/Ui/DragAndDrop",["Core","EventHandler","WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(e,t,i){return{register:function(n){var a=e.getUuid();n=e.extend({element:"",elementId:"",onDrop:function(e){},onGlobalDrop:function(e){}}),t.add("com.woltlab.wcf.redactor2","dragAndDrop_"+n.elementId,n.onDrop),t.add("com.woltlab.wcf.redactor2","dragAndDrop_globalDrop_"+n.elementId,n.onGlobalDrop),i.init({uuid:a,$editor:[n.element],$element:[{id:n.elementId}]})}}}),define("WoltLabSuite/Core/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,i){"use strict";function n(e,t){this.init(e,t)}return n.prototype={init:function(e,i){if(this._dropdownMenu=null,this._value="",this._element=elById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],threshold:3},i),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},isActive:function(){return null!==this._dropdownMenu&&i.isOpen(this._element.id)},_keyDown:function(e){if(!this.isActive())return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,n=0,a=this._dropdownMenu.childElementCount;n<a&&(t=this._dropdownMenu.children[n],!t.classList.contains("active"));)n++;if(13===e.keyCode)i.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!i.isOpen(this._element.id))return!0;i.close(this._element.id)}else{var r=0;38===e.keyCode?r=(0===n?a:n)-1:40===e.keyCode&&(r=n+1)===a&&(r=0),r!==n&&(t.classList.remove("active"),this._dropdownMenu.children[r].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode);var i=e.children[0];this._options.callbackSelect(this._element.id,{objectId:elData(i,"object-id"),value:e.textContent,type:elData(i,"type")}),t&&this._element.focus()},_keyUp:function(t){var n=t.currentTarget.value.trim();if(this._value!==n){if(n.length<this._options.threshold)return null!==this._dropdownMenu&&i.close(this._element.id),void(this._value=n);this._value=n,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:n}}})}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=elCreate("div"),this._dropdownMenu.className="dropdownMenu",i.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,n,a,r=0,o=e.returnValues.length;r<o;r++)n=e.returnValues[r],t=elCreate("a"),n.icon?(t.className="box16",t.innerHTML=n.icon+" <span></span>",t.children[1].textContent=n.label):t.textContent=n.label,elData(t,"object-id",n.objectID),n.type&&elData(t,"type",n.type),t.addEventListener(WCF_CLICK_EVENT,this._select.bind(this)),a=elCreate("li"),0===r&&(a.className="active"),a.appendChild(t),this._dropdownMenu.appendChild(a);i.open(this._element.id,!0)}else i.close(this._element.id)}},n}),define("WoltLabSuite/Core/Ui/ItemList",["Core","Dictionary","Language","Dom/Traverse","EventKey","WoltLabSuite/Core/Ui/Suggestion","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o){"use strict";var s="",l=new t,c=!1,d=null,u=null,h=null,f=null,p=null,m=null;return{init:function(t,i,a){var s=elById(t);if(null===s)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(l.has(t)){var c=l.get(t);for(var d in c)if(c.hasOwnProperty(d)){var u=c[d];u instanceof Element&&u.parentNode&&elRemove(u)}o.destroy(t),l.delete(t)}a=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},a);var h=n.parentByTag(s,"FORM");if(null!==h)if(!1===a.isCSV){if(!a.submitFieldName.length&&"function"!=typeof a.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=l.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}var i=this.getValues(t);if(a.submitFieldName.length)for(var n,r=0,o=i.length;r<o;r++)n=elCreate("input"),n.type="hidden",n.name=a.submitFieldName.replace(/{$objectId}/,i[r].objectId),n.value=i[r].value,h.appendChild(n);else a.callbackSubmit(h,i)}.bind(this))}else h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=l.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}}.bind(this));this._setup();var f=this._createUI(s,a),p=new r(t,{ajax:a.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:a.excludedSearchValues});if(l.set(t,{dropdownMenu:null,element:f.element,limitReached:f.limitReached,list:f.list,listItem:f.element.parentNode,options:a,shadow:f.shadow,suggestion:p}),i=a.callbackSetupValues?a.callbackSetupValues():f.values.length?f.values:i,Array.isArray(i))for(var m,g=0,v=i.length;g<v;g++)m=i[g],"string"==typeof m&&(m={objectId:0,value:m}),this._addItem(t,m)},getValues:function(e){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=l.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent.trim(),type:elData(e,"type")})}),i},setValues:function(e,t){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,a,r=l.get(e),o=n.childrenByClass(r.list,"item");for(i=0,a=o.length;i<a;i++)this._removeItem(null,o[i],!0);for(i=0,a=t.length;i<a;i++)this._addItem(e,t[i])},_setup:function(){c||(c=!0,d=this._keyDown.bind(this),u=this._keyPress.bind(this),h=this._keyUp.bind(this),f=this._paste.bind(this),p=this._removeItem.bind(this),m=this._blur.bind(this))},_createUI:function(e,t){var n=elCreate("ol");n.className="inputItemList"+(e.disabled?" disabled":""),elData(n,"element-id",e.id),n.addEventListener(WCF_CLICK_EVENT,function(t){t.target===n&&e.focus()});var a=elCreate("li");a.className="input",n.appendChild(a),e.addEventListener("keydown",d),e.addEventListener("keypress",u),e.addEventListener("keyup",h),e.addEventListener("paste",f);var r=e===document.activeElement;r&&e.blur(),e.addEventListener("blur",m),e.parentNode.insertBefore(n,e),a.appendChild(e),r&&window.setTimeout(function(){e.focus()},1),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var o=elCreate("span");o.className="inputItemListLimitReached",o.textContent=i.get("wcf.global.form.input.maxItems"),elHide(o),a.appendChild(o);var s=null,l=[];if(t.isCSV){s=elCreate("input"),s.className="itemListInputShadow",s.type="hidden",s.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(s,n);for(var c,p=e.value.split(","),g=0,v=p.length;g<v;g++)c=p[g].trim(),c.length&&l.push(c);if("TEXTAREA"===e.nodeName){var _=elCreate("input");_.type="text",e.parentNode.insertBefore(_,e),_.id=e.id,elRemove(e),e=_}}return{element:e,limitReached:o,list:n,shadow:s,values:l}},_acceptsNewItems:function(e){var t=l.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems},_handleLimit:function(e){var t=l.get(e);this._acceptsNewItems(e)?(elShow(t.element),elHide(t.limitReached)):(elHide(t.element),elShow(t.limitReached))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;s=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(a.Enter(e)||a.Comma(e)){if(e.preventDefault(),l.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_paste:function(e){var t="";t="object"==typeof window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData.getData("text/plain");var i=e.currentTarget,n=i.id,a=~~elAttr(i,"maxLength");t.split(/,/).forEach(function(e){e=e.trim(),a&&e.length>a&&(e=e.substr(0,a)),e.length>0&&this._acceptsNewItems(n)&&this._addItem(n,{objectId:0,value:e})}.bind(this)),e.preventDefault()},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=l.get(e),n=elCreate("li");n.className="item";var a=elCreate("span");if(a.className="content",elData(a,"object-id",t.objectId),t.type&&elData(a,"type",t.type),a.textContent=t.value,n.appendChild(a),!i.element.disabled){var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener(WCF_CLICK_EVENT,p),n.appendChild(r)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||this._handleLimit(e);var o=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===o&&(o=this.getValues(e)),i.options.callbackChange(e,o))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,a=elData(n,"element-id"),r=l.get(a);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),i||r.element.focus(),this._handleLimit(a);var o=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===o&&(o=this.getValues(a)),r.options.callbackChange(a,o))},_syncShadow:function(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;n<a;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i},_blur:function(e){var t=e.currentTarget,i=l.get(t.id);if(!i.options.restricted){var n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||this._addItem(t.id,{objectId:0,value:n}))}}}}),define("WoltLabSuite/Core/Ui/Page/JumpTo",["Language","ObjectMap","Ui/Dialog"],function(e,t,i){"use strict";var n=null,a=null,r=null,o=new t,s=null;return{init:function(e,t){if(null===(t=t||null)){var i=elData(e,"link");t=i?function(e){window.location=i.replace(/pageNo=%d/,"pageNo="+e)}:function(){}}else if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.");o.has(e)||elBySelAll(".jumpTo",e,function(i){i.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,e)),o.set(e,{callback:t})}.bind(this))},_click:function(t,a){n=t,"object"==typeof a&&a.preventDefault(),i.open(this);var o=elData(t,"pages");s.value=o,s.setAttribute("max",o),s.select(),r.textContent=e.get("wcf.page.jumpTo.description").replace(/#pages#/,o)},_keyUp:function(e){if(13===e.which&&!1===a.disabled)return void this._submit();var t=~~s.value;t<1||t>~~elAttr(s,"max")?a.disabled=!0:a.disabled=!1},_submit:function(e){o.get(n).callback(~~s.value),i.close(this)},_dialogSetup:function(){var t='<dl><dt><label for="jsPaginationPageNo">'+e.get("wcf.page.jumpTo")+'</label></dt><dd><input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny"><small></small></dd></dl><div class="formSubmit"><button class="buttonPrimary">'+e.get("wcf.global.button.submit")+"</button></div>";return{id:"paginationOverlay",options:{onSetup:function(e){s=elByTag("input",e)[0],s.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],a=elByTag("button",e)[0],a.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}}}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,i){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},i),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var i,n=elCreate("ul"),r=elCreate("li");r.className="skip",n.appendChild(r);var o="icon icon24 fa-chevron-left";this._options.activePage>1?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.previous"),i.rel="prev",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='<span class="'+o+'"></span>',r.classList.add("disabled")),n.appendChild(this._createLink(1));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;l<0&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePage<this._options.maxPage&&s--;var d=s/2,u=this._options.activePage,h=this._options.activePage;u<1&&(u=1),h<1&&(h=1),h>this._options.maxPage-1&&(h=this._options.maxPage-1),l>=d?u-=d:(u-=l,h+=d-l),c>=d?h+=d:(h+=c,u-=d-c),h=Math.ceil(h),u=Math.ceil(u),u<1&&(u=1),h>this._options.maxPage&&(h=this._options.maxPage);var f='<a class="jsTooltip" title="'+t.get("wcf.page.jumpTo")+'">&hellip;</a>';u>1&&(u-1<2?n.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0));for(var p=u+1;p<h;p++)n.appendChild(this._createLink(p));h<this._options.maxPage&&(this._options.maxPage-h<2?n.appendChild(this._createLink(this._options.maxPage-1)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0)),n.appendChild(this._createLink(this._options.maxPage)),r=elCreate("li"),r.className="skip",n.appendChild(r),o="icon icon24 fa-chevron-right",this._options.activePage<this._options.maxPage?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.next"),i.rel="next",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage+1))):(r.innerHTML='<span class="'+o+'"></span>',r.classList.add("disabled")),e&&(elData(n,"pages",this._options.maxPage),a.init(n,this.switchPage.bind(this))),this._element.appendChild(n)},_createLink:function(e){var i=elCreate("li");if(e!==this._options.activePage){var a=elCreate("a");a.textContent=n.addThousandsSeparator(e),a.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),i.appendChild(a)}else i.classList.add("active"),i.innerHTML="<span>"+n.addThousandsSeparator(e)+'</span><span class="invisible">'+t.get("wcf.page.pagePosition",{pageNo:e,pages:this._options.maxPage})+"</span>";return i},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(t,i){if("object"==typeof i&&(i.preventDefault(),i.currentTarget&&elData(i.currentTarget,"tooltip"))){var n=elById("balloonTooltip");n&&(e.triggerEvent(i.currentTarget,"mouseleave"),n.style.removeProperty("top"),n.style.removeProperty("bottom"))}if((t=~~t)>0&&this._options.activePage!==t&&t<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&!0!==this._options.callbackShouldSwitch(t))return;this._options.activePage=t,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(t)}}},r}),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["https://connect.facebook.net/en_US/sdk.js"],function(e){"use strict";return FB.init({version:"v7.0"}),FB}),define("WoltLabSuite/Core/Controller/Media/List",["Dom/ChangeListener","EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,a,r){"use strict";var o,s,l=elById("mediaListTableBody");return{init:function(i){i=i||{},s=new r("uploadButton","mediaListTableBody",{categoryId:i.categoryId,multiple:!0,elementTagSize:48}),n.init("wcf\\acp\\page\\MediaListPage",i.hasMarkedItems||!1,this),t.add("com.woltlab.wcf.media.upload","removedErroneousUploadRow",this._deleteCallback.bind(this)),new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".jsMediaRow").setCallback(this._deleteCallback),o=new a({_editorSuccess:function(e,t){e.categoryID!=t&&window.setTimeout(function(){window.location.reload()},500)}}),this._addButtonEventListeners(),e.add("WoltLabSuite/Core/Controller/Media/List",this._addButtonEventListeners.bind(this)),t.add("com.woltlab.wcf.media.upload","success",this._openEditorAfterUpload.bind(this))},_addButtonEventListeners:function(){for(var e,t=elByClass("jsMediaEditButton",l);t.length;)e=t[0],e.classList.remove("jsMediaEditButton"),e.addEventListener(WCF_CLICK_EVENT,this._edit.bind(this))},_deleteCallback:function(e){
+define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey","WoltLabSuite/Core/Media/Replace"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function f(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'.");this._media=null,this._availableLanguageCount=1,this._categoryIds=[],this._oldCategoryId=0,this._dialogs=new i}return f.prototype={_ajaxSetup:function(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}},_ajaxSuccess:function(e){l.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),s.close("mediaEditor_"+this._media.mediaID),this._media=null},_close:function(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()},_initEditor:function(e,t){this._availableLanguageCount=~~t.returnValues.availableLanguageCount,this._categoryIds=t.returnValues.categoryIDs.map(function(e){return~~e});t.returnValues.mediaData&&(this._media=t.returnValues.mediaData),setTimeout(function(){this._availableLanguageCount>1&&c.setLanguageId("mediaEditor_"+this._media.mediaID+"_languageID",this._media.languageID||LANGUAGE_ID),this._categoryIds.length&&(elBySel("select[name=categoryID]",e).value=~~this._media.categoryID);var t=elBySel("input[name=title]",e),a=elBySel("input[name=altText]",e),o=elBySel("textarea[name=caption]",e);if(this._availableLanguageCount>1&&this._media.isMultilingual?(elById("altText_"+this._media.mediaID)&&d.setValues("altText_"+this._media.mediaID,i.fromObject(this._media.altText||{})),elById("caption_"+this._media.mediaID)&&d.setValues("caption_"+this._media.mediaID,i.fromObject(this._media.caption||{})),d.setValues("title_"+this._media.mediaID,i.fromObject(this._media.title||{}))):(t.value=this._media.title?this._media.title[this._media.languageID||LANGUAGE_ID]:"",a&&(a.value=this._media.altText?this._media.altText[this._media.languageID||LANGUAGE_ID]:""),o&&(o.value=this._media.caption?this._media.caption[this._media.languageID||LANGUAGE_ID]:"")),this._availableLanguageCount>1){var s=elBySel("input[name=isMultilingual]",e);s.addEventListener("change",this._updateLanguageFields.bind(this)),this._updateLanguageFields(null,s)}var l=this._keyPress.bind(this);a&&a.addEventListener("keypress",l),t.addEventListener("keypress",l),elBySel("button[data-type=submit]",e).addEventListener(WCF_CLICK_EVENT,this._saveData.bind(this)),document.activeElement.blur(),elById("mediaEditor_"+this._media.mediaID).parentNode.scrollTop=0;var u=elByClass("mediaManagerMediaReplaceButton",e)[0],f=elByClass("mediaThumbnail",e)[0];f||(f=elCreate("div"),e.appendChild(f)),new h(this._media.mediaID,r.identify(u),r.identify(f),{mediaEditor:this}),n.trigger()}.bind(this),200)},_keyPress:function(e){u.Enter(e)&&(e.preventDefault(),this._saveData())},_saveData:function(){var t=s.getDialog("mediaEditor_"+this._media.mediaID).content,i=elBySel("select[name=categoryID]",t),n=elBySel("input[name=altText]",t),r=elBySel("textarea[name=caption]",t),l=elBySel("input[name=captionEnableHtml]",t),u=elBySel("input[name=title]",t),h=!1,f=!!n&&a.childByClass(n.parentNode.parentNode,"innerError"),p=!!r&&a.childByClass(r.parentNode.parentNode,"innerError"),m=a.childByClass(u.parentNode.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~i.value,-1===this._categoryIds.indexOf(this._media.categoryID)&&(this._media.categoryID=0)),this._availableLanguageCount>1?(this._media.isMultilingual=~~elBySel("input[name=isMultilingual]",t).checked,this._media.languageID=this._media.isMultilingual?null:c.getLanguageId("mediaEditor_"+this._media.mediaID+"_languageID")):this._media.languageID=LANGUAGE_ID,this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual){if(elById("altText_"+this._media.mediaID)&&!d.validate("altText_"+this._media.mediaID,!0)&&(h=!0,!f)){var g=elCreate("small");g.className="innerError",g.textContent=o.get("wcf.global.form.error.multilingual"),n.parentNode.parentNode.appendChild(g)}if(elById("caption_"+this._media.mediaID)&&!d.validate("caption_"+this._media.mediaID,!0)&&(h=!0,!p)){var g=elCreate("small");g.className="innerError",g.textContent=o.get("wcf.global.form.error.multilingual"),r.parentNode.parentNode.appendChild(g)}if(!d.validate("title_"+this._media.mediaID,!0)&&(h=!0,!m)){var g=elCreate("small");g.className="innerError",g.textContent=o.get("wcf.global.form.error.multilingual"),u.parentNode.parentNode.appendChild(g)}this._media.altText=elById("altText_"+this._media.mediaID)?d.getValues("altText_"+this._media.mediaID).toObject():"",this._media.caption=elById("caption_"+this._media.mediaID)?d.getValues("caption_"+this._media.mediaID).toObject():"",this._media.title=d.getValues("title_"+this._media.mediaID).toObject()}else this._media.altText[this._media.languageID]=n?n.value:"",this._media.caption[this._media.languageID]=r?r.value:"",this._media.title[this._media.languageID]=u.value;this._media.captionEnableHtml=l?~~l.checked:0;for(var v={allowAll:~~elById("mediaEditor_"+this._media.mediaID+"_aclAllowAll").checked,group:[],user:[]},_=elBySelAll('input[name="aclValues[group][]"]',t),b=0,w=_.length;b<w;b++)v.group.push(~~_[b].value);for(var y=elBySelAll('input[name="aclValues[user][]"]',t),b=0,w=y.length;b<w;b++)v.user.push(~~y[b].value);h||(f&&elRemove(f),p&&elRemove(p),m&&elRemove(m),e.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{aclValues:v,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}}))},_updateLanguageFields:function(e,t){e&&(t=e.currentTarget);var i=elById("mediaEditor_"+this._media.mediaID+"_languageIDContainer").parentNode;t.checked?(d.enable("title_"+this._media.mediaID),elById("caption_"+this._media.mediaID)&&d.enable("caption_"+this._media.mediaID),elById("altText_"+this._media.mediaID)&&d.enable("altText_"+this._media.mediaID),elHide(i)):(d.disable("title_"+this._media.mediaID),elById("caption_"+this._media.mediaID)&&d.disable("caption_"+this._media.mediaID),elById("altText_"+this._media.mediaID)&&d.disable("altText_"+this._media.mediaID),elShow(i))},edit:function(e){if("object"!=typeof e&&(e={mediaID:~~e}),null!==this._media)throw new Error("Cannot edit media with id '"+e.mediaID+"' while editing media with id '"+this._media.mediaID+"'");this._media=e,this._dialogs.has("mediaEditor_"+e.mediaID)||this._dialogs.set("mediaEditor_"+e.mediaID,{_dialogSetup:function(){return{id:"mediaEditor_"+e.mediaID,options:{backdropCloseOnClick:!1,onClose:this._close.bind(this),title:o.get("wcf.media.edit")},source:{after:this._initEditor.bind(this),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[e.mediaID]}}}}.bind(this)}),s.open(this._dialogs.get("mediaEditor_"+e.mediaID))},updateData:function(e){this._callbackObject._editorSuccess&&this._callbackObject._editorSuccess(e)}},f}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/Util","../Upload"],function(e,t,i){"use strict";function n(e,t,n){i.call(this,e,t,n)}return e.inherit(n,i,{_createButton:function(){n._super.prototype._createButton.call(this);var e=elBySel("span",this._button),i=document.createTextNode(" ");t.prepend(i,e);var a=elCreate("span");a.className="icon icon16 fa-upload",t.prepend(a,e)},_getParameters:function(){return this._options.categoryId?e.extend(n._super.prototype._getParameters.call(this),{categoryID:this._options.categoryId}):n._super.prototype._getParameters.call(this)}}),n}),define("WoltLabSuite/Core/Media/Clipboard",["Ajax","Dom/ChangeListener","EventHandler","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,a,r,o,s,l){"use strict";var c,d=[];return{init:function(e,t,n){o.setup({hasMarkedItems:t,pageClassName:e}),c=n,i.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",this._clipboardAction.bind(this))},_ajaxSetup:function(){return{data:{className:"wcf\\data\\media\\MediaAction"}}},_ajaxSuccess:function(e){switch(e.actionName){case"getSetCategoryDialog":a.open(this,e.returnValues.template);break;case"setCategory":a.close(this),r.show(),o.reload()}},_dialogSetup:function(){return{id:"mediaSetCategoryDialog",options:{onSetup:function(e){elBySel("button",e).addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),this._setCategory(~~elBySel('select[name="categoryID"]',e).value),t.currentTarget.disabled=!0}.bind(this))}.bind(this),title:n.get("wcf.media.setCategory")},source:null}},_clipboardAction:function(t){var i=t.data.parameters.objectIDs;switch(t.data.actionName){case"com.woltlab.wcf.media.delete":null!==t.responseData&&c.clipboardDeleteMedia(i);break;case"com.woltlab.wcf.media.insert":c.clipboardInsertMedia(i);break;case"com.woltlab.wcf.media.setCategory":d=i,e.api(this,{actionName:"getSetCategoryDialog"})}},_setCategory:function(t){e.api(this,{actionName:"setCategory",objectIDs:d,parameters:{categoryID:t}})}}}),define("WoltLabSuite/Core/Notification/Handler",["Ajax","Core","EventHandler","StringUtil"],function(e,t,i,n){"use strict";if(!("Promise"in window&&"Notification"in window))return{setup:function(){}};var a=!1,r="",o=0,s=window.TIME_NOW,l=null,c=0;return{setup:function(e){if(e=t.extend({enableNotifications:!1,icon:"",sessionKeepAlive:0},e),r=e.icon,c=60*e.sessionKeepAlive,this._prepareNextRequest(),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this)),window.addEventListener("storage",this._onStorage.bind(this)),this._onVisibilityChange(null),e.enableNotifications)switch(window.Notification.permission){case"granted":a=!0;break;case"default":window.Notification.requestPermission(function(e){"granted"===e&&(a=!0)})}},_onVisibilityChange:function(e){if(null!==e&&!document.hidden){(Date.now()-o)/6e4>4&&(this._resetTimer(),this._dispatchRequest())}o=document.hidden?Date.now():0},_getNextDelay:function(){if(0===o)return 5;var e=~~((Date.now()-o)/6e4);return e<15?5:e<30?10:15},_resetTimer:function(){null!==l&&(window.clearTimeout(l),l=null)},_prepareNextRequest:function(){this._resetTimer();var e=Math.min(this._getNextDelay(),c);l=window.setTimeout(this._dispatchRequest.bind(this),6e4*e)},_dispatchRequest:function(){var t={};i.fire("com.woltlab.wcf.notification","beforePoll",t),t.lastRequestTimestamp=s,e.api(this,{parameters:t})},_onStorage:function(){this._prepareNextRequest();var e,n,a=!1;try{e=window.localStorage.getItem(t.getStoragePrefix()+"notification"),n=window.localStorage.getItem(t.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),n=JSON.parse(n)}catch(e){a=!0}a||i.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:n})},_ajaxSuccess:function(e){var n=!1,a=e.returnValues.keepAliveData,r=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks({returnValues:a});try{window.localStorage.setItem(t.getStoragePrefix()+"notification",JSON.stringify(r)),window.localStorage.setItem(t.getStoragePrefix()+"keepAliveData",JSON.stringify(a))}catch(e){n=!0,window.console.log(e)}n||this._prepareNextRequest(),s=e.returnValues.lastRequestTimestamp,i.fire("com.woltlab.wcf.notification","afterPoll",r),this._showNotification(r)},_showNotification:function(e){if(a&&"object"==typeof e.notification&&"string"==typeof e.notification.message){var t=new window.Notification(e.notification.title,{body:n.unescapeHTML(e.notification.message),icon:r});t.onclick=function(){window.focus(),t.close(),window.location=e.notification.link}}},_ajaxSetup:function(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}}),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["Dictionary","EventHandler","Language"],function(e,t,i){"use strict";var n=!1,a=new e,r=!1,o=!1,s=null;return{init:function(e){n||this._setup(),a.set(e.uuid,{editor:e,element:null})},_dragOver:function(e){if(e.preventDefault(),e.dataTransfer&&e.dataTransfer.types){var t=!1;for(var n in e.dataTransfer)if(e.dataTransfer.hasOwnProperty(n)&&n.match(/^moz/)){t=!0;break}if(o=!1,t)"application/x-moz-file"===e.dataTransfer.types[0]&&(o=!0);else for(var s=0;s<e.dataTransfer.types.length;s++)if("Files"===e.dataTransfer.types[s]){o=!0;break}o&&(r||(r=!0,a.forEach(function(e,t){var n=e.editor.$editor[0];if(!n.parentNode)return void a.delete(t);var r=e.element;null===r&&(r=elCreate("div"),r.className="redactorDropArea",elData(r,"element-id",e.editor.$element[0].id),elData(r,"drop-here",i.get("wcf.attachment.dragAndDrop.dropHere")),elData(r,"drop-now",i.get("wcf.attachment.dragAndDrop.dropNow")),r.addEventListener("dragover",function(){r.classList.add("active")}),r.addEventListener("dragleave",function(){r.classList.remove("active")}),r.addEventListener("drop",this._drop.bind(this)),e.element=r),n.parentNode.insertBefore(r,n),r.style.setProperty("top",n.offsetTop+"px","")}.bind(this))))}},_drop:function(e){if(o&&e.dataTransfer&&e.dataTransfer.files.length){e.preventDefault();for(var i=elData(e.currentTarget,"element-id"),n=0,a=e.dataTransfer.files.length;n<a;n++)t.fire("com.woltlab.wcf.redactor2","dragAndDrop_"+i,{file:e.dataTransfer.files[n]});this._dragLeave()}},_dragLeave:function(){r&&o&&(null!==s&&window.clearTimeout(s),s=window.setTimeout(function(){r||a.forEach(function(e){e.element&&e.element.parentNode&&(e.element.classList.remove("active"),elRemove(e.element))}),s=null},100),r=!1)},_globalDrop:function(e){if(null===e.target.closest(".redactor-layer")){var i={cancelDrop:!0,event:e};a.forEach(function(e){t.fire("com.woltlab.wcf.redactor2","dragAndDrop_globalDrop_"+e.editor.$element[0].id,i)}),i.cancelDrop&&e.preventDefault()}this._dragLeave(e)},_setup:function(){window.addEventListener("dragend",function(e){e.preventDefault()}),window.addEventListener("dragover",this._dragOver.bind(this)),window.addEventListener("dragleave",this._dragLeave.bind(this)),window.addEventListener("drop",this._globalDrop.bind(this)),n=!0}}}),define("WoltLabSuite/Core/Ui/DragAndDrop",["Core","EventHandler","WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(e,t,i){return{register:function(n){var a=e.getUuid();n=e.extend({element:"",elementId:"",onDrop:function(e){},onGlobalDrop:function(e){}}),t.add("com.woltlab.wcf.redactor2","dragAndDrop_"+n.elementId,n.onDrop),t.add("com.woltlab.wcf.redactor2","dragAndDrop_globalDrop_"+n.elementId,n.onGlobalDrop),i.init({uuid:a,$editor:[n.element],$element:[{id:n.elementId}]})}}}),define("WoltLabSuite/Core/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,i){"use strict";function n(e,t){this.init(e,t)}return n.prototype={init:function(e,i){if(this._dropdownMenu=null,this._value="",this._element=elById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],threshold:3},i),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},isActive:function(){return null!==this._dropdownMenu&&i.isOpen(this._element.id)},_keyDown:function(e){if(!this.isActive())return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,n=0,a=this._dropdownMenu.childElementCount;n<a&&(t=this._dropdownMenu.children[n],!t.classList.contains("active"));)n++;if(13===e.keyCode)i.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!i.isOpen(this._element.id))return!0;i.close(this._element.id)}else{var r=0;38===e.keyCode?r=(0===n?a:n)-1:40===e.keyCode&&(r=n+1)===a&&(r=0),r!==n&&(t.classList.remove("active"),this._dropdownMenu.children[r].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode);var i=e.children[0];this._options.callbackSelect(this._element.id,{objectId:elData(i,"object-id"),value:e.textContent,type:elData(i,"type")}),t&&this._element.focus()},_keyUp:function(t){var n=t.currentTarget.value.trim();if(this._value!==n){if(n.length<this._options.threshold)return null!==this._dropdownMenu&&i.close(this._element.id),void(this._value=n);this._value=n,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:n}}})}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=elCreate("div"),this._dropdownMenu.className="dropdownMenu",i.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,n,a,r=0,o=e.returnValues.length;r<o;r++)n=e.returnValues[r],t=elCreate("a"),n.icon?(t.className="box16",t.innerHTML=n.icon+" <span></span>",t.children[1].textContent=n.label):t.textContent=n.label,elData(t,"object-id",n.objectID),n.type&&elData(t,"type",n.type),t.addEventListener(WCF_CLICK_EVENT,this._select.bind(this)),a=elCreate("li"),0===r&&(a.className="active"),a.appendChild(t),this._dropdownMenu.appendChild(a);i.open(this._element.id,!0)}else i.close(this._element.id)}},n}),define("WoltLabSuite/Core/Ui/ItemList",["Core","Dictionary","Language","Dom/Traverse","EventKey","WoltLabSuite/Core/Ui/Suggestion","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o){"use strict";var s="",l=new t,c=!1,d=null,u=null,h=null,f=null,p=null,m=null;return{init:function(t,i,a){var s=elById(t);if(null===s)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(l.has(t)){var c=l.get(t);for(var d in c)if(c.hasOwnProperty(d)){var u=c[d];u instanceof Element&&u.parentNode&&elRemove(u)}o.destroy(t),l.delete(t)}a=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},a);var h=n.parentByTag(s,"FORM");if(null!==h)if(!1===a.isCSV){if(!a.submitFieldName.length&&"function"!=typeof a.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=l.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}var i=this.getValues(t);if(a.submitFieldName.length)for(var n,r=0,o=i.length;r<o;r++)n=elCreate("input"),n.type="hidden",n.name=a.submitFieldName.replace("{$objectId}",i[r].objectId),n.value=i[r].value,h.appendChild(n);else a.callbackSubmit(h,i)}.bind(this))}else h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=l.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}}.bind(this));this._setup();var f=this._createUI(s,a),p=new r(t,{ajax:a.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:a.excludedSearchValues});if(l.set(t,{dropdownMenu:null,element:f.element,limitReached:f.limitReached,list:f.list,listItem:f.element.parentNode,options:a,shadow:f.shadow,suggestion:p}),i=a.callbackSetupValues?a.callbackSetupValues():f.values.length?f.values:i,Array.isArray(i))for(var m,g=0,v=i.length;g<v;g++)m=i[g],"string"==typeof m&&(m={objectId:0,value:m}),this._addItem(t,m)},getValues:function(e){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=l.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent.trim(),type:elData(e,"type")})}),i},setValues:function(e,t){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,a,r=l.get(e),o=n.childrenByClass(r.list,"item");for(i=0,a=o.length;i<a;i++)this._removeItem(null,o[i],!0);for(i=0,a=t.length;i<a;i++)this._addItem(e,t[i])},_setup:function(){c||(c=!0,d=this._keyDown.bind(this),u=this._keyPress.bind(this),h=this._keyUp.bind(this),f=this._paste.bind(this),p=this._removeItem.bind(this),m=this._blur.bind(this))},_createUI:function(e,t){var n=elCreate("ol");n.className="inputItemList"+(e.disabled?" disabled":""),elData(n,"element-id",e.id),n.addEventListener(WCF_CLICK_EVENT,function(t){t.target===n&&e.focus()});var a=elCreate("li");a.className="input",n.appendChild(a),e.addEventListener("keydown",d),e.addEventListener("keypress",u),e.addEventListener("keyup",h),e.addEventListener("paste",f);var r=e===document.activeElement;r&&e.blur(),e.addEventListener("blur",m),e.parentNode.insertBefore(n,e),a.appendChild(e),r&&window.setTimeout(function(){e.focus()},1),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var o=elCreate("span");o.className="inputItemListLimitReached",o.textContent=i.get("wcf.global.form.input.maxItems"),elHide(o),a.appendChild(o);var s=null,l=[];if(t.isCSV){s=elCreate("input"),s.className="itemListInputShadow",s.type="hidden",s.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(s,n);for(var c,p=e.value.split(","),g=0,v=p.length;g<v;g++)c=p[g].trim(),c.length&&l.push(c);if("TEXTAREA"===e.nodeName){var _=elCreate("input");_.type="text",e.parentNode.insertBefore(_,e),_.id=e.id,elRemove(e),e=_}}return{element:e,limitReached:o,list:n,shadow:s,values:l}},_acceptsNewItems:function(e){var t=l.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems},_handleLimit:function(e){var t=l.get(e);this._acceptsNewItems(e)?(elShow(t.element),elHide(t.limitReached)):(elHide(t.element),elShow(t.limitReached))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;s=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(a.Enter(e)||a.Comma(e)){if(e.preventDefault(),l.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_paste:function(e){var t="";t="object"==typeof window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData.getData("text/plain");var i=e.currentTarget,n=i.id,a=~~elAttr(i,"maxLength");t.split(/,/).forEach(function(e){e=e.trim(),a&&e.length>a&&(e=e.substr(0,a)),e.length>0&&this._acceptsNewItems(n)&&this._addItem(n,{objectId:0,value:e})}.bind(this)),e.preventDefault()},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=l.get(e),n=elCreate("li");n.className="item";var a=elCreate("span");if(a.className="content",elData(a,"object-id",t.objectId),t.type&&elData(a,"type",t.type),a.textContent=t.value,n.appendChild(a),!i.element.disabled){var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener(WCF_CLICK_EVENT,p),n.appendChild(r)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||this._handleLimit(e);var o=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===o&&(o=this.getValues(e)),i.options.callbackChange(e,o))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,a=elData(n,"element-id"),r=l.get(a);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),i||r.element.focus(),this._handleLimit(a);var o=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===o&&(o=this.getValues(a)),r.options.callbackChange(a,o))},_syncShadow:function(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;n<a;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i},_blur:function(e){var t=e.currentTarget,i=l.get(t.id);if(!i.options.restricted){var n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||this._addItem(t.id,{objectId:0,value:n}))}}}}),define("WoltLabSuite/Core/Ui/Page/JumpTo",["Language","ObjectMap","Ui/Dialog"],function(e,t,i){"use strict";var n=null,a=null,r=null,o=new t,s=null;return{init:function(e,t){if(null===(t=t||null)){var i=elData(e,"link");t=i?function(e){window.location=i.replace(/pageNo=%d/,"pageNo="+e)}:function(){}}else if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.");o.has(e)||elBySelAll(".jumpTo",e,function(i){i.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,e)),o.set(e,{callback:t})}.bind(this))},_click:function(t,a){n=t,"object"==typeof a&&a.preventDefault(),i.open(this);var o=elData(t,"pages");s.value=o,s.setAttribute("max",o),s.select(),r.textContent=e.get("wcf.page.jumpTo.description").replace(/#pages#/,o)},_keyUp:function(e){if(13===e.which&&!1===a.disabled)return void this._submit();var t=~~s.value;t<1||t>~~elAttr(s,"max")?a.disabled=!0:a.disabled=!1},_submit:function(e){o.get(n).callback(~~s.value),i.close(this)},_dialogSetup:function(){var t='<dl><dt><label for="jsPaginationPageNo">'+e.get("wcf.page.jumpTo")+'</label></dt><dd><input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny"><small></small></dd></dl><div class="formSubmit"><button class="buttonPrimary">'+e.get("wcf.global.button.submit")+"</button></div>";return{id:"paginationOverlay",options:{onSetup:function(e){s=elByTag("input",e)[0],s.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],a=elByTag("button",e)[0],a.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}}}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,i){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},i),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var i,n=elCreate("ul"),r=elCreate("li");r.className="skip",n.appendChild(r);var o="icon icon24 fa-chevron-left";this._options.activePage>1?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.previous"),i.rel="prev",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='<span class="'+o+'"></span>',r.classList.add("disabled")),n.appendChild(this._createLink(1));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;l<0&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePage<this._options.maxPage&&s--;var d=s/2,u=this._options.activePage,h=this._options.activePage;u<1&&(u=1),h<1&&(h=1),h>this._options.maxPage-1&&(h=this._options.maxPage-1),l>=d?u-=d:(u-=l,h+=d-l),c>=d?h+=d:(h+=c,u-=d-c),h=Math.ceil(h),u=Math.ceil(u),u<1&&(u=1),h>this._options.maxPage&&(h=this._options.maxPage);var f='<a class="jsTooltip" title="'+t.get("wcf.page.jumpTo")+'">&hellip;</a>';u>1&&(u-1<2?n.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0));for(var p=u+1;p<h;p++)n.appendChild(this._createLink(p));h<this._options.maxPage&&(this._options.maxPage-h<2?n.appendChild(this._createLink(this._options.maxPage-1)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0)),n.appendChild(this._createLink(this._options.maxPage)),r=elCreate("li"),r.className="skip",n.appendChild(r),o="icon icon24 fa-chevron-right",this._options.activePage<this._options.maxPage?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.next"),i.rel="next",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage+1))):(r.innerHTML='<span class="'+o+'"></span>',r.classList.add("disabled")),e&&(elData(n,"pages",this._options.maxPage),a.init(n,this.switchPage.bind(this))),this._element.appendChild(n)},_createLink:function(e){var i=elCreate("li");if(e!==this._options.activePage){var a=elCreate("a");a.textContent=n.addThousandsSeparator(e),a.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),i.appendChild(a)}else i.classList.add("active"),i.innerHTML="<span>"+n.addThousandsSeparator(e)+'</span><span class="invisible">'+t.get("wcf.page.pagePosition",{pageNo:e,pages:this._options.maxPage})+"</span>";return i},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(t,i){if("object"==typeof i&&(i.preventDefault(),i.currentTarget&&elData(i.currentTarget,"tooltip"))){var n=elById("balloonTooltip");n&&(e.triggerEvent(i.currentTarget,"mouseleave"),n.style.removeProperty("top"),n.style.removeProperty("bottom"))}if((t=~~t)>0&&this._options.activePage!==t&&t<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&!0!==this._options.callbackShouldSwitch(t))return;this._options.activePage=t,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(t)}}},r}),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["https://connect.facebook.net/en_US/sdk.js"],function(e){"use strict";return FB.init({version:"v7.0"}),FB}),define("WoltLabSuite/Core/Controller/Media/List",["Dom/ChangeListener","EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,a,r){"use strict";var o,s,l=elById("mediaListTableBody");return{init:function(i){i=i||{},s=new r("uploadButton","mediaListTableBody",{categoryId:i.categoryId,multiple:!0,elementTagSize:48}),n.init("wcf\\acp\\page\\MediaListPage",i.hasMarkedItems||!1,this),t.add("com.woltlab.wcf.media.upload","removedErroneousUploadRow",this._deleteCallback.bind(this)),new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".jsMediaRow").setCallback(this._deleteCallback),o=new a({_editorSuccess:function(e,t){e.categoryID!=t&&window.setTimeout(function(){window.location.reload()},500)}}),this._addButtonEventListeners(),e.add("WoltLabSuite/Core/Controller/Media/List",this._addButtonEventListeners.bind(this)),t.add("com.woltlab.wcf.media.upload","success",this._openEditorAfterUpload.bind(this))},_addButtonEventListeners:function(){for(var e,t=elByClass("jsMediaEditButton",l);t.length;)e=t[0],e.classList.remove("jsMediaEditButton"),e.addEventListener(WCF_CLICK_EVENT,this._edit.bind(this))},_deleteCallback:function(e){
 var t=elByTag("tr",l).length;void 0===e.length?t||window.location.reload():e.length===t?window.location.reload():i.reload.bind(i)},_edit:function(e){o.edit(elData(e.currentTarget,"object-id"))},_openEditorAfterUpload:function(e){if(e.upload===s&&!e.isMultiFileUpload&&!s.hasPendingUploads()){var t=Object.keys(e.media);t.length&&o.edit(e.media[t[0]])}},clipboardDeleteMedia:function(e){for(var t=elByClass("jsMediaRow"),i=0;i<t.length;i++){var n=t[i],a=~~elData(elByClass("jsClipboardItem",n)[0],"object-id");-1!==e.indexOf(a)&&(elRemove(n),i--)}t.length||window.location.reload()}}}),define("WoltLabSuite/Core/Controller/Notice/Dismiss",["Ajax"],function(e){"use strict";return{setup:function(){var e=elByClass("jsDismissNoticeButton");if(e.length)for(var t=this._click.bind(this),i=0,n=e.length;i<n;i++)e[i].addEventListener(WCF_CLICK_EVENT,t)},_click:function(t){var i=t.currentTarget;e.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[elData(i,"object-id")]},success:function(){elRemove(i.parentNode)}})}}}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["Dictionary","Dom/ChangeListener","EventHandler","List","Dom/Traverse","Dom/Util","ObjectMap"],function(e,t,i,n,a,r,o){"use strict";var s=!1,l=!0,c=new n,d=new e,u=new n,h=new e,f=new o;return{_hide:function(t){elHide(t),c.add(t),t.classList.contains("tabMenuContent")&&elBySelAll("li",a.prevByClass(t,"tabMenu"),function(e){elData(e,"name")===elData(t,"name")&&elHide(e)}),elBySelAll("[max], [maxlength], [min], [required]",t,function(t){var i=new e,n=elAttr(t,"max");n&&(i.set("max",n),t.removeAttribute("max"));var a=elAttr(t,"maxlength");a&&(i.set("maxlength",a),t.removeAttribute("maxlength"));var r=elAttr(t,"min");r&&(i.set("min",r),t.removeAttribute("min")),t.required&&(i.set("required",!0),t.removeAttribute("required")),f.set(t,i)})},_show:function(e){elShow(e),c.delete(e),e.classList.contains("tabMenuContent")&&elBySelAll("li",a.prevByClass(e,"tabMenu"),function(t){elData(t,"name")===elData(e,"name")&&elShow(t)}),elBySelAll("input, select",e,function(t){for(var i=t.parentNode;i!==e&&"none"!==i.style.getPropertyValue("display");)i=i.parentNode;if(i===e&&f.has(t)){var n=f.get(t);n.has("max")&&elAttr(t,"max",n.get("max")),n.has("maxlength")&&elAttr(t,"maxlength",n.get("maxlength")),n.has("min")&&elAttr(t,"min",n.get("min")),n.has("required")&&elAttr(t,"required",""),f.delete(t)}})},addDependency:function(e){var t=e.getDependentNode();h.has(t.id)?h.get(t.id).push(e):h.set(t.id,[e]);for(var i=e.getFields(),n=0,a=i.length;n<a;n++){var o=i[n],s=r.identify(o);d.has(s)||(d.set(s,o),"INPUT"!==o.tagName||"checkbox"!==o.type&&"radio"!==o.type&&"hidden"!==o.type?o.addEventListener("input",this.checkDependencies.bind(this)):o.addEventListener("change",this.checkDependencies.bind(this)))}},checkDependencies:function(){var e=[];h.forEach(function(t,i){var n=elById(i);if(null===n)return void e.push(n);for(var a=0,r=t.length;a<r;a++)if(!t[a].checkDependency())return void this._hide(n);this._show(n)}.bind(this));for(var t=0,i=e.length;t<i;t++)h.delete(e.id);this.checkContainers()},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)},checkContainers:function(){if(!0===s)return void(l=!0);s=!0,l=!1,i.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),s=!1,l&&this.checkContainers()},isHiddenByDependencies:function(e){if(c.has(e))return!0;var t=!1;return c.forEach(function(i){r.contains(i,e)&&(t=!0)}),t},register:function(e){var t=elById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(u.has(t))throw new Error("Form with id '"+e+"' has already been registered.");u.add(t)},unregister:function(e){var t=elById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!u.has(t))throw new Error("Form with id '"+e+"' has not been registered.");u.delete(t),c.forEach(function(e){t.contains(e)&&c.delete(e)}),h.forEach(function(e,i){t.contains(elById(i))&&h.delete(i);for(var n=0,a=e.length;n<a;n++)for(var r=e[n].getFields(),o=0,s=r.length;o<s;o++){var l=r[o];d.delete(l.id),f.delete(l)}})}}}),define("WoltLabSuite/Core/Form/Builder/Field/Field",[],function(){"use strict";function e(e){this.init(e)}return e.prototype={init:function(e){this._fieldId=e,this._readField()},_getData:function(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")},_readField:function(){if(this._field=elById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")},destroy:function(){},getData:function(){return Promise.resolve(this._getData())},getId:function(){return this._fieldId}},e}),define("WoltLabSuite/Core/Form/Builder/Manager",["Core","Dictionary","EventHandler","./Field/Dependency/Manager","./Field/Field"],function(e,t,i,n,a){"use strict";var r=new t,o=new t;return{getData:function(t){if(!this.hasForm(t))throw new Error("Unknown form with id '"+t+"'.");var i=[];return r.get(t).forEach(function(e){var t=e.getData();if(!(t instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");i.push(t)}),Promise.all(i).then(function(t){for(var i={},n=0,a=t.length;n<a;n++)i=e.extend(i,t[n]);return i})},getField:function(e,t){if(!this.hasField(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return r.get(e).get(t)},getForm:function(e){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");return o.get(e)},hasField:function(e,t){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");return r.get(e).has(t)},hasForm:function(e){return o.has(e)},registerField:function(e,t){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof a))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");var i=t.getId();if(this.hasField(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");r.get(e).set(i,t)},registerForm:function(e){if(this.hasForm(e))throw new Error("Form with id '"+e+"' has already been registered.");var n=elById(e);if(null===n)throw new Error("Unknown form with id '"+e+"'.");o.set(e,n),r.set(e,new t),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},unregisterForm:function(e){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");i.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),o.delete(e),r.get(e).forEach(function(e){e.destroy()}),r.delete(e),n.unregister(e),i.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}}}),define("WoltLabSuite/Core/Form/Builder/Dialog",["Ajax","Core","./Manager","Ui/Dialog"],function(e,t,i,n){"use strict";function a(e,t,i,n){this.init(e,t,i,n)}return a.prototype={init:function(e,i,n,a){this._dialogId=e,this._className=i,this._actionName=n,this._options=t.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:this._className.match(/\w+\\data\\/)},a),this._options.dialog=t.extend(this._options.dialog||{},{onClose:this._dialogOnClose.bind(this)}),this._formId="",this._dialogContent=""},_ajaxSetup:function(){var e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+SECURITY_TOKEN,e.withCredentials=!0),e},_ajaxSuccess:function(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");if(void 0===e.returnValues.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.returnValues.formId)throw new Error("Missing form id in return data.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&e.returnValues.formId&&e.returnValues.dialog){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+"'.")}},_closeDialog:function(){n.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()},_dialogOnClose:function(){this._options.destroyOnClose&&this.destroy()},_dialogSetup:function(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}},_dialogSubmit:function(){this.getData().then(this._submitForm.bind(this))},_openDialogContent:function(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;var i=n.open(this,this._dialogContent),a=elBySel("button[data-type=cancel]",i.content);null===a||elDataBool(a,"has-event-listener")||(a.addEventListener("click",this._closeDialog.bind(this)),elData(a,"has-event-listener",1))},_submitForm:function(t){var i=elBySel("button[data-type=submit]",n.getDialog(this).content);"function"==typeof this._options.onSubmit?this._options.onSubmit(t,i):"string"==typeof this._options.submitActionName&&(i.disabled=!0,e.api(this,{actionName:this._options.submitActionName,parameters:{data:t,formId:this._formId}}))},destroy:function(e){""!==this._formId&&(i.hasForm(this._formId)&&i.unregisterForm(this._formId),!0!==e&&n.destroy(this))},getData:function(){if(""===this._formId)throw new Error("Form has not been requested yet.");return i.getData(this._formId)},open:function(){n.getDialog(this._dialogId)?n.openStatic(this._dialogId):e.api(this)}},a}),define("WoltLabSuite/Core/Media/Manager/Search",["Ajax","Core","Dom/Traverse","Dom/Util","EventKey","Language","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o){"use strict";function s(e){this._mediaManager=e,this._searchMode=!1,this._searchContainer=elByClass("mediaManagerSearch",e.getDialog())[0],this._input=elByClass("mediaManagerSearchField",e.getDialog())[0],this._input.addEventListener("keypress",this._keyPress.bind(this)),this._cancelButton=elByClass("mediaManagerSearchCancelButton",e.getDialog())[0],this._cancelButton.addEventListener(WCF_CLICK_EVENT,this._cancelSearch.bind(this))}return s.prototype={_ajaxSetup:function(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\media\\MediaAction",interfaceName:"wcf\\data\\ISearchAction"}}},_ajaxSuccess:function(e){this._mediaManager.setMedia(e.returnValues.media||{},e.returnValues.template||"",{pageCount:e.returnValues.pageCount||0,pageNo:e.returnValues.pageNo||0}),elByClass("dialogContent",this._mediaManager.getDialog())[0].scrollTop=0},_cancelSearch:function(){this._searchMode&&(this._searchMode=!1,this.resetSearch(),this._mediaManager.resetMedia())},_hideStringThresholdError:function(){var e=i.childByClass(this._input.parentNode.parentNode,"innerInfo");e&&elHide(e)},_keyPress:function(e){a.Enter(e)&&(e.preventDefault(),this._input.value.length>=this._mediaManager.getOption("minSearchLength")?(this._hideStringThresholdError(),this.search()):this._showStringThresholdError())},_showStringThresholdError:function(){var e=i.childByClass(this._input.parentNode.parentNode,"innerInfo");e?elShow(e):(e=elCreate("p"),e.className="innerInfo",e.textContent=r.get("wcf.media.search.info.searchStringThreshold",{minSearchLength:this._mediaManager.getOption("minSearchLength")}),n.insertAfter(e,this._input.parentNode))},hideSearch:function(){elHide(this._searchContainer)},resetSearch:function(){this._input.value=""},showSearch:function(){elShow(this._searchContainer)},search:function(t){"number"!=typeof t&&(t=1);var i=this._input.value;i&&this._input.value.length<this._mediaManager.getOption("minSearchLength")?(this._showStringThresholdError(),i=""):this._hideStringThresholdError(),this._searchMode=!0,e.api(this,{parameters:{categoryID:this._mediaManager.getCategoryId(),imagesOnly:this._mediaManager.getOption("imagesOnly"),mode:this._mediaManager.getMode(),pageNo:t,searchString:i}})}},s}),define("WoltLabSuite/Core/Media/Manager/Base",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","List","Permission","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/Upload","WoltLabSuite/Core/Media/Manager/Search","StringUtil","WoltLabSuite/Core/Ui/Pagination","WoltLabSuite/Core/Media/Clipboard"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,f,p,m,g,v){"use strict";function _(n){this._options=e.extend({dialogTitle:o.get("wcf.media.manager"),imagesOnly:!1,minSearchLength:3},n),this._id="mediaManager"+b++,this._listItems=new t,this._media=new t,this._mediaManagerMediaList=null,this._search=null,this._upload=null,this._forceClipboard=!1,this._hadInitiallyMarkedItems=!1,this._pagination=null,l.get("admin.content.cms.canManageMedia")&&(this._mediaEditor=new h(this)),i.add("WoltLabSuite/Core/Media/Manager",this._addButtonEventListeners.bind(this)),r.add("com.woltlab.wcf.media.upload","success",this._openEditorAfterUpload.bind(this))}var b=0;return _.prototype={_addButtonEventListeners:function(){if(this._mediaManagerMediaList)for(var e=n.childrenByTag(this._mediaManagerMediaList,"LI"),t=0,i=e.length;t<i;t++){var a=e[t];if(l.get("admin.content.cms.canManageMedia")){var r=elByClass("jsMediaEditButton",a)[0];r&&(r.classList.remove("jsMediaEditButton"),r.addEventListener(WCF_CLICK_EVENT,this._editMedia.bind(this)))}}},_categoryChange:function(){this._search.search()},_click:function(e){e.preventDefault(),c.open(this)},_dialogClose:function(){(l.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.hideEditor("com.woltlab.wcf.media")},_dialogInit:function(e,t){var i=t.returnValues.media||{};for(var n in i)objOwns(i,n)&&this._media.set(~~n,i[n]);this._initPagination(~~t.returnValues.pageCount),this._hadInitiallyMarkedItems=t.returnValues.hasMarkedItems},_dialogSetup:function(){return{id:this._id,options:{onClose:this._dialogClose.bind(this),onShow:this._dialogShow.bind(this),title:this._options.dialogTitle},source:{after:this._dialogInit.bind(this),data:{actionName:"getManagementDialog",className:"wcf\\data\\media\\MediaAction",parameters:{mode:this.getMode(),imagesOnly:this._options.imagesOnly}}}}},_dialogShow:function(){if(!this._mediaManagerMediaList){var e=this.getDialog();this._mediaManagerMediaList=elByClass("mediaManagerMediaList",e)[0],this._mediaCategorySelect=elBySel(".mediaManagerCategoryList > select",e),this._mediaCategorySelect&&this._mediaCategorySelect.addEventListener("change",this._categoryChange.bind(this));for(var t=n.childrenByTag(this._mediaManagerMediaList,"LI"),i=0,r=t.length;i<r;i++){var o=t[i];this._listItems.set(~~elData(o,"object-id"),o)}if(l.get("admin.content.cms.canManageMedia")){var s=elByClass("mediaManagerMediaUploadButton",c.getDialog(this).dialog)[0];this._upload=new f(a.identify(s),a.identify(this._mediaManagerMediaList),{mediaManager:this});new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".mediaFile")._didTriggerEffect=function(e){this.removeMedia(elData(e[0],"object-id"))}.bind(this)}l.get("admin.content.cms.canManageMedia")||this._forceClipboard?v.init("menuManagerDialog-"+this.getMode(),!!this._hadInitiallyMarkedItems,this):this._removeClipboardCheckboxes(),this._search=new p(this),t.length||this._search.hideSearch()}(l.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.showEditor("com.woltlab.wcf.media")},_editMedia:function(e){if(!l.get("admin.content.cms.canManageMedia"))throw new Error("You are not allowed to edit media files.");c.close(this),this._mediaEditor.edit(this._media.get(~~elData(e.currentTarget,"object-id")))},_editorClose:function(){c.open(this)},_editorSuccess:function(e,t){if(this._mediaCategorySelect){var i=~~this._mediaCategorySelect.value;if(i){var n=~~e.categoryID;t==n||t!=i&&n!=i||this._search.search()}}c.open(this),this._media.set(~~e.mediaID,e);var a=this._listItems.get(~~e.mediaID),r=elByClass("mediaTitle",a)[0];e.isMultilingual?e.title&&e.title[LANGUAGE_ID]?r.textContent=e.title[LANGUAGE_ID]:r.textContent=e.filename:e.title&&e.title[e.languageID]?r.textContent=e.title[e.languageID]:r.textContent=e.filename;var o=elByClass("mediaThumbnail",a)[0];o.innerHTML=e.elementTag;var s=elByTag("img",o);s.length&&(s[0].src+="&refresh="+Date.now())},_initPagination:function(e,t){if(void 0===t&&(t=1),e>1){var i=elCreate("div");i.className="paginationBottom jsPagination",a.replaceElement(elBySel(".jsPagination",c.getDialog(this).content),i),this._pagination=new g(i,{activePage:t,callbackSwitch:this._search.search.bind(this._search),maxPage:e})}else this._pagination&&elHide(this._pagination.getElement())},_removeClipboardCheckboxes:function(){for(var e=elByClass("mediaCheckbox",this._mediaManagerMediaList);e.length;)elRemove(e[0])},_openEditorAfterUpload:function(e){if(e.upload===this._upload&&!e.isMultiFileUpload&&!this._upload.hasPendingUploads()){var t=Object.keys(e.media);t.length&&(c.close(this),this._mediaEditor.edit(this._media.get(~~e.media[t[0]].mediaID)))}},_setMedia:function(r){e.isPlainObject(r)?this._media=t.fromObject(r):this._media=r;var s=n.nextByClass(this._mediaManagerMediaList,"info");this._media.size?s&&elHide(s):(null===s&&(s=elCreate("p"),s.className="info",s.textContent=o.get("wcf.media.search.noResults")),elShow(s),a.insertAfter(s,this._mediaManagerMediaList));for(var c=n.childrenByTag(this._mediaManagerMediaList,"LI"),d=0,h=c.length;d<h;d++){var f=c[d];this._media.has(elData(f,"object-id"))?elShow(f):elHide(f)}i.trigger(),l.get("admin.content.cms.canManageMedia")||this._forceClipboard?u.reload():this._removeClipboardCheckboxes()},addMedia:function(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:function(e){for(var t=0,i=e.length;t<i;t++)this.removeMedia(~~e[t],!0);d.show()},getCategoryId:function(){return this._mediaCategorySelect?this._mediaCategorySelect.value:0},getDialog:function(){return c.getDialog(this).dialog},getMode:function(){return""},getOption:function(e){return this._options[e]?this._options[e]:null},removeMedia:function(e){if(this._listItems.has(e)){try{elRemove(this._listItems.get(e))}catch(e){}this._listItems.delete(e),this._media.delete(e)}},resetMedia:function(){this._search.search()},setMedia:function(e,t,i){var a=!1;for(var r in e)objOwns(e,r)&&(a=!0);if(a){var o=elCreate("ul");o.innerHTML=t;for(var s=n.childrenByTag(o,"LI"),l=0,c=s.length;l<c;l++){var d=s[l];this._listItems.has(~~elData(d,"object-id"))||(this._listItems.set(elData(d,"object-id"),d),this._mediaManagerMediaList.appendChild(d))}}this._initPagination(i.pageCount,i.pageNo),this._setMedia(e)},setupMediaElement:function(t,i){var a=n.childByClass(i,"mediaInformation"),r=elCreate("nav");r.className="jsMobileNavigation buttonGroupNavigation",a.parentNode.appendChild(r);var s=elCreate("ul");s.className="buttonList iconList",r.appendChild(s);var c=elCreate("li");c.className="mediaCheckbox",s.appendChild(c);var d=elCreate("a");c.appendChild(d);var u=elCreate("label");d.appendChild(u);var h=elCreate("input");if(h.className="jsClipboardItem",elAttr(h,"type","checkbox"),elData(h,"object-id",t.mediaID),u.appendChild(h),l.get("admin.content.cms.canManageMedia")){c=elCreate("li"),c.className="jsMediaEditButton",elData(c,"object-id",t.mediaID),s.appendChild(c),c.innerHTML='<a><span class="icon icon16 fa-pencil jsTooltip" title="'+o.get("wcf.global.button.edit")+'"></span> <span class="invisible">'+o.get("wcf.global.button.edit")+"</span></a>",c=elCreate("li"),c.className="jsDeleteButton",elData(c,"object-id",t.mediaID);var f=e.getUuid();elData(c,"confirm-message-html",m.unescapeHTML(o.get("wcf.media.delete.confirmMessage",{title:f})).replace(f,m.escapeHTML(t.filename))),s.appendChild(c),c.innerHTML='<a><span class="icon icon16 fa-times jsTooltip" title="'+o.get("wcf.global.button.delete")+'"></span> <span class="invisible">'+o.get("wcf.global.button.delete")+"</span></a>"}}},_}),define("WoltLabSuite/Core/Media/Manager/Editor",["Core","Dictionary","Dom/Traverse","EventHandler","Language","Permission","Ui/Dialog","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(i){i=e.extend({callbackInsert:null},i),l.call(this,i),this._forceClipboard=!0,this._activeButton=null;var a=this._options.editor?this._options.editor.core.toolbar()[0]:void 0;this._buttons=elByClass(this._options.buttonClass||"jsMediaEditorButton",a);for(var r=0,o=this._buttons.length;r<o;r++)this._buttons[r].addEventListener(WCF_CLICK_EVENT,this._click.bind(this));if(this._mediaToInsert=new t,this._mediaToInsertByClipboard=!1,this._uploadData=null,this._uploadId=null,this._options.editor&&!this._options.editor.opts.woltlab.attachments){var s=elData(this._options.editor.$editor[0],"element-id"),c=n.add("com.woltlab.wcf.redactor2","dragAndDrop_"+s,this._editorUpload.bind(this)),d=n.add("com.woltlab.wcf.redactor2","pasteFromClipboard_"+s,this._editorUpload.bind(this));n.add("com.woltlab.wcf.redactor2","destory_"+s,function(){n.remove("com.woltlab.wcf.redactor2","dragAndDrop_"+s,c),n.remove("com.woltlab.wcf.redactor2","dragAndDrop_"+s,d)}),n.add("com.woltlab.wcf.media.upload","success",this._mediaUploaded.bind(this))}}return e.inherit(c,l,{_addButtonEventListeners:function(){if(c._super.prototype._addButtonEventListeners.call(this),this._mediaManagerMediaList)for(var e=i.childrenByTag(this._mediaManagerMediaList,"LI"),t=0,n=e.length;t<n;t++){var a=e[t],r=elByClass("jsMediaInsertButton",a)[0];r&&(r.classList.remove("jsMediaInsertButton"),r.addEventListener(WCF_CLICK_EVENT,this._openInsertDialog.bind(this)))}},_buildInsertDialog:function(){for(var e="",t=this._getThumbnailSizes(),i=0,n=t.length;i<n;i++)e+='<option value="'+t[i]+'">'+a.get("wcf.media.insert.imageSize."+t[i])+"</option>";e+='<option value="original">'+a.get("wcf.media.insert.imageSize.original")+"</option>";var r='<div class="section"><dl class="thumbnailSizeSelection"><dt>'+a.get("wcf.media.insert.imageSize")+'</dt><dd><select name="thumbnailSize">'+e+'</select></dd></dl></div><div class="formSubmit"><button class="buttonPrimary">'+a.get("wcf.global.button.insert")+"</button></div>";o.open({_dialogSetup:function(){return{id:this._getInsertDialogId(),options:{onClose:this._editorClose.bind(this),onSetup:function(e){elByClass("buttonPrimary",e)[0].addEventListener(WCF_CLICK_EVENT,this._insertMedia.bind(this));var t=elBySel(".thumbnailSizeSelection",e);elShow(t)}.bind(this),title:a.get("wcf.media.insert")},source:r}}.bind(this)})},_click:function(e){this._activeButton=e.currentTarget,c._super.prototype._click.call(this,e)},_dialogShow:function(){c._super.prototype._dialogShow.call(this),this._uploadData&&(this._uploadData.file?this._upload.uploadFile(this._uploadData.file):this._uploadId=this._upload.uploadBlob(this._uploadData.blob),this._uploadData=null)},_editorUpload:function(e){this._uploadData=e,o.open(this)},_getInsertDialogId:function(){var e="mediaInsert";return this._mediaToInsert.forEach(function(t,i){e+="-"+i}),e},_getThumbnailSizes:function(){for(var e,t,i=[],n=["small","medium","large"],a=0,r=n.length;a<r;a++)e=n[a],t=!0,this._mediaToInsert.forEach(function(i){i[e+"ThumbnailType"]||(t=!1)}),t&&i.push(e);return i},_insertMedia:function(e,i,n){void 0===n&&(n=!0);if(e){o.close(this._getInsertDialogId());var a=e.currentTarget.closest(".dialogContent");i=elBySel("select[name=thumbnailSize]",a).value}if(null!==this._options.callbackInsert?this._options.callbackInsert(this._mediaToInsert,"separate",i):(this._options.editor.buffer.set(),this._mediaToInsert.forEach(this._insertMediaItem.bind(this,i))),this._mediaToInsertByClipboard){var r=[];this._mediaToInsert.forEach(function(e){r.push(e.mediaID)}),s.unmark("com.woltlab.wcf.media",r)}this._mediaToInsert=new t,this._mediaToInsertByClipboard=!1,n&&o.close(this)},_insertMediaGallery:function(){var e=[];this._mediaToInsert.forEach(function(t){e.push(t.mediaID)}),this._options.editor.buffer.set(),this._options.editor.insert.text("[wsmg='"+e.join(",")+"'][/wsmg]")},_insertMediaItem:function(e,t){if(t.isImage){for(var i,n=["small","medium","large","original"],a="",r=0;r<4&&(i=n[r],0==t[i+"ThumbnailHeight"]||(a=i,e!=i));r++);e=a,e||(e="original");var o=t.link;"original"!==e&&(o=t[e+"ThumbnailLink"]),this._options.editor.insert.html('<img src="'+o+'" class="woltlabSuiteMedia" data-media-id="'+t.mediaID+'" data-media-size="'+e+'">')}else this._options.editor.insert.text("[wsm='"+t.mediaID+"'][/wsm]")},_mediaUploaded:function(e){null!==this._uploadId&&this._upload===e.upload&&(this._uploadId===e.uploadId||Array.isArray(this._uploadId)&&-1!==this._uploadId.indexOf(e.uploadId))&&(this._mediaToInsert=t.fromObject(e.media),this._insertMedia(null,"medium",!1),this._uploadId=null)},_openInsertDialog:function(e){this.insertMedia([~~elData(e.currentTarget,"object-id")])},clipboardInsertMedia:function(e){this.insertMedia(e,!0)},insertMedia:function(e,i){this._mediaToInsert=new t,this._mediaToInsertByClipboard=i||!1;for(var n,a=!0,r=0,s=e.length;r<s;r++)n=this._media.get(e[r]),this._mediaToInsert.set(n.mediaID,n),n.isImage||(a=!1);if(a){if(this._getThumbnailSizes().length){o.close(this);var l=this._getInsertDialogId();o.getDialog(l)?o.openStatic(l):this._buildInsertDialog()}else this._insertMedia(void 0,"original")}else this._insertMedia()},getMode:function(){return"editor"},setupMediaElement:function(e,t){c._super.prototype.setupMediaElement.call(this,e,t);var i=elBySel("nav.buttonGroupNavigation > ul",t),n=elCreate("li");n.className="jsMediaInsertButton",elData(n,"object-id",e.mediaID),i.appendChild(n),n.innerHTML='<a><span class="icon icon16 fa-plus jsTooltip" title="'+a.get("wcf.media.button.insert")+'"></span> <span class="invisible">'+a.get("wcf.media.button.insert")+"</span></a>"}}),c}),define("WoltLabSuite/Core/Media/Manager/Select",["Core","Dom/Traverse","Dom/Util","Language","ObjectMap","Ui/Dialog","WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,a,r,o,s){"use strict";function l(e){s.call(this,e),this._activeButton=null,this._buttons=elByClass(this._options.buttonClass||"jsMediaSelectButton"),this._storeElements=new a;for(var t=0,n=this._buttons.length;t<n;t++){var r=this._buttons[t],o=elData(r,"store");if(o){var l=elById(o);if(l&&"INPUT"===l.tagName){this._buttons[t].addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),this._storeElements.set(r,l);var c=elCreate("p");c.className="button",i.insertAfter(c,r);var d=elCreate("span");d.className="icon icon16 fa-times",c.appendChild(d),l.value||elHide(c),c.addEventListener(WCF_CLICK_EVENT,this._removeMedia.bind(this))}}}}return e.inherit(l,s,{_addButtonEventListeners:function(){if(l._super.prototype._addButtonEventListeners.call(this),this._mediaManagerMediaList)for(var e=t.childrenByTag(this._mediaManagerMediaList,"LI"),i=0,n=e.length;i<n;i++){var a=e[i],r=elByClass("jsMediaSelectButton",a)[0];r&&(r.classList.remove("jsMediaSelectButton"),r.addEventListener(WCF_CLICK_EVENT,this._chooseMedia.bind(this)))}},_chooseMedia:function(e){if(null===this._activeButton)throw new Error("Media cannot be chosen if no button is active.");var t=this._media.get(~~elData(e.currentTarget,"object-id"));elById(elData(this._activeButton,"store")).value=t.mediaID;var i=elData(this._activeButton,"display");if(i){var n=elById(i);if(n)if(t.isImage)n.innerHTML='<img src="'+(t.smallThumbnailLink?t.smallThumbnailLink:t.link)+'" alt="'+(t.altText&&t.altText[LANGUAGE_ID]?t.altText[LANGUAGE_ID]:"")+'" />';else{var a=o.getIconNameByFilename(t.filename);a&&(a="-"+a),n.innerHTML='<div class="box48" style="margin-bottom: 10px;"><span class="icon icon48 fa-file'+a+'-o"></span><div class="containerHeadline"><h3>'+t.filename+"</h3><p>"+t.formattedFilesize+"</p></div></div>"}}elShow(this._activeButton.nextElementSibling),r.close(this)},_click:function(e){if(e.preventDefault(),this._activeButton=e.currentTarget,l._super.prototype._click.call(this,e),this._mediaManagerMediaList)for(var i,n=this._storeElements.get(this._activeButton),a=t.childrenByTag(this._mediaManagerMediaList,"LI"),r=0,o=a.length;r<o;r++)i=a[r],n.value&&n.value==elData(i,"object-id")?i.classList.add("jsSelected"):i.classList.remove("jsSelected")},getMode:function(){return"select"},setupMediaElement:function(e,t){l._super.prototype.setupMediaElement.call(this,e,t);var i=elBySel("nav.buttonGroupNavigation > ul",t),a=elCreate("li");a.className="jsMediaSelectButton",elData(a,"object-id",e.mediaID),i.appendChild(a),a.innerHTML='<a><span class="icon icon16 fa-check jsTooltip" title="'+n.get("wcf.media.button.select")+'"></span> <span class="invisible">'+n.get("wcf.media.button.select")+"</span></a>"},_removeMedia:function(e){e.preventDefault();var t=e.currentTarget;elHide(t);var i=t.previousElementSibling;elById(elData(i,"store")).value=0;var n=elData(i,"display");if(n){var a=elById(n);a&&(a.innerHTML="")}}}),l}),define("WoltLabSuite/Core/Ui/Search/Input",["Ajax","Core","EventKey","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={init:function(e,i){if(this._element=e,!(this._element instanceof Element))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"].');this._activeItem=null,this._dropdownContainerId="",this._lastValue="",this._list=null,this._request=null,this._timerDelay=null,this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:null,callbackSelect:null,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1},i),elAttr(this._element,"autocomplete","off"),this._element.addEventListener("keydown",this._keydown.bind(this)),this._element.addEventListener("keyup",this._keyup.bind(this))},addExcludedSearchValues:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedSearchValues:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keydown:function(e){(null!==this._activeItem&&a.isOpen(this._dropdownContainerId)||this._options.preventSubmit)&&i.Enter(e)&&e.preventDefault(),(i.ArrowUp(e)||i.ArrowDown(e)||i.Escape(e))&&e.preventDefault()},_keyup:function(e){if(null!==this._activeItem||!this._options.autoFocus)if(a.isOpen(this._dropdownContainerId)){if(i.ArrowUp(e))return e.preventDefault(),this._keyboardPreviousItem();if(i.ArrowDown(e))return e.preventDefault(),this._keyboardNextItem();if(i.Enter(e))return e.preventDefault(),this._keyboardSelectItem()}else this._activeItem=null;if(i.Escape(e))return void a.close(this._dropdownContainerId);var t=this._element.value.trim();if(this._lastValue!==t){if(this._lastValue=t,t.length<this._options.minLength)return void(this._dropdownContainerId&&(a.close(this._dropdownContainerId),this._activeItem=null));this._options.delay?(null!==this._timerDelay&&window.clearTimeout(this._timerDelay),this._timerDelay=window.setTimeout(function(){this._search(t)}.bind(this),this._options.delay)):this._search(t)}},_search:function(t){this._request&&this._request.abortPrevious(),this._request=e.api(this,this._getParameters(t))},_getParameters:function(e){return{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:e}}}},_keyboardNextItem:function(){var e;null!==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:function(){var e;null!==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:function(){this._selectItem(this._activeItem)},_clickSelectItem:function(e){this._selectItem(e.currentTarget)},_selectItem:function(e){this._options.callbackSelect&&!1===this._options.callbackSelect(e)?this._element.value="":this._element.value=elData(e,"label"),this._activeItem=null,a.close(this._dropdownContainerId)},_ajaxSuccess:function(e){var t=!1;if(null===this._list?(this._list=elCreate("ul"),this._list.className="dropdownMenu",t=!0,"function"==typeof this._options.callbackDropdownInit&&this._options.callbackDropdownInit(this._list)):this._list.innerHTML="","object"==typeof e.returnValues){var i,r=this._clickSelectItem.bind(this);for(var o in e.returnValues)e.returnValues.hasOwnProperty(o)&&(i=this._createListItem(e.returnValues[o]),i.addEventListener(WCF_CLICK_EVENT,r),this._list.appendChild(i))}t&&(n.insertAfter(this._list,this._element),a.initFragment(this._element.parentNode,this._list),this._dropdownContainerId=n.identify(this._element.parentNode)),this._dropdownContainerId&&(this._activeItem=null,this._list.childElementCount||!1!==this._handleEmptyResult()?(a.open(this._dropdownContainerId,!0),this._options.autoFocus&&this._list.childElementCount&&~~elData(this._list.children[0],"object-id")&&(this._activeItem=this._list.children[0],this._activeItem.classList.add("active"))):a.close(this._dropdownContainerId))},_handleEmptyResult:function(){if(!this._options.noResultPlaceholder)return!1;var e=elCreate("li");e.className="dropdownText";var t=elCreate("span");return t.textContent=this._options.noResultPlaceholder,e.appendChild(t),this._list.appendChild(e),!0},_createListItem:function(e){var t=elCreate("li");elData(t,"object-id",e.objectID),elData(t,"label",e.label);var i=elCreate("span");return i.textContent=e.label,t.appendChild(i),t},_ajaxSetup:function(){return{data:this._options.ajax}}},r}),define("WoltLabSuite/Core/Ui/User/Search/Input",["Core","WoltLabSuite/Core/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){var a=e.isPlainObject(n)&&!0===n.includeUserGroups;n=e.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:a?1:0}}}},n),i._super.prototype.init.call(this,t,n)},_createListItem:function(e){var t=i._super.prototype._createListItem.call(this,e);elData(t,"type",e.type);var n=elCreate("div");return n.className="box16",n.innerHTML="group"===e.type?'<span class="icon icon16 fa-users"></span>':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}),i}),define("WoltLabSuite/Core/Ui/Acl/Simple",["Language","StringUtil","Dom/ChangeListener","WoltLabSuite/Core/Ui/User/Search/Input"],function(e,t,i,n){"use strict";function a(e,t){this.init(e,t)}return a.prototype={init:function(e,t){this._prefix=e||"",this._inputName=t||"aclValues",this._build()},_build:function(){var e=elById(this._prefix+"aclInputContainer");elById(this._prefix+"aclAllowAll").addEventListener("change",function(){elHide(e)}),elById(this._prefix+"aclAllowAll_no").addEventListener("change",function(){elShow(e)}),this._list=elById(this._prefix+"aclAccessList"),this._list.addEventListener(WCF_CLICK_EVENT,this._removeItem.bind(this));var t=[];elBySelAll(".aclLabel",this._list,function(e){t.push(e.textContent)}),this._searchInput=new n(elById(this._prefix+"aclSearchInput"),{callbackSelect:this._select.bind(this),includeUserGroups:!0,excludedSearchValues:t,preventSubmit:!0}),this._aclListContainer=elById(this._prefix+"aclListContainer"),i.trigger()},_select:function(n){var a=elData(n,"type"),r=elData(n,"label"),o='<span class="icon icon16 fa-'+("group"===a?"users":"user")+'"></span>';o+='<span class="aclLabel">'+t.escapeHTML(r)+"</span>",o+='<span class="icon icon16 fa-times pointer jsTooltip" title="'+e.get("wcf.global.button.delete")+'"></span>',o+='<input type="hidden" name="'+this._inputName+"["+a+'][]" value="'+elData(n,"object-id")+'">';var s=elCreate("li");s.innerHTML=o;var l=elBySel(".fa-user",this._list);return null===l?this._list.appendChild(s):this._list.insertBefore(s,l.parentNode),elShow(this._aclListContainer),this._searchInput.addExcludedSearchValues(r),i.trigger(),!1},_removeItem:function(e){if(e.target.classList.contains("fa-times")){var t=elBySel(".aclLabel",e.target.parentNode);this._searchInput.removeExcludedSearchValues(t.textContent),elRemove(e.target.parentNode),0===this._list.childElementCount&&elHide(this._aclListContainer)}}},a}),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["Ajax"],function(e){"use strict";return{init:function(){elBySelAll(".markAllAsReadButton",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this))},_click:function(t){t.preventDefault(),e.api(this)},_ajaxSuccess:function(){var e=elBySel(".mainMenu .active .badge");e&&elRemove(e),elBySelAll(".articleList .newMessageBadge",void 0,elRemove)},_ajaxSetup:function(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}}),define("WoltLabSuite/Core/Ui/Article/Search",["Ajax","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,a,r){"use strict";var o,s,l,c=null;return{open:function(e){o=e,r.open(this)},_search:function(t){t.preventDefault();var n=c.parentNode,a=c.value.trim();if(a.length<3)return void elInnerError(n,i.get("wcf.article.search.error.tooShort"));elInnerError(n,!1),e.api(this,{parameters:{searchString:a}})},_click:function(e){e.preventDefault(),o(elData(e.currentTarget,"article-id")),r.close(this)},_ajaxSuccess:function(e){for(var t,a="",r=0,o=e.returnValues.length;r<o;r++)t=e.returnValues[r],a+='<li><div class="containerHeadline pointer" data-article-id="'+t.articleID+'"><h3>'+n.escapeHTML(t.name)+"</h3><small>"+n.escapeHTML(t.displayLink)+"</small></div></li>";l.innerHTML=a,window[a?"elShow":"elHide"](s),a?elBySelAll(".containerHeadline",l,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this)):elInnerError(c.parentNode,i.get("wcf.article.search.error.noResults"))},_ajaxSetup:function(){return{data:{actionName:"search",className:"wcf\\data\\article\\ArticleAction"}}},_dialogSetup:function(){return{id:"wcfUiArticleSearch",options:{onSetup:function(){var e=this._search.bind(this);c=elById("wcfUiArticleSearchInput"),c.addEventListener("keydown",function(i){t.Enter(i)&&e(i)}),c.nextElementSibling.addEventListener(WCF_CLICK_EVENT,e),s=elById("wcfUiArticleSearchResultContainer"),l=elById("wcfUiArticleSearchResultList")}.bind(this),onShow:function(){c.focus()},title:i.get("wcf.article.search")},source:'<div class="section"><dl><dt><label for="wcfUiArticleSearchInput">'+i.get("wcf.article.search.name")+'</label></dt><dd><div class="inputAddon"><input type="text" id="wcfUiArticleSearchInput" class="long"><a href="#" class="inputSuffix"><span class="icon icon16 fa-search"></span></a></div></dd></dl></div><section id="wcfUiArticleSearchResultContainer" class="section" style="display: none;"><header class="sectionHeader"><h2 class="sectionTitle">'+i.get("wcf.article.search.results")+'</h2></header><ol id="wcfUiArticleSearchResultList" class="containerList"></ol></section>'}}}}),define("WoltLabSuite/Core/Ui/Color/Picker",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}var i=function(e,t){if("object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker)return(i=function(e,t){var i=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&i.setCallbackSubmit(t.callbackSubmit),i})(e,t);0===n.length&&(window.__wcf_bc_colorPickerInit=function(){n.forEach(function(e){i(e[0],e[1])}),window.__wcf_bc_colorPickerInit=void 0,n=[]}),n.push([e,t])},n=[];return t.prototype={init:function(t,n){if(!(t instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");this._options=e.extend({callbackSubmit:null},n),i(t,this._options)}},t.fromSelector=function(e){elBySelAll(e,void 0,function(e){new t(e)})},t}),define("WoltLabSuite/Core/Ui/Comment/Add",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function f(e){this.init(e)}return f.prototype={init:function(e){this._container=e,this._content=elBySel(".jsOuterEditorContainer",this._container),this._textarea=elBySel(".wysiwygTextarea",this._container),this._editor=null,this._loadingOverlay=null,this._content.addEventListener(WCF_CLICK_EVENT,function(e){this._content.classList.contains("collapsed")&&(e.preventDefault(),this._content.classList.remove("collapsed"),this._focusEditor())}.bind(this)),elBySel('button[data-type="save"]',this._container).addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))},_focusEditor:function(){c.element(this._container,function(){window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor")}.bind(this))},_submitGuestDialog:function(e){if("keypress"!==e.type||d.Enter(e)){var i=elBySel("input[name=username]",e.currentTarget.closest(".dialogContent"));if(""===i.value)return elInnerError(i,n.get("wcf.global.form.error.empty")),void i.closest("dl").classList.add("formError");var a={parameters:{data:{username:i.value}}};if(h.has("commentAdd")){var r=h.getData("commentAdd");r instanceof Promise?r.then(function(e){a=t.extend(a,e),this._submit(void 0,a)}.bind(this)):(a=t.extend(a,r),this._submit(void 0,a))}else this._submit(void 0,a)}},_submit:function(n,a){if(n&&n.preventDefault(),this._validate()){this._showLoadingOverlay();var r=this._getParameters();i.fire("com.woltlab.wcf.redactor2","submit_text",r.data),u.userId||a||(r.requireGuestDialog=!0),e.api(this,t.extend({parameters:r},a))}},_getParameters:function(){var e=this._container.closest(".commentList");return{data:{message:this._getEditor().code.get(),objectID:~~elData(e,"object-id"),objectTypeID:~~elData(e,"object-type-id")}}},_validate:function(){if(elBySelAll(".innerError",this._container,elRemove),this._getEditor().utils.isEmpty())return this.throwError(this._textarea,n.get("wcf.global.form.error.empty")),!1;var e={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return i.fire("com.woltlab.wcf.redactor2","validate_text",e),!1!==e.valid},throwError:function(e,t){elInnerError(e,"empty"===t?n.get("wcf.global.form.error.empty"):t)},_showLoadingOverlay:function(){null===this._loadingOverlay&&(this._loadingOverlay=elCreate("div"),this._loadingOverlay.className="commentLoadingOverlay",this._loadingOverlay.innerHTML='<span class="icon icon96 fa-spinner"></span>'),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)},_hideLoadingOverlay:function(){this._content.classList.remove("loading");var e=elBySel(".commentLoadingOverlay",this._content);null!==e&&e.parentNode.removeChild(e)},_reset:function(){this._getEditor().code.set("<p>​</p>"),i.fire("com.woltlab.wcf.redactor2","reset_text"),document.activeElement&&document.activeElement.blur(),this._content.classList.add("collapsed")},_handleError:function(e){this.throwError(this._textarea,e.returnValues.errorType)},_getEditor:function(){if(null===this._editor){if("function"!=typeof window.jQuery)throw new Error("Unable to access editor, jQuery has not been loaded yet.");this._editor=window.jQuery(this._textarea).data("redactor")}return this._editor},_insertMessage:function(e){return r.insertHtml(e.returnValues.template,this._container,"after"),l.show(n.get("wcf.global.success.add")),a.trigger(),this._container.nextElementSibling},_ajaxSuccess:function(e){if(!u.userId&&e.returnValues.guestDialog){s.openStatic("jsDialogGuestComment",e.returnValues.guestDialog,{closable:!1,onClose:function(){h.has("commentAdd")&&h.delete("commentAdd")},title:n.get("wcf.global.confirmation.title")});var t=s.getDialog("jsDialogGuestComment");elBySel("input[type=submit]",t.content).addEventListener(WCF_CLICK_EVENT,this._submitGuestDialog.bind(this)),elBySel('button[data-type="cancel"]',t.content).addEventListener(WCF_CLICK_EVENT,this._cancelGuestDialog.bind(this)),elBySel("input[type=text]",t.content).addEventListener("keypress",this._submitGuestDialog.bind(this))}else{var i=this._insertMessage(e);u.userId||s.close("jsDialogGuestComment"),this._reset(),this._hideLoadingOverlay(),window.setTimeout(function(){c.element(i)}.bind(this),100)}},_ajaxFailure:function(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._handleError(e),!1)},_ajaxSetup:function(){return{data:{actionName:"addComment",className:"wcf\\data\\comment\\CommentAction"},silent:!0}},_cancelGuestDialog:function(){s.close("jsDialogGuestComment"),this._hideLoadingOverlay()}},f}),define("WoltLabSuite/Core/Ui/Comment/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function f(e){this.init(e)}return f.prototype={init:function(e){this._activeElement=null,this._callbackClick=null,this._comments=new o,this._container=e,this._editorContainer=null,this.rebuild(),s.add("Ui/Comment/Edit_"+c.identify(this._container),this.rebuild.bind(this))},rebuild:function(){elBySelAll(".comment",this._container,function(e){if(!this._comments.has(e)){if(elDataBool(e,"can-edit")){var t=elBySel(".jsCommentEditButton",e);null!==t&&(null===this._callbackClick&&(this._callbackClick=this._click.bind(this)),t.addEventListener(WCF_CLICK_EVENT,this._callbackClick))}this._comments.add(e)}}.bind(this))},_click:function(t){t.preventDefault(),null===this._activeElement?(this._activeElement=t.currentTarget.closest(".comment"),this._prepare(),e.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})):d.show("wcf.message.error.editorAlreadyInUse",null,"warning")},_prepare:function(){this._editorContainer=elCreate("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='<span class="icon icon48 fa-spinner"></span>';var e=elBySel(".commentContentContainer",this._activeElement);e.insertBefore(this._editorContainer,e.firstChild)},_showEditor:function(e){var t=this._getEditorId(),i=elBySel(".icon",this._editorContainer);elRemove(i);var r=elCreate("div");r.className="editorContainer",c.setInnerHtml(r,e.returnValues.template),this._editorContainer.appendChild(r);var o=elBySel(".formSubmit",r);elBySel('button[data-type="save"]',o).addEventListener(WCF_CLICK_EVENT,this._save.bind(this)),elBySel('button[data-type="cancel"]',o).addEventListener(WCF_CLICK_EVENT,this._restoreMessage.bind(this)),a.add("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,this._save()}.bind(this));var s=elById(t);"redactor"===n.editor()?window.setTimeout(function(){h.element(this._activeElement)}.bind(this),250):s.focus()},_restoreMessage:function(){this._destroyEditor(),elRemove(this._editorContainer),this._activeElement=null},_save:function(){var t={data:{message:""}},i=this._getEditorId();a.fire("com.woltlab.wcf.redactor2","getText_"+i,t.data),this._validate(t)&&(a.fire("com.woltlab.wcf.redactor2","submit_"+i,t),e.api(this,{actionName:"save",objectIDs:[this._getObjectId(this._activeElement)],parameters:t}),this._hideEditor())},_validate:function(e){elBySelAll(".innerError",this._activeElement,elRemove);var t=elById(this._getEditorId());if(window.jQuery(t).data("redactor").utils.isEmpty())return this.throwError(t,r.get("wcf.global.form.error.empty")),!1;var i={api:this,parameters:e,valid:!0};return a.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),i),!1!==i.valid},throwError:function(e,t){elInnerError(e,t)},_showMessage:function(e){c.setInnerHtml(elBySel(".commentContent .userMessage",this._editorContainer.parentNode),e.returnValues.message),this._restoreMessage(),d.show()},_hideEditor:function(){elHide(elBySel(".editorContainer",this._editorContainer));var e=elCreate("span");e.className="icon icon48 fa-spinner",this._editorContainer.appendChild(e)},_restoreEditor:function(){var e=elBySel(".fa-spinner",this._editorContainer);elRemove(e);var t=elBySel(".editorContainer",this._editorContainer);null!==t&&elShow(t)},_destroyEditor:function(){a.fire("com.woltlab.wcf.redactor2","autosaveDestroy_"+this._getEditorId()),a.fire("com.woltlab.wcf.redactor2","destroy_"+this._getEditorId())},_getEditorId:function(){return"commentEditor"+this._getObjectId(this._activeElement)},_getObjectId:function(e){return~~elData(e,"object-id")},_ajaxFailure:function(e){var t=elBySel(".redactor-layer",this._editorContainer);return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.errorType||(elInnerError(t,e.returnValues.errorType),!1))},_ajaxSuccess:function(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}},_ajaxSetup:function(){return{data:{className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectTypeID:~~elData(this._container,"object-type-id")}}},silent:!0}}},f}),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["Core","Ui/SimpleDropdown"],function(e,t){"use strict";function i(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 n(t){var i=elCreate("li");if("divider"===t)return i.className="dropdownDivider",i;"string"==typeof t.identifier&&elData(i,"identifier",t.identifier);var n=elCreate("a");if(n.href="string"==typeof t.href?t.href:"#","function"==typeof t.callback)n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),t.callback(n)});else if("#"===n.getAttribute("href"))throw new Error("Expected either a `href` value or a `callback`.");if(t.hasOwnProperty("attributes")&&e.isPlainObject(t.attributes))for(var r in t.attributes)t.attributes.hasOwnProperty(r)&&elData(n,r,t.attributes[r]);if(i.appendChild(n),void 0!==t.icon&&e.isPlainObject(t.icon)){if("string"!=typeof t.icon.name)throw new TypeError("Expected a valid icon name.");var o=16;"number"==typeof t.icon.size&&-1!==a.indexOf(~~t.icon.size)&&(o=~~t.icon.size);var s=elCreate("span");s.className="icon icon"+o+" fa-"+t.icon.name,n.appendChild(s)}var l="string"==typeof t.label?t.label.trim():"",c="string"==typeof t.labelHtml?t.labelHtml.trim():"";if(""===l&&""===c)throw new TypeError("Expected either a label or a `labelHtml`.");var d=elCreate("span");return d[l?"textContent":"innerHTML"]=l||c,n.appendChild(document.createTextNode(" ")),n.appendChild(d),i}var a=[16,24,32,48,64,96,144];return{create:function(e,t){var i=elCreate("ul");return i.className="dropdownMenu","string"==typeof t&&elData(i,"identifier",t),Array.isArray(e)&&e.length>0&&this.appendItems(i,e),i},buildItem:function(e){return n(e)},appendItem:function(e,t){i(e),e.appendChild(n(t))},appendItems:function(e,t){if(i(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");var a=t.length;if(0===a)throw new Error("Expected a non-empty list of items.");if(1===a)this.appendItem(e,t[0]);else{for(var r=document.createDocumentFragment(),o=0;o<a;o++)r.appendChild(n(t[o]));e.appendChild(r)}},setItems:function(e,t){i(e),e.innerHTML="",this.appendItems(e,t)},attach:function(e,n){i(e),t.initFragment(n,e),n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),e.stopPropagation(),t.toggleDropdown(n.id)})},divider:function(){return"divider"}}}),define("WoltLabSuite/Core/Ui/File/Delete",["Ajax","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse","Dictionary"],function(e,t,i,n,a,r,o){"use strict";function s(e,t,i,n){if(this._isSingleImagePreview=i,this._uploadHandler=n,this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(t),null===t)throw new Error("Element id '"+t+"' is unknown.");if(this._containers=new o,this._internalId=elData(this._target,"internal-id"),!this._internalId)throw new Error("InternalId is unknown.");this.rebuild()}return s.prototype={_createButtons:function(){for(var e,t,n,a=elBySelAll("li.uploadedFile",this._target),r=!1,o=0,s=a.length;o<s;o++)e=a[o],n=elData(e,"unique-file-id"),this._containers.has(n)||(t={uniqueFileId:n,element:e},this._containers.set(n,t),this._initDeleteButton(e,t),r=!0);r&&i.trigger()},_initDeleteButton:function(e,t){var i=elBySel(".buttonGroup",e);if(null===i)throw new Error("Button group in '"+targetId+"' is unknown.");var a=elCreate("li"),r=elCreate("span");r.classList="button jsDeleteButton small",r.textContent=n.get("wcf.global.button.delete"),a.appendChild(r),i.appendChild(a),a.addEventListener(WCF_CLICK_EVENT,this._delete.bind(this,t.uniqueFileId))},_delete:function(t){e.api(this,{uniqueFileId:t,internalId:this._internalId})},rebuild:function(){if(this._isSingleImagePreview){var e=elBySel("img",this._target);if(null!==e){var t=elData(e,"unique-file-id");if(!this._containers.has(t)){var i={uniqueFileId:t,element:e};this._containers.set(t,i),this._deleteButton=elCreate("p"),this._deleteButton.className="button deleteButton";var a=elCreate("span");a.textContent=n.get("wcf.global.button.delete"),this._deleteButton.appendChild(a),this._buttonContainer.appendChild(this._deleteButton),this._deleteButton.addEventListener(WCF_CLICK_EVENT,this._delete.bind(this,i.uniqueFileId))}}}else this._createButtons()},_ajaxSuccess:function(e){elRemove(this._containers.get(e.uniqueFileId).element),this._isSingleImagePreview&&(elRemove(this._deleteButton),this._deleteButton=null),this._uploadHandler.checkMaxFiles(),t.triggerEvent(this._target,"change")},_ajaxSetup:function(){return{url:"index.php?ajax-file-delete/&t="+SECURITY_TOKEN}}},s}),define("WoltLabSuite/Core/Ui/File/Upload",["Core","Language","Dom/Util","WoltLabSuite/Core/Ui/File/Delete","Upload"],function(e,t,i,n,a){"use strict";function r(t,i,a){if(a=a||{},void 0===a.internalId)throw new Error("Missing internal id.");if(this._options=e.extend({name:"__files[]",singleFileRequests:!1,url:"index.php?ajax-file-upload/&t="+SECURITY_TOKEN,imagePreview:!1,maxFiles:null,acceptableFiles:null},a),this._options.multiple=null===this._options.maxFiles||this._options.maxFiles>1,0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),this._buttonContainer=elById(t),null===this._buttonContainer)throw new Error("Element id '"+t+"' is unknown.");if(this._target=elById(i),null===i)throw new Error("Element id '"+i+"' is unknown.");if(a.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._fileElements=[],this._internalFileId=0,this._multiFileUploadIds=[],this._createButton(),this.checkMaxFiles(),this._deleteHandler=new n(t,i,this._options.imagePreview,this)}return e.inherit(r,a,{_createFileElement:function(e){var t=r._super.prototype._createFileElement.call(this,e);t.classList.add("box64","uploadedFile");var i=elBySel("progress",t),n=elCreate("span");n.className="icon icon64 fa-spinner";var a=t.textContent;t.textContent="",t.append(n);var o=elCreate("div"),s=elCreate("p");s.textContent=a;var l=elCreate("small");l.appendChild(i),o.appendChild(s),o.appendChild(l);var c=elCreate("div");c.appendChild(o);var d=elCreate("ul");return d.className="buttonGroup",c.appendChild(d),t.append(c),t},_failure:function(e,n,a,r,o){for(var s=0,l=this._fileElements[e].length;s<l;s++){this._fileElements[e][s].classList.add("uploadFailed"),elBySel("small",this._fileElements[e][s]).innerHTML="";var c=elBySel(".icon",this._fileElements[e][s]);c.classList.remove("fa-spinner"),c.classList.add("fa-ban");var d=elCreate("span");d.className="innerError",d.textContent=t.get("wcf.upload.error.uploadFailed"),i.insertAfter(d,elBySel("small",this._fileElements[e][s]))}throw new Error("Upload failed: "+n.message)},_upload:function(e,t,i){var n=elBySel("small.innerError:not(.innerFileError)",this._buttonContainer.parentNode);return n&&elRemove(n),r._super.prototype._upload.call(this,e,t,i)},_success:function(t,n,a,r,o){for(var s=0,l=this._fileElements[t].length;s<l;s++)if(void 0!==n.files[s])if(this._options.imagePreview){if(null===n.files[s].image)throw new Error("Expect image for uploaded file. None given.");if(elRemove(this._fileElements[t][s]),null!==elBySel("img.previewImage",this._target))elBySel("img.previewImage",this._target).setAttribute("src",n.files[s].image);else{var c=elCreate("img");c.classList.add("previewImage"),c.setAttribute("src",n.files[s].image),c.setAttribute("style","max-width: 100%;"),elData(c,"unique-file-id",n.files[s].uniqueFileId),this._target.appendChild(c)}}else{elData(this._fileElements[t][s],"unique-file-id",n.files[s].uniqueFileId),elBySel("small",this._fileElements[t][s]).textContent=n.files[s].filesize;var d=elBySel(".icon",this._fileElements[t][s]);d.classList.remove("fa-spinner"),d.classList.add("fa-"+n.files[s].icon)}else{if(void 0===n.error[s])throw new Error("Unknown uploaded file for uploadId "+t+".");this._fileElements[t][s].classList.add("uploadFailed"),elBySel("small",this._fileElements[t][s]).innerHTML="";var d=elBySel(".icon",this._fileElements[t][s]);if(d.classList.remove("fa-spinner"),d.classList.add("fa-ban"),null===elBySel(".innerError",this._fileElements[t][s])){var u=elCreate("span");u.className="innerError",u.textContent=n.error[s].errorMessage,i.insertAfter(u,elBySel("small",this._fileElements[t][s]))}else elBySel(".innerError",this._fileElements[t][s]).textContent=n.error[s].errorMessage}this._deleteHandler.rebuild(),this.checkMaxFiles(),e.triggerEvent(this._target,"change")},_getFormData:function(){return{internalId:this._options.internalId}},validateUpload:function(e){if(null===this._options.maxFiles||e.length+this.countFiles()<=this._options.maxFiles)return!0;var n=elBySel("small.innerError:not(.innerFileError)",this._buttonContainer.parentNode);return null===n&&(n=elCreate("small"),n.className="innerError",i.insertAfter(n,this._buttonContainer)),n.textContent=t.get("wcf.upload.error.reachedRemainingLimit",{maxFiles:this._options.maxFiles-this.countFiles()}),!1},countFiles:function(){return this._options.imagePreview?null!==elBySel("img",this._target)?1:0:this._target.childElementCount},checkMaxFiles:function(){null!==this._options.maxFiles&&this.countFiles()>=this._options.maxFiles?elHide(this._button):elShow(this._button)}}),r}),define("WoltLabSuite/Core/Ui/ItemList/Filter",["Core","EventKey","Language","List","StringUtil","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o){"use strict";function s(e,t){this.init(e,t)}return s.prototype={init:function(n,a){this._value="",this._options=e.extend({callbackPrepareItem:void 0,enableVisibilityFilter:!0,filterPosition:"bottom"},a),"top"!==this._options.filterPosition&&(this._options.filterPosition="bottom");var r=elById(n);if(null===r)throw new Error("Expected a valid element id, '"+n+"' does not match anything.");if(!r.classList.contains("scrollableCheckboxList")&&"function"!=typeof this._options.callbackPrepareItem)throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");elData(r,"filter","showAll");var o=elCreate("div");o.className="itemListFilter",r.parentNode.insertBefore(o,r),o.appendChild(r);var s=elCreate("div");s.className="inputAddon";var l=elCreate("input");l.className="long",l.type="text",l.placeholder=i.get("wcf.global.filter.placeholder"),l.addEventListener("keydown",function(e){t.Enter(e)&&e.preventDefault()}),l.addEventListener("keyup",this._keyup.bind(this));var c=elCreate("a");if(c.href="#",c.className="button inputSuffix jsTooltip",c.title=i.get("wcf.global.filter.button.clear"),c.innerHTML='<span class="icon icon16 fa-times"></span>',c.addEventListener("click",function(e){e.preventDefault(),this.reset()}.bind(this)),s.appendChild(l),s.appendChild(c),this._options.enableVisibilityFilter){var d=elCreate("a");d.href="#",d.className="button inputSuffix jsTooltip",d.title=i.get("wcf.global.filter.button.visibility"),d.innerHTML='<span class="icon icon16 fa-eye"></span>',d.addEventListener(WCF_CLICK_EVENT,this._toggleVisibility.bind(this)),s.appendChild(d)}"bottom"===this._options.filterPosition?o.appendChild(s):o.insertBefore(s,r),this._container=o,this._dropdown=null,this._dropdownId="",this._element=r,this._input=l,this._items=null,this._fragment=null},reset:function(){this._input.value="",this._keyup()},_buildItems:function(){this._items=new n;for(var e="function"==typeof this._options.callbackPrepareItem?this._options.callbackPrepareItem:this._prepareItem.bind(this),t=0,i=this._element.childElementCount;t<i;t++)this._items.add(e(this._element.children[t]))},_prepareItem:function(e){for(var t=e.children[0],i=t.textContent.trim(),n=t.children[0];n.nextSibling;)t.removeChild(n.nextSibling);t.appendChild(document.createTextNode(" "));var a=elCreate("span");return a.textContent=i,t.appendChild(a),{item:e,span:a,text:i}},_keyup:function(){var e=this._input.value.trim();if(this._value!==e){null===this._fragment&&(this._fragment=document.createDocumentFragment(),this._element.style.setProperty("height",this._element.offsetHeight+"px","")),this._fragment.appendChild(this._element),null===this._items&&this._buildItems();var t=new RegExp("("+a.escapeRegExp(e)+")","i"),n=""===e;this._items.forEach(function(i){""===e?(i.span.textContent=i.text,elShow(i.item)):t.test(i.text)?(i.span.innerHTML=i.text.replace(t,"<u>$1</u>"),elShow(i.item),n=!0):elHide(i.item)}),"bottom"===this._options.filterPosition?this._container.insertBefore(this._fragment.firstChild,this._container.firstChild):this._container.appendChild(this._fragment.firstChild),this._value=e,elInnerError(this._container,!n&&i.get("wcf.global.filter.error.noMatches"))}},_toggleVisibility:function(e){e.preventDefault(),e.stopPropagation();var t=e.currentTarget;if(null===this._dropdown){var n=elCreate("ul");n.className="dropdownMenu",["activeOnly","highlightActive","showAll"].forEach(function(e){var t=elCreate("a");elData(t,"type",e),t.href="#",t.textContent=i.get("wcf.global.filter.visibility."+e),t.addEventListener(WCF_CLICK_EVENT,this._setVisibility.bind(this));var a=elCreate("li");if(a.appendChild(t),"showAll"===e){a.className="active";var r=elCreate("li");r.className="dropdownDivider",n.appendChild(r)}n.appendChild(a)}.bind(this)),o.initFragment(t,n),this._setupVisibilityFilter(),this._dropdown=n,this._dropdownId=t.id}o.toggleDropdown(t.id,t)},_setupVisibilityFilter:function(){var e=this._element.nextSibling,t=this._element.parentNode,i=this._element.scrollTop;document.createDocumentFragment().appendChild(this._element),elBySelAll("li",this._element,function(e){var t=elBySel('input[type="checkbox"]',e);if(t)t.checked&&e.classList.add("active"),t.addEventListener("change",function(){e.classList[t.checked?"add":"remove"]("active")});else{var i=elBySel('input[type="radio"]',e);i&&(i.checked&&e.classList.add("active"),i.addEventListener("change",function(){elBySelAll("li",this._element,function(e){e.classList.remove("active")}),e.classList[i.checked?"add":"remove"]("active")}.bind(this)))}}.bind(this)),t.insertBefore(this._element,e),this._element.scrollTop=i},_setVisibility:function(e){e.preventDefault();var t=e.currentTarget,i=elData(t,"type");if(o.close(this._dropdownId),elData(this._element,"filter")!==i){elData(this._element,"filter",i),elBySel(".active",this._dropdown).classList.remove("active"),t.parentNode.classList.add("active");var n=elById(this._dropdownId);n.classList["showAll"===i?"remove":"add"]("active")
-;var a=elBySel(".icon",n);a.classList["showAll"===i?"add":"remove"]("fa-eye"),a.classList["showAll"===i?"remove":"add"]("fa-eye-slash")}}},s}),define("WoltLabSuite/Core/Ui/ItemList/Static",["Core","Dictionary","Language","Dom/Traverse","EventKey","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o="",s=new t,l=!1,c=null,d=null,u=null,h=null,f=null,p=null;return{init:function(t,i,a){var o=elById(t);if(null===o)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(s.has(t)){var l=s.get(t);for(var c in l)if(l.hasOwnProperty(c)){var d=l[c];d instanceof Element&&d.parentNode&&elRemove(d)}r.destroy(t),s.delete(t)}a=e.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},a);var u=n.parentByTag(o,"FORM");if(null!==u&&!1===a.isCSV){if(!a.submitFieldName.length&&"function"!=typeof a.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");u.addEventListener("submit",function(){var e=this.getValues(t);if(a.submitFieldName.length)for(var i,n=0,r=e.length;n<r;n++)i=elCreate("input"),i.type="hidden",i.name=a.submitFieldName.replace(/{$objectId}/,e[n].objectId),i.value=e[n].value,u.appendChild(i);else a.callbackSubmit(u,e)}.bind(this))}this._setup();var h=this._createUI(o,a);if(s.set(t,{dropdownMenu:null,element:h.element,list:h.list,listItem:h.element.parentNode,options:a,shadow:h.shadow}),i=h.values.length?h.values:i,Array.isArray(i))for(var f,p=!h.element.disabled,m=0,g=i.length;m<g;m++)f=i[m],"string"==typeof f&&(f={objectId:0,value:f}),this._addItem(t,f,p)},getValues:function(e){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=s.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent})}),i},setValues:function(e,t){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,a,r=s.get(e),o=n.childrenByClass(r.list,"item");for(i=0,a=o.length;i<a;i++)this._removeItem(null,o[i],!0);for(i=0,a=t.length;i<a;i++)this._addItem(e,t[i])},_setup:function(){l||(l=!0,c=this._keyDown.bind(this),d=this._keyPress.bind(this),u=this._keyUp.bind(this),h=this._paste.bind(this),f=this._removeItem.bind(this),p=this._blur.bind(this))},_createUI:function(e,t){var i=elCreate("ol");i.className="inputItemList"+(e.disabled?" disabled":""),elData(i,"element-id",e.id),i.addEventListener(WCF_CLICK_EVENT,function(t){t.target===i&&e.focus()});var n=elCreate("li");n.className="input",i.appendChild(n),e.addEventListener("keydown",c),e.addEventListener("keypress",d),e.addEventListener("keyup",u),e.addEventListener("paste",h),e.addEventListener("blur",p),e.parentNode.insertBefore(i,e),n.appendChild(e),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var a=null,r=[];if(t.isCSV){a=elCreate("input"),a.className="itemListInputShadow",a.type="hidden",a.name=e.name,e.removeAttribute("name"),i.parentNode.insertBefore(a,i);for(var o,s=e.value.split(","),l=0,f=s.length;l<f;l++)o=s[l].trim(),o.length&&r.push(o);if("TEXTAREA"===e.nodeName){var m=elCreate("input");m.type="text",e.parentNode.insertBefore(m,e),m.id=e.id,elRemove(e),e=m}}return{element:e,list:i,shadow:a,values:r}},_handleLimit:function(e){var t=s.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,elAttr(t.element,"placeholder",i.get("wcf.global.form.input.maxItems"))))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;o=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(a.Enter(e)||a.Comma(e)){e.preventDefault();var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_paste:function(e){var t="";t="object"==typeof window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData.getData("text/plain"),t.split(/,/).forEach(function(t){t=t.trim(),0!==t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}.bind(this)),e.preventDefault()},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t,i){var n=s.get(e),a=elCreate("li");a.className="item";var r=elCreate("span");if(r.className="content",elData(r,"object-id",t.objectId),r.textContent=t.value,a.appendChild(r),i||!n.element.disabled){var o=elCreate("a");o.className="icon icon16 fa-times",o.addEventListener(WCF_CLICK_EVENT,f),a.appendChild(o)}n.list.insertBefore(a,n.listItem),n.element.value="",n.element.disabled||this._handleLimit(e);var l=this._syncShadow(n);"function"==typeof n.options.callbackChange&&(null===l&&(l=this.getValues(e)),n.options.callbackChange(e,l))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,a=elData(n,"element-id"),r=s.get(a);n.removeChild(t),i||r.element.focus(),this._handleLimit(a);var o=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===o&&(o=this.getValues(a)),r.options.callbackChange(a,o))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;n<a;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i},_blur:function(e){var t=(s.get(e.currentTarget.id),e.currentTarget);window.setTimeout(function(){var e=t.value.trim();e.length&&this._addItem(t.id,{objectId:0,value:e})}.bind(this),100)}}}),define("WoltLabSuite/Core/Ui/ItemList/User",["WoltLabSuite/Core/Ui/ItemList"],function(e){"use strict";return{init:function(t,i){e.init(t,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:~~i.includeUserGroups,restrictUserGroupIDs:Array.isArray(i.restrictUserGroupIDs)?i.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof i.callbackChange?i.callbackChange:null,callbackSyncShadow:i.csvPerType?this._syncShadow.bind(this):null,callbackSetupValues:"function"==typeof i.callbackSetupValues?i.callbackSetupValues:null,excludedSearchValues:Array.isArray(i.excludedSearchValues)?i.excludedSearchValues:[],isCSV:!0,maxItems:~~i.maxItems||-1,restricted:!0})},getValues:function(t){return e.getValues(t)},_syncShadow:function(e){var t=this.getValues(e.element.id),i=[],n=[];return t.forEach(function(e){e.type&&"group"===e.type?n.push(e.objectId):i.push(e.value)}),e.shadow.value=i.join(","),e._shadowGroups||(e._shadowGroups=elCreate("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=e.shadow.name+"GroupIDs",e.shadow.parentNode.insertBefore(e._shadowGroups,e.shadow)),e._shadowGroups.value=n.join(","),t}}}),define("WoltLabSuite/Core/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(e){this._cache=new i,this._pageCount=0,this._pageNo=1,this._options=t.extend({className:"",dialogTitle:"",parameters:{}},e)},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t){if("number"==typeof t&&(this._pageNo=~~t),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)){var i=a.open(this,this._cache.get(this._pageNo));if(this._pageCount>1){var n=elBySel(".jsPagination",i.content);null!==n&&new r(n,{activePage:this._pageNo,maxPage:this._pageCount,callbackSwitch:this._showPage.bind(this)});var o=i.content.parentNode;o.scrollTop>0&&(o.scrollTop=0)}}else this._options.parameters.pageNo=this._pageNo,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&(this._pageCount=~~e.returnValues.pageCount),this._cache.set(this._pageNo,e.returnValues.template),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserList",className:this._options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}},_dialogSetup:function(){return{id:n.getUniqueId(),options:{title:this._options.dialogTitle},source:null}}},o}),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","EventHandler"],function(e,t,i,n,a,r,o,s,l,c){"use strict";function d(e,t){this.init(e,t)}return d.prototype={init:function(e,n){if(""===n.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._containers=new i,this._objects=new i,this._objectType=e,this._options=t.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},n),this.initContainers(n,e),o.add("WoltLabSuite/Core/Ui/Reaction/CountButtons-"+e,this.initContainers.bind(this))},initContainers:function(){for(var e,t,i,n=elBySelAll(this._options.containerSelector),a=!1,r=0,l=n.length;r<l;r++)if(e=n[r],!this._containers.has(s.identify(e))){i=~~elData(e,"object-id"),t={reactButton:null,summary:null,objectId:i,element:e},this._containers.set(s.identify(e),t),this._initReactionCountButtons(e,t);var c=[];this._objects.has(i)&&(c=this._objects.get(i)),c.push(t),this._objects.set(i,c),a=!0}a&&o.trigger()},updateCountButtons:function(e,t){var i=!1;this._objects.get(e).forEach(function(e){var n=elBySel(this._options.summaryListSelector,this._options.isSingleItem?void 0:e.element);if(null!==n){for(var a={},o=elBySelAll(".reactCountButton",n),s=0,l=o.length;s<l;s++){var c=elData(o[s],"reaction-type-id");t.hasOwnProperty(c)?a[c]=o[s]:elRemove(o[s])}Object.keys(t).forEach(function(e){if(void 0!==a[e]){elBySel(".reactionCount",a[e]).innerHTML=r.shortUnit(t[e])}else if(void 0!==REACTION_TYPES[e]){var o=elCreate("span");o.className="reactCountButton",o.innerHTML=REACTION_TYPES[e].renderedIcon,elData(o,"reaction-type-id",e);var s=elCreate("span");s.className="reactionCount",s.innerHTML=r.shortUnit(t[e]),o.appendChild(s),n.appendChild(o),i=!0}},this),window[n.childElementCount>0?"elShow":"elHide"](n)}}.bind(this)),i&&o.trigger()},_initReactionCountButtons:function(e,t){var i=elBySel(this._options.summaryListSelector,this._options.isSingleItem?void 0:e);null!==i&&i.addEventListener(WCF_CLICK_EVENT,this._showReactionOverlay.bind(this,t.objectId))},_showReactionOverlay:function(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()},_showOverlay:function(){this._options.parameters.data.containerID=this._objectType+"-"+this._currentObjectId,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){c.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),l.open(this,e.returnValues.template),l.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)},_ajaxSetup:function(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}},_dialogSetup:function(){return{id:"userReactionOverlay-"+this._objectType,options:{title:""},source:null}}},d}),define("WoltLabSuite/Core/Ui/Reaction/Handler",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Util","Ui/Alignment","Ui/CloseOverlay","Ui/Screen","WoltLabSuite/Core/Ui/Reaction/CountButtons"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(e,t){this.init(e,t)}return c.prototype={init:function(e,a){if(""===a.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new i,this._objectType=e,this._cache=new i,this._objects=new i,this._popoverCurrentObjectId=0,this._popover=null,this._popoverContent=null,this._options=t.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},a),this.initReactButtons(a,e),this.countButtons=new l(this._objectType,this._options),n.add("WoltLabSuite/Core/Ui/Reaction/Handler-"+e,this.initReactButtons.bind(this)),o.add("WoltLabSuite/Core/Ui/Reaction/Handler",this._closePopover.bind(this))},initReactButtons:function(){for(var e,t,i,r=elBySelAll(this._options.containerSelector),o=!1,s=0,l=r.length;s<l;s++)if(e=r[s],!this._containers.has(a.identify(e))){i=~~elData(e,"object-id"),t={reactButton:null,objectId:i,element:e},this._containers.set(a.identify(e),t),this._initReactButton(e,t);var c=[];this._objects.has(i)&&(c=this._objects.get(i)),c.push(t),this._objects.set(i,c),o=!0}o&&n.trigger()},_initReactButton:function(e,t){if(this._options.isSingleItem?t.reactButton=elBySel(this._options.buttonSelector):t.reactButton=elBySel(this._options.buttonSelector,e),null!==t.reactButton&&0!==t.reactButton.length){if(1===Object.keys(REACTION_TYPES).length){var i=REACTION_TYPES[Object.keys(REACTION_TYPES)[0]];t.reactButton.title=i.title;elBySel(".invisible",t.reactButton).innerText=i.title}t.reactButton.addEventListener(WCF_CLICK_EVENT,this._toggleReactPopover.bind(this,t.objectId,t.reactButton))}},_updateReactButton:function(e,t){this._objects.get(e).forEach(function(e){null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),elData(e.reactButton,"reaction-type-id",t)):(elData(e.reactButton,"reaction-type-id",0),e.reactButton.classList.remove("active")))})},_markReactionAsActive:function(){var e=null;if(this._objects.get(this._popoverCurrentObjectId).forEach(function(t){null!==t.reactButton&&(e=~~elData(t.reactButton,"reaction-type-id"))}),null===e)throw new Error("Unable to find react button for current popover.");elBySelAll(".reactionTypeButton.active",this._getPopover(),function(e){e.classList.remove("active")});var t=elBySel(".reactionPopoverContent",this._getPopover());if(e){var i=elBySel('.reactionTypeButton[data-reaction-type-id="'+e+'"]',this._getPopover());i.classList.add("active"),0==~~elData(i,"is-assignable")&&elShow(i),this._scrollReactionIntoView(t,i)}else s.is("screen-xs")&&(this._getPopover().classList.contains("inverseOrder")?t.scrollTop=0:t.scrollTop=t.scrollHeight-t.clientHeight)},_scrollReactionIntoView:function(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2},_toggleReactPopover:function(e,t,i){if(null!==i&&(i.preventDefault(),i.stopPropagation()),1===Object.keys(REACTION_TYPES).length){var n=REACTION_TYPES[Object.keys(REACTION_TYPES)[0]];this._popoverCurrentObjectId=e,this._react(n.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover(e,t)},_openReactPopover:function(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,r.set(this._getPopover(),t,{pointer:!0,horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:s.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");var i=this._getPopover(),n="auto"===i.style.getPropertyValue("bottom");i.classList[n?"add":"remove"]("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),i.classList.remove("forceHide"),i.classList.add("active")},_getPopover:function(){if(null==this._popover){this._popover=elCreate("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=elCreate("div"),this._popoverContent.className="reactionPopoverContent";var e=elCreate("ul");e.className="reactionTypeButtonList";var t=this._getSortedReactionTypes();for(var i in t)if(t.hasOwnProperty(i)){var a=t[i],r=elCreate("li");r.className="reactionTypeButton jsTooltip",elData(r,"reaction-type-id",a.reactionTypeID),elData(r,"title",a.title),elData(r,"is-assignable",~~a.isAssignable),r.title=a.title;var o=elCreate("span");o.className="reactionTypeButtonTitle",o.innerHTML=a.title,r.innerHTML=a.renderedIcon,r.appendChild(o),r.addEventListener(WCF_CLICK_EVENT,this._react.bind(this,a.reactionTypeID)),a.isAssignable||elHide(r),e.appendChild(r)}this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",this._rebuildOverflowIndicator.bind(this),{passive:!0}),this._popover.appendChild(this._popoverContent);var s=elCreate("span");s.className="elementPointer",s.appendChild(elCreate("span")),this._popover.appendChild(s),document.body.appendChild(this._popover),n.trigger()}return this._popover},_rebuildOverflowIndicator:function(){var e=this._popoverContent.scrollTop>0;this._popoverContent.classList[e?"add":"remove"]("overflowTop");var t=this._popoverContent.scrollTop+this._popoverContent.clientHeight<this._popoverContent.scrollHeight;this._popoverContent.classList[t?"add":"remove"]("overflowBottom")},_getSortedReactionTypes:function(){var e=[];for(var t in REACTION_TYPES)REACTION_TYPES.hasOwnProperty(t)&&e.push(REACTION_TYPES[t]);return e.sort(function(e,t){return e.showOrder-t.showOrder}),e},_closePopover:function(){0!==this._popoverCurrentObjectId&&(this._getPopover().classList.remove("active"),elBySelAll('.reactionTypeButton[data-is-assignable="0"]',this._getPopover(),elHide),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach(function(e){e.reactButton.closest("nav").style.cssText=""}),this._popoverCurrentObjectId=0)},_react:function(t){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=t,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,e.api(this,{parameters:this._options.parameters}),this._closePopover())},_ajaxSuccess:function(e){this.countButtons.updateCountButtons(e.returnValues.objectID,e.returnValues.reactions),this._updateReactButton(e.returnValues.objectID,e.returnValues.reactionTypeID)},_ajaxSetup:function(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}},c}),define("WoltLabSuite/Core/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/User/List","User","WoltLabSuite/Core/Ui/Reaction/Handler"],function(e,t,i,n,a,r,o,s,l,c,d,u){"use strict";function h(e,t){this.init(e,t)}return h.prototype={init:function(e,i){if(""===i.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new a,this._details=new a,this._objectType=e,this._options=t.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"},i),this.initContainers(i,e),o.add("WoltLabSuite/Core/Ui/Like/Handler-"+e,this.initContainers.bind(this)),new u(this._objectType,{containerSelector:this._options.containerSelector,summaryListSelector:".reactionSummaryList"})},initContainers:function(){for(var e,t,i=elBySelAll(this._options.containerSelector),n=!1,a=0,r=i.length;a<r;a++)e=i[a],this._containers.has(e)||(t={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~elData(e,"like-dislikes"),liked:~~elData(e,"like-liked"),likes:~~elData(e,"like-likes"),objectId:~~elData(e,"object-id"),users:JSON.parse(elData(e,"like-users"))},this._containers.set(e,t),this._buildWidget(e,t),n=!0);n&&o.trigger()},_buildWidget:function(e,t){var i,n,a,o=!0;if(a=this._options.isSingleItem?elBySel(this._options.summarySelector):elBySel(this._options.summarySelector,e),null===a&&(a=this._options.isSingleItem?elBySel(this._options.badgeContainerSelector):elBySel(this._options.badgeContainerSelector,e),o=!1),null!==a){i=elCreate("ul"),i.classList.add("reactionSummaryList"),o?i.classList.add("likesSummary"):i.classList.add("reactionSummaryListTiny");for(var l in t.users)if("reactionTypeID"!==l&&REACTION_TYPES.hasOwnProperty(l)){var c=elCreate("li");c.className="reactCountButton",elData(c,"reaction-type-id",l);var u=elCreate("span");u.className="reactionCount",u.innerHTML=r.shortUnit(t.users[l]),c.appendChild(u),c.innerHTML=REACTION_TYPES[l].renderedIcon+c.innerHTML,i.appendChild(c)}o?this._options.summaryPrepend?s.prepend(i,a):a.appendChild(i):"OL"===a.nodeName||"UL"===a.nodeName?(n=elCreate("li"),n.appendChild(i),a.appendChild(n)):a.appendChild(i),t.badge=i}if(this._options.canLike&&(d.userId!=elData(e,"user-id")||this._options.canLikeOwnContent)){var h=this._options.buttonAppendToSelector?this._options.isSingleItem?elBySel(this._options.buttonAppendToSelector):elBySel(this._options.buttonAppendToSelector,e):null,f=this._options.buttonBeforeSelector?this._options.isSingleItem?elBySel(this._options.buttonBeforeSelector):elBySel(this._options.buttonBeforeSelector,e):null;if(null===f&&null===h)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,f,h)}},_createButton:function(e,t,i,a){var r=n.get("wcf.reactions.react"),o=elCreate("li");o.className="wcfReactButton";var s=elCreate("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=r;var l=elCreate("span");l.className="icon icon16 fa-smile-o",void 0===t||0==t?elData(l,"reaction-type-id",0):(elData(s,"reaction-type-id",t),s.classList.add("active")),s.appendChild(l);var c=elCreate("span");return c.className="invisible",c.innerHTML=r,s.appendChild(document.createTextNode(" ")),s.appendChild(c),o.appendChild(s),i?i.parentNode.insertBefore(o,i):a.appendChild(o),s}},h}),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["Ajax","Core","Dictionary","Environment","EventHandler","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function f(e){this.init(e)}return f.prototype={init:function(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new o,this._options=t.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.add("Ui/Message/InlineEdit_"+this._options.className,this.rebuild.bind(this))},rebuild:function(){for(var e,t,i,n=elBySelAll(this._options.messageSelector),a=0,r=n.length;a<r;a++)if(i=n[a],!this._elements.has(i)){e=elBySel(".jsMessageEditButton",i),null!==e&&(t=elDataBool(i,"can-edit"),this._options.canEditInline||elDataBool(i,"can-edit-inline")?(e.addEventListener(WCF_CLICK_EVENT,this._clickDropdown.bind(this,i)),e.classList.add("jsDropdownEnabled"),t&&e.addEventListener("dblclick",this._click.bind(this,i))):t&&e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,i)));var o=elBySel(".messageBody",i),s=elBySel(".messageFooter",i),l=elBySel(".messageHeader",i);this._elements.set(i,{button:e,messageBody:o,messageBodyEditor:null,messageFooter:s,messageFooterButtons:elBySel(".messageFooterButtons",s),messageHeader:l,messageText:elBySel(".messageText",o)})}},_click:function(t,i){null===t&&(t=this._activeDropdownElement),i&&i.preventDefault(),null===this._activeElement?(this._activeElement=t,this._prepare(),e.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(t)}})):d.show("wcf.message.error.editorAlreadyInUse",null,"warning")},_clickDropdown:function(e,i){i.preventDefault();var n=i.currentTarget;if(!n.classList.contains("dropdownToggle")){if(n.classList.add("dropdownToggle"),n.parentNode.classList.add("dropdown"),function(e,t){e.addEventListener(WCF_CLICK_EVENT,function(i){i.preventDefault(),i.stopPropagation(),this._activeDropdownElement=t,u.toggleDropdown(this._options.dropdownIdentifier,e)}.bind(this))}.bind(this)(n,e),null===this._dropdownMenu){this._dropdownMenu=elCreate("ul"),this._dropdownMenu.className="dropdownMenu";var r=this._dropdownGetItems();a.fire("com.woltlab.wcf.inlineEditor","dropdownInit_"+this._options.dropdownIdentifier,{items:r}),this._dropdownBuild(r),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,this._dropdownToggle.bind(this))}setTimeout(function(){t.triggerEvent(n,WCF_CLICK_EVENT)},10)}},_dropdownBuild:function(e){for(var t,i,n,a=this._clickDropdownItem.bind(this),o=0,s=e.length;o<s;o++)t=e[o],n=elCreate("li"),elData(n,"item",t.item),"divider"===t.item?n.className="dropdownDivider":(i=elCreate("span"),i.textContent=r.get(t.label),n.appendChild(i),"editItem"===t.item?n.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,null)):n.addEventListener(WCF_CLICK_EVENT,a)),this._dropdownMenu.appendChild(n)},_dropdownToggle:function(e,t){var i=this._elements.get(this._activeDropdownElement);if(i.button.parentNode.classList["open"===t?"add":"remove"]("dropdownOpen"),i.messageFooterButtons.classList["open"===t?"add":"remove"]("forceVisible"),"open"===t){var n=this._dropdownOpen();a.fire("com.woltlab.wcf.inlineEditor","dropdownOpen_"+this._options.dropdownIdentifier,{element:this._activeDropdownElement,visibility:n});for(var r,o,s=!1,l=0;l<this._dropdownMenu.childElementCount;l++)o=this._dropdownMenu.children[l],r=elData(o,"item"),"divider"===r?s?(elShow(o),s=!1):elHide(o):objOwns(n,r)&&!1===n[r]?(elHide(o),l>0&&l+1===this._dropdownMenu.childElementCount&&"divider"===elData(o.previousElementSibling,"item")&&elHide(o.previousElementSibling)):(elShow(o),s=!0)}},_dropdownGetItems:function(){},_dropdownOpen:function(){},_dropdownSelect:function(e){},_clickDropdownItem:function(e){e.preventDefault();var t=elData(e.currentTarget,"item"),i={cancel:!1,element:this._activeDropdownElement,item:t};a.fire("com.woltlab.wcf.inlineEditor","dropdownItemClick_"+this._options.dropdownIdentifier,i),!0===i.cancel?e.preventDefault():this._dropdownSelect(t)},_prepare:function(){var e=this._elements.get(this._activeElement),t=elCreate("div");t.className="messageBody editor",e.messageBodyEditor=t;var i=elCreate("span");i.className="icon icon48 fa-spinner",t.appendChild(i),c.insertAfter(t,e.messageBody),elHide(e.messageBody)},_showEditor:function(e){var t=this._getEditorId(),i=this._elements.get(this._activeElement);this._activeElement.classList.add("jsInvalidQuoteTarget");var r=l.childByClass(i.messageBodyEditor,"icon");elRemove(r);var o=i.messageBodyEditor,s=elCreate("div");s.className="editorContainer",c.setInnerHtml(s,e.returnValues.template),o.appendChild(s);var d=elBySel(".formSubmit",s);elBySel('button[data-type="save"]',d).addEventListener(WCF_CLICK_EVENT,this._save.bind(this)),elBySel('button[data-type="cancel"]',d).addEventListener(WCF_CLICK_EVENT,this._restoreMessage.bind(this)),a.add("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,this._save()}.bind(this)),elHide(i.messageHeader),elHide(i.messageFooter);var u=elById(t);"redactor"===n.editor()?window.setTimeout(function(){this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(this._activeElement)}.bind(this),250):u.focus()},_restoreMessage:function(){var e=this._elements.get(this._activeElement);this._destroyEditor(),elRemove(e.messageBodyEditor),e.messageBodyEditor=null,elShow(e.messageBody),elShow(e.messageFooter),elShow(e.messageHeader),this._activeElement.classList.remove("jsInvalidQuoteTarget"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()},_save:function(){var t={containerID:this._options.containerId,data:{message:""},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},i=this._getEditorId(),n=elById("settings_"+i);n&&elBySelAll("input, select, textarea",n,function(e){if("INPUT"!==e.nodeName||"checkbox"!==e.type&&"radio"!==e.type||e.checked){var i=e.name;if(t.hasOwnProperty(i))throw new Error("Variable overshadowing, key '"+i+"' is already present.");t[i]=e.value.trim()}}),a.fire("com.woltlab.wcf.redactor2","getText_"+i,t.data);var r=this._validate(t);r instanceof Promise||(r=!1===r?Promise.reject():Promise.resolve()),r.then(function(){a.fire("com.woltlab.wcf.redactor2","submit_"+i,t),e.api(this,{actionName:"save",parameters:t}),this._hideEditor()}.bind(this),function(e){console.log("Validation of post edit failed: "+e)})},_validate:function(e){elBySelAll(".innerError",this._activeElement,elRemove);var t={api:this,parameters:e,valid:!0,promises:[]};return a.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),t),t.promises.push(Promise[t.valid?"resolve":"reject"]()),Promise.all(t.promises)},throwError:function(e,t){elInnerError(e,t)},_showMessage:function(e){var t=this._activeElement,i=this._getEditorId(),n=this._elements.get(t),r=elBySelAll(".attachmentThumbnailList, .attachmentFileList",n.messageFooter);if(c.setInnerHtml(l.childByClass(n.messageBody,"messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){for(var o=0,s=r.length;o<s;o++)elRemove(r[o]);var u=elCreate("div");c.setInnerHtml(u,e.returnValues.attachmentList);for(var h;u.childNodes.length;)h=u.childNodes[u.childNodes.length-1],n.messageFooter.insertBefore(h,n.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){var f=elBySel(".pollContainer",n.messageBody);null!==f&&elRemove(f.parentNode);var p=elCreate("div");p.className="jsInlineEditorHideContent",c.setInnerHtml(p,e.returnValues.poll),c.prepend(p,n.messageBody)}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),a.fire("com.woltlab.wcf.redactor","autosaveDestroy_"+i),d.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())},_hideEditor:function(){var e=this._elements.get(this._activeElement);elHide(l.childByClass(e.messageBodyEditor,"editorContainer"));var t=elCreate("span");t.className="icon icon48 fa-spinner",e.messageBodyEditor.appendChild(t)},_restoreEditor:function(){var e=this._elements.get(this._activeElement),t=elBySel(".fa-spinner",e.messageBodyEditor);elRemove(t);var i=l.childByClass(e.messageBodyEditor,"editorContainer");null!==i&&elShow(i)},_destroyEditor:function(){a.fire("com.woltlab.wcf.redactor2","autosaveDestroy_"+this._getEditorId()),a.fire("com.woltlab.wcf.redactor2","destroy_"+this._getEditorId())},_getHash:function(e){return"#message"+e},_updateHistory:function(e){window.location.hash=e},_getEditorId:function(){return this._options.editorPrefix+this._getObjectId(this._activeElement)},_getObjectId:function(e){return~~elData(e,"object-id")},_ajaxFailure:function(e){var t=this._elements.get(this._activeElement),i=elBySel(".redactor-layer",t.messageBodyEditor);return null===i?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(elInnerError(i,e.returnValues.realErrorMessage),!1))},_ajaxSuccess:function(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}},_ajaxSetup:function(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}},legacyEdit:function(e){this._click(elById(e),null)}},f}),define("WoltLabSuite/Core/Ui/Message/Manager",["Ajax","Core","Dictionary","Language","Dom/ChangeListener","Dom/Util"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(e){this._elements=null,this._options=t.extend({className:"",selector:""},e),this.rebuild(),a.add("Ui/Message/Manager"+this._options.className,this.rebuild.bind(this))},rebuild:function(){
+;var a=elBySel(".icon",n);a.classList["showAll"===i?"add":"remove"]("fa-eye"),a.classList["showAll"===i?"remove":"add"]("fa-eye-slash")}}},s}),define("WoltLabSuite/Core/Ui/ItemList/Static",["Core","Dictionary","Language","Dom/Traverse","EventKey","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o="",s=new t,l=!1,c=null,d=null,u=null,h=null,f=null,p=null;return{init:function(t,i,a){var o=elById(t);if(null===o)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(s.has(t)){var l=s.get(t);for(var c in l)if(l.hasOwnProperty(c)){var d=l[c];d instanceof Element&&d.parentNode&&elRemove(d)}r.destroy(t),s.delete(t)}a=e.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},a);var u=n.parentByTag(o,"FORM");if(null!==u&&!1===a.isCSV){if(!a.submitFieldName.length&&"function"!=typeof a.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");u.addEventListener("submit",function(){var e=this.getValues(t);if(a.submitFieldName.length)for(var i,n=0,r=e.length;n<r;n++)i=elCreate("input"),i.type="hidden",i.name=a.submitFieldName.replace("{$objectId}",e[n].objectId),i.value=e[n].value,u.appendChild(i);else a.callbackSubmit(u,e)}.bind(this))}this._setup();var h=this._createUI(o,a);if(s.set(t,{dropdownMenu:null,element:h.element,list:h.list,listItem:h.element.parentNode,options:a,shadow:h.shadow}),i=h.values.length?h.values:i,Array.isArray(i))for(var f,p=!h.element.disabled,m=0,g=i.length;m<g;m++)f=i[m],"string"==typeof f&&(f={objectId:0,value:f}),this._addItem(t,f,p)},getValues:function(e){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=s.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent})}),i},setValues:function(e,t){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,a,r=s.get(e),o=n.childrenByClass(r.list,"item");for(i=0,a=o.length;i<a;i++)this._removeItem(null,o[i],!0);for(i=0,a=t.length;i<a;i++)this._addItem(e,t[i])},_setup:function(){l||(l=!0,c=this._keyDown.bind(this),d=this._keyPress.bind(this),u=this._keyUp.bind(this),h=this._paste.bind(this),f=this._removeItem.bind(this),p=this._blur.bind(this))},_createUI:function(e,t){var i=elCreate("ol");i.className="inputItemList"+(e.disabled?" disabled":""),elData(i,"element-id",e.id),i.addEventListener(WCF_CLICK_EVENT,function(t){t.target===i&&e.focus()});var n=elCreate("li");n.className="input",i.appendChild(n),e.addEventListener("keydown",c),e.addEventListener("keypress",d),e.addEventListener("keyup",u),e.addEventListener("paste",h),e.addEventListener("blur",p),e.parentNode.insertBefore(i,e),n.appendChild(e),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var a=null,r=[];if(t.isCSV){a=elCreate("input"),a.className="itemListInputShadow",a.type="hidden",a.name=e.name,e.removeAttribute("name"),i.parentNode.insertBefore(a,i);for(var o,s=e.value.split(","),l=0,f=s.length;l<f;l++)o=s[l].trim(),o.length&&r.push(o);if("TEXTAREA"===e.nodeName){var m=elCreate("input");m.type="text",e.parentNode.insertBefore(m,e),m.id=e.id,elRemove(e),e=m}}return{element:e,list:i,shadow:a,values:r}},_handleLimit:function(e){var t=s.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,elAttr(t.element,"placeholder",i.get("wcf.global.form.input.maxItems"))))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;o=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(a.Enter(e)||a.Comma(e)){e.preventDefault();var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_paste:function(e){var t="";t="object"==typeof window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData.getData("text/plain"),t.split(/,/).forEach(function(t){t=t.trim(),0!==t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}.bind(this)),e.preventDefault()},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t,i){var n=s.get(e),a=elCreate("li");a.className="item";var r=elCreate("span");if(r.className="content",elData(r,"object-id",t.objectId),r.textContent=t.value,a.appendChild(r),i||!n.element.disabled){var o=elCreate("a");o.className="icon icon16 fa-times",o.addEventListener(WCF_CLICK_EVENT,f),a.appendChild(o)}n.list.insertBefore(a,n.listItem),n.element.value="",n.element.disabled||this._handleLimit(e);var l=this._syncShadow(n);"function"==typeof n.options.callbackChange&&(null===l&&(l=this.getValues(e)),n.options.callbackChange(e,l))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,a=elData(n,"element-id"),r=s.get(a);n.removeChild(t),i||r.element.focus(),this._handleLimit(a);var o=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===o&&(o=this.getValues(a)),r.options.callbackChange(a,o))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;n<a;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i},_blur:function(e){var t=(s.get(e.currentTarget.id),e.currentTarget);window.setTimeout(function(){var e=t.value.trim();e.length&&this._addItem(t.id,{objectId:0,value:e})}.bind(this),100)}}}),define("WoltLabSuite/Core/Ui/ItemList/User",["WoltLabSuite/Core/Ui/ItemList"],function(e){"use strict";return{init:function(t,i){e.init(t,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:~~i.includeUserGroups,restrictUserGroupIDs:Array.isArray(i.restrictUserGroupIDs)?i.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof i.callbackChange?i.callbackChange:null,callbackSyncShadow:i.csvPerType?this._syncShadow.bind(this):null,callbackSetupValues:"function"==typeof i.callbackSetupValues?i.callbackSetupValues:null,excludedSearchValues:Array.isArray(i.excludedSearchValues)?i.excludedSearchValues:[],isCSV:!0,maxItems:~~i.maxItems||-1,restricted:!0})},getValues:function(t){return e.getValues(t)},_syncShadow:function(e){var t=this.getValues(e.element.id),i=[],n=[];return t.forEach(function(e){e.type&&"group"===e.type?n.push(e.objectId):i.push(e.value)}),e.shadow.value=i.join(","),e._shadowGroups||(e._shadowGroups=elCreate("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=e.shadow.name+"GroupIDs",e.shadow.parentNode.insertBefore(e._shadowGroups,e.shadow)),e._shadowGroups.value=n.join(","),t}}}),define("WoltLabSuite/Core/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(e){this._cache=new i,this._pageCount=0,this._pageNo=1,this._options=t.extend({className:"",dialogTitle:"",parameters:{}},e)},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t){if("number"==typeof t&&(this._pageNo=~~t),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)){var i=a.open(this,this._cache.get(this._pageNo));if(this._pageCount>1){var n=elBySel(".jsPagination",i.content);null!==n&&new r(n,{activePage:this._pageNo,maxPage:this._pageCount,callbackSwitch:this._showPage.bind(this)});var o=i.content.parentNode;o.scrollTop>0&&(o.scrollTop=0)}}else this._options.parameters.pageNo=this._pageNo,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&(this._pageCount=~~e.returnValues.pageCount),this._cache.set(this._pageNo,e.returnValues.template),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserList",className:this._options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}},_dialogSetup:function(){return{id:n.getUniqueId(),options:{title:this._options.dialogTitle},source:null}}},o}),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","EventHandler"],function(e,t,i,n,a,r,o,s,l,c){"use strict";function d(e,t){this.init(e,t)}return d.prototype={init:function(e,n){if(""===n.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._containers=new i,this._objects=new i,this._objectType=e,this._options=t.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},n),this.initContainers(n,e),o.add("WoltLabSuite/Core/Ui/Reaction/CountButtons-"+e,this.initContainers.bind(this))},initContainers:function(){for(var e,t,i,n=elBySelAll(this._options.containerSelector),a=!1,r=0,l=n.length;r<l;r++)if(e=n[r],!this._containers.has(s.identify(e))){i=~~elData(e,"object-id"),t={reactButton:null,summary:null,objectId:i,element:e},this._containers.set(s.identify(e),t),this._initReactionCountButtons(e,t);var c=[];this._objects.has(i)&&(c=this._objects.get(i)),c.push(t),this._objects.set(i,c),a=!0}a&&o.trigger()},updateCountButtons:function(e,t){var i=!1;this._objects.get(e).forEach(function(e){var n=elBySel(this._options.summaryListSelector,this._options.isSingleItem?void 0:e.element);if(null!==n){for(var a={},o=elBySelAll(".reactCountButton",n),s=0,l=o.length;s<l;s++){var c=elData(o[s],"reaction-type-id");t.hasOwnProperty(c)?a[c]=o[s]:elRemove(o[s])}Object.keys(t).forEach(function(e){if(void 0!==a[e]){elBySel(".reactionCount",a[e]).innerHTML=r.shortUnit(t[e])}else if(void 0!==REACTION_TYPES[e]){var o=elCreate("span");o.className="reactCountButton",o.innerHTML=REACTION_TYPES[e].renderedIcon,elData(o,"reaction-type-id",e);var s=elCreate("span");s.className="reactionCount",s.innerHTML=r.shortUnit(t[e]),o.appendChild(s),n.appendChild(o),i=!0}},this),window[n.childElementCount>0?"elShow":"elHide"](n)}}.bind(this)),i&&o.trigger()},_initReactionCountButtons:function(e,t){var i=elBySel(this._options.summaryListSelector,this._options.isSingleItem?void 0:e);null!==i&&i.addEventListener(WCF_CLICK_EVENT,this._showReactionOverlay.bind(this,t.objectId))},_showReactionOverlay:function(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()},_showOverlay:function(){this._options.parameters.data.containerID=this._objectType+"-"+this._currentObjectId,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){c.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),l.open(this,e.returnValues.template),l.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)},_ajaxSetup:function(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}},_dialogSetup:function(){return{id:"userReactionOverlay-"+this._objectType,options:{title:""},source:null}}},d}),define("WoltLabSuite/Core/Ui/Reaction/Handler",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Util","Ui/Alignment","Ui/CloseOverlay","Ui/Screen","WoltLabSuite/Core/Ui/Reaction/CountButtons"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(e,t){this.init(e,t)}return c.prototype={init:function(e,a){if(""===a.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new i,this._objectType=e,this._cache=new i,this._objects=new i,this._popoverCurrentObjectId=0,this._popover=null,this._popoverContent=null,this._options=t.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},a),this.initReactButtons(a,e),this.countButtons=new l(this._objectType,this._options),n.add("WoltLabSuite/Core/Ui/Reaction/Handler-"+e,this.initReactButtons.bind(this)),o.add("WoltLabSuite/Core/Ui/Reaction/Handler",this._closePopover.bind(this))},initReactButtons:function(){for(var e,t,i,r=elBySelAll(this._options.containerSelector),o=!1,s=0,l=r.length;s<l;s++)if(e=r[s],!this._containers.has(a.identify(e))){i=~~elData(e,"object-id"),t={reactButton:null,objectId:i,element:e},this._containers.set(a.identify(e),t),this._initReactButton(e,t);var c=[];this._objects.has(i)&&(c=this._objects.get(i)),c.push(t),this._objects.set(i,c),o=!0}o&&n.trigger()},_initReactButton:function(e,t){if(this._options.isSingleItem?t.reactButton=elBySel(this._options.buttonSelector):t.reactButton=elBySel(this._options.buttonSelector,e),null!==t.reactButton&&0!==t.reactButton.length){if(1===Object.keys(REACTION_TYPES).length){var i=REACTION_TYPES[Object.keys(REACTION_TYPES)[0]];t.reactButton.title=i.title;elBySel(".invisible",t.reactButton).innerText=i.title}t.reactButton.addEventListener(WCF_CLICK_EVENT,this._toggleReactPopover.bind(this,t.objectId,t.reactButton))}},_updateReactButton:function(e,t){this._objects.get(e).forEach(function(e){null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),elData(e.reactButton,"reaction-type-id",t)):(elData(e.reactButton,"reaction-type-id",0),e.reactButton.classList.remove("active")))})},_markReactionAsActive:function(){var e=null;if(this._objects.get(this._popoverCurrentObjectId).forEach(function(t){null!==t.reactButton&&(e=~~elData(t.reactButton,"reaction-type-id"))}),null===e)throw new Error("Unable to find react button for current popover.");elBySelAll(".reactionTypeButton.active",this._getPopover(),function(e){e.classList.remove("active")});var t=elBySel(".reactionPopoverContent",this._getPopover());if(e){var i=elBySel('.reactionTypeButton[data-reaction-type-id="'+e+'"]',this._getPopover());i.classList.add("active"),0==~~elData(i,"is-assignable")&&elShow(i),this._scrollReactionIntoView(t,i)}else s.is("screen-xs")&&(this._getPopover().classList.contains("inverseOrder")?t.scrollTop=0:t.scrollTop=t.scrollHeight-t.clientHeight)},_scrollReactionIntoView:function(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2},_toggleReactPopover:function(e,t,i){if(null!==i&&(i.preventDefault(),i.stopPropagation()),1===Object.keys(REACTION_TYPES).length){var n=REACTION_TYPES[Object.keys(REACTION_TYPES)[0]];this._popoverCurrentObjectId=e,this._react(n.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover(e,t)},_openReactPopover:function(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,r.set(this._getPopover(),t,{pointer:!0,horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:s.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");var i=this._getPopover(),n="auto"===i.style.getPropertyValue("bottom");i.classList[n?"add":"remove"]("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),i.classList.remove("forceHide"),i.classList.add("active")},_getPopover:function(){if(null==this._popover){this._popover=elCreate("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=elCreate("div"),this._popoverContent.className="reactionPopoverContent";var e=elCreate("ul");e.className="reactionTypeButtonList";var t=this._getSortedReactionTypes();for(var i in t)if(t.hasOwnProperty(i)){var a=t[i],r=elCreate("li");r.className="reactionTypeButton jsTooltip",elData(r,"reaction-type-id",a.reactionTypeID),elData(r,"title",a.title),elData(r,"is-assignable",~~a.isAssignable),r.title=a.title;var o=elCreate("span");o.className="reactionTypeButtonTitle",o.innerHTML=a.title,r.innerHTML=a.renderedIcon,r.appendChild(o),r.addEventListener(WCF_CLICK_EVENT,this._react.bind(this,a.reactionTypeID)),a.isAssignable||elHide(r),e.appendChild(r)}this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",this._rebuildOverflowIndicator.bind(this),{passive:!0}),this._popover.appendChild(this._popoverContent);var s=elCreate("span");s.className="elementPointer",s.appendChild(elCreate("span")),this._popover.appendChild(s),document.body.appendChild(this._popover),n.trigger()}return this._popover},_rebuildOverflowIndicator:function(){var e=this._popoverContent.scrollTop>0;this._popoverContent.classList[e?"add":"remove"]("overflowTop");var t=this._popoverContent.scrollTop+this._popoverContent.clientHeight<this._popoverContent.scrollHeight;this._popoverContent.classList[t?"add":"remove"]("overflowBottom")},_getSortedReactionTypes:function(){var e=[];for(var t in REACTION_TYPES)REACTION_TYPES.hasOwnProperty(t)&&e.push(REACTION_TYPES[t]);return e.sort(function(e,t){return e.showOrder-t.showOrder}),e},_closePopover:function(){0!==this._popoverCurrentObjectId&&(this._getPopover().classList.remove("active"),elBySelAll('.reactionTypeButton[data-is-assignable="0"]',this._getPopover(),elHide),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach(function(e){e.reactButton.closest("nav").style.cssText=""}),this._popoverCurrentObjectId=0)},_react:function(t){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=t,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,e.api(this,{parameters:this._options.parameters}),this._closePopover())},_ajaxSuccess:function(e){this.countButtons.updateCountButtons(e.returnValues.objectID,e.returnValues.reactions),this._updateReactButton(e.returnValues.objectID,e.returnValues.reactionTypeID)},_ajaxSetup:function(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}},c}),define("WoltLabSuite/Core/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/User/List","User","WoltLabSuite/Core/Ui/Reaction/Handler"],function(e,t,i,n,a,r,o,s,l,c,d,u){"use strict";function h(e,t){this.init(e,t)}return h.prototype={init:function(e,i){if(""===i.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new a,this._details=new a,this._objectType=e,this._options=t.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"},i),this.initContainers(i,e),o.add("WoltLabSuite/Core/Ui/Like/Handler-"+e,this.initContainers.bind(this)),new u(this._objectType,{containerSelector:this._options.containerSelector,summaryListSelector:".reactionSummaryList"})},initContainers:function(){for(var e,t,i=elBySelAll(this._options.containerSelector),n=!1,a=0,r=i.length;a<r;a++)e=i[a],this._containers.has(e)||(t={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~elData(e,"like-dislikes"),liked:~~elData(e,"like-liked"),likes:~~elData(e,"like-likes"),objectId:~~elData(e,"object-id"),users:JSON.parse(elData(e,"like-users"))},this._containers.set(e,t),this._buildWidget(e,t),n=!0);n&&o.trigger()},_buildWidget:function(e,t){var i,n,a,o=!0;if(a=this._options.isSingleItem?elBySel(this._options.summarySelector):elBySel(this._options.summarySelector,e),null===a&&(a=this._options.isSingleItem?elBySel(this._options.badgeContainerSelector):elBySel(this._options.badgeContainerSelector,e),o=!1),null!==a){i=elCreate("ul"),i.classList.add("reactionSummaryList"),o?i.classList.add("likesSummary"):i.classList.add("reactionSummaryListTiny");for(var l in t.users)if("reactionTypeID"!==l&&REACTION_TYPES.hasOwnProperty(l)){var c=elCreate("li");c.className="reactCountButton",elData(c,"reaction-type-id",l);var u=elCreate("span");u.className="reactionCount",u.innerHTML=r.shortUnit(t.users[l]),c.appendChild(u),c.innerHTML=REACTION_TYPES[l].renderedIcon+c.innerHTML,i.appendChild(c)}o?this._options.summaryPrepend?s.prepend(i,a):a.appendChild(i):"OL"===a.nodeName||"UL"===a.nodeName?(n=elCreate("li"),n.appendChild(i),a.appendChild(n)):a.appendChild(i),t.badge=i}if(this._options.canLike&&(d.userId!=elData(e,"user-id")||this._options.canLikeOwnContent)){var h=this._options.buttonAppendToSelector?this._options.isSingleItem?elBySel(this._options.buttonAppendToSelector):elBySel(this._options.buttonAppendToSelector,e):null,f=this._options.buttonBeforeSelector?this._options.isSingleItem?elBySel(this._options.buttonBeforeSelector):elBySel(this._options.buttonBeforeSelector,e):null;if(null===f&&null===h)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,f,h)}},_createButton:function(e,t,i,a){var r=n.get("wcf.reactions.react"),o=elCreate("li");o.className="wcfReactButton";var s=elCreate("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=r;var l=elCreate("span");l.className="icon icon16 fa-smile-o",void 0===t||0==t?elData(l,"reaction-type-id",0):(elData(s,"reaction-type-id",t),s.classList.add("active")),s.appendChild(l);var c=elCreate("span");return c.className="invisible",c.innerHTML=r,s.appendChild(document.createTextNode(" ")),s.appendChild(c),o.appendChild(s),i?i.parentNode.insertBefore(o,i):a.appendChild(o),s}},h}),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["Ajax","Core","Dictionary","Environment","EventHandler","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function f(e){this.init(e)}return f.prototype={init:function(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new o,this._options=t.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.add("Ui/Message/InlineEdit_"+this._options.className,this.rebuild.bind(this))},rebuild:function(){for(var e,t,i,n=elBySelAll(this._options.messageSelector),a=0,r=n.length;a<r;a++)if(i=n[a],!this._elements.has(i)){e=elBySel(".jsMessageEditButton",i),null!==e&&(t=elDataBool(i,"can-edit"),this._options.canEditInline||elDataBool(i,"can-edit-inline")?(e.addEventListener(WCF_CLICK_EVENT,this._clickDropdown.bind(this,i)),e.classList.add("jsDropdownEnabled"),t&&e.addEventListener("dblclick",this._click.bind(this,i))):t&&e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,i)));var o=elBySel(".messageBody",i),s=elBySel(".messageFooter",i),l=elBySel(".messageHeader",i);this._elements.set(i,{button:e,messageBody:o,messageBodyEditor:null,messageFooter:s,messageFooterButtons:elBySel(".messageFooterButtons",s),messageHeader:l,messageText:elBySel(".messageText",o)})}},_click:function(t,i){null===t&&(t=this._activeDropdownElement),i&&i.preventDefault(),null===this._activeElement?(this._activeElement=t,this._prepare(),e.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(t)}})):d.show("wcf.message.error.editorAlreadyInUse",null,"warning")},_clickDropdown:function(e,i){i.preventDefault();var n=i.currentTarget;if(!n.classList.contains("dropdownToggle")){if(n.classList.add("dropdownToggle"),n.parentNode.classList.add("dropdown"),function(e,t){e.addEventListener(WCF_CLICK_EVENT,function(i){i.preventDefault(),i.stopPropagation(),this._activeDropdownElement=t,u.toggleDropdown(this._options.dropdownIdentifier,e)}.bind(this))}.bind(this)(n,e),null===this._dropdownMenu){this._dropdownMenu=elCreate("ul"),this._dropdownMenu.className="dropdownMenu";var r=this._dropdownGetItems();a.fire("com.woltlab.wcf.inlineEditor","dropdownInit_"+this._options.dropdownIdentifier,{items:r}),this._dropdownBuild(r),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,this._dropdownToggle.bind(this))}setTimeout(function(){t.triggerEvent(n,WCF_CLICK_EVENT)},10)}},_dropdownBuild:function(e){for(var t,i,n,a=this._clickDropdownItem.bind(this),o=0,s=e.length;o<s;o++)t=e[o],n=elCreate("li"),elData(n,"item",t.item),"divider"===t.item?n.className="dropdownDivider":(i=elCreate("span"),i.textContent=r.get(t.label),n.appendChild(i),"editItem"===t.item?n.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,null)):n.addEventListener(WCF_CLICK_EVENT,a)),this._dropdownMenu.appendChild(n)},_dropdownToggle:function(e,t){var i=this._elements.get(this._activeDropdownElement);if(i.button.parentNode.classList["open"===t?"add":"remove"]("dropdownOpen"),i.messageFooterButtons.classList["open"===t?"add":"remove"]("forceVisible"),"open"===t){var n=this._dropdownOpen();a.fire("com.woltlab.wcf.inlineEditor","dropdownOpen_"+this._options.dropdownIdentifier,{element:this._activeDropdownElement,visibility:n});for(var r,o,s=!1,l=0;l<this._dropdownMenu.childElementCount;l++)o=this._dropdownMenu.children[l],r=elData(o,"item"),"divider"===r?s?(elShow(o),s=!1):elHide(o):objOwns(n,r)&&!1===n[r]?(elHide(o),l>0&&l+1===this._dropdownMenu.childElementCount&&"divider"===elData(o.previousElementSibling,"item")&&elHide(o.previousElementSibling)):(elShow(o),s=!0)}},_dropdownGetItems:function(){},_dropdownOpen:function(){},_dropdownSelect:function(e){},_clickDropdownItem:function(e){e.preventDefault();var t=elData(e.currentTarget,"item"),i={cancel:!1,element:this._activeDropdownElement,item:t};a.fire("com.woltlab.wcf.inlineEditor","dropdownItemClick_"+this._options.dropdownIdentifier,i),!0===i.cancel?e.preventDefault():this._dropdownSelect(t)},_prepare:function(){var e=this._elements.get(this._activeElement),t=elCreate("div");t.className="messageBody editor",e.messageBodyEditor=t;var i=elCreate("span");i.className="icon icon48 fa-spinner",t.appendChild(i),c.insertAfter(t,e.messageBody),elHide(e.messageBody)},_showEditor:function(e){var t=this._getEditorId(),i=this._elements.get(this._activeElement);this._activeElement.classList.add("jsInvalidQuoteTarget");var r=l.childByClass(i.messageBodyEditor,"icon");elRemove(r);var o=i.messageBodyEditor,s=elCreate("div");s.className="editorContainer",c.setInnerHtml(s,e.returnValues.template),o.appendChild(s);var d=elBySel(".formSubmit",s);elBySel('button[data-type="save"]',d).addEventListener(WCF_CLICK_EVENT,this._save.bind(this)),elBySel('button[data-type="cancel"]',d).addEventListener(WCF_CLICK_EVENT,this._restoreMessage.bind(this)),a.add("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,this._save()}.bind(this)),elHide(i.messageHeader),elHide(i.messageFooter);var u=elById(t);"redactor"===n.editor()?window.setTimeout(function(){this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(this._activeElement)}.bind(this),250):u.focus()},_restoreMessage:function(){var e=this._elements.get(this._activeElement);this._destroyEditor(),elRemove(e.messageBodyEditor),e.messageBodyEditor=null,elShow(e.messageBody),elShow(e.messageFooter),elShow(e.messageHeader),this._activeElement.classList.remove("jsInvalidQuoteTarget"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()},_save:function(){var t={containerID:this._options.containerId,data:{message:""},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},i=this._getEditorId(),n=elById("settings_"+i);n&&elBySelAll("input, select, textarea",n,function(e){if("INPUT"!==e.nodeName||"checkbox"!==e.type&&"radio"!==e.type||e.checked){var i=e.name;if(t.hasOwnProperty(i))throw new Error("Variable overshadowing, key '"+i+"' is already present.");t[i]=e.value.trim()}}),a.fire("com.woltlab.wcf.redactor2","getText_"+i,t.data);var r=this._validate(t);r instanceof Promise||(r=!1===r?Promise.reject():Promise.resolve()),r.then(function(){a.fire("com.woltlab.wcf.redactor2","submit_"+i,t),e.api(this,{actionName:"save",parameters:t}),this._hideEditor()}.bind(this),function(e){console.log("Validation of post edit failed: "+e)})},_validate:function(e){elBySelAll(".innerError",this._activeElement,elRemove);var t={api:this,parameters:e,valid:!0,promises:[]};return a.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),t),t.promises.push(Promise[t.valid?"resolve":"reject"]()),Promise.all(t.promises)},throwError:function(e,t){elInnerError(e,t)},_showMessage:function(e){var t=this._activeElement,i=this._getEditorId(),n=this._elements.get(t),r=elBySelAll(".attachmentThumbnailList, .attachmentFileList",n.messageFooter);if(c.setInnerHtml(l.childByClass(n.messageBody,"messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){for(var o=0,s=r.length;o<s;o++)elRemove(r[o]);var u=elCreate("div");c.setInnerHtml(u,e.returnValues.attachmentList);for(var h;u.childNodes.length;)h=u.childNodes[u.childNodes.length-1],n.messageFooter.insertBefore(h,n.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){var f=elBySel(".pollContainer",n.messageBody);null!==f&&elRemove(f.parentNode);var p=elCreate("div");p.className="jsInlineEditorHideContent",c.setInnerHtml(p,e.returnValues.poll),c.prepend(p,n.messageBody)}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),a.fire("com.woltlab.wcf.redactor","autosaveDestroy_"+i),d.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())},_hideEditor:function(){var e=this._elements.get(this._activeElement);elHide(l.childByClass(e.messageBodyEditor,"editorContainer"));var t=elCreate("span");t.className="icon icon48 fa-spinner",e.messageBodyEditor.appendChild(t)},_restoreEditor:function(){var e=this._elements.get(this._activeElement),t=elBySel(".fa-spinner",e.messageBodyEditor);elRemove(t);var i=l.childByClass(e.messageBodyEditor,"editorContainer");null!==i&&elShow(i)},_destroyEditor:function(){a.fire("com.woltlab.wcf.redactor2","autosaveDestroy_"+this._getEditorId()),a.fire("com.woltlab.wcf.redactor2","destroy_"+this._getEditorId())},_getHash:function(e){return"#message"+e},_updateHistory:function(e){window.location.hash=e},_getEditorId:function(){return this._options.editorPrefix+this._getObjectId(this._activeElement)},_getObjectId:function(e){return~~elData(e,"object-id")},_ajaxFailure:function(e){var t=this._elements.get(this._activeElement),i=elBySel(".redactor-layer",t.messageBodyEditor);return null===i?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(elInnerError(i,e.returnValues.realErrorMessage),!1))},_ajaxSuccess:function(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}},_ajaxSetup:function(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}},legacyEdit:function(e){this._click(elById(e),null)}},f}),define("WoltLabSuite/Core/Ui/Message/Manager",["Ajax","Core","Dictionary","Language","Dom/ChangeListener","Dom/Util"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(e){this._elements=null,this._options=t.extend({className:"",selector:""},e),this.rebuild(),a.add("Ui/Message/Manager"+this._options.className,this.rebuild.bind(this))},rebuild:function(){
 this._elements=new i;for(var e,t=elBySelAll(this._options.selector),n=0,a=t.length;n<a;n++)e=t[n],this._elements.set(elData(e,"object-id"),e)},getPermission:function(e,t){t="can-"+this._getAttributeName(t);var i=this._elements.get(e);if(void 0===i)throw new Error("Unknown object id '"+e+"' for selector '"+this._options.selector+"'");return elDataBool(i,t)},getPropertyValue:function(e,t,i){var n=this._elements.get(e);if(void 0===n)throw new Error("Unknown object id '"+e+"' for selector '"+this._options.selector+"'");return window[i?"elDataBool":"elData"](n,this._getAttributeName(t))},update:function(t,i,n){e.api(this,{actionName:i,parameters:n||{},objectIDs:[t]})},updateItems:function(e,t){Array.isArray(e)||(e=[e]);for(var i,n=0,a=e.length;n<a;n++)if(void 0!==(i=this._elements.get(e[n])))for(var r in t)t.hasOwnProperty(r)&&this._update(i,r,t[r])},updateAllItems:function(e){var t=[];this._elements.forEach(function(e,i){t.push(i)}.bind(this)),this.updateItems(t,e)},setNote:function(e,t,i){var n=this._elements.get(e);if(void 0===n)throw new Error("Unknown object id '"+e+"' for selector '"+this._options.selector+"'");var a=elBySel(".messageFooterNotes",n),r=elBySel("."+t,a);i?(null===r&&(r=elCreate("p"),r.className="messageFooterNote "+t,a.appendChild(r)),r.innerHTML=i):null!==r&&elRemove(r)},_update:function(e,t,i){elData(e,this._getAttributeName(t),i);var n=1==i||!0===i||"true"===i;this._updateState(e,t,i,n)},_updateState:function(e,t,i,n){switch(t){case"isDeleted":e.classList[n?"add":"remove"]("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",n);break;case"isDisabled":e.classList[n?"add":"remove"]("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",n)}},_toggleMessageStatus:function(e,t,i,a,o){var s=elBySel(".messageStatus",e);if(null===s){var l=elBySel(".messageHeaderMetaData",e);if(null===l)return;s=elCreate("ul"),s.className="messageStatus",r.insertAfter(s,l)}var c=elBySel("."+t,s);if(o){if(null!==c)return;c=elCreate("span"),c.className="badge label "+a+" "+t,c.textContent=n.get(i);var d=elCreate("li");d.appendChild(c),s.appendChild(d)}else{if(null===c)return;elRemove(c.parentNode)}},_getAttributeName:function(e){if(-1!==e.indexOf("-"))return e;for(var t,i="",n=e.split(/([A-Z][a-z]+)/),a=0,r=n.length;a<r;a++)t=n[a],t.length&&(i.length&&(i+="-"),i+=t.toLowerCase());return i},_ajaxSuccess:function(){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")},_ajaxSetup:function(){return{data:{className:this._options.className}}}},o}),define("WoltLabSuite/Core/Ui/Message/Reply",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function f(e){this.init(e)}return f.prototype={init:function(e){this._options=t.extend({ajax:{className:""},quoteManager:null,successMessage:"wcf.global.success.add"},e),this._container=elById("messageQuickReply"),this._content=elBySel(".messageContent",this._container),this._textarea=elById("text"),this._editor=null,this._guestDialogId="",this._loadingOverlay=null,elBySel(".message",this._container).classList.add("jsInvalidQuoteTarget");var i=this._submit.bind(this);elBySel('button[data-type="save"]',this._container).addEventListener(WCF_CLICK_EVENT,i);for(var n=elBySelAll(".jsQuickReply"),a=0,r=n.length;a<r;a++)n[a].addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this._getEditor().WoltLabReply.showEditor(),c.element(this._container,function(){this._getEditor().WoltLabCaret.endOfEditor()}.bind(this))}.bind(this))},_submitGuestDialog:function(e){if("keypress"!==e.type||d.Enter(e)){var i=elBySel("input[name=username]",e.currentTarget.closest(".dialogContent"));if(""===i.value)return elInnerError(i,n.get("wcf.global.form.error.empty")),void i.closest("dl").classList.add("formError");var a={parameters:{data:{username:i.value}}},r=elData(e.currentTarget,"captcha-id");if(h.has(r)){var o=h.getData(r);o instanceof Promise?o.then(function(e){a=t.extend(a,e),this._submit(void 0,a)}.bind(this)):(a=t.extend(a,h.getData(r)),this._submit(void 0,a))}else this._submit(void 0,a)}},_submit:function(n,a){if(n&&n.preventDefault(),(!this._content.classList.contains("loading")||this._guestDialogId&&s.isOpen(this._guestDialogId))&&this._validate()){this._showLoadingOverlay();var o=r.getDataAttributes(this._container,"data-",!0,!0);o.data={message:this._getEditor().code.get()},o.removeQuoteIDs=this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[];var l=elById("settings_text");l&&elBySelAll("input, select, textarea",l,function(e){if("INPUT"!==e.nodeName||"checkbox"!==e.type&&"radio"!==e.type||e.checked){var t=e.name;if(o.hasOwnProperty(t))throw new Error("Variable overshadowing, key '"+t+"' is already present.");o[t]=e.value.trim()}}),i.fire("com.woltlab.wcf.redactor2","submit_text",o.data),u.userId||a||(o.requireGuestDialog=!0),e.api(this,t.extend({parameters:o},a))}},_validate:function(){if(elBySelAll(".innerError",this._container,elRemove),this._getEditor().utils.isEmpty())return this.throwError(this._textarea,n.get("wcf.global.form.error.empty")),!1;var e={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return i.fire("com.woltlab.wcf.redactor2","validate_text",e),!1!==e.valid},throwError:function(e,t){elInnerError(e,"empty"===t?n.get("wcf.global.form.error.empty"):t)},_showLoadingOverlay:function(){null===this._loadingOverlay&&(this._loadingOverlay=elCreate("div"),this._loadingOverlay.className="messageContentLoadingOverlay",this._loadingOverlay.innerHTML='<span class="icon icon96 fa-spinner"></span>'),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)},_hideLoadingOverlay:function(){this._content.classList.remove("loading");var e=elBySel(".messageContentLoadingOverlay",this._content);null!==e&&e.parentNode.removeChild(e)},_reset:function(){this._getEditor().code.set("<p>​</p>"),i.fire("com.woltlab.wcf.redactor2","reset_text")},_handleError:function(e){var t={api:this,cancel:!1,returnValues:e.returnValues};i.fire("com.woltlab.wcf.redactor2","handleError_text",t),!0!==t.cancel&&this.throwError(this._textarea,e.returnValues.realErrorMessage)},_getEditor:function(){if(null===this._editor){if("function"!=typeof window.jQuery)throw new Error("Unable to access editor, jQuery has not been loaded yet.");this._editor=window.jQuery(this._textarea).data("redactor")}return this._editor},_insertMessage:function(e){if(this._getEditor().WoltLabAutosave.reset(),e.returnValues.url)window.location==e.returnValues.url&&window.location.reload(),window.location=e.returnValues.url;else{if(e.returnValues.template){var t;if("DESC"===elData(this._container,"sort-order"))r.insertHtml(e.returnValues.template,this._container,"after"),t=r.identify(this._container.nextElementSibling);else{var i=this._container;i.previousElementSibling&&i.previousElementSibling.classList.contains("messageListPagination")&&(i=i.previousElementSibling),r.insertHtml(e.returnValues.template,i,"before"),t=r.identify(i.previousElementSibling)}elData(this._container,"last-post-time",e.returnValues.lastPostTime),window.history.replaceState(void 0,"","#"+t),c.element(elById(t))}l.show(n.get(this._options.successMessage)),this._options.quoteManager&&this._options.quoteManager.countQuotes(),a.trigger()}},_ajaxSuccess:function(e){if(!u.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.userId&&e.returnValues.guestDialog){s.openStatic(e.returnValues.guestDialogID,e.returnValues.guestDialog,{closable:!1,onClose:function(){h.has(e.returnValues.guestDialogID)&&h.delete(e.returnValues.guestDialogID)},title:n.get("wcf.global.confirmation.title")});var t=s.getDialog(e.returnValues.guestDialogID);elBySel("input[type=submit]",t.content).addEventListener(WCF_CLICK_EVENT,this._submitGuestDialog.bind(this)),elBySel("input[type=text]",t.content).addEventListener("keypress",this._submitGuestDialog.bind(this)),this._guestDialogId=e.returnValues.guestDialogID}else this._insertMessage(e),u.userId||s.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay()},_ajaxFailure:function(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(this._handleError(e),!1)},_ajaxSetup:function(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"},silent:!0}}},f}),define("WoltLabSuite/Core/Ui/Message/Share",["EventHandler","StringUtil"],function(e,t){"use strict";return{_pageDescription:"",_pageUrl:"",init:function(){var i=elBySel('meta[property="og:title"]');null!==i&&(this._pageDescription=encodeURIComponent(i.content));var n=elBySel('meta[property="og:url"]');null!==n&&(this._pageUrl=encodeURIComponent(n.content)),elBySelAll(".jsMessageShareButtons",null,function(i){i.classList.remove("jsMessageShareButtons");var n=encodeURIComponent(t.unescapeHTML(elData(i,"url")||""));n||(n=this._pageUrl);var a={facebook:{link:elBySel(".jsShareFacebook",i),share:function(e){e.preventDefault(),this._share("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,n)}.bind(this)},google:{link:elBySel(".jsShareGoogle",i),share:function(e){e.preventDefault(),this._share("google","https://plus.google.com/share?url={pageURL}",!1,n)}.bind(this)},reddit:{link:elBySel(".jsShareReddit",i),share:function(e){e.preventDefault(),this._share("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,n)}.bind(this)},twitter:{link:elBySel(".jsShareTwitter",i),share:function(e){e.preventDefault(),this._share("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,n)}.bind(this)},linkedIn:{link:elBySel(".jsShareLinkedIn",i),share:function(e){e.preventDefault(),this._share("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,n)}.bind(this)},pinterest:{link:elBySel(".jsSharePinterest",i),share:function(e){e.preventDefault(),this._share("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,n)}.bind(this)},xing:{link:elBySel(".jsShareXing",i),share:function(e){e.preventDefault(),this._share("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,n)}.bind(this)},whatsApp:{link:elBySel(".jsShareWhatsApp",i),share:function(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+this._pageDescription+"%20"+this._pageUrl}.bind(this)}};e.fire("com.woltlab.wcf.message.share","shareProvider",{container:i,providers:a,pageDescription:this._pageDescription,pageUrl:this._pageUrl});for(var r in a)a.hasOwnProperty(r)&&null!==a[r].link&&a[r].link.addEventListener(WCF_CLICK_EVENT,a[r].share)}.bind(this))},_share:function(e,t,i,n){n||(n=this._pageUrl),window.open(t.replace(/\{pageURL}/,n).replace(/\{text}/,this._pageDescription+(i?"%20"+n:"")),e,"height=600,width=600")}}}),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["https://platform.twitter.com/widgets.js"],function(e){"use strict";var t=new Promise(function(e,t){twttr.ready(e)});return{embedTweet:function(e,i,n){return void 0===n&&(n=!1),t.then(function(){return twttr.widgets.createTweet(i,e,{dnt:!0,lang:document.documentElement.lang})}).then(function(t){if(t&&n){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(t)}return t})},embedAll:function(){elBySelAll("[data-wsc-twitter-tweet]",void 0,function(e){var t=elData(e,"wsc-twitter-tweet");t&&(this.embedTweet(e,t,!0),elData(e,"wsc-twitter-tweet",""))}.bind(this))}}}),define("WoltLabSuite/Core/Ui/Page/Search",["Ajax","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,a,r){"use strict";var o,s,l,c=null;return{open:function(e){o=e,r.open(this)},_search:function(t){t.preventDefault();var n=c.parentNode,a=c.value.trim();if(a.length<3)return void elInnerError(n,i.get("wcf.page.search.error.tooShort"));elInnerError(n,!1),e.api(this,{parameters:{searchString:a}})},_click:function(e){e.preventDefault();var t=e.currentTarget,i=elBySel("h3",t).textContent.replace(/['"]/g,"");o(elData(t,"page-id")+"#"+i),r.close(this)},_ajaxSuccess:function(e){for(var t,a="",r=0,o=e.returnValues.length;r<o;r++)t=e.returnValues[r],a+='<li><div class="containerHeadline pointer" data-page-id="'+t.pageID+'"><h3>'+n.escapeHTML(t.name)+"</h3><small>"+n.escapeHTML(t.displayLink)+"</small></div></li>";l.innerHTML=a,window[a?"elShow":"elHide"](s),a?elBySelAll(".containerHeadline",l,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this)):elInnerError(c.parentNode,i.get("wcf.page.search.error.noResults"))},_ajaxSetup:function(){return{data:{actionName:"search",className:"wcf\\data\\page\\PageAction"}}},_dialogSetup:function(){return{id:"wcfUiPageSearch",options:{onSetup:function(){var e=this._search.bind(this);c=elById("wcfUiPageSearchInput"),c.addEventListener("keydown",function(i){t.Enter(i)&&e(i)}),c.nextElementSibling.addEventListener(WCF_CLICK_EVENT,e),s=elById("wcfUiPageSearchResultContainer"),l=elById("wcfUiPageSearchResultList")}.bind(this),onShow:function(){c.focus()},title:i.get("wcf.page.search")},source:'<div class="section"><dl><dt><label for="wcfUiPageSearchInput">'+i.get("wcf.page.search.name")+'</label></dt><dd><div class="inputAddon"><input type="text" id="wcfUiPageSearchInput" class="long"><a href="#" class="inputSuffix"><span class="icon icon16 fa-search"></span></a></div></dd></dl></div><section id="wcfUiPageSearchResultContainer" class="section" style="display: none;"><header class="sectionHeader"><h2 class="sectionTitle">'+i.get("wcf.page.search.results")+'</h2></header><ol id="wcfUiPageSearchResultList" class="containerList"></ol></section>'}}}}),define("WoltLabSuite/Core/Ui/Sortable/List",["Core","Ui/Screen"],function(e,t){"use strict";function i(e){this.init(e)}return i.prototype={init:function(i){this._options=e.extend({containerId:"",className:"",offset:0,options:{},isSimpleSorting:!1,additionalParameters:{}},i),t.on("screen-sm-md",{match:this._enable.bind(this,!0),unmatch:this._disable.bind(this),setup:this._enable.bind(this,!0)}),t.on("screen-lg",{match:this._enable.bind(this,!1),unmatch:this._disable.bind(this),setup:this._enable.bind(this,!1)})},_enable:function(e){var 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:function(){window.jQuery("#"+this._options.containerId+" .sortableList")[this._options.isSimpleSorting?"sortable":"nestedSortable"]("destroy")}},i}),define("WoltLabSuite/Core/Ui/Poll/Editor",["Core","Dom/Util","EventHandler","EventKey","Language","WoltLabSuite/Core/Date/Picker","WoltLabSuite/Core/Ui/Sortable/List"],function(e,t,i,n,a,r,o){"use strict";function s(e,t,i,n){this.init(e,t,i,n)}return s.prototype={init:function(t,n,a,r){if(this._container=elById(t),null===this._container)throw new Error("Unknown poll editor container with id '"+t+"'.");if(this._wysiwygId=a,""!==a&&null===elById(a))throw new Error("Unknown wysiwyg field with id '"+a+"'.");this.questionField=elById(this._wysiwygId+"Poll_question");var s=elByClass("sortableList",this._container);if(0===s.length)throw new Error("Cannot find poll options list for container with id '"+t+"'.");if(this.optionList=s[0],this.endTimeField=elById(this._wysiwygId+"Poll_endTime"),this.maxVotesField=elById(this._wysiwygId+"Poll_maxVotes"),this.isChangeableYesField=elById(this._wysiwygId+"Poll_isChangeable"),this.isChangeableNoField=elById(this._wysiwygId+"Poll_isChangeable_no"),this.isPublicYesField=elById(this._wysiwygId+"Poll_isPublic"),this.isPublicNoField=elById(this._wysiwygId+"Poll_isPublic_no"),this.resultsRequireVoteYesField=elById(this._wysiwygId+"Poll_resultsRequireVote"),this.resultsRequireVoteNoField=elById(this._wysiwygId+"Poll_resultsRequireVote_no"),this.sortByVotesYesField=elById(this._wysiwygId+"Poll_sortByVotes"),this.sortByVotesNoField=elById(this._wysiwygId+"Poll_sortByVotes_no"),this._optionCount=0,this._options=e.extend({isAjax:!1,maxOptions:20},r),this._createOptionList(n||[]),new o({containerId:t,options:{toleranceElement:"> div"}}),this._options.isAjax)for(var l=["handleError","reset","submit","validate"],c=0,d=l.length;c<d;c++){var u=l[c];i.add("com.woltlab.wcf.redactor2",u+"_"+this._wysiwygId,this["_"+u].bind(this))}else{var h=this._container.closest("form");if(null===h)throw new Error("Cannot find form for container with id '"+t+"'.");h.addEventListener("submit",this._submit.bind(this))}},_addOption:function(e){if(e.preventDefault(),this._optionCount===this._options.maxOptions)return!1;this._createOption(void 0,void 0,e.currentTarget.closest("li"))},_createOption:function(e,i,n){e=e||"",i=~~i||0;var r=elCreate("LI");r.className="sortableNode",elData(r,"option-id",i),n?t.insertAfter(r,n):this.optionList.appendChild(r);var o=elCreate("div");o.className="pollOptionInput",r.appendChild(o);var s=elCreate("span");s.className="icon icon16 fa-arrows sortableNodeHandle",o.appendChild(s);var l=elCreate("a");elAttr(l,"role","button"),elAttr(l,"href","#"),l.className="icon icon16 fa-plus jsTooltip jsAddOption pointer",elAttr(l,"title",a.get("wcf.poll.button.addOption")),l.addEventListener("click",this._addOption.bind(this)),o.appendChild(l);var c=elCreate("a");elAttr(c,"role","button"),elAttr(c,"href","#"),c.className="icon icon16 fa-times jsTooltip jsDeleteOption pointer",elAttr(c,"title",a.get("wcf.poll.button.removeOption")),c.addEventListener("click",this._removeOption.bind(this)),o.appendChild(c);var d=elCreate("input");elAttr(d,"type","text"),d.value=e,elAttr(d,"maxlength",255),d.addEventListener("keydown",this._optionInputKeyDown.bind(this)),d.addEventListener("click",function(){document.activeElement!==this&&this.focus()}),o.appendChild(d),null!==n&&d.focus(),++this._optionCount===this._options.maxOptions&&elBySelAll("span.jsAddOption",this.optionList,function(e){e.classList.remove("pointer"),e.classList.add("disabled")})},_createOptionList:function(e){for(var t=0,i=e.length;t<i;t++){var n=e[t];this._createOption(n.optionValue,n.optionID)}this._optionCount<this._options.maxOptions&&this._createOption()},_handleError:function(e){switch(e.returnValues.fieldName){case this._wysiwygId+"Poll_endTime":case this._wysiwygId+"Poll_maxVotes":var i=e.returnValues.fieldName.replace(this._wysiwygId+"Poll_",""),n=elCreate("small");n.className="innerError",n.innerHTML=a.get("wcf.poll."+i+".error."+e.returnValues.errorType);var r=elById(e.returnValues.fieldName);r.closest("dd");t.prepend(n,r.nextSibling),e.cancel=!0}},_optionInputKeyDown:function(t){n.Enter(t)&&(e.triggerEvent(elByClass("jsAddOption",t.currentTarget.parentNode)[0],"click"),t.preventDefault())},_removeOption:function(e){e.preventDefault(),elRemove(e.currentTarget.closest("li")),this._optionCount--,elBySelAll("span.jsAddOption",this.optionList,function(e){e.classList.add("pointer"),e.classList.remove("disabled")}),0===this.optionList.length&&this._createOption()},_reset:function(){this.questionField.value="",this._optionCount=0,this.optionList.innerHtml="",this._createOption(),r.clear(this.endTimeField),this.maxVotesField.value=1,this.isChangeableYesField.checked=!1,this.isChangeableNoField.checked=!0,this.isPublicYesField=!1,this.isPublicNoField=!0,this.resultsRequireVoteYesField=!1,this.resultsRequireVoteNoField=!0,this.sortByVotesYesField=!1,this.sortByVotesNoField=!0,i.fire("com.woltlab.wcf.poll.editor","reset",{pollEditor:this})},_submit:function(e){for(var t=[],n=0,a=this.optionList.children.length;n<a;n++){var r=this.optionList.children[n],o=elBySel("input[type=text]",r).value.trim();""!==o&&t.push(elData(r,"option-id")+"_"+o)}if(this._options.isAjax)e.poll={},e.poll[this.questionField.id]=this.questionField.value,e.poll[this._wysiwygId+"Poll_options"]=t,e.poll[this.endTimeField.id]=this.endTimeField.value,e.poll[this.maxVotesField.id]=this.maxVotesField.value,e.poll[this.isChangeableYesField.id]=!!this.isChangeableYesField.checked,e.poll[this.isPublicYesField.id]=!!this.isPublicYesField.checked,e.poll[this.resultsRequireVoteYesField.id]=!!this.resultsRequireVoteYesField.checked,e.poll[this.sortByVotesYesField.id]=!!this.sortByVotesYesField.checked,i.fire("com.woltlab.wcf.poll.editor","submit",{event:e,pollEditor:this});else for(var s=this._container.closest("form"),n=0,a=t.length;n<a;n++){var l=elCreate("input");elAttr(l,"type","hidden"),elAttr(l,"name",this._wysiwygId+"Poll_options["+n+"]"),l.value=t[n],s.appendChild(l)}},_validate:function(e){if(""!==this.questionField.value.trim()){for(var t=0,n=0,r=this.optionList.children.length;n<r;n++){""!==elBySel("input[type=text]",this.optionList.children[n]).value.trim()&&t++}if(0===t)e.api.throwError(this._container,a.get("wcf.global.form.error.empty")),e.valid=!1;else{var o=~~this.maxVotesField.value;o&&o>t?(e.api.throwError(this.maxVotesField.parentNode,a.get("wcf.poll.maxVotes.error.invalid")),e.valid=!1):i.fire("com.woltlab.wcf.poll.editor","validate",{data:e,pollEditor:this})}}}},s}),define("WoltLabSuite/Core/Ui/Redactor/Article",["WoltLabSuite/Core/Ui/Article/Search"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(e,t){this._editor=e,t.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))},_click:function(t){t.preventDefault(),e.open(this._insert.bind(this))},_insert:function(e){this._editor.buffer.set(),this._editor.insert.text("[wsa='"+e+"'][/wsa]")}},t}),define("WoltLabSuite/Core/Ui/Redactor/Metacode",["EventHandler","Dom/Util"],function(e,t){"use strict";return{convert:function(e){e.textContent=this.convertFromHtml(e.textContent)},convertFromHtml:function(i,n){var a=elCreate("div");a.innerHTML=n;for(var r,o,s,l,c,d,u=elByTag("woltlab-metacode",a);u.length;)s=u[0],l=elData(s,"name"),r=this._parseAttributes(elData(s,"attributes")),o={attributes:r,cancel:!1,metacode:s},e.fire("com.woltlab.wcf.redactor2","metacode_"+l+"_"+i,o),!0!==o.cancel&&(d=this._getOpeningTag(l,r),c=this._getClosingTag(l),s.parentNode===a?(t.prepend(d,this._getFirstParagraph(s)),this._getLastParagraph(s).appendChild(c)):(t.prepend(d,s),s.appendChild(c)),t.unwrapChildNodes(s));for(var h,f=elByTag("kbd",a);f.length;)h=f[0],h.insertBefore(document.createTextNode("[tt]"),h.firstChild),h.appendChild(document.createTextNode("[/tt]")),t.unwrapChildNodes(h);return a.innerHTML},_getOpeningTag:function(e,t){var i="["+e;if(t.length){i+="=";for(var n=0,a=t.length;n<a;n++)n>0&&(i+=","),i+="'"+t[n]+"'"}return document.createTextNode(i+"]")},_getClosingTag:function(e){return document.createTextNode("[/"+e+"]")},_getFirstParagraph:function(e){var t,i;return 0===e.childElementCount?(i=elCreate("p"),e.appendChild(i)):(t=e.children[0],"P"===t.nodeName?i=t:(i=elCreate("p"),e.insertBefore(i,t))),i},_getLastParagraph:function(e){var t,i,n=e.childElementCount;return 0===n?(i=elCreate("p"),e.appendChild(i)):(t=e.children[n-1],"P"===t.nodeName?i=t:(i=elCreate("p"),e.appendChild(i))),i},_parseAttributes:function(e){try{e=JSON.parse(atob(e))}catch(e){}if(!Array.isArray(e))return[];for(var t,i=[],n=0,a=e.length;n<a;n++)t=e[n],"string"==typeof t&&(t=t.replace(/^'(.*)'$/,"$1")),i.push(t);return i}}}),define("WoltLabSuite/Core/Ui/Redactor/Autosave",["Core","Devtools","EventHandler","Language","Dom/Traverse","./Metacode"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(t){this._container=null,this._metaData={},this._editor=null,this._element=t,this._isActive=!0,this._isPending=!1,this._key=e.getStoragePrefix()+elData(this._element,"autosave"),this._lastMessage="",this._originalMessage="",this._overlay=null,this._restored=!1,this._timer=null,this._cleanup(),this._element.removeAttribute("data-autosave");var n=a.parentByTag(this._element,"FORM");null!==n&&n.addEventListener("submit",this.destroy.bind(this)),i.add("com.woltlab.wcf.redactor2","getMetaData_"+this._element.id,function(e){for(var t in this._metaData)this._metaData.hasOwnProperty(t)&&(e[t]=this._metaData[t])}.bind(this)),i.add("com.woltlab.wcf.redactor2","reset_"+this._element.id,this.hideOverlay.bind(this)),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this))},_onVisibilityChange:function(){document.hidden?(this._isActive=!1,this._isPending=!0):(this._isActive=!0,this._isPending=!1)},getInitialValue:function(){if(window.ENABLE_DEVELOPER_TOOLS&&!1===t._internal_.editorAutosave())return this._element.value;var e="";try{e=window.localStorage.getItem(this._key)}catch(e){window.console.warn("Unable to access local storage: "+e.message)}try{e=JSON.parse(e)}catch(t){e=""}if(null!==e&&"object"==typeof e&&e.content){if(1e3*~~elData(this._element,"autosave-last-edit-time")<=e.timestamp){var i=elCreate("div");i.innerHTML=this._element.value;var n=elCreate("div");if(n.innerHTML=e.content,i.innerText.trim()!==n.innerText.trim())return this._originalMessage=this._element.value,this._restored=!0,this._metaData=e.meta||{},e.content}}return this._element.value},getMetaData:function(){return this._metaData},watch:function(e){if(this._editor=e,null!==this._timer)throw new Error("Autosave timer is already active.");this._timer=window.setInterval(this._saveToStorage.bind(this),15e3),this._saveToStorage(),this._isPending=!1},destroy:function(){this.clear(),this._editor=null,window.clearInterval(this._timer),this._timer=null,this._isPending=!1},clear:function(){this._metaData={},this._lastMessage="";try{window.localStorage.removeItem(this._key)}catch(e){window.console.warn("Unable to remove from local storage: "+e.message)}},createOverlay:function(){if(this._restored){var e=elCreate("div");e.className="redactorAutosaveRestored active";var t=elCreate("span");t.textContent=n.get("wcf.editor.autosave.restored"),e.appendChild(t);var i=elCreate("a");i.className="jsTooltip",i.href="#",i.title=n.get("wcf.editor.autosave.keep"),i.innerHTML='<span class="icon icon16 fa-check green"></span>',i.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.hideOverlay()}.bind(this)),e.appendChild(i),i=elCreate("a"),i.className="jsTooltip",i.href="#",i.title=n.get("wcf.editor.autosave.discard"),i.innerHTML='<span class="icon icon16 fa-times red"></span>',i.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.clear();var t=r.convertFromHtml(this._editor.core.element()[0].id,this._originalMessage);this._editor.code.start(t),this._editor.core.textarea().val(this._editor.clean.onSync(this._editor.$editor.html())),this.hideOverlay()}.bind(this)),e.appendChild(i),this._editor.core.box()[0].appendChild(e);var a=function(){this._editor.core.editor()[0].removeEventListener(WCF_CLICK_EVENT,a),this.hideOverlay()}.bind(this);this._editor.core.editor()[0].addEventListener(WCF_CLICK_EVENT,a),this._container=e}},hideOverlay:function(){null!==this._container&&(this._container.classList.remove("active"),window.setTimeout(function(){null!==this._container&&elRemove(this._container),this._container=null,this._originalMessage=""}.bind(this),1e3))},_saveToStorage:function(){if(!this._isActive){if(!this._isPending)return;this._isPending=!1}if(!window.ENABLE_DEVELOPER_TOOLS||!1!==t._internal_.editorAutosave()){var e=this._editor.code.get();if(this._editor.utils.isEmpty(e)&&(e=""),this._lastMessage!==e){if(""===e)return this.clear();try{i.fire("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._element.id,this._metaData),window.localStorage.setItem(this._key,JSON.stringify({content:e,meta:this._metaData,timestamp:Date.now()})),this._lastMessage=e}catch(e){window.console.warn("Unable to write to local storage: "+e.message)}}}},_cleanup:function(){var t,i,n,a,r=Date.now()-6048e5,o=[];for(t=0,n=window.localStorage.length;t<n;t++)if(i=window.localStorage.key(t),0===i.indexOf(e.getStoragePrefix())){try{a=window.localStorage.getItem(i)}catch(e){window.console.warn("Unable to access local storage: "+e.message)}try{a=JSON.parse(a)}catch(e){a={timestamp:0}}(!a||a.timestamp<r)&&o.push(i)}for(t=0,n=o.length;t<n;t++)try{window.localStorage.removeItem(o[t])}catch(e){window.console.warn("Unable to remove from local storage: "+e.message)}}},o}),define("WoltLabSuite/Core/Ui/Redactor/PseudoHeader",[],function(){"use strict";return{getHeight:function(e){var t=~~window.getComputedStyle(e).paddingTop.replace(/px$/,""),i=window.getComputedStyle(e,"::before");t+=~~i.paddingTop.replace(/px$/,""),t+=~~i.paddingBottom.replace(/px$/,"");var n=~~i.height.replace(/px$/,"");return 0===n&&(n=e.scrollHeight,e.classList.add("redactorCalcHeight"),n-=e.scrollHeight,e.classList.remove("redactorCalcHeight")),t+=n}}}),define("WoltLabSuite/Core/Ui/Redactor/Code",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader","prism/prism-meta"],function(e,t,i,n,a,r,o,s){"use strict";function l(e){this.init(e)}var c=0;return l.prototype={init:function(t){this._editor=t,this._elementId=this._editor.$element[0].id,this._pre=null,e.add("com.woltlab.wcf.redactor2","bbcode_code_"+this._elementId,this._bbcodeCode.bind(this)),e.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._editor.opts.activeButtonsStates.pre="code",this._callbackEdit=this._edit.bind(this),this._observeLoad()},_bbcodeCode:function(e){e.cancel=!0;var t=this._editor.selection.block();t&&"PRE"===t.nodeName&&t.classList.contains("woltlabHtml")||(this._editor.button.toggle({},"pre","func","block.format"),(t=this._editor.selection.block())&&"PRE"===t.nodeName&&!t.classList.contains("woltlabHtml")&&(1===t.childElementCount&&"BR"===t.children[0].nodeName&&t.removeChild(t.children[0]),this._setTitle(t),t.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(t)))},_observeLoad:function(){elBySelAll("pre:not(.woltlabHtml)",this._editor.$editor[0],function(e){e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;0===c&&(c=o.getHeight(t));var i=a.offset(t);e.pageY>i.top&&e.pageY<i.top+c&&(e.preventDefault(),this._editor.selection.save(),this._pre=t,r.open(this))},_dialogSubmit:function(){var e="redactor-code-"+this._elementId;["file","highlighter","line"].forEach(function(t){elData(this._pre,t,elById(e+"-"+t).value)}.bind(this)),this._setTitle(this._pre),this._editor.caret.after(this._pre),r.close(this)},_setTitle:function(e){var t=elData(e,"file"),n=elData(e,"highlighter");n=-1!==this._editor.opts.woltlab.highlighters.indexOf(n)?s[n].title:"";var a=i.get("wcf.editor.code.title",{file:t,highlighter:n});elData(e,"title")!==a&&elData(e,"title",a)},_delete:function(e){e.preventDefault();var t=this._pre.nextElementSibling||this._pre.previousElementSibling;null===t&&this._pre.parentNode!==this._editor.core.editor()[0]&&(t=this._pre.parentNode),null===t?(this._editor.code.set(""),this._editor.focus.end()):(elRemove(this._pre),this._editor.caret.end(t)),r.close(this)},_dialogSetup:function(){var e="redactor-code-"+this._elementId,t=e+"-button-delete",a=e+"-button-save",o=e+"-file",l=e+"-highlighter",c=e+"-line";return{id:e,options:{onClose:function(){this._editor.selection.restore(),r.destroy(this)}.bind(this),onSetup:function(){elById(t).addEventListener(WCF_CLICK_EVENT,this._delete.bind(this));var e='<option value="">'+i.get("wcf.editor.code.highlighter.detect")+"</option>";e+='<option value="plain">'+i.get("wcf.editor.code.highlighter.plain")+"</option>";var a=this._editor.opts.woltlab.highlighters.map(function(e){return[e,s[e].title]});a.sort(function(e,t){return e[1]<t[1]?-1:e[1]>t[1]?1:0}),a.forEach(function(t){e+='<option value="'+t[0]+'">'+n.escapeHTML(t[1])+"</option>"}.bind(this)),elById(l).innerHTML=e}.bind(this),onShow:function(){elById(l).value=elData(this._pre,"highlighter");var e=elData(this._pre,"line");elById(c).value=""===e?1:~~e,
 elById(o).value=elData(this._pre,"file")}.bind(this),title:i.get("wcf.editor.code.edit")},source:'<div class="section"><dl><dt><label for="'+l+'">'+i.get("wcf.editor.code.highlighter")+'</label></dt><dd><select id="'+l+'"></select><small>'+i.get("wcf.editor.code.highlighter.description")+'</small></dd></dl><dl><dt><label for="'+c+'">'+i.get("wcf.editor.code.line")+'</label></dt><dd><input type="number" id="'+c+'" min="0" value="1" class="long" data-dialog-submit-on-enter="true"><small>'+i.get("wcf.editor.code.line.description")+'</small></dd></dl><dl><dt><label for="'+o+'">'+i.get("wcf.editor.code.file")+'</label></dt><dd><input type="text" id="'+o+'" class="long" data-dialog-submit-on-enter="true"><small>'+i.get("wcf.editor.code.file.description")+'</small></dd></dl></div><div class="formSubmit"><button id="'+a+'" class="buttonPrimary" data-type="submit">'+i.get("wcf.global.button.save")+'</button><button id="'+t+'">'+i.get("wcf.global.button.delete")+"</button></div>"}}},l}),define("WoltLabSuite/Core/Ui/Redactor/Format",["Dom/Util"],function(e){"use strict";var t=function(e){for(var t=window.getSelection().anchorNode;t;){if(t===e)return!0;t=t.parentNode}return!1};return{format:function(i,n,a){var r=window.getSelection();if(r.rangeCount){if(!t(i))return void console.error("Invalid selection, range exists outside of the editor:",r.anchorNode);var o=r.getRangeAt(0),s=null,l=null,c=null;if(o.collapsed)c=elCreate("strike"),c.textContent="​",o.insertNode(c),o=document.createRange(),o.selectNodeContents(c),r.removeAllRanges(),r.addRange(o);else{s=elCreate("mark"),l=elCreate("mark");var d=o.cloneRange();d.collapse(!0),d.insertNode(s),d=o.cloneRange(),d.collapse(!1),d.insertNode(l),o=document.createRange(),o.setStartAfter(s),o.setEndBefore(l),r.removeAllRanges(),r.addRange(o),this.removeFormat(i,n),o=document.createRange(),o.setStartAfter(s),o.setEndBefore(l),r.removeAllRanges(),r.addRange(o)}var u=["strike","strikethrough"];null===c&&(u=this._getSelectionMarker(i,r),document.execCommand(u[1]));for(var h,f,p=elBySelAll(u[0],i),m=[],g=0,v=p.length;g<v;g++)f=p[g],h=elCreate("span"),elAttr(h,"style",n+": "+a),e.replaceElement(f,h),m.push(h);var _=m.length;if(_){var b=m[0],w=m[_-1];if(null===c&&b.parentNode===w.parentNode){var y=b.parentNode;"SPAN"===y.nodeName&&""!==y.style.getPropertyValue(n)&&this._isBoundaryElement(b,y,"previous")&&this._isBoundaryElement(w,y,"next")&&e.unwrapChildNodes(y)}o=document.createRange(),o.setStart(b,0),o.setEnd(w,w.childNodes.length),r.removeAllRanges(),r.addRange(o)}null!==s&&(elRemove(s),elRemove(l))}},removeFormat:function(i,n){var a=window.getSelection();if(a.rangeCount){if(!t(i))return void console.error("Invalid selection, range exists outside of the editor:",a.anchorNode);var r=a.getRangeAt(0),o=null,s=r.collapsed;if(s){for(var l=r.startContainer,c=[l];;){var d=l.parentNode;if(d===i||"TD"===d.nodeName)break;l=d,c.push(l)}if(this._isEmpty(l.innerHTML)){var u=document.createElement("woltlab-format-marker");return r.insertNode(u),c.forEach(function(t){"SPAN"===t.nodeName&&t.style.getPropertyValue(n)&&e.unwrapChildNodes(t)}),r=document.createRange(),r.selectNode(u),r.collapse(!0),a.removeAllRanges(),a.addRange(r),void elRemove(u)}o=document.createTextNode("​"),r.insertNode(o)}for(var h=elByTag("strike",i);h.length;)e.unwrapChildNodes(h[0]);var f=this._getSelectionMarker(i,window.getSelection());if(document.execCommand(f[1]),"strike"!==f[0]&&(h=elByTag(f[0],i)),s&&null!==o&&0===h.length){document.execCommand(f[1]);var p=elCreate(f[0]);o.parentNode.insertBefore(p,o),p.appendChild(o)}for(var m,g;h.length;)g=h[0],m=this._getLastMatchingParent(g,i,n),null!==m&&this._handleParentNodes(g,m,n),elBySelAll("span",g,function(t){t.style.getPropertyValue(n)&&e.unwrapChildNodes(t)}),e.unwrapChildNodes(g);elBySelAll("span",i,function(e){e.parentNode&&!e.textContent.length&&""!==e.style.getPropertyValue(n)&&(1===e.childElementCount&&"MARK"===e.children[0].nodeName&&e.parentNode.insertBefore(e.children[0],e),0===e.childElementCount&&elRemove(e))})}},_handleParentNodes:function(t,i,n){var a;if(!e.isAtNodeStart(t,i)){a=document.createRange(),a.setStartBefore(i),a.setEndBefore(t);var r=a.extractContents();i.parentNode.insertBefore(r,i)}e.isAtNodeEnd(t,i)||(a=document.createRange(),a.setStartAfter(t),a.setEndAfter(i),r=a.extractContents(),i.parentNode.insertBefore(r,i.nextSibling)),elBySelAll("span",i,function(t){t.style.getPropertyValue(n)&&e.unwrapChildNodes(t)}),e.unwrapChildNodes(i)},_getLastMatchingParent:function(e,t,i){for(var n=e.parentNode,a=null;n!==t;)"SPAN"===n.nodeName&&""!==n.style.getPropertyValue(i)&&(a=n),n=n.parentNode;return a},_isBoundaryElement:function(e,t,i){for(var n=e;n=n[i+"Sibling"];)if(n.nodeType!==Node.TEXT_NODE||""!==n.textContent.replace(/\u200B/,""))return!1;return!0},_getSelectionMarker:function(e,t){for(var i,n,a,r=["DEL","SUB","SUP"],o=0,s=r.length;o<s;o++){if(a=r[o],n=elClosest(t.anchorNode),!(i=null!==elBySel(a.toLowerCase(),n)))for(;n&&n!==e;){if(n.nodeName===a){i=!0;break}n=n.parentNode}if(!i)break;a=void 0}return"DEL"===a||void 0===a?["strike","strikethrough"]:[a.toLowerCase(),a.toLowerCase()+"script"]},_isEmpty:function(e){return e=e.replace(/[\u200B-\u200D\uFEFF]/g,""),e=e.replace(/&nbsp;/gi,""),e=e.replace(/<\/?br\s?\/?>/g,""),e=e.replace(/\s/g,""),e=e.replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,""),e=e.replace(/<iframe(.*?[^>])>$/i,"iframe"),e=e.replace(/<source(.*?[^>])>$/i,"source"),e=e.replace(/<[^\/>][^>]*><\/[^>]+>/gi,""),e=e.replace(/<[^\/>][^>]*><\/[^>]+>/gi,""),""===e.trim()}}}),define("WoltLabSuite/Core/Ui/Redactor/Html",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader"],function(e,t,i,n,a,r,o){"use strict";function s(e){this.init(e)}var l=0;return s.prototype={init:function(t){this._editor=t,this._elementId=this._editor.$element[0].id,this._pre=null,e.add("com.woltlab.wcf.redactor2","bbcode_woltlabHtml_"+this._elementId,this._bbcodeCode.bind(this)),e.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._editor.opts.activeButtonsStates["woltlab-html"]="woltlabHtml",this._callbackEdit=this._edit.bind(this),this._observeLoad()},_bbcodeCode:function(e){e.cancel=!0;var t=this._editor.selection.block();t&&"PRE"===t.nodeName&&!t.classList.contains("woltlabHtml")||(this._editor.button.toggle({},"pre","func","block.format"),(t=this._editor.selection.block())&&"PRE"===t.nodeName&&(t.classList.add("woltlabHtml"),1===t.childElementCount&&"BR"===t.children[0].nodeName&&t.removeChild(t.children[0]),this._setTitle(t),t.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(t)))},_observeLoad:function(){elBySelAll("pre.woltlabHtml",this._editor.$editor[0],function(e){e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;0===l&&(l=o.getHeight(t));var i=a.offset(t);e.pageY>i.top&&e.pageY<i.top+l&&(e.preventDefault(),this._editor.selection.save(),this._pre=t,console.warn("should edit"))},_setTitle:function(e){["title","description"].forEach(function(t){var n=i.get("wcf.editor.html."+t);elData(e,t)!==n&&elData(e,t,n)})},_delete:function(e){console.warn("should delete"),e.preventDefault();var t=this._pre.nextElementSibling||this._pre.previousElementSibling;null===t&&this._pre.parentNode!==this._editor.core.editor()[0]&&(t=this._pre.parentNode),null===t?(this._editor.code.set(""),this._editor.focus.end()):(elRemove(this._pre),this._editor.caret.end(t)),r.close(this)}},s}),define("WoltLabSuite/Core/Ui/Redactor/Link",["Core","EventKey","Language","Ui/Dialog"],function(e,t,i,n){"use strict";var a=!1,r=null;return{showDialog:function(e){n.open(this),n.setTitle(this,i.get("wcf.editor.link."+(e.insert?"add":"edit")));var t=elById("redactor-modal-button-action");t.textContent=i.get("wcf.global.button."+(e.insert?"insert":"save")),r=e.submitCallback,a||(a=!0,t.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this)))},_submit:function(){if(r())n.close(this);else{var e=elById("redactor-link-url");elInnerError(e,i.get(""===e.value.trim()?"wcf.global.form.error.empty":"wcf.editor.link.error.invalid"))}},_dialogSetup:function(){return{id:"redactorDialogLink",options:{onClose:function(){var e=elById("redactor-link-url"),t=e.nextElementSibling&&"SMALL"===e.nextElementSibling.nodeName?e.nextElementSibling:null;null!==t&&elRemove(t)},onSetup:function(i){var n=elBySel(".formSubmit > .buttonPrimary",i);null!==n&&elBySelAll('input[type="url"], input[type="text"]',i,function(i){i.addEventListener("keyup",function(i){t.Enter(i)&&e.triggerEvent(n,"click")})})},onShow:function(){elById("redactor-link-url").focus()}},source:'<dl><dt><label for="redactor-link-url">'+i.get("wcf.editor.link.url")+'</label></dt><dd><input type="url" id="redactor-link-url" class="long"></dd></dl><dl><dt><label for="redactor-link-url-text">'+i.get("wcf.editor.link.text")+'</label></dt><dd><input type="text" id="redactor-link-url-text" class="long"></dd></dl><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary"></button></div>'}}}}),define("WoltLabSuite/Core/Ui/Redactor/Mention",["Ajax","Environment","StringUtil","Ui/CloseOverlay"],function(e,t,i,n){"use strict";function a(e){this.init(e)}var r=null;return a.prototype={init:function(e){this._active=!1,this._dropdownActive=!1,this._dropdownMenu=null,this._itemIndex=0,this._lineHeight=null,this._mentionStart="",this._redactor=e,this._timer=null,e.WoltLabEvent.register("keydown",this._keyDown.bind(this)),e.WoltLabEvent.register("keyup",this._keyUp.bind(this)),n.add("UiRedactorMention-"+e.core.element()[0].id,this._hideDropdown.bind(this))},_keyDown:function(e){if(this._dropdownActive){var t=e.event;switch(t.which){case 13:this._setUsername(null,this._dropdownMenu.children[this._itemIndex].children[0]);break;case 38:this._selectItem(-1);break;case 40:this._selectItem(1);break;default:return void this._hideDropdown()}t.preventDefault(),e.cancel=!0}},_keyUp:function(t){var i=t.event;if(13===i.which)return void(this._active=!1);if(!this._dropdownActive||(t.cancel=!0,38!==i.which&&40!==i.which)){var n=this._getTextLineInFrontOfCaret();if(n.length>0&&n.length<25){var a=n.match(/@([^,]{3,})$/);a?a.index&&!n[a.index-1].match(/\s/)||(this._mentionStart=a[1],null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._timer=window.setTimeout(function(){e.api(this,{parameters:{data:{searchString:this._mentionStart}}}),this._timer=null}.bind(this),500)):this._hideDropdown()}else this._hideDropdown()}},_getTextLineInFrontOfCaret:function(){var e=this._selectMention(!1);return null!==e?e.range.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g," ").trim():""},_getDropdownMenuPosition:function(){var e=this._selectMention();if(null===e)return null;this._redactor.selection.save(),e.selection.removeAllRanges(),e.selection.addRange(e.range);var t=e.selection.getRangeAt(0).getBoundingClientRect(),i={top:Math.round(t.bottom)+(window.scrollY||window.pageYOffset),left:Math.round(t.left)+document.body.scrollLeft};return null===this._lineHeight&&(this._lineHeight=Math.round(t.bottom-t.top)),this._redactor.selection.restore(),i},_setUsername:function(e,t){e&&(e.preventDefault(),t=e.currentTarget);var i=this._selectMention();if(null===i)return void this._hideDropdown();this._redactor.buffer.set(),i.selection.removeAllRanges(),i.selection.addRange(i.range);var n=getSelection().getRangeAt(0);n.deleteContents(),n.collapse(!0);var a=elData(t,"username").trim();a.split(/\s/g).length>2&&(a="'"+a.replace(/'/g,"''")+"'");var r=document.createTextNode("@"+a+" ");n.insertNode(r),n=document.createRange(),n.selectNode(r),n.collapse(!1),i.selection.removeAllRanges(),i.selection.addRange(n),this._hideDropdown()},_selectMention:function(e){var t=window.getSelection();if(!t.rangeCount||!t.isCollapsed)return null;var i=t.anchorNode;if(i.nodeType===Node.TEXT_NODE&&(i=i.parentNode),-1===i.textContent.indexOf("@"))return null;for(var n=this._redactor.core.editor()[0];i&&i!==n;){if(-1!==["PRE","WOLTLAB-QUOTE"].indexOf(i.nodeName))return null;i=i.parentNode}for(var a=t.getRangeAt(0),r=a.startContainer,o=a.startOffset;r.nodeType===Node.ELEMENT_NODE;){if(0===o&&0===r.childNodes.length)return null;r=r.childNodes[o?o-1:0],o>0&&(o=r.nodeType===Node.TEXT_NODE?r.textContent.length:r.childNodes.length)}for(var s=r,l=-1;null!==s;){if(s.nodeType!==Node.TEXT_NODE)return null;if(-1!==s.textContent.indexOf("@")){l=s.textContent.lastIndexOf("@");break}s=s.previousSibling}if(-1===l)return null;try{a=document.createRange(),a.setStart(s,l),a.setEnd(r,o)}catch(e){return window.console.debug(e),null}if(!1===e){var c="";for(l&&(c=s.textContent.substr(0,l));(s=s.previousSibling)&&s.nodeType===Node.TEXT_NODE;)c=s.textContent+c;if(c.replace(/\u200B/g,"").match(/\S$/))return null}else if(a.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g,"").trim().replace(/^@/,"")!==this._mentionStart)return null;return{range:a,selection:t}},_updateDropdownPosition:function(){var e=this._getDropdownMenuPosition();if(null===e)return void this._hideDropdown();e.top+=7,this._dropdownMenu.style.setProperty("left",e.left+"px",""),this._dropdownMenu.style.setProperty("top",e.top+"px",""),this._selectItem(0),e.top+this._dropdownMenu.offsetHeight+10>window.innerHeight+(window.scrollY||window.pageYOffset)&&this._dropdownMenu.style.setProperty("top",e.top-this._dropdownMenu.offsetHeight-2*this._lineHeight+7+"px","")},_selectItem:function(e){var t=elBySel(".active",this._dropdownMenu);null!==t&&t.classList.remove("active"),this._itemIndex+=e,this._itemIndex<0?this._itemIndex=this._dropdownMenu.childElementCount-1:this._itemIndex>=this._dropdownMenu.childElementCount&&(this._itemIndex=0),this._dropdownMenu.children[this._itemIndex].classList.add("active")},_hideDropdown:function(){null!==this._dropdownMenu&&this._dropdownMenu.classList.remove("dropdownOpen"),this._dropdownActive=!1,this._itemIndex=0},_ajaxSetup:function(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\user\\UserAction",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{includeUserGroups:!0,scope:"mention"}}},silent:!0}},_ajaxSuccess:function(e){if(!Array.isArray(e.returnValues)||!e.returnValues.length)return void this._hideDropdown();null===this._dropdownMenu&&(this._dropdownMenu=elCreate("ol"),this._dropdownMenu.className="dropdownMenu",null===r&&(r=elCreate("div"),r.className="dropdownMenuContainer",document.body.appendChild(r)),r.appendChild(this._dropdownMenu)),this._dropdownMenu.innerHTML="";for(var t,n,a,o=this._setUsername.bind(this),s=0,l=e.returnValues.length;s<l;s++)a=e.returnValues[s],n=elCreate("li"),t=elCreate("a"),t.addEventListener("mousedown",o),t.className="box16",t.innerHTML="<span>"+a.icon+"</span> <span>"+i.escapeHTML(a.label)+"</span>",elData(t,"user-id",a.objectID),elData(t,"username",a.label),n.appendChild(t),this._dropdownMenu.appendChild(n);this._dropdownMenu.classList.add("dropdownOpen"),this._dropdownActive=!0,this._updateDropdownPosition()}},a}),define("WoltLabSuite/Core/Ui/Redactor/Page",["WoltLabSuite/Core/Ui/Page/Search"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(e,t){this._editor=e,t.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))},_click:function(t){t.preventDefault(),e.open(this._insert.bind(this))},_insert:function(e){this._editor.buffer.set(),this._editor.insert.text("[wsp='"+e+"'][/wsp]")}},t}),define("WoltLabSuite/Core/Ui/Redactor/Quote",["Core","EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./Metacode","./PseudoHeader"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(e,t){this.init(e,t)}var d=0;return c.prototype={init:function(e,i){this._quote=null,this._quotes=elByTag("woltlab-quote",e.$editor[0]),this._editor=e,this._elementId=this._editor.$element[0].id,t.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._editor.button.addCallback(i,this._click.bind(this)),this._callbackEdit=this._edit.bind(this),this._observeLoad(),t.add("com.woltlab.wcf.redactor2","insertQuote_"+this._elementId,this._insertQuote.bind(this))},_insertQuote:function(e){if(!this._editor.WoltLabSource.isActive()){t.fire("com.woltlab.wcf.redactor2","showEditor");var i=this._editor.core.editor()[0];this._editor.selection.restore(),this._editor.buffer.set();var n=this._editor.selection.block();for(!1===n&&(this._editor.focus.end(),n=this._editor.selection.block());n&&n.parentNode!==i;)n=n.parentNode;var r=elCreate("woltlab-quote");elData(r,"author",e.author),elData(r,"link",e.link);var o=e.content;e.isText?(o=a.escapeHTML(o),o="<p>"+o+"</p>",o=o.replace(/\n\n/g,"</p><p>"),o=o.replace(/\n/g,"<br>")):o=s.convertFromHtml(this._editor.$element[0].id,o),r.innerHTML=o,n.parentNode.insertBefore(r,n.nextSibling),"P"!==n.nodeName||"<br>"!==n.innerHTML&&""!==n.innerHTML.replace(/\u200B/g,"")||n.parentNode.removeChild(n);var l=r.previousElementSibling;l&&"P"!==l.nodeName&&(l=elCreate("p"),l.textContent="​",r.parentNode.insertBefore(l,r)),this._editor.WoltLabCaret.paragraphAfterBlock(r),this._editor.buffer.set()}},_click:function(){this._editor.button.toggle({},"woltlab-quote","func","block.format");var e=this._editor.selection.block();e&&"WOLTLAB-QUOTE"===e.nodeName&&(this._setTitle(e),e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(e))},_observeLoad:function(){for(var e,t=0,i=this._quotes.length;t<i;t++)e=this._quotes[t],e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)},_edit:function(e){var t=e.currentTarget;0===d&&(d=l.getHeight(t));var i=r.offset(t);e.pageY>i.top&&e.pageY<i.top+d&&(e.preventDefault(),this._editor.selection.save(),this._quote=t,o.open(this))},_dialogSubmit:function(){var e="redactor-quote-"+this._elementId,t=elById(e+"-url"),i=t.value.replace(/\u200B/g,"").trim();if(i.length&&!/^https?:\/\/[^\/]+/.test(i))return void elInnerError(t,n.get("wcf.editor.quote.url.error.invalid"));elInnerError(t,!1),elData(this._quote,"author",elById(e+"-author").value),elData(this._quote,"link",i),this._setTitle(this._quote),this._editor.caret.after(this._quote),o.close(this)},_setTitle:function(e){var t=n.get("wcf.editor.quote.title",{author:elData(e,"author"),url:elData(e,"url")});elData(e,"title")!==t&&elData(e,"title",t)},_delete:function(e){e.preventDefault();var t=this._quote.nextElementSibling||this._quote.previousElementSibling;null===t&&this._quote.parentNode!==this._editor.core.editor()[0]&&(t=this._quote.parentNode),null===t?(this._editor.code.set(""),this._editor.focus.end()):(elRemove(this._quote),this._editor.caret.end(t)),o.close(this)},_dialogSetup:function(){var e="redactor-quote-"+this._elementId,t=e+"-author",i=e+"-button-delete",a=e+"-button-save",r=e+"-url";return{id:e,options:{onClose:function(){this._editor.selection.restore(),o.destroy(this)}.bind(this),onSetup:function(){elById(i).addEventListener(WCF_CLICK_EVENT,this._delete.bind(this))}.bind(this),onShow:function(){elById(t).value=elData(this._quote,"author"),elById(r).value=elData(this._quote,"link")}.bind(this),title:n.get("wcf.editor.quote.edit")},source:'<div class="section"><dl><dt><label for="'+t+'">'+n.get("wcf.editor.quote.author")+'</label></dt><dd><input type="text" id="'+t+'" class="long" data-dialog-submit-on-enter="true"></dd></dl><dl><dt><label for="'+r+'">'+n.get("wcf.editor.quote.url")+'</label></dt><dd><input type="text" id="'+r+'" class="long" data-dialog-submit-on-enter="true"><small>'+n.get("wcf.editor.quote.url.description")+'</small></dd></dl></div><div class="formSubmit"><button id="'+a+'" class="buttonPrimary" data-type="submit">'+n.get("wcf.global.button.save")+'</button><button id="'+i+'">'+n.get("wcf.global.button.delete")+"</button></div>"}}},c}),define("WoltLabSuite/Core/Ui/Redactor/Spoiler",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader"],function(e,t,i,n,a,r,o){"use strict";function s(e){this.init(e)}var l=0;return s.prototype={init:function(t){this._editor=t,this._elementId=this._editor.$element[0].id,this._spoiler=null,e.add("com.woltlab.wcf.redactor2","bbcode_spoiler_"+this._elementId,this._bbcodeSpoiler.bind(this)),e.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._callbackEdit=this._edit.bind(this),this._observeLoad()},_bbcodeSpoiler:function(e){e.cancel=!0,this._editor.button.toggle({},"woltlab-spoiler","func","block.format");var t=this._editor.selection.block();t&&("P"===t.nodeName&&(t=t.parentNode),"WOLTLAB-SPOILER"===t.nodeName&&(this._setTitle(t),t.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(t)))},_observeLoad:function(){elBySelAll("woltlab-spoiler",this._editor.$editor[0],function(e){e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;0===l&&(l=o.getHeight(t));var i=a.offset(t);e.pageY>i.top&&e.pageY<i.top+l&&(e.preventDefault(),this._editor.selection.save(),this._spoiler=t,r.open(this))},_dialogSubmit:function(){elData(this._spoiler,"label",elById("redactor-spoiler-"+this._elementId+"-label").value),this._setTitle(this._spoiler),this._editor.caret.after(this._spoiler),r.close(this)},_setTitle:function(e){var t=i.get("wcf.editor.spoiler.title",{label:elData(e,"label")});elData(e,"title")!==t&&elData(e,"title",t)},_delete:function(e){e.preventDefault();var t=this._spoiler.nextElementSibling||this._spoiler.previousElementSibling;null===t&&this._spoiler.parentNode!==this._editor.core.editor()[0]&&(t=this._spoiler.parentNode),null===t?(this._editor.code.set(""),this._editor.focus.end()):(elRemove(this._spoiler),this._editor.caret.end(t)),r.close(this)},_dialogSetup:function(){var e="redactor-spoiler-"+this._elementId,t=e+"-button-delete",n=e+"-button-save",a=e+"-label";return{id:e,options:{onClose:function(){this._editor.selection.restore(),r.destroy(this)}.bind(this),onSetup:function(){elById(t).addEventListener(WCF_CLICK_EVENT,this._delete.bind(this))}.bind(this),onShow:function(){elById(a).value=elData(this._spoiler,"label")}.bind(this),title:i.get("wcf.editor.spoiler.edit")},source:'<div class="section"><dl><dt><label for="'+a+'">'+i.get("wcf.editor.spoiler.label")+'</label></dt><dd><input type="text" id="'+a+'" class="long" data-dialog-submit-on-enter="true"><small>'+i.get("wcf.editor.spoiler.label.description")+'</small></dd></dl></div><div class="formSubmit"><button id="'+n+'" class="buttonPrimary" data-type="submit">'+i.get("wcf.global.button.save")+'</button><button id="'+t+'">'+i.get("wcf.global.button.delete")+"</button></div>"}}},s}),define("WoltLabSuite/Core/Ui/Redactor/Table",["Language","Ui/Dialog"],function(e,t){"use strict";var i=null;return{showDialog:function(e){t.open(this),i=e.submitCallback},_dialogSubmit:function(){var e=!0;["rows","cols"].forEach(function(t){var i=elById("redactor-table-"+t);(i.value<1||i.value>100)&&(e=!1)}),e&&(i(),t.close(this))},_dialogSetup:function(){return{id:"redactorDialogTable",options:{onShow:function(){elById("redactor-table-rows").value=2,elById("redactor-table-cols").value=3},title:e.get("wcf.editor.table.insertTable")},source:'<dl><dt><label for="redactor-table-rows">'+e.get("wcf.editor.table.rows")+'</label></dt><dd><input type="number" id="redactor-table-rows" class="small" min="1" max="100" value="2" data-dialog-submit-on-enter="true"></dd></dl><dl><dt><label for="redactor-table-cols">'+e.get("wcf.editor.table.cols")+'</label></dt><dd><input type="number" id="redactor-table-cols" class="small" min="1" max="100" value="3" data-dialog-submit-on-enter="true"></dd></dl><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary" data-type="submit">'+e.get("wcf.global.button.insert")+"</button></div>"}}}}),define("WoltLabSuite/Core/Ui/Search/Page",["Core","Dom/Traverse","Dom/Util","Ui/Screen","Ui/SimpleDropdown","./Input"],function(e,t,i,n,a,r){"use strict";return{init:function(o){var s=elById("pageHeaderSearchInput");new r(s,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit:function(e){if(e.classList.add("dropdownMenuPageSearch"),n.is("screen-lg")){elData(e,"dropdown-alignment-horizontal","right");var t=s.clientWidth;e.style.setProperty("min-width",t+"px","");var a=s.parentNode,r=i.offset(a).left+a.clientWidth-(i.offset(s).left+t),o=i.styleAsInt(window.getComputedStyle(a),"padding-bottom");e.style.setProperty("transform","translateX(-"+Math.ceil(r)+"px) translateY(-"+o+"px)","")}},callbackSelect:function(){return setTimeout(function(){t.parentByTag(s,"FORM").submit()},1),!0}});var l=a.getDropdownMenu(i.identify(elBySel(".pageHeaderSearchType"))),c=this._click.bind(this);elBySelAll("a[data-object-type]",l,function(e){e.addEventListener(WCF_CLICK_EVENT,c)});var d=elBySel('a[data-object-type="'+o+'"]',l);e.triggerEvent(d,WCF_CLICK_EVENT)},_click:function(e){e.preventDefault();var t=elById("pageHeader");t.classList.add("searchBarForceOpen"),window.setTimeout(function(){t.classList.remove("searchBarForceOpen")},10);var i=elData(e.currentTarget,"object-type"),n=elById("pageHeaderSearchParameters");n.innerHTML="";var a=elData(e.currentTarget,"extended-link");a&&(elBySel(".pageHeaderSearchExtendedLink").href=a);var r=elData(e.currentTarget,"parameters");r=r?JSON.parse(r):{},i&&(r["types[]"]=i);for(var o in r)if(r.hasOwnProperty(o)){var s=elCreate("input");s.type="hidden",s.name=o,s.value=r[o],n.appendChild(s)}elBySel(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel",elById("pageHeaderSearchInputContainer")).textContent=e.currentTarget.textContent}}}),define("WoltLabSuite/Core/Ui/Smiley/Insert",["EventHandler","EventKey"],function(e,t){"use strict";function i(e){this.init(e)}return i.prototype={_container:null,_editorId:"",init:function(e){if(this._editorId=e,this._container=elById("smilies-"+this._editorId),!this._container&&(this._container=elById(this._editorId+"SmiliesTabContainer"),!this._container))throw new Error("Unable to find the message tab menu container containing the smilies.");this._container.addEventListener("keydown",this._keydown.bind(this)),this._container.addEventListener("mousedown",this._mousedown.bind(this))},_keydown:function(e){var i=document.activeElement;if(i.classList.contains("jsSmiley"))if(t.ArrowLeft(e)||t.ArrowRight(e)||t.Home(e)||t.End(e)){e.preventDefault();var n=Array.prototype.slice.call(elBySelAll(".jsSmiley",e.currentTarget));t.ArrowLeft(e)&&n.reverse();var a=n.indexOf(i);t.Home(e)?a=0:t.End(e)?a=n.length-1:(a+=1)===n.length&&(a=0),n[a].focus()}else(t.Enter(e)||t.Space(e))&&(e.preventDefault(),this._insert(elBySel("img",i)))},_mousedown:function(e){var t=e.target.closest("li");if(this._container.contains(t)){e.preventDefault();var i=elBySel("img",t);i&&this._insert(i)}},_insert:function(t){e.fire("com.woltlab.wcf.redactor2","insertSmiley_"+this._editorId,{img:t})}},i}),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["Language","Ui/Dialog","WoltLabSuite/Core/Ui/ItemList/Filter"],function(e,t,i){"use strict";var n,a,r,o=[];return{setup:function(e){o=e},open:function(e){if(0===o.length)throw new Error("Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`.");n=e,t.open(this)},_click:function(e){e.preventDefault();var i=e.target.closest("li"),a=elBySel("small",i).textContent.trim();t.close(this),n(a)},_dialogSetup:function(){return{id:"fontAwesomeSelection",options:{onSetup:function(){a=elById("fontAwesomeIcons");for(var e,t="",n=0,s=o.length;n<s;n++)e=o[n],t+='<li><span class="icon icon48 fa-'+e+'"></span><small>'+e+"</small></li>";a.innerHTML=t,a.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),r=new i("fontAwesomeIcons",{callbackPrepareItem:function(e){var t=elBySel("small",e);return{item:e,span:t,text:t.textContent.trim()}},enableVisibilityFilter:!1,filterPosition:"top"})}.bind(this),onShow:function(){r.reset()},title:e.get("wcf.global.fontAwesome.selectIcon")},source:'<ul class="fontAwesomeIcons" id="fontAwesomeIcons"></ul>'}}}}),define("WoltLabSuite/Core/Ui/Toggle/Input",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(t,i){if(this._element=elBySel(t),null===this._element)throw new Error("Unable to find element by selector '"+t+"'.");var n="INPUT"===this._element.nodeName?elAttr(this._element,"type"):"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this._options=e.extend({hide:[],show:[]},i),["hide","show"].forEach(function(e){var t,i,n;for(i=0,n=this._options[e].length;i<n;i++)if("string"!=typeof(t=this._options[e][i])&&!(t instanceof Element))throw new TypeError("The array '"+e+"' may only contain string selectors or DOM elements.")}.bind(this)),this._element.addEventListener("change",this._change.bind(this)),this._handleElements(this._options.show,this._element.checked),this._handleElements(this._options.hide,!this._element.checked)},_change:function(e){var t=e.currentTarget.checked;this._handleElements(this._options.show,t),this._handleElements(this._options.hide,!t)},_handleElements:function(e,t){for(var i,n,a=0,r=e.length;a<r;a++){if("string"==typeof(i=e[a])){if(null===(n=elBySel(i)))throw new Error("Unable to find element by selector '"+i+"'.");e[a]=i=n}window[t?"elShow":"elHide"](i)}}},t}),define("WoltLabSuite/Core/Ui/User/Editor",["Ajax","Language","StringUtil","Dom/Util","Ui/Dialog","Ui/Notification"],function(e,t,i,n,a,r){"use strict";var o="",s=null;return{init:function(){s=elBySel(".userProfileUser"),["ban","disableAvatar","disableCoverPhoto","disableSignature","enable"].forEach(function(e){var t=elBySel(".userProfileButtonMenu .jsButtonUser"+i.ucfirst(e));t&&(elData(t,"action",e),t.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)))}.bind(this))},_click:function(t){t.preventDefault();var i=elData(t.currentTarget,"action"),n="";switch(i){case"ban":elDataBool(s,"banned")&&(n="unban");break;case"disableAvatar":elDataBool(s,"disable-avatar")&&(n="enableAvatar");break;case"disableCoverPhoto":elDataBool(s,"disable-cover-photo")&&(n="enableCoverPhoto");break;case"disableSignature":elDataBool(s,"disable-signature")&&(n="enableSignature");break;case"enable":n=elDataBool(s,"is-disabled")?"enable":"disable"}""===n?(o=i,a.open(this)):e.api(this,{actionName:n})},_submit:function(i){i.preventDefault();var n=elById("wcfUiUserEditorExpiresLabel"),a="",r="";elById("wcfUiUserEditorNeverExpires").checked||""===(a=elById("wcfUiUserEditorExpiresDatePicker").value)&&(r=t.get("wcf.global.form.error.empty")),elInnerError(n,r);var s={};s[o+"Expires"]=a,s[o+"Reason"]=elById("wcfUiUserEditorReason").value.trim(),e.api(this,{actionName:o,parameters:s})},_ajaxSuccess:function(e){switch(e.actionName){case"ban":case"unban":elData(s,"banned","ban"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserBan").textContent=t.get("wcf.user."+("ban"===e.actionName?"unban":"ban"));var i=elBySel(".contentTitle",s),n=elBySel(".jsUserBanned",i);"ban"===e.actionName?(n=elCreate("span"),n.className="icon icon24 fa-lock jsUserBanned jsTooltip",n.title=e.returnValues,i.appendChild(n)):n&&elRemove(n);break;case"disableAvatar":case"enableAvatar":elData(s,"disable-avatar","disableAvatar"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserDisableAvatar").textContent=t.get("wcf.user."+("disableAvatar"===e.actionName?"enable":"disable")+"Avatar");break;case"disableCoverPhoto":case"enableCoverPhoto":elData(s,"disable-cover-photo","disableCoverPhoto"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserDisableCoverPhoto").textContent=t.get("wcf.user."+("disableCoverPhoto"===e.actionName?"enable":"disable")+"CoverPhoto");break;case"disableSignature":case"enableSignature":elData(s,"disable-signature","disableSignature"===e.actionName),
 elBySel(".userProfileButtonMenu .jsButtonUserDisableSignature").textContent=t.get("wcf.user."+("disableSignature"===e.actionName?"enable":"disable")+"Signature");break;case"enable":case"disable":elData(s,"is-disabled","disable"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserEnable").textContent=t.get("wcf.acp.user."+("enable"===e.actionName?"disable":"enable"))}"ban"!==e.actionName&&"disableAvatar"!==e.actionName&&"disableCoverPhoto"!==e.actionName&&"disableSignature"!==e.actionName||a.close(this),r.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\UserAction",objectIDs:[elData(s,"object-id")]}}},_dialogSetup:function(){return{id:"wcfUiUserEditor",options:{onSetup:function(e){elById("wcfUiUserEditorNeverExpires").addEventListener("change",function(){window[this.checked?"elHide":"elShow"](elById("wcfUiUserEditorExpiresSettings"))}),elBySel("button.buttonPrimary",e).addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),onShow:function(e){a.setTitle("wcfUiUserEditor",t.get("wcf.user."+o+".confirmMessage"));var i=elById("wcfUiUserEditorReason").nextElementSibling,n="wcf.user."+o+".reason.description";i.textContent=t.get(n),window[i.textContent===n?"elHide":"elShow"](i),i=elById("wcfUiUserEditorNeverExpires").nextElementSibling,i.textContent=t.get("wcf.user."+o+".neverExpires"),i=elBySel('label[for="wcfUiUserEditorExpires"]',e),i.textContent=t.get("wcf.user."+o+".expires"),i=elById("wcfUiUserEditorExpiresLabel"),i.textContent=t.get("wcf.user."+o+".expires.description")}},source:'<div class="section"><dl><dt><label for="wcfUiUserEditorReason">'+t.get("wcf.global.reason")+'</label></dt><dd><textarea id="wcfUiUserEditorReason" cols="40" rows="3"></textarea><small></small></dd></dl><dl><dt></dt><dd><label><input type="checkbox" id="wcfUiUserEditorNeverExpires" checked> <span></span></label></dd></dl><dl id="wcfUiUserEditorExpiresSettings" style="display: none"><dt><label for="wcfUiUserEditorExpires"></label></dt><dd><input type="date" name="wcfUiUserEditorExpires" id="wcfUiUserEditorExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true"><small id="wcfUiUserEditorExpiresLabel"></small></dd></dl></div><div class="formSubmit"><button class="buttonPrimary">'+t.get("wcf.global.button.submit")+"</button></div>"}}}}),define("WoltLabSuite/Core/Ui/User/PasswordStrength",["Core","Language"],function(e,t){"use strict";function i(e,t){return e.map(t).reduce(function(e,t){return e.concat(t)},[])}function n(e){return[].concat(e,e.split(/\W+/))}function a(i){var n=e.extend({},i.default_phrases);for(var a in n)if(n.hasOwnProperty(a))for(var r in n[a])if(n[a].hasOwnProperty(r)){var o="wcf.user.password.zxcvbn."+a+"."+r,s=t.get(o);s!==o&&(n[a][r]=s)}return new i(n)}function r(e,t){require(["zxcvbn"]).then(function(i){var n=i[0];this.init(n,e,t)}.bind(this))}var o=[];return elBySel('meta[property="og:site_name"]')&&o.push(elBySel('meta[property="og:site_name"]').getAttribute("content")),r.prototype={init:function(i,n,r){this._zxcvbn=i,this._input=n,this._options=e.extend({relatedInputs:[],staticDictionary:[]},r),this._options.feedbacker||(this._options.feedbacker=a(i.Feedback)),this._wrapper=elCreate("div"),this._wrapper.className="inputAddon inputAddonPasswordStrength",this._input.parentNode.insertBefore(this._wrapper,this._input),this._wrapper.appendChild(this._input);var o=elCreate("div");o.className="passwordStrengthRating";var s=elCreate("small");s.textContent=t.get("wcf.user.password.strength"),o.appendChild(s),this._score=elCreate("span"),this._score.className="passwordStrengthScore",elData(this._score,"score","-1"),o.appendChild(this._score),this._wrapper.appendChild(o),this._feedback=elCreate("div"),this._feedback.className="passwordStrengthFeedback",this._wrapper.appendChild(this._feedback),this._verdictResult=elCreate("input"),this._verdictResult.type="hidden",this._verdictResult.name=this._input.name+"_passwordStrengthVerdict",this._wrapper.parentNode.insertBefore(this._verdictResult,this._wrapper);var l=this._evaluate.bind(this);this._input.addEventListener("input",l),this._options.relatedInputs.forEach(function(e){e.addEventListener("input",l)}),""!==this._input.value.trim()&&this._evaluate()},_evaluate:function(e){var t=i(o.concat(this._options.staticDictionary,this._options.relatedInputs.map(function(e){return e.value.trim()})),n).filter(function(e){return e.length>0}),a=this._input.value.trim(),r=this._zxcvbn(a.substr(0,100),t);r.feedback=this._options.feedbacker.from_result(r),elData(this._score,"score",0===a.length?"-1":r.score),void 0!==e&&elInnerError(this._wrapper,r.feedback.warning),this._verdictResult.value=JSON.stringify(r)}},r}),define("WoltLabSuite/Core/Controller/Condition/Page/Dependence",["Dom/ChangeListener","Dom/Traverse","EventHandler","ObjectMap"],function(e,t,i,n){"use strict";var a=elBySelAll('input[name="pageIDs[]"]'),r=[],o=new n,s=new n,l=!1;return{register:function(e,i){if(r.push(e),o.set(e,i),s.set(e,[]),!l){for(var n=0,c=a.length;n<c;n++)a[n].addEventListener("change",this._checkVisibility.bind(this));l=!0}t.parentByTag(e,"FORM").addEventListener("submit",function(){"none"===e.style.getPropertyValue("display")&&e.remove()}),this._checkVisibility()},_checkVisibility:function(){for(var e,t,n,s,l,c=0,d=r.length;c<d;c++){e=r[c],n=o.get(e),s=[];for(var u=0,h=a.length;u<h;u++)t=a[u],t.checked&&s.push(~~t.value);l=s.filter(function(e){return-1===n.indexOf(e)}),!s.length||l.length?this._hideDependentElement(e):this._showDependentElement(e)}i.fire("com.woltlab.wcf.pageConditionDependence","checkVisivility")},_hideDependentElement:function(e){elHide(e);for(var t=s.get(e),i=0,n=t.length;i<n;i++)elHide(t[i]);s.set(e,[])},_showDependentElement:function(e){elShow(e);for(var t=e;(t=t.parentNode)&&t instanceof Element;)"none"===t.style.getPropertyValue("display")&&s.get(e).push(t),elShow(t)}}}),define("WoltLabSuite/Core/Controller/Map/Route/Planner",["Dom/Traverse","Dom/Util","Language","Ui/Dialog","WoltLabSuite/Core/Ajax/Status"],function(e,t,i,n,a){function r(e,t){if(this._button=elById(e),null===this._button)throw new Error("Unknown button with id '"+e+"'");this._button.addEventListener("click",this._openDialog.bind(this)),this._destination=t}return r.prototype={_dialogSetup:function(){return{id:this._button.id+"Dialog",options:{onShow:this._initDialog.bind(this),title:i.get("wcf.map.route.planner")},source:'<div class="googleMapsDirectionsContainer" style="display: none;"><div class="googleMap"></div><div class="googleMapsDirections"></div></div><small class="googleMapsDirectionsGoogleLinkContainer"><a href="'+this._getGoogleMapsLink()+'" class="googleMapsDirectionsGoogleLink" target="_blank" style="display: none;">'+i.get("wcf.map.route.viewOnGoogleMaps")+"</a></small><dl><dt>"+i.get("wcf.map.route.origin")+'</dt><dd><input type="text" name="origin" class="long" autofocus /></dd></dl><dl style="display: none;"><dt>'+i.get("wcf.map.route.travelMode")+'</dt><dd><select name="travelMode"><option value="driving">'+i.get("wcf.map.route.travelMode.driving")+'</option><option value="walking">'+i.get("wcf.map.route.travelMode.walking")+'</option><option value="bicycling">'+i.get("wcf.map.route.travelMode.bicycling")+'</option><option value="transit">'+i.get("wcf.map.route.travelMode.transit")+"</option></select></dd></dl>"}},_calculateRoute:function(e){var t=n.getDialog(this).dialog;e.label&&(this._originInput.value=e.label),void 0===this._map&&(this._map=new google.maps.Map(elByClass("googleMap",t)[0],{disableDoubleClickZoom:WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),draggable:WCF.Location.GoogleMaps.Settings.get("draggable"),mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:WCF.Location.GoogleMaps.Settings.get("scaleControl"),scrollwheel:WCF.Location.GoogleMaps.Settings.get("scrollwheel")}),this._directionsService=new google.maps.DirectionsService,this._directionsRenderer=new google.maps.DirectionsRenderer,this._directionsRenderer.setMap(this._map),this._directionsRenderer.setPanel(elByClass("googleMapsDirections",t)[0]),this._googleLink=elByClass("googleMapsDirectionsGoogleLink",t)[0]);var i={destination:this._destination,origin:e.location,provideRouteAlternatives:!0,travelMode:google.maps.TravelMode[this._travelMode.value.toUpperCase()]};a.show(),this._directionsService.route(i,this._setRoute.bind(this)),elAttr(this._googleLink,"href",this._getGoogleMapsLink(e.location,this._travelMode.value)),this._lastOrigin=e.location},_getGoogleMapsLink:function(e,t){if(e){var i="https://www.google.com/maps/dir/?api=1&origin="+e.lat()+","+e.lng()+"&destination="+this._destination.lat()+","+this._destination.lng();return t&&(i+="&travelmode="+t),i}return"https://www.google.com/maps/search/?api=1&query="+this._destination.lat()+","+this._destination.lng()},_initDialog:function(){if(!this._didInitDialog){var e=n.getDialog(this).dialog;this._originInput=elBySel('input[name="origin"]',e),new WCF.Location.GoogleMaps.LocationSearch(this._originInput,this._calculateRoute.bind(this)),this._travelMode=elBySel('select[name="travelMode"]',e),this._travelMode.addEventListener("change",this._updateRoute.bind(this)),this._didInitDialog=!0}},_openDialog:function(){n.open(this)},_setRoute:function(t,n){a.hide(),"OK"===n?(elShow(this._map.getDiv().parentNode),google.maps.event.trigger(this._map,"resize"),this._directionsRenderer.setDirections(t),elShow(e.parentByTag(this._travelMode,"DL")),elShow(this._googleLink),elInnerError(this._originInput,!1)):("OVER_QUERY_LIMIT"!==n&&"REQUEST_DENIED"!==n&&(n="NOT_FOUND"),elInnerError(this._originInput,i.get("wcf.map.route.error."+n.toLowerCase())))},_updateRoute:function(){this._calculateRoute({location:this._lastOrigin})}},r}),define("WoltLabSuite/Core/Controller/User/Notification/Settings",["Language","Ui/ReusableDropdown"],function(e,t){"use strict";var i=null,n=null;return{init:function(){elBySelAll(".jsCheckboxNotificationSettingsState",void 0,function(e){e.addEventListener("change",this._stateChange.bind(this))}.bind(this)),elBySelAll(".notificationSettingsEmailType",void 0,function(e){e.addEventListener("click",this._click.bind(this))}.bind(this))},_stateChange:function(e){var t=elData(e.currentTarget,"object-id"),i=elBySel('.notificationSettingsEmailType[data-object-id="'+t+'"]');null!==i&&i.classList[e.currentTarget.checked?"remove":"add"]("disabled")},_click:function(e){e.preventDefault(),e.stopPropagation();var t=e.currentTarget;n=~~elData(t,"object-id"),this._createDropDown(),this._setCurrentEmailType(this._getEmailTypeInputElement().value),this._showDropDown(t)},_createDropDown:function(){null===i&&(i=elCreate("ul"),i.className="dropdownMenu",["instant","daily","divider","none"].forEach(function(t){var n=elCreate("li");if("divider"===t)n.className="dropdownDivider";else{var a=elCreate("a");a.href="#",a.textContent=e.get("wcf.user.notification.mailNotificationType."+t),n.appendChild(a),elData(n,"value",t),n.addEventListener(WCF_CLICK_EVENT,this._setEmailType.bind(this))}i.appendChild(n)}.bind(this)),t.init("UiNotificationSettingsEmailType",i))},_setCurrentEmailType:function(e){elBySelAll("li",i,function(t){var i=elData(t,"value");t.classList[i===e?"add":"remove"]("active")})},_showDropDown:function(e){t.toggleDropdown("UiNotificationSettingsEmailType",e)},_setEmailType:function(t){t.preventDefault();var i=elData(t.currentTarget,"value");this._getEmailTypeInputElement().value=i;var a=elBySel('.notificationSettingsEmailType[data-object-id="'+n+'"]');a.title=e.get("wcf.user.notification.mailNotificationType."+i);var r=elBySel(".jsIconNotificationSettingsEmailType",a);switch(r.classList.remove("fa-clock-o"),r.classList.remove("fa-flash"),r.classList.remove("fa-times"),r.classList.remove("green"),r.classList.remove("red"),i){case"daily":r.classList.add("fa-clock-o"),r.classList.add("green");break;case"instant":r.classList.add("fa-flash"),r.classList.add("green");break;case"none":r.classList.add("fa-times"),r.classList.add("red")}n=null},_getEmailTypeInputElement:function(){return elById("settings_"+n+"_mailNotificationType")}}}),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["EventHandler","Ui/SimpleDropdown"],function(e,t){"use strict";function i(i,n){this._formId=i,this._suffixField=elById(n),this._suffixDropdownMenu=t.getDropdownMenu(n+"_dropdown"),this._suffixDropdownToggle=elByClass("dropdownToggle",t.getDropdown(n+"_dropdown"))[0];for(var a=this._suffixDropdownMenu.children,r=0,o=a.length;r<o;r++)a[r].addEventListener("click",this._changeSuffixSelection.bind(this));e.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",this._destroyDropdown.bind(this))}return i.prototype={_changeSuffixSelection:function(e){if(!e.currentTarget.classList.contains("disabled")){for(var t=this._suffixDropdownMenu.children,i=0,n=t.length;i<n;i++)t[i]===e.currentTarget?t[i].classList.add("active"):t[i].classList.remove("active");this._suffixField.value=elData(e.currentTarget,"value"),this._suffixDropdownToggle.innerHTML=elData(e.currentTarget,"label")+' <span class="icon icon16 fa-caret-down pointer"></span>'}},_destroyDropdown:function(e){e.formId===this._formId&&t.destroy(this._suffixDropdownMenu.id)}},i}),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e),this._aclList=null}return e.inherit(i,t,{_getData:function(){var e={};return e[this._fieldId]=this._aclList.getData(),e},_readField:function(){},setAclList:function(e){this._aclList=e}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["Core","./Field","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){return i.has(this._fieldId)?i.getData(this._fieldId):{}},_readField:function(){},destroy:function(){i.has(this._fieldId)&&i.delete(this._fieldId)}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e={};e[this._fieldId]=[];for(var t=0,i=this._fields.length;t<i;t++)this._fields[t].checked&&e[this._fieldId].push(this._fields[t].value);return e},_readField:function(){this._fields=elBySelAll('input[name="'+this._fieldId+'[]"]')}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e={};return e[this._fieldId]=~~this._field.checked,e}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Date",["Core","WoltLabSuite/Core/Date/Picker","./Field"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,i,{_getData:function(){var e={};return e[this._fieldId]=t.getValue(this._field),e}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["Core","./Field","WoltLabSuite/Core/Ui/ItemList/Static"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){var e={};e[this._fieldId]=[];for(var t=i.getValues(this._fieldId),n=0,a=t.length;n<a;n++)t[n].objectId?e[this._fieldId][t[n].objectId]=t[n].value:e[this._fieldId].push(t[n].value);return e}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){for(var e={},t=0,i=this._fields.length;t<i;t++)if(this._fields[t].checked){e[this._fieldId]=this._fields[t].value;break}return e},_readField:function(){this._fields=elBySelAll("input[name="+this._fieldId+"]")}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e=[];elBySelAll('input[name="'+this._fieldId+'[group][]"]',void 0,function(t){e.push(~~t.value)});var t=[];elBySelAll('input[name="'+this._fieldId+'[user][]"]',void 0,function(e){t.push(~~e.value)});var i={};return i[this._fieldId]={group:e,user:t},i},_readField:function(){}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["Core","./Field","WoltLabSuite/Core/Ui/ItemList"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){var e={};e[this._fieldId]=[];for(var t=i.getValues(this._fieldId),n=0,a=t.length;n<a;n++)e[this._fieldId].push(t[n].value);return e}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/User",["Core","./Field","WoltLabSuite/Core/Ui/ItemList"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){for(var e=i.getValues(this._fieldId),t=[],n=0,a=e.length;n<a;n++)e[n].objectId&&t.push(e[n].value);var r={};return r[this._fieldId]=t.join(","),r}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/Value",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e={};return e[this._fieldId]=this._field.value,e}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["Core","./Field","WoltLabSuite/Core/Language/Input"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){var e={},t=i.getValues(this._fieldId);return t.size>1?e[this._fieldId+"_i18n"]=t.toObject():e[this._fieldId]=t.get(0),e},destroy:function(){i.unregister(this._fieldId)}}),n}),define("WoltLabSuite/Core/Ui/Comment/Response/Add",["Core","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Notification","WoltLabSuite/Core/Ui/Comment/Add"],function(e,t,i,n,a,r,o){"use strict";function s(e,t){this.init(e,t)}return e.inherit(s,o,{init:function(t,i){s._super.prototype.init.call(this,t),this._options=e.extend({callbackInsert:null},i)},getContainer:function(){return this._isBusy?null:this._container},getContent:function(){return window.jQuery(this._textarea).redactor("code.get")},setContent:function(e){window.jQuery(this._textarea).redactor("code.set",e),window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor");var t=elBySel(".innerError",this._textarea.parentNode);null!==t&&elRemove(t),this._content.classList.remove("collapsed"),this._focusEditor()},_getParameters:function(){var e=s._super.prototype._getParameters.call(this);return e.data.commentID=~~elData(this._container.closest(".comment"),"object-id"),e},_insertMessage:function(e){var o=a.childByClass(this._container.parentNode,"commentContent"),s=o.nextElementSibling;return null!==s&&s.classList.contains("commentResponseList")||(s=elCreate("ul"),s.className="containerList commentResponseList",elData(s,"responses",0),o.parentNode.insertBefore(s,o.nextSibling)),n.insertHtml(e.returnValues.template,s,"append"),r.show(t.get("wcf.global.success.add")),i.trigger(),window.jQuery(this._textarea).redactor("code.set",""),null!==this._options.callbackInsert&&this._options.callbackInsert(),elData(s,"responses",s.children.length),s.lastElementChild},_ajaxSetup:function(){var e=s._super.prototype._ajaxSetup.call(this);return e.data.actionName="addResponse",e}}),s}),define("WoltLabSuite/Core/Ui/Comment/Response/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll","WoltLabSuite/Core/Ui/Comment/Edit"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,f){"use strict";function p(e){this.init(e)}return t.inherit(p,f,{init:function(e){this._activeElement=null,this._callbackClick=null,this._container=e,this._editorContainer=null,this._responses=new o,this.rebuild(),s.add("Ui/Comment/Response/Edit_"+c.identify(this._container),this.rebuild.bind(this))},rebuild:function(){elBySelAll(".commentResponse",this._container,function(e){if(!this._responses.has(e)){if(elDataBool(e,"can-edit")){var t=elBySel(".jsCommentResponseEditButton",e);null!==t&&(null===this._callbackClick&&(this._callbackClick=this._click.bind(this)),t.addEventListener(WCF_CLICK_EVENT,this._callbackClick))}this._responses.add(e)}}.bind(this))},_click:function(t){t.preventDefault(),null===this._activeElement?(this._activeElement=t.currentTarget.closest(".commentResponse"),this._prepare(),e.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})):d.show("wcf.message.error.editorAlreadyInUse",null,"warning")},_prepare:function(){this._editorContainer=elCreate("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='<span class="icon icon48 fa-spinner"></span>';var e=elBySel(".commentResponseContent",this._activeElement);e.insertBefore(this._editorContainer,e.firstChild)},_showMessage:function(e){c.setInnerHtml(elBySel(".commentResponseContent .userMessage",this._editorContainer.parentNode),e.returnValues.message),this._restoreMessage(),d.show()},_getEditorId:function(){return"commentResponseEditor"+this._getObjectId(this._activeElement)},_ajaxSetup:function(){return{data:{className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{objectTypeID:~~elData(this._container,"object-type-id")}}},silent:!0}}}),p}),define("WoltLabSuite/Core/Ui/Page/Header/Fixed",["Core","EventHandler","Ui/Alignment","Ui/CloseOverlay","Ui/SimpleDropdown","Ui/Screen"],function(e,t,i,n,a,r){"use strict";var o,s,l,c,d,u,h,f=!1;return{init:function(){o=elById("pageHeader"),s=elById("pageHeaderContainer"),this._initSearchBar(),r.on("screen-md-down",{match:function(){f=!0},unmatch:function(){f=!1},setup:function(){f=!0}}),t.add("com.woltlab.wcf.Search","close",this._closeSearchBar.bind(this))},_initSearchBar:function(){c=elById("pageHeaderSearch"),c.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),l=elById("pageHeaderPanel"),d=elById("pageHeaderSearchInput"),u=elById("topMenu"),h=elById("userPanelSearchButton"),h.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),e.stopPropagation(),o.classList.contains("searchBarOpen")?this._closeSearchBar():this._openSearchBar()}.bind(this)),n.add("WoltLabSuite/Core/Ui/Page/Header/Fixed",function(){o.classList.contains("searchBarForceOpen")||this._closeSearchBar()}.bind(this)),t.add("com.woltlab.wcf.MainMenuMobile","more",function(t){"com.woltlab.wcf.search"===t.identifier&&(t.handler.close(!0),e.triggerEvent(h,WCF_CLICK_EVENT))}.bind(this))},_openSearchBar:function(){window.WCF.Dropdown.Interactive.Handler.closeAll(),o.classList.add("searchBarOpen"),h.parentNode.classList.add("open"),f||i.set(c,u,{horizontal:"right"}),c.style.setProperty("top",l.clientHeight+"px",""),d.focus(),window.setTimeout(function(){d.selectionStart=d.selectionEnd=d.value.length},1)},_closeSearchBar:function(){o.classList.remove("searchBarOpen"),h.parentNode.classList.remove("open"),["bottom","left","right","top"].forEach(function(e){c.style.removeProperty(e)}),d.blur();var e=elBySel(".pageHeaderSearchType",c);a.close(e.id)}}}),define("WoltLabSuite/Core/Ui/Page/Search/Input",["Core","WoltLabSuite/Core/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){if(n=e.extend({ajax:{className:"wcf\\data\\page\\PageAction"},callbackSuccess:null},n),"function"!=typeof n.callbackSuccess)throw new Error("Expected a valid callback function for 'callbackSuccess'.");i._super.prototype.init.call(this,t,n),this._pageId=0},setPageId:function(e){this._pageId=e},_getParameters:function(e){var t=i._super.prototype._getParameters.call(this,e);return t.objectIDs=[this._pageId],t},_ajaxSuccess:function(e){this._options.callbackSuccess(e)}}),i}),define("WoltLabSuite/Core/Ui/Page/Search/Handler",["Language","StringUtil","Dom/Util","Ui/Dialog","./Input"],function(e,t,i,n,a){"use strict";var r=null,o=null,s=null,l=null,c=null,d=null;return{open:function(t,i,a,o){r=a,n.open(this),n.setTitle(this,i),s.textContent=o?e.get(o):e.get("wcf.page.pageObjectID.search.terms"),this._getSearchInputHandler().setPageId(t)},_buildList:function(i){if(this._resetList(),!Array.isArray(i.returnValues)||0===i.returnValues.length)return void elInnerError(o,e.get("wcf.page.pageObjectID.search.noResults"));for(var n,a,r,s=0,l=i.returnValues.length;s<l;s++)a=i.returnValues[s],n=a.image,/^fa-/.test(n)&&(n='<span class="icon icon48 '+n+' pointer jsTooltip" title="'+e.get("wcf.global.select")+'"></span>'),r=elCreate("li"),elData(r,"object-id",a.objectID),r.innerHTML='<div class="box48">'+n+'<div><div class="containerHeadline"><h3><a href="'+t.escapeHTML(a.link)+'">'+t.escapeHTML(a.title)+"</a></h3>"+(a.description?"<p>"+a.description+"</p>":"")+"</div></div></div>",r.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),c.appendChild(r);elShow(d)},_resetList:function(){elInnerError(o,!1),c.innerHTML="",elHide(d)},_getSearchInputHandler:function(){if(null===l){var e=this._buildList.bind(this);l=new a(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return l},_click:function(e){"A"!==e.target.nodeName&&(e.stopPropagation(),r(elData(e.currentTarget,"object-id")),n.close(this))},_dialogSetup:function(){return{id:"wcfUiPageSearchHandler",options:{onShow:function(){null===o&&(o=elById("wcfUiPageSearchInput"),s=o.parentNode.previousSibling.childNodes[0],c=elById("wcfUiPageSearchResultList"),d=elById("wcfUiPageSearchResultListContainer")),o.value="",elHide(d),c.innerHTML="",o.focus()},title:""},source:'<div class="section"><dl><dt><label for="wcfUiPageSearchInput">'+e.get("wcf.page.pageObjectID.search.terms")+'</label></dt><dd><input type="text" id="wcfUiPageSearchInput" class="long"></dd></dl></div><section id="wcfUiPageSearchResultListContainer" class="section sectionContainerList"><header class="sectionHeader"><h2 class="sectionTitle">'+e.get("wcf.page.pageObjectID.search.results")+'</h2></header><ul id="wcfUiPageSearchResultList" class="containerList wcfUiPageSearchResultList"></ul></section>'}}}}),define("WoltLabSuite/Core/Ui/Reaction/Profile/Loader",["Ajax","Core","Language"],function(e,t,i){"use strict";function n(e){this.init(e)}return n.prototype={init:function(e){if(this._container=elById("likeList"),this._userID=e,this._reactionTypeID=null,this._targetType="received",this._options={parameters:[]},!this._userID)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'userID' given.");var t=elCreate("li");t.className="likeListMore showMore",this._noMoreEntries=elCreate("small"),this._noMoreEntries.innerHTML=i.get("wcf.like.reaction.noMoreEntries"),this._noMoreEntries.style.display="none",t.appendChild(this._noMoreEntries),this._loadButton=elCreate("button"),this._loadButton.className="small",this._loadButton.innerHTML=i.get("wcf.like.reaction.more"),this._loadButton.addEventListener(WCF_CLICK_EVENT,this._loadReactions.bind(this)),this._loadButton.style.display="none",t.appendChild(this._loadButton),this._container.appendChild(t),2===elBySel("#likeList > li").length?this._noMoreEntries.style.display="":this._loadButton.style.display="",this._setupReactionTypeButtons(),this._setupTargetTypeButtons()},_setupReactionTypeButtons:function(){for(var e,t=elBySelAll("#reactionType .button"),i=0,n=t.length;i<n;i++)e=t[i],e.addEventListener(WCF_CLICK_EVENT,this._changeReactionTypeValue.bind(this,~~elData(e,"reaction-type-id")))},_setupTargetTypeButtons:function(){for(var e,t=elBySelAll("#likeType .button"),i=0,n=t.length;i<n;i++)e=t[i],e.addEventListener(WCF_CLICK_EVENT,this._changeTargetType.bind(this,elData(e,"like-type")))},_changeTargetType:function(e){if("given"!==e&&"received"!==e)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'targetType' given.");e!==this._targetType&&(elBySel("#likeType .button.active").classList.remove("active"),elBySel('#likeType .button[data-like-type="'+e+'"]').classList.add("active"),this._targetType=e,this._reload())},_changeReactionTypeValue:function(e){var t=elBySel("#reactionType .button.active");t&&t.classList.remove("active"),this._reactionTypeID!==e?(elBySel('#reactionType .button[data-reaction-type-id="'+e+'"]').classList.add("active"),this._reactionTypeID=e):this._reactionTypeID=null,this._reload()},_reload:function(){for(var e=elBySelAll("#likeList > li:not(:first-child):not(:last-child)"),t=0,i=e.length;t<i;t++)this._container.removeChild(e[t]);elData(this._container,"last-like-time",0),this._loadReactions()},_loadReactions:function(){this._options.parameters.userID=this._userID,this._options.parameters.lastLikeTime=elData(this._container,"last-like-time"),this._options.parameters.targetType=this._targetType,this._options.parameters.reactionTypeID=this._reactionTypeID,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){e.returnValues.template?(elBySel("#likeList > li:nth-last-child(1)").insertAdjacentHTML("beforebegin",e.returnValues.template),elData(this._container,"last-like-time",e.returnValues.lastLikeTime),this._noMoreEntries.style.display="none",this._loadButton.style.display=""):(this._noMoreEntries.style.display="",this._loadButton.style.display="none")},_ajaxSetup:function(){return{data:{actionName:"load",className:"\\wcf\\data\\reaction\\ReactionAction"}}}},n}),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["Ajax","Language","Dom/Util"],function(e,t,i){"use strict";function n(e){this.init(e)}return n.prototype={init:function(e){this._containerId=e;var i=elById(this._containerId);this._list=elBySel(".recentActivityList",i);var n=elCreate("li");n.className="showMore",this._list.childElementCount?(n.innerHTML='<button class="small">'+t.get("wcf.user.recentActivity.more")+"</button>",n.children[0].addEventListener(WCF_CLICK_EVENT,this._showMore.bind(this))):n.innerHTML="<small>"+t.get("wcf.user.recentActivity.noMoreEntries")+"</small>",this._list.appendChild(n),this._showMoreItem=n,elBySelAll(".jsRecentActivitySwitchContext .button",i,function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),e.classList.contains("active")||this._switchContext()}.bind(this))}.bind(this))},_showMore:function(t){t.preventDefault(),this._showMoreItem.children[0].disabled=!0,e.api(this,{actionName:"load",parameters:{boxID:~~elData(this._list,"box-id"),filteredByFollowedUsers:elDataBool(this._list,"filtered-by-followed-users"),lastEventId:elData(this._list,"last-event-id"),lastEventTime:elData(this._list,"last-event-time"),userID:~~elData(this._list,"user-id")}})},_switchContext:function(){e.api(this,{actionName:"switchContext"},function(){window.location.hash="#"+this._containerId,window.location.reload()}.bind(this))},_ajaxSuccess:function(e){e.returnValues.template?(i.insertHtml(e.returnValues.template,this._showMoreItem,"before"),elData(this._list,"last-event-time",e.returnValues.lastEventTime),elData(this._list,"last-event-id",e.returnValues.lastEventID),this._showMoreItem.children[0].disabled=!1):this._showMoreItem.innerHTML="<small>"+t.get("wcf.user.recentActivity.noMoreEntries")+"</small>"},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}},n}),define("WoltLabSuite/Core/Ui/User/CoverPhoto/Delete",["Ajax","EventHandler","Language","Ui/Confirmation","Ui/Notification"],function(e,t,i,n,a){"use strict";var r,o=0;return{init:function(e){r=elBySel(".jsButtonDeleteCoverPhoto"),r.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),o=e,t.add("com.woltlab.wcf.user","coverPhoto",function(e){"string"==typeof e.url&&e.url.length>0&&elShow(r.parentNode)})},_click:function(t){t.preventDefault(),n.show({confirm:e.api.bind(e,this),message:i.get("wcf.user.coverPhoto.delete.confirmMessage")})},_ajaxSuccess:function(e){elBySel(".userProfileCoverPhoto").style.setProperty("background-image","url("+e.returnValues.url+")",""),elHide(r.parentNode),a.show()},_ajaxSetup:function(){return{data:{actionName:"deleteCoverPhoto",className:"wcf\\data\\user\\UserProfileAction",parameters:{userID:o}}}}}}),define("WoltLabSuite/Core/Ui/User/CoverPhoto/Upload",["Core","EventHandler","Upload","Ui/Notification","Ui/Dialog"],function(e,t,i,n,a){"use strict";function r(e){i.call(this,"coverPhotoUploadButtonContainer","coverPhotoUploadPreview",{
index b1636a785cce54641e7854dab70c7d2b66ede511..cb7cfb6a3e7a3b3d0e9cae6bb09dcc465e1eb87c 100644 (file)
@@ -11,8 +11,8 @@ elData(i,"timestamp",(t.getTime()-t.getMilliseconds())/1e3),elData(i,"date",n),e
 ;if(!a.has(e)){var i=n.childByTag(t,"UL");if(null===i)throw"Expected an <ul> element as child of container '"+e+"'.";a.set(e,t),c.set(e,i),this.rebuild(e)}},registerTabMenus:function(){for(var e=elBySelAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)"),t=0,i=e.length;t<i;t++){var r=e[t],a=n.childByTag(r,"NAV");null!==a&&(r.classList.add("jsFlexibleMenuEnabled"),this.register(o.identify(a)))}},rebuildAll:function(){a.forEach(function(e,t){this.rebuild(t)}.bind(this))},rebuild:function(t){var i=a.get(t);if(void 0===i)throw"Expected a valid element id, '"+t+"' is unknown.";var u=window.getComputedStyle(i),d=i.parentNode.clientWidth;d-=o.styleAsInt(u,"margin-left"),d-=o.styleAsInt(u,"margin-right");var h=c.get(t),f=n.childrenByTag(h,"LI"),p=l.get(t),g=0;if(void 0!==p){for(var m=0,v=f.length;m<v;m++){var b=f[m];b.classList.contains("dropdown")||elShow(b)}null!==p.parentNode&&(g=o.outerWidth(p))}var _=h.scrollWidth-g,y=[];if(_>d)for(var m=f.length-1;m>=0;m--){var b=f[m];if(!(b.classList.contains("dropdown")||b.classList.contains("active")||b.classList.contains("ui-state-active"))&&(y.push(b),elHide(b),h.scrollWidth<d))break}if(y.length){var w;if(void 0===p){p=elCreate("li"),p.className="dropdown jsFlexibleMenuDropdown";var C=elCreate("a");C.className="icon icon16 fa-list",p.appendChild(C),w=elCreate("ul"),w.classList.add("dropdownMenu"),p.appendChild(w),l.set(t,p),s.set(t,w),r.init(C)}else w=s.get(t);null===p.parentNode&&h.appendChild(p);var E=document.createDocumentFragment(),L=this;y.forEach(function(i){var n=elCreate("li");n.innerHTML=i.innerHTML,n.addEventListener(WCF_CLICK_EVENT,function(n){n.preventDefault(),e.triggerEvent(elBySel("a",i),WCF_CLICK_EVENT),setTimeout(function(){L.rebuild(t)},59)}.bind(this)),E.appendChild(n)}),w.innerHTML="",w.appendChild(E)}else void 0!==p&&null!==p.parentNode&&elRemove(p)}}}),define("WoltLabSuite/Core/Ui/Tooltip",["Environment","Dom/ChangeListener","Ui/Alignment"],function(e,t,i){"use strict";var n=null,o=null,r=null,a=null,l=null,s=null;return{setup:function(){"desktop"===e.platform()&&(s=elCreate("div"),elAttr(s,"id","balloonTooltip"),s.classList.add("balloonTooltip"),s.addEventListener("transitionend",function(){s.classList.contains("active")||["bottom","left","right","top"].forEach(function(e){s.style.removeProperty(e)})}),l=elCreate("span"),elAttr(l,"id","balloonTooltipText"),s.appendChild(l),a=elCreate("span"),a.classList.add("elementPointer"),a.appendChild(elCreate("span")),s.appendChild(a),document.body.appendChild(s),r=elByClass("jsTooltip"),n=this._mouseEnter.bind(this),o=this._mouseLeave.bind(this),this.init(),t.add("WoltLabSuite/Core/Ui/Tooltip",this.init.bind(this)),window.addEventListener("scroll",this._mouseLeave.bind(this)))},init:function(){0!==r.length&&elBySelAll(".jsTooltip",void 0,function(e){e.classList.remove("jsTooltip");var t=elAttr(e,"title").trim();t.length&&(elData(e,"tooltip",t),e.removeAttribute("title"),elAttr(e,"aria-label",t),e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",o),e.addEventListener(WCF_CLICK_EVENT,o))})},_mouseEnter:function(e){var t=e.currentTarget,n=elAttr(t,"title");if(n="string"==typeof n?n.trim():"",""!==n&&(elData(t,"tooltip",n),elAttr(t,"aria-label",n),t.removeAttribute("title")),n=elData(t,"tooltip"),s.style.removeProperty("top"),s.style.removeProperty("left"),!n.length)return void s.classList.remove("active");s.classList.add("active"),l.textContent=n,i.set(s,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})},_mouseLeave:function(){s.classList.remove("active")}}}),define("WoltLabSuite/Core/Date/Picker",["DateUtil","Dom/Traverse","Dom/Util","EventHandler","Language","ObjectMap","Dom/ChangeListener","Ui/Alignment","WoltLabSuite/Core/Ui/CloseOverlay"],function(e,t,i,n,o,r,a,l,s){"use strict";var c=!1,u=0,d=!1,h=new r,f=null,p=0,g=0,m=[],v=null,b=null,_=null,y=null,w=null,C=null,E=null,L=null,A=null,S=null,x=null,I={init:function(){this._setup();for(var t=elBySelAll('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)'),i=new Date,n=0,r=t.length;n<r;n++){var a=t[n];a.classList.add("inputDatePicker"),a.readOnly=!0;var l="datetime"===elAttr(a,"type"),s=l&&elDataBool(a,"time-only"),c=elDataBool(a,"disable-clear"),u=l&&elDataBool(a,"ignore-timezone"),d=a.classList.contains("birthday");elData(a,"is-date-time",l),elData(a,"is-time-only",s);var f=null,p=elAttr(a,"value"),g=/^\d+-\d+-\d+$/.test(p);if(elAttr(a,"value")){if(s){f=new Date;var m=p.split(":");f.setHours(m[0],m[1])}else{if(u||d||g){var v=new Date(p).getTimezoneOffset(),b=v>0?"-":"+";v=Math.abs(v);var _=Math.floor(v/60).toString(),y=(v%60).toString();b+=2===_.length?_:"0"+_,b+=":",b+=2===y.length?y:"0"+y,d||g?p+="T00:00:00"+b:p=p.replace(/[+-][0-9]{2}:[0-9]{2}$/,b)}f=new Date(p)}var w=f.getTime();if(isNaN(w))p="";else{elData(a,"value",w);p=e[s?"formatTime":"formatDate"+(l?"Time":"")](f)}}var C=0===p.length;if(d?(elData(a,"min-date","120"),elData(a,"max-date",(new Date).getFullYear()+"-12-31")):(a.min&&elData(a,"min-date",a.min),a.max&&elData(a,"max-date",a.max)),this._initDateRange(a,i,!0),this._initDateRange(a,i,!1),elData(a,"min-date")===elData(a,"max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+a.id+"').");a.type="text",a.value=p,elData(a,"empty",C),elData(a,"placeholder")&&elAttr(a,"placeholder",elData(a,"placeholder"));var E=elCreate("input");if(E.id=a.id+"DatePicker",E.name=a.name,E.type="hidden",null!==f&&(E.value=s?e.format(f,"H:i"):u?e.format(f,"Y-m-dTH:i:s"):e.format(f,l?"c":"Y-m-d")),a.parentNode.insertBefore(E,a),a.removeAttribute("name"),a.addEventListener(WCF_CLICK_EVENT,S),!a.disabled){var L=elCreate("div");L.className="inputAddon";var A=elCreate("a");A.className="inputSuffix button jsTooltip",A.href="#",elAttr(A,"role","button"),elAttr(A,"tabindex","0"),elAttr(A,"title",o.get("wcf.date.datePicker")),elAttr(A,"aria-label",o.get("wcf.date.datePicker")),elAttr(A,"aria-haspopup",!0),elAttr(A,"aria-expanded",!1),A.addEventListener(WCF_CLICK_EVENT,S),L.appendChild(A);var x=elCreate("span");x.className="icon icon16 fa-calendar",A.appendChild(x),a.parentNode.insertBefore(L,a),L.insertBefore(a,A),c||(A=elCreate("a"),A.className="inputSuffix button",A.addEventListener(WCF_CLICK_EVENT,this.clear.bind(this,a)),C&&A.style.setProperty("visibility","hidden",""),L.appendChild(A),x=elCreate("span"),x.className="icon icon16 fa-times",A.appendChild(x))}for(var I=!1,D=["tiny","short","medium","long"],T=0;T<4;T++)a.classList.contains(D[T])&&(I=!0);I||a.classList.add("short"),h.set(a,{clearButton:A,shadow:E,disableClear:c,isDateTime:l,isEmpty:C,isTimeOnly:s,ignoreTimezone:u,onClose:null})}},_initDateRange:function(e,t,i){var n="data-"+(i?"min":"max")+"-date",o=e.hasAttribute(n)?elAttr(e,n).trim():"";if(o.match(/^(\d{4})-(\d{2})-(\d{2})$/))o=new Date(o).getTime();else if("now"===o)o=t.getTime();else if(o.match(/^\d{1,3}$/)){var r=new Date(t.getTime());r.setFullYear(r.getFullYear()+~~o*(i?-1:1)),o=r.getTime()}else if(o.match(/^datePicker-(.+)$/)){if(o=RegExp.$1,null===elById(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():new Date(i?1902:2038,0,1).getTime();elAttr(e,n,o)},_setup:function(){c||(c=!0,u=~~o.get("wcf.date.firstDayOfTheWeek"),S=this._open.bind(this),a.add("WoltLabSuite/Core/Date/Picker",this.init.bind(this)),s.add("WoltLabSuite/Core/Date/Picker",this._close.bind(this)))},_open:function(e){e.preventDefault(),e.stopPropagation(),this._createPicker(),null===x&&(x=this._maintainFocus.bind(this),document.body.addEventListener("focus",x,{capture:!0}));var i="INPUT"===e.currentTarget.nodeName?e.currentTarget:e.currentTarget.previousElementSibling;if(i===f)return void this._close();var n=t.parentByClass(i,"dialogContent");null!==n&&(elDataBool(n,"has-datepicker-scroll-listener")||(n.addEventListener("scroll",this._onDialogScroll.bind(this)),elData(n,"has-datepicker-scroll-listener",1))),f=i;var o,r=h.get(f),a=elData(f,"value");a?(o=new Date(+a),"Invalid Date"===o.toString()&&(o=new Date)):o=new Date,g=elData(f,"min-date"),g.match(/^datePicker-(.+)$/)&&(g=elData(elById(RegExp.$1),"value")),g=new Date(+g),g.getTime()>o.getTime()&&(o=g),p=elData(f,"max-date"),p.match(/^datePicker-(.+)$/)&&(p=elData(elById(RegExp.$1),"value")),p=new Date(+p),r.isDateTime?(b.value=o.getHours(),_.value=o.getMinutes(),A.classList.add("datePickerTime")):A.classList.remove("datePickerTime"),A.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),this._renderPicker(o.getDate(),o.getMonth(),o.getFullYear()),l.set(A,f),elAttr(f.nextElementSibling,"aria-expanded",!0),d=!1},_close:function(){if(null!==A&&A.classList.contains("active")){A.classList.remove("active");var e=h.get(f);"function"==typeof e.onClose&&e.onClose(),n.fire("WoltLabSuite/Core/Date/Picker","close",{element:f}),elAttr(f.nextElementSibling,"aria-expanded",!1),f=null,g=0,p=0}},_onDialogScroll:function(e){if(null!==f){var t=e.currentTarget,n=i.offset(f),o=i.offset(t);n.top+f.clientHeight<=o.top?this._close():n.top>=o.top+t.offsetHeight?this._close():n.left<=o.left?this._close():n.left>=o.left+t.offsetWidth?this._close():l.set(A,f)}},_renderPicker:function(e,t,i){this._renderGrid(e,t,i);for(var n="",o=g.getFullYear(),r=p.getFullYear();o<=r;o++)n+='<option value="'+o+'">'+o+"</option>";L.innerHTML=n,L.value=i,y.value=t,A.classList.add("active")},_renderGrid:function(t,i,n){var o,r,a=void 0!==t,l=void 0!==i;if(t=~~t||~~elData(v,"day"),i=~~i,n=~~n,l||n){var s=0!==n,c=document.createDocumentFragment();c.appendChild(v),l||(i=~~elData(v,"month")),n=n||~~elData(v,"year");var d=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-"+("0"+t.toString()).slice(-2));for(d<g?(n=g.getFullYear(),i=g.getMonth(),t=g.getDate(),y.value=i,L.value=n,s=!0):d>p&&(n=p.getFullYear(),i=p.getMonth(),t=p.getDate(),y.value=i,L.value=n,s=!0),d=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-01");d.getDay()!==u;)d.setDate(d.getDate()-1);elShow(m[35].parentNode);var h,f=new Date(g.getFullYear(),g.getMonth(),g.getDate());for(r=0;r<42;r++){if(35===r&&d.getMonth()!==i){elHide(m[35].parentNode);break}o=m[r],o.textContent=d.getDate(),h=d.getMonth()===i,h&&(d<f?h=!1:d>p&&(h=!1)),o.classList[h?"remove":"add"]("otherMonth"),h&&(o.href="#",elAttr(o,"role","button"),elAttr(o,"tabindex","0"),elAttr(o,"title",e.formatDate(d)),elAttr(o,"aria-label",e.formatDate(d))),d.setDate(d.getDate()+1)}if(elData(v,"month",i),elData(v,"year",n),A.insertBefore(c,E),!a&&(d=new Date(n,i,t),d.getDate()!==t)){for(;d.getMonth()!==i;)d.setDate(d.getDate()-1);t=d.getDate()}if(s){for(r=0;r<12;r++){var b=y.children[r];b.disabled=n===g.getFullYear()&&b.value<g.getMonth()||n===p.getFullYear()&&b.value>p.getMonth()}var _=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-01");_.setMonth(_.getMonth()+1),w.classList[_<p?"add":"remove"]("active");var S=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-01");S.setDate(S.getDate()-1),C.classList[S>g?"add":"remove"]("active")}}if(t){for(r=0;r<35;r++)o=m[r],o.classList[o.classList.contains("otherMonth")||~~o.textContent!==t?"remove":"add"]("active");elData(v,"day",t)}this._formatValue()},_formatValue:function(){var e,t=h.get(f);"true"!==elData(f,"empty")&&(e=t.isDateTime?new Date(elData(v,"year"),elData(v,"month"),elData(v,"day"),b.value,_.value):new Date(elData(v,"year"),elData(v,"month"),elData(v,"day")),this.setDate(f,e))},_createPicker:function(){if(null===A){A=elCreate("div"),A.className="datePicker",A.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var t=elCreate("header");A.appendChild(t),C=elCreate("a"),C.className="previous jsTooltip",C.href="#",elAttr(C,"role","button"),elAttr(C,"tabindex","0"),elAttr(C,"title",o.get("wcf.date.datePicker.previousMonth")),elAttr(C,"aria-label",o.get("wcf.date.datePicker.previousMonth")),C.innerHTML='<span class="icon icon16 fa-arrow-left"></span>',C.addEventListener(WCF_CLICK_EVENT,this.previousMonth.bind(this)),t.appendChild(C);var i=elCreate("span");t.appendChild(i),y=elCreate("select"),y.className="month jsTooltip",elAttr(y,"title",o.get("wcf.date.datePicker.month")),elAttr(y,"aria-label",o.get("wcf.date.datePicker.month")),y.addEventListener("change",this._changeMonth.bind(this)),i.appendChild(y);var n,r="",a=o.get("__monthsShort");for(n=0;n<12;n++)r+='<option value="'+n+'">'+a[n]+"</option>";y.innerHTML=r,L=elCreate("select"),L.className="year jsTooltip",elAttr(L,"title",o.get("wcf.date.datePicker.year")),elAttr(L,"aria-label",o.get("wcf.date.datePicker.year")),L.addEventListener("change",this._changeYear.bind(this)),i.appendChild(L),w=elCreate("a"),w.className="next jsTooltip",w.href="#",elAttr(w,"role","button"),elAttr(w,"tabindex","0"),elAttr(w,"title",o.get("wcf.date.datePicker.nextMonth")),elAttr(w,"aria-label",o.get("wcf.date.datePicker.nextMonth")),w.innerHTML='<span class="icon icon16 fa-arrow-right"></span>',w.addEventListener(WCF_CLICK_EVENT,this.nextMonth.bind(this)),t.appendChild(w),v=elCreate("ul"),A.appendChild(v);var l=elCreate("li");l.className="weekdays",v.appendChild(l);var s,c=o.get("__daysShort");for(n=0;n<7;n++){var d=n+u;d>6&&(d-=7),s=elCreate("span"),s.textContent=c[d],l.appendChild(s)}var h,f,p=this._click.bind(this);for(n=0;n<6;n++){f=elCreate("li"),v.appendChild(f);for(var g=0;g<7;g++)h=elCreate("a"),h.addEventListener(WCF_CLICK_EVENT,p),m.push(h),f.appendChild(h)}E=elCreate("footer"),A.appendChild(E),b=elCreate("select"),b.className="hour",elAttr(b,"title",o.get("wcf.date.datePicker.hour")),elAttr(b,"aria-label",o.get("wcf.date.datePicker.hour")),b.addEventListener("change",this._formatValue.bind(this));var S="",x=new Date(2e3,0,1),I=o.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");for(n=0;n<24;n++)x.setHours(n),S+='<option value="'+n+'">'+e.format(x,I)+"</option>";for(b.innerHTML=S,E.appendChild(b),E.appendChild(document.createTextNode(" : ")),_=elCreate("select"),_.className="minute",elAttr(_,"title",o.get("wcf.date.datePicker.minute")),elAttr(_,"aria-label",o.get("wcf.date.datePicker.minute")),_.addEventListener("change",this._formatValue.bind(this)),S="",n=0;n<60;n++)S+='<option value="'+n+'">'+(n<10?"0"+n.toString():n)+"</option>";_.innerHTML=S,E.appendChild(_),document.body.appendChild(A)}},previousMonth:function(e){e.preventDefault(),"0"===y.value?(y.value=11,L.value=~~L.value-1):y.value=~~y.value-1,this._renderGrid(void 0,y.value,L.value)},nextMonth:function(e){e.preventDefault(),"11"===y.value?(y.value=0,L.value=1+~~L.value):y.value=1+~~y.value,this._renderGrid(void 0,y.value,L.value)},_changeMonth:function(e){this._renderGrid(void 0,e.currentTarget.value)},_changeYear:function(e){this._renderGrid(void 0,void 0,e.currentTarget.value)},_click:function(e){if(e.preventDefault(),!e.currentTarget.classList.contains("otherMonth")){elData(f,"empty",!1),this._renderGrid(e.currentTarget.textContent);h.get(f).isDateTime||this._close()}},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+elData(e,"value")):null},setDate:function(t,i){t=this._getElement(t);var n=h.get(t);elData(t,"value",i.getTime());var o,r="";n.isDateTime?n.isTimeOnly?(o=e.formatTime(i),r="H:i"):n.ignoreTimezone?(o=e.formatDateTime(i),r="Y-m-dTH:i:s"):(o=e.formatDateTime(i),r="c"):(o=e.formatDate(i),r="Y-m-d"),t.value=o,n.shadow.value=e.format(i,r),n.disableClear||n.clearButton.style.removeProperty("visibility")},getValue:function(e){e=this._getElement(e);var t=h.get(e);return t?t.shadow.value:""},clear:function(e){e=this._getElement(e);var t=h.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||t.clearButton.style.setProperty("visibility","hidden",""),t.isEmpty=!0,t.shadow.value=""},destroy:function(e){e=this._getElement(e);var t=h.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),elRemove(i),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener(WCF_CLICK_EVENT,S),elRemove(t.shadow),e.classList.remove("inputDatePicker"),e.readOnly=!1,h.delete(e)},setCloseCallback:function(e,t){e=this._getElement(e),h.get(e).onClose=t},_getElement:function(e){if("string"==typeof e&&(e=elById(e)),!(e instanceof Element&&e.classList.contains("inputDatePicker")&&h.has(e)))throw new Error("Expected a valid date picker input element or id.");return e},_maintainFocus:function(e){null!==A&&A.classList.contains("active")&&(A.contains(e.target)?d=!0:d?(f.nextElementSibling.focus(),d=!1):elBySel(".previous",A).focus())}};return window.__wcf_bc_datePicker=I,I}),define("WoltLabSuite/Core/Ui/Page/Action",["Dictionary","Language"],function(e,t){"use strict";var i,n,o,r=new e,a=!1,l=-1;return{setup:function(){a||(a=!0,o=elCreate("div"),o.className="pageAction",i=elCreate("div"),i.className="pageActionButtons",o.appendChild(i),n=this._buildToTopButton(),o.appendChild(n),document.body.appendChild(o),window.addEventListener("scroll",window.debounce(this._onScroll.bind(this),100,!1),{passive:!0}),this._onScroll())},_buildToTopButton:function(){var e=elCreate("a");return e.className="button buttonPrimary pageActionButtonToTop initiallyHidden jsTooltip",e.href="",elAttr(e,"title",t.get("wcf.global.scrollUp")),elAttr(e,"aria-hidden","true"),e.innerHTML='<span class="icon icon32 fa-angle-up"></span>',e.addEventListener(WCF_CLICK_EVENT,this._scrollTopTop.bind(this)),e},_onScroll:function(e){if(!document.documentElement.classList.contains("disableScrolling")){var t=window.pageYOffset;t!==l&&(t>=300?(n.classList.contains("initiallyHidden")&&n.classList.remove("initiallyHidden"),elAttr(n,"aria-hidden","false")):elAttr(n,"aria-hidden","true"),this._renderContainer(),-1!==l&&o.classList[t<l?"remove":"add"]("scrolledDown"),l=t)}},_scrollTopTop:function(e){e.preventDefault(),elById("top").scrollIntoView({behavior:"smooth"})},add:function(e,t,n){this.setup();var a=elCreate("div");a.className="pageActionButton",a.name=e,elAttr(a,"aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),a.appendChild(t);var l=null;n&&void 0!==(l=r.get(n))&&(l=l.parentNode),null===l&&i.childElementCount&&(l=i.children[0]),null===l&&(l=i.firstChild),i.insertBefore(a,l),o.classList.remove("scrolledDown"),r.set(e,t),a.offsetParent,elAttr(a,"aria-hidden","false"),this._renderContainer()},has:function(e){return r.has(e)},get:function(e){return r.get(e)},remove:function(e){var t=r.get(e);if(void 0!==t){var n=t.parentNode,o=function(){try{elAttrBool(n,"aria-hidden")&&(i.removeChild(n),r.delete(e)),n.removeEventListener("transitionend",o)}catch(e){}};n.addEventListener("transitionend",o),this.hide(e)}},hide:function(e){var t=r.get(e);t&&(elAttr(t.parentNode,"aria-hidden","true"),this._renderContainer())},show:function(e){var t=r.get(e);t&&(t.parentNode.classList.contains("initiallyHidden")&&t.parentNode.classList.remove("initiallyHidden"),elAttr(t.parentNode,"aria-hidden","false"),o.classList.remove("scrolledDown"),this._renderContainer())},_renderContainer:function(){var e=!1;if(i.childElementCount)for(var t=0,n=i.childElementCount;t<n;t++)if("false"===elAttr(i.children[t],"aria-hidden")){e=!0;break}i.classList[e?"add":"remove"]("active")}}}),define("WoltLabSuite/Core/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLabSuite/Core/Date/Time/Relative","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Mobile","WoltLabSuite/Core/Ui/TabMenu","WoltLabSuite/Core/Ui/FlexibleMenu","Ui/Dialog","WoltLabSuite/Core/Ui/Tooltip","WoltLabSuite/Core/Language","WoltLabSuite/Core/Environment","WoltLabSuite/Core/Date/Picker","EventHandler","Core","WoltLabSuite/Core/Ui/Page/Action","Devtools","Dom/ChangeListener"],function(e,t,i,n,o,r,a,l,s,c,u,d,h,f,p,g,m,v){"use strict";return window.Favico=e,window.enquire=t,null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=u.get,window.WCF.Language.add=u.add,window.WCF.Language.addObject=u.addObject,window.__wcf_bc_eventHandler=f,{setup:function(e){e=p.extend({enableMobileMenu:!0},e),window.ENABLE_DEVELOPER_TOOLS&&m._internal_.enable(),d.setup(),n.setup(),h.init(),o.setup(),r.setup({enableMobileMenu:e.enableMobileMenu}),a.setup(),s.setup(),c.setup();for(var t=elBySelAll("form[method=get]"),i=0,l=t.length;i<l;i++)t[i].setAttribute("method","post");"microsoft"===d.browser()&&(window.onbeforeunload=function(){});var u=0;u=window.setInterval(function(){"function"==typeof window.jQuery&&(window.clearInterval(u),window.jQuery(function(){g.setup()}),window.jQuery.holdReady(!1))},20),this._initA11y(),v.add("WoltLabSuite/Core/Bootstrap",this._initA11y.bind(this))},_initA11y:function(){elBySelAll("nav:not([aria-label]):not([aria-labelledby]):not([role])",void 0,function(e){elAttr(e,"role","presentation")}),elBySelAll("article:not([aria-label]):not([aria-labelledby]):not([role])",void 0,function(e){elAttr(e,"role","presentation")})}}}),define("WoltLabSuite/Core/Controller/Style/Changer",["Ajax","Language","Ui/Dialog"],function(e,t,i){"use strict";return{setup:function(){elBySelAll(".jsButtonStyleChanger",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this.showDialog.bind(this))}.bind(this))},showDialog:function(e){e.preventDefault(),i.open(this)},_dialogSetup:function(){return{id:"styleChanger",options:{disableContentPadding:!0,title:t.get("wcf.style.changeStyle")},source:{data:{actionName:"getStyleChooser",className:"wcf\\data\\style\\StyleAction"},after:function(e){for(var t=elBySelAll(".styleList > li",e),i=0,n=t.length;i<n;i++){var o=t[i];o.classList.add("pointer"),o.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}}.bind(this)}}},_click:function(t){t.preventDefault(),e.apiOnce({data:{actionName:"changeStyle",className:"wcf\\data\\style\\StyleAction",objectIDs:[elData(t.currentTarget,"style-id")]},success:function(){window.location.reload()}})}}}),define("WoltLabSuite/Core/Controller/Popover",["Ajax","Dictionary","Environment","Dom/ChangeListener","Dom/Util","Ui/Alignment"],function(e,t,i,n,o,r){"use strict";var a=null,l=new t,s=new t,c=new t,u=null,d=!1,h=null,f=null,p=null,g=null,m=null,v=null,b=null,_=null;return{_setup:function(){if(null===p){p=elCreate("div"),p.className="popover forceHide",g=elCreate("div"),g.className="popoverContent",p.appendChild(g);var e=elCreate("span");e.className="elementPointer",e.appendChild(elCreate("span")),p.appendChild(e),document.body.appendChild(p),m=this._hide.bind(this),b=this._mouseEnter.bind(this),_=this._mouseLeave.bind(this),p.addEventListener("mouseenter",this._popoverMouseEnter.bind(this)),p.addEventListener("mouseleave",_),p.addEventListener("animationend",this._clearContent.bind(this)),window.addEventListener("beforeunload",function(){d=!0,null!==h&&window.clearTimeout(h),this._hide(!0)}.bind(this)),n.add("WoltLabSuite/Core/Controller/Popover",this._init.bind(this))}},init:function(e){"desktop"===i.platform()&&(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this._setup(),c.has(e.identifier)||(c.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,elements:e.legacy?e.className:elByClass(e.className),legacy:e.legacy,loadCallback:e.loadCallback}),this._init(e.identifier)))},_init:function(e){"string"==typeof e&&e.length?this._initElements(c.get(e),e):c.forEach(this._initElements.bind(this))},_initElements:function(e,t){for(var i=e.legacy?elBySelAll(e.elements):e.elements,n=0,r=i.length;n<r;n++){var a=i[n],c=o.identify(a);if(l.has(c))return;if(null!==a.closest(".popover"))return void l.set(c,{content:null,state:0});var u=e.legacy?c:~~a.getAttribute(e.attributeName);if(0!==u){a.addEventListener("mouseenter",b),a.addEventListener("mouseleave",_),"A"===a.nodeName&&elAttr(a,"href")&&a.addEventListener(WCF_CLICK_EVENT,m);var d=t+"-"+u;elData(a,"cache-id",d),s.set(c,{element:a,identifier:t,objectId:u}),l.has(d)||l.set(t+"-"+u,{content:null,state:0})}}},setContent:function(e,t,i){var n=e+"-"+t,r=l.get(n);if(void 0===r)throw new Error("Unable to find element for object id '"+t+"' (identifier: '"+e+"').");var c=o.createFragmentFromHtml(i);if(c.childElementCount||(c=o.createFragmentFromHtml("<p>"+i+"</p>")),r.content=c,r.state=2,a){var u=s.get(a).element;elData(u,"cache-id")===n&&this._show()}},_mouseEnter:function(e){if(!d){null!==h&&(window.clearTimeout(h),h=null);var t=o.identify(e.currentTarget);a===t&&null!==f&&(window.clearTimeout(f),f=null),u=t,h=window.setTimeout(function(){h=null,u===t&&this._show()}.bind(this),800)}},_mouseLeave:function(){u=null,null===f&&(null===v&&(v=this._hide.bind(this)),null!==f&&window.clearTimeout(f),f=window.setTimeout(v,500))},_popoverMouseEnter:function(){null!==f&&(window.clearTimeout(f),f=null)},_show:function(){null!==f&&(window.clearTimeout(f),f=null);var e=!1;p.classList.contains("active")?a!==u&&(this._hide(),e=!0):g.childElementCount&&(e=!0),e&&(p.classList.add("forceHide"),p.offsetTop,this._clearContent(),p.classList.remove("forceHide")),a=u;var t=s.get(a);if(void 0!==t){var i=l.get(elData(t.element,"cache-id"));if(2===i.state)g.appendChild(i.content),this._rebuild(a);else if(0===i.state){i.state=1;var n=c.get(t.identifier);if(n.loadCallback)n.loadCallback(t.objectId,this,t.element);else if(n.dboAction){var o=function(e){this.setContent(t.identifier,t.objectId,e.returnValues.template)}.bind(this);this.ajaxApi({actionName:"getPopover",className:n.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},o,o)}}}},_hide:function(){null!==f&&(window.clearTimeout(f),f=null),p.classList.remove("active")},_clearContent:function(){if(a&&g.childElementCount&&!p.classList.contains("active"))for(var e=l.get(elData(s.get(a).element,"cache-id"));g.childNodes.length;)e.content.appendChild(g.childNodes[0])},_rebuild:function(){p.classList.contains("active")||(p.classList.remove("forceHide"),p.classList.add("active"),r.set(p,s.get(a).element,{pointer:!0,vertical:"top"}))},_ajaxSetup:function(){return{silent:!0}},ajaxApi:function(t,i,n){if("function"!=typeof i)throw new TypeError("Expected a valid callback for parameter 'success'.");e.api(this,t,i,n)}}}),define("WoltLabSuite/Core/Ui/User/Ignore",["List","Dom/ChangeListener"],function(e,t){"use strict";var i=function(){};return i.prototype={init:function(){},_rebuild:function(){},_removeClass:function(){}},i}),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["Environment","Language","Ui/Screen"],function(e,t,i){"use strict";var n,o,r,a,l=!1,s=0,c=[],u=[];return{init:function(){if(a=elBySel(".mainMenu .boxMenu"),null===(r=a&&a.childElementCount?a.children[0]:null))throw new Error("Unable to find the menu.");i.on("screen-lg",{enable:this._enable.bind(this),disable:this._disable.bind(this),setup:this._setup.bind(this)})},_enable:function(){l=!0,"safari"===e.browser()?window.setTimeout(this._rebuildVisibility.bind(this),1e3):(this._rebuildVisibility(),window.setTimeout(this._rebuildVisibility.bind(this),1e3))},_disable:function(){l=!1},_showNext:function(e){if(e.preventDefault(),u.length){var t=u.slice(0,3).pop();this._setMarginLeft(a.clientWidth-(t.offsetLeft+t.clientWidth)),a.lastElementChild===t&&n.classList.remove("active"),o.classList.add("active")}},_showPrevious:function(e){if(e.preventDefault(),c.length){var t=c.slice(-3)[0];this._setMarginLeft(-1*t.offsetLeft),a.firstElementChild===t&&o.classList.remove("active"),n.classList.add("active")}},_setMarginLeft:function(e){s=Math.min(s+e,0),r.style.setProperty("margin-left",s+"px","")},_rebuildVisibility:function(){if(l){c=[],u=[];var e=a.clientWidth;if(a.scrollWidth>e||s<0)for(var t,i=0,r=a.childElementCount;i<r;i++){t=a.children[i];var d=t.offsetLeft;d<0?c.push(t):d+t.clientWidth>e&&u.push(t)}o.classList[c.length?"add":"remove"]("active"),n.classList[u.length?"add":"remove"]("active")}},_setup:function(){this._setupOverflow(),this._setupA11y()},_setupOverflow:function(){n=elCreate("a"),n.className="mainMenuShowNext",n.href="#",n.innerHTML='<span class="icon icon32 fa-angle-right"></span>',elAttr(n,"aria-hidden","true"),n.addEventListener(WCF_CLICK_EVENT,this._showNext.bind(this)),a.parentNode.appendChild(n),o=elCreate("a"),o.className="mainMenuShowPrevious",o.href="#",o.innerHTML='<span class="icon icon32 fa-angle-left"></span>',elAttr(o,"aria-hidden","true"),o.addEventListener(WCF_CLICK_EVENT,this._showPrevious.bind(this)),a.parentNode.insertBefore(o,a.parentNode.firstChild);var e=this._rebuildVisibility.bind(this);r.addEventListener("transitionend",e),window.addEventListener("resize",function(){r.style.setProperty("margin-left","0px",""),s=0,e()}),this._enable()},_setupA11y:function(){elBySelAll(".boxMenuHasChildren",a,function(e){var i=!1,n=elBySel(".boxMenuLink",e);n&&(elAttr(n,"aria-haspopup",!0),elAttr(n,"aria-expanded",i));var o=elCreate("button");o.className="visuallyHidden",o.tabindex=0,elAttr(o,"role","button"),elAttr(o,"aria-label",t.get("wcf.global.button.showMenu")),e.insertBefore(o,n.nextSibling),o.addEventListener(WCF_CLICK_EVENT,function(){i=!i,elAttr(n,"aria-expanded",i),elAttr(o,"aria-label",i?t.get("wcf.global.button.hideMenu"):t.get("wcf.global.button.showMenu"))})}.bind(this))}}}),define("WoltLabSuite/Core/User",[],function(){"use strict";var e,t=!1;return{getLink:function(){return e},init:function(i,n,o){if(t)throw new Error("User has already been initialized.");Object.defineProperty(this,"userId",{value:i,writable:!1}),Object.defineProperty(this,"username",{value:n,writable:!1}),e=o,t=!0}}}),define("WoltLabSuite/Core/Ui/Message/UserConsent",["Ajax","Core","User","Dom/ChangeListener","Dom/Util"],function(e,t,i,n,o){var r=!1,a="function"==typeof window.WeakSet?new window.WeakSet:new window.Set;return{init:function(){"all"===window.sessionStorage.getItem(t.getStoragePrefix()+"user-consent")&&(r=!0),this._registerEventListeners(),n.add("WoltLabSuite/Core/Ui/Message/UserConsent",this._registerEventListeners.bind(this))},_registerEventListeners:function(){r?this._enableAll():elBySelAll(".jsButtonMessageUserConsentEnable",void 0,function(e){a.has(e)||(e.addEventListener("click",this._click.bind(this)),a.add(e))}.bind(this))},_click:function(n){n.preventDefault(),r=!0,this._enableAll(),i.userId?e.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(t.getStoragePrefix()+"user-consent","all")},_enableExternalMedia:function(e){var t=atob(elData(e,"payload"));o.insertHtml(t,e,"before"),elRemove(e)},_enableAll:function(){elBySelAll(".messageUserConsent",void 0,this._enableExternalMedia.bind(this))}}}),define("WoltLabSuite/Core/BootstrapFrontend",["WoltLabSuite/Core/BackgroundQueue","WoltLabSuite/Core/Bootstrap","WoltLabSuite/Core/Controller/Style/Changer","WoltLabSuite/Core/Controller/Popover","WoltLabSuite/Core/Ui/User/Ignore","WoltLabSuite/Core/Ui/Page/Header/Menu","WoltLabSuite/Core/Ui/Message/UserConsent"],function(e,t,i,n,o,r,a){"use strict";return{setup:function(n){n.backgroundQueue.url=WSC_API_URL+n.backgroundQueue.url.substr(WCF_PATH.length),t.setup(),r.init(),n.styleChanger&&i.setup(),n.enableUserPopover&&this._initUserPopover(),e.setUrl(n.backgroundQueue.url),(Math.random()<.1||n.backgroundQueue.force)&&e.invoke(),a.init()},_initUserPopover:function(){n.init({className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user"}),n.init({attributeName:"data-user-id",className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user.deprecated"})}}}),define("WoltLabSuite/Core/Clipboard",["Environment","Ui/Screen"],function(e,t){"use strict";return{copyTextToClipboard:function(i){if(navigator.clipboard)return navigator.clipboard.writeText(i);if(window.getSelection){var n=elCreate("textarea");n.contentEditable=!0,n.readOnly=!1;var o=!1;if("ios"===e.platform()){o=!0,t.scrollDisable();var r=~~(window.innerHeight/4)+window.pageYOffset;n.style.cssText="font-size: 16px; position: absolute; left: 1px; top: "+r+"px; width: 50px; height: 50px; overflow: hidden;border: 5px solid red;"
 }else n.style.cssText="position: absolute; left: -9999px; top: -9999px; width: 0; height: 0;";document.body.appendChild(n);try{n.value=i;var a=document.createRange();a.selectNodeContents(n);var l=window.getSelection();return l.removeAllRanges(),l.addRange(a),n.setSelectionRange(0,999999),document.execCommand("copy")?Promise.resolve():Promise.reject(new Error("execCommand('copy') failed"))}finally{elRemove(n),o&&t.scrollEnable()}}return Promise.reject(new Error("Neither navigator.clipboard, nor window.getSelection is supported."))},copyElementTextToClipboard:function(e){return this.copyTextToClipboard(e.textContent)}}}),define("WoltLabSuite/Core/ColorUtil",[],function(){"use strict";var e={hsvToRgb:function(e,t,i){var n,o,r,a,l,s={r:0,g:0,b:0};if(n=Math.floor(e/60),o=e/60-n,t/=100,i/=100,r=i*(1-t),a=i*(1-t*o),l=i*(1-t*(1-o)),0==t)s.r=s.g=s.b=i;else switch(n){case 1:s.r=a,s.g=i,s.b=r;break;case 2:s.r=r,s.g=i,s.b=l;break;case 3:s.r=r,s.g=a,s.b=i;break;case 4:s.r=l,s.g=r,s.b=i;break;case 5:s.r=i,s.g=r,s.b=a;break;case 0:case 6:s.r=i,s.g=l,s.b=r}return{r:Math.round(255*s.r),g:Math.round(255*s.g),b:Math.round(255*s.b)}},rgbToHsv:function(e,t,i){var n,o,r,a,l,s;if(e/=255,t/=255,i/=255,a=Math.max(Math.max(e,t),i),l=Math.min(Math.min(e,t),i),s=a-l,n=0,a!==l){switch(a){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===a?0:s/a,r=a,{h:Math.round(n),s:Math.round(100*o),v:Math.round(100*r)}},hexToRgb:function(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){var 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},rgbToHex:function(e,t,i){var n="0123456789ABCDEF";return void 0===t&&e.toString().match(/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/)&&(e=RegExp.$1,t=RegExp.$2,i=RegExp.$3),n.charAt((e-e%16)/16)+""+n.charAt(e%16)+n.charAt((t-t%16)/16)+n.charAt(t%16)+n.charAt((i-i%16)/16)+n.charAt(i%16)}};return window.__wcf_bc_colorUtil=e,e}),define("WoltLabSuite/Core/FileUtil",["Dictionary","StringUtil"],function(e,t){"use strict";var i=e.fromObject({zip:"archive",rar:"archive",tar:"archive",gz:"archive",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:"text",doc:"word",docx:"word",odt:"word"}),n=e.fromObject({"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"});return{formatFilesize:function(e,i){void 0===i&&(i=2);var 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"),t.formatNumeric(e,-i)+" "+n},getIconNameByFilename:function(e){var t=e.lastIndexOf(".");if(!1!==t){var n=e.substr(t+1);if(i.has(n))return i.get(n)}return""},getExtensionByMimeType:function(e){return n.has(e)?"."+n.get(e):""},blobToFile:function(e,t){var i=this.getExtensionByMimeType(e.type),n=window.File;try{new n([],"ie11-check")}catch(e){n=function(e,t,i){var n=Blob.call(this,e,i);return n.name=t,n.lastModifiedDate=new Date,n},n.prototype=Object.create(window.File.prototype)}return new n([e],t+i,{type:e.type})}}}),define("WoltLabSuite/Core/Permission",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,i){if("boolean"!=typeof i)throw new TypeError("Permission value has to be boolean.");t.set(e,i)},addObject:function(e){for(var t in e)objOwns(e,t)&&this.add(t,e[t])},get:function(e){return!!t.has(e)&&t.get(e)}}});var _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,n,a,l,s,c){for(var d in a)if(a.hasOwnProperty(d)&&a[d]){var h=a[d];h=Array.isArray(h)?h:[h];for(var f=0;f<h.length;++f){if(c&&c.cause==d+","+f)return;var p=h[f],g=p.inside,m=!!p.lookbehind,v=!!p.greedy,b=0,_=p.alias;if(v&&!p.pattern.global){var y=p.pattern.toString().match(/[imsuy]*$/)[0];p.pattern=RegExp(p.pattern.source,y+"g")}for(var w=p.pattern||p,C=l.next,E=s;C!==n.tail&&!(c&&E>=c.reach);E+=C.value.length,C=C.next){var L=C.value;if(n.length>e.length)return;if(!(L instanceof t)){var A=1;if(v&&C!=n.tail.prev){w.lastIndex=E;var S=w.exec(e);if(!S)break;var x=S.index+(m&&S[1]?S[1].length:0),I=S.index+S[0].length,D=E;for(D+=C.value.length;x>=D;)C=C.next,D+=C.value.length;if(D-=C.value.length,E=D,C.value instanceof t)continue;for(var T=C;T!==n.tail&&(D<I||"string"==typeof T.value);T=T.next)A++,D+=T.value.length;A--,L=e.slice(E,D),S.index-=E}else{w.lastIndex=0;var S=w.exec(L)}if(S){m&&(b=S[1]?S[1].length:0);var x=S.index+b,k=S[0].slice(b),I=x+k.length,B=L.slice(0,x),M=L.slice(I),N=E+L.length;c&&N>c.reach&&(c.reach=N);var U=C.prev;B&&(U=o(n,U,B),E+=B.length),r(n,U,A);var P=new t(d,g?u.tokenize(k,g):k,_,k);C=o(n,U,P),M&&o(n,C,M),A>1&&i(e,n,a,C.prev,E,{cause:d+","+f,reach:N})}}}}}}function n(){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 o(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 r(e,t,i){for(var n=t.next,o=0;o<i&&n!==e.tail;o++)n=n.next;t.next=n,n.prev=t,e.length-=o}function a(e){for(var t=[],i=e.head.next;i!==e.tail;)t.push(i.value),i=i.next;return t}function l(){u.manual||u.highlightAll()}var s=/\blang(?:uage)?-([\w-]+)\b/i,c=0,u={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:++c}),e.__id},clone:function e(t,i){i=i||{};var n,o;switch(u.util.type(t)){case"Object":if(o=u.util.objId(t),i[o])return i[o];n={},i[o]=n;for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r],i));return n;case"Array":return o=u.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&&!s.test(e.className);)e=e.parentElement;return e?(e.className.match(s)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(n){var e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(n.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var i in t)if(t[i].src==e)return t[i]}return null}},isActive:function(e,t,i){for(var n="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(n))return!1;e=e.parentElement}return!!i}},languages:{extend:function(e,t){var i=u.util.clone(u.languages[e]);for(var n in t)i[n]=t[n];return i},insertBefore:function(e,t,i,n){n=n||u.languages;var o=n[e],r={};for(var a in o)if(o.hasOwnProperty(a)){if(a==t)for(var l in i)i.hasOwnProperty(l)&&(r[l]=i[l]);i.hasOwnProperty(a)||(r[a]=o[a])}var s=n[e];return n[e]=r,u.languages.DFS(u.languages,function(t,i){i===s&&t!=e&&(this[t]=r)}),r},DFS:function e(t,i,n,o){o=o||{};var r=u.util.objId;for(var a in t)if(t.hasOwnProperty(a)){i.call(t,a,t[a],n||a);var l=t[a],s=u.util.type(l);"Object"!==s||o[r(l)]?"Array"!==s||o[r(l)]||(o[r(l)]=!0,e(l,i,a,o)):(o[r(l)]=!0,e(l,i,null,o))}}},plugins:{},highlightAll:function(e,t){u.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,i){var n={callback:i,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",n),n.elements=Array.prototype.slice.apply(n.container.querySelectorAll(n.selector)),u.hooks.run("before-all-elements-highlight",n);for(var o,r=0;o=n.elements[r++];)u.highlightElement(o,!0===t,n.callback)},highlightElement:function(t,i,n){function o(e){d.highlightedCode=e,u.hooks.run("before-insert",d),d.element.innerHTML=d.highlightedCode,u.hooks.run("after-highlight",d),u.hooks.run("complete",d),n&&n.call(d.element)}var r=u.util.getLanguage(t),a=u.languages[r];t.className=t.className.replace(s,"").replace(/\s+/g," ")+" language-"+r;var l=t.parentElement;l&&"pre"===l.nodeName.toLowerCase()&&(l.className=l.className.replace(s,"").replace(/\s+/g," ")+" language-"+r);var c=t.textContent,d={element:t,language:r,grammar:a,code:c};if(u.hooks.run("before-sanity-check",d),!d.code)return u.hooks.run("complete",d),void(n&&n.call(d.element));if(u.hooks.run("before-highlight",d),!d.grammar)return void o(u.util.encode(d.code));if(i&&e.Worker){var h=new Worker(u.filename);h.onmessage=function(e){o(e.data)},h.postMessage(JSON.stringify({language:d.language,code:d.code,immediateClose:!0}))}else o(u.highlight(d.code,d.grammar,d.language))},highlight:function(e,i,n){var o={code:e,grammar:i,language:n};return u.hooks.run("before-tokenize",o),o.tokens=u.tokenize(o.code,o.grammar),u.hooks.run("after-tokenize",o),t.stringify(u.util.encode(o.tokens),o.language)},tokenize:function(e,t){var r=t.rest;if(r){for(var l in r)t[l]=r[l];delete t.rest}var s=new n;return o(s,s.head,e),i(e,s,t,s.head,0),a(s)},hooks:{all:{},add:function(e,t){var i=u.hooks.all;i[e]=i[e]||[],i[e].push(t)},run:function(e,t){var i=u.hooks.all[e];if(i&&i.length)for(var n,o=0;n=i[o++];)n(t)}},Token:t};if(e.Prism=u,t.stringify=function e(t,i){if("string"==typeof t)return t;if(Array.isArray(t)){var n="";return t.forEach(function(t){n+=e(t,i)}),n}var o={type:t.type,content:e(t.content,i),tag:"span",classes:["token",t.type],attributes:{},language:i},r=t.alias;r&&(Array.isArray(r)?Array.prototype.push.apply(o.classes,r):o.classes.push(r)),u.hooks.run("wrap",o);var a="";for(var l in o.attributes)a+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener?(u.disableWorkerMessageHandler||e.addEventListener("message",function(t){var i=JSON.parse(t.data),n=i.language,o=i.code,r=i.immediateClose;e.postMessage(u.highlight(o,u.languages[n],n)),r&&e.close()},!1),u):u;var d=u.util.currentScript();if(d&&(u.filename=d.src,d.hasAttribute("data-manual")&&(u.manual=!0)),!u.manual){var h=document.readyState;"loading"===h||"interactive"===h&&d&&d.defer?document.addEventListener("DOMContentLoaded",l):window.requestAnimationFrame?window.requestAnimationFrame(l):window.setTimeout(l,16)}return u}(_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 Prism.wscSplitIntoLines=function(e){function t(){var e=elCreate("span");return elData(e,"number",a++),r.appendChild(e),e}var i,n,o,r=document.createDocumentFragment(),a=1;for(i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(){return NodeFilter.FILTER_ACCEPT},!1),o=t();n=i.nextNode();)n.data.split(/\r?\n/).forEach(function(i,r){var a,l;for(r>=1&&(o.appendChild(document.createTextNode("\n")),o=t()),a=document.createTextNode(i),l=n.parentNode;l!==e;){var s=l.cloneNode(!1);s.appendChild(a),a=s,l=l.parentNode}o.appendChild(a)});return r},Prism}),define("WoltLabSuite/Core/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={_createButton:function(){},_createFileElement:function(){},_createFileElements:function(){},_failure:function(){},_getParameters:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){},_success:function(){},_upload:function(){},_uploadFiles:function(){}},a}),define("WoltLabSuite/Core/Ajax/Jsonp",["Core"],function(e){"use strict";return{send:function(t,i,n,o){if(t="string"==typeof t?t.trim():"",0===t.length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof i)throw new TypeError("Expected a valid callback function for parameter 'success'.");o=e.extend({parameterName:"callback",timeout:10},o||{});var r,a="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),l=window.setTimeout(function(){"function"==typeof n&&n(),window[a]=void 0,elRemove(r)},1e3*(~~o.timeout||10));window[a]=function(){window.clearTimeout(l),i.apply(null,arguments),window[a]=void 0,elRemove(r)},t+=-1===t.indexOf("?")?"?":"&",t+=o.parameterName+"="+a,r=elCreate("script"),r.async=!0,elAttr(r,"src",t),document.head.appendChild(r)}}}),define("WoltLabSuite/Core/Ui/Notification",["Language"],function(e){"use strict";var t=!1,i=null,n=null,o=null,r=null,a=null;return{show:function(l,s,c){t||(this._init(),i="function"==typeof s?s:null,n.className=c||"success",n.textContent=e.get(l||"wcf.global.success"),t=!0,o.classList.add("active"),r=setTimeout(a,2e3))},_init:function(){null===o&&(a=this._hide.bind(this),o=elCreate("div"),o.id="systemNotification",n=elCreate("p"),n.addEventListener(WCF_CLICK_EVENT,a),o.appendChild(n),document.body.appendChild(o))},_hide:function(){clearTimeout(r),o.classList.remove("active"),null!==i&&i(),t=!1}}}),define("prism/prism-meta",[],function(){return{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"},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"},asciidoc:{title:"AsciiDoc",file:"asciidoc"},aspnet:{title:"ASP.NET (C#)",file:"aspnet"},asm6502:{title:"6502 Assembly",file:"asm6502"},autohotkey:{title:"AutoHotkey",file:"autohotkey"},autoit:{title:"AutoIt",file:"autoit"},bash:{title:"Bash",file:"bash"},basic:{title:"BASIC",file:"basic"},batch:{title:"Batch",file:"batch"},bbcode:{title:"BBcode",file:"bbcode"},bison:{title:"Bison",file:"bison"},bnf:{title:"BNF",file:"bnf"},brainfuck:{title:"Brainfuck",file:"brainfuck"},brightscript:{title:"BrightScript",file:"brightscript"},bro:{title:"Bro",file:"bro"},c:{title:"C",file:"c"},csharp:{title:"C#",file:"csharp"},cpp:{title:"C++",file:"cpp"},cil:{title:"CIL",file:"cil"},clojure:{title:"Clojure",file:"clojure"},cmake:{title:"CMake",file:"cmake"},coffeescript:{title:"CoffeeScript",file:"coffeescript"},concurnas:{title:"Concurnas",file:"concurnas"},csp:{title:"Content-Security-Policy",file:"csp"},crystal:{title:"Crystal",file:"crystal"},"css-extras":{title:"CSS Extras",file:"css-extras"},cypher:{title:"Cypher",file:"cypher"},d:{title:"D",file:"d"},dart:{title:"Dart",file:"dart"},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"},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"},"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"},gcode:{title:"G-code",file:"gcode"},gdscript:{title:"GDScript",file:"gdscript"},gedcom:{title:"GEDCOM",file:"gedcom"},gherkin:{title:"Gherkin",file:"gherkin"},git:{title:"Git",file:"git"},glsl:{title:"GLSL",file:"glsl"},go:{title:"Go",file:"go"},graphql:{title:"GraphQL",file:"graphql"},groovy:{title:"Groovy",file:"groovy"},haml:{title:"Haml",file:"haml"},handlebars:{title:"Handlebars",file:"handlebars"},haskell:{title:"Haskell",file:"haskell"},haxe:{title:"Haxe",file:"haxe"},hcl:{title:"HCL",file:"hcl"},hlsl:{title:"HLSL",file:"hlsl"},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"},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"},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"},keyman:{title:"Keyman",file:"keyman"},kotlin:{title:"Kotlin",file:"kotlin"},kts:{title:"Kotlin Script",file:"kotlin"},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"},lolcode:{title:"LOLCODE",file:"lolcode"},lua:{title:"Lua",file:"lua"},makefile:{title:"Makefile",file:"makefile"},markdown:{title:"Markdown",file:"markdown"},"markup-templating":{title:"Markup templating",file:"markup-templating"},matlab:{title:"MATLAB",file:"matlab"},mel:{title:"MEL",file:"mel"},mizar:{title:"Mizar",file:"mizar"},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"},nasm:{title:"NASM",file:"nasm"},neon:{title:"NEON",file:"neon"},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"},opencl:{title:"OpenCL",file:"opencl"},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"},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"},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"},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"},python:{title:"Python",file:"python"},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"},jsx:{title:"React JSX",file:"jsx"},tsx:{title:"React TSX",file:"tsx"},reason:{title:"Reason",file:"reason"},regex:{title:"Regex",file:"regex"},renpy:{title:"Ren'py",file:"renpy"},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"},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"},iecst:{title:"Structured Text (IEC 61131-3)",file:"iecst"},stylus:{title:"Stylus",file:"stylus"},swift:{title:"Swift",file:"swift"},"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"},turtle:{title:"Turtle",file:"turtle"},twig:{title:"Twig",file:"twig"},typescript:{title:"TypeScript",file:"typescript"},unrealscript:{title:"UnrealScript",file:"unrealscript"},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"},wiki:{title:"Wiki markup",file:"wiki"},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/Bbcode/Code",["Language","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Clipboard","WoltLabSuite/Core/Prism","prism/prism-meta"],function(e,t,i,n,o){"use strict";function r(e){var t;this.container=e,this.codeContainer=elBySel(".codeBoxCode > code",this.container),this.language=null;for(var i=0;i<this.codeContainer.classList.length;i++)(t=this.codeContainer.classList[i].match(/language-(.*)/))&&(this.language=t[1])}var a=function(e){return function(){var t=arguments;return new Promise(function(i,n){var o=function(){try{i(e.apply(null,t))}catch(e){n(e)}};window.requestIdleCallback?window.requestIdleCallback(o,{timeout:5e3}):setTimeout(o,0)})}};return r.processAll=function(){elBySelAll(".codeBox:not([data-processed])",document,function(e){elData(e,"processed","1");var t=new r(e);t.language&&t.highlight(),t.createCopyButton()})},r.prototype={createCopyButton:function(){var n=elBySel(".codeBoxHeader",this.container),o=elCreate("span");o.className="icon icon24 fa-files-o pointer jsTooltip",o.setAttribute("title",e.get("wcf.message.bbcode.code.copy")),o.addEventListener("click",function(){i.copyElementTextToClipboard(this.codeContainer).then(function(){t.show(e.get("wcf.message.bbcode.code.copy.success"))})}.bind(this)),n.appendChild(o)},highlight:function(){return this.language?o[this.language]?(this.container.classList.add("highlighting"),require(["prism/components/prism-"+o[this.language].file]).then(a(function(){var e=n.languages[this.language];if(!e)throw new Error("Invalid language "+language+" given.");var t=elCreate("div");return t.innerHTML=n.highlight(this.codeContainer.textContent,e,this.language),t}.bind(this))).then(a(function(e){var t=n.wscSplitIntoLines(e),i=elBySelAll("[data-number]",t),o=elBySelAll(".codeBoxLine > span",this.codeContainer);if(i.length!==o.length)throw new Error("Unreachable");for(var r=[],l=0,s=i.length;l<s;l+=50)r.push(a(function(e){for(var t=Math.min(e+50,s),n=e;n<t;n++)o[n].parentNode.replaceChild(i[n],o[n])})(l));return Promise.all(r)}.bind(this))).then(function(){this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}.bind(this))):Promise.reject(new Error("Unknown language "+this.language)):Promise.reject(new Error("No language detected"))}},r}),define("WoltLabSuite/Core/Bbcode/Collapsible",[],function(){"use strict";var e=elByClass("jsCollapsibleBbcode");return{observe:function(){for(var t,i,n;e.length;)t=e[0],i=[],elBySelAll(".toggleButton:not(.jsToggleButtonEnabled)",t,function(e){e.closest(".jsCollapsibleBbcode")===t&&i.push(e)}),n=elBySel(".collapsibleBbcodeOverflow",t)||t,i.length>0&&function(e,t){var i=function(i){if(e.classList.toggle("collapsed")){if(t.forEach(function(e){e.classList.contains("icon")?(e.classList.remove("fa-compress"),e.classList.add("fa-expand"),e.title=elData(e,"title-expand")):e.textContent=elData(e,"title-expand")}),i instanceof Event){var n=e.getBoundingClientRect().top;if(n<0){var o=window.pageYOffset+(n-100);o<0&&(o=0),window.scrollTo(window.pageXOffset,o)}}}else t.forEach(function(e){e.classList.contains("icon")?(e.classList.add("fa-compress"),e.classList.remove("fa-expand"),e.title=elData(e,"title-collapse")):e.textContent=elData(e,"title-collapse")})};t.forEach(function(e){e.classList.add("jsToggleButtonEnabled"),e.addEventListener(WCF_CLICK_EVENT,i)}),0!==n.scrollTop&&(n.scrollTop=0,i()),n.addEventListener("scroll",function(){n.scrollTop=0,e.classList.contains("collapsed")&&i()})}(t,i),t.classList.remove("jsCollapsibleBbcode")}}}),define("WoltLabSuite/Core/Bbcode/Spoiler",["Language"],function(e){"use strict";var t=elByClass("jsSpoilerBox");return{observe:function(){for(var e,i;t.length;)e=t[0],e.classList.remove("jsSpoilerBox"),i=elBySel(".jsSpoilerToggle",e),e=i.parentNode.nextElementSibling,i.addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this,e,i))},_onClick:function(t,i,n){n.preventDefault(),i.classList.toggle("active");var o=i.classList.contains("active");window[o?"elShow":"elHide"](t),elAttr(i,"aria-expanded",o),elAttr(t,"aria-hidden",!o),elDataBool(i,"has-custom-label")||(i.textContent=e.get(i.classList.contains("active")?"wcf.bbcode.spoiler.hide":"wcf.bbcode.spoiler.show"))}}}),define("WoltLabSuite/Core/Controller/Captcha",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,i){if(t.has(e))throw new Error("Captcha with id '"+e+"' is already registered.");if("function"!=typeof i)throw new TypeError("Expected a valid callback for parameter 'callback'.");t.set(e,i)},delete:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");t.delete(e)},has:function(e){return t.has(e)},getData:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");return t.get(e)()}}}),define("WoltLabSuite/Core/Controller/Clipboard",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Page/Action","Ui/Screen"],function(e,t,i,n,o,r,a,l,s,c,u,d,h,f){"use strict";return{setup:function(){},reload:function(){},_initContainers:function(){},_loadMarkedItems:function(){},_markAll:function(){},_mark:function(){},_saveState:function(){},_executeAction:function(){},_executeProxyAction:function(){},_unmarkAll:function(){},_ajaxSetup:function(){},_ajaxSuccess:function(){},_rebuildMarkings:function(){},hideEditor:function(){},showEditor:function(){},unmark:function(){}}}),define("WoltLabSuite/Core/Image/ExifUtil",[],function(){"use strict";var e={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};return{getExifBytesFromJpeg:function(t){return new Promise(function(i,n){if(!(t instanceof Blob||t instanceof File))return n(new TypeError("The argument must be a Blob or a File"));var o=new FileReader;o.addEventListener("error",function(){o.abort(),n(o.error)}),o.addEventListener("load",function(){var t=o.result,r=new Uint8Array(t),a=new Uint8Array;if(255!==r[0]&&r[1]!==e.SOI)return n(new Error("Not a JPEG"));for(var l=2;l<r.length&&255===r[l];){var s=2+(r[l+2]<<8|r[l+3]);if(r[l+1]===e.APP1){for(var c="",u=l+4;0!==r[u]&&u<r.length;u++)c+=String.fromCharCode(r[u]);if("Exif"===c||"http://ns.adobe.com/xap/1.0/"===c){var d=Array.prototype.slice.call(r,l,s+l),h=new Uint8Array(a.length+d.length);h.set(a),h.set(d,a.length),a=h}}l+=s}i(a)}),o.readAsArrayBuffer(t)})},removeExifData:function(t){return new Promise(function(i,n){if(!(t instanceof Blob||t instanceof File))return n(new TypeError("The argument must be a Blob or a File"));var o=new FileReader;o.addEventListener("error",function(){o.abort(),n(o.error)}),o.addEventListener("load",function(){var r=o.result,a=new Uint8Array(r);if(255!==a[0]&&a[1]!==e.SOI)return n(new Error("Not a JPEG"));for(var l=2;l<a.length&&255===a[l];){var s=2+(a[l+2]<<8|a[l+3]);if(a[l+1]===e.APP1){for(var c="",u=l+4;0!==a[u]&&u<a.length;u++)c+=String.fromCharCode(a[u]);if("Exif"===c||"http://ns.adobe.com/xap/1.0/"===c){var d=Array.prototype.slice.call(a,0,l),h=Array.prototype.slice.call(a,l+s);a=new Uint8Array(d.length+h.length),a.set(d,0),a.set(h,d.length)}}else l+=s}i(new Blob([a],{type:t.type}))}),o.readAsArrayBuffer(t)})},setExifData:function(t,i){return this.removeExifData(t).then(function(t){return new Promise(function(n){var o=new FileReader;o.addEventListener("error",function(){o.abort(),reject(o.error)}),o.addEventListener("load",function(){var r=o.result,a=new Uint8Array(r),l=2;255===a[2]&&a[3]===e.APP0&&(l+=2+(a[4]<<8|a[5]));var s=Array.prototype.slice.call(a,0,l),c=Array.prototype.slice.call(a,l);a=new Uint8Array(s.length+i.length+c.length),a.set(s),a.set(i,l),a.set(c,l+i.length),n(new Blob([a],{type:t.type}))}),o.readAsArrayBuffer(t)})})}}}),define("WoltLabSuite/Core/Image/ImageUtil",[],function(){"use strict";return{containsTransparentPixels:function(e){
 for(var t=e.getContext("2d").getImageData(0,0,e.width,e.height),i=3,n=t.data.length;i<n;i+=4)if(255!==t.data[i])return!0;return!1}}}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("Pica",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.pica=e()}}(function(){return function(){function e(t,i,n){function o(a,l){if(!i[a]){if(!t[a]){var s="function"==typeof require&&require;if(!l&&s)return s(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[a]={exports:{}};t[a][0].call(u.exports,function(e){return o(t[a][1][e]||e)},u,u.exports,e,t,i,n)}return i[a].exports}for(var r="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}return e}()({1:[function(e,t,i){"use strict";function n(e){var t=e||[],i={js:t.indexOf("js")>=0,wasm:t.indexOf("wasm")>=0};r.call(this,i),this.features={js:i.js,wasm:i.wasm&&this.has_wasm()},this.use(a),this.use(l)}var o=e("inherits"),r=e("multimath"),a=e("multimath/lib/unsharp_mask"),l=e("./mm_resize");o(n,r),n.prototype.resizeAndUnsharp=function(e,t){var i=this.resize(e,t);return e.unsharpAmount&&this.unsharp_mask(i,e.toWidth,e.toHeight,e.unsharpAmount,e.unsharpRadius,e.unsharpThreshold),i},t.exports=n},{"./mm_resize":4,inherits:15,multimath:16,"multimath/lib/unsharp_mask":19}],2:[function(e,t,i){"use strict";function n(e){return e<0?0:e>255?255:e}function o(e,t,i,o,r,a){var l,s,c,u,d,h,f,p,g,m,v,b=0,_=0;for(g=0;g<o;g++){for(d=0,m=0;m<r;m++){for(h=a[d++],f=a[d++],p=b+4*h|0,l=s=c=u=0;f>0;f--)v=a[d++],u=u+v*e[p+3]|0,c=c+v*e[p+2]|0,s=s+v*e[p+1]|0,l=l+v*e[p]|0,p=p+4|0;t[_+3]=n(u+8192>>14),t[_+2]=n(c+8192>>14),t[_+1]=n(s+8192>>14),t[_]=n(l+8192>>14),_=_+4*o|0}_=4*(g+1)|0,b=(g+1)*i*4|0}}function r(e,t,i,o,r,a){var l,s,c,u,d,h,f,p,g,m,v,b=0,_=0;for(g=0;g<o;g++){for(d=0,m=0;m<r;m++){for(h=a[d++],f=a[d++],p=b+4*h|0,l=s=c=u=0;f>0;f--)v=a[d++],u=u+v*e[p+3]|0,c=c+v*e[p+2]|0,s=s+v*e[p+1]|0,l=l+v*e[p]|0,p=p+4|0;t[_+3]=n(u+8192>>14),t[_+2]=n(c+8192>>14),t[_+1]=n(s+8192>>14),t[_]=n(l+8192>>14),_=_+4*o|0}_=4*(g+1)|0,b=(g+1)*i*4|0}}t.exports={convolveHorizontally:o,convolveVertically:r}},{}],3:[function(e,t,i){"use strict";t.exports="AGFzbQEAAAABFAJgBn9/f39/fwBgB39/f39/f38AAg8BA2VudgZtZW1vcnkCAAEDAwIAAQQEAXAAAAcZAghjb252b2x2ZQAACmNvbnZvbHZlSFYAAQkBAArmAwLBAwEQfwJAIANFDQAgBEUNACAFQQRqIRVBACEMQQAhDQNAIA0hDkEAIRFBACEHA0AgB0ECaiESAn8gBSAHQQF0IgdqIgZBAmouAQAiEwRAQQAhCEEAIBNrIRQgFSAHaiEPIAAgDCAGLgEAakECdGohEEEAIQlBACEKQQAhCwNAIBAoAgAiB0EYdiAPLgEAIgZsIAtqIQsgB0H/AXEgBmwgCGohCCAHQRB2Qf8BcSAGbCAKaiEKIAdBCHZB/wFxIAZsIAlqIQkgD0ECaiEPIBBBBGohECAUQQFqIhQNAAsgEiATagwBC0EAIQtBACEKQQAhCUEAIQggEgshByABIA5BAnRqIApBgMAAakEOdSIGQf8BIAZB/wFIG0EQdEGAgPwHcUEAIAZBAEobIAtBgMAAakEOdSIGQf8BIAZB/wFIG0EYdEEAIAZBAEobciAJQYDAAGpBDnUiBkH/ASAGQf8BSBtBCHRBgP4DcUEAIAZBAEobciAIQYDAAGpBDnUiBkH/ASAGQf8BSBtB/wFxQQAgBkEAShtyNgIAIA4gA2ohDiARQQFqIhEgBEcNAAsgDCACaiEMIA1BAWoiDSADRw0ACwsLIQACQEEAIAIgAyAEIAUgABAAIAJBACAEIAUgBiABEAALCw=="},{}],4:[function(e,t,i){"use strict";t.exports={name:"resize",fn:e("./resize"),wasm_fn:e("./resize_wasm"),wasm_src:e("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(e,t,i){"use strict";function n(e,t,i){for(var n=3,o=t*i*4|0;n<o;)e[n]=255,n=n+4|0}var o=e("./resize_filter_gen"),r=e("./convolve").convolveHorizontally,a=e("./convolve").convolveVertically;t.exports=function(e){var t=e.src,i=e.width,l=e.height,s=e.toWidth,c=e.toHeight,u=e.scaleX||e.toWidth/e.width,d=e.scaleY||e.toHeight/e.height,h=e.offsetX||0,f=e.offsetY||0,p=e.dest||new Uint8Array(s*c*4),g=void 0===e.quality?3:e.quality,m=e.alpha||!1,v=o(g,i,s,u,h),b=o(g,l,c,d,f),_=new Uint8Array(s*l*4);return r(t,_,i,l,s,v),a(_,p,l,s,c,b),m||n(p,s,c),p}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(e,t,i){"use strict";function n(e){return Math.round(e*((1<<r)-1))}var o=e("./resize_filter_info"),r=14;t.exports=function(e,t,i,r,a){var l,s,c,u,d,h,f,p,g,m,v,b,_,y,w,C,E,L=o[e].filter,A=1/r,S=Math.min(1,r),x=o[e].win/S,I=Math.floor(2*(x+1)),D=new Int16Array((I+2)*i),T=0,k=!D.subarray||!D.set;for(l=0;l<i;l++){for(s=(l+.5)*A+a,c=Math.max(0,Math.floor(s-x)),u=Math.min(t-1,Math.ceil(s+x)),d=u-c+1,h=new Float32Array(d),f=new Int16Array(d),p=0,g=c,m=0;g<=u;g++,m++)v=L((g+.5-s)*S),p+=v,h[m]=v;for(b=0,m=0;m<h.length;m++)_=h[m]/p,b+=_,f[m]=n(_);for(f[i>>1]+=n(1-b),y=0;y<f.length&&0===f[y];)y++;if(y<f.length){for(w=f.length-1;w>0&&0===f[w];)w--;if(C=c+y,E=w-y+1,D[T++]=C,D[T++]=E,k)for(m=y;m<=w;m++)D[T++]=f[m];else D.set(f.subarray(y,w+1),T),T+=E}else D[T++]=0,D[T++]=0}return D}},{"./resize_filter_info":7}],7:[function(e,t,i){"use strict";t.exports=[{win:.5,filter:function(e){return e>=-.5&&e<.5?1:0}},{win:1,filter:function(e){if(e<=-1||e>=1)return 0;if(e>-1.1920929e-7&&e<1.1920929e-7)return 1;var t=e*Math.PI;return Math.sin(t)/t*(.54+.46*Math.cos(t/1))}},{win:2,filter:function(e){if(e<=-2||e>=2)return 0;if(e>-1.1920929e-7&&e<1.1920929e-7)return 1;var t=e*Math.PI;return Math.sin(t)/t*Math.sin(t/2)/(t/2)}},{win:3,filter:function(e){if(e<=-3||e>=3)return 0;if(e>-1.1920929e-7&&e<1.1920929e-7)return 1;var t=e*Math.PI;return Math.sin(t)/t*Math.sin(t/3)/(t/3)}}]},{}],8:[function(e,t,i){"use strict";function n(e,t,i){for(var n=3,o=t*i*4|0;n<o;)e[n]=255,n=n+4|0}function o(e){return new Uint8Array(e.buffer,0,e.byteLength)}function r(e,t,i){if(l)return void t.set(o(e),i);for(var n=i,r=0;r<e.length;r++){var a=e[r];t[n++]=255&a,t[n++]=a>>8&255}}var a=e("./resize_filter_gen"),l=!0;try{l=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(e){}t.exports=function(e){var t=e.src,i=e.width,o=e.height,l=e.toWidth,s=e.toHeight,c=e.scaleX||e.toWidth/e.width,u=e.scaleY||e.toHeight/e.height,d=e.offsetX||0,h=e.offsetY||0,f=e.dest||new Uint8Array(l*s*4),p=void 0===e.quality?3:e.quality,g=e.alpha||!1,m=a(p,i,l,c,d),v=a(p,o,s,u,h),b=this.__align(0+Math.max(t.byteLength,f.byteLength)),_=this.__align(b+o*l*4),y=this.__align(_+m.byteLength),w=y+v.byteLength,C=this.__instance("resize",w),E=new Uint8Array(this.__memory.buffer),L=new Uint32Array(this.__memory.buffer),A=new Uint32Array(t.buffer);return L.set(A),r(m,E,_),r(v,E,y),(C.exports.convolveHV||C.exports._convolveHV)(_,y,b,i,o,l,s),new Uint32Array(f.buffer).set(new Uint32Array(this.__memory.buffer,0,s*l)),g||n(f,l,s),f}},{"./resize_filter_gen":6}],9:[function(e,t,i){"use strict";function n(e,t){this.create=e,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=t||2e3}n.prototype.acquire=function(){var e,t=this;return 0!==this.available.length?e=this.available.pop():(e=this.create(),e.id=this.lastId++,e.release=function(){return t.release(e)}),this.acquired[e.id]=e,e},n.prototype.release=function(e){var t=this;delete this.acquired[e.id],e.lastUsed=Date.now(),this.available.push(e),0===this.timeoutId&&(this.timeoutId=setTimeout(function(){return t.gc()},100))},n.prototype.gc=function(){var e=this,t=Date.now();this.available=this.available.filter(function(i){return!(t-i.lastUsed>e.idle)||(i.destroy(),!1)}),0!==this.available.length?this.timeoutId=setTimeout(function(){return e.gc()},100):this.timeoutId=0},t.exports=n},{}],10:[function(e,t,i){"use strict";t.exports=function(e,t,i,n,o,r){var a=i/e,l=n/t,s=(2*r+2+1)/o;if(s>.5)return[[i,n]];var c=Math.ceil(Math.log(Math.min(a,l))/Math.log(s));if(c<=1)return[[i,n]];for(var u=[],d=0;d<c;d++){var h=Math.round(Math.pow(Math.pow(e,c-d-1)*Math.pow(i,d+1),1/c)),f=Math.round(Math.pow(Math.pow(t,c-d-1)*Math.pow(n,d+1),1/c));u.push([h,f])}return u}},{}],11:[function(e,t,i){"use strict";function n(e){var t=Math.round(e);return Math.abs(e-t)<r?t:Math.floor(e)}function o(e){var t=Math.round(e);return Math.abs(e-t)<r?t:Math.ceil(e)}var r=1e-5;t.exports=function(e){var t=e.toWidth/e.width,i=e.toHeight/e.height,r=n(e.srcTileSize*t)-2*e.destTileBorder,a=n(e.srcTileSize*i)-2*e.destTileBorder;if(r<1||a<1)throw new Error("Internal error in pica: target tile width/height is too small.");var l,s,c,u,d,h,f,p=[];for(u=0;u<e.toHeight;u+=a)for(c=0;c<e.toWidth;c+=r)l=c-e.destTileBorder,l<0&&(l=0),d=c+r+e.destTileBorder-l,l+d>=e.toWidth&&(d=e.toWidth-l),s=u-e.destTileBorder,s<0&&(s=0),h=u+a+e.destTileBorder-s,s+h>=e.toHeight&&(h=e.toHeight-s),f={toX:l,toY:s,toWidth:d,toHeight:h,toInnerX:c,toInnerY:u,toInnerWidth:r,toInnerHeight:a,offsetX:l/t-n(l/t),offsetY:s/i-n(s/i),scaleX:t,scaleY:i,x:n(l/t),y:n(s/i),width:o(d/t),height:o(h/i)},p.push(f);return p}},{}],12:[function(e,t,i){"use strict";function n(e){return Object.prototype.toString.call(e)}t.exports.isCanvas=function(e){var t=n(e);return"[object HTMLCanvasElement]"===t||"[object Canvas]"===t},t.exports.isImage=function(e){return"[object HTMLImageElement]"===n(e)},t.exports.limiter=function(e){function t(){i<e&&n.length&&(i++,n.shift()())}var i=0,n=[];return function(e){return new Promise(function(o,r){n.push(function(){e().then(function(e){o(e),i--,t()},function(e){r(e),i--,t()})}),t()})}},t.exports.cib_quality_name=function(e){switch(e){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},t.exports.cib_support=function(){return Promise.resolve().then(function(){if("undefined"==typeof createImageBitmap||"undefined"==typeof document)return!1;var e=document.createElement("canvas");return e.width=100,e.height=100,createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then(function(t){var i=10===t.width;return t.close(),e=null,i})}).catch(function(){return!1})}},{}],13:[function(e,t,i){"use strict";t.exports=function(){var t,i=e("./mathlib");onmessage=function(e){var n=e.data.opts;t||(t=new i(e.data.features));var o=t.resizeAndUnsharp(n);postMessage({result:o},[o.buffer])}}},{"./mathlib":1}],14:[function(e,t,i){function n(e){e<.5&&(e=.5);var t=Math.exp(.527076)/e,i=Math.exp(-t),n=Math.exp(-2*t),o=(1-i)*(1-i)/(1+2*t*i-n);return a=o,l=o*(t-1)*i,s=o*(t+1)*i,c=-o*n,u=2*i,d=-n,h=(a+l)/(1-u-d),f=(s+c)/(1-u-d),new Float32Array([a,l,s,c,u,d,h,f])}function o(e,t,i,n,o,r){var a,l,s,c,u,d,h,f,p,g,m,v,b,_;for(p=0;p<r;p++){for(d=p*o,h=p,f=0,a=e[d],u=a*n[6],c=u,m=n[0],v=n[1],b=n[4],_=n[5],g=0;g<o;g++)l=e[d],s=l*m+a*v+c*b+u*_,u=c,c=s,a=l,i[f]=c,f++,d++;for(d--,f--,h+=r*(o-1),a=e[d],u=a*n[7],c=u,l=a,m=n[2],v=n[3],g=o-1;g>=0;g--)s=l*m+a*v+c*b+u*_,u=c,c=s,a=l,l=e[d],t[h]=i[f]+c,d--,f--,h-=r}}function r(e,t,i,r){if(r){var a=new Uint16Array(e.length),l=new Float32Array(Math.max(t,i)),s=n(r);o(e,a,l,s,t,i,r),o(a,e,l,s,i,t,r)}}var a,l,s,c,u,d,h,f;t.exports=r},{}],15:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],16:[function(e,t,i){"use strict";function n(e){if(!(this instanceof n))return new n(e);var t=o({},l,e||{});if(this.options=t,this.__cache={},this.__init_promise=null,this.__modules=t.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}var o=e("object-assign"),r=e("./lib/base64decode"),a=e("./lib/wa_detect"),l={js:!0,wasm:!0};n.prototype.has_wasm=a,n.prototype.use=function(e){return this.__modules[e.name]=e,this.options.wasm&&this.has_wasm()&&e.wasm_fn?this[e.name]=e.wasm_fn:this[e.name]=e.fn,this},n.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var e=this;return this.__init_promise=Promise.all(Object.keys(e.__modules).map(function(t){var i=e.__modules[t];return e.options.wasm&&e.has_wasm()&&i.wasm_fn?e.__wasm[t]?null:WebAssembly.compile(e.__base64decode(i.wasm_src)).then(function(i){e.__wasm[t]=i}):null})).then(function(){return e}),this.__init_promise},n.prototype.__base64decode=r,n.prototype.__reallocate=function(e){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(e/65536)}),this.__memory;var t=this.__memory.buffer.byteLength;return t<e&&this.__memory.grow(Math.ceil((e-t)/65536)),this.__memory},n.prototype.__instance=function(e,t,i){if(t&&this.__reallocate(t),!this.__wasm[e]){var n=this.__modules[e];this.__wasm[e]=new WebAssembly.Module(this.__base64decode(n.wasm_src))}if(!this.__cache[e]){var r={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[e]=new WebAssembly.Instance(this.__wasm[e],{env:o(r,i||{})})}return this.__cache[e]},n.prototype.__align=function(e,t){t=t||8;var i=e%t;return e+(i?t-i:0)},t.exports=n},{"./lib/base64decode":17,"./lib/wa_detect":23,"object-assign":24}],17:[function(e,t,i){"use strict";t.exports=function(e){for(var t=e.replace(/[\r\n=]/g,""),i=t.length,n=new Uint8Array(3*i>>2),o=0,r=0,a=0;a<i;a++)a%4==0&&a&&(n[r++]=o>>16&255,n[r++]=o>>8&255,n[r++]=255&o),o=o<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(t.charAt(a));var l=i%4*6;return 0===l?(n[r++]=o>>16&255,n[r++]=o>>8&255,n[r++]=255&o):18===l?(n[r++]=o>>10&255,n[r++]=o>>2&255):12===l&&(n[r++]=o>>4&255),n}},{}],18:[function(e,t,i){"use strict";t.exports=function(e,t,i){for(var n,o,r,a,l,s=t*i,c=new Uint16Array(s),u=0;u<s;u++)n=e[4*u],o=e[4*u+1],r=e[4*u+2],l=n>=o&&n>=r?n:o>=r&&o>=n?o:r,a=n<=o&&n<=r?n:o<=r&&o<=n?o:r,c[u]=257*(l+a)>>1;return c}},{}],19:[function(e,t,i){"use strict";t.exports={name:"unsharp_mask",fn:e("./unsharp_mask"),wasm_fn:e("./unsharp_mask_wasm"),wasm_src:e("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":20,"./unsharp_mask_wasm":21,"./unsharp_mask_wasm_base64":22}],20:[function(e,t,i){"use strict";var n=e("glur/mono16"),o=e("./hsl_l16");t.exports=function(e,t,i,r,a,l){var s,c,u,d,h,f,p,g,m,v,b,_,y;if(!(0===r||a<.5)){a>2&&(a=2);var w=o(e,t,i),C=new Uint16Array(w);n(C,t,i,a);for(var E=r/100*4096+.5|0,L=257*l|0,A=t*i,S=0;S<A;S++)_=2*(w[S]-C[S]),Math.abs(_)>=L&&(y=4*S,s=e[y],c=e[y+1],u=e[y+2],g=s>=c&&s>=u?s:c>=s&&c>=u?c:u,p=s<=c&&s<=u?s:c<=s&&c<=u?c:u,f=257*(g+p)>>1,p===g?d=h=0:(h=f<=32767?4095*(g-p)/(g+p)|0:4095*(g-p)/(510-g-p)|0,d=s===g?65535*(c-u)/(6*(g-p))|0:c===g?21845+(65535*(u-s)/(6*(g-p))|0):43690+(65535*(s-c)/(6*(g-p))|0)),f+=E*_+2048>>12,f>65535?f=65535:f<0&&(f=0),0===h?s=c=u=f>>8:(v=f<=32767?f*(4096+h)+2048>>12:f+((65535-f)*h+2048>>12),m=2*f-v>>8,v>>=8,b=d+21845&65535,s=b>=43690?m:b>=32767?m+(6*(v-m)*(43690-b)+32768>>16):b>=10922?v:m+(6*(v-m)*b+32768>>16),b=65535&d,c=b>=43690?m:b>=32767?m+(6*(v-m)*(43690-b)+32768>>16):b>=10922?v:m+(6*(v-m)*b+32768>>16),b=d-21845&65535,u=b>=43690?m:b>=32767?m+(6*(v-m)*(43690-b)+32768>>16):b>=10922?v:m+(6*(v-m)*b+32768>>16)),e[y]=s,e[y+1]=c,e[y+2]=u)}}},{"./hsl_l16":18,"glur/mono16":14}],21:[function(e,t,i){"use strict";t.exports=function(e,t,i,n,o,r){if(!(0===n||o<.5)){o>2&&(o=2);var a=t*i,l=4*a,s=2*a,c=2*a,u=4*Math.max(t,i),d=l,h=d+s,f=h+c,p=f+c,g=p+u,m=this.__instance("unsharp_mask",l+s+2*c+u+32,{exp:Math.exp}),v=new Uint32Array(e.buffer);new Uint32Array(this.__memory.buffer).set(v);var b=m.exports.hsl_l16||m.exports._hsl_l16;b(0,d,t,i),b=m.exports.blurMono16||m.exports._blurMono16,b(d,h,f,p,g,t,i,o),b=m.exports.unsharp||m.exports._unsharp,b(0,0,d,h,t,i,n,r),v.set(new Uint32Array(this.__memory.buffer,0,a))}}},{}],22:[function(e,t,i){"use strict";t.exports="AGFzbQEAAAABMQZgAXwBfGACfX8AYAZ/f39/f38AYAh/f39/f39/fQBgBH9/f38AYAh/f39/f39/fwACGQIDZW52A2V4cAAAA2VudgZtZW1vcnkCAAEDBgUBAgMEBQQEAXAAAAdMBRZfX2J1aWxkX2dhdXNzaWFuX2NvZWZzAAEOX19nYXVzczE2X2xpbmUAAgpibHVyTW9ubzE2AAMHaHNsX2wxNgAEB3Vuc2hhcnAABQkBAAqJEAXZAQEGfAJAIAFE24a6Q4Ia+z8gALujIgOaEAAiBCAEoCIGtjgCECABIANEAAAAAAAAAMCiEAAiBbaMOAIUIAFEAAAAAAAA8D8gBKEiAiACoiAEIAMgA6CiRAAAAAAAAPA/oCAFoaMiArY4AgAgASAEIANEAAAAAAAA8L+gIAKioiIHtjgCBCABIAQgA0QAAAAAAADwP6AgAqKiIgO2OAIIIAEgBSACoiIEtow4AgwgASACIAegIAVEAAAAAAAA8D8gBqGgIgKjtjgCGCABIAMgBKEgAqO2OAIcCwu3AwMDfwR9CHwCQCADKgIUIQkgAyoCECEKIAMqAgwhCyADKgIIIQwCQCAEQX9qIgdBAEgiCA0AIAIgAC8BALgiDSADKgIYu6IiDiAJuyIQoiAOIAq7IhGiIA0gAyoCBLsiEqIgAyoCALsiEyANoqCgoCIPtjgCACACQQRqIQIgAEECaiEAIAdFDQAgBCEGA0AgAiAOIBCiIA8iDiARoiANIBKiIBMgAC8BALgiDaKgoKAiD7Y4AgAgAkEEaiECIABBAmohACAGQX9qIgZBAUoNAAsLAkAgCA0AIAEgByAFbEEBdGogAEF+ai8BACIIuCINIAu7IhGiIA0gDLsiEqKgIA0gAyoCHLuiIg4gCrsiE6KgIA4gCbsiFKKgIg8gAkF8aioCALugqzsBACAHRQ0AIAJBeGohAiAAQXxqIQBBACAFQQF0ayEHIAEgBSAEQQF0QXxqbGohBgNAIAghAyAALwEAIQggBiANIBGiIAO4Ig0gEqKgIA8iECAToqAgDiAUoqAiDyACKgIAu6CrOwEAIAYgB2ohBiAAQX5qIQAgAkF8aiECIBAhDiAEQX9qIgRBAUoNAAsLCwvfAgIDfwZ8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIgyaEAAiDSANoCIPtjgCECAEIAxEAAAAAAAAAMCiEAAiDraMOAIUIAREAAAAAAAA8D8gDaEiCyALoiANIAwgDKCiRAAAAAAAAPA/oCAOoaMiC7Y4AgAgBCANIAxEAAAAAAAA8L+gIAuioiIQtjgCBCAEIA0gDEQAAAAAAADwP6AgC6KiIgy2OAIIIAQgDiALoiINtow4AgwgBCALIBCgIA5EAAAAAAAA8D8gD6GgIgujtjgCGCAEIAwgDaEgC6O2OAIcIAYEQCAFQQF0IQogBiEJIAIhCANAIAAgCCADIAQgBSAGEAIgACAKaiEAIAhBAmohCCAJQX9qIgkNAAsLIAVFDQAgBkEBdCEIIAUhAANAIAIgASADIAQgBiAFEAIgAiAIaiECIAFBAmohASAAQX9qIgANAAsLC7wBAQV/IAMgAmwiAwRAQQAgA2shBgNAIAAoAgAiBEEIdiIHQf8BcSECAn8gBEH/AXEiAyAEQRB2IgRB/wFxIgVPBEAgAyIIIAMgAk8NARoLIAQgBCAHIAIgA0kbIAIgBUkbQf8BcQshCAJAIAMgAk0EQCADIAVNDQELIAQgByAEIAMgAk8bIAIgBUsbQf8BcSEDCyAAQQRqIQAgASADIAhqQYECbEEBdjsBACABQQJqIQEgBkEBaiIGDQALCwvTBgEKfwJAIAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6CqIQ0gBSAEbCILBEAgB0GBAmwhDgNAQQAgAi8BACADLwEAayIGQQF0IgdrIAcgBkEASBsgDk8EQCAAQQJqLQAAIQUCfyAALQAAIgYgAEEBai0AACIESSIJRQRAIAYiCCAGIAVPDQEaCyAFIAUgBCAEIAVJGyAGIARLGwshCAJ/IAYgBE0EQCAGIgogBiAFTQ0BGgsgBSAFIAQgBCAFSxsgCRsLIgogCGoiD0GBAmwiEEEBdiERQQAhDAJ/QQAiCSAIIApGDQAaIAggCmsiCUH/H2wgD0H+AyAIayAKayAQQYCABEkbbSEMIAYgCEYEQCAEIAVrQf//A2wgCUEGbG0MAQsgBSAGayAGIARrIAQgCEYiBhtB//8DbCAJQQZsbUHVqgFBqtUCIAYbagshCSARIAcgDWxBgBBqQQx1aiIGQQAgBkEAShsiBkH//wMgBkH//wNIGyEGAkACfwJAIAxB//8DcSIFBEAgBkH//wFKDQEgBUGAIGogBmxBgBBqQQx2DAILIAZBCHYiBiEFIAYhBAwCCyAFIAZB//8Dc2xBgBBqQQx2IAZqCyIFQQh2IQcgBkEBdCAFa0EIdiIGIQQCQCAJQdWqAWpB//8DcSIFQanVAksNACAFQf//AU8EQEGq1QIgBWsgByAGa2xBBmxBgIACakEQdiAGaiEEDAELIAchBCAFQanVAEsNACAFIAcgBmtsQQZsQYCAAmpBEHYgBmohBAsCfyAGIgUgCUH//wNxIghBqdUCSw0AGkGq1QIgCGsgByAGa2xBBmxBgIACakEQdiAGaiAIQf//AU8NABogByIFIAhBqdUASw0AGiAIIAcgBmtsQQZsQYCAAmpBEHYgBmoLIQUgCUGr1QJqQf//A3EiCEGp1QJLDQAgCEH//wFPBEBBqtUCIAhrIAcgBmtsQQZsQYCAAmpBEHYgBmohBgwBCyAIQanVAEsEQCAHIQYMAQsgCCAHIAZrbEEGbEGAgAJqQRB2IAZqIQYLIAEgBDoAACABQQFqIAU6AAAgAUECaiAGOgAACyADQQJqIQMgAkECaiECIABBBGohACABQQRqIQEgC0F/aiILDQALCwsL"},{}],23:[function(e,t,i){"use strict";var n;t.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var e=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),t=new WebAssembly.Module(e);return 0!==new WebAssembly.Instance(t,{}).exports.test(4)&&(n=!0),n}catch(e){}return n}},{}],24:[function(e,t,i){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,l,s=n(e),c=1;c<arguments.length;c++){i=Object(arguments[c]);for(var u in i)r.call(i,u)&&(s[u]=i[u]);if(o){l=o(i);for(var d=0;d<l.length;d++)a.call(i,l[d])&&(s[l[d]]=i[l[d]])}}return s}},{}],25:[function(e,t,i){var n=arguments[3],o=arguments[4],r=arguments[5],a=JSON.stringify;t.exports=function(e,t){function i(e){m[e]=!0;for(var t in o[e][1]){var n=o[e][1][t];m[n]||i(n)}}for(var l,s=Object.keys(r),c=0,u=s.length;c<u;c++){var d=s[c],h=r[d].exports;if(h===e||h&&h.default===e){l=d;break}}if(!l){l=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},c=0,u=s.length;c<u;c++){var d=s[c];f[d]=d}o[l]=["function(require,module,exports){"+e+"(self); }",f]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[l]=l,o[p]=["function(require,module,exports){var f = require("+a(l)+");(f.default ? f.default : f)(self);}",g];var m={};i(p);var v="("+n+")({"+Object.keys(m).map(function(e){return a(e)+":["+o[e][0]+","+a(o[e][1])+"]"}).join(",")+"},{},["+a(p)+"])",b=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return _;var y=b.createObjectURL(_),w=new Worker(y);return w.objectURL=y,w}},{}],"/":[function(e,t,i){"use strict";function n(e,t){return a(e)||r(e,t)||o()}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw r}}return i}function a(e){if(Array.isArray(e))return e}function l(){return{value:u(p),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var e=window.URL||window.webkitURL||window.mozURL||window.msURL;e&&e.revokeObjectURL&&this.value.objectURL&&e.revokeObjectURL(this.value.objectURL)}}}}function s(e){if(!(this instanceof s))return new s(e);this.options=c({},C,e||{});var t="lk_".concat(this.options.concurrency);this.__limit=v[t]||f.limiter(this.options.concurrency),v[t]||(v[t]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}var c=e("object-assign"),u=e("webworkify"),d=e("./lib/mathlib"),h=e("./lib/pool"),f=e("./lib/utils"),p=e("./lib/worker"),g=e("./lib/stepper"),m=e("./lib/tiler"),v={},b=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(b=navigator.userAgent.indexOf("Safari")>=0)}catch(e){}var _=1;"undefined"!=typeof navigator&&(_=Math.min(navigator.hardwareConcurrency||1,4));var y,w,C={tile:1024,concurrency:_,features:["js","wasm","ww"],idle:2e3},E={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0};s.prototype.init=function(){var t=this;if(this.__initPromise)return this.__initPromise;if(!1!==y&&!0!==y&&(y=!1,"undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray))try{new ImageData(new Uint8ClampedArray(400),10,10),y=!0}catch(e){}!1!==w&&!0!==w&&(w=!1,"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?w=!0:this.debug("ImageBitmap does not support .close(), disabled")));var i=this.options.features.slice();if(i.indexOf("all")>=0&&(i=["cib","wasm","js","ww"]),this.__requested_features=i,this.__mathlib=new d(i),i.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{e("webworkify")(function(){}).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));v[n]?this.__workersPool=v[n]:(this.__workersPool=new h(l,this.options.idle),v[n]=this.__workersPool)}catch(e){}var o,r=this.__mathlib.init().then(function(e){c(t.features,e.features)});return o=w?f.cib_support().then(function(e){if(t.features.cib&&i.indexOf("cib")<0)return void t.debug("createImageBitmap() resize supported, but disabled by config");i.indexOf("cib")>=0&&(t.features.cib=e)}):Promise.resolve(!1),this.__initPromise=Promise.all([r,o]).then(function(){return t}),this.__initPromise},s.prototype.resize=function(e,t,i){var o=this;this.debug("Start resize...");var r=c({},E);if(isNaN(i)?i&&(r=c(r,i)):r=c(r,{quality:i}),r.toWidth=t.width,r.toHeight=t.height,r.width=e.naturalWidth||e.width,r.height=e.naturalHeight||e.height,0===t.width||0===t.height)return Promise.reject(new Error("Invalid output size: ".concat(t.width,"x").concat(t.height)));r.unsharpRadius>2&&(r.unsharpRadius=2);var a=!1,l=null;r.cancelToken&&(l=r.cancelToken.then(function(e){throw a=!0,e},function(e){throw a=!0,e}));var s=Math.ceil(Math.max(3,2.5*r.unsharpRadius|0));return this.init().then(function(){if(a)return l;if(o.features.cib){var i=t.getContext("2d",{alpha:Boolean(r.alpha)});return o.debug("Resize via createImageBitmap()"),createImageBitmap(e,{resizeWidth:r.toWidth,resizeHeight:r.toHeight,resizeQuality:f.cib_quality_name(r.quality)}).then(function(e){if(a)return l;if(!r.unsharpAmount)return i.drawImage(e,0,0),e.close(),i=null,o.debug("Finished!"),t;o.debug("Unsharp result");var n=document.createElement("canvas");n.width=r.toWidth,n.height=r.toHeight;var s=n.getContext("2d",{alpha:Boolean(r.alpha)});s.drawImage(e,0,0),e.close();var c=s.getImageData(0,0,r.toWidth,r.toHeight);return o.__mathlib.unsharp_mask(c.data,r.toWidth,r.toHeight,r.unsharpAmount,r.unsharpRadius,r.unsharpThreshold),i.putImageData(c,0,0),c=s=n=i=null,o.debug("Finished!"),t})}var u={},d=function(e){return Promise.resolve().then(function(){return o.features.ww?new Promise(function(t,i){var n=o.__workersPool.acquire();l&&l.catch(function(e){return i(e)}),n.value.onmessage=function(e){n.release(),e.data.err?i(e.data.err):t(e.data.result)},n.value.postMessage({opts:e,features:o.__requested_features,preload:{wasm_nodule:o.__mathlib.__}},[e.src.buffer])}):o.__mathlib.resizeAndUnsharp(e,u)})},h=function(e,t,i){var n,r,c,u=function(t){return o.__limit(function(){if(a)return l;var s;if(f.isCanvas(e))o.debug("Get tile pixel data"),s=n.getImageData(t.x,t.y,t.width,t.height);else{o.debug("Draw tile imageBitmap/image to temporary canvas");var u=document.createElement("canvas");u.width=t.width,u.height=t.height;var h=u.getContext("2d",{alpha:Boolean(i.alpha)});h.globalCompositeOperation="copy",h.drawImage(r||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),o.debug("Get tile pixel data"),s=h.getImageData(0,0,t.width,t.height),h=u=null}var p={src:s.data,width:t.width,height:t.height,toWidth:t.toWidth,toHeight:t.toHeight,scaleX:t.scaleX,scaleY:t.scaleY,offsetX:t.offsetX,offsetY:t.offsetY,quality:i.quality,alpha:i.alpha,unsharpAmount:i.unsharpAmount,unsharpRadius:i.unsharpRadius,unsharpThreshold:i.unsharpThreshold};return o.debug("Invoke resize math"),Promise.resolve().then(function(){return d(p)}).then(function(e){if(a)return l;s=null;var i;if(o.debug("Convert raw rgba tile result to ImageData"),y)i=new ImageData(new Uint8ClampedArray(e),t.toWidth,t.toHeight);else if(i=c.createImageData(t.toWidth,t.toHeight),i.data.set)i.data.set(e);else for(var n=i.data.length-1;n>=0;n--)i.data[n]=e[n];return o.debug("Draw tile"),b?c.putImageData(i,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):c.putImageData(i,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null})})};return Promise.resolve().then(function(){if(c=t.getContext("2d",{alpha:Boolean(i.alpha)}),f.isCanvas(e))return n=e.getContext("2d",{alpha:Boolean(i.alpha)}),null;if(f.isImage(e))return w?(o.debug("Decode image via createImageBitmap"),createImageBitmap(e).then(function(e){r=e})):null;throw new Error('".from" should be image or canvas')}).then(function(){function e(){r&&(r.close(),r=null)}if(a)return l;o.debug("Calculate tiles");var n=m({width:i.width,height:i.height,srcTileSize:o.options.tile,toWidth:i.toWidth,toHeight:i.toHeight,destTileBorder:s}),c=n.map(function(e){return u(e)});return o.debug("Process tiles"),Promise.all(c).then(function(){return o.debug("Finished!"),e(),t},function(t){throw e(),t})})},p=g(r.width,r.height,r.toWidth,r.toHeight,o.options.tile,s);return function e(t,i,o,r){if(a)return l;var s=t.shift(),u=n(s,2),d=u[0],f=u[1],p=0===t.length;r=c({},r,{toWidth:d,toHeight:f,quality:p?r.quality:Math.min(1,r.quality)});var g;return p||(g=document.createElement("canvas"),g.width=d,g.height=f),h(i,p?o:g,r).then(function(){return p?o:(r.width=d,r.height=f,e(t,g,o,r))})}(p,e,t,r)})},s.prototype.resizeBuffer=function(e){var t=this,i=c({},E,e);return this.init().then(function(){return t.__mathlib.resizeAndUnsharp(i)})},s.prototype.toBlob=function(e,t,i){return t=t||"image/png",new Promise(function(n){if(e.toBlob)return void e.toBlob(function(e){return n(e)},t,i);for(var o=atob(e.toDataURL(t,i).split(",")[1]),r=o.length,a=new Uint8Array(r),l=0;l<r;l++)a[l]=o.charCodeAt(l);n(new Blob([a],{type:t}))})},s.prototype.debug=function(){},t.exports=s},{"./lib/mathlib":1,"./lib/pool":9,"./lib/stepper":10,"./lib/tiler":11,"./lib/utils":12,"./lib/worker":13,"object-assign":24,webworkify:25}]},{},[])("/")}),define("WoltLabSuite/Core/Image/Resizer",["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ExifUtil","Pica"],function(e,t,i){"use strict";function n(){}var o=new i({features:["js","wasm","ww"]});return n.prototype={maxWidth:800,maxHeight:600,quality:.8,fileType:"image/jpeg",setMaxWidth:function(e){return null==e&&(e=n.prototype.maxWidth),this.maxWidth=e,this},setMaxHeight:function(e){return null==e&&(e=n.prototype.maxHeight),this.maxHeight=e,this},setQuality:function(e){return null==e&&(e=n.prototype.quality),this.quality=e,this},setFileType:function(e){return null==e&&(e=n.prototype.fileType),this.fileType=e,this},saveFile:function(i,n,r,a){r=r||this.fileType,a=a||this.quality;var l=n.match(/(.+)(\..+?)$/);return o.toBlob(i.image,r,a).then(function(e){return"image/jpeg"===r&&void 0!==i.exif?t.setExifData(e,i.exif):e}).then(function(t){return e.blobToFile(t,l[1])})},loadFile:function(e){var i=void 0,n=Promise.resolve(e);"image/jpeg"===e.type&&(i=t.getExifBytesFromJpeg(e),n=n.then(t.removeExifData.bind(t)));var n=n.then(function(e){return new Promise(function(t,i){var n=new FileReader,o=new Image;n.addEventListener("load",function(){o.src=n.result}),n.addEventListener("error",function(){n.abort(),i(n.error)}),o.addEventListener("error",i),o.addEventListener("load",function(){t(o)}),n.readAsDataURL(e)})});return Promise.all([i,n]).then(function(e){return{exif:e[0],image:e[1]}})},resize:function(e,t,i,n,r,a){t=t||this.maxWidth,i=i||this.maxHeight,n=n||this.quality,r=r||!1;var l=document.createElement("canvas"),s=window.createImageBitmap?createImageBitmap(e).then(function(t){if(t.height!=e.height)throw new Error("Chrome Bug #1069965")}):Promise.resolve(),c=Math.min(t,e.width),u=Math.min(i,e.height);if(e.width<=c&&e.height<=u&&!r)return Promise.resolve(void 0);var d=Math.min(c/e.width,u/e.height);l.width=Math.floor(e.width*d),l.height=Math.floor(e.height*d);var h=1;n>=.8?h=3:n>=.4&&(h=2);var f={quality:h,cancelToken:a,alpha:!0};return s.then(function(){return o.resize(e,l,f)})}},n}),define("WoltLabSuite/Core/Language/Chooser",["Core","Dictionary","Language","Dom/Traverse","Dom/Util","ObjectMap","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a){"use strict";var l=new t,s=!1,c=new r,u=null;return{init:function(e,t,i,n,o,r){if(!l.has(t)){var a=elById(e);if(null===a)throw new Error("Expected a valid container id, cannot find '"+t+"'.");var s=elById(t);null===s&&(s=elCreate("input"),elAttr(s,"type","hidden"),elAttr(s,"id",t),elAttr(s,"name",t),elAttr(s,"value",i),a.appendChild(s)),this._initElement(t,s,i,n,o,r)}},_setup:function(){s||(s=!0,u=this._submit.bind(this))},_initElement:function(e,t,r,s,d,h){var f;"DD"===t.parentNode.nodeName?(f=elCreate("div"),f.className="dropdown",o.prepend(f,t.parentNode)):(f=t.parentNode,f.classList.add("dropdown")),elHide(t);var p=elCreate("a");p.className="dropdownToggle dropdownIndicator boxFlag box24 inputPrefix"+("DD"===t.parentNode.nodeName?" button":""),f.appendChild(p);var g=elCreate("ul");g.className="dropdownMenu",f.appendChild(g);var m,v,b,_,y=function(t){var i=~~elData(t.currentTarget,"language-id"),o=n.childByClass(g,"active");null!==o&&o.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,t.currentTarget)}.bind(this);for(var w in s)if(s.hasOwnProperty(w)){var C=s[w];b=elCreate("li"),b.className="boxFlag",b.addEventListener(WCF_CLICK_EVENT,y),
-elData(b,"language-id",w),void 0!==C.languageCode&&elData(b,"language-code",C.languageCode),g.appendChild(b),m=elCreate("a"),m.className="box24",b.appendChild(m),v=elCreate("img"),elAttr(v,"src",C.iconPath),elAttr(v,"alt",""),v.className="iconFlag",m.appendChild(v),_=elCreate("span"),_.textContent=C.languageName,m.appendChild(_),w==r&&(p.innerHTML=b.firstChild.innerHTML)}if(h)b=elCreate("li"),b.className="dropdownDivider",g.appendChild(b),b=elCreate("li"),elData(b,"language-id",0),b.addEventListener(WCF_CLICK_EVENT,y),g.appendChild(b),m=elCreate("a"),m.textContent=i.get("wcf.global.language.noSelection"),b.appendChild(m),0===r&&(p.innerHTML=b.firstChild.innerHTML),b.addEventListener(WCF_CLICK_EVENT,y);else if(0===r){p.innerHTML=null;var E=elCreate("div");p.appendChild(E),_=elCreate("span"),_.className="icon icon24 fa-question pointer",E.appendChild(_),_=elCreate("span"),_.textContent=i.get("wcf.global.language.noSelection"),E.appendChild(_)}a.init(p),l.set(e,{callback:d,dropdownMenu:g,dropdownToggle:p,element:t});var L=n.parentByTag(t,"FORM");if(null!==L){L.addEventListener("submit",u);var A=c.get(L);void 0===A&&(A=[],c.set(L,A)),A.push(e)}},_select:function(t,i,n){var o=l.get(t);if(void 0===n){for(var r=o.dropdownMenu.childNodes,a=0,s=r.length;a<s;a++){var c=r[a];if(~~elData(c,"language-id")===i){n=c;break}}if(void 0===n)throw new Error("Cannot select unknown language id '"+i+"'")}o.element.value=i,e.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=n.firstChild.innerHTML,l.set(t,o),"function"==typeof o.callback&&o.callback(n)},_submit:function(e){for(var t,i=c.get(e.currentTarget),n=0,o=i.length;n<o;n++)t=elCreate("input"),t.type="hidden",t.name=i[n],t.value=this.getLanguageId(i[n]),e.currentTarget.appendChild(t)},getChooser:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid language chooser input element, '"+e+"' is not i18n input field.");return t},getLanguageId:function(e){return~~this.getChooser(e).element.value},removeChooser:function(e){l.has(e)&&l.delete(e)},setLanguageId:function(e,t){if(void 0===l.get(e))throw new Error("Expected a valid  input element, '"+e+"' is not i18n input field.");this._select(e,t)}}}),define("WoltLabSuite/Core/Language/Input",["Core","Dictionary","Language","ObjectMap","StringUtil","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a,l){"use strict";var s=new t,c=!1,u=new n,d=new t,h=null,f=null;return{init:function(e,i,n,r){if(!d.has(e)){var a=elById(e);if(null===a)throw new Error("Expected a valid element id, cannot find '"+e+"'.");this._setup();var l=new t;for(var s in i)i.hasOwnProperty(s)&&l.set(~~s,o.unescapeHTML(i[s]));d.set(e,l),this._initElement(e,a,l,n,r)}},registerCallback:function(e,t,i){if(!d.has(e))throw new Error("Unknown element id '"+e+"'.");s.get(e).callbacks.set(t,i)},unregister:function(e){if(!d.has(e))throw new Error("Unknown element id '"+e+"'.");d.delete(e),s.delete(e)},_setup:function(){c||(c=!0,h=this._dropdownToggle.bind(this),f=this._submit.bind(this))},_initElement:function(e,n,o,c,d){var p=n.parentNode;if(!p.classList.contains("inputAddon")){p=elCreate("div"),p.className="inputAddon"+("TEXTAREA"===n.nodeName?" inputAddonTextarea":""),elData(p,"input-id",e);var g=document.activeElement===n;n.parentNode.insertBefore(p,n),p.appendChild(n),g&&n.focus()}p.classList.add("dropdown");var m=elCreate("span");m.className="button dropdownToggle inputPrefix";var v=elCreate("span");v.textContent=i.get("wcf.global.button.disabledI18n"),m.appendChild(v),p.insertBefore(m,n);var b=elCreate("ul");b.className="dropdownMenu",a.insertAfter(b,m);var _,y=function(t,i){var n=~~elData(t.currentTarget,"language-id"),o=r.childByClass(b,"active");null!==o&&o.classList.remove("active"),n&&t.currentTarget.classList.add("active"),this._select(e,n,i||!1)}.bind(this);for(var w in c)c.hasOwnProperty(w)&&(_=elCreate("li"),elData(_,"language-id",w),v=elCreate("span"),v.textContent=c[w],_.appendChild(v),_.addEventListener(WCF_CLICK_EVENT,y),b.appendChild(_));!0!==d&&(_=elCreate("li"),_.className="dropdownDivider",b.appendChild(_),_=elCreate("li"),elData(_,"language-id",0),v=elCreate("span"),v.textContent=i.get("wcf.global.button.disabledI18n"),_.appendChild(v),_.addEventListener(WCF_CLICK_EVENT,y),b.appendChild(_));var C=null;if(!0===d||o.size)for(var E=0,L=b.childElementCount;E<L;E++)if(~~elData(b.children[E],"language-id")===LANGUAGE_ID){C=b.children[E];break}l.init(m),l.registerCallback(p.id,h),s.set(e,{buttonLabel:m.children[0],callbacks:new t,element:n,languageId:0,isEnabled:!0,forceSelection:d});var A=r.parentByTag(n,"FORM");if(null!==A){A.addEventListener("submit",f);var S=u.get(A);void 0===S&&(S=[],u.set(A,S)),S.push(e)}null!==C&&y({currentTarget:C},!0)},_select:function(e,i,n){for(var o,r=s.get(e),a=l.getDropdownMenu(r.element.closest(".inputAddon").id),c="",u=0,h=a.childElementCount;u<h;u++){o=a.children[u];var f=elData(o,"language-id");f.length&&i===~~f&&(c=o.children[0].textContent)}if(r.languageId!==i){var p=d.get(e);r.languageId&&p.set(r.languageId,r.element.value),0===i?d.set(e,new t):(r.buttonLabel.classList.contains("active")||!0===n)&&(r.element.value=p.has(i)?p.get(i):""),r.buttonLabel.textContent=c,r.buttonLabel.classList[i?"add":"remove"]("active"),r.languageId=i}n||(r.element.blur(),r.element.focus()),r.callbacks.has("select")&&r.callbacks.get("select")(r.element)},_dropdownToggle:function(e,t){if("open"===t)for(var i,n,o=l.getDropdownMenu(e),r=elData(elById(e),"input-id"),a=s.get(r),c=d.get(r),u=0,h=o.childElementCount;u<h;u++)if(i=o.children[u],n=~~elData(i,"language-id")){var f=!1;a.languageId&&(f=n===a.languageId?""===a.element.value.trim():!c.get(n)),i.classList[f?"add":"remove"]("missingValue")}},_submit:function(e){for(var t,i,n,o,r=u.get(e.currentTarget),a=0,l=r.length;a<l;a++)i=r[a],t=s.get(i),t.isEnabled&&(o=d.get(i),t.callbacks.has("submit")&&t.callbacks.get("submit")(t.element),t.languageId&&o.set(t.languageId,t.element.value),o.size&&(o.forEach(function(t,o){n=elCreate("input"),n.type="hidden",n.name=i+"_i18n["+o+"]",n.value=t,e.currentTarget.appendChild(n)}),t.element.removeAttribute("name")))},getValues:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");var i=d.get(e);return i.set(t.languageId,t.element.value),i},setValues:function(i,n){var o=s.get(i);if(void 0===o)throw new Error("Expected a valid i18n input element, '"+i+"' is not i18n input field.");if(e.isPlainObject(n)&&(n=t.fromObject(n)),o.element.value="",n.has(0))return o.element.value=n.get(0),n.delete(0),d.set(i,n),void this._select(i,0,!0);d.set(i,n),o.languageId=0,this._select(i,LANGUAGE_ID,!0)},disable:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid element, '"+e+"' is not an i18n input field.");if(t.isEnabled){t.isEnabled=!1,elHide(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.remove("inputAddon"),i.classList.remove("dropdown")}},enable:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(!t.isEnabled){t.isEnabled=!0,elShow(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.add("inputAddon"),i.classList.add("dropdown")}},isEnabled:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");return t.isEnabled},validate:function(e,t){var i=s.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;var n=d.get(e),o=l.getDropdownMenu(i.element.parentNode.id);i.languageId&&n.set(i.languageId,i.element.value);for(var r,a,c=!1,u=!1,h=0,f=o.childElementCount;h<f;h++)if(r=o.children[h],a=~~elData(r,"language-id"))if(n.has(a)&&0!==n.get(a).length){if(c)return!1;u=!0}else{if(u)return!1;c=!0}return!c||t}}}),define("WoltLabSuite/Core/Language/Text",["Core","./Input"],function(e,t){"use strict";return{init:function(e,i,n,o){var r=elById(e);if(!r||"TEXTAREA"!==r.nodeName||!r.classList.contains("wysiwygTextarea"))throw new Error('Expected <textarea class="wysiwygTextarea" /> for id \''+e+"'.");t.init(e,i,n,o),t.registerCallback(e,"select",this._callbackSelect.bind(this)),t.registerCallback(e,"submit",this._callbackSubmit.bind(this))},_callbackSelect:function(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)},_callbackSubmit:function(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}}}),define("WoltLabSuite/Core/Media/Upload",["Core","DateUtil","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload","User","WoltLabSuite/Core/FileUtil"],function(e,t,i,n,o,r,a,l,s,c,u){"use strict";var d=function(){};return d.prototype={_createFileElement:function(){},_getParameters:function(){},_success:function(){},_uploadFiles:function(){},_createButton:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){},_upload:function(){}},d}),define("WoltLabSuite/Core/Media/Replace",["Core","Dom/ChangeListener","Dom/Util","Language","Ui/Notification","./Upload"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={_createButton:function(){},_success:function(){},_upload:function(){},_createFileElement:function(){},_getParameters:function(){},_uploadFiles:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){}},a}),define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey","WoltLabSuite/Core/Media/Replace"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={_ajaxSetup:function(){},_ajaxSuccess:function(){},_close:function(){},_keyPress:function(){},_saveData:function(){},_updateLanguageFields:function(){},edit:function(){}},f}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/Util","../Upload"],function(e,t,i){"use strict";var n=function(){};return n.prototype={_createButton:function(){},_success:function(){},_upload:function(){},_createFileElement:function(){},_getParameters:function(){},_uploadFiles:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){}},n}),define("WoltLabSuite/Core/Media/Clipboard",["Ajax","Dom/ChangeListener","EventHandler","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,o,r,a,l,s){"use strict";var c=function(){};return c.prototype={init:function(){},_ajaxSetup:function(){},_ajaxSuccess:function(){},_clipboardAction:function(){},_dialogSetup:function(){},_edit:function(){},_setCategory:function(){}},c}),define("WoltLabSuite/Core/Notification/Handler",["Ajax","Core","EventHandler","StringUtil"],function(e,t,i,n){"use strict";if(!("Promise"in window&&"Notification"in window))return{setup:function(){}};var o=!1,r="",a=0,l=window.TIME_NOW,s=null,c=0;return{setup:function(e){if(e=t.extend({enableNotifications:!1,icon:"",sessionKeepAlive:0},e),r=e.icon,c=60*e.sessionKeepAlive,this._prepareNextRequest(),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this)),window.addEventListener("storage",this._onStorage.bind(this)),this._onVisibilityChange(null),e.enableNotifications)switch(window.Notification.permission){case"granted":o=!0;break;case"default":window.Notification.requestPermission(function(e){"granted"===e&&(o=!0)})}},_onVisibilityChange:function(e){if(null!==e&&!document.hidden){(Date.now()-a)/6e4>4&&(this._resetTimer(),this._dispatchRequest())}a=document.hidden?Date.now():0},_getNextDelay:function(){if(0===a)return 5;var e=~~((Date.now()-a)/6e4);return e<15?5:e<30?10:15},_resetTimer:function(){null!==s&&(window.clearTimeout(s),s=null)},_prepareNextRequest:function(){this._resetTimer();var e=Math.min(this._getNextDelay(),c);s=window.setTimeout(this._dispatchRequest.bind(this),6e4*e)},_dispatchRequest:function(){var t={};i.fire("com.woltlab.wcf.notification","beforePoll",t),t.lastRequestTimestamp=l,e.api(this,{parameters:t})},_onStorage:function(){this._prepareNextRequest();var e,n,o=!1;try{e=window.localStorage.getItem(t.getStoragePrefix()+"notification"),n=window.localStorage.getItem(t.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),n=JSON.parse(n)}catch(e){o=!0}o||i.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:n})},_ajaxSuccess:function(e){var n=!1,o=e.returnValues.keepAliveData,r=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks({returnValues:o});try{window.localStorage.setItem(t.getStoragePrefix()+"notification",JSON.stringify(r)),window.localStorage.setItem(t.getStoragePrefix()+"keepAliveData",JSON.stringify(o))}catch(e){n=!0,window.console.log(e)}n||this._prepareNextRequest(),l=e.returnValues.lastRequestTimestamp,i.fire("com.woltlab.wcf.notification","afterPoll",r),this._showNotification(r)},_showNotification:function(e){if(o&&"object"==typeof e.notification&&"string"==typeof e.notification.message){var t=new window.Notification(e.notification.title,{body:n.unescapeHTML(e.notification.message),icon:r});t.onclick=function(){window.focus(),t.close(),window.location=e.notification.link}}},_ajaxSetup:function(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}}),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["Dictionary","EventHandler","Language"],function(e,t,i){"use strict";var n=function(){};return n.prototype={init:function(){},_dragOver:function(){},_drop:function(){},_dragLeave:function(){},_setup:function(){}},n}),define("WoltLabSuite/Core/Ui/DragAndDrop",["Core","EventHandler","WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(e,t,i){return{register:function(n){var o=e.getUuid();n=e.extend({element:"",elementId:"",onDrop:function(e){},onGlobalDrop:function(e){}}),t.add("com.woltlab.wcf.redactor2","dragAndDrop_"+n.elementId,n.onDrop),t.add("com.woltlab.wcf.redactor2","dragAndDrop_globalDrop_"+n.elementId,n.onGlobalDrop),i.init({uuid:o,$editor:[n.element],$element:[{id:n.elementId}]})}}}),define("WoltLabSuite/Core/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,i){"use strict";function n(e,t){this.init(e,t)}return n.prototype={init:function(e,i){if(this._dropdownMenu=null,this._value="",this._element=elById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],threshold:3},i),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},isActive:function(){return null!==this._dropdownMenu&&i.isOpen(this._element.id)},_keyDown:function(e){if(!this.isActive())return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,n=0,o=this._dropdownMenu.childElementCount;n<o&&(t=this._dropdownMenu.children[n],!t.classList.contains("active"));)n++;if(13===e.keyCode)i.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!i.isOpen(this._element.id))return!0;i.close(this._element.id)}else{var r=0;38===e.keyCode?r=(0===n?o:n)-1:40===e.keyCode&&(r=n+1)===o&&(r=0),r!==n&&(t.classList.remove("active"),this._dropdownMenu.children[r].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode);var i=e.children[0];this._options.callbackSelect(this._element.id,{objectId:elData(i,"object-id"),value:e.textContent,type:elData(i,"type")}),t&&this._element.focus()},_keyUp:function(t){var n=t.currentTarget.value.trim();if(this._value!==n){if(n.length<this._options.threshold)return null!==this._dropdownMenu&&i.close(this._element.id),void(this._value=n);this._value=n,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:n}}})}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=elCreate("div"),this._dropdownMenu.className="dropdownMenu",i.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,n,o,r=0,a=e.returnValues.length;r<a;r++)n=e.returnValues[r],t=elCreate("a"),n.icon?(t.className="box16",t.innerHTML=n.icon+" <span></span>",t.children[1].textContent=n.label):t.textContent=n.label,elData(t,"object-id",n.objectID),n.type&&elData(t,"type",n.type),t.addEventListener(WCF_CLICK_EVENT,this._select.bind(this)),o=elCreate("li"),0===r&&(o.className="active"),o.appendChild(t),this._dropdownMenu.appendChild(o);i.open(this._element.id,!0)}else i.close(this._element.id)}},n}),define("WoltLabSuite/Core/Ui/ItemList",["Core","Dictionary","Language","Dom/Traverse","EventKey","WoltLabSuite/Core/Ui/Suggestion","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a){"use strict";var l="",s=new t,c=!1,u=null,d=null,h=null,f=null,p=null,g=null;return{init:function(t,i,o){var l=elById(t);if(null===l)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(s.has(t)){var c=s.get(t);for(var u in c)if(c.hasOwnProperty(u)){var d=c[u];d instanceof Element&&d.parentNode&&elRemove(d)}a.destroy(t),s.delete(t)}o=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},o);var h=n.parentByTag(l,"FORM");if(null!==h)if(!1===o.isCSV){if(!o.submitFieldName.length&&"function"!=typeof o.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=s.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}var i=this.getValues(t);if(o.submitFieldName.length)for(var n,r=0,a=i.length;r<a;r++)n=elCreate("input"),n.type="hidden",n.name=o.submitFieldName.replace(/{$objectId}/,i[r].objectId),n.value=i[r].value,h.appendChild(n);else o.callbackSubmit(h,i)}.bind(this))}else h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=s.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}}.bind(this));this._setup();var f=this._createUI(l,o),p=new r(t,{ajax:o.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:o.excludedSearchValues});if(s.set(t,{dropdownMenu:null,element:f.element,limitReached:f.limitReached,list:f.list,listItem:f.element.parentNode,options:o,shadow:f.shadow,suggestion:p}),i=o.callbackSetupValues?o.callbackSetupValues():f.values.length?f.values:i,Array.isArray(i))for(var g,m=0,v=i.length;m<v;m++)g=i[m],"string"==typeof g&&(g={objectId:0,value:g}),this._addItem(t,g)},getValues:function(e){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=s.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent.trim(),type:elData(e,"type")})}),i},setValues:function(e,t){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,o,r=s.get(e),a=n.childrenByClass(r.list,"item");for(i=0,o=a.length;i<o;i++)this._removeItem(null,a[i],!0);for(i=0,o=t.length;i<o;i++)this._addItem(e,t[i])},_setup:function(){c||(c=!0,u=this._keyDown.bind(this),d=this._keyPress.bind(this),h=this._keyUp.bind(this),f=this._paste.bind(this),p=this._removeItem.bind(this),g=this._blur.bind(this))},_createUI:function(e,t){var n=elCreate("ol");n.className="inputItemList"+(e.disabled?" disabled":""),elData(n,"element-id",e.id),n.addEventListener(WCF_CLICK_EVENT,function(t){t.target===n&&e.focus()});var o=elCreate("li");o.className="input",n.appendChild(o),e.addEventListener("keydown",u),e.addEventListener("keypress",d),e.addEventListener("keyup",h),e.addEventListener("paste",f);var r=e===document.activeElement;r&&e.blur(),e.addEventListener("blur",g),e.parentNode.insertBefore(n,e),o.appendChild(e),r&&window.setTimeout(function(){e.focus()},1),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var a=elCreate("span");a.className="inputItemListLimitReached",a.textContent=i.get("wcf.global.form.input.maxItems"),elHide(a),o.appendChild(a);var l=null,s=[];if(t.isCSV){l=elCreate("input"),l.className="itemListInputShadow",l.type="hidden",l.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(l,n);for(var c,p=e.value.split(","),m=0,v=p.length;m<v;m++)c=p[m].trim(),c.length&&s.push(c);if("TEXTAREA"===e.nodeName){var b=elCreate("input");b.type="text",e.parentNode.insertBefore(b,e),b.id=e.id,elRemove(e),e=b}}return{element:e,limitReached:a,list:n,shadow:l,values:s}},_acceptsNewItems:function(e){var t=s.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems},_handleLimit:function(e){var t=s.get(e);this._acceptsNewItems(e)?(elShow(t.element),elHide(t.limitReached)):(elHide(t.element),elShow(t.limitReached))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;l=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(o.Enter(e)||o.Comma(e)){if(e.preventDefault(),s.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_paste:function(e){var t="";t="object"==typeof window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData.getData("text/plain");var i=e.currentTarget,n=i.id,o=~~elAttr(i,"maxLength");t.split(/,/).forEach(function(e){e=e.trim(),o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&this._acceptsNewItems(n)&&this._addItem(n,{objectId:0,value:e})}.bind(this)),e.preventDefault()},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=s.get(e),n=elCreate("li");n.className="item";var o=elCreate("span");if(o.className="content",elData(o,"object-id",t.objectId),t.type&&elData(o,"type",t.type),o.textContent=t.value,n.appendChild(o),!i.element.disabled){var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener(WCF_CLICK_EVENT,p),n.appendChild(r)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||this._handleLimit(e);var a=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===a&&(a=this.getValues(e)),i.options.callbackChange(e,a))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,o=elData(n,"element-id"),r=s.get(o);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),i||r.element.focus(),this._handleLimit(o);var a=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===a&&(a=this.getValues(o)),r.options.callbackChange(o,a))},_syncShadow:function(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);for(var t="",i=this.getValues(e.element.id),n=0,o=i.length;n<o;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i},_blur:function(e){var t=e.currentTarget,i=s.get(t.id);if(!i.options.restricted){var n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||this._addItem(t.id,{objectId:0,value:n}))}}}}),define("WoltLabSuite/Core/Ui/Page/JumpTo",["Language","ObjectMap","Ui/Dialog"],function(e,t,i){"use strict";var n=null,o=null,r=null,a=new t,l=null;return{init:function(e,t){if(null===(t=t||null)){var i=elData(e,"link");t=i?function(e){window.location=i.replace(/pageNo=%d/,"pageNo="+e)}:function(){}}else if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.");a.has(e)||elBySelAll(".jumpTo",e,function(i){i.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,e)),a.set(e,{callback:t})}.bind(this))},_click:function(t,o){n=t,"object"==typeof o&&o.preventDefault(),i.open(this);var a=elData(t,"pages");l.value=a,l.setAttribute("max",a),l.select(),r.textContent=e.get("wcf.page.jumpTo.description").replace(/#pages#/,a)},_keyUp:function(e){if(13===e.which&&!1===o.disabled)return void this._submit();var t=~~l.value;t<1||t>~~elAttr(l,"max")?o.disabled=!0:o.disabled=!1},_submit:function(e){a.get(n).callback(~~l.value),i.close(this)},_dialogSetup:function(){var t='<dl><dt><label for="jsPaginationPageNo">'+e.get("wcf.page.jumpTo")+'</label></dt><dd><input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny"><small></small></dd></dl><div class="formSubmit"><button class="buttonPrimary">'+e.get("wcf.global.button.submit")+"</button></div>";return{id:"paginationOverlay",options:{onSetup:function(e){l=elByTag("input",e)[0],l.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],o=elByTag("button",e)[0],o.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}}}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,i,n,o){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,i){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},i),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var i,n=elCreate("ul"),r=elCreate("li");r.className="skip",n.appendChild(r);var a="icon icon24 fa-chevron-left";this._options.activePage>1?(i=elCreate("a"),i.className=a+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.previous"),i.rel="prev",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='<span class="'+a+'"></span>',r.classList.add("disabled")),n.appendChild(this._createLink(1));var l=this.SHOW_LINKS-4,s=this._options.activePage-2;s<0&&(s=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePage<this._options.maxPage&&l--;var u=l/2,d=this._options.activePage,h=this._options.activePage;d<1&&(d=1),h<1&&(h=1),h>this._options.maxPage-1&&(h=this._options.maxPage-1),s>=u?d-=u:(d-=s,h+=u-s),c>=u?h+=u:(h+=c,d-=u-c),h=Math.ceil(h),d=Math.ceil(d),d<1&&(d=1),h>this._options.maxPage&&(h=this._options.maxPage);var f='<a class="jsTooltip" title="'+t.get("wcf.page.jumpTo")+'">&hellip;</a>';d>1&&(d-1<2?n.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0));for(var p=d+1;p<h;p++)n.appendChild(this._createLink(p));h<this._options.maxPage&&(this._options.maxPage-h<2?n.appendChild(this._createLink(this._options.maxPage-1)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0)),n.appendChild(this._createLink(this._options.maxPage)),r=elCreate("li"),r.className="skip",n.appendChild(r),a="icon icon24 fa-chevron-right",this._options.activePage<this._options.maxPage?(i=elCreate("a"),i.className=a+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.next"),i.rel="next",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage+1))):(r.innerHTML='<span class="'+a+'"></span>',r.classList.add("disabled")),e&&(elData(n,"pages",this._options.maxPage),o.init(n,this.switchPage.bind(this))),this._element.appendChild(n)},_createLink:function(e){var i=elCreate("li");if(e!==this._options.activePage){var o=elCreate("a");o.textContent=n.addThousandsSeparator(e),o.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),i.appendChild(o)}else i.classList.add("active"),i.innerHTML="<span>"+n.addThousandsSeparator(e)+'</span><span class="invisible">'+t.get("wcf.page.pagePosition",{pageNo:e,pages:this._options.maxPage})+"</span>";return i},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(t,i){if("object"==typeof i&&(i.preventDefault(),i.currentTarget&&elData(i.currentTarget,"tooltip"))){var n=elById("balloonTooltip");n&&(e.triggerEvent(i.currentTarget,"mouseleave"),n.style.removeProperty("top"),n.style.removeProperty("bottom"))}if((t=~~t)>0&&this._options.activePage!==t&&t<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&!0!==this._options.callbackShouldSwitch(t))return;this._options.activePage=t,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(t)}}},r}),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["https://connect.facebook.net/en_US/sdk.js"],function(e){"use strict";return FB.init({version:"v7.0"}),FB}),define("WoltLabSuite/Core/Controller/Media/List",["Dom/ChangeListener","EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={init:function(){},_addButtonEventListeners:function(){},_deleteCallback:function(){},_deleteMedia:function(e){},_edit:function(){}},a}),define("WoltLabSuite/Core/Controller/Notice/Dismiss",["Ajax"],function(e){"use strict";return{setup:function(){var e=elByClass("jsDismissNoticeButton");if(e.length)for(var t=this._click.bind(this),i=0,n=e.length;i<n;i++)e[i].addEventListener(WCF_CLICK_EVENT,t)},_click:function(t){var i=t.currentTarget;e.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[elData(i,"object-id")]},success:function(){elRemove(i.parentNode)}})}}}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["Dictionary","Dom/ChangeListener","EventHandler","List","Dom/Traverse","Dom/Util","ObjectMap"],function(e,t,i,n,o,r,a){"use strict";var l=!1,s=!0,c=new n,u=new e,d=new n,h=new e,f=new a;return{_hide:function(t){elHide(t),c.add(t),t.classList.contains("tabMenuContent")&&elBySelAll("li",o.prevByClass(t,"tabMenu"),function(e){elData(e,"name")===elData(t,"name")&&elHide(e)}),elBySelAll("[max], [maxlength], [min], [required]",t,function(t){var i=new e,n=elAttr(t,"max");n&&(i.set("max",n),t.removeAttribute("max"));var o=elAttr(t,"maxlength");o&&(i.set("maxlength",o),t.removeAttribute("maxlength"));var r=elAttr(t,"min");r&&(i.set("min",r),t.removeAttribute("min")),t.required&&(i.set("required",!0),t.removeAttribute("required")),f.set(t,i)})},_show:function(e){elShow(e),c.delete(e),e.classList.contains("tabMenuContent")&&elBySelAll("li",o.prevByClass(e,"tabMenu"),function(t){elData(t,"name")===elData(e,"name")&&elShow(t)}),
-elBySelAll("input, select",e,function(t){for(var i=t.parentNode;i!==e&&"none"!==i.style.getPropertyValue("display");)i=i.parentNode;if(i===e&&f.has(t)){var n=f.get(t);n.has("max")&&elAttr(t,"max",n.get("max")),n.has("maxlength")&&elAttr(t,"maxlength",n.get("maxlength")),n.has("min")&&elAttr(t,"min",n.get("min")),n.has("required")&&elAttr(t,"required",""),f.delete(t)}})},addDependency:function(e){var t=e.getDependentNode();h.has(t.id)?h.get(t.id).push(e):h.set(t.id,[e]);for(var i=e.getFields(),n=0,o=i.length;n<o;n++){var a=i[n],l=r.identify(a);u.has(l)||(u.set(l,a),"INPUT"!==a.tagName||"checkbox"!==a.type&&"radio"!==a.type&&"hidden"!==a.type?a.addEventListener("input",this.checkDependencies.bind(this)):a.addEventListener("change",this.checkDependencies.bind(this)))}},checkDependencies:function(){var e=[];h.forEach(function(t,i){var n=elById(i);if(null===n)return void e.push(n);for(var o=0,r=t.length;o<r;o++)if(!t[o].checkDependency())return void this._hide(n);this._show(n)}.bind(this));for(var t=0,i=e.length;t<i;t++)h.delete(e.id);this.checkContainers()},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)},checkContainers:function(){if(!0===l)return void(s=!0);l=!0,s=!1,i.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),l=!1,s&&this.checkContainers()},isHiddenByDependencies:function(e){if(c.has(e))return!0;var t=!1;return c.forEach(function(i){r.contains(i,e)&&(t=!0)}),t},register:function(e){var t=elById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(d.has(t))throw new Error("Form with id '"+e+"' has already been registered.");d.add(t)},unregister:function(e){var t=elById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!d.has(t))throw new Error("Form with id '"+e+"' has not been registered.");d.delete(t),c.forEach(function(e){t.contains(e)&&c.delete(e)}),h.forEach(function(e,i){t.contains(elById(i))&&h.delete(i);for(var n=0,o=e.length;n<o;n++)for(var r=e[n].getFields(),a=0,l=r.length;a<l;a++){var s=r[a];u.delete(s.id),f.delete(s)}})}}}),define("WoltLabSuite/Core/Form/Builder/Field/Field",[],function(){"use strict";function e(e){this.init(e)}return e.prototype={init:function(e){this._fieldId=e,this._readField()},_getData:function(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")},_readField:function(){if(this._field=elById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")},destroy:function(){},getData:function(){return Promise.resolve(this._getData())},getId:function(){return this._fieldId}},e}),define("WoltLabSuite/Core/Form/Builder/Manager",["Core","Dictionary","EventHandler","./Field/Dependency/Manager","./Field/Field"],function(e,t,i,n,o){"use strict";var r=new t,a=new t;return{getData:function(t){if(!this.hasForm(t))throw new Error("Unknown form with id '"+t+"'.");var i=[];return r.get(t).forEach(function(e){var t=e.getData();if(!(t instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");i.push(t)}),Promise.all(i).then(function(t){for(var i={},n=0,o=t.length;n<o;n++)i=e.extend(i,t[n]);return i})},getField:function(e,t){if(!this.hasField(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return r.get(e).get(t)},getForm:function(e){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");return a.get(e)},hasField:function(e,t){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");return r.get(e).has(t)},hasForm:function(e){return a.has(e)},registerField:function(e,t){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof o))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");var i=t.getId();if(this.hasField(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");r.get(e).set(i,t)},registerForm:function(e){if(this.hasForm(e))throw new Error("Form with id '"+e+"' has already been registered.");var n=elById(e);if(null===n)throw new Error("Unknown form with id '"+e+"'.");a.set(e,n),r.set(e,new t),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},unregisterForm:function(e){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");i.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),a.delete(e),r.get(e).forEach(function(e){e.destroy()}),r.delete(e),n.unregister(e),i.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}}}),define("WoltLabSuite/Core/Form/Builder/Dialog",["Ajax","Core","./Manager","Ui/Dialog"],function(e,t,i,n){"use strict";function o(e,t,i,n){this.init(e,t,i,n)}return o.prototype={init:function(e,i,n,o){this._dialogId=e,this._className=i,this._actionName=n,this._options=t.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:this._className.match(/\w+\\data\\/)},o),this._options.dialog=t.extend(this._options.dialog||{},{onClose:this._dialogOnClose.bind(this)}),this._formId="",this._dialogContent=""},_ajaxSetup:function(){var e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+SECURITY_TOKEN,e.withCredentials=!0),e},_ajaxSuccess:function(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");if(void 0===e.returnValues.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.returnValues.formId)throw new Error("Missing form id in return data.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&e.returnValues.formId&&e.returnValues.dialog){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+"'.")}},_closeDialog:function(){n.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()},_dialogOnClose:function(){this._options.destroyOnClose&&this.destroy()},_dialogSetup:function(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}},_dialogSubmit:function(){this.getData().then(this._submitForm.bind(this))},_openDialogContent:function(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;var i=n.open(this,this._dialogContent),o=elBySel("button[data-type=cancel]",i.content);null===o||elDataBool(o,"has-event-listener")||(o.addEventListener("click",this._closeDialog.bind(this)),elData(o,"has-event-listener",1))},_submitForm:function(t){var i=elBySel("button[data-type=submit]",n.getDialog(this).content);"function"==typeof this._options.onSubmit?this._options.onSubmit(t,i):"string"==typeof this._options.submitActionName&&(i.disabled=!0,e.api(this,{actionName:this._options.submitActionName,parameters:{data:t,formId:this._formId}}))},destroy:function(e){""!==this._formId&&(i.hasForm(this._formId)&&i.unregisterForm(this._formId),!0!==e&&n.destroy(this))},getData:function(){if(""===this._formId)throw new Error("Form has not been requested yet.");return i.getData(this._formId)},open:function(){n.getDialog(this._dialogId)?n.openStatic(this._dialogId):e.api(this)}},o}),define("WoltLabSuite/Core/Media/Manager/Search",["Ajax","Core","Dom/Traverse","Dom/Util","EventKey","Language","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a){"use strict";var l=function(){};return l.prototype={_ajaxSetup:function(){},_ajaxSuccess:function(){},_cancelSearch:function(){},_keyPress:function(){},_search:function(){},hideSearch:function(){},resetSearch:function(){},showSearch:function(){}},l}),define("WoltLabSuite/Core/Media/Manager/Base",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","List","Permission","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/Upload","WoltLabSuite/Core/Media/Manager/Search","StringUtil","WoltLabSuite/Core/Ui/Pagination","WoltLabSuite/Core/Media/Clipboard"],function(e,t,i,n,o,r,a,l,s,c,u,d,h,f,p,g,m,v){"use strict";var b=function(){};return b.prototype={_addButtonEventListeners:function(){},_click:function(){},_dialogClose:function(){},_dialogInit:function(){},_dialogSetup:function(){},_dialogShow:function(){},_editMedia:function(){},_editorClose:function(){},_editorSuccess:function(){},_removeClipboardCheckboxes:function(){},_setMedia:function(){},addMedia:function(){},clipboardDeleteMedia:function(){},getDialog:function(){},getMode:function(){},getOption:function(){},removeMedia:function(){},resetMedia:function(){},setMedia:function(){},setupMediaElement:function(){}},b}),define("WoltLabSuite/Core/Media/Manager/Editor",["Core","Dictionary","Dom/Traverse","EventHandler","Language","Permission","Ui/Dialog","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,o,r,a,l,s){"use strict";var c=function(){};return c.prototype={_addButtonEventListeners:function(){},_buildInsertDialog:function(){},_click:function(){},_getInsertDialogId:function(){},_getThumbnailSizes:function(){},_insertMedia:function(){},_insertMediaGallery:function(){},_insertMediaItem:function(){},_openInsertDialog:function(){},insertMedia:function(){},getMode:function(){},setupMediaElement:function(){},_dialogClose:function(){},_dialogInit:function(){},_dialogSetup:function(){},_dialogShow:function(){},_editMedia:function(){},_editorClose:function(){},_editorSuccess:function(){},_removeClipboardCheckboxes:function(){},_setMedia:function(){},addMedia:function(){},clipboardInsertMedia:function(){},getDialog:function(){},getOption:function(){},removeMedia:function(){},resetMedia:function(){},setMedia:function(){}},c}),define("WoltLabSuite/Core/Media/Manager/Select",["Core","Dom/Traverse","Dom/Util","Language","ObjectMap","Ui/Dialog","WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,o,r,a,l){"use strict";var s=function(){};return s.prototype={_addButtonEventListeners:function(){},_chooseMedia:function(){},_click:function(){},getMode:function(){},setupMediaElement:function(){},_removeMedia:function(){},_clipboardAction:function(){},_dialogClose:function(){},_dialogInit:function(){},_dialogSetup:function(){},_dialogShow:function(){},_editMedia:function(){},_editorClose:function(){},_editorSuccess:function(){},_removeClipboardCheckboxes:function(){},_setMedia:function(){},addMedia:function(){},getDialog:function(){},getOption:function(){},removeMedia:function(){},resetMedia:function(){},setMedia:function(){}},s}),define("WoltLabSuite/Core/Ui/Search/Input",["Ajax","Core","EventKey","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,o){"use strict";function r(e,t){this.init(e,t)}return r.prototype={init:function(e,i){if(this._element=e,!(this._element instanceof Element))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"].');this._activeItem=null,this._dropdownContainerId="",this._lastValue="",this._list=null,this._request=null,this._timerDelay=null,this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:null,callbackSelect:null,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1},i),elAttr(this._element,"autocomplete","off"),this._element.addEventListener("keydown",this._keydown.bind(this)),this._element.addEventListener("keyup",this._keyup.bind(this))},addExcludedSearchValues:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedSearchValues:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keydown:function(e){(null!==this._activeItem&&o.isOpen(this._dropdownContainerId)||this._options.preventSubmit)&&i.Enter(e)&&e.preventDefault(),(i.ArrowUp(e)||i.ArrowDown(e)||i.Escape(e))&&e.preventDefault()},_keyup:function(e){if(null!==this._activeItem||!this._options.autoFocus)if(o.isOpen(this._dropdownContainerId)){if(i.ArrowUp(e))return e.preventDefault(),this._keyboardPreviousItem();if(i.ArrowDown(e))return e.preventDefault(),this._keyboardNextItem();if(i.Enter(e))return e.preventDefault(),this._keyboardSelectItem()}else this._activeItem=null;if(i.Escape(e))return void o.close(this._dropdownContainerId);var t=this._element.value.trim();if(this._lastValue!==t){if(this._lastValue=t,t.length<this._options.minLength)return void(this._dropdownContainerId&&(o.close(this._dropdownContainerId),this._activeItem=null));this._options.delay?(null!==this._timerDelay&&window.clearTimeout(this._timerDelay),this._timerDelay=window.setTimeout(function(){this._search(t)}.bind(this),this._options.delay)):this._search(t)}},_search:function(t){this._request&&this._request.abortPrevious(),this._request=e.api(this,this._getParameters(t))},_getParameters:function(e){return{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:e}}}},_keyboardNextItem:function(){var e;null!==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:function(){var e;null!==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:function(){this._selectItem(this._activeItem)},_clickSelectItem:function(e){this._selectItem(e.currentTarget)},_selectItem:function(e){this._options.callbackSelect&&!1===this._options.callbackSelect(e)?this._element.value="":this._element.value=elData(e,"label"),this._activeItem=null,o.close(this._dropdownContainerId)},_ajaxSuccess:function(e){var t=!1;if(null===this._list?(this._list=elCreate("ul"),this._list.className="dropdownMenu",t=!0,"function"==typeof this._options.callbackDropdownInit&&this._options.callbackDropdownInit(this._list)):this._list.innerHTML="","object"==typeof e.returnValues){var i,r=this._clickSelectItem.bind(this);for(var a in e.returnValues)e.returnValues.hasOwnProperty(a)&&(i=this._createListItem(e.returnValues[a]),i.addEventListener(WCF_CLICK_EVENT,r),this._list.appendChild(i))}t&&(n.insertAfter(this._list,this._element),o.initFragment(this._element.parentNode,this._list),this._dropdownContainerId=n.identify(this._element.parentNode)),this._dropdownContainerId&&(this._activeItem=null,this._list.childElementCount||!1!==this._handleEmptyResult()?(o.open(this._dropdownContainerId,!0),this._options.autoFocus&&this._list.childElementCount&&~~elData(this._list.children[0],"object-id")&&(this._activeItem=this._list.children[0],this._activeItem.classList.add("active"))):o.close(this._dropdownContainerId))},_handleEmptyResult:function(){if(!this._options.noResultPlaceholder)return!1;var e=elCreate("li");e.className="dropdownText";var t=elCreate("span");return t.textContent=this._options.noResultPlaceholder,e.appendChild(t),this._list.appendChild(e),!0},_createListItem:function(e){var t=elCreate("li");elData(t,"object-id",e.objectID),elData(t,"label",e.label);var i=elCreate("span");return i.textContent=e.label,t.appendChild(i),t},_ajaxSetup:function(){return{data:this._options.ajax}}},r}),define("WoltLabSuite/Core/Ui/User/Search/Input",["Core","WoltLabSuite/Core/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){var o=e.isPlainObject(n)&&!0===n.includeUserGroups;n=e.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:o?1:0}}}},n),i._super.prototype.init.call(this,t,n)},_createListItem:function(e){var t=i._super.prototype._createListItem.call(this,e);elData(t,"type",e.type);var n=elCreate("div");return n.className="box16",n.innerHTML="group"===e.type?'<span class="icon icon16 fa-users"></span>':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}),i}),define("WoltLabSuite/Core/Ui/Acl/Simple",["Language","StringUtil","Dom/ChangeListener","WoltLabSuite/Core/Ui/User/Search/Input"],function(e,t,i,n){"use strict";var o=function(){};return o.prototype={init:function(){},_build:function(){},_select:function(){},_removeItem:function(){}},o}),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["Ajax"],function(e){"use strict";return{init:function(){elBySelAll(".markAllAsReadButton",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this))},_click:function(t){t.preventDefault(),e.api(this)},_ajaxSuccess:function(){var e=elBySel(".mainMenu .active .badge");e&&elRemove(e),elBySelAll(".articleList .newMessageBadge",void 0,elRemove)},_ajaxSetup:function(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}}),define("WoltLabSuite/Core/Ui/Article/Search",["Ajax","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={open:function(){},_search:function(){},_click:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},_dialogSetup:function(){}},a}),define("WoltLabSuite/Core/Ui/Color/Picker",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}var i=function(e,t){if("object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker)return(i=function(e,t){var i=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&i.setCallbackSubmit(t.callbackSubmit),i})(e,t);0===n.length&&(window.__wcf_bc_colorPickerInit=function(){n.forEach(function(e){i(e[0],e[1])}),window.__wcf_bc_colorPickerInit=void 0,n=[]}),n.push([e,t])},n=[];return t.prototype={init:function(t,n){if(!(t instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");this._options=e.extend({callbackSubmit:null},n),i(t,this._options)}},t.fromSelector=function(e){elBySelAll(e,void 0,function(e){new t(e)})},t}),define("WoltLabSuite/Core/Ui/Comment/Add",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},_submitGuestDialog:function(){},_submit:function(){},_getParameters:function(){},_validate:function(){},throwError:function(){},_showLoadingOverlay:function(){},_hideLoadingOverlay:function(){},_reset:function(){},_handleError:function(){},_getEditor:function(){},_insertMessage:function(){},_ajaxSuccess:function(){},_ajaxFailure:function(){},_ajaxSetup:function(){},_cancelGuestDialog:function(){}},f}),define("WoltLabSuite/Core/Ui/Comment/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},rebuild:function(){},_click:function(){},_prepare:function(){},_showEditor:function(){},_restoreMessage:function(){},_save:function(){},_validate:function(){},throwError:function(){},_showMessage:function(){},_hideEditor:function(){},_restoreEditor:function(){},_destroyEditor:function(){},_getEditorId:function(){},_getObjectId:function(){},_ajaxFailure:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){}},f}),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["Core","Ui/SimpleDropdown"],function(e,t){"use strict";function i(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 n(t){var i=elCreate("li");if("divider"===t)return i.className="dropdownDivider",i;"string"==typeof t.identifier&&elData(i,"identifier",t.identifier);var n=elCreate("a");if(n.href="string"==typeof t.href?t.href:"#","function"==typeof t.callback)n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),t.callback(n)});else if("#"===n.getAttribute("href"))throw new Error("Expected either a `href` value or a `callback`.");if(t.hasOwnProperty("attributes")&&e.isPlainObject(t.attributes))for(var r in t.attributes)t.attributes.hasOwnProperty(r)&&elData(n,r,t.attributes[r]);if(i.appendChild(n),void 0!==t.icon&&e.isPlainObject(t.icon)){if("string"!=typeof t.icon.name)throw new TypeError("Expected a valid icon name.");var a=16;"number"==typeof t.icon.size&&-1!==o.indexOf(~~t.icon.size)&&(a=~~t.icon.size);var l=elCreate("span");l.className="icon icon"+a+" fa-"+t.icon.name,n.appendChild(l)}var s="string"==typeof t.label?t.label.trim():"",c="string"==typeof t.labelHtml?t.labelHtml.trim():"";if(""===s&&""===c)throw new TypeError("Expected either a label or a `labelHtml`.");var u=elCreate("span");return u[s?"textContent":"innerHTML"]=s||c,n.appendChild(document.createTextNode(" ")),n.appendChild(u),i}var o=[16,24,32,48,64,96,144];return{create:function(e,t){var i=elCreate("ul");return i.className="dropdownMenu","string"==typeof t&&elData(i,"identifier",t),Array.isArray(e)&&e.length>0&&this.appendItems(i,e),i},buildItem:function(e){return n(e)},appendItem:function(e,t){i(e),e.appendChild(n(t))},appendItems:function(e,t){if(i(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");var o=t.length;if(0===o)throw new Error("Expected a non-empty list of items.");if(1===o)this.appendItem(e,t[0]);else{for(var r=document.createDocumentFragment(),a=0;a<o;a++)r.appendChild(n(t[a]));e.appendChild(r)}},setItems:function(e,t){i(e),e.innerHTML="",this.appendItems(e,t)},attach:function(e,n){i(e),t.initFragment(n,e),n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),e.stopPropagation(),t.toggleDropdown(n.id)})},divider:function(){return"divider"}}}),define("WoltLabSuite/Core/Ui/File/Delete",["Ajax","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse","Dictionary"],function(e,t,i,n,o,r,a){"use strict";function l(e,t,i,n){if(this._isSingleImagePreview=i,this._uploadHandler=n,this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(t),null===t)throw new Error("Element id '"+t+"' is unknown.");if(this._containers=new a,this._internalId=elData(this._target,"internal-id"),!this._internalId)throw new Error("InternalId is unknown.");this.rebuild()}return l.prototype={_createButtons:function(){for(var e,t,n,o=elBySelAll("li.uploadedFile",this._target),r=!1,a=0,l=o.length;a<l;a++)e=o[a],n=elData(e,"unique-file-id"),this._containers.has(n)||(t={uniqueFileId:n,element:e},this._containers.set(n,t),this._initDeleteButton(e,t),r=!0);r&&i.trigger()},_initDeleteButton:function(e,t){var i=elBySel(".buttonGroup",e);if(null===i)throw new Error("Button group in '"+targetId+"' is unknown.");var o=elCreate("li"),r=elCreate("span");r.classList="button jsDeleteButton small",r.textContent=n.get("wcf.global.button.delete"),o.appendChild(r),i.appendChild(o),o.addEventListener(WCF_CLICK_EVENT,this._delete.bind(this,t.uniqueFileId))},_delete:function(t){e.api(this,{uniqueFileId:t,internalId:this._internalId})},rebuild:function(){if(this._isSingleImagePreview){var e=elBySel("img",this._target);if(null!==e){var t=elData(e,"unique-file-id");if(!this._containers.has(t)){var i={uniqueFileId:t,element:e};this._containers.set(t,i),this._deleteButton=elCreate("p"),this._deleteButton.className="button deleteButton";var o=elCreate("span");o.textContent=n.get("wcf.global.button.delete"),this._deleteButton.appendChild(o),this._buttonContainer.appendChild(this._deleteButton),this._deleteButton.addEventListener(WCF_CLICK_EVENT,this._delete.bind(this,i.uniqueFileId))}}}else this._createButtons()},_ajaxSuccess:function(e){elRemove(this._containers.get(e.uniqueFileId).element),this._isSingleImagePreview&&(elRemove(this._deleteButton),this._deleteButton=null),this._uploadHandler.checkMaxFiles(),t.triggerEvent(this._target,"change")},_ajaxSetup:function(){return{url:"index.php?ajax-file-delete/&t="+SECURITY_TOKEN}}},l}),define("WoltLabSuite/Core/Ui/File/Upload",["Core","Language","Dom/Util","WoltLabSuite/Core/Ui/File/Delete","Upload"],function(e,t,i,n,o){"use strict";function r(t,i,o){if(o=o||{},void 0===o.internalId)throw new Error("Missing internal id.");if(this._options=e.extend({name:"__files[]",singleFileRequests:!1,url:"index.php?ajax-file-upload/&t="+SECURITY_TOKEN,imagePreview:!1,maxFiles:null,acceptableFiles:null},o),this._options.multiple=null===this._options.maxFiles||this._options.maxFiles>1,0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),this._buttonContainer=elById(t),null===this._buttonContainer)throw new Error("Element id '"+t+"' is unknown.");if(this._target=elById(i),null===i)throw new Error("Element id '"+i+"' is unknown.");if(o.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._fileElements=[],this._internalFileId=0,this._multiFileUploadIds=[],this._createButton(),this.checkMaxFiles(),this._deleteHandler=new n(t,i,this._options.imagePreview,this)}return e.inherit(r,o,{_createFileElement:function(e){var t=r._super.prototype._createFileElement.call(this,e);t.classList.add("box64","uploadedFile");var i=elBySel("progress",t),n=elCreate("span");n.className="icon icon64 fa-spinner";var o=t.textContent;t.textContent="",t.append(n);var a=elCreate("div"),l=elCreate("p");l.textContent=o;var s=elCreate("small");s.appendChild(i),a.appendChild(l),a.appendChild(s);var c=elCreate("div");c.appendChild(a);var u=elCreate("ul");return u.className="buttonGroup",c.appendChild(u),t.append(c),t},_failure:function(e,n,o,r,a){for(var l=0,s=this._fileElements[e].length;l<s;l++){this._fileElements[e][l].classList.add("uploadFailed"),elBySel("small",this._fileElements[e][l]).innerHTML="";var c=elBySel(".icon",this._fileElements[e][l]);c.classList.remove("fa-spinner"),c.classList.add("fa-ban");var u=elCreate("span");u.className="innerError",u.textContent=t.get("wcf.upload.error.uploadFailed"),i.insertAfter(u,elBySel("small",this._fileElements[e][l]))}throw new Error("Upload failed: "+n.message)},_upload:function(e,t,i){var n=elBySel("small.innerError:not(.innerFileError)",this._buttonContainer.parentNode);return n&&elRemove(n),r._super.prototype._upload.call(this,e,t,i)},_success:function(t,n,o,r,a){for(var l=0,s=this._fileElements[t].length;l<s;l++)if(void 0!==n.files[l])if(this._options.imagePreview){if(null===n.files[l].image)throw new Error("Expect image for uploaded file. None given.");if(elRemove(this._fileElements[t][l]),null!==elBySel("img.previewImage",this._target))elBySel("img.previewImage",this._target).setAttribute("src",n.files[l].image);else{var c=elCreate("img");c.classList.add("previewImage"),c.setAttribute("src",n.files[l].image),c.setAttribute("style","max-width: 100%;"),elData(c,"unique-file-id",n.files[l].uniqueFileId),this._target.appendChild(c)}}else{elData(this._fileElements[t][l],"unique-file-id",n.files[l].uniqueFileId),elBySel("small",this._fileElements[t][l]).textContent=n.files[l].filesize;var u=elBySel(".icon",this._fileElements[t][l]);u.classList.remove("fa-spinner"),u.classList.add("fa-"+n.files[l].icon)}else{if(void 0===n.error[l])throw new Error("Unknown uploaded file for uploadId "+t+".");this._fileElements[t][l].classList.add("uploadFailed"),elBySel("small",this._fileElements[t][l]).innerHTML="";var u=elBySel(".icon",this._fileElements[t][l]);if(u.classList.remove("fa-spinner"),u.classList.add("fa-ban"),null===elBySel(".innerError",this._fileElements[t][l])){var d=elCreate("span");d.className="innerError",d.textContent=n.error[l].errorMessage,i.insertAfter(d,elBySel("small",this._fileElements[t][l]))}else elBySel(".innerError",this._fileElements[t][l]).textContent=n.error[l].errorMessage}this._deleteHandler.rebuild(),this.checkMaxFiles(),e.triggerEvent(this._target,"change")},_getFormData:function(){return{internalId:this._options.internalId}},validateUpload:function(e){if(null===this._options.maxFiles||e.length+this.countFiles()<=this._options.maxFiles)return!0;var n=elBySel("small.innerError:not(.innerFileError)",this._buttonContainer.parentNode);return null===n&&(n=elCreate("small"),n.className="innerError",i.insertAfter(n,this._buttonContainer)),n.textContent=t.get("wcf.upload.error.reachedRemainingLimit",{maxFiles:this._options.maxFiles-this.countFiles()}),!1},countFiles:function(){return this._options.imagePreview?null!==elBySel("img",this._target)?1:0:this._target.childElementCount},checkMaxFiles:function(){null!==this._options.maxFiles&&this.countFiles()>=this._options.maxFiles?elHide(this._button):elShow(this._button)}}),r}),define("WoltLabSuite/Core/Ui/ItemList/Filter",["Core","EventKey","Language","List","StringUtil","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a){"use strict";var l=function(){};return l.prototype={init:function(){},_buildItems:function(){},_prepareItem:function(){},_keyup:function(){},_toggleVisibility:function(){},_setupVisibilityFilter:function(){},_setVisibility:function(){}},l}),define("WoltLabSuite/Core/Ui/ItemList/Static",["Core","Dictionary","Language","Dom/Traverse","EventKey","Ui/SimpleDropdown"],function(e,t,i,n,o,r){"use strict";var a="",l=new t,s=!1,c=null,u=null,d=null,h=null,f=null,p=null;return{init:function(t,i,o){var a=elById(t);if(null===a)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(l.has(t)){var s=l.get(t);for(var c in s)if(s.hasOwnProperty(c)){var u=s[c];u instanceof Element&&u.parentNode&&elRemove(u)}r.destroy(t),l.delete(t)}o=e.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},o);var d=n.parentByTag(a,"FORM");if(null!==d&&!1===o.isCSV){if(!o.submitFieldName.length&&"function"!=typeof o.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",function(){var e=this.getValues(t);if(o.submitFieldName.length)for(var i,n=0,r=e.length;n<r;n++)i=elCreate("input"),i.type="hidden",i.name=o.submitFieldName.replace(/{$objectId}/,e[n].objectId),i.value=e[n].value,d.appendChild(i);else o.callbackSubmit(d,e)}.bind(this))}this._setup();var h=this._createUI(a,o);if(l.set(t,{dropdownMenu:null,element:h.element,list:h.list,listItem:h.element.parentNode,options:o,shadow:h.shadow}),i=h.values.length?h.values:i,Array.isArray(i))for(var f,p=!h.element.disabled,g=0,m=i.length;g<m;g++)f=i[g],"string"==typeof f&&(f={objectId:0,value:f}),this._addItem(t,f,p)},getValues:function(e){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=l.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent})}),i},setValues:function(e,t){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,o,r=l.get(e),a=n.childrenByClass(r.list,"item");for(i=0,
+elData(b,"language-id",w),void 0!==C.languageCode&&elData(b,"language-code",C.languageCode),g.appendChild(b),m=elCreate("a"),m.className="box24",b.appendChild(m),v=elCreate("img"),elAttr(v,"src",C.iconPath),elAttr(v,"alt",""),v.className="iconFlag",m.appendChild(v),_=elCreate("span"),_.textContent=C.languageName,m.appendChild(_),w==r&&(p.innerHTML=b.firstChild.innerHTML)}if(h)b=elCreate("li"),b.className="dropdownDivider",g.appendChild(b),b=elCreate("li"),elData(b,"language-id",0),b.addEventListener(WCF_CLICK_EVENT,y),g.appendChild(b),m=elCreate("a"),m.textContent=i.get("wcf.global.language.noSelection"),b.appendChild(m),0===r&&(p.innerHTML=b.firstChild.innerHTML),b.addEventListener(WCF_CLICK_EVENT,y);else if(0===r){p.innerHTML=null;var E=elCreate("div");p.appendChild(E),_=elCreate("span"),_.className="icon icon24 fa-question pointer",E.appendChild(_),_=elCreate("span"),_.textContent=i.get("wcf.global.language.noSelection"),E.appendChild(_)}a.init(p),l.set(e,{callback:d,dropdownMenu:g,dropdownToggle:p,element:t});var L=n.parentByTag(t,"FORM");if(null!==L){L.addEventListener("submit",u);var A=c.get(L);void 0===A&&(A=[],c.set(L,A)),A.push(e)}},_select:function(t,i,n){var o=l.get(t);if(void 0===n){for(var r=o.dropdownMenu.childNodes,a=0,s=r.length;a<s;a++){var c=r[a];if(~~elData(c,"language-id")===i){n=c;break}}if(void 0===n)throw new Error("Cannot select unknown language id '"+i+"'")}o.element.value=i,e.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=n.firstChild.innerHTML,l.set(t,o),"function"==typeof o.callback&&o.callback(n)},_submit:function(e){for(var t,i=c.get(e.currentTarget),n=0,o=i.length;n<o;n++)t=elCreate("input"),t.type="hidden",t.name=i[n],t.value=this.getLanguageId(i[n]),e.currentTarget.appendChild(t)},getChooser:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid language chooser input element, '"+e+"' is not i18n input field.");return t},getLanguageId:function(e){return~~this.getChooser(e).element.value},removeChooser:function(e){l.has(e)&&l.delete(e)},setLanguageId:function(e,t){if(void 0===l.get(e))throw new Error("Expected a valid  input element, '"+e+"' is not i18n input field.");this._select(e,t)}}}),define("WoltLabSuite/Core/Language/Input",["Core","Dictionary","Language","ObjectMap","StringUtil","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a,l){"use strict";var s=new t,c=!1,u=new n,d=new t,h=null,f=null;return{init:function(e,i,n,r){if(!d.has(e)){var a=elById(e);if(null===a)throw new Error("Expected a valid element id, cannot find '"+e+"'.");this._setup();var l=new t;for(var s in i)i.hasOwnProperty(s)&&l.set(~~s,o.unescapeHTML(i[s]));d.set(e,l),this._initElement(e,a,l,n,r)}},registerCallback:function(e,t,i){if(!d.has(e))throw new Error("Unknown element id '"+e+"'.");s.get(e).callbacks.set(t,i)},unregister:function(e){if(!d.has(e))throw new Error("Unknown element id '"+e+"'.");d.delete(e),s.delete(e)},_setup:function(){c||(c=!0,h=this._dropdownToggle.bind(this),f=this._submit.bind(this))},_initElement:function(e,n,o,c,d){var p=n.parentNode;if(!p.classList.contains("inputAddon")){p=elCreate("div"),p.className="inputAddon"+("TEXTAREA"===n.nodeName?" inputAddonTextarea":""),elData(p,"input-id",e);var g=document.activeElement===n;n.parentNode.insertBefore(p,n),p.appendChild(n),g&&n.focus()}p.classList.add("dropdown");var m=elCreate("span");m.className="button dropdownToggle inputPrefix";var v=elCreate("span");v.textContent=i.get("wcf.global.button.disabledI18n"),m.appendChild(v),p.insertBefore(m,n);var b=elCreate("ul");b.className="dropdownMenu",a.insertAfter(b,m);var _,y=function(t,i){var n=~~elData(t.currentTarget,"language-id"),o=r.childByClass(b,"active");null!==o&&o.classList.remove("active"),n&&t.currentTarget.classList.add("active"),this._select(e,n,i||!1)}.bind(this);for(var w in c)c.hasOwnProperty(w)&&(_=elCreate("li"),elData(_,"language-id",w),v=elCreate("span"),v.textContent=c[w],_.appendChild(v),_.addEventListener(WCF_CLICK_EVENT,y),b.appendChild(_));!0!==d&&(_=elCreate("li"),_.className="dropdownDivider",b.appendChild(_),_=elCreate("li"),elData(_,"language-id",0),v=elCreate("span"),v.textContent=i.get("wcf.global.button.disabledI18n"),_.appendChild(v),_.addEventListener(WCF_CLICK_EVENT,y),b.appendChild(_));var C=null;if(!0===d||o.size)for(var E=0,L=b.childElementCount;E<L;E++)if(~~elData(b.children[E],"language-id")===LANGUAGE_ID){C=b.children[E];break}l.init(m),l.registerCallback(p.id,h),s.set(e,{buttonLabel:m.children[0],callbacks:new t,element:n,languageId:0,isEnabled:!0,forceSelection:d});var A=r.parentByTag(n,"FORM");if(null!==A){A.addEventListener("submit",f);var S=u.get(A);void 0===S&&(S=[],u.set(A,S)),S.push(e)}null!==C&&y({currentTarget:C},!0)},_select:function(e,i,n){for(var o,r=s.get(e),a=l.getDropdownMenu(r.element.closest(".inputAddon").id),c="",u=0,h=a.childElementCount;u<h;u++){o=a.children[u];var f=elData(o,"language-id");f.length&&i===~~f&&(c=o.children[0].textContent)}if(r.languageId!==i){var p=d.get(e);r.languageId&&p.set(r.languageId,r.element.value),0===i?d.set(e,new t):(r.buttonLabel.classList.contains("active")||!0===n)&&(r.element.value=p.has(i)?p.get(i):""),r.buttonLabel.textContent=c,r.buttonLabel.classList[i?"add":"remove"]("active"),r.languageId=i}n||(r.element.blur(),r.element.focus()),r.callbacks.has("select")&&r.callbacks.get("select")(r.element)},_dropdownToggle:function(e,t){if("open"===t)for(var i,n,o=l.getDropdownMenu(e),r=elData(elById(e),"input-id"),a=s.get(r),c=d.get(r),u=0,h=o.childElementCount;u<h;u++)if(i=o.children[u],n=~~elData(i,"language-id")){var f=!1;a.languageId&&(f=n===a.languageId?""===a.element.value.trim():!c.get(n)),i.classList[f?"add":"remove"]("missingValue")}},_submit:function(e){for(var t,i,n,o,r=u.get(e.currentTarget),a=0,l=r.length;a<l;a++)i=r[a],t=s.get(i),t.isEnabled&&(o=d.get(i),t.callbacks.has("submit")&&t.callbacks.get("submit")(t.element),t.languageId&&o.set(t.languageId,t.element.value),o.size&&(o.forEach(function(t,o){n=elCreate("input"),n.type="hidden",n.name=i+"_i18n["+o+"]",n.value=t,e.currentTarget.appendChild(n)}),t.element.removeAttribute("name")))},getValues:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");var i=d.get(e);return i.set(t.languageId,t.element.value),i},setValues:function(i,n){var o=s.get(i);if(void 0===o)throw new Error("Expected a valid i18n input element, '"+i+"' is not i18n input field.");if(e.isPlainObject(n)&&(n=t.fromObject(n)),o.element.value="",n.has(0))return o.element.value=n.get(0),n.delete(0),d.set(i,n),void this._select(i,0,!0);d.set(i,n),o.languageId=0,this._select(i,LANGUAGE_ID,!0)},disable:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid element, '"+e+"' is not an i18n input field.");if(t.isEnabled){t.isEnabled=!1,elHide(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.remove("inputAddon"),i.classList.remove("dropdown")}},enable:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(!t.isEnabled){t.isEnabled=!0,elShow(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.add("inputAddon"),i.classList.add("dropdown")}},isEnabled:function(e){var t=s.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");return t.isEnabled},validate:function(e,t){var i=s.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;var n=d.get(e),o=l.getDropdownMenu(i.element.parentNode.id);i.languageId&&n.set(i.languageId,i.element.value);for(var r,a,c=!1,u=!1,h=0,f=o.childElementCount;h<f;h++)if(r=o.children[h],a=~~elData(r,"language-id"))if(n.has(a)&&0!==n.get(a).length){if(c)return!1;u=!0}else{if(u)return!1;c=!0}return!c||t}}}),define("WoltLabSuite/Core/Language/Text",["Core","./Input"],function(e,t){"use strict";return{init:function(e,i,n,o){var r=elById(e);if(!r||"TEXTAREA"!==r.nodeName||!r.classList.contains("wysiwygTextarea"))throw new Error('Expected <textarea class="wysiwygTextarea" /> for id \''+e+"'.");t.init(e,i,n,o),t.registerCallback(e,"select",this._callbackSelect.bind(this)),t.registerCallback(e,"submit",this._callbackSubmit.bind(this))},_callbackSelect:function(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)},_callbackSubmit:function(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}}}),define("WoltLabSuite/Core/Media/Upload",["Core","DateUtil","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload","User","WoltLabSuite/Core/FileUtil"],function(e,t,i,n,o,r,a,l,s,c,u){"use strict";var d=function(){};return d.prototype={_createFileElement:function(){},_getParameters:function(){},_success:function(){},_uploadFiles:function(){},_createButton:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){},_upload:function(){}},d}),define("WoltLabSuite/Core/Media/Replace",["Core","Dom/ChangeListener","Dom/Util","Language","Ui/Notification","./Upload"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={_createButton:function(){},_success:function(){},_upload:function(){},_createFileElement:function(){},_getParameters:function(){},_uploadFiles:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){}},a}),define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey","WoltLabSuite/Core/Media/Replace"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={_ajaxSetup:function(){},_ajaxSuccess:function(){},_close:function(){},_keyPress:function(){},_saveData:function(){},_updateLanguageFields:function(){},edit:function(){}},f}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/Util","../Upload"],function(e,t,i){"use strict";var n=function(){};return n.prototype={_createButton:function(){},_success:function(){},_upload:function(){},_createFileElement:function(){},_getParameters:function(){},_uploadFiles:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){}},n}),define("WoltLabSuite/Core/Media/Clipboard",["Ajax","Dom/ChangeListener","EventHandler","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,o,r,a,l,s){"use strict";var c=function(){};return c.prototype={init:function(){},_ajaxSetup:function(){},_ajaxSuccess:function(){},_clipboardAction:function(){},_dialogSetup:function(){},_edit:function(){},_setCategory:function(){}},c}),define("WoltLabSuite/Core/Notification/Handler",["Ajax","Core","EventHandler","StringUtil"],function(e,t,i,n){"use strict";if(!("Promise"in window&&"Notification"in window))return{setup:function(){}};var o=!1,r="",a=0,l=window.TIME_NOW,s=null,c=0;return{setup:function(e){if(e=t.extend({enableNotifications:!1,icon:"",sessionKeepAlive:0},e),r=e.icon,c=60*e.sessionKeepAlive,this._prepareNextRequest(),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this)),window.addEventListener("storage",this._onStorage.bind(this)),this._onVisibilityChange(null),e.enableNotifications)switch(window.Notification.permission){case"granted":o=!0;break;case"default":window.Notification.requestPermission(function(e){"granted"===e&&(o=!0)})}},_onVisibilityChange:function(e){if(null!==e&&!document.hidden){(Date.now()-a)/6e4>4&&(this._resetTimer(),this._dispatchRequest())}a=document.hidden?Date.now():0},_getNextDelay:function(){if(0===a)return 5;var e=~~((Date.now()-a)/6e4);return e<15?5:e<30?10:15},_resetTimer:function(){null!==s&&(window.clearTimeout(s),s=null)},_prepareNextRequest:function(){this._resetTimer();var e=Math.min(this._getNextDelay(),c);s=window.setTimeout(this._dispatchRequest.bind(this),6e4*e)},_dispatchRequest:function(){var t={};i.fire("com.woltlab.wcf.notification","beforePoll",t),t.lastRequestTimestamp=l,e.api(this,{parameters:t})},_onStorage:function(){this._prepareNextRequest();var e,n,o=!1;try{e=window.localStorage.getItem(t.getStoragePrefix()+"notification"),n=window.localStorage.getItem(t.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),n=JSON.parse(n)}catch(e){o=!0}o||i.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:n})},_ajaxSuccess:function(e){var n=!1,o=e.returnValues.keepAliveData,r=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks({returnValues:o});try{window.localStorage.setItem(t.getStoragePrefix()+"notification",JSON.stringify(r)),window.localStorage.setItem(t.getStoragePrefix()+"keepAliveData",JSON.stringify(o))}catch(e){n=!0,window.console.log(e)}n||this._prepareNextRequest(),l=e.returnValues.lastRequestTimestamp,i.fire("com.woltlab.wcf.notification","afterPoll",r),this._showNotification(r)},_showNotification:function(e){if(o&&"object"==typeof e.notification&&"string"==typeof e.notification.message){var t=new window.Notification(e.notification.title,{body:n.unescapeHTML(e.notification.message),icon:r});t.onclick=function(){window.focus(),t.close(),window.location=e.notification.link}}},_ajaxSetup:function(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}}),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["Dictionary","EventHandler","Language"],function(e,t,i){"use strict";var n=function(){};return n.prototype={init:function(){},_dragOver:function(){},_drop:function(){},_dragLeave:function(){},_setup:function(){}},n}),define("WoltLabSuite/Core/Ui/DragAndDrop",["Core","EventHandler","WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(e,t,i){return{register:function(n){var o=e.getUuid();n=e.extend({element:"",elementId:"",onDrop:function(e){},onGlobalDrop:function(e){}}),t.add("com.woltlab.wcf.redactor2","dragAndDrop_"+n.elementId,n.onDrop),t.add("com.woltlab.wcf.redactor2","dragAndDrop_globalDrop_"+n.elementId,n.onGlobalDrop),i.init({uuid:o,$editor:[n.element],$element:[{id:n.elementId}]})}}}),define("WoltLabSuite/Core/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,i){"use strict";function n(e,t){this.init(e,t)}return n.prototype={init:function(e,i){if(this._dropdownMenu=null,this._value="",this._element=elById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],threshold:3},i),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},isActive:function(){return null!==this._dropdownMenu&&i.isOpen(this._element.id)},_keyDown:function(e){if(!this.isActive())return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,n=0,o=this._dropdownMenu.childElementCount;n<o&&(t=this._dropdownMenu.children[n],!t.classList.contains("active"));)n++;if(13===e.keyCode)i.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!i.isOpen(this._element.id))return!0;i.close(this._element.id)}else{var r=0;38===e.keyCode?r=(0===n?o:n)-1:40===e.keyCode&&(r=n+1)===o&&(r=0),r!==n&&(t.classList.remove("active"),this._dropdownMenu.children[r].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode);var i=e.children[0];this._options.callbackSelect(this._element.id,{objectId:elData(i,"object-id"),value:e.textContent,type:elData(i,"type")}),t&&this._element.focus()},_keyUp:function(t){var n=t.currentTarget.value.trim();if(this._value!==n){if(n.length<this._options.threshold)return null!==this._dropdownMenu&&i.close(this._element.id),void(this._value=n);this._value=n,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:n}}})}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=elCreate("div"),this._dropdownMenu.className="dropdownMenu",i.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,n,o,r=0,a=e.returnValues.length;r<a;r++)n=e.returnValues[r],t=elCreate("a"),n.icon?(t.className="box16",t.innerHTML=n.icon+" <span></span>",t.children[1].textContent=n.label):t.textContent=n.label,elData(t,"object-id",n.objectID),n.type&&elData(t,"type",n.type),t.addEventListener(WCF_CLICK_EVENT,this._select.bind(this)),o=elCreate("li"),0===r&&(o.className="active"),o.appendChild(t),this._dropdownMenu.appendChild(o);i.open(this._element.id,!0)}else i.close(this._element.id)}},n}),define("WoltLabSuite/Core/Ui/ItemList",["Core","Dictionary","Language","Dom/Traverse","EventKey","WoltLabSuite/Core/Ui/Suggestion","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a){"use strict";var l="",s=new t,c=!1,u=null,d=null,h=null,f=null,p=null,g=null;return{init:function(t,i,o){var l=elById(t);if(null===l)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(s.has(t)){var c=s.get(t);for(var u in c)if(c.hasOwnProperty(u)){var d=c[u];d instanceof Element&&d.parentNode&&elRemove(d)}a.destroy(t),s.delete(t)}o=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},o);var h=n.parentByTag(l,"FORM");if(null!==h)if(!1===o.isCSV){if(!o.submitFieldName.length&&"function"!=typeof o.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=s.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}var i=this.getValues(t);if(o.submitFieldName.length)for(var n,r=0,a=i.length;r<a;r++)n=elCreate("input"),n.type="hidden",n.name=o.submitFieldName.replace("{$objectId}",i[r].objectId),n.value=i[r].value,h.appendChild(n);else o.callbackSubmit(h,i)}.bind(this))}else h.addEventListener("submit",function(){if(this._acceptsNewItems(t)){var e=s.get(t).element.value.trim();e.length&&this._addItem(t,{objectId:0,value:e})}}.bind(this));this._setup();var f=this._createUI(l,o),p=new r(t,{ajax:o.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:o.excludedSearchValues});if(s.set(t,{dropdownMenu:null,element:f.element,limitReached:f.limitReached,list:f.list,listItem:f.element.parentNode,options:o,shadow:f.shadow,suggestion:p}),i=o.callbackSetupValues?o.callbackSetupValues():f.values.length?f.values:i,Array.isArray(i))for(var g,m=0,v=i.length;m<v;m++)g=i[m],"string"==typeof g&&(g={objectId:0,value:g}),this._addItem(t,g)},getValues:function(e){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=s.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent.trim(),type:elData(e,"type")})}),i},setValues:function(e,t){if(!s.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,o,r=s.get(e),a=n.childrenByClass(r.list,"item");for(i=0,o=a.length;i<o;i++)this._removeItem(null,a[i],!0);for(i=0,o=t.length;i<o;i++)this._addItem(e,t[i])},_setup:function(){c||(c=!0,u=this._keyDown.bind(this),d=this._keyPress.bind(this),h=this._keyUp.bind(this),f=this._paste.bind(this),p=this._removeItem.bind(this),g=this._blur.bind(this))},_createUI:function(e,t){var n=elCreate("ol");n.className="inputItemList"+(e.disabled?" disabled":""),elData(n,"element-id",e.id),n.addEventListener(WCF_CLICK_EVENT,function(t){t.target===n&&e.focus()});var o=elCreate("li");o.className="input",n.appendChild(o),e.addEventListener("keydown",u),e.addEventListener("keypress",d),e.addEventListener("keyup",h),e.addEventListener("paste",f);var r=e===document.activeElement;r&&e.blur(),e.addEventListener("blur",g),e.parentNode.insertBefore(n,e),o.appendChild(e),r&&window.setTimeout(function(){e.focus()},1),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var a=elCreate("span");a.className="inputItemListLimitReached",a.textContent=i.get("wcf.global.form.input.maxItems"),elHide(a),o.appendChild(a);var l=null,s=[];if(t.isCSV){l=elCreate("input"),l.className="itemListInputShadow",l.type="hidden",l.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(l,n);for(var c,p=e.value.split(","),m=0,v=p.length;m<v;m++)c=p[m].trim(),c.length&&s.push(c);if("TEXTAREA"===e.nodeName){var b=elCreate("input");b.type="text",e.parentNode.insertBefore(b,e),b.id=e.id,elRemove(e),e=b}}return{element:e,limitReached:a,list:n,shadow:l,values:s}},_acceptsNewItems:function(e){var t=s.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems},_handleLimit:function(e){var t=s.get(e);this._acceptsNewItems(e)?(elShow(t.element),elHide(t.limitReached)):(elHide(t.element),elShow(t.limitReached))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;l=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(o.Enter(e)||o.Comma(e)){if(e.preventDefault(),s.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_paste:function(e){var t="";t="object"==typeof window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData.getData("text/plain");var i=e.currentTarget,n=i.id,o=~~elAttr(i,"maxLength");t.split(/,/).forEach(function(e){e=e.trim(),o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&this._acceptsNewItems(n)&&this._addItem(n,{objectId:0,value:e})}.bind(this)),e.preventDefault()},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=s.get(e),n=elCreate("li");n.className="item";var o=elCreate("span");if(o.className="content",elData(o,"object-id",t.objectId),t.type&&elData(o,"type",t.type),o.textContent=t.value,n.appendChild(o),!i.element.disabled){var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener(WCF_CLICK_EVENT,p),n.appendChild(r)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||this._handleLimit(e);var a=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===a&&(a=this.getValues(e)),i.options.callbackChange(e,a))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,o=elData(n,"element-id"),r=s.get(o);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),i||r.element.focus(),this._handleLimit(o);var a=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===a&&(a=this.getValues(o)),r.options.callbackChange(o,a))},_syncShadow:function(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);for(var t="",i=this.getValues(e.element.id),n=0,o=i.length;n<o;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i},_blur:function(e){var t=e.currentTarget,i=s.get(t.id);if(!i.options.restricted){var n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||this._addItem(t.id,{objectId:0,value:n}))}}}}),define("WoltLabSuite/Core/Ui/Page/JumpTo",["Language","ObjectMap","Ui/Dialog"],function(e,t,i){"use strict";var n=null,o=null,r=null,a=new t,l=null;return{init:function(e,t){if(null===(t=t||null)){var i=elData(e,"link");t=i?function(e){window.location=i.replace(/pageNo=%d/,"pageNo="+e)}:function(){}}else if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.");a.has(e)||elBySelAll(".jumpTo",e,function(i){i.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,e)),a.set(e,{callback:t})}.bind(this))},_click:function(t,o){n=t,"object"==typeof o&&o.preventDefault(),i.open(this);var a=elData(t,"pages");l.value=a,l.setAttribute("max",a),l.select(),r.textContent=e.get("wcf.page.jumpTo.description").replace(/#pages#/,a)},_keyUp:function(e){if(13===e.which&&!1===o.disabled)return void this._submit();var t=~~l.value;t<1||t>~~elAttr(l,"max")?o.disabled=!0:o.disabled=!1},_submit:function(e){a.get(n).callback(~~l.value),i.close(this)},_dialogSetup:function(){var t='<dl><dt><label for="jsPaginationPageNo">'+e.get("wcf.page.jumpTo")+'</label></dt><dd><input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny"><small></small></dd></dl><div class="formSubmit"><button class="buttonPrimary">'+e.get("wcf.global.button.submit")+"</button></div>";return{id:"paginationOverlay",options:{onSetup:function(e){l=elByTag("input",e)[0],l.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],o=elByTag("button",e)[0],o.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}}}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,i,n,o){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,i){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},i),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var i,n=elCreate("ul"),r=elCreate("li");r.className="skip",n.appendChild(r);var a="icon icon24 fa-chevron-left";this._options.activePage>1?(i=elCreate("a"),i.className=a+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.previous"),i.rel="prev",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='<span class="'+a+'"></span>',r.classList.add("disabled")),n.appendChild(this._createLink(1));var l=this.SHOW_LINKS-4,s=this._options.activePage-2;s<0&&(s=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePage<this._options.maxPage&&l--;var u=l/2,d=this._options.activePage,h=this._options.activePage;d<1&&(d=1),h<1&&(h=1),h>this._options.maxPage-1&&(h=this._options.maxPage-1),s>=u?d-=u:(d-=s,h+=u-s),c>=u?h+=u:(h+=c,d-=u-c),h=Math.ceil(h),d=Math.ceil(d),d<1&&(d=1),h>this._options.maxPage&&(h=this._options.maxPage);var f='<a class="jsTooltip" title="'+t.get("wcf.page.jumpTo")+'">&hellip;</a>';d>1&&(d-1<2?n.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0));for(var p=d+1;p<h;p++)n.appendChild(this._createLink(p));h<this._options.maxPage&&(this._options.maxPage-h<2?n.appendChild(this._createLink(this._options.maxPage-1)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,n.appendChild(r),e=!0)),n.appendChild(this._createLink(this._options.maxPage)),r=elCreate("li"),r.className="skip",n.appendChild(r),a="icon icon24 fa-chevron-right",this._options.activePage<this._options.maxPage?(i=elCreate("a"),i.className=a+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.next"),i.rel="next",r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage+1))):(r.innerHTML='<span class="'+a+'"></span>',r.classList.add("disabled")),e&&(elData(n,"pages",this._options.maxPage),o.init(n,this.switchPage.bind(this))),this._element.appendChild(n)},_createLink:function(e){var i=elCreate("li");if(e!==this._options.activePage){var o=elCreate("a");o.textContent=n.addThousandsSeparator(e),o.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),i.appendChild(o)}else i.classList.add("active"),i.innerHTML="<span>"+n.addThousandsSeparator(e)+'</span><span class="invisible">'+t.get("wcf.page.pagePosition",{pageNo:e,pages:this._options.maxPage})+"</span>";return i},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(t,i){if("object"==typeof i&&(i.preventDefault(),i.currentTarget&&elData(i.currentTarget,"tooltip"))){var n=elById("balloonTooltip");n&&(e.triggerEvent(i.currentTarget,"mouseleave"),n.style.removeProperty("top"),n.style.removeProperty("bottom"))}if((t=~~t)>0&&this._options.activePage!==t&&t<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&!0!==this._options.callbackShouldSwitch(t))return;this._options.activePage=t,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(t)}}},r}),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["https://connect.facebook.net/en_US/sdk.js"],function(e){"use strict";return FB.init({version:"v7.0"}),FB}),define("WoltLabSuite/Core/Controller/Media/List",["Dom/ChangeListener","EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={init:function(){},_addButtonEventListeners:function(){},_deleteCallback:function(){},_deleteMedia:function(e){},_edit:function(){}},a}),define("WoltLabSuite/Core/Controller/Notice/Dismiss",["Ajax"],function(e){"use strict";return{setup:function(){var e=elByClass("jsDismissNoticeButton");if(e.length)for(var t=this._click.bind(this),i=0,n=e.length;i<n;i++)e[i].addEventListener(WCF_CLICK_EVENT,t)},_click:function(t){var i=t.currentTarget;e.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[elData(i,"object-id")]},success:function(){elRemove(i.parentNode)}})}}}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["Dictionary","Dom/ChangeListener","EventHandler","List","Dom/Traverse","Dom/Util","ObjectMap"],function(e,t,i,n,o,r,a){"use strict";var l=!1,s=!0,c=new n,u=new e,d=new n,h=new e,f=new a;return{_hide:function(t){elHide(t),c.add(t),t.classList.contains("tabMenuContent")&&elBySelAll("li",o.prevByClass(t,"tabMenu"),function(e){elData(e,"name")===elData(t,"name")&&elHide(e)}),elBySelAll("[max], [maxlength], [min], [required]",t,function(t){var i=new e,n=elAttr(t,"max");n&&(i.set("max",n),t.removeAttribute("max"));var o=elAttr(t,"maxlength");o&&(i.set("maxlength",o),t.removeAttribute("maxlength"));var r=elAttr(t,"min");r&&(i.set("min",r),t.removeAttribute("min")),t.required&&(i.set("required",!0),t.removeAttribute("required")),f.set(t,i)})},_show:function(e){elShow(e),c.delete(e),e.classList.contains("tabMenuContent")&&elBySelAll("li",o.prevByClass(e,"tabMenu"),function(t){elData(t,"name")===elData(e,"name")&&elShow(t)}),
+elBySelAll("input, select",e,function(t){for(var i=t.parentNode;i!==e&&"none"!==i.style.getPropertyValue("display");)i=i.parentNode;if(i===e&&f.has(t)){var n=f.get(t);n.has("max")&&elAttr(t,"max",n.get("max")),n.has("maxlength")&&elAttr(t,"maxlength",n.get("maxlength")),n.has("min")&&elAttr(t,"min",n.get("min")),n.has("required")&&elAttr(t,"required",""),f.delete(t)}})},addDependency:function(e){var t=e.getDependentNode();h.has(t.id)?h.get(t.id).push(e):h.set(t.id,[e]);for(var i=e.getFields(),n=0,o=i.length;n<o;n++){var a=i[n],l=r.identify(a);u.has(l)||(u.set(l,a),"INPUT"!==a.tagName||"checkbox"!==a.type&&"radio"!==a.type&&"hidden"!==a.type?a.addEventListener("input",this.checkDependencies.bind(this)):a.addEventListener("change",this.checkDependencies.bind(this)))}},checkDependencies:function(){var e=[];h.forEach(function(t,i){var n=elById(i);if(null===n)return void e.push(n);for(var o=0,r=t.length;o<r;o++)if(!t[o].checkDependency())return void this._hide(n);this._show(n)}.bind(this));for(var t=0,i=e.length;t<i;t++)h.delete(e.id);this.checkContainers()},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)},checkContainers:function(){if(!0===l)return void(s=!0);l=!0,s=!1,i.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),l=!1,s&&this.checkContainers()},isHiddenByDependencies:function(e){if(c.has(e))return!0;var t=!1;return c.forEach(function(i){r.contains(i,e)&&(t=!0)}),t},register:function(e){var t=elById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(d.has(t))throw new Error("Form with id '"+e+"' has already been registered.");d.add(t)},unregister:function(e){var t=elById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!d.has(t))throw new Error("Form with id '"+e+"' has not been registered.");d.delete(t),c.forEach(function(e){t.contains(e)&&c.delete(e)}),h.forEach(function(e,i){t.contains(elById(i))&&h.delete(i);for(var n=0,o=e.length;n<o;n++)for(var r=e[n].getFields(),a=0,l=r.length;a<l;a++){var s=r[a];u.delete(s.id),f.delete(s)}})}}}),define("WoltLabSuite/Core/Form/Builder/Field/Field",[],function(){"use strict";function e(e){this.init(e)}return e.prototype={init:function(e){this._fieldId=e,this._readField()},_getData:function(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")},_readField:function(){if(this._field=elById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")},destroy:function(){},getData:function(){return Promise.resolve(this._getData())},getId:function(){return this._fieldId}},e}),define("WoltLabSuite/Core/Form/Builder/Manager",["Core","Dictionary","EventHandler","./Field/Dependency/Manager","./Field/Field"],function(e,t,i,n,o){"use strict";var r=new t,a=new t;return{getData:function(t){if(!this.hasForm(t))throw new Error("Unknown form with id '"+t+"'.");var i=[];return r.get(t).forEach(function(e){var t=e.getData();if(!(t instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");i.push(t)}),Promise.all(i).then(function(t){for(var i={},n=0,o=t.length;n<o;n++)i=e.extend(i,t[n]);return i})},getField:function(e,t){if(!this.hasField(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return r.get(e).get(t)},getForm:function(e){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");return a.get(e)},hasField:function(e,t){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");return r.get(e).has(t)},hasForm:function(e){return a.has(e)},registerField:function(e,t){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof o))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");var i=t.getId();if(this.hasField(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");r.get(e).set(i,t)},registerForm:function(e){if(this.hasForm(e))throw new Error("Form with id '"+e+"' has already been registered.");var n=elById(e);if(null===n)throw new Error("Unknown form with id '"+e+"'.");a.set(e,n),r.set(e,new t),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},unregisterForm:function(e){if(!this.hasForm(e))throw new Error("Unknown form with id '"+e+"'.");i.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),a.delete(e),r.get(e).forEach(function(e){e.destroy()}),r.delete(e),n.unregister(e),i.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}}}),define("WoltLabSuite/Core/Form/Builder/Dialog",["Ajax","Core","./Manager","Ui/Dialog"],function(e,t,i,n){"use strict";function o(e,t,i,n){this.init(e,t,i,n)}return o.prototype={init:function(e,i,n,o){this._dialogId=e,this._className=i,this._actionName=n,this._options=t.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:this._className.match(/\w+\\data\\/)},o),this._options.dialog=t.extend(this._options.dialog||{},{onClose:this._dialogOnClose.bind(this)}),this._formId="",this._dialogContent=""},_ajaxSetup:function(){var e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+SECURITY_TOKEN,e.withCredentials=!0),e},_ajaxSuccess:function(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");if(void 0===e.returnValues.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.returnValues.formId)throw new Error("Missing form id in return data.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&e.returnValues.formId&&e.returnValues.dialog){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+"'.")}},_closeDialog:function(){n.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()},_dialogOnClose:function(){this._options.destroyOnClose&&this.destroy()},_dialogSetup:function(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}},_dialogSubmit:function(){this.getData().then(this._submitForm.bind(this))},_openDialogContent:function(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;var i=n.open(this,this._dialogContent),o=elBySel("button[data-type=cancel]",i.content);null===o||elDataBool(o,"has-event-listener")||(o.addEventListener("click",this._closeDialog.bind(this)),elData(o,"has-event-listener",1))},_submitForm:function(t){var i=elBySel("button[data-type=submit]",n.getDialog(this).content);"function"==typeof this._options.onSubmit?this._options.onSubmit(t,i):"string"==typeof this._options.submitActionName&&(i.disabled=!0,e.api(this,{actionName:this._options.submitActionName,parameters:{data:t,formId:this._formId}}))},destroy:function(e){""!==this._formId&&(i.hasForm(this._formId)&&i.unregisterForm(this._formId),!0!==e&&n.destroy(this))},getData:function(){if(""===this._formId)throw new Error("Form has not been requested yet.");return i.getData(this._formId)},open:function(){n.getDialog(this._dialogId)?n.openStatic(this._dialogId):e.api(this)}},o}),define("WoltLabSuite/Core/Media/Manager/Search",["Ajax","Core","Dom/Traverse","Dom/Util","EventKey","Language","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a){"use strict";var l=function(){};return l.prototype={_ajaxSetup:function(){},_ajaxSuccess:function(){},_cancelSearch:function(){},_keyPress:function(){},_search:function(){},hideSearch:function(){},resetSearch:function(){},showSearch:function(){}},l}),define("WoltLabSuite/Core/Media/Manager/Base",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","List","Permission","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/Upload","WoltLabSuite/Core/Media/Manager/Search","StringUtil","WoltLabSuite/Core/Ui/Pagination","WoltLabSuite/Core/Media/Clipboard"],function(e,t,i,n,o,r,a,l,s,c,u,d,h,f,p,g,m,v){"use strict";var b=function(){};return b.prototype={_addButtonEventListeners:function(){},_click:function(){},_dialogClose:function(){},_dialogInit:function(){},_dialogSetup:function(){},_dialogShow:function(){},_editMedia:function(){},_editorClose:function(){},_editorSuccess:function(){},_removeClipboardCheckboxes:function(){},_setMedia:function(){},addMedia:function(){},clipboardDeleteMedia:function(){},getDialog:function(){},getMode:function(){},getOption:function(){},removeMedia:function(){},resetMedia:function(){},setMedia:function(){},setupMediaElement:function(){}},b}),define("WoltLabSuite/Core/Media/Manager/Editor",["Core","Dictionary","Dom/Traverse","EventHandler","Language","Permission","Ui/Dialog","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,o,r,a,l,s){"use strict";var c=function(){};return c.prototype={_addButtonEventListeners:function(){},_buildInsertDialog:function(){},_click:function(){},_getInsertDialogId:function(){},_getThumbnailSizes:function(){},_insertMedia:function(){},_insertMediaGallery:function(){},_insertMediaItem:function(){},_openInsertDialog:function(){},insertMedia:function(){},getMode:function(){},setupMediaElement:function(){},_dialogClose:function(){},_dialogInit:function(){},_dialogSetup:function(){},_dialogShow:function(){},_editMedia:function(){},_editorClose:function(){},_editorSuccess:function(){},_removeClipboardCheckboxes:function(){},_setMedia:function(){},addMedia:function(){},clipboardInsertMedia:function(){},getDialog:function(){},getOption:function(){},removeMedia:function(){},resetMedia:function(){},setMedia:function(){}},c}),define("WoltLabSuite/Core/Media/Manager/Select",["Core","Dom/Traverse","Dom/Util","Language","ObjectMap","Ui/Dialog","WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,o,r,a,l){"use strict";var s=function(){};return s.prototype={_addButtonEventListeners:function(){},_chooseMedia:function(){},_click:function(){},getMode:function(){},setupMediaElement:function(){},_removeMedia:function(){},_clipboardAction:function(){},_dialogClose:function(){},_dialogInit:function(){},_dialogSetup:function(){},_dialogShow:function(){},_editMedia:function(){},_editorClose:function(){},_editorSuccess:function(){},_removeClipboardCheckboxes:function(){},_setMedia:function(){},addMedia:function(){},getDialog:function(){},getOption:function(){},removeMedia:function(){},resetMedia:function(){},setMedia:function(){}},s}),define("WoltLabSuite/Core/Ui/Search/Input",["Ajax","Core","EventKey","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,o){"use strict";function r(e,t){this.init(e,t)}return r.prototype={init:function(e,i){if(this._element=e,!(this._element instanceof Element))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"].');this._activeItem=null,this._dropdownContainerId="",this._lastValue="",this._list=null,this._request=null,this._timerDelay=null,this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:null,callbackSelect:null,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1},i),elAttr(this._element,"autocomplete","off"),this._element.addEventListener("keydown",this._keydown.bind(this)),this._element.addEventListener("keyup",this._keyup.bind(this))},addExcludedSearchValues:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedSearchValues:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keydown:function(e){(null!==this._activeItem&&o.isOpen(this._dropdownContainerId)||this._options.preventSubmit)&&i.Enter(e)&&e.preventDefault(),(i.ArrowUp(e)||i.ArrowDown(e)||i.Escape(e))&&e.preventDefault()},_keyup:function(e){if(null!==this._activeItem||!this._options.autoFocus)if(o.isOpen(this._dropdownContainerId)){if(i.ArrowUp(e))return e.preventDefault(),this._keyboardPreviousItem();if(i.ArrowDown(e))return e.preventDefault(),this._keyboardNextItem();if(i.Enter(e))return e.preventDefault(),this._keyboardSelectItem()}else this._activeItem=null;if(i.Escape(e))return void o.close(this._dropdownContainerId);var t=this._element.value.trim();if(this._lastValue!==t){if(this._lastValue=t,t.length<this._options.minLength)return void(this._dropdownContainerId&&(o.close(this._dropdownContainerId),this._activeItem=null));this._options.delay?(null!==this._timerDelay&&window.clearTimeout(this._timerDelay),this._timerDelay=window.setTimeout(function(){this._search(t)}.bind(this),this._options.delay)):this._search(t)}},_search:function(t){this._request&&this._request.abortPrevious(),this._request=e.api(this,this._getParameters(t))},_getParameters:function(e){return{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:e}}}},_keyboardNextItem:function(){var e;null!==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:function(){var e;null!==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:function(){this._selectItem(this._activeItem)},_clickSelectItem:function(e){this._selectItem(e.currentTarget)},_selectItem:function(e){this._options.callbackSelect&&!1===this._options.callbackSelect(e)?this._element.value="":this._element.value=elData(e,"label"),this._activeItem=null,o.close(this._dropdownContainerId)},_ajaxSuccess:function(e){var t=!1;if(null===this._list?(this._list=elCreate("ul"),this._list.className="dropdownMenu",t=!0,"function"==typeof this._options.callbackDropdownInit&&this._options.callbackDropdownInit(this._list)):this._list.innerHTML="","object"==typeof e.returnValues){var i,r=this._clickSelectItem.bind(this);for(var a in e.returnValues)e.returnValues.hasOwnProperty(a)&&(i=this._createListItem(e.returnValues[a]),i.addEventListener(WCF_CLICK_EVENT,r),this._list.appendChild(i))}t&&(n.insertAfter(this._list,this._element),o.initFragment(this._element.parentNode,this._list),this._dropdownContainerId=n.identify(this._element.parentNode)),this._dropdownContainerId&&(this._activeItem=null,this._list.childElementCount||!1!==this._handleEmptyResult()?(o.open(this._dropdownContainerId,!0),this._options.autoFocus&&this._list.childElementCount&&~~elData(this._list.children[0],"object-id")&&(this._activeItem=this._list.children[0],this._activeItem.classList.add("active"))):o.close(this._dropdownContainerId))},_handleEmptyResult:function(){if(!this._options.noResultPlaceholder)return!1;var e=elCreate("li");e.className="dropdownText";var t=elCreate("span");return t.textContent=this._options.noResultPlaceholder,e.appendChild(t),this._list.appendChild(e),!0},_createListItem:function(e){var t=elCreate("li");elData(t,"object-id",e.objectID),elData(t,"label",e.label);var i=elCreate("span");return i.textContent=e.label,t.appendChild(i),t},_ajaxSetup:function(){return{data:this._options.ajax}}},r}),define("WoltLabSuite/Core/Ui/User/Search/Input",["Core","WoltLabSuite/Core/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){var o=e.isPlainObject(n)&&!0===n.includeUserGroups;n=e.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:o?1:0}}}},n),i._super.prototype.init.call(this,t,n)},_createListItem:function(e){var t=i._super.prototype._createListItem.call(this,e);elData(t,"type",e.type);var n=elCreate("div");return n.className="box16",n.innerHTML="group"===e.type?'<span class="icon icon16 fa-users"></span>':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}),i}),define("WoltLabSuite/Core/Ui/Acl/Simple",["Language","StringUtil","Dom/ChangeListener","WoltLabSuite/Core/Ui/User/Search/Input"],function(e,t,i,n){"use strict";var o=function(){};return o.prototype={init:function(){},_build:function(){},_select:function(){},_removeItem:function(){}},o}),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["Ajax"],function(e){"use strict";return{init:function(){elBySelAll(".markAllAsReadButton",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this))},_click:function(t){t.preventDefault(),e.api(this)},_ajaxSuccess:function(){var e=elBySel(".mainMenu .active .badge");e&&elRemove(e),elBySelAll(".articleList .newMessageBadge",void 0,elRemove)},_ajaxSetup:function(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}}),define("WoltLabSuite/Core/Ui/Article/Search",["Ajax","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={open:function(){},_search:function(){},_click:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},_dialogSetup:function(){}},a}),define("WoltLabSuite/Core/Ui/Color/Picker",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}var i=function(e,t){if("object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker)return(i=function(e,t){var i=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&i.setCallbackSubmit(t.callbackSubmit),i})(e,t);0===n.length&&(window.__wcf_bc_colorPickerInit=function(){n.forEach(function(e){i(e[0],e[1])}),window.__wcf_bc_colorPickerInit=void 0,n=[]}),n.push([e,t])},n=[];return t.prototype={init:function(t,n){if(!(t instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");this._options=e.extend({callbackSubmit:null},n),i(t,this._options)}},t.fromSelector=function(e){elBySelAll(e,void 0,function(e){new t(e)})},t}),define("WoltLabSuite/Core/Ui/Comment/Add",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},_submitGuestDialog:function(){},_submit:function(){},_getParameters:function(){},_validate:function(){},throwError:function(){},_showLoadingOverlay:function(){},_hideLoadingOverlay:function(){},_reset:function(){},_handleError:function(){},_getEditor:function(){},_insertMessage:function(){},_ajaxSuccess:function(){},_ajaxFailure:function(){},_ajaxSetup:function(){},_cancelGuestDialog:function(){}},f}),define("WoltLabSuite/Core/Ui/Comment/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},rebuild:function(){},_click:function(){},_prepare:function(){},_showEditor:function(){},_restoreMessage:function(){},_save:function(){},_validate:function(){},throwError:function(){},_showMessage:function(){},_hideEditor:function(){},_restoreEditor:function(){},_destroyEditor:function(){},_getEditorId:function(){},_getObjectId:function(){},_ajaxFailure:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){}},f}),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["Core","Ui/SimpleDropdown"],function(e,t){"use strict";function i(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 n(t){var i=elCreate("li");if("divider"===t)return i.className="dropdownDivider",i;"string"==typeof t.identifier&&elData(i,"identifier",t.identifier);var n=elCreate("a");if(n.href="string"==typeof t.href?t.href:"#","function"==typeof t.callback)n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),t.callback(n)});else if("#"===n.getAttribute("href"))throw new Error("Expected either a `href` value or a `callback`.");if(t.hasOwnProperty("attributes")&&e.isPlainObject(t.attributes))for(var r in t.attributes)t.attributes.hasOwnProperty(r)&&elData(n,r,t.attributes[r]);if(i.appendChild(n),void 0!==t.icon&&e.isPlainObject(t.icon)){if("string"!=typeof t.icon.name)throw new TypeError("Expected a valid icon name.");var a=16;"number"==typeof t.icon.size&&-1!==o.indexOf(~~t.icon.size)&&(a=~~t.icon.size);var l=elCreate("span");l.className="icon icon"+a+" fa-"+t.icon.name,n.appendChild(l)}var s="string"==typeof t.label?t.label.trim():"",c="string"==typeof t.labelHtml?t.labelHtml.trim():"";if(""===s&&""===c)throw new TypeError("Expected either a label or a `labelHtml`.");var u=elCreate("span");return u[s?"textContent":"innerHTML"]=s||c,n.appendChild(document.createTextNode(" ")),n.appendChild(u),i}var o=[16,24,32,48,64,96,144];return{create:function(e,t){var i=elCreate("ul");return i.className="dropdownMenu","string"==typeof t&&elData(i,"identifier",t),Array.isArray(e)&&e.length>0&&this.appendItems(i,e),i},buildItem:function(e){return n(e)},appendItem:function(e,t){i(e),e.appendChild(n(t))},appendItems:function(e,t){if(i(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");var o=t.length;if(0===o)throw new Error("Expected a non-empty list of items.");if(1===o)this.appendItem(e,t[0]);else{for(var r=document.createDocumentFragment(),a=0;a<o;a++)r.appendChild(n(t[a]));e.appendChild(r)}},setItems:function(e,t){i(e),e.innerHTML="",this.appendItems(e,t)},attach:function(e,n){i(e),t.initFragment(n,e),n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),e.stopPropagation(),t.toggleDropdown(n.id)})},divider:function(){return"divider"}}}),define("WoltLabSuite/Core/Ui/File/Delete",["Ajax","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse","Dictionary"],function(e,t,i,n,o,r,a){"use strict";function l(e,t,i,n){if(this._isSingleImagePreview=i,this._uploadHandler=n,this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(t),null===t)throw new Error("Element id '"+t+"' is unknown.");if(this._containers=new a,this._internalId=elData(this._target,"internal-id"),!this._internalId)throw new Error("InternalId is unknown.");this.rebuild()}return l.prototype={_createButtons:function(){for(var e,t,n,o=elBySelAll("li.uploadedFile",this._target),r=!1,a=0,l=o.length;a<l;a++)e=o[a],n=elData(e,"unique-file-id"),this._containers.has(n)||(t={uniqueFileId:n,element:e},this._containers.set(n,t),this._initDeleteButton(e,t),r=!0);r&&i.trigger()},_initDeleteButton:function(e,t){var i=elBySel(".buttonGroup",e);if(null===i)throw new Error("Button group in '"+targetId+"' is unknown.");var o=elCreate("li"),r=elCreate("span");r.classList="button jsDeleteButton small",r.textContent=n.get("wcf.global.button.delete"),o.appendChild(r),i.appendChild(o),o.addEventListener(WCF_CLICK_EVENT,this._delete.bind(this,t.uniqueFileId))},_delete:function(t){e.api(this,{uniqueFileId:t,internalId:this._internalId})},rebuild:function(){if(this._isSingleImagePreview){var e=elBySel("img",this._target);if(null!==e){var t=elData(e,"unique-file-id");if(!this._containers.has(t)){var i={uniqueFileId:t,element:e};this._containers.set(t,i),this._deleteButton=elCreate("p"),this._deleteButton.className="button deleteButton";var o=elCreate("span");o.textContent=n.get("wcf.global.button.delete"),this._deleteButton.appendChild(o),this._buttonContainer.appendChild(this._deleteButton),this._deleteButton.addEventListener(WCF_CLICK_EVENT,this._delete.bind(this,i.uniqueFileId))}}}else this._createButtons()},_ajaxSuccess:function(e){elRemove(this._containers.get(e.uniqueFileId).element),this._isSingleImagePreview&&(elRemove(this._deleteButton),this._deleteButton=null),this._uploadHandler.checkMaxFiles(),t.triggerEvent(this._target,"change")},_ajaxSetup:function(){return{url:"index.php?ajax-file-delete/&t="+SECURITY_TOKEN}}},l}),define("WoltLabSuite/Core/Ui/File/Upload",["Core","Language","Dom/Util","WoltLabSuite/Core/Ui/File/Delete","Upload"],function(e,t,i,n,o){"use strict";function r(t,i,o){if(o=o||{},void 0===o.internalId)throw new Error("Missing internal id.");if(this._options=e.extend({name:"__files[]",singleFileRequests:!1,url:"index.php?ajax-file-upload/&t="+SECURITY_TOKEN,imagePreview:!1,maxFiles:null,acceptableFiles:null},o),this._options.multiple=null===this._options.maxFiles||this._options.maxFiles>1,0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),this._buttonContainer=elById(t),null===this._buttonContainer)throw new Error("Element id '"+t+"' is unknown.");if(this._target=elById(i),null===i)throw new Error("Element id '"+i+"' is unknown.");if(o.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._fileElements=[],this._internalFileId=0,this._multiFileUploadIds=[],this._createButton(),this.checkMaxFiles(),this._deleteHandler=new n(t,i,this._options.imagePreview,this)}return e.inherit(r,o,{_createFileElement:function(e){var t=r._super.prototype._createFileElement.call(this,e);t.classList.add("box64","uploadedFile");var i=elBySel("progress",t),n=elCreate("span");n.className="icon icon64 fa-spinner";var o=t.textContent;t.textContent="",t.append(n);var a=elCreate("div"),l=elCreate("p");l.textContent=o;var s=elCreate("small");s.appendChild(i),a.appendChild(l),a.appendChild(s);var c=elCreate("div");c.appendChild(a);var u=elCreate("ul");return u.className="buttonGroup",c.appendChild(u),t.append(c),t},_failure:function(e,n,o,r,a){for(var l=0,s=this._fileElements[e].length;l<s;l++){this._fileElements[e][l].classList.add("uploadFailed"),elBySel("small",this._fileElements[e][l]).innerHTML="";var c=elBySel(".icon",this._fileElements[e][l]);c.classList.remove("fa-spinner"),c.classList.add("fa-ban");var u=elCreate("span");u.className="innerError",u.textContent=t.get("wcf.upload.error.uploadFailed"),i.insertAfter(u,elBySel("small",this._fileElements[e][l]))}throw new Error("Upload failed: "+n.message)},_upload:function(e,t,i){var n=elBySel("small.innerError:not(.innerFileError)",this._buttonContainer.parentNode);return n&&elRemove(n),r._super.prototype._upload.call(this,e,t,i)},_success:function(t,n,o,r,a){for(var l=0,s=this._fileElements[t].length;l<s;l++)if(void 0!==n.files[l])if(this._options.imagePreview){if(null===n.files[l].image)throw new Error("Expect image for uploaded file. None given.");if(elRemove(this._fileElements[t][l]),null!==elBySel("img.previewImage",this._target))elBySel("img.previewImage",this._target).setAttribute("src",n.files[l].image);else{var c=elCreate("img");c.classList.add("previewImage"),c.setAttribute("src",n.files[l].image),c.setAttribute("style","max-width: 100%;"),elData(c,"unique-file-id",n.files[l].uniqueFileId),this._target.appendChild(c)}}else{elData(this._fileElements[t][l],"unique-file-id",n.files[l].uniqueFileId),elBySel("small",this._fileElements[t][l]).textContent=n.files[l].filesize;var u=elBySel(".icon",this._fileElements[t][l]);u.classList.remove("fa-spinner"),u.classList.add("fa-"+n.files[l].icon)}else{if(void 0===n.error[l])throw new Error("Unknown uploaded file for uploadId "+t+".");this._fileElements[t][l].classList.add("uploadFailed"),elBySel("small",this._fileElements[t][l]).innerHTML="";var u=elBySel(".icon",this._fileElements[t][l]);if(u.classList.remove("fa-spinner"),u.classList.add("fa-ban"),null===elBySel(".innerError",this._fileElements[t][l])){var d=elCreate("span");d.className="innerError",d.textContent=n.error[l].errorMessage,i.insertAfter(d,elBySel("small",this._fileElements[t][l]))}else elBySel(".innerError",this._fileElements[t][l]).textContent=n.error[l].errorMessage}this._deleteHandler.rebuild(),this.checkMaxFiles(),e.triggerEvent(this._target,"change")},_getFormData:function(){return{internalId:this._options.internalId}},validateUpload:function(e){if(null===this._options.maxFiles||e.length+this.countFiles()<=this._options.maxFiles)return!0;var n=elBySel("small.innerError:not(.innerFileError)",this._buttonContainer.parentNode);return null===n&&(n=elCreate("small"),n.className="innerError",i.insertAfter(n,this._buttonContainer)),n.textContent=t.get("wcf.upload.error.reachedRemainingLimit",{maxFiles:this._options.maxFiles-this.countFiles()}),!1},countFiles:function(){return this._options.imagePreview?null!==elBySel("img",this._target)?1:0:this._target.childElementCount},checkMaxFiles:function(){null!==this._options.maxFiles&&this.countFiles()>=this._options.maxFiles?elHide(this._button):elShow(this._button)}}),r}),define("WoltLabSuite/Core/Ui/ItemList/Filter",["Core","EventKey","Language","List","StringUtil","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,o,r,a){"use strict";var l=function(){};return l.prototype={init:function(){},_buildItems:function(){},_prepareItem:function(){},_keyup:function(){},_toggleVisibility:function(){},_setupVisibilityFilter:function(){},_setVisibility:function(){}},l}),define("WoltLabSuite/Core/Ui/ItemList/Static",["Core","Dictionary","Language","Dom/Traverse","EventKey","Ui/SimpleDropdown"],function(e,t,i,n,o,r){"use strict";var a="",l=new t,s=!1,c=null,u=null,d=null,h=null,f=null,p=null;return{init:function(t,i,o){var a=elById(t);if(null===a)throw new Error("Expected a valid element id, '"+t+"' is invalid.");if(l.has(t)){var s=l.get(t);for(var c in s)if(s.hasOwnProperty(c)){var u=s[c];u instanceof Element&&u.parentNode&&elRemove(u)}r.destroy(t),l.delete(t)}o=e.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},o);var d=n.parentByTag(a,"FORM");if(null!==d&&!1===o.isCSV){if(!o.submitFieldName.length&&"function"!=typeof o.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",function(){var e=this.getValues(t);if(o.submitFieldName.length)for(var i,n=0,r=e.length;n<r;n++)i=elCreate("input"),i.type="hidden",i.name=o.submitFieldName.replace("{$objectId}",e[n].objectId),i.value=e[n].value,d.appendChild(i);else o.callbackSubmit(d,e)}.bind(this))}this._setup();var h=this._createUI(a,o);if(l.set(t,{dropdownMenu:null,element:h.element,list:h.list,listItem:h.element.parentNode,options:o,shadow:h.shadow}),i=h.values.length?h.values:i,Array.isArray(i))for(var f,p=!h.element.disabled,g=0,m=i.length;g<m;g++)f=i[g],"string"==typeof f&&(f={objectId:0,value:f}),this._addItem(t,f,p)},getValues:function(e){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var t=l.get(e),i=[];return elBySelAll(".item > span",t.list,function(e){i.push({objectId:~~elData(e,"object-id"),value:e.textContent})}),i},setValues:function(e,t){if(!l.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,o,r=l.get(e),a=n.childrenByClass(r.list,"item");for(i=0,
 o=a.length;i<o;i++)this._removeItem(null,a[i],!0);for(i=0,o=t.length;i<o;i++)this._addItem(e,t[i])},_setup:function(){s||(s=!0,c=this._keyDown.bind(this),u=this._keyPress.bind(this),d=this._keyUp.bind(this),h=this._paste.bind(this),f=this._removeItem.bind(this),p=this._blur.bind(this))},_createUI:function(e,t){var i=elCreate("ol");i.className="inputItemList"+(e.disabled?" disabled":""),elData(i,"element-id",e.id),i.addEventListener(WCF_CLICK_EVENT,function(t){t.target===i&&e.focus()});var n=elCreate("li");n.className="input",i.appendChild(n),e.addEventListener("keydown",c),e.addEventListener("keypress",u),e.addEventListener("keyup",d),e.addEventListener("paste",h),e.addEventListener("blur",p),e.parentNode.insertBefore(i,e),n.appendChild(e),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var o=null,r=[];if(t.isCSV){o=elCreate("input"),o.className="itemListInputShadow",o.type="hidden",o.name=e.name,e.removeAttribute("name"),i.parentNode.insertBefore(o,i);for(var a,l=e.value.split(","),s=0,f=l.length;s<f;s++)a=l[s].trim(),a.length&&r.push(a);if("TEXTAREA"===e.nodeName){var g=elCreate("input");g.type="text",e.parentNode.insertBefore(g,e),g.id=e.id,elRemove(e),e=g}}return{element:e,list:i,shadow:o,values:r}},_handleLimit:function(e){var t=l.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,elAttr(t.element,"placeholder",i.get("wcf.global.form.input.maxItems"))))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;a=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(o.Enter(e)||o.Comma(e)){e.preventDefault();var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_paste:function(e){var t="";t="object"==typeof window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData.getData("text/plain"),t.split(/,/).forEach(function(t){t=t.trim(),0!==t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}.bind(this)),e.preventDefault()},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t,i){var n=l.get(e),o=elCreate("li");o.className="item";var r=elCreate("span");if(r.className="content",elData(r,"object-id",t.objectId),r.textContent=t.value,o.appendChild(r),i||!n.element.disabled){var a=elCreate("a");a.className="icon icon16 fa-times",a.addEventListener(WCF_CLICK_EVENT,f),o.appendChild(a)}n.list.insertBefore(o,n.listItem),n.element.value="",n.element.disabled||this._handleLimit(e);var s=this._syncShadow(n);"function"==typeof n.options.callbackChange&&(null===s&&(s=this.getValues(e)),n.options.callbackChange(e,s))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,o=elData(n,"element-id"),r=l.get(o);n.removeChild(t),i||r.element.focus(),this._handleLimit(o);var a=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===a&&(a=this.getValues(o)),r.options.callbackChange(o,a))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",i=this.getValues(e.element.id),n=0,o=i.length;n<o;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i},_blur:function(e){var t=(l.get(e.currentTarget.id),e.currentTarget);window.setTimeout(function(){var e=t.value.trim();e.length&&this._addItem(t.id,{objectId:0,value:e})}.bind(this),100)}}}),define("WoltLabSuite/Core/Ui/ItemList/User",["WoltLabSuite/Core/Ui/ItemList"],function(e){"use strict";var t=function(){};return t.prototype={init:function(){},getValues:function(){}},t}),define("WoltLabSuite/Core/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination"],function(e,t,i,n,o,r){"use strict";function a(e){this.init(e)}return a.prototype={init:function(e){this._cache=new i,this._pageCount=0,this._pageNo=1,this._options=t.extend({className:"",dialogTitle:"",parameters:{}},e)},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t){if("number"==typeof t&&(this._pageNo=~~t),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)){var i=o.open(this,this._cache.get(this._pageNo));if(this._pageCount>1){var n=elBySel(".jsPagination",i.content);null!==n&&new r(n,{activePage:this._pageNo,maxPage:this._pageCount,callbackSwitch:this._showPage.bind(this)});var a=i.content.parentNode;a.scrollTop>0&&(a.scrollTop=0)}}else this._options.parameters.pageNo=this._pageNo,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&(this._pageCount=~~e.returnValues.pageCount),this._cache.set(this._pageNo,e.returnValues.template),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserList",className:this._options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}},_dialogSetup:function(){return{id:n.getUniqueId(),options:{title:this._options.dialogTitle},source:null}}},a}),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","EventHandler"],function(e,t,i,n,o,r,a,l,s,c){"use strict";function u(e,t){this.init(e,t)}return u.prototype={init:function(e,n){if(""===n.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._containers=new i,this._objects=new i,this._objectType=e,this._options=t.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},n),this.initContainers(n,e),a.add("WoltLabSuite/Core/Ui/Reaction/CountButtons-"+e,this.initContainers.bind(this))},initContainers:function(){for(var e,t,i,n=elBySelAll(this._options.containerSelector),o=!1,r=0,s=n.length;r<s;r++)if(e=n[r],!this._containers.has(l.identify(e))){i=~~elData(e,"object-id"),t={reactButton:null,summary:null,objectId:i,element:e},this._containers.set(l.identify(e),t),this._initReactionCountButtons(e,t);var c=[];this._objects.has(i)&&(c=this._objects.get(i)),c.push(t),this._objects.set(i,c),o=!0}o&&a.trigger()},updateCountButtons:function(e,t){var i=!1;this._objects.get(e).forEach(function(e){var n=elBySel(this._options.summaryListSelector,this._options.isSingleItem?void 0:e.element);if(null!==n){for(var o={},a=elBySelAll(".reactCountButton",n),l=0,s=a.length;l<s;l++){var c=elData(a[l],"reaction-type-id");t.hasOwnProperty(c)?o[c]=a[l]:elRemove(a[l])}Object.keys(t).forEach(function(e){if(void 0!==o[e]){elBySel(".reactionCount",o[e]).innerHTML=r.shortUnit(t[e])}else if(void 0!==REACTION_TYPES[e]){var a=elCreate("span");a.className="reactCountButton",a.innerHTML=REACTION_TYPES[e].renderedIcon,elData(a,"reaction-type-id",e);var l=elCreate("span");l.className="reactionCount",l.innerHTML=r.shortUnit(t[e]),a.appendChild(l),n.appendChild(a),i=!0}},this),window[n.childElementCount>0?"elShow":"elHide"](n)}}.bind(this)),i&&a.trigger()},_initReactionCountButtons:function(e,t){var i=elBySel(this._options.summaryListSelector,this._options.isSingleItem?void 0:e);null!==i&&i.addEventListener(WCF_CLICK_EVENT,this._showReactionOverlay.bind(this,t.objectId))},_showReactionOverlay:function(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()},_showOverlay:function(){this._options.parameters.data.containerID=this._objectType+"-"+this._currentObjectId,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){c.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),s.open(this,e.returnValues.template),s.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)},_ajaxSetup:function(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}},_dialogSetup:function(){return{id:"userReactionOverlay-"+this._objectType,options:{title:""},source:null}}},u}),define("WoltLabSuite/Core/Ui/Reaction/Handler",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Util","Ui/Alignment","Ui/CloseOverlay","Ui/Screen","WoltLabSuite/Core/Ui/Reaction/CountButtons"],function(e,t,i,n,o,r,a,l,s){"use strict";function c(e,t){this.init(e,t)}return c.prototype={init:function(e,o){if(""===o.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new i,this._objectType=e,this._cache=new i,this._objects=new i,this._popoverCurrentObjectId=0,this._popover=null,this._popoverContent=null,this._options=t.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},o),this.initReactButtons(o,e),this.countButtons=new s(this._objectType,this._options),n.add("WoltLabSuite/Core/Ui/Reaction/Handler-"+e,this.initReactButtons.bind(this)),a.add("WoltLabSuite/Core/Ui/Reaction/Handler",this._closePopover.bind(this))},initReactButtons:function(){for(var e,t,i,r=elBySelAll(this._options.containerSelector),a=!1,l=0,s=r.length;l<s;l++)if(e=r[l],!this._containers.has(o.identify(e))){i=~~elData(e,"object-id"),t={reactButton:null,objectId:i,element:e},this._containers.set(o.identify(e),t),this._initReactButton(e,t);var c=[];this._objects.has(i)&&(c=this._objects.get(i)),c.push(t),this._objects.set(i,c),a=!0}a&&n.trigger()},_initReactButton:function(e,t){if(this._options.isSingleItem?t.reactButton=elBySel(this._options.buttonSelector):t.reactButton=elBySel(this._options.buttonSelector,e),null!==t.reactButton&&0!==t.reactButton.length){if(1===Object.keys(REACTION_TYPES).length){var i=REACTION_TYPES[Object.keys(REACTION_TYPES)[0]];t.reactButton.title=i.title;elBySel(".invisible",t.reactButton).innerText=i.title}t.reactButton.addEventListener(WCF_CLICK_EVENT,this._toggleReactPopover.bind(this,t.objectId,t.reactButton))}},_updateReactButton:function(e,t){this._objects.get(e).forEach(function(e){null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),elData(e.reactButton,"reaction-type-id",t)):(elData(e.reactButton,"reaction-type-id",0),e.reactButton.classList.remove("active")))})},_markReactionAsActive:function(){var e=null;if(this._objects.get(this._popoverCurrentObjectId).forEach(function(t){null!==t.reactButton&&(e=~~elData(t.reactButton,"reaction-type-id"))}),null===e)throw new Error("Unable to find react button for current popover.");elBySelAll(".reactionTypeButton.active",this._getPopover(),function(e){e.classList.remove("active")});var t=elBySel(".reactionPopoverContent",this._getPopover());if(e){var i=elBySel('.reactionTypeButton[data-reaction-type-id="'+e+'"]',this._getPopover());i.classList.add("active"),0==~~elData(i,"is-assignable")&&elShow(i),this._scrollReactionIntoView(t,i)}else l.is("screen-xs")&&(this._getPopover().classList.contains("inverseOrder")?t.scrollTop=0:t.scrollTop=t.scrollHeight-t.clientHeight)},_scrollReactionIntoView:function(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2},_toggleReactPopover:function(e,t,i){if(null!==i&&(i.preventDefault(),i.stopPropagation()),1===Object.keys(REACTION_TYPES).length){var n=REACTION_TYPES[Object.keys(REACTION_TYPES)[0]];this._popoverCurrentObjectId=e,this._react(n.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover(e,t)},_openReactPopover:function(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,r.set(this._getPopover(),t,{pointer:!0,horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:l.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");var i=this._getPopover(),n="auto"===i.style.getPropertyValue("bottom");i.classList[n?"add":"remove"]("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),i.classList.remove("forceHide"),i.classList.add("active")},_getPopover:function(){if(null==this._popover){this._popover=elCreate("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=elCreate("div"),this._popoverContent.className="reactionPopoverContent";var e=elCreate("ul");e.className="reactionTypeButtonList";var t=this._getSortedReactionTypes();for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],r=elCreate("li");r.className="reactionTypeButton jsTooltip",elData(r,"reaction-type-id",o.reactionTypeID),elData(r,"title",o.title),elData(r,"is-assignable",~~o.isAssignable),r.title=o.title;var a=elCreate("span");a.className="reactionTypeButtonTitle",a.innerHTML=o.title,r.innerHTML=o.renderedIcon,r.appendChild(a),r.addEventListener(WCF_CLICK_EVENT,this._react.bind(this,o.reactionTypeID)),o.isAssignable||elHide(r),e.appendChild(r)}this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",this._rebuildOverflowIndicator.bind(this),{passive:!0}),this._popover.appendChild(this._popoverContent);var l=elCreate("span");l.className="elementPointer",l.appendChild(elCreate("span")),this._popover.appendChild(l),document.body.appendChild(this._popover),n.trigger()}return this._popover},_rebuildOverflowIndicator:function(){var e=this._popoverContent.scrollTop>0;this._popoverContent.classList[e?"add":"remove"]("overflowTop");var t=this._popoverContent.scrollTop+this._popoverContent.clientHeight<this._popoverContent.scrollHeight;this._popoverContent.classList[t?"add":"remove"]("overflowBottom")},_getSortedReactionTypes:function(){var e=[];for(var t in REACTION_TYPES)REACTION_TYPES.hasOwnProperty(t)&&e.push(REACTION_TYPES[t]);return e.sort(function(e,t){return e.showOrder-t.showOrder}),e},_closePopover:function(){0!==this._popoverCurrentObjectId&&(this._getPopover().classList.remove("active"),elBySelAll('.reactionTypeButton[data-is-assignable="0"]',this._getPopover(),elHide),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach(function(e){e.reactButton.closest("nav").style.cssText=""}),this._popoverCurrentObjectId=0)},_react:function(t){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=t,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,e.api(this,{parameters:this._options.parameters}),this._closePopover())},_ajaxSuccess:function(e){this.countButtons.updateCountButtons(e.returnValues.objectID,e.returnValues.reactions),this._updateReactButton(e.returnValues.objectID,e.returnValues.reactionTypeID)},_ajaxSetup:function(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}},c}),define("WoltLabSuite/Core/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/User/List","User","WoltLabSuite/Core/Ui/Reaction/Handler"],function(e,t,i,n,o,r,a,l,s,c,u,d){"use strict";function h(e,t){this.init(e,t)}return h.prototype={init:function(e,i){if(""===i.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new o,this._details=new o,this._objectType=e,this._options=t.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"},i),this.initContainers(i,e),a.add("WoltLabSuite/Core/Ui/Like/Handler-"+e,this.initContainers.bind(this)),new d(this._objectType,{containerSelector:this._options.containerSelector,summaryListSelector:".reactionSummaryList"})},initContainers:function(){for(var e,t,i=elBySelAll(this._options.containerSelector),n=!1,o=0,r=i.length;o<r;o++)e=i[o],this._containers.has(e)||(t={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~elData(e,"like-dislikes"),liked:~~elData(e,"like-liked"),likes:~~elData(e,"like-likes"),objectId:~~elData(e,"object-id"),users:JSON.parse(elData(e,"like-users"))},this._containers.set(e,t),this._buildWidget(e,t),n=!0);n&&a.trigger()},_buildWidget:function(e,t){var i,n,o,a=!0;if(o=this._options.isSingleItem?elBySel(this._options.summarySelector):elBySel(this._options.summarySelector,e),null===o&&(o=this._options.isSingleItem?elBySel(this._options.badgeContainerSelector):elBySel(this._options.badgeContainerSelector,e),a=!1),null!==o){i=elCreate("ul"),i.classList.add("reactionSummaryList"),a?i.classList.add("likesSummary"):i.classList.add("reactionSummaryListTiny");for(var s in t.users)if("reactionTypeID"!==s&&REACTION_TYPES.hasOwnProperty(s)){var c=elCreate("li");c.className="reactCountButton",elData(c,"reaction-type-id",s);var d=elCreate("span");d.className="reactionCount",d.innerHTML=r.shortUnit(t.users[s]),c.appendChild(d),c.innerHTML=REACTION_TYPES[s].renderedIcon+c.innerHTML,i.appendChild(c)}a?this._options.summaryPrepend?l.prepend(i,o):o.appendChild(i):"OL"===o.nodeName||"UL"===o.nodeName?(n=elCreate("li"),n.appendChild(i),o.appendChild(n)):o.appendChild(i),t.badge=i}if(this._options.canLike&&(u.userId!=elData(e,"user-id")||this._options.canLikeOwnContent)){var h=this._options.buttonAppendToSelector?this._options.isSingleItem?elBySel(this._options.buttonAppendToSelector):elBySel(this._options.buttonAppendToSelector,e):null,f=this._options.buttonBeforeSelector?this._options.isSingleItem?elBySel(this._options.buttonBeforeSelector):elBySel(this._options.buttonBeforeSelector,e):null;if(null===f&&null===h)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,f,h)}},_createButton:function(e,t,i,o){var r=n.get("wcf.reactions.react"),a=elCreate("li");a.className="wcfReactButton";var l=elCreate("a");l.className="jsTooltip reactButton",this._options.renderAsButton&&l.classList.add("button"),l.href="#",l.title=r;var s=elCreate("span");s.className="icon icon16 fa-smile-o",void 0===t||0==t?elData(s,"reaction-type-id",0):(elData(l,"reaction-type-id",t),l.classList.add("active")),l.appendChild(s);var c=elCreate("span");return c.className="invisible",c.innerHTML=r,l.appendChild(document.createTextNode(" ")),l.appendChild(c),a.appendChild(l),i?i.parentNode.insertBefore(a,i):o.appendChild(a),l}},h}),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["Ajax","Core","Dictionary","Environment","EventHandler","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},rebuild:function(){},_click:function(){},_clickDropdown:function(){},_dropdownBuild:function(){},_dropdownToggle:function(){},_dropdownGetItems:function(){},_dropdownOpen:function(){},_dropdownSelect:function(){},_clickDropdownItem:function(){},_prepare:function(){},_showEditor:function(){},_restoreMessage:function(){},_save:function(){},_validate:function(){},throwError:function(){},_showMessage:function(){},_hideEditor:function(){},_restoreEditor:function(){},_destroyEditor:function(){},_getHash:function(){},_updateHistory:function(){},_getEditorId:function(){},_getObjectId:function(){},_ajaxFailure:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},legacyEdit:function(){}},f}),define("WoltLabSuite/Core/Ui/Message/Manager",["Ajax","Core","Dictionary","Language","Dom/ChangeListener","Dom/Util"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={init:function(){},rebuild:function(){},getPermission:function(){},getPropertyValue:function(){},update:function(){},updateItems:function(){},updateAllItems:function(){},setNote:function(){},_update:function(){},_updateState:function(){},_toggleMessageStatus:function(){},_getAttributeName:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){}},a}),define("WoltLabSuite/Core/Ui/Message/Reply",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i,n,o,r,a,l,s,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},_submitGuestDialog:function(){},_submit:function(){},_validate:function(){},throwError:function(){},_showLoadingOverlay:function(){},_hideLoadingOverlay:function(){},_reset:function(){},_handleError:function(){},_getEditor:function(){},_insertMessage:function(){},_ajaxSuccess:function(){},_ajaxFailure:function(){},_ajaxSetup:function(){}},f}),define("WoltLabSuite/Core/Ui/Message/Share",["EventHandler","StringUtil"],function(e,t){"use strict";return{_pageDescription:"",_pageUrl:"",init:function(){var i=elBySel('meta[property="og:title"]');null!==i&&(this._pageDescription=encodeURIComponent(i.content));var n=elBySel('meta[property="og:url"]');null!==n&&(this._pageUrl=encodeURIComponent(n.content)),elBySelAll(".jsMessageShareButtons",null,function(i){i.classList.remove("jsMessageShareButtons");var n=encodeURIComponent(t.unescapeHTML(elData(i,"url")||""));n||(n=this._pageUrl);var o={facebook:{link:elBySel(".jsShareFacebook",i),share:function(e){e.preventDefault(),this._share("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,n)}.bind(this)},google:{link:elBySel(".jsShareGoogle",i),share:function(e){e.preventDefault(),this._share("google","https://plus.google.com/share?url={pageURL}",!1,n)}.bind(this)},reddit:{link:elBySel(".jsShareReddit",i),share:function(e){e.preventDefault(),this._share("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,n)}.bind(this)},twitter:{link:elBySel(".jsShareTwitter",i),share:function(e){e.preventDefault(),this._share("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,n)}.bind(this)},linkedIn:{link:elBySel(".jsShareLinkedIn",i),share:function(e){e.preventDefault(),this._share("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,n)}.bind(this)},pinterest:{link:elBySel(".jsSharePinterest",i),share:function(e){e.preventDefault(),this._share("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,n)}.bind(this)},xing:{link:elBySel(".jsShareXing",i),share:function(e){e.preventDefault(),this._share("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,n)}.bind(this)},whatsApp:{link:elBySel(".jsShareWhatsApp",i),share:function(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+this._pageDescription+"%20"+this._pageUrl}.bind(this)}};e.fire("com.woltlab.wcf.message.share","shareProvider",{container:i,providers:o,pageDescription:this._pageDescription,pageUrl:this._pageUrl});for(var r in o)o.hasOwnProperty(r)&&null!==o[r].link&&o[r].link.addEventListener(WCF_CLICK_EVENT,o[r].share)}.bind(this))},_share:function(e,t,i,n){n||(n=this._pageUrl),window.open(t.replace(/\{pageURL}/,n).replace(/\{text}/,this._pageDescription+(i?"%20"+n:"")),e,"height=600,width=600")}}}),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["https://platform.twitter.com/widgets.js"],function(e){"use strict";var t=new Promise(function(e,t){twttr.ready(e)});return{embedTweet:function(e,i,n){return void 0===n&&(n=!1),t.then(function(){return twttr.widgets.createTweet(i,e,{dnt:!0,lang:document.documentElement.lang})}).then(function(t){if(t&&n){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(t)}return t})},embedAll:function(){elBySelAll("[data-wsc-twitter-tweet]",void 0,function(e){var t=elData(e,"wsc-twitter-tweet");t&&(this.embedTweet(e,t,!0),elData(e,"wsc-twitter-tweet",""))}.bind(this))}}}),define("WoltLabSuite/Core/Ui/Page/Search",["Ajax","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={open:function(){},_search:function(){},_click:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},_dialogSetup:function(){}},a}),define("WoltLabSuite/Core/Ui/Sortable/List",["Core","Ui/Screen"],function(e,t){"use strict";var i=function(){};return i.prototype={init:function(){},_enable:function(){},_disable:function(){}},i}),define("WoltLabSuite/Core/Ui/Poll/Editor",["Core","Dom/Util","EventHandler","EventKey","Language","WoltLabSuite/Core/Date/Picker","WoltLabSuite/Core/Ui/Sortable/List"],function(e,t,i,n,o,r,a){"use strict";function l(e,t,i,n){this.init(e,t,i,n)}return l.prototype={init:function(t,n,o,r){if(this._container=elById(t),null===this._container)throw new Error("Unknown poll editor container with id '"+t+"'.");if(this._wysiwygId=o,""!==o&&null===elById(o))throw new Error("Unknown wysiwyg field with id '"+o+"'.");this.questionField=elById(this._wysiwygId+"Poll_question");var l=elByClass("sortableList",this._container);if(0===l.length)throw new Error("Cannot find poll options list for container with id '"+t+"'.");if(this.optionList=l[0],this.endTimeField=elById(this._wysiwygId+"Poll_endTime"),this.maxVotesField=elById(this._wysiwygId+"Poll_maxVotes"),this.isChangeableYesField=elById(this._wysiwygId+"Poll_isChangeable"),this.isChangeableNoField=elById(this._wysiwygId+"Poll_isChangeable_no"),this.isPublicYesField=elById(this._wysiwygId+"Poll_isPublic"),this.isPublicNoField=elById(this._wysiwygId+"Poll_isPublic_no"),this.resultsRequireVoteYesField=elById(this._wysiwygId+"Poll_resultsRequireVote"),this.resultsRequireVoteNoField=elById(this._wysiwygId+"Poll_resultsRequireVote_no"),this.sortByVotesYesField=elById(this._wysiwygId+"Poll_sortByVotes"),this.sortByVotesNoField=elById(this._wysiwygId+"Poll_sortByVotes_no"),this._optionCount=0,this._options=e.extend({isAjax:!1,maxOptions:20},r),this._createOptionList(n||[]),new a({containerId:t,options:{toleranceElement:"> div"}}),this._options.isAjax)for(var s=["handleError","reset","submit","validate"],c=0,u=s.length;c<u;c++){var d=s[c];i.add("com.woltlab.wcf.redactor2",d+"_"+this._wysiwygId,this["_"+d].bind(this))}else{var h=this._container.closest("form");if(null===h)throw new Error("Cannot find form for container with id '"+t+"'.");h.addEventListener("submit",this._submit.bind(this))}},_addOption:function(e){if(e.preventDefault(),this._optionCount===this._options.maxOptions)return!1;this._createOption(void 0,void 0,e.currentTarget.closest("li"))},_createOption:function(e,i,n){e=e||"",i=~~i||0;var r=elCreate("LI");r.className="sortableNode",elData(r,"option-id",i),n?t.insertAfter(r,n):this.optionList.appendChild(r);var a=elCreate("div");a.className="pollOptionInput",r.appendChild(a);var l=elCreate("span");l.className="icon icon16 fa-arrows sortableNodeHandle",a.appendChild(l);var s=elCreate("a");elAttr(s,"role","button"),elAttr(s,"href","#"),s.className="icon icon16 fa-plus jsTooltip jsAddOption pointer",elAttr(s,"title",o.get("wcf.poll.button.addOption")),s.addEventListener("click",this._addOption.bind(this)),a.appendChild(s);var c=elCreate("a");elAttr(c,"role","button"),elAttr(c,"href","#"),c.className="icon icon16 fa-times jsTooltip jsDeleteOption pointer",elAttr(c,"title",o.get("wcf.poll.button.removeOption")),c.addEventListener("click",this._removeOption.bind(this)),a.appendChild(c);var u=elCreate("input");elAttr(u,"type","text"),u.value=e,elAttr(u,"maxlength",255),u.addEventListener("keydown",this._optionInputKeyDown.bind(this)),u.addEventListener("click",function(){document.activeElement!==this&&this.focus()}),a.appendChild(u),null!==n&&u.focus(),++this._optionCount===this._options.maxOptions&&elBySelAll("span.jsAddOption",this.optionList,function(e){e.classList.remove("pointer"),e.classList.add("disabled")})},_createOptionList:function(e){for(var t=0,i=e.length;t<i;t++){var n=e[t];this._createOption(n.optionValue,n.optionID)}this._optionCount<this._options.maxOptions&&this._createOption()},_handleError:function(e){switch(e.returnValues.fieldName){case this._wysiwygId+"Poll_endTime":case this._wysiwygId+"Poll_maxVotes":var i=e.returnValues.fieldName.replace(this._wysiwygId+"Poll_",""),n=elCreate("small");n.className="innerError",n.innerHTML=o.get("wcf.poll."+i+".error."+e.returnValues.errorType);var r=elById(e.returnValues.fieldName);r.closest("dd");t.prepend(n,r.nextSibling),e.cancel=!0}},_optionInputKeyDown:function(t){n.Enter(t)&&(e.triggerEvent(elByClass("jsAddOption",t.currentTarget.parentNode)[0],"click"),t.preventDefault())},_removeOption:function(e){e.preventDefault(),elRemove(e.currentTarget.closest("li")),this._optionCount--,elBySelAll("span.jsAddOption",this.optionList,function(e){e.classList.add("pointer"),e.classList.remove("disabled")}),0===this.optionList.length&&this._createOption()},_reset:function(){this.questionField.value="",this._optionCount=0,this.optionList.innerHtml="",this._createOption(),r.clear(this.endTimeField),this.maxVotesField.value=1,this.isChangeableYesField.checked=!1,this.isChangeableNoField.checked=!0,this.isPublicYesField=!1,this.isPublicNoField=!0,this.resultsRequireVoteYesField=!1,this.resultsRequireVoteNoField=!0,this.sortByVotesYesField=!1,this.sortByVotesNoField=!0,i.fire("com.woltlab.wcf.poll.editor","reset",{pollEditor:this})},_submit:function(e){for(var t=[],n=0,o=this.optionList.children.length;n<o;n++){var r=this.optionList.children[n],a=elBySel("input[type=text]",r).value.trim();""!==a&&t.push(elData(r,"option-id")+"_"+a)}if(this._options.isAjax)e.poll={},e.poll[this.questionField.id]=this.questionField.value,e.poll[this._wysiwygId+"Poll_options"]=t,e.poll[this.endTimeField.id]=this.endTimeField.value,e.poll[this.maxVotesField.id]=this.maxVotesField.value,e.poll[this.isChangeableYesField.id]=!!this.isChangeableYesField.checked,e.poll[this.isPublicYesField.id]=!!this.isPublicYesField.checked,e.poll[this.resultsRequireVoteYesField.id]=!!this.resultsRequireVoteYesField.checked,e.poll[this.sortByVotesYesField.id]=!!this.sortByVotesYesField.checked,i.fire("com.woltlab.wcf.poll.editor","submit",{event:e,pollEditor:this});else for(var l=this._container.closest("form"),n=0,o=t.length;n<o;n++){var s=elCreate("input");elAttr(s,"type","hidden"),elAttr(s,"name",this._wysiwygId+"Poll_options["+n+"]"),s.value=t[n],l.appendChild(s)}},_validate:function(e){if(""!==this.questionField.value.trim()){for(var t=0,n=0,r=this.optionList.children.length;n<r;n++){""!==elBySel("input[type=text]",this.optionList.children[n]).value.trim()&&t++}if(0===t)e.api.throwError(this._container,o.get("wcf.global.form.error.empty")),e.valid=!1;else{var a=~~this.maxVotesField.value;a&&a>t?(e.api.throwError(this.maxVotesField.parentNode,o.get("wcf.poll.maxVotes.error.invalid")),e.valid=!1):i.fire("com.woltlab.wcf.poll.editor","validate",{data:e,pollEditor:this})}}}},l}),define("WoltLabSuite/Core/Ui/Redactor/Article",["WoltLabSuite/Core/Ui/Article/Search"],function(e){"use strict";var t=function(){};return t.prototype={init:function(){},_click:function(){},_insert:function(){}},t}),define("WoltLabSuite/Core/Ui/Redactor/Metacode",["EventHandler","Dom/Util"],function(e,t){"use strict";var i=function(){};return i.prototype={convert:function(){},convertFromHtml:function(){},_getOpeningTag:function(){},_getClosingTag:function(){},_getFirstParagraph:function(){},_getLastParagraph:function(){},_parseAttributes:function(){}},i}),define("WoltLabSuite/Core/Ui/Redactor/Autosave",["Core","Devtools","EventHandler","Language","Dom/Traverse","./Metacode"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={init:function(){},
 getInitialValue:function(){},getMetaData:function(){},watch:function(){},destroy:function(){},clear:function(){},createOverlay:function(){},hideOverlay:function(){},_saveToStorage:function(){},_cleanup:function(){}},a}),define("WoltLabSuite/Core/Ui/Redactor/PseudoHeader",[],function(){"use strict";var e=function(){};return e.prototype={getHeight:function(){}},e}),define("WoltLabSuite/Core/Ui/Redactor/Code",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader","prism/prism-meta"],function(e,t,i,n,o,r,a,l){"use strict";var s=function(){};return s.prototype={init:function(){},_bbcodeCode:function(){},_observeLoad:function(){},_edit:function(){},_setTitle:function(){},_delete:function(){},_dialogSetup:function(){},_dialogSubmit:function(){}},s}),define("WoltLabSuite/Core/Ui/Redactor/Format",["Dom/Util"],function(e){"use strict";var t=function(){};return t.prototype={format:function(){},removeFormat:function(){},_handleParentNodes:function(){},_getLastMatchingParent:function(){},_isBoundaryElement:function(){},_getSelectionMarker:function(){}},t}),define("WoltLabSuite/Core/Ui/Redactor/Html",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader"],function(e,t,i,n,o,r,a){"use strict";var l=function(){};return l.prototype={init:function(){},_bbcodeCode:function(){},_observeLoad:function(){},_edit:function(){},_save:function(){},_setTitle:function(){},_delete:function(){},_dialogSetup:function(){}},l}),define("WoltLabSuite/Core/Ui/Redactor/Link",["Core","EventKey","Language","Ui/Dialog"],function(e,t,i,n){"use strict";var o=function(){};return o.prototype={showDialog:function(){},_submit:function(){},_dialogSetup:function(){}},o}),define("WoltLabSuite/Core/Ui/Redactor/Mention",["Ajax","Environment","StringUtil","Ui/CloseOverlay"],function(e,t,i,n){"use strict";var o=function(){};return o.prototype={init:function(){},_keyDown:function(){},_keyUp:function(){},_getTextLineInFrontOfCaret:function(){},_getDropdownMenuPosition:function(){},_setUsername:function(){},_selectMention:function(){},_updateDropdownPosition:function(){},_selectItem:function(){},_hideDropdown:function(){},_ajaxSetup:function(){},_ajaxSuccess:function(){}},o}),define("WoltLabSuite/Core/Ui/Redactor/Page",["WoltLabSuite/Core/Ui/Page/Search"],function(e){"use strict";var t=function(){};return t.prototype={init:function(){},_click:function(){},_insert:function(){}},t}),define("WoltLabSuite/Core/Ui/Redactor/Quote",["Core","EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./Metacode","./PseudoHeader"],function(e,t,i,n,o,r,a,l,s){"use strict";var c=function(){};return c.prototype={init:function(){},_insertQuote:function(){},_click:function(){},_observeLoad:function(){},_edit:function(){},_save:function(){},_setTitle:function(){},_delete:function(){},_dialogSetup:function(){},_dialogSubmit:function(){}},c}),define("WoltLabSuite/Core/Ui/Redactor/Spoiler",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader"],function(e,t,i,n,o,r,a){"use strict";var l=function(){};return l.prototype={init:function(){},_bbcodeSpoiler:function(){},_observeLoad:function(){},_edit:function(){},_setTitle:function(){},_delete:function(){},_dialogSetup:function(){},_dialogSubmit:function(){}},l}),define("WoltLabSuite/Core/Ui/Redactor/Table",["Language","Ui/Dialog"],function(e,t){"use strict";var i=function(){};return i.prototype={showDialog:function(){},_submit:function(){},_dialogSetup:function(){}},i}),define("WoltLabSuite/Core/Ui/Search/Page",["Core","Dom/Traverse","Dom/Util","Ui/Screen","Ui/SimpleDropdown","./Input"],function(e,t,i,n,o,r){"use strict";return{init:function(a){var l=elById("pageHeaderSearchInput");new r(l,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit:function(e){if(e.classList.add("dropdownMenuPageSearch"),n.is("screen-lg")){elData(e,"dropdown-alignment-horizontal","right");var t=l.clientWidth;e.style.setProperty("min-width",t+"px","");var o=l.parentNode,r=i.offset(o).left+o.clientWidth-(i.offset(l).left+t),a=i.styleAsInt(window.getComputedStyle(o),"padding-bottom");e.style.setProperty("transform","translateX(-"+Math.ceil(r)+"px) translateY(-"+a+"px)","")}},callbackSelect:function(){return setTimeout(function(){t.parentByTag(l,"FORM").submit()},1),!0}});var s=o.getDropdownMenu(i.identify(elBySel(".pageHeaderSearchType"))),c=this._click.bind(this);elBySelAll("a[data-object-type]",s,function(e){e.addEventListener(WCF_CLICK_EVENT,c)});var u=elBySel('a[data-object-type="'+a+'"]',s);e.triggerEvent(u,WCF_CLICK_EVENT)},_click:function(e){e.preventDefault();var t=elById("pageHeader");t.classList.add("searchBarForceOpen"),window.setTimeout(function(){t.classList.remove("searchBarForceOpen")},10);var i=elData(e.currentTarget,"object-type"),n=elById("pageHeaderSearchParameters");n.innerHTML="";var o=elData(e.currentTarget,"extended-link");o&&(elBySel(".pageHeaderSearchExtendedLink").href=o);var r=elData(e.currentTarget,"parameters");r=r?JSON.parse(r):{},i&&(r["types[]"]=i);for(var a in r)if(r.hasOwnProperty(a)){var l=elCreate("input");l.type="hidden",l.name=a,l.value=r[a],n.appendChild(l)}elBySel(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel",elById("pageHeaderSearchInputContainer")).textContent=e.currentTarget.textContent}}}),define("WoltLabSuite/Core/Ui/Smiley/Insert",["EventHandler","EventKey"],function(e,t){"use strict";function i(e){this.init(e)}return i.prototype={_container:null,_editorId:"",init:function(e){if(this._editorId=e,this._container=elById("smilies-"+this._editorId),!this._container&&(this._container=elById(this._editorId+"SmiliesTabContainer"),!this._container))throw new Error("Unable to find the message tab menu container containing the smilies.");this._container.addEventListener("keydown",this._keydown.bind(this)),this._container.addEventListener("mousedown",this._mousedown.bind(this))},_keydown:function(e){var i=document.activeElement;if(i.classList.contains("jsSmiley"))if(t.ArrowLeft(e)||t.ArrowRight(e)||t.Home(e)||t.End(e)){e.preventDefault();var n=Array.prototype.slice.call(elBySelAll(".jsSmiley",e.currentTarget));t.ArrowLeft(e)&&n.reverse();var o=n.indexOf(i);t.Home(e)?o=0:t.End(e)?o=n.length-1:(o+=1)===n.length&&(o=0),n[o].focus()}else(t.Enter(e)||t.Space(e))&&(e.preventDefault(),this._insert(elBySel("img",i)))},_mousedown:function(e){var t=e.target.closest("li");if(this._container.contains(t)){e.preventDefault();var i=elBySel("img",t);i&&this._insert(i)}},_insert:function(t){e.fire("com.woltlab.wcf.redactor2","insertSmiley_"+this._editorId,{img:t})}},i}),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["Language","Ui/Dialog","WoltLabSuite/Core/Ui/ItemList/Filter"],function(e,t,i){"use strict";var n=function(){};return n.prototype={setup:function(){},open:function(){},_click:function(){},_dialogSetup:function(){}},n}),define("WoltLabSuite/Core/Ui/Toggle/Input",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(t,i){if(this._element=elBySel(t),null===this._element)throw new Error("Unable to find element by selector '"+t+"'.");var n="INPUT"===this._element.nodeName?elAttr(this._element,"type"):"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this._options=e.extend({hide:[],show:[]},i),["hide","show"].forEach(function(e){var t,i,n;for(i=0,n=this._options[e].length;i<n;i++)if("string"!=typeof(t=this._options[e][i])&&!(t instanceof Element))throw new TypeError("The array '"+e+"' may only contain string selectors or DOM elements.")}.bind(this)),this._element.addEventListener("change",this._change.bind(this)),this._handleElements(this._options.show,this._element.checked),this._handleElements(this._options.hide,!this._element.checked)},_change:function(e){var t=e.currentTarget.checked;this._handleElements(this._options.show,t),this._handleElements(this._options.hide,!t)},_handleElements:function(e,t){for(var i,n,o=0,r=e.length;o<r;o++){if("string"==typeof(i=e[o])){if(null===(n=elBySel(i)))throw new Error("Unable to find element by selector '"+i+"'.");e[o]=i=n}window[t?"elShow":"elHide"](i)}}},t}),define("WoltLabSuite/Core/Ui/User/Editor",["Ajax","Language","StringUtil","Dom/Util","Ui/Dialog","Ui/Notification"],function(e,t,i,n,o,r){"use strict";var a=function(){};return a.prototype={init:function(){},_click:function(){},_submit:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},_dialogSetup:function(){}},a}),define("WoltLabSuite/Core/Ui/User/PasswordStrength",["Core","Language"],function(e,t){"use strict";function i(e,t){return e.map(t).reduce(function(e,t){return e.concat(t)},[])}function n(e){return[].concat(e,e.split(/\W+/))}function o(i){var n=e.extend({},i.default_phrases);for(var o in n)if(n.hasOwnProperty(o))for(var r in n[o])if(n[o].hasOwnProperty(r)){var a="wcf.user.password.zxcvbn."+o+"."+r,l=t.get(a);l!==a&&(n[o][r]=l)}return new i(n)}function r(e,t){require(["zxcvbn"]).then(function(i){var n=i[0];this.init(n,e,t)}.bind(this))}var a=[];return elBySel('meta[property="og:site_name"]')&&a.push(elBySel('meta[property="og:site_name"]').getAttribute("content")),r.prototype={init:function(i,n,r){this._zxcvbn=i,this._input=n,this._options=e.extend({relatedInputs:[],staticDictionary:[]},r),this._options.feedbacker||(this._options.feedbacker=o(i.Feedback)),this._wrapper=elCreate("div"),this._wrapper.className="inputAddon inputAddonPasswordStrength",this._input.parentNode.insertBefore(this._wrapper,this._input),this._wrapper.appendChild(this._input);var a=elCreate("div");a.className="passwordStrengthRating";var l=elCreate("small");l.textContent=t.get("wcf.user.password.strength"),a.appendChild(l),this._score=elCreate("span"),this._score.className="passwordStrengthScore",elData(this._score,"score","-1"),a.appendChild(this._score),this._wrapper.appendChild(a),this._feedback=elCreate("div"),this._feedback.className="passwordStrengthFeedback",this._wrapper.appendChild(this._feedback),this._verdictResult=elCreate("input"),this._verdictResult.type="hidden",this._verdictResult.name=this._input.name+"_passwordStrengthVerdict",this._wrapper.parentNode.insertBefore(this._verdictResult,this._wrapper);var s=this._evaluate.bind(this);this._input.addEventListener("input",s),this._options.relatedInputs.forEach(function(e){e.addEventListener("input",s)}),""!==this._input.value.trim()&&this._evaluate()},_evaluate:function(e){var t=i(a.concat(this._options.staticDictionary,this._options.relatedInputs.map(function(e){return e.value.trim()})),n).filter(function(e){return e.length>0}),o=this._input.value.trim(),r=this._zxcvbn(o.substr(0,100),t);r.feedback=this._options.feedbacker.from_result(r),elData(this._score,"score",0===o.length?"-1":r.score),void 0!==e&&elInnerError(this._wrapper,r.feedback.warning),this._verdictResult.value=JSON.stringify(r)}},r}),define("WoltLabSuite/Core/Controller/Condition/Page/Dependence",["Dom/ChangeListener","Dom/Traverse","EventHandler","ObjectMap"],function(e,t,i,n){"use strict";var o=function(){};return o.prototype={register:function(){},_checkVisibility:function(){},_hideDependentElement:function(){},_showDependentElement:function(){}},o}),define("WoltLabSuite/Core/Controller/Map/Route/Planner",["Dom/Traverse","Dom/Util","Language","Ui/Dialog","WoltLabSuite/Core/Ajax/Status"],function(e,t,i,n,o){function r(e,t){if(this._button=elById(e),null===this._button)throw new Error("Unknown button with id '"+e+"'");this._button.addEventListener("click",this._openDialog.bind(this)),this._destination=t}return r.prototype={_dialogSetup:function(){return{id:this._button.id+"Dialog",options:{onShow:this._initDialog.bind(this),title:i.get("wcf.map.route.planner")},source:'<div class="googleMapsDirectionsContainer" style="display: none;"><div class="googleMap"></div><div class="googleMapsDirections"></div></div><small class="googleMapsDirectionsGoogleLinkContainer"><a href="'+this._getGoogleMapsLink()+'" class="googleMapsDirectionsGoogleLink" target="_blank" style="display: none;">'+i.get("wcf.map.route.viewOnGoogleMaps")+"</a></small><dl><dt>"+i.get("wcf.map.route.origin")+'</dt><dd><input type="text" name="origin" class="long" autofocus /></dd></dl><dl style="display: none;"><dt>'+i.get("wcf.map.route.travelMode")+'</dt><dd><select name="travelMode"><option value="driving">'+i.get("wcf.map.route.travelMode.driving")+'</option><option value="walking">'+i.get("wcf.map.route.travelMode.walking")+'</option><option value="bicycling">'+i.get("wcf.map.route.travelMode.bicycling")+'</option><option value="transit">'+i.get("wcf.map.route.travelMode.transit")+"</option></select></dd></dl>"}},_calculateRoute:function(e){var t=n.getDialog(this).dialog;e.label&&(this._originInput.value=e.label),void 0===this._map&&(this._map=new google.maps.Map(elByClass("googleMap",t)[0],{disableDoubleClickZoom:WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),draggable:WCF.Location.GoogleMaps.Settings.get("draggable"),mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:WCF.Location.GoogleMaps.Settings.get("scaleControl"),scrollwheel:WCF.Location.GoogleMaps.Settings.get("scrollwheel")}),this._directionsService=new google.maps.DirectionsService,this._directionsRenderer=new google.maps.DirectionsRenderer,this._directionsRenderer.setMap(this._map),this._directionsRenderer.setPanel(elByClass("googleMapsDirections",t)[0]),this._googleLink=elByClass("googleMapsDirectionsGoogleLink",t)[0]);var i={destination:this._destination,origin:e.location,provideRouteAlternatives:!0,travelMode:google.maps.TravelMode[this._travelMode.value.toUpperCase()]};o.show(),this._directionsService.route(i,this._setRoute.bind(this)),elAttr(this._googleLink,"href",this._getGoogleMapsLink(e.location,this._travelMode.value)),this._lastOrigin=e.location},_getGoogleMapsLink:function(e,t){if(e){var i="https://www.google.com/maps/dir/?api=1&origin="+e.lat()+","+e.lng()+"&destination="+this._destination.lat()+","+this._destination.lng();return t&&(i+="&travelmode="+t),i}return"https://www.google.com/maps/search/?api=1&query="+this._destination.lat()+","+this._destination.lng()},_initDialog:function(){if(!this._didInitDialog){var e=n.getDialog(this).dialog;this._originInput=elBySel('input[name="origin"]',e),new WCF.Location.GoogleMaps.LocationSearch(this._originInput,this._calculateRoute.bind(this)),this._travelMode=elBySel('select[name="travelMode"]',e),this._travelMode.addEventListener("change",this._updateRoute.bind(this)),this._didInitDialog=!0}},_openDialog:function(){n.open(this)},_setRoute:function(t,n){o.hide(),"OK"===n?(elShow(this._map.getDiv().parentNode),google.maps.event.trigger(this._map,"resize"),this._directionsRenderer.setDirections(t),elShow(e.parentByTag(this._travelMode,"DL")),elShow(this._googleLink),elInnerError(this._originInput,!1)):("OVER_QUERY_LIMIT"!==n&&"REQUEST_DENIED"!==n&&(n="NOT_FOUND"),elInnerError(this._originInput,i.get("wcf.map.route.error."+n.toLowerCase())))},_updateRoute:function(){this._calculateRoute({location:this._lastOrigin})}},r}),define("WoltLabSuite/Core/Controller/User/Notification/Settings",["Language","Ui/ReusableDropdown"],function(e,t){"use strict";return function(){}}),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["EventHandler","Ui/SimpleDropdown"],function(e,t){"use strict";function i(i,n){this._formId=i,this._suffixField=elById(n),this._suffixDropdownMenu=t.getDropdownMenu(n+"_dropdown"),this._suffixDropdownToggle=elByClass("dropdownToggle",t.getDropdown(n+"_dropdown"))[0];for(var o=this._suffixDropdownMenu.children,r=0,a=o.length;r<a;r++)o[r].addEventListener("click",this._changeSuffixSelection.bind(this));e.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",this._destroyDropdown.bind(this))}return i.prototype={_changeSuffixSelection:function(e){if(!e.currentTarget.classList.contains("disabled")){for(var t=this._suffixDropdownMenu.children,i=0,n=t.length;i<n;i++)t[i]===e.currentTarget?t[i].classList.add("active"):t[i].classList.remove("active");this._suffixField.value=elData(e.currentTarget,"value"),this._suffixDropdownToggle.innerHTML=elData(e.currentTarget,"label")+' <span class="icon icon16 fa-caret-down pointer"></span>'}},_destroyDropdown:function(e){e.formId===this._formId&&t.destroy(this._suffixDropdownMenu.id)}},i}),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e),this._aclList=null}return e.inherit(i,t,{_getData:function(){var e={};return e[this._fieldId]=this._aclList.getData(),e},_readField:function(){},setAclList:function(e){this._aclList=e}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["Core","./Field","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){return i.has(this._fieldId)?i.getData(this._fieldId):{}},_readField:function(){},destroy:function(){i.has(this._fieldId)&&i.delete(this._fieldId)}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e={};e[this._fieldId]=[];for(var t=0,i=this._fields.length;t<i;t++)this._fields[t].checked&&e[this._fieldId].push(this._fields[t].value);return e},_readField:function(){this._fields=elBySelAll('input[name="'+this._fieldId+'[]"]')}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e={};return e[this._fieldId]=~~this._field.checked,e}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Date",["Core","WoltLabSuite/Core/Date/Picker","./Field"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,i,{_getData:function(){var e={};return e[this._fieldId]=t.getValue(this._field),e}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["Core","./Field","WoltLabSuite/Core/Ui/ItemList/Static"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){var e={};e[this._fieldId]=[];for(var t=i.getValues(this._fieldId),n=0,o=t.length;n<o;n++)t[n].objectId?e[this._fieldId][t[n].objectId]=t[n].value:e[this._fieldId].push(t[n].value);return e}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){for(var e={},t=0,i=this._fields.length;t<i;t++)if(this._fields[t].checked){e[this._fieldId]=this._fields[t].value;break}return e},_readField:function(){this._fields=elBySelAll("input[name="+this._fieldId+"]")}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e=[];elBySelAll('input[name="'+this._fieldId+'[group][]"]',void 0,function(t){e.push(~~t.value)});var t=[];elBySelAll('input[name="'+this._fieldId+'[user][]"]',void 0,function(e){t.push(~~e.value)});var i={};return i[this._fieldId]={group:e,user:t},i},_readField:function(){}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["Core","./Field","WoltLabSuite/Core/Ui/ItemList"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){var e={};e[this._fieldId]=[];for(var t=i.getValues(this._fieldId),n=0,o=t.length;n<o;n++)e[this._fieldId].push(t[n].value);return e}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/User",["Core","./Field","WoltLabSuite/Core/Ui/ItemList"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){for(var e=i.getValues(this._fieldId),t=[],n=0,o=e.length;n<o;n++)e[n].objectId&&t.push(e[n].value);var r={};return r[this._fieldId]=t.join(","),r}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/Value",["Core","./Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){var e={};return e[this._fieldId]=this._field.value,e}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["Core","./Field","WoltLabSuite/Core/Language/Input"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,t,{_getData:function(){var e={},t=i.getValues(this._fieldId);return t.size>1?e[this._fieldId+"_i18n"]=t.toObject():e[this._fieldId]=t.get(0),e},destroy:function(){i.unregister(this._fieldId)}}),n}),define("WoltLabSuite/Core/Ui/Comment/Response/Add",["Core","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Notification","WoltLabSuite/Core/Ui/Comment/Add"],function(e,t,i,n,o,r,a){"use strict";var l=function(){};return l.prototype={init:function(){},getContainer:function(){},getContent:function(){},setContent:function(){},_submitGuestDialog:function(){},_submit:function(){},_getParameters:function(){},_validate:function(){},throwError:function(){},_showLoadingOverlay:function(){},_hideLoadingOverlay:function(){},_reset:function(){},_handleError:function(){},_getEditor:function(){},_insertMessage:function(){},_ajaxSuccess:function(){},_ajaxFailure:function(){},_ajaxSetup:function(){}},l}),define("WoltLabSuite/Core/Ui/Comment/Response/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll","WoltLabSuite/Core/Ui/Comment/Edit"],function(e,t,i,n,o,r,a,l,s,c,u,d,h,f){"use strict";var p=function(){};return p.prototype={init:function(){},rebuild:function(){},_click:function(){},_prepare:function(){},_showEditor:function(){},_restoreMessage:function(){},_save:function(){},_validate:function(){},throwError:function(){},_showMessage:function(){},_hideEditor:function(){},_restoreEditor:function(){},_destroyEditor:function(){},_getEditorId:function(){},_getObjectId:function(){},_ajaxFailure:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){}},p}),define("WoltLabSuite/Core/Ui/Page/Header/Fixed",["Core","EventHandler","Ui/Alignment","Ui/CloseOverlay","Ui/SimpleDropdown","Ui/Screen"],function(e,t,i,n,o,r){"use strict";var a,l,s,c,u,d,h,f=!1;return{init:function(){a=elById("pageHeader"),l=elById("pageHeaderContainer"),this._initSearchBar(),r.on("screen-md-down",{match:function(){f=!0},unmatch:function(){f=!1},setup:function(){f=!0}}),t.add("com.woltlab.wcf.Search","close",this._closeSearchBar.bind(this))},_initSearchBar:function(){c=elById("pageHeaderSearch"),c.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),s=elById("pageHeaderPanel"),u=elById("pageHeaderSearchInput"),d=elById("topMenu"),h=elById("userPanelSearchButton"),h.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),e.stopPropagation(),a.classList.contains("searchBarOpen")?this._closeSearchBar():this._openSearchBar()}.bind(this)),n.add("WoltLabSuite/Core/Ui/Page/Header/Fixed",function(){a.classList.contains("searchBarForceOpen")||this._closeSearchBar()}.bind(this)),t.add("com.woltlab.wcf.MainMenuMobile","more",function(t){"com.woltlab.wcf.search"===t.identifier&&(t.handler.close(!0),e.triggerEvent(h,WCF_CLICK_EVENT))}.bind(this))},_openSearchBar:function(){window.WCF.Dropdown.Interactive.Handler.closeAll(),a.classList.add("searchBarOpen"),h.parentNode.classList.add("open"),f||i.set(c,d,{horizontal:"right"}),c.style.setProperty("top",s.clientHeight+"px",""),u.focus(),window.setTimeout(function(){u.selectionStart=u.selectionEnd=u.value.length},1)},_closeSearchBar:function(){a.classList.remove("searchBarOpen"),h.parentNode.classList.remove("open"),["bottom","left","right","top"].forEach(function(e){c.style.removeProperty(e)}),u.blur();var e=elBySel(".pageHeaderSearchType",c);o.close(e.id)}}}),define("WoltLabSuite/Core/Ui/Page/Search/Input",["Core","WoltLabSuite/Core/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){if(n=e.extend({ajax:{className:"wcf\\data\\page\\PageAction"},callbackSuccess:null},n),"function"!=typeof n.callbackSuccess)throw new Error("Expected a valid callback function for 'callbackSuccess'.");i._super.prototype.init.call(this,t,n),this._pageId=0},setPageId:function(e){this._pageId=e},_getParameters:function(e){var t=i._super.prototype._getParameters.call(this,e);return t.objectIDs=[this._pageId],t},_ajaxSuccess:function(e){this._options.callbackSuccess(e)}}),i}),define("WoltLabSuite/Core/Ui/Page/Search/Handler",["Language","StringUtil","Dom/Util","Ui/Dialog","./Input"],function(e,t,i,n,o){"use strict";var r=null,a=null,l=null,s=null,c=null,u=null;return{open:function(t,i,o,a){r=o,n.open(this),n.setTitle(this,i),l.textContent=a?e.get(a):e.get("wcf.page.pageObjectID.search.terms"),this._getSearchInputHandler().setPageId(t)},_buildList:function(i){if(this._resetList(),!Array.isArray(i.returnValues)||0===i.returnValues.length)return void elInnerError(a,e.get("wcf.page.pageObjectID.search.noResults"));for(var n,o,r,l=0,s=i.returnValues.length;l<s;l++)o=i.returnValues[l],n=o.image,/^fa-/.test(n)&&(n='<span class="icon icon48 '+n+' pointer jsTooltip" title="'+e.get("wcf.global.select")+'"></span>'),r=elCreate("li"),elData(r,"object-id",o.objectID),r.innerHTML='<div class="box48">'+n+'<div><div class="containerHeadline"><h3><a href="'+t.escapeHTML(o.link)+'">'+t.escapeHTML(o.title)+"</a></h3>"+(o.description?"<p>"+o.description+"</p>":"")+"</div></div></div>",r.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),c.appendChild(r);elShow(u)},_resetList:function(){elInnerError(a,!1),c.innerHTML="",elHide(u)},_getSearchInputHandler:function(){if(null===s){var e=this._buildList.bind(this);s=new o(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return s},_click:function(e){"A"!==e.target.nodeName&&(e.stopPropagation(),r(elData(e.currentTarget,"object-id")),n.close(this))},_dialogSetup:function(){return{id:"wcfUiPageSearchHandler",options:{onShow:function(){null===a&&(a=elById("wcfUiPageSearchInput"),l=a.parentNode.previousSibling.childNodes[0],c=elById("wcfUiPageSearchResultList"),u=elById("wcfUiPageSearchResultListContainer")),a.value="",elHide(u),c.innerHTML="",a.focus()},title:""},source:'<div class="section"><dl><dt><label for="wcfUiPageSearchInput">'+e.get("wcf.page.pageObjectID.search.terms")+'</label></dt><dd><input type="text" id="wcfUiPageSearchInput" class="long"></dd></dl></div><section id="wcfUiPageSearchResultListContainer" class="section sectionContainerList"><header class="sectionHeader"><h2 class="sectionTitle">'+e.get("wcf.page.pageObjectID.search.results")+'</h2></header><ul id="wcfUiPageSearchResultList" class="containerList wcfUiPageSearchResultList"></ul></section>'}}}}),define("WoltLabSuite/Core/Ui/Reaction/Profile/Loader",["Ajax","Core","Language"],function(e,t,i){"use strict";function n(e){this.init(e)}return n.prototype={init:function(e){if(this._container=elById("likeList"),this._userID=e,this._reactionTypeID=null,this._targetType="received",this._options={parameters:[]},!this._userID)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'userID' given.");var t=elCreate("li");t.className="likeListMore showMore",this._noMoreEntries=elCreate("small"),this._noMoreEntries.innerHTML=i.get("wcf.like.reaction.noMoreEntries"),this._noMoreEntries.style.display="none",t.appendChild(this._noMoreEntries),this._loadButton=elCreate("button"),this._loadButton.className="small",this._loadButton.innerHTML=i.get("wcf.like.reaction.more"),this._loadButton.addEventListener(WCF_CLICK_EVENT,this._loadReactions.bind(this)),this._loadButton.style.display="none",t.appendChild(this._loadButton),this._container.appendChild(t),2===elBySel("#likeList > li").length?this._noMoreEntries.style.display="":this._loadButton.style.display="",this._setupReactionTypeButtons(),this._setupTargetTypeButtons()},_setupReactionTypeButtons:function(){for(var e,t=elBySelAll("#reactionType .button"),i=0,n=t.length;i<n;i++)e=t[i],e.addEventListener(WCF_CLICK_EVENT,this._changeReactionTypeValue.bind(this,~~elData(e,"reaction-type-id")))},_setupTargetTypeButtons:function(){for(var e,t=elBySelAll("#likeType .button"),i=0,n=t.length;i<n;i++)e=t[i],e.addEventListener(WCF_CLICK_EVENT,this._changeTargetType.bind(this,elData(e,"like-type")))},_changeTargetType:function(e){if("given"!==e&&"received"!==e)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'targetType' given.");e!==this._targetType&&(elBySel("#likeType .button.active").classList.remove("active"),elBySel('#likeType .button[data-like-type="'+e+'"]').classList.add("active"),this._targetType=e,this._reload())},_changeReactionTypeValue:function(e){var t=elBySel("#reactionType .button.active");t&&t.classList.remove("active"),this._reactionTypeID!==e?(elBySel('#reactionType .button[data-reaction-type-id="'+e+'"]').classList.add("active"),this._reactionTypeID=e):this._reactionTypeID=null,this._reload()},_reload:function(){for(var e=elBySelAll("#likeList > li:not(:first-child):not(:last-child)"),t=0,i=e.length;t<i;t++)this._container.removeChild(e[t]);elData(this._container,"last-like-time",0),this._loadReactions()},_loadReactions:function(){this._options.parameters.userID=this._userID,this._options.parameters.lastLikeTime=elData(this._container,"last-like-time"),this._options.parameters.targetType=this._targetType,this._options.parameters.reactionTypeID=this._reactionTypeID,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){e.returnValues.template?(elBySel("#likeList > li:nth-last-child(1)").insertAdjacentHTML("beforebegin",e.returnValues.template),elData(this._container,"last-like-time",e.returnValues.lastLikeTime),this._noMoreEntries.style.display="none",this._loadButton.style.display=""):(this._noMoreEntries.style.display="",this._loadButton.style.display="none")},_ajaxSetup:function(){return{data:{actionName:"load",className:"\\wcf\\data\\reaction\\ReactionAction"}}}},n}),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["Ajax","Language","Dom/Util"],function(e,t,i){"use strict";function n(e){this.init(e)}return n.prototype={init:function(e){this._containerId=e;var i=elById(this._containerId);this._list=elBySel(".recentActivityList",i);var n=elCreate("li");n.className="showMore",this._list.childElementCount?(n.innerHTML='<button class="small">'+t.get("wcf.user.recentActivity.more")+"</button>",n.children[0].addEventListener(WCF_CLICK_EVENT,this._showMore.bind(this))):n.innerHTML="<small>"+t.get("wcf.user.recentActivity.noMoreEntries")+"</small>",this._list.appendChild(n),this._showMoreItem=n,elBySelAll(".jsRecentActivitySwitchContext .button",i,function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),e.classList.contains("active")||this._switchContext()}.bind(this))}.bind(this))},_showMore:function(t){t.preventDefault(),this._showMoreItem.children[0].disabled=!0,e.api(this,{actionName:"load",parameters:{boxID:~~elData(this._list,"box-id"),filteredByFollowedUsers:elDataBool(this._list,"filtered-by-followed-users"),lastEventId:elData(this._list,"last-event-id"),lastEventTime:elData(this._list,"last-event-time"),userID:~~elData(this._list,"user-id")}})},_switchContext:function(){e.api(this,{actionName:"switchContext"},function(){window.location.hash="#"+this._containerId,window.location.reload()}.bind(this))},_ajaxSuccess:function(e){e.returnValues.template?(i.insertHtml(e.returnValues.template,this._showMoreItem,"before"),elData(this._list,"last-event-time",e.returnValues.lastEventTime),elData(this._list,"last-event-id",e.returnValues.lastEventID),this._showMoreItem.children[0].disabled=!1):this._showMoreItem.innerHTML="<small>"+t.get("wcf.user.recentActivity.noMoreEntries")+"</small>"},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}},n}),
 define("WoltLabSuite/Core/Ui/User/CoverPhoto/Delete",["Ajax","EventHandler","Language","Ui/Confirmation","Ui/Notification"],function(e,t,i,n,o){"use strict";var r,a=0;return{init:function(e){r=elBySel(".jsButtonDeleteCoverPhoto"),r.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),a=e,t.add("com.woltlab.wcf.user","coverPhoto",function(e){"string"==typeof e.url&&e.url.length>0&&elShow(r.parentNode)})},_click:function(t){t.preventDefault(),n.show({confirm:e.api.bind(e,this),message:i.get("wcf.user.coverPhoto.delete.confirmMessage")})},_ajaxSuccess:function(e){elBySel(".userProfileCoverPhoto").style.setProperty("background-image","url("+e.returnValues.url+")",""),elHide(r.parentNode),o.show()},_ajaxSetup:function(){return{data:{actionName:"deleteCoverPhoto",className:"wcf\\data\\user\\UserProfileAction",parameters:{userID:a}}}}}}),define("WoltLabSuite/Core/Ui/User/CoverPhoto/Upload",["Core","EventHandler","Upload","Ui/Notification","Ui/Dialog"],function(e,t,i,n,o){"use strict";function r(e){i.call(this,"coverPhotoUploadButtonContainer","coverPhotoUploadPreview",{action:"uploadCoverPhoto",className:"wcf\\data\\user\\UserProfileAction"}),this._userId=e}return e.inherit(r,i,{_getParameters:function(){return{userID:this._userId}},_success:function(e,i){elInnerError(this._button,i.returnValues.errorMessage),this._target.innerHTML="",i.returnValues.url&&(elBySel(".userProfileCoverPhoto").style.setProperty("background-image","url("+i.returnValues.url+")",""),o.close("userProfileCoverPhotoUpload"),n.show(),t.fire("com.woltlab.wcf.user","coverPhoto",{url:i.returnValues.url}))}}),r}),define("WoltLabSuite/Core/Ui/User/Trophy/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination","Dom/ChangeListener","List"],function(e,t,i,n,o,r,a,l){"use strict";function s(){this.init()}return s.prototype={init:function(){this._cache=new i,this._knownElements=new l,this._options={className:"wcf\\data\\user\\trophy\\UserTrophyAction",parameters:{}},this._rebuild(),a.add("WoltLabSuite/Core/Ui/User/Trophy/List",this._rebuild.bind(this))},_rebuild:function(){elBySelAll(".userTrophyOverlayList",void 0,function(e){this._knownElements.has(e)||(e.addEventListener(WCF_CLICK_EVENT,this._open.bind(this,elData(e,"user-id"))),this._knownElements.add(e))}.bind(this))},_open:function(e,t){t.preventDefault(),this._currentPageNo=1,this._currentUser=e,this._showPage()},_showPage:function(t){if(void 0!==t&&(this._currentPageNo=t),this._cache.has(this._currentUser)){if(0!==this._cache.get(this._currentUser).get("pageCount")&&(this._currentPageNo<1||this._currentPageNo>this._cache.get(this._currentUser).get("pageCount")))throw new RangeError("pageNo must be between 1 and "+this._cache.get(this._currentUser).get("pageCount")+" ("+this._currentPageNo+" given).")}else this._cache.set(this._currentUser,new i);if(this._cache.get(this._currentUser).has(this._currentPageNo)){var n=o.open(this,this._cache.get(this._currentUser).get(this._currentPageNo));if(o.setTitle("userTrophyListOverlay",this._cache.get(this._currentUser).get("title")),this._cache.get(this._currentUser).get("pageCount")>1){var a=elBySel(".jsPagination",n.content);null!==a&&new r(a,{activePage:this._currentPageNo,maxPage:this._cache.get(this._currentUser).get("pageCount"),callbackSwitch:this._showPage.bind(this)})}}else this._options.parameters.pageNo=this._currentPageNo,this._options.parameters.userID=this._currentUser,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&this._cache.get(this._currentUser).set("pageCount",~~e.returnValues.pageCount),this._cache.get(this._currentUser).set(this._currentPageNo,e.returnValues.template),this._cache.get(this._currentUser).set("title",e.returnValues.title),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserTrophyList",className:this._options.className}}},_dialogSetup:function(){return{id:"userTrophyListOverlay",options:{title:""},source:null}}},s}),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["Core","Dom/Util","Language","Ui/SimpleDropdown"],function(e,t,i,n){"use strict";function o(e,t,i){this.init(e,t,i)}return o.prototype={init:function(o,r,a){this._formFieldContainer=elById(o+"Container"),this._labelChooser=elByClass("labelChooser",this._formFieldContainer)[0],this._options=e.extend({forceSelection:!1,showWithoutSelection:!1},a),this._input=elCreate("input"),this._input.type="hidden",this._input.id=o,this._input.name=o,this._input.value=~~r,this._formFieldContainer.appendChild(this._input);var l=t.identify(this._labelChooser),s=n.getDropdownMenu(l);null===s&&(n.init(elByClass("dropdownToggle",this._labelChooser)[0]),s=n.getDropdownMenu(l));var c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=elCreate("ul"),s.appendChild(c);var u=elCreate("li");u.className="dropdownDivider",c.appendChild(u)}if(this._options.showWithoutSelection){var d=elCreate("li");elData(d,"label-id",-1),this._blockScroll(d),c.appendChild(d);var h=elCreate("span");d.appendChild(h);var f=elCreate("span");f.className="badge label",f.innerHTML=i.get("wcf.label.withoutSelection"),h.appendChild(f)}if(!this._options.forceSelection){var d=elCreate("li");elData(d,"label-id",0),this._blockScroll(d),c.appendChild(d);var h=elCreate("span");d.appendChild(h);var f=elCreate("span");f.className="badge label",f.innerHTML=i.get("wcf.label.none"),h.appendChild(f)}elBySelAll("li:not(.dropdownDivider)",s,function(e){e.addEventListener("click",this._click.bind(this)),r&&~~elData(e,"label-id")===r&&this._selectLabel(e)}.bind(this))},_blockScroll:function(e){e.addEventListener("wheel",function(e){e.preventDefault()},{passive:!1})},_click:function(e){e.preventDefault(),this._selectLabel(e.currentTarget,!1)},_selectLabel:function(e){var t=elData(e,"label-id");t||(t=0);var i=elBySel("span > span",e),n=elBySel(".dropdownToggle > span",this._labelChooser);n.className=i.className,n.textContent=i.textContent,this._input.value=t}},o}),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["Dictionary","Environment"],function(e,t){"use strict";function i(e,t,i,n){this.init(e,t,i,n)}return i.prototype={init:function(t,i,n,o){if(this._field=elBySel("#"+t+"Container"),null===this._field)throw new Error("Unknown field with id '"+t+"'");this._input=elCreate("input"),this._input.id=t,this._input.name=t,this._input.type="hidden",this._input.value=i,this._field.appendChild(this._input),this._activeCssClasses=n,this._defaultCssClasses=o,this._ratingElements=new e;var r=elBySel(".ratingList",this._field);r.addEventListener("mouseleave",this._restoreRating.bind(this)),elBySelAll("li",r,function(e){e.classList.contains("ratingMetaButton")?(e.addEventListener("click",this._metaButtonClick.bind(this)),e.addEventListener("mouseenter",this._restoreRating.bind(this))):(this._ratingElements.set(~~elData(e,"rating"),e),e.addEventListener("click",this._listItemClick.bind(this)),e.addEventListener("mouseenter",this._listItemMouseEnter.bind(this)),e.addEventListener("mouseleave",this._listItemMouseLeave.bind(this)))}.bind(this))},_listItemClick:function(e){this._input.value=~~elData(e.currentTarget,"rating"),"desktop"!==t.platform()&&this._restoreRating()},_listItemMouseEnter:function(e){var t=elData(e.currentTarget,"rating");this._ratingElements.forEach(function(e,i){var n=elByClass("icon",e)[0];this._toggleIcon(n,~~i<=~~t)}.bind(this))},_listItemMouseLeave:function(){this._ratingElements.forEach(function(e){var t=elByClass("icon",e)[0];this._toggleIcon(t,!1)}.bind(this))},_metaButtonClick:function(e){"removeRating"===elData(e.currentTarget,"action")&&(this._input.value="",this._listItemMouseLeave())},_restoreRating:function(){this._ratingElements.forEach(function(e,t){var i=elByClass("icon",e)[0];this._toggleIcon(i,~~t<=~~this._input.value)}.bind(this))},_toggleIcon:function(e,t){if(t=t||!1){for(var i=0;i<this._defaultCssClasses.length;i++)e.classList.remove(this._defaultCssClasses[i]);for(var i=0;i<this._activeCssClasses.length;i++)e.classList.add(this._activeCssClasses[i])}else{for(var i=0;i<this._activeCssClasses.length;i++)e.classList.remove(this._activeCssClasses[i]);for(var i=0;i<this._defaultCssClasses.length;i++)e.classList.add(this._defaultCssClasses[i])}}},i}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["./Manager"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={checkDependency:function(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")},getDependentNode:function(){return this._dependentElement},getField:function(){return this._field},getFields:function(){return this._fields},init:function(t,i){if(this._dependentElement=elById(t),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+t+"Container'.");if(this._field=elById(i),null===this._field){if(this._fields=[],elBySelAll("input[type=radio][name="+i+"]",void 0,function(e){this._fields.push(e)}.bind(this)),!this._fields.length&&(elBySelAll('input[type=checkbox][name="'+i+'[]"]',void 0,function(e){this._fields.push(e)}.bind(this)),!this._fields.length))throw new Error("Unknown field with id '"+i+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.tagName&&"radio"===this._field.type&&""!==elData(this._field,"no-input-id")){if(this._noField=elById(elData(this._field,"no-input-id")),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+i+"'");this._fields.push(this._noField)}e.addDependency(this)}},t}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["./Abstract","Core"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return t.inherit(i,e,{checkDependency:function(){if(null===this._field){for(var e=0,t=this._fields.length;e<t;e++)if(this._fields[e].checked)return!1;return!0}switch(this._field.tagName){case"INPUT":switch(this._field.type){case"checkbox":return!this._field.checked;case"radio":return!(!this._noField||!this._noField.checked)||!this._field.checked;default:return 0===this._field.value.trim().length}case"SELECT":return this._field.multiple?0===elBySelAll("option:checked",this._field).length:0==this._field.value||0===this._field.value.length;case"TEXTAREA":return 0===this._field.value.trim().length}}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["./Abstract","Core"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return t.inherit(i,e,{checkDependency:function(){if(null===this._field){for(var e=0,t=this._fields.length;e<t;e++)if(this._fields[e].checked)return!0;return!1}switch(this._field.tagName){case"INPUT":switch(this._field.type){case"checkbox":return this._field.checked;case"radio":return(!this._noField||!this._noField.checked)&&this._field.checked;default:return 0!==this._field.value.trim().length}case"SELECT":return this._field.multiple?0!==elBySelAll("option:checked",this._field).length:0!=this._field.value&&0!==this._field.value.length;case"TEXTAREA":return 0!==this._field.value.trim().length}}}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["./Abstract","Core","./Manager"],function(e,t,i){"use strict";function n(e,t,i){this.init(e,t),this._isNegated=!1}return t.inherit(n,e,{checkDependency:function(){if(!this._values)throw new Error("Values have not been set.");var e=[];if(this._field){if(i.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else for(var t,n=0,o=this._fields.length;n<o;n++)if(t=this._fields[n],t.checked){if(i.isHiddenByDependencies(t))return!1;e.push(t.value)}for(var n=0,o=this._values.length;n<o;n++)for(var r=0,a=e.length;r<a;r++)if(this._values[n]==e[r])return!this._isNegated;return!!this._isNegated},negate:function(e){return this._isNegated=e,this},values:function(e){return this._values=e,this}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["Core","WoltLabSuite/Core/Language/Chooser","../Value"],function(e,t,i){"use strict";function n(e){this.init(e)}return e.inherit(n,i,{destroy:function(){t.removeChooser(this._fieldId)}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["Core","../Value"],function(e,t){"use strict";function i(e){this.init(e+"_tmpHash")}return e.inherit(i,t,{}),i}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["EventHandler","../Manager"],function(e,t){"use strict";function i(e){this.init(e)}return i.prototype={checkContainer:function(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")},init:function(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=elById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");t.addContainerCheckCallback(this.checkContainer.bind(this))}},i}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["./Abstract","Core","../Manager"],function(e,t,i){"use strict";function n(e){this.init(e)}return t.inherit(n,e,{checkContainer:function(){if(!elDataBool(this._container,"ignore-dependencies")&&!i.isHiddenByDependencies(this._container)){var e=!elIsHidden(this._container),t=!1,n=this._container.children,o=0;if("H2"===this._container.children.item(0).tagName||"HEADER"===this._container.children.item(0).tagName)var o=1;for(var r=o,a=n.length;r<a;r++)if(!elIsHidden(n.item(r))){t=!0;break}e!==t&&(t?elShow(this._container):elHide(this._container),i.checkContainers())}}}),n}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["./Abstract","Core","Dom/Util","../Manager","Ui/TabMenu"],function(e,t,i,n,o){"use strict";function r(e){this.init(e)}return t.inherit(r,e,{checkContainer:function(){if(!n.isHiddenByDependencies(this._container)){for(var e=!elIsHidden(this._container),t=!1,r=this._container.children,a=0,l=r.length;a<l;a++)if(!elIsHidden(r.item(a))){t=!0;break}if(e!==t){var s=elBySel("#"+i.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]",this._container.parentNode.parentNode);if(null===s)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)elShow(this._container),elShow(s);else{elHide(this._container),elHide(s);var c=o.getTabMenu(i.identify(s.closest(".tabMenuContainer")));c.getActiveTab()===s&&c.selectFirstVisible()}n.checkContainers()}}}}),r}),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["./Abstract","Core","Dom/Util","../Manager","Ui/TabMenu"],function(e,t,i,n,o){"use strict";function r(e){this.init(e)}return t.inherit(r,e,{checkContainer:function(){if(!n.isHiddenByDependencies(this._container)){for(var e=!elIsHidden(this._container),t=!1,r=elBySelAll("#"+i.identify(this._container)+" > nav > ul > li",this._container.parentNode),a=0,l=r.length;a<l;a++)if(!elIsHidden(r[a])){t=!0;break}e!==t&&(t?(elShow(this._container),o.getTabMenu(i.identify(this._container)).selectFirstVisible()):elHide(this._container),n.checkContainers())}}}),r}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract",["Ajax","Dom/Util"],function(e,t){"use strict";function i(e,t){}return i.prototype={init:function(e,t){this._userId=e,this._isActive=!1!==t,this._initButton(),this._updateButton()},_initButton:function(){var e=elCreate("a");e.href="#",e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this));var i=elCreate("li");i.appendChild(e);var n=elBySel('.userProfileButtonMenu[data-menu="interaction"]');t.prepend(i,n),this._button=e,this._listItem=i},_toggle:function(t){t.preventDefault(),e.api(this,{actionName:this._getAjaxActionName(),parameters:{data:{userID:this._userId}}})},_updateButton:function(){this._button.textContent=this._getLabel(),this._listItem.classList[this._isActive?"add":"remove"]("active")},_getLabel:function(){throw new Error("Implement me!")},_getAjaxActionName:function(){throw new Error("Implement me!")},_ajaxSuccess:function(){throw new Error("Implement me!")},_ajaxSetup:function(){throw new Error("Implement me!")}},i}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow",["Core","Language","Ui/Notification","./Abstract"],function(e,t,i,n){"use strict";var o=function(){};return o.prototype={_getLabel:function(){},_getAjaxActionName:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},init:function(){},_initButton:function(){},_toggle:function(){},_updateButton:function(){}},o}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["Core","Language","Ui/Notification","./Abstract"],function(e,t,i,n){"use strict";var o=function(){};return o.prototype={_getLabel:function(){},_getAjaxActionName:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},init:function(){},_initButton:function(){},_toggle:function(){},_updateButton:function(){}},o}),function(e){e.matches=e.matches||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector,e.closest=e.closest||function(e){for(var t=this;t&&!t.matches(e);)t=t.parentElement;return t}}(Element.prototype),define("closest",function(){}),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,l){if(!Array.isArray(r))return i.apply(e,arguments);var s=new Promise(function(e,a){var l=o++;n.push(l),i(r,function(){var i=arguments;n[n.indexOf(l)]=function(){e(i)},t()},function(e){n[n.indexOf(l)]=function(){a(e)},t()})});return a&&(s=s.then(function(t){return a.apply(e,t)})),l&&s.catch(l),s},e.require.config=i.config}(window),define("require.linearExecution",function(){});
\ No newline at end of file