-WCF.ACP.Language={},WCF.ACP.Language.ItemList=Class.extend({_proxy:null,_dialog:null,_notification:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsLanguageItem").each($.proxy(function(e,t){var a=$(t),i=a.data("languageItemID"),n=this;a.click(function(){n._click(i)})},this))},_click:function(e){this._proxy.setOption("data",{actionName:"prepareEdit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.language.item.delete.confirmMessage"),function(e){"cancel"!==e&&(this._proxy.setOption("data",{actionName:"deleteCustomLanguageItems",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[$("#overlayLanguageItemID").val()]}),this._proxy.sendRequest())}.bind(this))},_success:function(e,t,a){e.returnValues?(this._showDialog(e.returnValues.template,e.returnValues.languageItem),this._dialog.find(".jsSubmitLanguageItem").click($.proxy(this._submit,this)),this._dialog.find(".jsDeleteLanguageItem").click($.proxy(this._delete,this))):(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._dialog.wcfDialog("close"),"deleteCustomLanguageItems"===e.actionName?this._notification.show(window.location.reload.bind(window.location)):this._notification.show())},_showDialog:function(e,t){null===this._dialog&&(this._dialog=$("#languageItemEdit"),this._dialog.length||(this._dialog=$('<div id="languageItemEdit" />').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:t}).wcfDialog("render")},_submit:function(){var e=$("#overlayLanguageItemValue").val(),t=$("#overlayLanguageCustomItemValue").val(),a=$("#overlayLanguageUseCustomValue").is(":checked")?1:0,i=$("#overlayLanguageItemID").val();this._proxy.setOption("data",{actionName:"edit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[i],parameters:{languageItemValue:e,languageCustomItemValue:t,languageUseCustomValue:a}}),this._proxy.sendRequest()}});
\ No newline at end of file
+WCF.ACP.Language={},WCF.ACP.Language.ItemList=Class.extend({_proxy:null,_dialog:null,_notification:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsLanguageItem").each($.proxy((function(e,t){var a=$(t),i=a.data("languageItemID"),n=this;a.click((function(){n._click(i)}))}),this))},_click:function(e){this._proxy.setOption("data",{actionName:"prepareEdit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.language.item.delete.confirmMessage"),function(e){"cancel"!==e&&(this._proxy.setOption("data",{actionName:"deleteCustomLanguageItems",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[$("#overlayLanguageItemID").val()]}),this._proxy.sendRequest())}.bind(this))},_success:function(e,t,a){e.returnValues?(this._showDialog(e.returnValues.template,e.returnValues.languageItem),this._dialog.find(".jsSubmitLanguageItem").click($.proxy(this._submit,this)),this._dialog.find(".jsDeleteLanguageItem").click($.proxy(this._delete,this))):(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._dialog.wcfDialog("close"),"deleteCustomLanguageItems"===e.actionName?this._notification.show(window.location.reload.bind(window.location)):this._notification.show())},_showDialog:function(e,t){null===this._dialog&&(this._dialog=$("#languageItemEdit"),this._dialog.length||(this._dialog=$('<div id="languageItemEdit" />').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:t}).wcfDialog("render")},_submit:function(){var e=$("#overlayLanguageItemValue").val(),t=$("#overlayLanguageCustomItemValue").val(),a=$("#overlayLanguageUseCustomValue").is(":checked")?1:0,i=$("#overlayLanguageItemID").val();this._proxy.setOption("data",{actionName:"edit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[i],parameters:{languageItemValue:e,languageCustomItemValue:t,languageUseCustomValue:a}}),this._proxy.sendRequest()}});
\ No newline at end of file
-WCF.ACP.Style={},WCF.ACP.Style.CopyStyle=Class.extend({_styleID:0,init:function(t){this._styleID=t;var e=this;$(".jsCopyStyle").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.style.copyStyle.confirmMessage"),$.proxy(e._copy,e),void 0,void 0,!0)})},_copy:function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\style\\StyleAction",objectIDs:[this._styleID]},success:$.proxy(this._success,this)})},_success:function(t,e,s){window.location=t.returnValues.redirectURL}}),WCF.ACP.Style.ImageUpload=WCF.Upload.extend({_button:null,_image:null,_styleID:0,_tmpHash:"",init:function(t,e){this._styleID=parseInt(t)||0,this._tmpHash=e,this._button=$("#uploadImage"),this._image=$("#styleImage"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction")},_initFile:function(t){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){e.returnValues.url?(this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.global.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('<small class="innerError" />').insertAfter(this._button)),t}}),WCF.ACP.Style.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".styleList .buttonList").each($.proxy(function(t,e){var s=$(e),n=s.data("styleID"),i=this;s.find(".jsSetAsDefault").click(function(t){t.preventDefault(),i._click("setAsDefault",n)}),s.find(".jsDelete").click(function(t){i._delete(t,n)})},this))},_click:function(t,e){this._proxy.setOption("data",{actionName:t,className:"wcf\\data\\style\\StyleAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(t,e){t.preventDefault();var s,n=$(t.currentTarget).data("confirmMessageHtml");n?(s=this,WCF.System.Confirmation.show(n,function(t){"confirm"===t&&s._click("delete",e)},void 0,void 0,!0)):this._click("delete",e)},_success:function(t,e,s){window.location.reload()}});
\ No newline at end of file
+WCF.ACP.Style={},WCF.ACP.Style.CopyStyle=Class.extend({_styleID:0,init:function(t){this._styleID=t;var e=this;$(".jsCopyStyle").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.style.copyStyle.confirmMessage"),$.proxy(e._copy,e),void 0,void 0,!0)}))},_copy:function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\style\\StyleAction",objectIDs:[this._styleID]},success:$.proxy(this._success,this)})},_success:function(t,e,s){window.location=t.returnValues.redirectURL}}),WCF.ACP.Style.ImageUpload=WCF.Upload.extend({_button:null,_image:null,_styleID:0,_tmpHash:"",init:function(t,e){this._styleID=parseInt(t)||0,this._tmpHash=e,this._button=$("#uploadImage"),this._image=$("#styleImage"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction")},_initFile:function(t){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){e.returnValues.url?(this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.global.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('<small class="innerError" />').insertAfter(this._button)),t}}),WCF.ACP.Style.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".styleList .buttonList").each($.proxy((function(t,e){var s=$(e),n=s.data("styleID"),i=this;s.find(".jsSetAsDefault").click((function(t){t.preventDefault(),i._click("setAsDefault",n)})),s.find(".jsDelete").click((function(t){i._delete(t,n)}))}),this))},_click:function(t,e){this._proxy.setOption("data",{actionName:t,className:"wcf\\data\\style\\StyleAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(t,e){var s,n;t.preventDefault(),(s=$(t.currentTarget).data("confirmMessageHtml"))?(n=this,WCF.System.Confirmation.show(s,(function(t){"confirm"===t&&n._click("delete",e)}),void 0,void 0,!0)):this._click("delete",e)},_success:function(t,e,s){window.location.reload()}});
\ No newline at end of file
-WCF.ACP={},WCF.ACP.Application={},WCF.ACP.Cronjob={},WCF.ACP.Cronjob.ExecutionHandler=Class.extend({_notification:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsCronjobRow .jsExecuteButton").click($.proxy(this._click,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")},_click:function(e){this._proxy.setOption("data",{actionName:"execute",className:"wcf\\data\\cronjob\\CronjobAction",objectIDs:[$(e.target).data("objectID")]}),this._proxy.sendRequest()},_success:function(i,e,t){$(".jsCronjobRow").each($.proxy(function(e,t){var a=$(t).find(".jsExecuteButton").data("objectID");if(WCF.inArray(a,i.objectIDs))return i.returnValues[a]&&($(t).find("td.columnNextExec").html(i.returnValues[a].formatted),$(t).wcfHighlight()),this._notification.show(),!1},this))}}),WCF.ACP.Cronjob.LogList=Class.extend({_dialog:null,init:function(){$(".jsCronjobLogDelete").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.cronjob.log.clear.confirm"),function(e){"confirm"==e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"clearAll",className:"wcf\\data\\cronjob\\log\\CronjobLogAction"},success:function(){window.location.reload()}})})}),$(".jsCronjobError").click($.proxy(this._showError,this))},_showError:function(e){var t=$(e.currentTarget);null===this._dialog?(this._dialog=$('<div style="overflow: auto"><pre>'+t.next().html()+"</pre></div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("<pre>"+t.next().html()+"</pre>"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_additionalRequestParameters:{},_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i,n){this._actionName=t||"InstallPackage",this._allowRollback=!0===a,this._queueID=e,this._additionalRequestParameters=n||{},this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title","UninstallPackage"===this._actionName&&(this._dialogTitle="wcf.acp.package.uninstallation.title"),this._initProxy(),this._init()},_initProxy:function(){for(var e="",t=this._actionName.split(/([A-Z][a-z0-9]+)/),a=0,i=t.length;a<i;a++){var n=t[a];n.length&&(e.length&&(e+="-"),e+=n.toLowerCase())}this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?"+e+"/&t="+SECURITY_TOKEN})},_init:function(){$("#submitButton").click($.proxy(this.prepareInstallation,this))},_failure:function(){null!==this._dialog&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("times")),this._allowRollback&&null!==this._dialog&&this._purgeTemplateContent($.proxy(function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.acp.package.installation.rollback")+"</button>").appendTo(e).click($.proxy(this._rollback,this)),$("#packageInstallationInnerContentContainer").show(),this._dialog.wcfDialog("render")},this))},_rollback:function(e){this._setIcon("spinner"),e&&$(e.currentTarget).disable(),this._executeStep("rollback")},prepareInstallation:function(){document.activeElement&&document.activeElement.blur(),this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return $.extend({},this._additionalRequestParameters,{queueID:this._queueID,step:"prepare"})},_success:function(a,e,t){if(this._shouldRender=!1,"function"==typeof window._trackPackageStep&&window._trackPackageStep(this._actionName,a),null===this._dialog&&(this._dialog=$('<div id="package'+("UninstallPackage"===this._actionName?"Uni":"I")+'nstallationDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==a.step)return this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter(function(e){e.stop(),(new WCF.ACP.Package.Uninstallation).start(a.packageID)},200);if(a.queueID&&(this._queueID=a.queueID),a.template&&!a.ignoreTemplate&&(this._dialog.html(a.template),this._shouldRender=!0),a.progress&&($("#packageInstallationProgress").attr("value",a.progress).text(a.progress+"%"),$("#packageInstallationProgressLabel").text(a.progress+"%")),a.currentAction&&$("#packageInstallationAction").html(a.currentAction),"success"===a.step)return this._setIcon("check"),void this._purgeTemplateContent($.proxy(function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),t=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(e).click(function(){$(this).disable(),window.location=a.redirectLocation});$("#packageInstallationInnerContentContainer").show(),$(document).keydown(function(e){e.which===$.ui.keyCode.ENTER&&t.trigger("click")}),this._dialog.wcfDialog("render")},this));if(a.innerTemplate){var i,n=this;return $("#packageInstallationInnerContent").html(a.innerTemplate).find("input").keyup(function(e){e.keyCode===$.ui.keyCode.ENTER&&n._submit(a)}),a.step&&a.node&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("question"),i=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).click($.proxy(function(e){$(e.currentTarget).disable(),this._submit(a)},this))),$("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")}this._purgeTemplateContent($.proxy(function(){this._shouldRender&&this._dialog.wcfDialog("render"),a.step&&a.node&&this._executeStep(a.step,a.node)},this))},_submit:function(e){this._setIcon("spinner");var s={};$("#packageInstallationInnerContent input").each(function(e,t){var a,i=$(t),n=i.attr("type");("checkbox"!=n&&"radio"!=n||i.prop("checked"))&&((a=i.attr("name")).match(/(.*)\[([^[]*)\]$/)?(a=RegExp.$1,$key=RegExp.$2,void 0===s[a]&&($key?s[a]={}:s[a]=[]),$key?s[a][$key]=i.val():s[a].push(i.val())):s[a]=i.val())}),this._executeStep(e.step,e.node,s)},_purgeTemplateContent:function(e){$("#packageInstallationInnerContent").children().length&&($("#packageInstallationInnerContentContainer").hide(),$("#packageInstallationInnerContent").empty(),this._shouldRender=!0),e()},_executeStep:function(e,t,a){a=a||{};var i=$.extend({},this._additionalRequestParameters,{node:t,queueID:this._queueID,step:e},a);this._proxy.setOption("data",i),this._proxy.sendRequest()},_setIcon:function(e){this._dialog.find(".jsPackageInstallationStatus").removeClass("fa-check fa-question fa-times fa-spinner").addClass("fa-"+e)}}),WCF.ACP.Package.Installation.Cancel=Class.extend({init:function(e){$("#backButton").click(function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"cancelInstallation",className:"wcf\\data\\package\\installation\\queue\\PackageInstallationQueueAction",objectIDs:[e]},success:function(e){window.location=e.returnValues.url}})})}}),WCF.ACP.Package.Uninstallation=WCF.ACP.Package.Installation.extend({_elements:null,_packageID:0,_wcfPackageListURL:"",init:function(e,t){this._elements=e,this._packageID=0,this._wcfPackageListURL=t,void 0!==this._elements&&this._elements.length&&this._super(0,"UninstallPackage")},start:function(e){this._actionName="UninstallPackage",this._packageID=e,this._queueID=0,this._dialogTitle="wcf.acp.package.uninstallation.title",this._initProxy(),this.prepareInstallation()},_init:function(){this._elements.click($.proxy(this._showConfirmationDialog,this))},_showConfirmationDialog:function(e){var t,a=$(e.currentTarget);a.data("isApplication")&&this._wcfPackageListURL?window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,a.data("objectID"))):(t=this,WCF.System.Confirmation.show(a.data("confirmMessage"),function(e){"confirm"===e&&(t._packageID=a.data("objectID"),t.prepareInstallation())},void 0,void 0,!0))},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Server={},WCF.ACP.Package.Server.Installation=Class.extend({_proxy:null,_selectedPackage:"",init:function(){this._dialog=null,this._selectedPackage=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},bind:function(){$(".jsButtonPackageInstall").removeClass("jsButtonPackageInstall").click($.proxy(this._click,this))},_click:function(e){var t=$(e.currentTarget);WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(function(e){"confirm"===e&&(this._selectedPackage=t.data("package"),this._selectedPackageVersion=t.data("packageVersion"),this._prepareInstallation())},this),void 0,void 0,!0)},_success:function(e){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1).prepareInstallation()):e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_prepareInstallation:function(e){var t={packages:{}};t.packages[this._selectedPackage]=this._selectedPackageVersion,e&&(t.authData={packageUpdateServerID:e,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()}}),WCF.ACP.Package.Update={},WCF.ACP.Package.Update.Manager=Class.extend({_dialog:null,_proxy:null,_submitButton:null,init:function(){this._dialog=null,this._submitButton=$(".formSubmit > button").click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsPackageUpdate").each($.proxy(function(e,t){var a=$(t);a.find("input[type=checkbox]").data("packageUpdate",a).change($.proxy(this._change,this))},this))},_change:function(e){var t=$(e.currentTarget);t.is(":checked")?(t.data("packageUpdate").find("select").enable(),t.data("packageUpdate").find("dl").removeClass("disabled"),this._submitButton.enable()):(t.data("packageUpdate").find("select").disable(),t.data("packageUpdate").find("dl").addClass("disabled"),$("input[type=checkbox]:checked").length?this._submitButton.enable():this._submitButton.disable())},_click:function(e,t){var a,i={};$(".jsPackageUpdate").each($.proxy(function(e,t){var a=$(t);a.find("input[type=checkbox]:checked").length&&(i[a.data("package")]=a.find("select").val())},this)),$.getLength(i)&&(this._submitButton.disable(),a={packages:i},t&&(a.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:a}),this._proxy.sendRequest())},_success:function(e,t,a){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0).prepareInstallation()):e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.excludedPackages")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.excludedPackages")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._submitButton.enable()):e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.unauthorized")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_button:null,_dialog:null,init:function(e){!(this._dialog=null)==!e&&$('<li><a href="#" class="button jsButtonSearchForUpdates"><span class="icon icon16 fa-refresh"></span> <span>'+WCF.Language.get("wcf.acp.package.searchForUpdates")+"</span></a></li>").prependTo($(".contentHeaderNavigation > ul")),this._button=elBySel(".jsButtonSearchForUpdates"),this._button&&this._button.addEventListener("click",this._click.bind(this))},_click:function(e){e.preventDefault(),this._button.classList.contains("disabled")||(this._button.classList.add("disabled"),null===this._dialog?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"searchForUpdates",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{ignoreCache:1}},success:$.proxy(this._success,this)}):this._dialog.wcfDialog("open"))},_success:function(e,t,a){"function"!=typeof window._trackSearchForUpdates?e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("<div>"+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}),this._button.classList.remove("disabled")):window._trackSearchForUpdates(e)}}),WCF.ACP.PluginStore={},WCF.ACP.PluginStore.PurchasedItems={},WCF.ACP.PluginStore.PurchasedItems.Search=Class.extend({_dialog:null,_proxy:null,init:function(){this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$('<li><a class="button"><span class="icon icon16 fa-shopping-cart" /> <span>'+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"</span></a></li>").prependTo($(".contentHeaderNavigation > ul")).click($.proxy(this._click,this))},_click:function(){this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction"}),this._proxy.sendRequest()},_success:function(e,t,a){var i;e.returnValues.template?(null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.authorization")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open")),i=this._dialog.find("button").click($.proxy(this._submit,this)),this._dialog.find("input").keyup(function(e){if(e.which==$.ui.keyCode.ENTER)return i.trigger("click"),!1})):e.returnValues.noResults?null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.noResults).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.purchasedItems")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.pluginStore.purchasedItems")),this._dialog.html(e.returnValues.noResults),this._dialog.wcfDialog("open")):e.returnValues.noSSL?null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.noSSL).wcfDialog({title:WCF.Language.get("wcf.global.error.title")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.global.error.title")),this._dialog.html(e.returnValues.noSSL),this._dialog.wcfDialog("open")):e.returnValues.redirectURL&&(window.location=e.returnValues.redirectURL)},_submit:function(){this._dialog.wcfDialog("close"),this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction",parameters:{password:$("#pluginStorePassword").val(),username:$("#pluginStoreUsername").val()}}),this._proxy.sendRequest()}}),WCF.ACP.Worker=Class.extend({init:function(t,a,i,n,e){if("function"==typeof e)throw new Error("The callback parameter is no longer supported, please migrate to 'WoltLabSuite/Core/Acp/Ui/Worker'.");require(["WoltLabSuite/Core/Acp/Ui/Worker"],function(e){new e({dialogId:t,dialogTitle:i,className:a,parameters:n})})}}),WCF.ACP.Category={},WCF.ACP.Category.Collapsible=WCF.Collapsible.SimpleRemote.extend({init:function(e){var t=$('.formSubmit > button[data-type="submit"]');t&&t.click($.proxy(this._sort,this)),this._super(e)},_getButtonContainer:function(e){return $("#"+e+" > .buttons")},_getContainers:function(){return $(".jsCategory").has("ol").has("li")},_getTarget:function(e){return $("#"+e+" > ol")},_sort:function(){$(".collapsibleButton").remove(),this._containers={},this._containerData={};var e=this._getContainers();0==e.length&&console.debug("[WCF.ACP.Category.Collapsible] Empty container set given, aborting."),e.each($.proxy(function(e,t){var a=$(t),i=a.wcfIdentify();this._containers[i]=a,this._initContainer(i)},this))}}),WCF.ACP.Search=WCF.Search.Base.extend({_delay:250,_providerName:"",init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",function(e){e.preventDefault()}),WCF.Dropdown.getDropdownMenu("pageHeaderSearchType").find("a[data-provider-name]").on("click",$.proxy(function(e){e.preventDefault();var t=$(e.target);$(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").text(t.text());var a,i,n=this._providerName;this._providerName="everywhere"!=t.data("providerName")?t.data("providerName"):"",n==this._providerName||(a=$.trim(this._searchInput.val()))&&(i={data:{excludedSearchValues:this._excludedSearchValues,searchString:a}},this._queryServer(i))},this))},_createListItem:function(e){for(var t in 0<this._list.children("li").length&&$('<li class="dropdownDivider" />').appendTo(this._list),$('<li class="dropdownText">'+e.title+"</li>").appendTo(this._list),e.items){var a=e.items[t];$('<li><a href="'+a.link+'"><span>'+WCF.String.escapeHTML(a.title)+"</span>"+(a.subtitle?"<small>"+WCF.String.escapeHTML(a.subtitle)+"</small>":"")+"</a></li>").appendTo(this._list),this._itemCount++}},_openDropdown:function(){this._list.find("small").each(function(e,t){for(;t.scrollWidth>t.clientWidth;)t.innerText="… "+t.innerText.substr(3)})},_handleEmptyResult:function(){return $('<li class="dropdownText">'+WCF.Language.get("wcf.acp.search.noResults")+"</li>").appendTo(this._list),!0},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:not(.dropdownDivider):not(.dropdownText)").eq(this._itemIndex).addClass("dropdownNavigationItem")},_selectElement:function(e){if(-1===this._itemIndex)return!1;window.location=this._list.find("li.dropdownNavigationItem > a").attr("href")},_success:function(e){this._super(e);var t=elById("pageHeaderSearch");this._list[0].style.setProperty("top",t.offsetTop+t.clientHeight+"px","important"),this._list.addClass("acpSearchDropdown")},_getParameters:function(e){return e.data.providerName=this._providerName,e}}),WCF.ACP.User={},WCF.ACP.User.BanHandler={_callback:null,_dialog:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsBanButton").click($.proxy(function(e){var t=$(e.currentTarget);t.data("banned")?this.unban([t.data("objectID")]):this.ban([t.data("objectID")])},this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.ban"===e.data.actionName&&this.ban(e.data.parameters.objectIDs)},unban:function(e){this._proxy.setOption("data",{actionName:"unban",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},ban:function(e){null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">'+WCF.Language.get("wcf.acp.user.banReason")+'</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>'+WCF.Language.get("wcf.acp.user.banReason.description")+'</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked> '+WCF.Language.get("wcf.acp.user.ban.neverExpires")+'</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">'+WCF.Language.get("wcf.acp.user.ban.expires")+'</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.acp.user.ban.expires.description")+"</small></dd></dl></div>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),this._dialog.find("#userBanNeverExpires").change(function(){$("#userBanExpiresSettings").toggle()}),this._dialog.find("button").click($.proxy(this._submit,this))):($("#userBanReason").val(""),$("#userBanNeverExpires").prop("checked",!0),$("#userBanExpiresSettings").hide(),$("#userBanExpiresDatePicker, #userBanExpires").val("")),this._dialog.data("userIDs",e),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.user.ban.sure")})},_submit:function(){this._dialog.find(".innerError").remove();var e="";if(!$("#userBanNeverExpires").is(":checked")&&!(e=$("#userBanExpiresDatePicker").val()))return void this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('<small class="innerError" />').text(WCF.Language.get("wcf.global.form.error.empty")));this._proxy.setOption("data",{actionName:"ban",className:"wcf\\data\\user\\UserAction",objectIDs:this._dialog.data("userIDs"),parameters:{banReason:$("#userBanReason").val(),banExpires:e}}),this._proxy.sendRequest()},_success:function(i,e,t){elBySelAll(".jsUserRow",void 0,function(e){var t=parseInt(elData(e,"object-id"),10);-1!==i.objectIDs.indexOf(t)&&elData(e,"banned","ban"===i.actionName)}),$(".jsBanButton").each(function(e,t){var a=$(t);WCF.inArray(a.data("objectID"),i.objectIDs)&&("unban"==i.actionName?a.data("banned",!1).attr("data-tooltip",a.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):a.data("banned",!0).attr("data-tooltip",a.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))}),(new WCF.System.Notification).show(),WCF.Clipboard.reload(),"ban"==i.actionName&&this._dialog.wcfDialog("close"),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:i.objectIDs})}},WCF.ACP.User.Group={},WCF.ACP.User.Group.Copy=Class.extend({_groupID:0,init:function(e){this._groupID=e,$(".jsButtonUserGroupCopy").click($.proxy(this._click,this))},_click:function(){var e=$('<div class="section" />');e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyMembers" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyMembers")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyUserGroupOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyACLOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyACLOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"</small></dd></dl>")),WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.group.copy.confirmMessage"),$.proxy(function(e){"confirm"===e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\user\\group\\UserGroupAction",objectIDs:[this._groupID],parameters:{copyACLOptions:$("#copyACLOptions").is(":checked"),copyMembers:$("#copyMembers").is(":checked"),copyUserGroupOptions:$("#copyUserGroupOptions").is(":checked")}},success:function(e){window.location=e.returnValues.redirectURL}})},this),"",e,!0)}}),WCF.ACP.User.EnableHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsEnableButton").click($.proxy(function(e){var t=$(e.currentTarget);t.data("enabled")?this.disable([t.data("objectID")]):this.enable([t.data("objectID")])},this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.enable"===e.data.actionName&&this.enable(e.data.parameters.objectIDs)},disable:function(e){this._proxy.setOption("data",{actionName:"disable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},enable:function(e){this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},_success:function(i,e,t){elBySelAll(".jsUserRow",void 0,function(e){var t=parseInt(elData(e,"object-id"),10);-1!==i.objectIDs.indexOf(t)&&elData(e,"enabled","enable"===i.actionName)}),$(".jsEnableButton").each(function(e,t){var a=$(t);WCF.inArray(a.data("objectID"),i.objectIDs)&&("disable"==i.actionName?a.data("enabled",!1).attr("data-tooltip",a.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):a.data("enabled",!0).attr("data-tooltip",a.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))}),(new WCF.System.Notification).show(function(){window.location.reload()}),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:i.objectIDs})}},WCF.ACP.User.SendNewPasswordHandler={init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(t){"com.woltlab.wcf.user.sendNewPassword"===t.data.actionName&&WCF.System.Confirmation.show(t.data.parameters.confirmMessage,function(e){"confirm"===e&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:t.data.parameters.objectIDs})})}},WCF.ACP.Import={},WCF.ACP.Import.Manager=Class.extend({_currentAction:"",_dialog:null,_index:-1,_objectTypes:[],_proxy:null,_redirectURL:"",init:function(e,t){this._currentAction="",this._index=-1,this._objectTypes=e,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._redirectURL=t,this._invoke()},_invoke:function(){var e;this._index++,this._index>=this._objectTypes.length?(this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check"),this._dialog.find("h1").text(WCF.Language.get("wcf.acp.dataImport.completed")),e=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer")),$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").click($.proxy(function(){new WCF.Action.Proxy({autoSend:!0,data:{noRedirect:1},dataType:"html",success:$.proxy(function(){window.location=this._redirectURL},this),url:"index.php?cache-clear/&t="+SECURITY_TOKEN})},this)).appendTo(e),this._dialog.wcfDialog("render")):this._run(WCF.Language.get("wcf.acp.dataImport.data."+this._objectTypes[this._index]),this._objectTypes[this._index])},_run:function(e,t){this._currentAction=e,this._proxy.setOption("data",{className:"wcf\\system\\worker\\ImportWorker",parameters:{objectType:t}}),this._proxy.sendRequest()},_success:function(e){null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.dataImport")})),e.template&&this._dialog.html(e.template),this._currentAction&&this._dialog.find("h1").text(this._currentAction),this._dialog.find("progress").attr("value",e.progress).text(e.progress+"%").next("span").text(e.progress+"%"),e.progress<100?(this._proxy.setOption("data",{className:e.className,loopCount:e.loopCount,parameters:e.parameters}),this._proxy.sendRequest()):this._invoke()}}),WCF.ACP.Stat={},WCF.ACP.Stat.Chart=Class.extend({init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$("#statRefreshButton").click($.proxy(this._refresh,this)),this._refresh()},_refresh:function(){var e=[];$("input[name=objectTypeID]:checked").each(function(){e.push($(this).val())}),e.length&&(this._proxy.setOption("data",{className:"wcf\\data\\stat\\daily\\StatDailyAction",actionName:"getData",parameters:{startDate:$("#startDateDatePicker").val(),endDate:$("#endDateDatePicker").val(),value:$("input[name=value]:checked").val(),dateGrouping:$("input[name=dateGrouping]:checked").val(),objectTypeIDs:e}}),this._proxy.sendRequest())},_success:function(e){switch($("input[name=dateGrouping]:checked").val()){case"yearly":var t=[1,"year"],a=WCF.Language.get("wcf.acp.stat.timeFormat.yearly");break;case"monthly":t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:t=[1,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.daily")}var i={series:{lines:{show:!0},points:{show:!0}},grid:{hoverable:!0},xaxis:{mode:"time",minTickSize:t,timeformat:a,monthNames:WCF.Language.get("__monthsShort")},yaxis:{min:0,tickDecimals:0,tickFormatter:function(e){return WCF.String.addThousandsSeparator(e)}}},n=[];for(var s in e.returnValues){for(var o=e.returnValues[s],r=0;r<o.data.length;r++)o.data[r][0]*=1e3;n.push(o)}$.plot("#chart",n,i),require(["Ui/Alignment"],function(i){var n=elCreate("span");n.style.setProperty("position","absolute",""),document.body.appendChild(n),$("#chart").on("plothover",function(e,t,a){a?(n.style.setProperty("top",a.pageY+"px",""),n.style.setProperty("left",a.pageX+"px",""),$("#chartTooltip").html(a.series.xaxis.tickFormatter(a.datapoint[0],a.series.xaxis)+", "+WCF.String.formatNumeric(a.datapoint[1])+" "+a.series.label).show(),i.set($("#chartTooltip")[0],n,{verticalOffset:5,horizontal:"center",vertical:"top"})):$("#chartTooltip").hide()})}),n.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>"),elBySel(".contentHeader > .contentTitle").scrollIntoView({behavior:"smooth"})}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageInputs:[],_pageSelectionContainer:null,init:function(e){this._variablesDescriptions=e,this._pageConditions=$("#pageConditions"),this._pageInputs=$('input[name="pageIDs[]"]'),this._variablesDescriptionsList=$("#ad").next("small").children("ul"),this._pageSelectionContainer=$(this._pageInputs[0]).parents("dl:eq(0)"),this._hidePageSelection(!0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_hidePageSelection:function(e){this._pageSelectionContainer.prev("dl").hide(),this._pageSelectionContainer.hide(),this._pageSelectionContainer.next("dl").css("margin-top",0);var t,a=this._pageSelectionContainer.parent("section");a.children("dl:visible").length||(a.hide(),(t=a.next("section"))&&(t.css("margin-top",0),e&&require(["EventHandler"],function(e){e.add("com.woltlab.wcf.pageConditionDependence","checkVisivility",function(){a.is(":visible")?t.css("margin-top","40px"):t.css("margin-top",0)})})))},_showPageSelection:function(){this._pageSelectionContainer.prev("dl").show(),this._pageSelectionContainer.show(),this._pageSelectionContainer.next("dl").css("margin-top","40px");var e=this._pageSelectionContainer.parent("section");e.show();var t=e.next("section");t&&t.css("margin-top","40px")},_setPageController:function(){var s=$("#objectTypeID").find("option:checked"),e=s.parent();e.is("optgroup")&&"com.woltlab.wcf.global"===e.data("categoryName")?this._showPageSelection():(this._hidePageSelection(),require(["Core"],function(e){for(var t,a,i=0,n=this._pageInputs.length;i<n;i++)t=this._pageInputs[i],a=!1,s.data("page")&&elData(t,"identifier")===s.data("page")?(t.checked||(a=!0),t.checked=!0):(t.checked&&(a=!0),t.checked=!1),a&&e.triggerEvent(this._pageInputs[i],"change")}.bind(this))),this._variablesDescriptionsList.children(":not(.jsDefaultItem)").remove();var t=$("#objectTypeID").val();t in this._variablesDescriptions&&(this._variablesDescriptionsList[0].innerHTML+=this._variablesDescriptions[t])},_submit:function(){if(this._pageConditions.is(":hidden"))this._pageConditions.find("select, input").remove();else if(this._pageSelectionContainer.is(":hidden"))for(var e=0,t=this._pageInputs.length;e<t;e++)this._pageInputs[e].checked=!1}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.tag",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.tag.setAsSynonyms"===e.data.actionName&&(this._objectIDs=e.data.parameters.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(e.data.parameters.template),$button=this._dialog.find('button[data-type="submit"]').disable().click($.proxy(this._submit,this)),this._dialog.find("input[type=radio]").change(function(){$button.enable()}))},_submit:function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"setAsSynonyms",className:"wcf\\data\\tag\\TagAction",objectIDs:this._objectIDs,parameters:{tagID:this._dialog.find('input[name="tagID"]:checked').val()}},success:$.proxy(function(){this._dialog.wcfDialog("close"),(new WCF.System.Notification).show(function(){window.location.reload()})},this)})}});
\ No newline at end of file
+WCF.ACP={},WCF.ACP.Application={},WCF.ACP.Cronjob={},WCF.ACP.Cronjob.ExecutionHandler=Class.extend({_notification:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsCronjobRow .jsExecuteButton").click($.proxy(this._click,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")},_click:function(e){this._proxy.setOption("data",{actionName:"execute",className:"wcf\\data\\cronjob\\CronjobAction",objectIDs:[$(e.target).data("objectID")]}),this._proxy.sendRequest()},_success:function(e,t,a){$(".jsCronjobRow").each($.proxy((function(t,a){var i=$(a).find(".jsExecuteButton"),n=i.data("objectID");if(WCF.inArray(n,e.objectIDs))return e.returnValues[n]&&($(a).find("td.columnNextExec").html(e.returnValues[n].formatted),$(a).wcfHighlight()),this._notification.show(),!1}),this))}}),WCF.ACP.Cronjob.LogList=Class.extend({_dialog:null,init:function(){$(".jsCronjobLogDelete").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.cronjob.log.clear.confirm"),(function(e){"confirm"==e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"clearAll",className:"wcf\\data\\cronjob\\log\\CronjobLogAction"},success:function(){window.location.reload()}})}))})),$(".jsCronjobError").click($.proxy(this._showError,this))},_showError:function(e){var t=$(e.currentTarget);null===this._dialog?(this._dialog=$('<div style="overflow: auto"><pre>'+t.next().html()+"</pre></div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("<pre>"+t.next().html()+"</pre>"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_additionalRequestParameters:{},_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i,n){this._actionName=t||"InstallPackage",this._allowRollback=!0===a,this._queueID=e,this._additionalRequestParameters=n||{},this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title","UninstallPackage"===this._actionName&&(this._dialogTitle="wcf.acp.package.uninstallation.title"),this._initProxy(),this._init()},_initProxy:function(){var e,t,a,i="",n=this._actionName.split(/([A-Z][a-z0-9]+)/);for(e=0,t=n.length;e<t;e++)(a=n[e]).length&&(i.length&&(i+="-"),i+=a.toLowerCase());this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?"+i+"/&t="+SECURITY_TOKEN})},_init:function(){$("#submitButton").click($.proxy(this.prepareInstallation,this))},_failure:function(){null!==this._dialog&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("times")),this._allowRollback&&null!==this._dialog&&this._purgeTemplateContent($.proxy((function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.acp.package.installation.rollback")+"</button>").appendTo(e).click($.proxy(this._rollback,this)),$("#packageInstallationInnerContentContainer").show(),this._dialog.wcfDialog("render")}),this))},_rollback:function(e){this._setIcon("spinner"),e&&$(e.currentTarget).disable(),this._executeStep("rollback")},prepareInstallation:function(){document.activeElement&&document.activeElement.blur(),this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return $.extend({},this._additionalRequestParameters,{queueID:this._queueID,step:"prepare"})},_success:function(e,t,a){var i,n;return this._shouldRender=!1,"function"==typeof window._trackPackageStep&&window._trackPackageStep(this._actionName,e),null===this._dialog&&(this._dialog=$('<div id="package'+("UninstallPackage"===this._actionName?"Uni":"I")+'nstallationDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==e.step?(this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter((function(t){t.stop(),(new WCF.ACP.Package.Uninstallation).start(e.packageID)}),200)):(e.queueID&&(this._queueID=e.queueID),e.template&&!e.ignoreTemplate&&(this._dialog.html(e.template),this._shouldRender=!0),e.progress&&($("#packageInstallationProgress").attr("value",e.progress).text(e.progress+"%"),$("#packageInstallationProgressLabel").text(e.progress+"%")),e.currentAction&&$("#packageInstallationAction").html(e.currentAction),"success"===e.step?(this._setIcon("check"),void this._purgeTemplateContent($.proxy((function(){var t=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),a=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(t).click((function(){$(this).disable(),window.location=e.redirectLocation}));$("#packageInstallationInnerContentContainer").show(),$(document).keydown((function(e){e.which===$.ui.keyCode.ENTER&&a.trigger("click")})),this._dialog.wcfDialog("render")}),this))):e.innerTemplate?(i=this,$("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup((function(t){t.keyCode===$.ui.keyCode.ENTER&&i._submit(e)})),e.step&&e.node&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("question"),n=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(n).click($.proxy((function(t){$(t.currentTarget).disable(),this._submit(e)}),this))),$("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")):void this._purgeTemplateContent($.proxy((function(){this._shouldRender&&this._dialog.wcfDialog("render"),e.step&&e.node&&this._executeStep(e.step,e.node)}),this)))},_submit:function(e){this._setIcon("spinner");var t={};$("#packageInstallationInnerContent input").each((function(e,a){var i,n=$(a),s=n.attr("type");("checkbox"!=s&&"radio"!=s||n.prop("checked"))&&((i=n.attr("name")).match(/(.*)\[([^[]*)\]$/)?(i=RegExp.$1,$key=RegExp.$2,void 0===t[i]&&($key?t[i]={}:t[i]=[]),$key?t[i][$key]=n.val():t[i].push(n.val())):t[i]=n.val())})),this._executeStep(e.step,e.node,t)},_purgeTemplateContent:function(e){$("#packageInstallationInnerContent").children().length&&($("#packageInstallationInnerContentContainer").hide(),$("#packageInstallationInnerContent").empty(),this._shouldRender=!0),e()},_executeStep:function(e,t,a){a||(a={});var i=$.extend({},this._additionalRequestParameters,{node:t,queueID:this._queueID,step:e},a);this._proxy.setOption("data",i),this._proxy.sendRequest()},_setIcon:function(e){this._dialog.find(".jsPackageInstallationStatus").removeClass("fa-check fa-question fa-times fa-spinner").addClass("fa-"+e)}}),WCF.ACP.Package.Installation.Cancel=Class.extend({init:function(e){$("#backButton").click((function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"cancelInstallation",className:"wcf\\data\\package\\installation\\queue\\PackageInstallationQueueAction",objectIDs:[e]},success:function(e){window.location=e.returnValues.url}})}))}}),WCF.ACP.Package.Uninstallation=WCF.ACP.Package.Installation.extend({_elements:null,_packageID:0,_wcfPackageListURL:"",init:function(e,t){this._elements=e,this._packageID=0,this._wcfPackageListURL=t,void 0!==this._elements&&this._elements.length&&this._super(0,"UninstallPackage")},start:function(e){this._actionName="UninstallPackage",this._packageID=e,this._queueID=0,this._dialogTitle="wcf.acp.package.uninstallation.title",this._initProxy(),this.prepareInstallation()},_init:function(){this._elements.click($.proxy(this._showConfirmationDialog,this))},_showConfirmationDialog:function(e){var t,a=$(e.currentTarget);a.data("isApplication")&&this._wcfPackageListURL?window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,a.data("objectID"))):(t=this,WCF.System.Confirmation.show(a.data("confirmMessage"),(function(e){"confirm"===e&&(t._packageID=a.data("objectID"),t.prepareInstallation())}),void 0,void 0,!0))},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Server={},WCF.ACP.Package.Server.Installation=Class.extend({_proxy:null,_selectedPackage:"",init:function(){this._dialog=null,this._selectedPackage=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},bind:function(){$(".jsButtonPackageInstall").removeClass("jsButtonPackageInstall").click($.proxy(this._click,this))},_click:function(e){var t=$(e.currentTarget);WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy((function(e){"confirm"===e&&(this._selectedPackage=t.data("package"),this._selectedPackageVersion=t.data("packageVersion"),this._prepareInstallation())}),this),void 0,void 0,!0)},_success:function(e){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1).prepareInstallation()):e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t,a=$("#packageUpdateServerUsername"),i=$("#packageUpdateServerPassword");a.next("small.innerError").remove(),i.next("small.innerError").remove(),t=!0,""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),t=!1),""===$.trim(i.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(i),t=!1),t&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_prepareInstallation:function(e){var t={packages:{}};t.packages[this._selectedPackage]=this._selectedPackageVersion,e&&(t.authData={packageUpdateServerID:e,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()}}),WCF.ACP.Package.Update={},WCF.ACP.Package.Update.Manager=Class.extend({_dialog:null,_proxy:null,_submitButton:null,init:function(){this._dialog=null,this._submitButton=$(".formSubmit > button").click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsPackageUpdate").each($.proxy((function(e,t){var a=$(t);a.find("input[type=checkbox]").data("packageUpdate",a).change($.proxy(this._change,this))}),this))},_change:function(e){var t=$(e.currentTarget);t.is(":checked")?(t.data("packageUpdate").find("select").enable(),t.data("packageUpdate").find("dl").removeClass("disabled"),this._submitButton.enable()):(t.data("packageUpdate").find("select").disable(),t.data("packageUpdate").find("dl").addClass("disabled"),$("input[type=checkbox]:checked").length?this._submitButton.enable():this._submitButton.disable())},_click:function(e,t){var a,i={};$(".jsPackageUpdate").each($.proxy((function(e,t){var a=$(t);a.find("input[type=checkbox]:checked").length&&(i[a.data("package")]=a.find("select").val())}),this)),$.getLength(i)&&(this._submitButton.disable(),a={packages:i},t&&(a.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:a}),this._proxy.sendRequest())},_success:function(e,t,a){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0).prepareInstallation()):e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.excludedPackages")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.excludedPackages")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._submitButton.enable()):e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.unauthorized")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t,a=$("#packageUpdateServerUsername"),i=$("#packageUpdateServerPassword");a.next("small.innerError").remove(),i.next("small.innerError").remove(),t=!0,""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),t=!1),""===$.trim(i.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(i),t=!1),t&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_button:null,_dialog:null,init:function(e){this._dialog=null,!0==!e&&$('<li><a href="#" class="button jsButtonSearchForUpdates"><span class="icon icon16 fa-refresh"></span> <span>'+WCF.Language.get("wcf.acp.package.searchForUpdates")+"</span></a></li>").prependTo($(".contentHeaderNavigation > ul")),this._button=elBySel(".jsButtonSearchForUpdates"),this._button&&this._button.addEventListener("click",this._click.bind(this))},_click:function(e){e.preventDefault(),this._button.classList.contains("disabled")||(this._button.classList.add("disabled"),null===this._dialog?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"searchForUpdates",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{ignoreCache:1}},success:$.proxy(this._success,this)}):this._dialog.wcfDialog("open"))},_success:function(e,t,a){"function"!=typeof window._trackSearchForUpdates?e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("<div>"+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}),this._button.classList.remove("disabled")):window._trackSearchForUpdates(e)}}),WCF.ACP.PluginStore={},WCF.ACP.PluginStore.PurchasedItems={},WCF.ACP.PluginStore.PurchasedItems.Search=Class.extend({_dialog:null,_proxy:null,init:function(){this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$('<li><a class="button"><span class="icon icon16 fa-shopping-cart" /> <span>'+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"</span></a></li>").prependTo($(".contentHeaderNavigation > ul")).click($.proxy(this._click,this))},_click:function(){this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction"}),this._proxy.sendRequest()},_success:function(e,t,a){if(e.returnValues.template){null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.authorization")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open"));var i=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup((function(e){if(e.which==$.ui.keyCode.ENTER)return i.trigger("click"),!1}))}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.noResults).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.purchasedItems")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.pluginStore.purchasedItems")),this._dialog.html(e.returnValues.noResults),this._dialog.wcfDialog("open")):e.returnValues.noSSL?null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.noSSL).wcfDialog({title:WCF.Language.get("wcf.global.error.title")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.global.error.title")),this._dialog.html(e.returnValues.noSSL),this._dialog.wcfDialog("open")):e.returnValues.redirectURL&&(window.location=e.returnValues.redirectURL)},_submit:function(){this._dialog.wcfDialog("close"),this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction",parameters:{password:$("#pluginStorePassword").val(),username:$("#pluginStoreUsername").val()}}),this._proxy.sendRequest()}}),WCF.ACP.Worker=Class.extend({init:function(e,t,a,i,n){if("function"==typeof n)throw new Error("The callback parameter is no longer supported, please migrate to 'WoltLabSuite/Core/Acp/Ui/Worker'.");require(["WoltLabSuite/Core/Acp/Ui/Worker"],(function(n){new n({dialogId:e,dialogTitle:a,className:t,parameters:i})}))}}),WCF.ACP.Category={},WCF.ACP.Category.Collapsible=WCF.Collapsible.SimpleRemote.extend({init:function(e){var t=$('.formSubmit > button[data-type="submit"]');t&&t.click($.proxy(this._sort,this)),this._super(e)},_getButtonContainer:function(e){return $("#"+e+" > .buttons")},_getContainers:function(){return $(".jsCategory").has("ol").has("li")},_getTarget:function(e){return $("#"+e+" > ol")},_sort:function(){$(".collapsibleButton").remove(),this._containers={},this._containerData={};var e=this._getContainers();0==e.length&&console.debug("[WCF.ACP.Category.Collapsible] Empty container set given, aborting."),e.each($.proxy((function(e,t){var a=$(t),i=a.wcfIdentify();this._containers[i]=a,this._initContainer(i)}),this))}}),WCF.ACP.Search=WCF.Search.Base.extend({_delay:250,_providerName:"",init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",(function(e){e.preventDefault()})),WCF.Dropdown.getDropdownMenu("pageHeaderSearchType").find("a[data-provider-name]").on("click",$.proxy((function(e){var t,a,i,n;e.preventDefault(),t=$(e.target),$(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").text(t.text()),a=this._providerName,this._providerName="everywhere"!=t.data("providerName")?t.data("providerName"):"",a!=this._providerName&&(i=$.trim(this._searchInput.val()))&&(n={data:{excludedSearchValues:this._excludedSearchValues,searchString:i}},this._queryServer(n))}),this))},_createListItem:function(e){var t,a;for(t in this._list.children("li").length>0&&$('<li class="dropdownDivider" />').appendTo(this._list),$('<li class="dropdownText">'+e.title+"</li>").appendTo(this._list),e.items)a=e.items[t],$('<li><a href="'+a.link+'"><span>'+WCF.String.escapeHTML(a.title)+"</span>"+(a.subtitle?"<small>"+WCF.String.escapeHTML(a.subtitle)+"</small>":"")+"</a></li>").appendTo(this._list),this._itemCount++},_openDropdown:function(){this._list.find("small").each((function(e,t){for(;t.scrollWidth>t.clientWidth;)t.innerText="… "+t.innerText.substr(3)}))},_handleEmptyResult:function(){return $('<li class="dropdownText">'+WCF.Language.get("wcf.acp.search.noResults")+"</li>").appendTo(this._list),!0},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:not(.dropdownDivider):not(.dropdownText)").eq(this._itemIndex).addClass("dropdownNavigationItem")},_selectElement:function(e){if(-1===this._itemIndex)return!1;window.location=this._list.find("li.dropdownNavigationItem > a").attr("href")},_success:function(e){this._super(e);var t=elById("pageHeaderSearch");this._list[0].style.setProperty("top",t.offsetTop+t.clientHeight+"px","important"),this._list.addClass("acpSearchDropdown")},_getParameters:function(e){return e.data.providerName=this._providerName,e}}),WCF.ACP.User={},WCF.ACP.User.BanHandler={_callback:null,_dialog:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsBanButton").click($.proxy((function(e){var t=$(e.currentTarget);t.data("banned")?this.unban([t.data("objectID")]):this.ban([t.data("objectID")])}),this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.ban"===e.data.actionName&&this.ban(e.data.parameters.objectIDs)},unban:function(e){this._proxy.setOption("data",{actionName:"unban",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},ban:function(e){null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">'+WCF.Language.get("wcf.acp.user.banReason")+'</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>'+WCF.Language.get("wcf.acp.user.banReason.description")+'</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked> '+WCF.Language.get("wcf.acp.user.ban.neverExpires")+'</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">'+WCF.Language.get("wcf.acp.user.ban.expires")+'</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.acp.user.ban.expires.description")+"</small></dd></dl></div>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),this._dialog.find("#userBanNeverExpires").change((function(){$("#userBanExpiresSettings").toggle()})),this._dialog.find("button").click($.proxy(this._submit,this))):($("#userBanReason").val(""),$("#userBanNeverExpires").prop("checked",!0),$("#userBanExpiresSettings").hide(),$("#userBanExpiresDatePicker, #userBanExpires").val("")),this._dialog.data("userIDs",e),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.user.ban.sure")})},_submit:function(){var e;this._dialog.find(".innerError").remove(),e="",$("#userBanNeverExpires").is(":checked")||(e=$("#userBanExpiresDatePicker").val())?(this._proxy.setOption("data",{actionName:"ban",className:"wcf\\data\\user\\UserAction",objectIDs:this._dialog.data("userIDs"),parameters:{banReason:$("#userBanReason").val(),banExpires:e}}),this._proxy.sendRequest()):this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('<small class="innerError" />').text(WCF.Language.get("wcf.global.form.error.empty")))},_success:function(e,t,a){elBySelAll(".jsUserRow",void 0,(function(t){var a=parseInt(elData(t,"object-id"),10);-1!==e.objectIDs.indexOf(a)&&elData(t,"banned","ban"===e.actionName)})),$(".jsBanButton").each((function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("unban"==e.actionName?i.data("banned",!1).attr("data-tooltip",i.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):i.data("banned",!0).attr("data-tooltip",i.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))})),(new WCF.System.Notification).show(),WCF.Clipboard.reload(),"ban"==e.actionName&&this._dialog.wcfDialog("close"),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:e.objectIDs})}},WCF.ACP.User.Group={},WCF.ACP.User.Group.Copy=Class.extend({_groupID:0,init:function(e){this._groupID=e,$(".jsButtonUserGroupCopy").click($.proxy(this._click,this))},_click:function(){var e=$('<div class="section" />');e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyMembers" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyMembers")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyUserGroupOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyACLOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyACLOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"</small></dd></dl>")),WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.group.copy.confirmMessage"),$.proxy((function(e){"confirm"===e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\user\\group\\UserGroupAction",objectIDs:[this._groupID],parameters:{copyACLOptions:$("#copyACLOptions").is(":checked"),copyMembers:$("#copyMembers").is(":checked"),copyUserGroupOptions:$("#copyUserGroupOptions").is(":checked")}},success:function(e){window.location=e.returnValues.redirectURL}})}),this),"",e,!0)}}),WCF.ACP.User.EnableHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsEnableButton").click($.proxy((function(e){var t=$(e.currentTarget);t.data("enabled")?this.disable([t.data("objectID")]):this.enable([t.data("objectID")])}),this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.enable"===e.data.actionName&&this.enable(e.data.parameters.objectIDs)},disable:function(e){this._proxy.setOption("data",{actionName:"disable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},enable:function(e){this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},_success:function(e,t,a){elBySelAll(".jsUserRow",void 0,(function(t){var a=parseInt(elData(t,"object-id"),10);-1!==e.objectIDs.indexOf(a)&&elData(t,"enabled","enable"===e.actionName)})),$(".jsEnableButton").each((function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("disable"==e.actionName?i.data("enabled",!1).attr("data-tooltip",i.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):i.data("enabled",!0).attr("data-tooltip",i.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))})),(new WCF.System.Notification).show((function(){window.location.reload()})),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:e.objectIDs})}},WCF.ACP.User.SendNewPasswordHandler={init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.sendNewPassword"===e.data.actionName&&require(["Language","Ui/Confirmation","WoltLabSuite/Core/Acp/Ui/Worker"],(function(t,a,i){a.show({confirm:()=>{new i({dialogId:"sendingNewPasswords",dialogTitle:t.get("wcf.acp.user.sendNewPassword.workerTitle"),className:"wcf\\system\\worker\\SendNewPasswordWorker",parameters:{userIDs:e.data.parameters.objectIDs}})},message:e.data.parameters.confirmMessage})}))}},WCF.ACP.Import={},WCF.ACP.Import.Manager=Class.extend({_currentAction:"",_dialog:null,_index:-1,_objectTypes:[],_proxy:null,_redirectURL:"",init:function(e,t){this._currentAction="",this._index=-1,this._objectTypes=e,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._redirectURL=t,this._invoke()},_invoke:function(){if(this._index++,this._index>=this._objectTypes.length){this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check"),this._dialog.find("h1").text(WCF.Language.get("wcf.acp.dataImport.completed"));var e=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer"));$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").click($.proxy((function(){new WCF.Action.Proxy({autoSend:!0,data:{noRedirect:1},dataType:"html",success:$.proxy((function(){window.location=this._redirectURL}),this),url:"index.php?cache-clear/&t="+SECURITY_TOKEN})}),this)).appendTo(e),this._dialog.wcfDialog("render")}else this._run(WCF.Language.get("wcf.acp.dataImport.data."+this._objectTypes[this._index]),this._objectTypes[this._index])},_run:function(e,t){this._currentAction=e,this._proxy.setOption("data",{className:"wcf\\system\\worker\\ImportWorker",parameters:{objectType:t}}),this._proxy.sendRequest()},_success:function(e){null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.dataImport")})),e.template&&this._dialog.html(e.template),this._currentAction&&this._dialog.find("h1").text(this._currentAction),this._dialog.find("progress").attr("value",e.progress).text(e.progress+"%").next("span").text(e.progress+"%"),e.progress<100?(this._proxy.setOption("data",{className:e.className,loopCount:e.loopCount,parameters:e.parameters}),this._proxy.sendRequest()):this._invoke()}}),WCF.ACP.Stat={},WCF.ACP.Stat.Chart=Class.extend({init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$("#statRefreshButton").click($.proxy(this._refresh,this)),this._refresh()},_refresh:function(){var e=[];$("input[name=objectTypeID]:checked").each((function(){e.push($(this).val())})),e.length&&(this._proxy.setOption("data",{className:"wcf\\data\\stat\\daily\\StatDailyAction",actionName:"getData",parameters:{startDate:$("#startDateDatePicker").val(),endDate:$("#endDateDatePicker").val(),value:$("input[name=value]:checked").val(),dateGrouping:$("input[name=dateGrouping]:checked").val(),objectTypeIDs:e}}),this._proxy.sendRequest())},_success:function(e){var t,a,i,n,s,o,r;switch($("input[name=dateGrouping]:checked").val()){case"yearly":t=[1,"year"],a=WCF.Language.get("wcf.acp.stat.timeFormat.yearly");break;case"monthly":t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:t=[1,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.daily")}for(s in i={series:{lines:{show:!0},points:{show:!0}},grid:{hoverable:!0},xaxis:{mode:"time",minTickSize:t,timeformat:a,monthNames:WCF.Language.get("__monthsShort")},yaxis:{min:0,tickDecimals:0,tickFormatter:function(e){return WCF.String.addThousandsSeparator(e)}}},n=[],e.returnValues){for(o=e.returnValues[s],r=0;r<o.data.length;r++)o.data[r][0]*=1e3;n.push(o)}$.plot("#chart",n,i),require(["Ui/Alignment"],(function(e){var t=elCreate("span");t.style.setProperty("position","absolute",""),document.body.appendChild(t),$("#chart").on("plothover",(function(a,i,n){n?(t.style.setProperty("top",n.pageY+"px",""),t.style.setProperty("left",n.pageX+"px",""),$("#chartTooltip").html(n.series.xaxis.tickFormatter(n.datapoint[0],n.series.xaxis)+", "+WCF.String.formatNumeric(n.datapoint[1])+" "+n.series.label).show(),e.set($("#chartTooltip")[0],t,{verticalOffset:5,horizontal:"center",vertical:"top"})):$("#chartTooltip").hide()}))})),n.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>"),elBySel(".contentHeader > .contentTitle").scrollIntoView({behavior:"smooth"})}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageInputs:[],_pageSelectionContainer:null,init:function(e){this._variablesDescriptions=e,this._pageConditions=$("#pageConditions"),this._pageInputs=$('input[name="pageIDs[]"]'),this._variablesDescriptionsList=$("#ad").next("small").children("ul"),this._pageSelectionContainer=$(this._pageInputs[0]).parents("dl:eq(0)"),this._hidePageSelection(!0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_hidePageSelection:function(e){var t,a;this._pageSelectionContainer.prev("dl").hide(),this._pageSelectionContainer.hide(),this._pageSelectionContainer.next("dl").css("margin-top",0),(t=this._pageSelectionContainer.parent("section")).children("dl:visible").length||(t.hide(),(a=t.next("section"))&&(a.css("margin-top",0),e&&require(["EventHandler"],(function(e){e.add("com.woltlab.wcf.pageConditionDependence","checkVisivility",(function(){t.is(":visible")?a.css("margin-top","40px"):a.css("margin-top",0)}))}))))},_showPageSelection:function(){var e,t;this._pageSelectionContainer.prev("dl").show(),this._pageSelectionContainer.show(),this._pageSelectionContainer.next("dl").css("margin-top","40px"),(e=this._pageSelectionContainer.parent("section")).show(),(t=e.next("section"))&&t.css("margin-top","40px")},_setPageController:function(){var e,t=$("#objectTypeID").find("option:checked"),a=t.parent();a.is("optgroup")&&"com.woltlab.wcf.global"===a.data("categoryName")?this._showPageSelection():(this._hidePageSelection(),require(["Core"],function(e){var a,i,n,s;for(n=0,s=this._pageInputs.length;n<s;n++)a=this._pageInputs[n],i=!1,t.data("page")&&elData(a,"identifier")===t.data("page")?(a.checked||(i=!0),a.checked=!0):(a.checked&&(i=!0),a.checked=!1),i&&e.triggerEvent(this._pageInputs[n],"change")}.bind(this))),this._variablesDescriptionsList.children(":not(.jsDefaultItem)").remove(),(e=$("#objectTypeID").val())in this._variablesDescriptions&&(this._variablesDescriptionsList[0].innerHTML+=this._variablesDescriptions[e])},_submit:function(){if(this._pageConditions.is(":hidden"))this._pageConditions.find("select, input").remove();else if(this._pageSelectionContainer.is(":hidden"))for(var e=0,t=this._pageInputs.length;e<t;e++)this._pageInputs[e].checked=!1}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.tag",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.tag.setAsSynonyms"===e.data.actionName&&(this._objectIDs=e.data.parameters.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(e.data.parameters.template),$button=this._dialog.find('button[data-type="submit"]').disable().click($.proxy(this._submit,this)),this._dialog.find("input[type=radio]").change((function(){$button.enable()})))},_submit:function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"setAsSynonyms",className:"wcf\\data\\tag\\TagAction",objectIDs:this._objectIDs,parameters:{tagID:this._dialog.find('input[name="tagID"]:checked').val()}},success:$.proxy((function(){this._dialog.wcfDialog("close"),(new WCF.System.Notification).show((function(){window.location.reload()}))}),this)})}});
\ No newline at end of file
// redactor.combined.min.js -- DO NOT EDIT
// redactor.js
-(function (window, undefined) { !function(m){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;return function(){return e.apply(t)}});var i=0,h=null;function l(t,e){return new l.prototype.init(t,e)}"function"==typeof window.require&&require(["Environment"],function(t){h=t}),m.fn.redactor=function(n){var r=[],s=Array.prototype.slice.call(arguments,1);return"string"==typeof n?this.each(function(){var t,e,i=m.data(this,"redactor");"-1"!==n.search(/\./)?void 0!==i[(t=n.split("."))[0]]&&(t=i[t[0]][t[1]]):t=i[n],void 0!==i&&m.isFunction(t)?void 0!==(e=t.apply(i,s))&&e!==i&&r.push(e):m.error('No such method "'+n+'" for Redactor')}):this.each(function(){m.data(this,"redactor",{}),m.data(this,"redactor",l(this,n))}),0===r.length?this:1===r.length?r[0]:r},m.Redactor=l,m.Redactor.VERSION="2.99",m.Redactor.modules=["air","autosave","block","buffer","build","button","caret","clean","code","core","detect","dropdown","events","file","focus","image","indent","inline","insert","keydown","keyup","lang","line","link","linkify","list","marker","modal","observe","offset","paragraphize","paste","placeholder","progress","selection","shortcuts","storage","toolbar","upload","uploads3","utils","browser"],m.Redactor.settings={},m.Redactor.opts={animation:!1,lang:"en",direction:"ltr",spellcheck:!0,overrideStyles:!0,stylesClass:!1,scrollTarget:document,focus:!1,focusEnd:!1,clickToEdit:!1,structure:!1,tabindex:!1,minHeight:!1,maxHeight:!1,maxWidth:!1,plugins:!1,callbacks:{},placeholder:!1,linkify:!0,enterKey:!0,pastePlainText:!1,pasteImages:!0,pasteLinks:!0,pasteBlockTags:["pre","h1","h2","h3","h4","h5","h6","table","tbody","thead","tfoot","th","tr","td","ul","ol","li","blockquote","p","figure","figcaption"],pasteInlineTags:["br","strong","ins","code","del","span","samp","kbd","sup","sub","mark","var","cite","small","b","u","em","i"],preClass:!1,preSpaces:4,tabAsSpaces:!1,tabKey:!0,autosave:!1,autosaveName:!1,autosaveFields:!1,imageUpload:null,imageUploadParam:"file",imageUploadFields:!1,imageUploadForms:!1,imageTag:"figure",imageEditable:!0,imageCaption:!0,imagePosition:!1,imageResizable:!1,imageFloatMargin:"10px",dragImageUpload:!0,multipleImageUpload:!0,clipboardImageUpload:!0,fileUpload:null,fileUploadParam:"file",fileUploadFields:!1,fileUploadForms:!1,dragFileUpload:!0,s3:!1,linkNewTab:!1,linkTooltip:!0,linkNofollow:!1,linkSize:30,linkValidation:!0,pasteLinkTarget:!1,videoContainerClass:"video-container",toolbar:!0,toolbarFixed:!0,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:!1,toolbarOverflow:!1,air:!1,airWidth:!1,formatting:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],formattingAdd:!1,buttons:["format","bold","italic","deleted","lists","image","file","link","horizontalrule"],buttonsTextLabeled:!1,buttonsHide:[],buttonsHideOnMobile:[],script:!0,removeNewlines:!1,removeComments:!0,replaceTags:{b:"strong",i:"em",strike:"del"},keepStyleAttr:[],keepInlineOnEnter:!1,shortcuts:{"ctrl+shift+m, meta+shift+m":{func:"inline.removeFormat"},"ctrl+b, meta+b":{func:"inline.format",params:["bold"]},"ctrl+i, meta+i":{func:"inline.format",params:["italic"]},"ctrl+h, meta+h":{func:"inline.format",params:["superscript"]},"ctrl+l, meta+l":{func:"inline.format",params:["subscript"]},"ctrl+k, meta+k":{func:"link.show"},"ctrl+shift+7":{func:"list.toggle",params:["orderedlist"]},"ctrl+shift+8":{func:"list.toggle",params:["unorderedlist"]}},shortcutsAdd:!1,activeButtons:["deleted","italic","bold"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted"},langs:{en:{format:"Format",image:"Image",file:"File",link:"Link",bold:"Bold",italic:"Italic",deleted:"Strikethrough",underline:"Underline","bold-abbr":"B","italic-abbr":"I","deleted-abbr":"S","underline-abbr":"U",lists:"Lists","link-insert":"Insert link","link-edit":"Edit link","link-in-new-tab":"Open link in new tab",unlink:"Unlink",cancel:"Cancel",close:"Close",insert:"Insert",save:"Save",delete:"Delete",text:"Text",edit:"Edit",title:"Title",paragraph:"Normal text",quote:"Quote",code:"Code",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",filename:"Name",optional:"optional",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",horizontalrule:"Line","upload-label":"Drop file here or ",caption:"Caption",bulletslist:"Bullets",numberslist:"Numbers","image-position":"Position",none:"None",left:"Left",right:"Right",center:"Center","accessibility-help-label":"Rich text editor"}},type:"textarea",inline:!1,inlineTags:["a","span","strong","strike","b","u","em","i","code","del","ins","samp","kbd","sup","sub","mark","var","cite","small"],blockTags:["pre","ul","ol","li","p","h1","h2","h3","h4","h5","h6","dl","dt","dd","div","td","blockquote","output","figcaption","figure","address","section","header","footer","aside","article","iframe"],paragraphize:!0,paragraphizeBlocks:["table","div","pre","form","ul","ol","h1","h2","h3","h4","h5","h6","dl","blockquote","figcaption","address","section","header","footer","aside","article","object","style","script","iframe","select","input","textarea","button","option","map","area","math","hr","fieldset","legend","hgroup","nav","figure","details","menu","summary","p"],emptyHtml:"<p>​</p>",invisibleSpace:"​",emptyHtmlRendered:m("").html("").html(),imageTypes:["image/png","image/jpeg","image/gif"],userAgent:navigator.userAgent.toLowerCase(),observe:{dropdowns:[]},regexps:{linkyoutube:/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/gi,linkvimeo:/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,linkimage:/((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/gi,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi}},l.fn=m.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,UP:38,DOWN:40,ENTER:13,SPACE:32,ESC:27,TAB:9,CTRL:17,META:91,SHIFT:16,ALT:18,RIGHT:39,LEFT:37,LEFT_WIN:91},init:function(t,e){if(this.$element=m(t),this.uuid=i++,this.sBuffer=[],this.sRebuffer=[],this.loadOptions(e),this.loadModules(),this.opts.clickToEdit&&!this.$element.hasClass("redactor-click-to-edit"))return this.loadToEdit(e);this.$element.hasClass("redactor-click-to-edit")&&this.$element.removeClass("redactor-click-to-edit"),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i"),this.reIsInline=new RegExp("^("+this.opts.inlineTags.join("|").toUpperCase()+")$","i"),this.opts.dragImageUpload=null!==this.opts.imageUpload&&this.opts.dragImageUpload,this.opts.dragFileUpload=null!==this.opts.fileUpload&&this.opts.dragFileUpload,this.formatting={},this.lang.load(),m.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.$editor=this.$element,this.detectType(),this.core.callback("start"),this.core.callback("startToEdit"),this.start=!0,this.build.start()},detectType:function(){this.build.isInline()||this.opts.inline?this.opts.type="inline":this.build.isTag("DIV")?this.opts.type="div":this.build.isTag("PRE")&&(this.opts.type="pre")},loadToEdit:function(t){this.$element.on("click.redactor-click-to-edit",m.proxy(function(){this.initToEdit(t)},this)),this.$element.addClass("redactor-click-to-edit")},initToEdit:function(e){m.extend(e.callbacks,{startToEdit:function(){this.insert.node(this.marker.get(),!1)},initToEdit:function(){this.selection.restore(),this.clickToCancelStorage=this.code.get(),m(this.opts.clickToCancel).off(".redactor-click-to-edit"),m(this.opts.clickToCancel).show().on("click.redactor-click-to-edit",m.proxy(function(t){t.preventDefault(),this.core.destroy(),this.events.syncFire=!1,this.$element.html(this.clickToCancelStorage),this.core.callback("cancel",this.clickToCancelStorage),this.events.syncFire=!0,this.clickToCancelStorage="",m(this.opts.clickToCancel).hide(),m(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",m.proxy(function(){this.initToEdit(e)},this)),this.$element.addClass("redactor-click-to-edit")},this)),m(this.opts.clickToSave).off(".redactor-click-to-edit"),m(this.opts.clickToSave).show().on("click.redactor-click-to-edit",m.proxy(function(t){t.preventDefault(),this.core.destroy(),this.core.callback("save",this.code.get()),m(this.opts.clickToCancel).hide(),m(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",m.proxy(function(){this.initToEdit(e)},this)),this.$element.addClass("redactor-click-to-edit")},this))}}),this.$element.redactor(e),this.$element.off(".redactor-click-to-edit")},loadOptions:function(t){var e={};void 0!==m.Redactor.settings.namespace&&!this.$element.hasClass(m.Redactor.settings.namespace)||(e=m.Redactor.settings),this.opts=m.extend({},m.Redactor.opts,this.$element.data(),t),this.opts=m.extend({},this.opts,e)},getModuleMethods:function(e){return Object.getOwnPropertyNames(e).filter(function(t){return"function"==typeof e[t]})},loadModules:function(){for(var t=m.Redactor.modules.length,e=0;e<t;e++)this.bindModuleMethods(m.Redactor.modules[e])},bindModuleMethods:function(t){if(void 0!==this[t]){this[t]=this[t]();for(var e=this.getModuleMethods(this[t]),i=e.length,n=0;n<i;n++)this[t][e[n]]=this[t][e[n]].bind(this)}},air:function(){return{enabled:!1,collapsed:function(){},collapsedEnd:function(){},build:function(){},append:function(){},createContainer:function(){},show:function(){},bindHide:function(){},hide:function(){}}},autosave:function(){return{enabled:!1,html:!1,init:function(){},is:function(){},send:function(){},getHiddenFields:function(){},success:function(){},disable:function(){}}},block:function(){return{format:function(t,e,i,n){if(t="quote"===t?"blockquote":t,this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],-1!==m.inArray(t,this.block.tags))return"p"===t&&void 0===e&&(e="class"),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(t,e,i,n):this.block.formatUncollapsed(t,e,i,n)},formatCollapsed:function(t,e,i,n){this.selection.save();var r=this.selection.block(),s=r.tagName.toLowerCase();if(-1!==m.inArray(s,this.block.tags)){var o,a,l=!1;if(s===t&&void 0===e&&(t="p",l=!0),l&&(this.block.removeAllClass(),this.block.removeAllAttr()),"blockquote"===s&&this.utils.isEndOfElement(r)?(this.marker.remove(),(o=document.createElement("p")).innerHTML=this.opts.invisibleSpace,m(r).after(o),this.caret.start(o),0!==(a=m(r).children().last()).length&&"BR"===a[0].tagName&&a.remove()):o=this.utils.replaceToTag(r,t),"object"==typeof e)for(var c in n=i,e)o=this.block.setAttr(o,c,e[c],n);else o=this.block.setAttr(o,e,i,n);return"pre"===t&&1===o.length&&m(o).html(m.trim(m(o).html())),this.selection.restore(),this.block.removeInlineTags(o),o}this.selection.restore()},formatUncollapsed:function(t,e,i,n){this.selection.save();var r=[],s=this.selection.blocks();s[0]&&(m(s[0]).hasClass("redactor-in")||m(s[0]).hasClass("redactor-box"))&&(s=this.core.editor().find(this.opts.blockTags.join(", ")));for(var o,a=s.length,l=0;l<a;l++){var c=s[l].tagName.toLowerCase();if(-1!==m.inArray(c,this.block.tags)&&"figure"!==c){var h=this.utils.replaceToTag(s[l],t);if("object"==typeof e)for(var d in n=i,e)h=this.block.setAttr(h,d,e[d],n);else h=this.block.setAttr(h,e,i,n);r.push(h),this.block.removeInlineTags(h)}}return this.selection.restore(),"pre"===t&&0!==r.length&&(o=r[0],m.each(r,function(t,e){0!==t&&(m(o).append("\n"+m.trim(e.html())),m(e).remove())}),(r=[]).push(o)),r},removeInlineTags:function(t){t=t[0]||t;var e,i=this.opts.inlineTags;-1!==m.inArray(t.tagName,["PRE","H1","H2","H3","H4","H5","H6"])&&("PRE"!==t.tagName&&(e=i.indexOf("a"),i.splice(e,1)),m(t).find(i.join(",")).not(".redactor-selection-marker").contents().unwrap())},setAttr:function(t,e,i,n){if(void 0===e)return t;var r=void 0===n?"replace":n;return t="class"===e?this.block[r+"Class"](i,t):"remove"===r||"removeAll"===r?this.block[r+"Attr"](e,t):this.block[r+"Attr"](e,i,t)},getBlocks:function(t){if(t=void 0===t?this.selection.blocks():t,m(t).hasClass("redactor-box")){var i=[],e=this.core.editor().children();return m.each(e,m.proxy(function(t,e){this.utils.isBlock(e)&&i.push(e)},this)),i}return t},replaceClass:function(t,e){return m(this.block.getBlocks(e)).removeAttr("class").addClass(t)[0]},toggleClass:function(t,e){return m(this.block.getBlocks(e)).toggleClass(t)[0]},addClass:function(t,e){return m(this.block.getBlocks(e)).addClass(t)[0]},removeClass:function(t,e){return m(this.block.getBlocks(e)).removeClass(t)[0]},removeAllClass:function(t){return m(this.block.getBlocks(t)).removeAttr("class")[0]},replaceAttr:function(t,e,i){return i=this.block.removeAttr(t,i),m(i).attr(t,e)[0]},toggleAttr:function(i,n,t){t=this.block.getBlocks(t);var r=this,s=[];return m.each(t,function(t,e){m(e).attr(i)?s.push(r.block.removeAttr(i,e)):s.push(r.block.addAttr(i,n,e))}),s},addAttr:function(t,e,i){return m(this.block.getBlocks(i)).attr(t,e)[0]},removeAttr:function(t,e){return m(this.block.getBlocks(e)).removeAttr(t)[0]},removeAllAttr:function(t){t=this.block.getBlocks(t);var i=[];return m.each(t,function(t,e){if(void 0!==e.attributes)for(;e.attributes.length;)e.removeAttribute(e.attributes[0].name);i.push(e)}),i}}},buffer:function(){return{set:function(t){void 0===t&&this.buffer.clear(),void 0===t||"undo"===t?this.buffer.setUndo():this.buffer.setRedo()},setUndo:function(){var t=this.selection.saveInstant(),e=this.sBuffer[this.sBuffer.length-1],i=this.core.editor().html();void 0!==e&&e[0]===i||this.sBuffer.push([i,t])},setRedo:function(){var t=this.selection.saveInstant();this.sRebuffer.push([this.core.editor().html(),t])},add:function(){this.sBuffer.push([this.core.editor().html(),0])},undo:function(){var t;0!==this.sBuffer.length&&(t=this.sBuffer.pop(),this.buffer.set("redo"),this.core.editor().html(t[0]),this.selection.restoreInstant(t[1]),this.selection.restore(),this.observe.load())},redo:function(){var t;0!==this.sRebuffer.length&&(t=this.sRebuffer.pop(),this.buffer.set("undo"),this.core.editor().html(t[0]),this.selection.restoreInstant(t[1]),this.selection.restore(),this.observe.load())},clear:function(){this.sRebuffer=[]}}},build:function(){return{start:function(){if("textarea"!==this.opts.type)throw new Error("Only `<textarea>` types are allowed.");this.build.startTextarea(),this.build.setIn(),this.build.setId(),this.build.enableEditor(),this.build.setOptions(),this.build.callEditor()},createContainerBox:function(){this.$box=m('<div class="redactor-box" role="application" />')},setIn:function(){this.core.editor().addClass("redactor-in")},setId:function(){var t="textarea"===this.opts.type?"redactor-uuid-"+this.uuid:this.$element.attr("id");this.core.editor().attr("id",void 0===t?"redactor-uuid-"+this.uuid:t)},getName:function(){var t=this.$element.attr("name");return void 0===t?"content-"+this.uuid:t},buildTextarea:function(){},loadFromTextarea:function(){this.$editor=m("<div />"),this.$textarea=this.$element,this.$element.attr("name",this.build.getName()),this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element),this.build.setStartAttrs(),this.$editor.addClass("redactor-layer"),this.opts.overrideStyles&&this.$editor.addClass("redactor-styles"),this.$element.hide(),this.$box.prepend('<span class="redactor-voice-label" id="redactor-voice-'+this.uuid+'" aria-hidden="false">'+this.lang.get("accessibility-help-label")+"</span>")},setStartAttrs:function(){this.$editor.attr({"aria-labelledby":"redactor-voice-"+this.uuid,role:"presentation"})},startTextarea:function(){this.build.createContainerBox(),this.build.loadFromTextarea(),this.code.start(this.core.textarea().val()),this.core.textarea().val(this.clean.onSync(this.$editor.html()))},isTag:function(t){return this.$element[0].tagName===t},isInline:function(){return!this.build.isTag("TEXTAREA")&&!this.build.isTag("DIV")&&!this.build.isTag("PRE")},enableEditor:function(){this.core.editor().attr({contenteditable:!0})},setOptions:function(){"inline"===this.opts.type&&(this.opts.enterKey=!1),"inline"!==this.opts.type&&"pre"!==this.opts.type||(this.opts.toolbarMobile=!1,this.opts.toolbar=!1),this.core.editor().attr("spellcheck",this.opts.spellcheck),this.opts.structure&&this.core.editor().addClass("redactor-structure"),this.opts.stylesClass&&this.core.editor().addClass(this.opts.stylesClass),"textarea"===this.opts.type&&(this.core.box().attr("dir",this.opts.direction),this.core.editor().attr("dir",this.opts.direction),this.opts.tabindex&&this.core.editor().attr("tabindex",this.opts.tabindex),this.opts.minHeight?this.core.editor().css("min-height",this.opts.minHeight):this.core.editor().css("min-height","40px"),this.opts.maxHeight&&this.core.editor().css("max-height",this.opts.maxHeight),this.opts.maxWidth&&this.core.editor().css({"max-width":this.opts.maxWidth,margin:"auto"}))},callEditor:function(){this.build.disableBrowsersEditing(),this.events.init(),this.build.setHelpers(),this.toolbarsButtons=this.button.init(),this.toolbar.build(),this.core.editor().on("mouseup.redactor-observe."+this.uuid+" keyup.redactor-observe."+this.uuid+" focus.redactor-observe."+this.uuid+" touchstart.redactor-observe."+this.uuid,m.proxy(this.observe.toolbar,this)),this.core.element().on("blur.callback.redactor",m.proxy(function(){this.button.setInactiveAll()},this)),this.modal.templates(),this.build.plugins(),this.code.html=this.code.cleaned(this.core.editor().html()),this.core.callback("init"),this.core.callback("initToEdit"),this.start=!1},setHelpers:function(){this.opts.focus?setTimeout(this.focus.start,100):this.opts.focusEnd&&setTimeout(this.focus.end,100)},disableBrowsersEditing:function(){try{document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1),document.execCommand("AutoUrlDetect",!1,!1)}catch(t){}},plugins:function(){this.opts.plugins&&m.each(this.opts.plugins,m.proxy(function(t,e){var i="undefined"!=typeof RedactorPlugins&&void 0!==RedactorPlugins[e]?RedactorPlugins:l.fn;if(m.isFunction(i[e])){this[e]=i[e]();for(var n,r,s=this.getModuleMethods(this[e]),o=s.length,a=0;a<o;a++)this[e][s[a]]=this[e][s[a]].bind(this);void 0!==this[e].langs&&(n={},void 0!==this[e].langs[this.opts.lang]?n=this[e].langs[this.opts.lang]:void 0===this[e].langs[this.opts.lang]&&void 0!==this[e].langs.en&&(n=this[e].langs.en),r=this,m.each(n,function(t,e){void 0===r.opts.curLang[t]&&(r.opts.curLang[t]=e)})),"function"==typeof this[e].init&&this[e].init()}},this))}}},button:function(){return{toolbar:function(){return void 0!==this.button.$toolbar&&this.button.$toolbar?this.button.$toolbar:this.$toolbar},init:function(){return{format:{title:this.lang.get("format"),icon:!0,dropdown:{p:{title:this.lang.get("paragraph"),func:"block.format"},blockquote:{title:this.lang.get("quote"),func:"block.format"},pre:{title:this.lang.get("code"),func:"block.format"},h1:{title:this.lang.get("heading1"),func:"block.format"},h2:{title:this.lang.get("heading2"),func:"block.format"},h3:{title:this.lang.get("heading3"),func:"block.format"},h4:{title:this.lang.get("heading4"),func:"block.format"},h5:{title:this.lang.get("heading5"),func:"block.format"},h6:{title:this.lang.get("heading6"),func:"block.format"}}},bold:{title:this.lang.get("bold-abbr"),icon:!0,label:this.lang.get("bold"),func:"inline.format"},italic:{title:this.lang.get("italic-abbr"),icon:!0,label:this.lang.get("italic"),func:"inline.format"},deleted:{title:this.lang.get("deleted-abbr"),icon:!0,label:this.lang.get("deleted"),func:"inline.format"},underline:{title:this.lang.get("underline-abbr"),icon:!0,label:this.lang.get("underline"),func:"inline.format"},lists:{title:this.lang.get("lists"),icon:!0,dropdown:{unorderedlist:{title:"• "+this.lang.get("unorderedlist"),func:"list.toggle"},orderedlist:{title:"1. "+this.lang.get("orderedlist"),func:"list.toggle"},outdent:{title:"< "+this.lang.get("outdent"),func:"indent.decrease",observe:{element:"li",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},indent:{title:"> "+this.lang.get("indent"),func:"indent.increase",observe:{element:"li",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},ul:{title:"• "+this.lang.get("bulletslist"),icon:!0,func:"list.toggle"},ol:{title:"1. "+this.lang.get("numberslist"),icon:!0,func:"list.toggle"},outdent:{title:this.lang.get("outdent"),icon:!0,func:"indent.decrease"},indent:{title:this.lang.get("indent"),icon:!0,func:"indent.increase"},image:{title:this.lang.get("image"),icon:!0,func:"image.show"},file:{title:this.lang.get("file"),icon:!0,func:"file.show"},link:{title:this.lang.get("link"),icon:!0,dropdown:{link:{title:this.lang.get("link-insert"),func:"link.show",observe:{element:"a",in:{title:this.lang.get("link-edit")},out:{title:this.lang.get("link-insert")}}},unlink:{title:this.lang.get("unlink"),func:"link.unlink",observe:{element:"a",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},horizontalrule:{title:this.lang.get("horizontalrule"),icon:!0,func:"line.insert"}}},setFormatting:function(){for(var t in this.toolbarsButtons.format.dropdown)this.toolbarsButtons.format.dropdown.hasOwnProperty(t)&&-1===this.opts.formatting.indexOf(t)&&delete this.toolbarsButtons.format.dropdown[t]},hideButtons:function(){0!==this.opts.buttonsHide.length&&this.button.hideButtonsSlicer(this.opts.buttonsHide)},hideButtonsOnMobile:function(){this.detect.isMobile()&&0!==this.opts.buttonsHideOnMobile.length&&this.button.hideButtonsSlicer(this.opts.buttonsHideOnMobile)},hideButtonsSlicer:function(t){m.each(t,m.proxy(function(t,e){var i=this.opts.buttons.indexOf(e);-1!==i&&this.opts.buttons.splice(i,1)},this))},load:function(i){this.button.buttons=[],this.opts.buttons.forEach(function(t){var e;("image"!==t||this.image.is())&&this.toolbarsButtons.hasOwnProperty(t)&&((e=elCreate("li")).appendChild(this.button.build(t,this.toolbarsButtons[t])[0]),i[0].appendChild(e))}.bind(this))},buildButtonTooltip:function(){},build:function(t,e){var i,n=m('<a href="javascript:void(null);" rel="'+t+'" />');return n.addClass("re-button re-"+t),n.attr({role:"button",tabindex:"-1"}),n.html(e.title),(e.func||e.command||e.dropdown)&&this.button.setEvent(n,t,e),e.dropdown&&(n.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0),i=m('<ul class="dropdownMenu redactor-dropdown-menu redactor-dropdown-menu-'+n[0].rel+'" data-dropdown-allow-flip="horizontal" data-dropdown-ignore-page-scroll="true" />'),n.data("dropdown",i),this.dropdown.build(t,i,e.dropdown),this.button.setupDropdown(n[0],i[0])),this.button.buttons.push(n),n},setupDropdown:function(e,i){require(["Ui/SimpleDropdown"],function(t){t.initFragment(e,i),t.registerCallback(e.id,function(t,e){"close"===e&&this.dropdown.hideOut()}.bind(this)),elData(e,"a11y-mouse-event","mousedown"),elData(e,"aria-expanded",!1),e.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation()})}.bind(this))},getButtons:function(){return this.button.toolbar().find("a.re-button")},getButtonsKeys:function(){return this.button.buttons},setEvent:function(n,r,s){n.on("mousedown",m.proxy(function(t){if(t.preventDefault(),n.hasClass("redactor-button-disabled"))return!1;var e="func",i=s.func;return s.command?(e="command",i=s.command):s.dropdown&&(i=!(e="dropdown")),this.button.toggle(t,r,e,i),!1},this))},toggle:function(t,e,i,n,r){!this.detect.isIe()&&this.detect.isDesktop()||(this.utils.freezeScroll(),t.returnValue=!1),"command"===i?this.inline.format(n):"dropdown"===i?this.dropdown.show(t,e):this.button.clickCallback(t,n,e,r),"dropdown"!==i&&this.dropdown.hideAll(!1),!this.detect.isIe()&&this.detect.isDesktop()||this.utils.unfreezeScroll()},clickCallback:function(t,e,i,n){var r;if(t instanceof Event?t.preventDefault():t&&t.originalEvent&&t.originalEvent.preventDefault(),n=void 0===n?i:n,m.isFunction(e))e.call(this,i);else if("-1"!==e.search(/\./)){if(void 0===this[(r=e.split("."))[0]])return;"object"==typeof n?this[r[0]][r[1]].apply(this,n):this[r[0]][r[1]].call(this,n)}else"object"==typeof n?this[e].apply(this,n):this[e].call(this,n);this.observe.buttons(t,i)},all:function(){return this.button.buttons},get:function(t){if(!1!==this.opts.toolbar)return this.button.toolbar().find("a.re-"+t)},set:function(t,e){if(!1!==this.opts.toolbar){var i=this.button.toolbar().find("a.re-"+t);return i.html(e).attr("aria-label",e),i}},add:function(t,e){if(!0!==this.button.isAdded(t))return m();var i=this.button.build(t,{title:e});return this.button.toolbar().append(m("<li>").append(i)),i},addFirst:function(t,e){if(!0!==this.button.isAdded(t))return m();var i=this.button.build(t,{title:e});return this.button.toolbar().prepend(m("<li>").append(i)),i},addAfter:function(t,e,i){if(!0!==this.button.isAdded(e))return m();var n=this.button.build(e,{title:i}),r=this.button.get(t);return 0!==r.length?r.parent().after(m("<li>").append(n)):this.button.toolbar().append(m("<li>").append(n)),n},addBefore:function(t,e,i){if(!0!==this.button.isAdded(e))return m();var n=this.button.build(e,{title:i}),r=this.button.get(t);return 0!==r.length?r.parent().before(m("<li>").append(n)):this.button.toolbar().append(m("<li>").append(n)),n},isAdded:function(t){var e=this.opts.buttonsHideOnMobile.indexOf(t);return!(!1===this.opts.toolbar||-1!==e&&this.detect.isMobile())},setIcon:function(t,e){this.opts.buttonsTextLabeled||t.html(e).addClass("re-button-icon")},changeIcon:function(t,e){var i=this.button.get(t);0!==i.length&&i.find("i").removeAttr("class").addClass("re-icon-"+e)},addCallback:function(e,i){var n,r;void 0!==e&&!1!==this.opts.toolbar&&(n="dropdown"===i?"dropdown":"func",r=e.attr("rel"),e.on("mousedown",m.proxy(function(t){return!e.hasClass("redactor-button-disabled")&&void this.button.toggle(t,r,n,i)},this)))},addDropdown:function(t,e){if(!1!==this.opts.toolbar){t.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0);var i=t.attr("rel");this.button.addCallback(t,"dropdown");var n=m('<ul class="dropdownMenu redactor-dropdown-menu redactor-dropdown-menu-'+i+'" data-dropdown-allow-flip="horizontal" data-dropdown-ignore-page-scroll="true" />');return t.data("dropdown",n),e&&(this.dropdown.build(i,n,e),this.button.setupDropdown(t[0],n[0])),n}},setActive:function(t){this.button.get(t).addClass("redactor-act").attr({"aria-pressed":!0,tabindex:0})},setInactive:function(t){this.button.get(t).removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},setInactiveAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(e=e.not(".re-"+t)),e.removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},disable:function(t){this.button.get(t).addClass("redactor-button-disabled").attr("aria-disabled",!0)},enable:function(t){this.button.get(t).removeClass("redactor-button-disabled").attr("aria-disabled",!1)},disableAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(Array.isArray(t)||(t=[t]),t=t.map(function(t){return".re-"+t}),e=e.not(t.join(","))),e.addClass("redactor-button-disabled").attr("aria-disabled",!0)},enableAll:function(){this.button.toolbar().find("a.re-button").removeClass("redactor-button-disabled").attr("aria-disabled",!1)},remove:function(t){this.button.get(t).remove()}}},caret:function(){return{set:function(t,e,i){var n=this.core.editor().scrollTop();this.core.editor().focus(),this.core.editor().scrollTop(n),i=void 0===i?0:1,t=t[0]||t,e=e[0]||e;var r=this.selection.get(),s=this.selection.range(r);try{s.setStart(t,0),s.setEnd(e,i)}catch(t){}this.selection.update(r,s)},prepare:function(t){return this.detect.isFirefox()&&void 0!==this.start&&this.core.editor().focus(),t[0]||t},start:function(t){var e,i;if(t=this.caret.prepare(t)){if("BR"===t.tagName)return this.caret.before(t);var n=m(t).children().first(),r=this.utils.isInlineTag(t.tagName);""===t.innerHTML||r?this.caret.setStartEmptyOrInline(t,r):n&&0!==n.length&&this.utils.isInlineTag(n[0].tagName)&&""===n.text()?this.caret.setStartEmptyOrInline(n[0],!0):((e=window.getSelection()).removeAllRanges(),(i=document.createRange()).selectNodeContents(t),i.collapse(!0),e.addRange(i))}},setStartEmptyOrInline:function(t,e){var i=window.getSelection(),n=document.createRange(),r=document.createTextNode("");n.setStart(t,0),n.insertNode(r),n.setStartAfter(r),n.collapse(!0),i.removeAllRanges(),i.addRange(n),e||this.core.editor().on("keydown.redactor-remove-textnode",function(){m(r).remove(),m(this).off("keydown.redactor-remove-textnode")})},end:function(t){var e,i;if(t=this.caret.prepare(t)){if("BR"!==t.tagName&&""===t.innerHTML)return this.caret.start(t);if("BR"===t.tagName){var n=document.createElement("span");return n.className="redactor-invisible-space",n.innerHTML="​",m(t).after(n),(e=window.getSelection()).removeAllRanges(),(i=document.createRange()).setStartBefore(n),i.setEndBefore(n),e.addRange(i),void m(n).replaceWith(function(){return m(this).contents()})}if(t.lastChild&&1===t.lastChild.nodeType)return this.caret.after(t.lastChild);if((e=window.getSelection()).getRangeAt||e.rangeCount)try{(i=e.getRangeAt(0)).selectNodeContents(t),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}catch(t){}}},after:function(t){var e,i,n,r;if(t=this.caret.prepare(t)){if("BR"===t.tagName)return this.caret.end(t);this.utils.isBlockTag(t.tagName)?void 0===(i=this.caret.next(t))?this.caret.end(t):("TABLE"===i.tagName?i=m(i).find("th, td").first()[0]:"UL"!==i.tagName&&"OL"!==i.tagName||(i=m(i).find("li").first()[0]),this.caret.start(i)):(n=document.createTextNode(""),(r=window.getSelection()).removeAllRanges(),(e=document.createRange()).setStartAfter(t),e.insertNode(n),e.setStartAfter(n),e.collapse(!0),r.addRange(e))}},before:function(t){var e,i,n;(t=this.caret.prepare(t))&&(this.utils.isBlockTag(t.tagName)?void 0===(n=this.caret.prev(t))?this.caret.start(t):("TABLE"===n.tagName?n=m(n).find("th, td").last()[0]:"UL"!==n.tagName&&"OL"!==n.tagName||(n=m(n).find("li").last()[0]),this.caret.end(n)):((e=window.getSelection()).removeAllRanges(),(i=document.createRange()).setStartBefore(t),i.collapse(!0),e.addRange(i)))},next:function(t){var e=m(t).next();return e.hasClass("redactor-script-tag, redactor-selection-marker")?e.next()[0]:e[0]},prev:function(t){var e=m(t).prev();return e.hasClass("redactor-script-tag, redactor-selection-marker")?e.prev()[0]:e[0]},offset:function(t){return this.offset.get(t)}}},clean:function(){return{onSet:function(t){t=this.clean.savePreCode(t),this.opts.script&&(t=t.replace(/<script(.*?[^>]?)>([\w\W]*?)<\/script>/gi,'<pre class="redactor-script-tag" $1>$2</pre>')),t=(t=(t=(t=(t=t.replace(/\$/g,"$")).replace(/&/g,"&")).replace(/<a href="(.*?[^>]?)®(.*?[^>]?)">/gi,'<a href="$1®$2">')).replace(/<span id="selection-marker-1"(.*?[^>]?)><\/span>/gi,"###marker1###")).replace(/<span id="selection-marker-2"(.*?[^>]?)><\/span>/gi,"###marker2###");var e,i=this,n=m("<div/>").html(m.parseHTML(t,document,!0)),r=this.opts.replaceTags;r&&(e=Object.keys(this.opts.replaceTags),n.find(e.join(",")).each(function(t,e){i.utils.replaceToTag(e,r[e.tagName.toLowerCase()])})),n.find("span, a").attr("data-redactor-span",!0),n.find(this.opts.inlineTags.join(",")).each(function(){var t=m(this);t.attr("style")&&t.attr("data-redactor-style-cache",t.attr("style"))}),t=n.html();var s=["font","html","head","link","body","meta","applet"];return this.opts.script||s.push("script"),t=this.clean.stripTags(t,s),this.opts.removeComments&&(t=t.replace(/<!--[\s\S]*?-->/gi,"")),-1!==(t=(t=(t=this.paragraphize.load(t)).replace("###marker1###",'<span id="selection-marker-1" class="redactor-selection-marker"></span>')).replace("###marker2###",'<span id="selection-marker-2" class="redactor-selection-marker"></span>')).search(/^(||\s||<br\s?\/?>|| )$/i)?this.opts.emptyHtml:t},onGet:function(t){return this.clean.onSync(t)},onSync:function(i){if(-1!==(i=(i=i.replace(/\u200B/g,"")).replace(/​/gi,"")).search(/^<p>(||\s||<br\s?\/?>|| )<\/p>$/i))return"";i=(i=(i=(i=i.replace(/<span(.*?)id="redactor-image-box"(.*?[^>])>([\w\W]*?)<img(.*?)><\/span>/gi,"$3<img$4>")).replace(/<span(.*?)id="redactor-image-resizer"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<span(.*?)id="redactor-image-editter"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<img(.*?)style="(.*?)opacity: 0\.5;(.*?)"(.*?)>/gi,'<img$1style="$2$3"$4>');var t=m("<div/>").html(m.parseHTML(i,document,!0));t.find('*[style=""]').removeAttr("style"),t.find('*[class=""]').removeAttr("class"),t.find('*[rel=""]').removeAttr("rel"),t.find('*[data-image=""]').removeAttr("data-image"),t.find('*[alt=""]').removeAttr("alt"),t.find('*[title=""]').removeAttr("title"),t.find("*[data-redactor-style-cache]").removeAttr("data-redactor-style-cache"),t.find(".redactor-invisible-space, .redactor-unlink").each(function(){m(this).contents().unwrap()}),t.find("span, a").removeAttr("data-redactor-span data-redactor-style-cache").each(function(){0===this.attributes.length&&m(this).contents().unwrap()}),t.find("img").removeAttr("rel"),t.find(".redactor-selection-marker, #redactor-insert-marker").remove(),i=t.html(),this.opts.script&&(i=i.replace(/<pre class="redactor-script-tag"(.*?[^>]?)>([\w\W]*?)<\/pre>/gi,"<script$1>$2<\/script>")),i=(i=(i=(i=(i=this.clean.restoreFormTags(i)).replace(new RegExp("<br\\s?/?></h","gi"),"</h")).replace(new RegExp("<br\\s?/?></li>","gi"),"</li>")).replace(new RegExp("</li><br\\s?/?>","gi"),"</li>")).replace(/<pre>/gi,"<pre>\n"),this.opts.preClass&&(i=i.replace(/<pre>/gi,'<pre class="'+this.opts.preClass+'">')),this.opts.linkNofollow&&(i=(i=i.replace(/<a(.*?)rel="nofollow"(.*?[^>])>/gi,"<a$1$2>")).replace(/<a(.*?[^>])>/gi,'<a$1 rel="nofollow">'));return m.each({"™":"™","©":"©","…":"…","—":"—","‐":"‐"},function(t,e){i=i.replace(new RegExp(t,"g"),e)}),i=(i=i.replace(/&/g,"&")).replace(/\n{2,}/g,"\n"),this.opts.removeNewlines&&(i=i.replace(/\r?\n/g,"")),i},onPaste:function(t,e,i){return!0!==i&&(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2")).replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3")).replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>([\w\W]*?)<\/span>/gi,"<b><i>$2</i></b>")).replace(/<span[^>]*(font-style: italic; font-weight: 700|font-weight: 700; font-style: italic)[^>]*>([\w\W]*?)<\/span>/gi,"<b><i>$2</i></b>")).replace(/<span[^>]*font-style: italic[^>]*>([\w\W]*?)<\/span>/gi,"<i>$1</i>")).replace(/<span[^>]*font-weight: bold[^>]*>([\w\W]*?)<\/span>/gi,"<b>$1</b>")).replace(/<span[^>]*font-weight: 700[^>]*>([\w\W]*?)<\/span>/gi,"<b>$1</b>")).replace(/<o:p[^>]*>/gi,"")).replace(/<\/o:p>/gi,""),this.clean.isHtmlMsWord(t)&&(t=this.clean.cleanMsWord(t))),t=m.trim(t),e.pre?this.opts.preSpaces&&(t=t.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))):(t=this.clean.replaceBrToNl(t),t=this.clean.removeTagsInsidePre(t)),!0!==i&&(t=this.clean.removeEmptyInlineTags(t),!1===e.encode&&(t=t.replace(/&/g,"&"),t=this.clean.convertTags(t,e),t=this.clean.getPlainText(t),t=this.clean.reconvertTags(t,e))),e.text&&(t=this.clean.replaceNbspToSpaces(t),t=this.clean.getPlainText(t)),e.lists&&(t=t.replace("\n","<br>")),e.encode&&(t=this.clean.encodeHtml(t)),e.paragraphize&&(t=(t=t.replace(/ \n/g," ")).replace(/\n /g," "),t=(t=this.paragraphize.load(t)).replace(/<p><\/p>/g,"")),t=(t=t.replace(/<li><p>/g,"<li>")).replace(/<\/p><\/li>/g,"</li>")},getCurrentType:function(t,e){var i=this.selection.blocks(),n={text:!1,encode:!1,paragraphize:!0,line:this.clean.isHtmlLine(t),blocks:this.clean.isHtmlBlocked(t),pre:!1,lists:!1,block:!0,inline:!0,links:!0,images:!0};return 1===i.length&&this.utils.isCurrentOrParent(["h1","h2","h3","h4","h5","h6","a","figcaption"])?(n.text=!0,n.paragraphize=!1,n.inline=!1,n.images=!1,n.links=!1,n.line=!0):"inline"===this.opts.type||!1===this.opts.enterKey?(n.paragraphize=!1,n.block=!1,n.line=!0):1===i.length&&this.utils.isCurrentOrParent(["li"])?(n.lists=!0,n.block=!1,n.paragraphize=!1,n.images=!1):1===i.length&&this.utils.isCurrentOrParent(["th","td","blockquote"])?(n.block=!1,n.paragraphize=!1):("pre"===this.opts.type||1===i.length&&this.utils.isCurrentOrParent("pre"))&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),!0===n.line&&(n.paragraphize=!1),!0===e&&(n.text=!1),n},isHtmlBlocked:function(t){var e=t.match(new RegExp("</("+this.opts.blockTags.join("|").toUpperCase()+")>","gi")),i=t.match(new RegExp("<hr(.*?[^>])>","gi"));return null!==e||null!==i},isHtmlLine:function(t){if(this.clean.isHtmlBlocked(t))return!1;var e=t.match(/<br\s?\/?>/gi),i=t.match(/\n/gi);return!e&&!i},isHtmlMsWord:function(t){return t.match(/class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i)},removeEmptyInlineTags:function(t){var e=this.opts.inlineTags,i=m("<div/>").html(m.parseHTML(t,document,!0)),n=this,r=i.find("span"),s=i.find(e.join(","));return s.removeAttr("style"),s.each(function(){var t=m(this).html();0===this.attributes.length&&n.utils.isEmpty(t)&&m(this).replaceWith(function(){return m(this).contents()})}),r.each(function(){m(this).html();0===this.attributes.length&&m(this).replaceWith(function(){return m(this).contents()})}),t=(t=(t=(t=i.html()).replace("\x3c!--?php","<?php")).replace("\x3c!--?","<?")).replace("?--\x3e","?>"),i.remove(),t},cleanMsWord:function(t){t=(t=(t=(t=(t=t.replace(/<!--[\s\S]*?-->/g,"")).replace(/<o:p>[\s\S]*?<\/o:p>/gi,"")).replace(/\n/g," ")).replace(/<\/p>/gi,'</p><p><br data-redactor="br"></p>')).replace(/<\/div>|<\/li>|<\/td>/gi,"\n\n");var l=m("<div/>").html(t);elBySelAll("br",l[0],function(t){if("br"===elData(t,"redactor"))t.removeAttribute("data-redactor");else{var e=t.parentNode;if(e&&"P"===e.nodeName){for(var i=elCreate("p");t.nextSibling;)i.appendChild(t.nextSibling);e.parentNode.insertBefore(i,e.nextSibling),elRemove(t)}}});var c=!1,h=1,d=[];return l.find("p[style]").each(function(){var t=m(this).attr("style").match(/mso\-list\:l([0-9]+)\slevel([0-9]+)/);if(t){var e=parseInt(t[1]),i=parseInt(t[2]),n=m(this).html().match(/^[\w]+\./)?"ol":"ul",r=m("<li/>").html(m(this).html());if(r.html(r.html().replace(/^([\w\.]+)</,"<")),r.find("span:first").remove(),1==i&&-1==m.inArray(e,d)){var s=m("<"+n+"/>").attr({"data-level":i,"data-list":e}).html(r);m(this).replaceWith(s),c=e,d.push(e)}else{if(h<i){for(var o=l.find('[data-level="'+h+'"][data-list="'+c+'"]'),a=h;a<i;a++)(s=m("<"+n+"/>")).appendTo(o.find("li").last()),o=s;o.attr({"data-level":i,"data-list":e}).html(r)}else{l.find('[data-level="'+i+'"][data-list="'+e+'"]').last().append(r)}h=i,c=e,m(this).remove()}}}),l.find("[data-level][data-list]").removeAttr("data-level data-list"),elBySelAll("ol, ul",l[0],function(i){["nextElementSibling","previousElementSibling"].forEach(function(t){for(var e=i[t];e&&"P"===e.nodeName&&""===e.className&&"<br>"===e.innerHTML;)elRemove(e),e=i[t]})}),t=l.html()},replaceNbspToSpaces:function(t){return t.replace(" "," ")},replaceBrToNl:function(t){return t.replace(/<br\s?\/?>/gi,"\n")},replaceNlToBr:function(t){return t.replace(/\n/g,"<br />")},convertTags:function(t,e){var i=m("<div>").html(t);i.find("iframe").remove();var n=i.find("a");if(n.removeAttr("style"),!1!==this.opts.pasteLinkTarget&&n.attr("target",this.opts.pasteLinkTarget),e.links&&this.opts.pasteLinks&&i.find("a").each(function(t,e){if(e.href){for(var i,n='#####[a href="'+e.href+'"',r=0,s=e.attributes.length;r<s;r++)"href"!==(i=e.attributes.item(r)).name&&(n+=" "+i.name+'="'+i.value+'"');e.outerHTML=n+"]#####"+e.innerHTML+"#####[/a]#####"}}),t=i.html(),e.images&&this.opts.pasteImages&&(t=t.replace(/<img(.*?)src="(.*?)"(.*?[^>])>/gi,'#####[img$1src="$2"$3]#####')),this.opts.pastePlainText)return t;for(var r=e.lists?["ul","ol","li"]:this.opts.pasteBlockTags,s=e.block||e.lists?e.inline?r.concat(this.opts.pasteInlineTags):r:e.inline?this.opts.pasteInlineTags:[],o=s.length,a=0;a<o;a++)t=t.replace(new RegExp("</"+s[a]+">","gi"),"###/"+s[a]+"###"),t="td"===s[a]||"th"===s[a]?t.replace(new RegExp("<"+s[a]+'(.*?[^>])((colspan|rowspan)="(.*?[^>])")?(.*?[^>])>',"gi"),"###"+s[a]+" $2###"):this.utils.isInlineTag(s[a])?(t=(t=t.replace(new RegExp("<"+s[a]+'([^>]*)class="([^>]*)"[^>]*>',"gi"),"###"+s[a]+' class="$2"###')).replace(new RegExp("<"+s[a]+'([^>]*)data-redactor-style-cache="([^>]*)"[^>]*>',"gi"),"###"+s[a]+' cache="$2"###')).replace(new RegExp("<"+s[a]+"[^>]*>","gi"),"###"+s[a]+"###"):t.replace(new RegExp("<"+s[a]+"[^>]*>","gi"),"###"+s[a]+"###");return t},reconvertTags:function(t,e){if((e.links&&this.opts.pasteLinks||e.images&&this.opts.pasteImages)&&(t=(t=t.replace(new RegExp("#####\\[","gi"),"<")).replace(new RegExp("\\]#####","gi"),">")),this.opts.pastePlainText)return t;for(var i=e.lists?["ul","ol","li"]:this.opts.pasteBlockTags,n=e.block||e.lists?e.inline?i.concat(this.opts.pasteInlineTags):i:e.inline?this.opts.pasteInlineTags:[],r=n.length,s=0;s<r;s++)t=t.replace(new RegExp("###/"+n[s]+"###","gi"),"</"+n[s]+">");for(s=0;s<r;s++)t=t.replace(new RegExp("###"+n[s]+"###","gi"),"<"+n[s]+">");for(var o,s=0;s<r;s++){"td"===n[s]||"th"===n[s]?t=t.replace(new RegExp("###"+n[s]+"s?(.*?[^#])###","gi"),"<"+n[s]+"$1>"):this.utils.isInlineTag(n[s])&&(o="span"===n[s]?' data-redactor-span="true"':"",t=(t=t.replace(new RegExp("###"+n[s]+' cache="(.*?[^#])"###',"gi"),"<"+n[s]+' style="$1"'+o+' data-redactor-style-cache="$1">')).replace(new RegExp("###"+n[s]+"s?(.*?[^#])###","gi"),"<"+n[s]+"$1>"))}return t},cleanPre:function(t){t=void 0===t?m(this.selection.block()).closest("pre",this.core.editor()[0]):t,m(t).find("br").replaceWith(function(){return document.createTextNode("\n")}),m(t).find("p").replaceWith(function(){return m(this).contents()})},removeTagsInsidePre:function(t){var e=m("<div />").append(t);return e.find("pre").replaceWith(function(){var t=m(this).html();return t=(t=t.replace(/<br\s?\/?>|<\/p>|<\/div>|<\/li>|<\/td>/gi,"\n")).replace(/(<([^>]+)>)/gi,""),m("<pre />").append(t)}),t=e.html(),e.remove(),t},getPlainText:function(t){t=(t=(t=(t=(t=(t=t.replace(/<!--[\s\S]*?-->/gi,"")).replace(/<style[\s\S]*?style>/gi,"")).replace(/<p><\/p>/g,"")).replace(/<\/div>|<\/li>|<\/td>/gi,"\n")).replace(/<\/p>/gi,"\n\n")).replace(/<\/H[1-6]>/gi,"\n\n");var e=document.createElement("div");return e.innerHTML=t,t=e.textContent||e.innerText,m.trim(t)},savePreCode:function(t){return t=this.clean.savePreFormatting(t),t=this.clean.saveCodeFormatting(t),t=this.clean.restoreSelectionMarkers(t)},savePreFormatting:function(a){var t=a.match(/<pre(.*?)>([\w\W]*?)<\/pre>/gi);return null===t||m.each(t,m.proxy(function(t,e){var i,n,r,s=[],o=!1;e.match(/<pre(.*?)>(([\n\r\s]+)?)<code(.*?)>/i)?(o=!0,i=(s=e.match(/<pre(.*?)>(([\n\r\s]+)?)<code(.*?)>([\w\W]*?)<\/code>(([\n\r\s]+)?)<\/pre>/i))[5],n=s[1],r=s[4]):(i=(s=e.match(/<pre(.*?)>([\w\W]*?)<\/pre>/i))[2],n=s[1]),i=(i=i.replace(/<br\s?\/?>/g,"\n")).replace(/ /g," "),this.opts.preSpaces&&(i=i.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),i=(i=this.clean.encodeEntities(i)).replace(/\$/g,"$"),a=o?a.replace(e,"<pre"+n+"><code"+r+">"+i+"</code></pre>"):a.replace(e,"<pre"+n+">"+i+"</pre>")},this)),a},saveCodeFormatting:function(n){var t=n.match(/<code(.*?)>([\w\W]*?)<\/code>/gi);return null===t||m.each(t,m.proxy(function(t,e){var i=e.match(/<code(.*?)>([\w\W]*?)<\/code>/i);i[2]=i[2].replace(/ /g," "),i[2]=this.clean.encodeEntities(i[2]),i[2]=i[2].replace(/\$/g,"$"),n=n.replace(e,"<code"+i[1]+">"+i[2]+"</code>")},this)),n},restoreSelectionMarkers:function(t){return t=t.replace(/<span id="selection-marker-([0-9])" class="redactor-selection-marker"><\/span>/g,'<span id="selection-marker-$1" class="redactor-selection-marker"></span>')},saveFormTags:function(t){return t},restoreFormTags:function(t){return t.replace(/<section(.*?) rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>")},encodeHtml:function(t){return t=(t=(t=(t=t.replace(/”/g,'"')).replace(/“/g,'"')).replace(/‘/g,"'")).replace(/’/g,"'"),t=this.clean.encodeEntities(t)},encodeEntities:function(t){return t=(t=String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},stripTags:function(t,i){if(void 0===i)return t.replace(/(<([^>]+)>)/gi,"");return t.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(t,e){return-1===i.indexOf(e.toLowerCase())?t:""})},removeMarkers:function(t){return t.replace(/<span(.*?[^>]?)class="redactor-selection-marker"(.*?[^>]?)>([\w\W]*?)<\/span>/gi,"")},removeSpaces:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=m.trim(t)).replace(/\n/g,"")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g," ")).replace(/[\s\n]*$/g," ")).replace(/>\s{2,}</g,"> <")).replace(/\n\n/g,"\n")).replace(/\u200B/g,"")},removeSpacesHard:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=m.trim(t)).replace(/\n/g,"")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g,"")).replace(/[\s\n]*$/g,"")).replace(/>\s{2,}</g,"><")).replace(/\n\n/g,"\n")).replace(/\u200B/g,"")},normalizeCurrentHeading:function(){var t=this.selection.block();this.utils.isCurrentOrParentHeader()&&t&&t.normalize()}}},code:function(){return{syncFire:!0,html:!1,start:function(t){t=(t=m.trim(t)).replace(/^(<span id="selection-marker-1" class="redactor-selection-marker"><\/span>)/,""),t=(t=this.clean.onSet(t)).replace(/<p><span id="selection-marker-1" class="redactor-selection-marker"><\/span><\/p>/,""),this.events.stopDetectChanges(),this.core.editor().html(t),this.observe.load(),this.events.startDetectChanges()},set:function(t,e){t=m.trim(t),(e=e||{}).start&&(this.start=e.start),"textarea"===this.opts.type?t=this.clean.onSet(t):"div"===this.opts.type&&""===t&&(t=this.opts.emptyHtml),this.core.editor().html(t),"textarea"===this.opts.type&&this.code.sync()},get:function(){if("textarea"===this.opts.type)return this.core.textarea().val();var t=this.core.editor().html();return t=this.clean.onGet(t)},sync:function(){if(this.code.syncFire){var t=this.core.editor().html(),e=this.code.cleaned(t);if(!this.code.isSync(e)){if(this.code.html=e,"textarea"!==this.opts.type)return this.core.callback("sync",t),void this.core.callback("change",t);"textarea"===this.opts.type&&setTimeout(m.proxy(function(){this.code.startSync(t)},this),10)}}},startSync:function(t){t=this.core.callback("syncBefore",t),t=this.clean.onSync(t),this.core.textarea().val(t),this.core.callback("sync",t),!1===this.start&&this.core.callback("change",t),this.start=!1},isSync:function(t){var e=!1!==this.code.html&&this.code.html;return!1!==e&&e===t},cleaned:function(t){return t=t.replace(/\u200B/g,""),this.clean.removeMarkers(t)}}},core:function(){return{id:function(){return this.$editor.attr("id")},element:function(){return this.$element},editor:function(){return void 0===this.$editor?m():this.$editor},textarea:function(){return this.$textarea},box:function(){return"textarea"===this.opts.type?this.$box:this.$element},toolbar:function(){return!!this.$toolbar&&this.$toolbar},air:function(){return!!this.$air&&this.$air},object:function(){return m.extend({},this)},structure:function(){this.core.editor().toggleClass("redactor-structure")},addEvent:function(t){this.core.event=t},getEvent:function(){return this.core.event},callback:function(t,e,i){var n=!1,r=m._data(this.core.element()[0],"events");if(void 0!==r&&void 0!==r[t])for(var s,o,a=r[t].length,l=0;l<a;l++){"callback.redactor"===r[t][l].namespace&&(s=r[t][l].handler,n=void 0===(o=void 0===i?[e]:[e,i])?s.call(this,e):s.call(this,e,o))}if(n)return n;if(void 0===this.opts.callbacks[t])return void 0===i?e:i;var c=this.opts.callbacks[t];return m.isFunction(c)?void 0===i?c.call(this,e):c.call(this,e,i):void 0===i?e:i},destroy:function(){this.opts.destroyed=!0,this.core.callback("destroy"),m("#redactor-voice-"+this.uuid).remove(),this.core.editor().removeClass("redactor-in redactor-styles redactor-structure redactor-layer-img-edit"),this.core.editor().off("keydown.redactor-remove-textnode"),this.core.editor().off(".redactor-observe."+this.uuid),this.$element.off(".redactor").removeData("redactor"),this.core.editor().off(".redactor"),m(document).off(".redactor-air."+this.uuid),m(document).off("mousedown.redactor-blur."+this.uuid),m(document).off("mousedown.redactor."+this.uuid),m(document).off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid),m(window).off(".redactor-toolbar."+this.uuid),m(window).off("touchmove.redactor."+this.uuid),m("body").off("scroll.redactor."+this.uuid),m(this.opts.toolbarFixedTarget).off("scroll.redactor."+this.uuid);var i=this;!1!==this.opts.plugins&&m.each(this.opts.plugins,function(t,e){m(window).off(".redactor-plugin-"+e),m(document).off(".redactor-plugin-"+e),m("body").off(".redactor-plugin-"+e),i.core.editor().off(".redactor-plugin-"+e)}),this.$element.off("click.redactor-click-to-edit"),this.$element.removeClass("redactor-click-to-edit"),this.core.editor().removeClass("redactor-layer"),this.core.editor().removeAttr("contenteditable");var t=this.code.get();this.opts.toolbar&&this.$toolbar&&this.$toolbar.find("a").each(function(){var t=m(this);t.data("dropdown")&&(t.data("dropdown").remove(),t.data("dropdown",{}))}),"textarea"===this.opts.type&&(this.$box.after(this.$element),this.$box.remove(),this.$element.val(t).show()),this.opts.toolbar&&this.$toolbar&&this.$toolbar.remove(),this.$modalBox&&this.$modalBox.remove(),this.$modalOverlay&&this.$modalOverlay.remove(),m(".redactor-link-tooltip").remove()}}},detect:function(){return{isWebkit:function(){return/webkit/.test(this.opts.userAgent)},isFirefox:function(){return-1<this.opts.userAgent.indexOf("firefox")},isIe:function(t){if(document.documentMode||/Edge/.test(navigator.userAgent))return"edge";var e=RegExp("msie"+(isNaN(t)?"":"\\s"+t),"i").test(navigator.userAgent);return e=e||!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)},isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isDesktop:function(){return!/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent)},isIpad:function(){return/iPad/.test(navigator.userAgent)}}},dropdown:function(){return{active:!1,button:!1,key:!1,position:[],getDropdown:function(){return this.dropdown.active},build:function(t,e,i){var n,r,s=document.createDocumentFragment();for(var o in i){i.hasOwnProperty(o)&&(n=i[o],r=this.dropdown.buildItem(o,n),this.observe.addDropdown(m(r),o,n),s.appendChild(r))}for(var a=!1,l=0,c=s.childNodes.length;l<c;l++)if(s.childNodes[l].nodeType===Node.ELEMENT_NODE){a=!0;break}a&&(e[0].rel=t,e[0].appendChild(s))},buildFormatting:function(){},buildItem:function(e,i){var t=elCreate("li");return void 0!==i.classname&&t.classList.add(i.classname),0===e.toLowerCase().indexOf("divider")?t.classList.add("redactor-dropdown-divider"):(t.innerHTML='<a href="#" class="redactor-dropdown-'+e+'" role="button"><span>'+i.title+"</span></a>",m(t.children[0]).on("mousedown",function(t){t.preventDefault(),this.dropdown.buildClick(t,e,i)}.bind(this))),t},buildClick:function(t,e,i){var n;m(t.target).hasClass("redactor-dropdown-link-inactive")||(n=this.dropdown.buildCommand(i),void 0!==i.args?this.button.toggle(t,e,n.type,n.callback,i.args):this.button.toggle(t,e,n.type,n.callback))},buildCommand:function(t){var e={type:"func"};return e.callback=t.func,t.command?(e.type="command",e.callback=t.command):t.dropdown&&(e.type="dropdown",e.callback=t.dropdown),e},show:function(t,e){this.detect.isDesktop()&&this.core.editor().focus(),this.dropdown.hideAll(!1,e),this.dropdown.key=e,this.dropdown.button=this.button.get(this.dropdown.key),require(["Ui/SimpleDropdown"],function(t){var e=this.dropdown.button[0].id;t.toggleDropdown(e),t.isOpen(e)?(this.dropdown.active=m(t.getDropdownMenu(e)),this.core.callback("dropdownShow",{dropdown:this.dropdown.active,key:this.dropdown.key,button:this.dropdown.button}),this.button.setActive(this.dropdown.key),this.dropdown.button.addClass("dropact").attr("aria-expanded",!0),this.dropdown.enableCallback()):this.dropdown.hide()}.bind(this)),t.preventDefault()},showIsFixedToolbar:function(){},showIsUnFixedToolbar:function(){},enableEvents:function(){},enableCallback:function(){this.core.callback("dropdownShown",{dropdown:this.dropdown.active,key:this.dropdown.key,button:this.dropdown.button})},getButtonPosition:function(){},closeHandler:function(){},hideAll:function(t,e){this.dropdown.hideOut(e)},hide:function(){this.dropdown.hideOut()},hideOut:function(t){var e;!1!==this.dropdown.active&&this.dropdown.button[0].rel!==t&&(this.core.callback("dropdownHide",this.dropdown.active),e=this.dropdown.button[0].id,require(["Ui/SimpleDropdown"],function(t){t.close(e)}),this.dropdown.button.removeClass("redactor-act dropact").attr("aria-expanded",!1),this.dropdown.button=!1,this.dropdown.key=!1,this.dropdown.active=!1)}}},events:function(){return{focused:!1,blured:!0,dropImage:!1,stopChanges:!1,stopDetectChanges:function(){this.events.stopChanges=!0},startDetectChanges:function(){var t=this;setTimeout(function(){t.events.stopChanges=!1},1)},dragover:function(t){t.preventDefault(),"IMG"===t.target.tagName&&m(t.target).addClass("redactor-image-dragover")},dragleave:function(t){this.core.editor().find("img").removeClass("redactor-image-dragover")},drop:function(t){return t=t.originalEvent||t,this.core.editor().find("img").removeClass("redactor-image-dragover"),"inline"===this.opts.type||"pre"===this.opts.type?(t.preventDefault(),!1):void 0===window.FormData||!t.dataTransfer||(0===t.dataTransfer.files.length?this.events.onDrop(t):(this.events.onDropUpload(t),void this.core.callback("drop",t)))},click:function(t){var e=this.core.getEvent(),i="click"!==e&&"arrow"!==e&&"click";this.core.addEvent(i),this.utils.disableSelectAll(),this.core.callback("click",t)},focus:function(t){var e,i;this.rtePaste||(this.events.isCallback("focus")&&this.core.callback("focus",t),this.events.focused=!0,(this.events.blured=!1)===this.selection.current()&&(e=this.selection.get(),(i=this.selection.range(e)).setStart(this.core.editor()[0],0),i.setEnd(this.core.editor()[0],0),this.selection.update(e,i)))},blur:function(t){this.start||this.rtePaste||0===m(t.target).closest("#"+this.core.id()+", .redactor-toolbar, .redactor-dropdown, #redactor-modal-box").length&&(!this.events.blured&&this.events.isCallback("blur")&&this.core.callback("blur",t),this.events.focused=!1,this.events.blured=!0)},touchImageEditing:function(){var t=-1;this.events.imageEditing=!1,m(window).on("touchmove.redactor."+this.uuid,m.proxy(function(){this.events.imageEditing=!0,-1!==t&&clearTimeout(t),t=setTimeout(m.proxy(function(){this.events.imageEditing=!1},this),500)},this))},init:function(){this.core.editor().on("dragover.redactor dragenter.redactor",m.proxy(this.events.dragover,this)),this.core.editor().on("dragleave.redactor",m.proxy(this.events.dragleave,this)),this.core.editor().on("drop.redactor",m.proxy(this.events.drop,this)),this.core.editor().on("click.redactor",m.proxy(this.events.click,this)),this.core.editor().on("paste.redactor",m.proxy(this.paste.init,this)),this.core.editor().on("keydown.redactor",m.proxy(this.keydown.init,this)),this.core.editor().on("keyup.redactor",m.proxy(this.keyup.init,this)),this.core.editor().on("focus.redactor",m.proxy(this.events.focus,this)),m(document).on("mousedown.redactor-blur."+this.uuid,m.proxy(this.events.blur,this)),this.events.touchImageEditing(),this.events.createObserver(),this.events.setupObserver()},createObserver:function(){var e=this;this.events.observer=new MutationObserver(function(t){t.forEach(m.proxy(e.events.iterateObserver,e))})},iterateObserver:function(t){var e=!1;("textarea"!==this.opts.type&&"div"!==this.opts.type||this.detect.isFirefox()||t.target!==this.core.editor()[0])&&("class"!==t.attributeName||t.target!==this.core.editor()[0])&&"data-vivaldi-spatnav-clickable"!=t.attributeName||(e=!0),e||(this.observe.load(),this.events.changeHandler())},setupObserver:function(){this.events.observer.observe(this.core.editor()[0],{attributes:!0,subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0})},changeHandler:function(){this.events.stopChanges||this.code.sync()},onDropUpload:function(t){if(t.preventDefault(),t.stopPropagation(),(this.opts.dragImageUpload||this.opts.dragFileUpload)&&(null!==this.opts.imageUpload||null!==this.opts.fileUpload)){"IMG"===t.target.tagName&&(this.events.dropImage=t.target);for(var e=t.dataTransfer.files,i=e.length,n=0;n<i;n++)this.upload.directUpload(e[n],t)}},onDrop:function(t){this.core.callback("drop",t)},isCallback:function(t){return void 0!==this.opts.callbacks[t]&&m.isFunction(this.opts.callbacks[t])},stopDetect:function(){this.events.stopDetectChanges()},startDetect:function(){this.events.startDetectChanges()}}},file:function(){return{is:function(){},show:function(){},insert:function(){},release:function(){},text:function(t){}}},focus:function(){return{start:function(){var t;this.core.editor().focus(),"inline"===this.opts.type||!1!==(t=this.focus.first())&&this.caret.start(t)},end:function(){this.core.editor().focus();var t,e,i,n=this.opts.inline?this.core.editor():this.focus.last();0!==n.length&&(t=this.focus.lastChild(n),this.detect.isWebkit()||!1===t?(e=this.selection.get(),null!==(i=this.selection.range(e))?(i.selectNodeContents(n[0]),i.collapse(!1),this.selection.update(e,i)):this.caret.end(n)):this.caret.end(t))},first:function(){var t=this.core.editor().children().first();return(0!==t.length||0!==t[0].length&&"BR"!==t[0].tagName&&"HR"!==t[0].tagName&&3!==t[0].nodeType)&&("UL"===t[0].tagName||"OL"===t[0].tagName?t.find("li").first():t)},last:function(){return this.core.editor().children().last()},lastChild:function(t){var e=t[0].lastChild;return!(null===e||!this.utils.isInlineTag(e.tagName))&&e},is:function(){return this.core.editor()[0]===document.activeElement}}},image:function(){return{is:function(){return!(!this.opts.imageUpload||!this.opts.imageUpload&&!this.opts.s3)},show:function(){this.modal.load("image",this.lang.get("image"),700),this.upload.init("#redactor-modal-image-droparea",this.opts.imageUpload,this.image.insert),this.modal.show()},insert:function(t,e,i){if(void 0!==t.error)return this.modal.close(),this.events.dropImage=!1,void this.core.callback("imageUploadError",t,i);if(!1!==this.events.dropImage)return n=m(this.events.dropImage),this.core.callback("imageDelete",n[0].src,n),n.attr("src",t.url),this.events.dropImage=!1,void this.core.callback("imageUpload",n,t);var n,r=m("<"+this.opts.imageTag+">");(n=m("<img>")).attr("src",t.url);var s=void 0===t.id?"":t.id,o=void 0===t.s3?"image":"s3";n.attr("data-"+o,s),r.append(n);var a,l,c=this.utils.isTag(this.selection.current(),"pre");e?(this.marker.remove(),a=this.insert.nodeToPoint(i,this.marker.get()),l=m(a).next(),this.selection.restore(),this.buffer.set(),void 0!==l&&0!==l.length&&"IMG"===l[0].tagName?(this.core.callback("imageDelete",l[0].src,l),l.closest("figure, p",this.core.editor()[0]).replaceWith(r)):c?m(c).after(r):this.insert.node(r)):(this.modal.close(),this.buffer.set(),c?m(c).after(r):this.insert.node(r)),this.caret.after(r),this.events.dropImage=!1;var h=n[0].nextSibling,d=r.next(),u=m(h).text().replace(/\u200B/g,""),p=d.text().replace(/\u200B/g,"");""===u&&m(h).remove(),1===d.length&&"FIGURE"===d[0].tagName&&""===p&&d.remove(),null!==e?this.core.callback("imageUpload",n,t):this.core.callback("imageInserted",n,t)},setEditable:function(e){var t;e.on("dragstart",function(t){t.preventDefault()}),this.opts.imageResizable?(t=m.proxy(function(t){this.observe.image=e,this.image.resizer=this.image.loadEditableControls(e),m(document).on("mousedown.redactor-image-resize-hide."+this.uuid,m.proxy(this.image.hideResize,this)),this.image.resizer&&this.image.resizer.on("mousedown.redactor touchstart.redactor",m.proxy(function(t){this.image.setResizable(t,e)},this))},this),e.off("mousedown.redactor").on("mousedown.redactor",m.proxy(this.image.hideResize,this)),e.off("click.redactor touchstart.redactor").on("click.redactor touchstart.redactor",t)):e.off("click.redactor touchstart.redactor").on("click.redactor touchstart.redactor",m.proxy(function(t){setTimeout(m.proxy(function(){this.image.showEdit(e)},this),200)},this))},setResizable:function(t,e){t.preventDefault(),this.image.resizeHandle={x:t.pageX,y:t.pageY,el:e,ratio:e.width()/e.height(),h:e.height()},(t=t.originalEvent||t).targetTouches&&(this.image.resizeHandle.x=t.targetTouches[0].pageX,this.image.resizeHandle.y=t.targetTouches[0].pageY),this.image.startResize()},startResize:function(){m(document).on("mousemove.redactor-image-resize touchmove.redactor-image-resize",m.proxy(this.image.moveResize,this)),m(document).on("mouseup.redactor-image-resize touchend.redactor-image-resize",m.proxy(this.image.stopResize,this))},moveResize:function(t){t.preventDefault(),t=t.originalEvent||t;var e=this.image.resizeHandle.h;t.targetTouches?e+=t.targetTouches[0].pageY-this.image.resizeHandle.y:e+=t.pageY-this.image.resizeHandle.y;var i=Math.round(e*this.image.resizeHandle.ratio);e<50||i<100||this.core.editor().width()<=i||(this.image.resizeHandle.el.attr({width:i,height:e}),this.image.resizeHandle.el.width(i),this.image.resizeHandle.el.height(e),this.code.sync())},stopResize:function(){this.handle=!1,m(document).off(".redactor-image-resize"),this.image.hideResize()},hideResize:function(t){var e;t&&0!==m(t.target).closest("#redactor-image-box",this.$editor[0]).length||(t&&"IMG"==t.target.tagName&&m(t.target),0!==(e=this.$editor.find("#redactor-image-box")).length&&(m("#redactor-image-editter").remove(),m("#redactor-image-resizer").remove(),e.find("img").css({marginTop:e[0].style.marginTop,marginBottom:e[0].style.marginBottom,marginLeft:e[0].style.marginLeft,marginRight:e[0].style.marginRight}),e.css("margin",""),e.find("img").css("opacity",""),e.replaceWith(function(){return m(this).contents()}),m(document).off("mousedown.redactor-image-resize-hide."+this.uuid),void 0!==this.image.resizeHandle&&this.image.resizeHandle.el.attr("rel",this.image.resizeHandle.el.attr("style"))))},loadResizableControls:function(t,e){if(!this.opts.imageResizable||this.detect.isMobile())return e.append(t),!1;var i=m('<span id="redactor-image-resizer" data-redactor="verified"></span>');return this.detect.isDesktop()||i.css({width:"15px",height:"15px"}),i.attr("contenteditable",!1),e.append(i),e.append(t),i},loadEditableControls:function(t){if(0===m("#redactor-image-box").length){var e,i=m('<span id="redactor-image-box" data-redactor="verified">');return i.css("float",t.css("float")).attr("contenteditable",!1),"auto"!=t[0].style.margin?(i.css({marginTop:t[0].style.marginTop,marginBottom:t[0].style.marginBottom,marginLeft:t[0].style.marginLeft,marginRight:t[0].style.marginRight}),t.css("margin","")):i.css({display:"block",margin:"auto"}),t.css("opacity",".5").after(i),this.opts.imageEditable&&(this.image.editter=m('<span id="redactor-image-editter" data-redactor="verified">'+this.lang.get("edit")+"</span>"),this.image.editter.attr("contenteditable",!1),this.image.editter.on("click",m.proxy(function(){this.image.showEdit(t)},this)),i.append(this.image.editter),e=this.image.editter.innerWidth(),this.image.editter.css("margin-left","-"+e/2+"px")),this.image.loadResizableControls(t,i)}},showEdit:function(t){var e,i,n,r,s;this.events.imageEditing||(e=(this.observe.image=t).closest("a",this.$editor[0]),n=0!==(i=t.closest("figure",this.$editor[0])).length?i:t,this.modal.load("image-edit",this.lang.get("edit"),705),this.image.buttonDelete=this.modal.getDeleteButton().text(this.lang.get("delete")),this.image.buttonSave=this.modal.getActionButton().text(this.lang.get("save")),this.image.buttonDelete.on("click",m.proxy(this.image.remove,this)),this.image.buttonSave.on("click",m.proxy(this.image.update,this)),!1===this.opts.imageCaption?m("#redactor-image-caption").val("").hide().prev().hide():0!==(r=t.closest(this.opts.imageTag,this.$editor[0]).find("figcaption"))&&m("#redactor-image-caption").val(r.text()).show(),this.opts.imagePosition?(s=(0!==i.length?"center"===n.css("text-align"):"block"==n.css("display")&&"none"==n.css("float"))?"center":n.css("float"),m("#redactor-image-align").val(s)):m(".redactor-image-position-option").hide(),m("#redactor-image-preview").html(m('<img src="'+t.attr("src")+'" style="max-width: 100%;">')),m("#redactor-image-title").val(t.attr("alt")),0!==e.length&&(m("#redactor-image-link").val(e.attr("href")),"_blank"===e.attr("target")&&m("#redactor-image-link-blank").prop("checked",!0)),m(".redactor-link-tooltip").remove(),this.modal.show(),this.detect.isDesktop()&&m("#redactor-image-title").focus())},update:function(){var t=this.observe.image,e=t.closest("a",this.core.editor()[0]),i=m("#redactor-image-title").val().replace(/(<([^>]+)>)/gi,"");t.attr("alt",i).attr("title",i),this.image.setFloating(t);var n,r,s,o,a,l=m.trim(m("#redactor-image-link").val()).replace(/(<([^>]+)>)/gi,"");""!==l?(n="((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}",r=new RegExp("^(http|ftp|https)://"+n,"i"),s=new RegExp("^"+n,"i"),-1===l.search(r)&&0===l.search(s)&&this.opts.linkProtocol&&(l=this.opts.linkProtocol+"://"+l),o=!!m("#redactor-image-link-blank").prop("checked"),0===e.length?(a=m('<a href="'+l+'" id="redactor-img-tmp">'+this.utils.getOuterHtml(t)+"</a>"),o&&a.attr("target","_blank"),t=t.replaceWith(a),(e=this.core.editor().find("#redactor-img-tmp")).removeAttr("id")):(e.attr("href",l),o?e.attr("target","_blank"):e.removeAttr("target"))):0!==e.length&&e.replaceWith(this.utils.getOuterHtml(t)),this.image.addCaption(t,e),this.modal.close(),this.buffer.set()},setFloating:function(t){var e=t.closest("figure",this.$editor[0]),i=0!==e.length?e:t,n="",r="",s="",o="";switch(m("#redactor-image-align").val()){case"left":n="left",s="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0";break;case"right":n="right",s="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin;break;case"center":0!==e.length?o="center":(r="block",s="auto")}i.css({float:n,display:r,margin:s,"text-align":o}),i.attr("rel",t.attr("style"))},addCaption:function(t,e){var i=m("#redactor-image-caption").val(),n=0!==e.length?e:t,r=n.next();0!==r.length&&"FIGCAPTION"===r[0].tagName||(r=!1),""!==i?!1===r?(r=m("<figcaption />").text(i),n.after(r)):r.text(i):!1!==r&&r.remove()},remove:function(t,e,i){e=void 0===e?m(this.observe.image):e,"boolean"!=typeof t&&this.buffer.set(),this.events.stopDetectChanges();var n,r,s=e.closest("a",this.core.editor()[0]),o=e.closest(this.opts.imageTag,this.core.editor()[0]);e.parent();if(!1===this.core.callback("imageDelete",t,e[0]))return t&&t.preventDefault(),!1;0!==m("#redactor-image-box").length&&m("#redactor-image-box").parent(),0!==o.length?(r=o.prev(),n=o.next(),o.remove()):0!==s.length?(s.parent(),s.remove()):e.remove(),m("#redactor-image-box").remove(),!1!==t&&(n&&0!==n.length?this.caret.start(n):r&&0!==r.length&&this.caret.end(r)),"boolean"!=typeof t&&this.modal.close(),this.utils.restoreScroll(),this.observe.image=!1,this.events.startDetectChanges(),this.code.sync()}}},indent:function(){return{increase:function(){var t,e,i,n,r,s;this.list.get()&&(e=(t=m(this.selection.current()).closest("li")).closest("ul, ol",this.core.editor()[0]),0!==(i=t.closest("li").prev()).length&&"LI"===i[0].tagName&&(this.buffer.set(),this.utils.isCollapsed()?(r=e[0].tagName,s=m("<"+r+" />"),this.selection.save(),1===(n=i.find("ol").first()).length?n.append(t):(r=e[0].tagName,(s=m("<"+r+" />")).append(t),i.append(s))):(document.execCommand("indent"),this.selection.save(),this.indent.removeEmpty(),this.indent.normalize()),this.selection.restore()))},decrease:function(){if(this.list.get()){m(this.selection.current()).closest("li").closest("ul, ol",this.core.editor()[0]);this.buffer.set(),document.execCommand("outdent");var t=m(this.selection.current()).closest("li",this.core.editor()[0]);this.utils.isCollapsed()&&this.indent.repositionItem(t);var e=null;if(0===t.length){var i=this.selection.block();if(i&&-1!==i.nodeName.indexOf("-")){for(this.selection.save(),e=elCreate("div");i.childNodes.length;)e.appendChild(i.childNodes[0]);i.appendChild(e),this.selection.restore()}document.execCommand("formatblock",!1,"p");var n=(t=m(this.selection.current())).next();0!==n.length&&"BR"===n[0].tagName&&n.remove()}if(this.selection.save(),null!==e){for(var r=e.parentNode;e.childNodes.length;)r.insertBefore(e.childNodes[0],e);r.removeChild(e)}this.indent.removeEmpty(),this.indent.normalize(),this.selection.restore()}},repositionItem:function(t){var e=t.next();0===e.length||"UL"===e[0].tagName&&"OL"===e[0].tagName||t.append(e);var i=t.prev();0!==i.length&&"LI"!==i[0].tagName&&(this.selection.save(),t.parents("li",this.core.editor()[0]).after(t),this.selection.restore())},normalize:function(){this.core.editor().find("li").each(m.proxy(function(t,e){var i=m(e),n="";0!==this.opts.keepStyleAttr.length&&(n=","+this.opts.keepStyleAttr.join(",")),i.find(this.opts.inlineTags.join(",")).not("img"+n).removeAttr("style");var r,s=i.parent();0===s.length||"LI"!==s[0].tagName?0===(r=i.next()).length||"UL"!==r[0].tagName&&"OL"!==r[0].tagName||i.append(r):s.after(i)},this))},removeEmpty:function(t){var e=this.core.editor().find("ul, ol"),i=this.core.editor().find("li");i.each(m.proxy(function(t,e){this.indent.removeItemEmpty(e)},this)),e.each(m.proxy(function(t,e){this.indent.removeItemEmpty(e)},this)),i.each(m.proxy(function(t,e){this.indent.removeItemEmpty(e)},this))},removeItemEmpty:function(t){""===t.innerHTML.replace(/[\t\s\n]/g,"").replace(/<span><\/span>/g,"")&&m(t).remove()}}},inline:function(){return{format:function(t,e,i,n){var r;this.utils.isCurrentOrParent(["PRE","CODE"])||(r=this.inline.getParams(e,i,n),t=this.inline.arrangeTag(t),this.buffer.set(),this.utils.isCollapsed()?this.inline.formatCollapsed(t,r):this.inline.formatUncollapsed(t,r))},formatCollapsed:function(t,e){var i,n,r,s=this.selection.inline();s?(n=s.tagName.toLowerCase())===t?this.utils.isEmpty(s.innerHTML)?(this.caret.after(s),m(s).remove()):(r=this.inline.insertBreakpoint(s,n),this.caret.after(r)):0===m(s).closest(t).length?(i=this.inline.insertInline(t),i=this.inline.setParams(i,e)):(r=this.inline.insertBreakpoint(s,n),this.caret.after(r)):(i=this.inline.insertInline(t),i=this.inline.setParams(i,e))},formatUncollapsed:function(r,s){var t;this.selection.save();var e=window.getSelection().getRangeAt(0);if(null===e.cloneContents().querySelector(r)){(t=e.startContainer).nodeType===Node.TEXT_NODE&&(t=t.parentElement);var i=t.closest(r);if(null!==i&&this.core.editor()[0].contains(i)){var n=document.createElement(r);i.insertAdjacentElement("beforebegin",n);var o=document.createRange();o.selectNodeContents(i),o.setEnd(e.startContainer,e.startOffset),n.appendChild(o.extractContents());var a=document.createElement(r);i.insertAdjacentElement("afterend",a);var l=document.createRange();l.selectNodeContents(i),l.setStart(e.endContainer,e.endOffset),a.appendChild(l.extractContents());for(var c=i.parentElement;i.childNodes.length;)c.insertBefore(i.childNodes[0],i);return void i.remove()}}var h=this.inline.getClearedNodes();this.inline.setNodesStriked(h,r,s),this.selection.restore(),document.execCommand("strikethrough"),this.selection.saveInstant();for(var d,u=this.core.editor()[0].querySelectorAll('[style*="line-through"]'),p=0,f=u.length;p<f;p++)t=u[0],d=document.createElement("strike"),t.parentNode.insertBefore(d,t),d.appendChild(t),t.style.removeProperty("text-decoration");var g=this;this.core.editor().find("strike").each(function(){var t=g.utils.replaceToTag(this,r);g.inline.setParams(t[0],s);var e=t.find(r),i=t.parent(),n=i.parent();if(0!==n.length&&n[0].tagName.toLowerCase()===r&&n.html()==i[0].outerHTML)return t.replaceWith(function(){return m(this).contents()}),void n.replaceWith(function(){return m(this).contents()});0!==e.length&&g.inline.cleanInsideOrParent(e,s),i.html()==t[0].outerHTML&&g.inline.cleanInsideOrParent(i,s),g.detect.isFirefox()&&g.core.editor().find(r+":empty").remove()}),this.selection.restoreInstant()},cleanInsideOrParent:function(t,e){if(e)for(var i in e.data)this.inline.removeSpecificAttr(t,i,e.data[i])},getClearedNodes:function(){for(var t=this.selection.nodes(),e=[],i=t.length,n=0,r=0;r<i;r++)if(m(t[r]).hasClass("redactor-selection-marker")){n=r+2;break}for(r=0;r<i;r++)n<=r&&!this.utils.isBlockTag(t[r].tagName)&&e.push(t[r]);return e},isConvertableAttr:function(t,e,i){var n=m(t).attr(e);if(n)if("style"===e){for(var r=(i=m.trim(i).replace(/;$/,"")).split(";"),s=0,o=0;o<r.length;o++){var a,l=r[o].split(":"),c=m.trim(l[0]),h=m.trim(l[1]);-1!==c.search(/color/)?!(a=m(t).css(c))||a!==h&&this.utils.rgb2hex(a)!==h||s++:m(t).css(c)===h&&s++}if(s===r.length)return 1}else if(n===i)return 1;return 0},isConvertable:function(t,e,i,n){if(e===i){if(!n)return!0;var r=0;for(var s in n.data)r+=this.inline.isConvertableAttr(t,s,n.data[s]);if(r===Object.keys(n.data).length)return!0}return!1},setNodesStriked:function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n].tagName?t[n].tagName.toLowerCase():void 0,s=t[n].parentNode,o=s&&s.tagName?s.tagName.toLowerCase():void 0;this.inline.isConvertable(s,o,e,i)&&m(s).replaceWith(function(){return m("<strike>").append(m(this).contents())}).attr("data-redactor-inline-converted"),this.inline.isConvertable(t[n],r,e,i)&&m(t[n]).replaceWith(function(){return m("<strike>").append(m(this).contents())})}},insertBreakpoint:function(t,e){var i=document.createElement("span");i.id="redactor-inline-breakpoint",i=this.insert.node(i);var n=this.utils.isEndOfElement(t)?"":"<"+e+">",r=(r=this.utils.getOuterHtml(t)).replace(/<span id="redactor-inline-breakpoint"><\/span>/i,"</"+e+">"+n),s=m(r);return m(t).replaceWith(s),n&&this.utils.cloneAttributes(t,s.last()),s.first()},insertInline:function(t){var e=document.createElement(t);return this.insert.node(e),this.caret.start(e),e},arrangeTag:function(t){var e=["b","bold","i","italic","underline","strikethrough","deleted","superscript","subscript"],i=["strong","strong","em","em","u","del","del","sup","sub"];t=t.toLowerCase();for(var n=0;n<e.length;n++)t===e[n]&&(t=i[n]);return t},getStyleParams:function(t){for(var e={},i=t.trim().replace(/;$/,"").split(";"),n=0;n<i.length;n++){var r=i[n].split(":");r&&(e[r[0].trim()]=r[1].trim())}return e},getParams:function(t,e,i){var n=!1,r="toggle";return"object"==typeof t?(n=t,r=void 0!==e?e:r):void 0!==t&&void 0!==e&&((n={})[t]=e,r=void 0!==i?i:r),!!n&&{func:r,data:n}},setParams:function(t,e){if(e)for(var i in e.data){var n=m(t);"style"===i?(t=this.inline[e.func+"Style"](e.data[i],t),n.attr("data-redactor-style-cache",n.attr("style"))):t="class"===i?this.inline[e.func+"Class"](e.data[i],t):"remove"===e.func?this.inline[e.func+"Attr"](i,t):this.inline[e.func+"Attr"](i,e.data[i],t),"style"===i&&"SPAN"===t.tagName&&n.attr("data-redactor-span",!0)}return t},eachInline:function(t,e){var i,n=void 0===t?this.selection.inlines():[t];if(n)for(var r=0;r<n.length;r++)i=e(n[r])[0];return i},replaceClass:function(e,t){return this.inline.eachInline(t,function(t){return m(t).removeAttr("class").addClass(e)})},toggleClass:function(e,t){return this.inline.eachInline(t,function(t){return m(t).toggleClass(e)})},addClass:function(e,t){return this.inline.eachInline(t,function(t){return m(t).addClass(e)})},removeClass:function(e,t){return this.inline.eachInline(t,function(t){return m(t).removeClass(e)})},removeAllClass:function(t){return this.inline.eachInline(t,function(t){return m(t).removeAttr("class")})},replaceAttr:function(e,t,i){return this.inline.eachInline(i,function(t){return m(t).removeAttr(e).attr(e.value)})},toggleAttr:function(e,t,i){return this.inline.eachInline(i,function(t){return m(t).attr(e)?m(t).removeAttr(e):m(t).attr(e.value)})},addAttr:function(e,i,t){return this.inline.eachInline(t,function(t){return m(t).attr(e,i)})},removeAttr:function(i,t){return this.inline.eachInline(t,function(t){var e=m(t);return e.removeAttr(i),"style"===i&&e.removeAttr("data-redactor-style-cache"),e})},removeAllAttr:function(t){return this.inline.eachInline(t,function(t){for(var e=m(t),i=t.attributes.length,n=0;n<i;n++)e.removeAttr(t.attributes[n].name);return e})},removeSpecificAttr:function(t,e,i){var n,r=m(t);"style"===e?(n=i.split(":")[0].trim(),r.css(n,""),this.utils.removeEmptyAttr(t,"style")&&r.removeAttr("data-redactor-style-cache")):r.removeAttr(e)[0]},hasParentStyle:function(t){var e=t.parent();return 1===e.length&&e[0].tagName===t[0].tagName&&e.html()===t[0].outerHTML&&e},addParentStyle:function(t){var e,i=this.inline.hasParentStyle(t);return i?(e=this.inline.getStyleParams(t.attr("style")),i.css(e),i.attr("data-redactor-style-cache",i.attr("style")),t.replaceWith(function(){return m(this).contents()})):t.attr("data-redactor-style-cache",t.attr("style")),t},replaceStyle:function(n,t){n=this.inline.getStyleParams(n);var r=this;return this.inline.eachInline(t,function(t){var e=m(t);e.removeAttr("style").css(n);var i=e.attr("style");return i&&e.attr("style",i.replace(/"/g,"'")),e=r.inline.addParentStyle(e)})},toggleStyle:function(o,t){o=this.inline.getStyleParams(o);var a=this;return this.inline.eachInline(t,function(t){var e=m(t);for(var i in o){var n=o[i],r=e.css(i);(r=a.utils.isRgb(r)?a.utils.rgb2hex(r):r.replace(/"/g,""))===(n=a.utils.isRgb(n)?a.utils.rgb2hex(n):n.replace(/"/g,""))?e.css(i,""):e.css(i,n)}var s=e.attr("style");return s&&e.attr("style",s.replace(/"/g,"'")),a.utils.removeEmptyAttr(t,"style")?e.removeAttr("data-redactor-style-cache"):e=a.inline.addParentStyle(e),e})},addStyle:function(n,t){n=this.inline.getStyleParams(n);var r=this;return this.inline.eachInline(t,function(t){var e=m(t);e.css(n);var i=e.attr("style");return i&&e.attr("style",i.replace(/"/g,"'")),e=r.inline.addParentStyle(e)})},removeStyle:function(n,t){n=this.inline.getStyleParams(n);var r=this;return this.inline.eachInline(t,function(t){var e=m(t);for(var i in n)e.css(i,"");return r.utils.removeEmptyAttr(t,"style")?e.removeAttr("data-redactor-style-cache"):e.attr("data-redactor-style-cache",e.attr("style")),e})},removeAllStyle:function(t){return this.inline.eachInline(t,function(t){return m(t).removeAttr("style").removeAttr("data-redactor-style-cache")})},removeStyleRule:function(t){var e=this.selection.parent(),i=this.selection.inlines();this.buffer.set(),e&&"SPAN"===e.tagName&&this.inline.removeStyleRuleAttr(m(e),t);for(var n=0;n<i.length;n++){var r=i[n],s=m(r);-1==m.inArray(r.tagName.toLowerCase(),this.opts.inlineTags)||s.hasClass("redactor-selection-marker")||this.inline.removeStyleRuleAttr(s,t)}},removeStyleRuleAttr:function(t,e){t.css(e,""),this.utils.removeEmptyAttr(t,"style")?t.removeAttr("data-redactor-style-cache"):t.attr("data-redactor-style-cache",t.attr("style"))},update:function(t,e,i,n){t=this.inline.arrangeTag(t);var r=this.inline.getParams(e,i,n),s=this.selection.inlines(),o=[];if(s)for(var a=0;a<s.length;a++){var l=s[a];"*"!==t&&l.tagName.toLowerCase()!==t||o.push(this.inline.setParams(l,r))}return o},removeFormat:function(){this.selection.save();for(var t=this.inline.getClearedNodes(),e=0;e<t.length;e++)1===t[e].nodeType&&m(t[e]).replaceWith(function(){return m(this).contents()});this.selection.restore()}}},insert:function(){return{set:function(t){this.code.set(t),this.focus.end()},html:function(t,e){this.core.editor().focus();var i=this.selection.block(),n=this.selection.inline();void 0===e&&(e=this.clean.getCurrentType(t,!0),t=this.clean.onPaste(t,e,!0)),t=m.parseHTML(t);var r,s,o,a=m(t).last(),l=this.selection.get(),c=this.selection.range(l);if(c.deleteContents(),this.selection.update(l,c),e.lists){var h=m(t);if(0!==h.length&&("UL"===h[0].tagName||"OL"===h[0].tagName))return void this.insert.appendLists(i,h)}e.blocks&&i?this.utils.isSelectAll()?(this.core.editor().html(t),this.focus.end()):!1===(r=this.utils.breakBlockTag())?this.insert.placeHtml(t):(m(t).children().last().append(this.marker.get()),"start"===r.type?r.$block.before(t):r.$block.after(t),this.selection.restore(),this.core.editor().find("p").each(function(){""===m.trim(this.innerHTML)&&m(this).remove()})):(n&&((s=m("<div/>").html(t)).find(n.tagName.toLowerCase()).each(function(){m(this).contents().unwrap()}),t=s.html(),t=m.parseHTML(t),a=m(t).last()),this.utils.isSelectAll()?(o=m(this.opts.emptyHtml),this.core.editor().html("").append(o),o.html(t),this.caret.end(o)):this.insert.placeHtml(t)),this.utils.disableSelectAll(),e.pre&&this.clean.cleanPre(),this.caret.end(a)},text:function(t){t=t.toString(),t=m.trim(t);var e,i,n,r,s,o=document.createElement("div");o.innerHTML=t,void 0!==(t=o.textContent||o.innerText)&&(this.core.editor().focus(),e=this.selection.blocks(),t=t.replace(/\n/g," "),this.utils.isSelectAll()?(i=m(this.opts.emptyHtml),this.core.editor().html("").append(i),i.html(t),this.caret.end(i)):(n=this.selection.get(),r=document.createTextNode(t),n.getRangeAt&&n.rangeCount&&((s=n.getRangeAt(0)).deleteContents(),s.insertNode(r),s.setStartAfter(r),s.collapse(!0),this.selection.update(n,s)),1<e.length&&(m(r).wrap("<p>"),this.caret.after(r))),this.utils.disableSelectAll(),this.clean.normalizeCurrentHeading())},raw:function(t){this.core.editor().focus();var e=this.selection.get(),i=this.selection.range(e);i.deleteContents();var n=document.createElement("div");n.innerHTML=t;for(var r,s,o=document.createDocumentFragment();r=n.firstChild;)s=o.appendChild(r);i.insertNode(o),s&&((i=i.cloneRange()).setStartAfter(s),i.collapse(!0),e.removeAllRanges(),e.addRange(i))},node:function(t,e){void 0!==this.start&&this.core.editor().focus(),t=t[0]||t;var i,n=this.selection.block(),r=this.utils.isBlockTag(t.tagName),s=!0;return this.utils.isSelectAll()?(r?this.core.editor().html(t):this.core.editor().html(m("<p>").html(t)),this.code.sync()):r&&n?!1===(i=this.utils.breakBlockTag())?this.insert.placeNode(t,e):("start"===i.type?i.$block.before(t):i.$block.after(t),this.core.editor().find("p:empty").remove()):s=this.insert.placeNode(t,e),this.utils.disableSelectAll(),s&&this.caret.end(t),t},appendLists:function(t,e){var i,n,r=m(t),s=this.utils.isEmpty(t.innerHTML);s||this.utils.isEndOfElement(t)?(i=r,e.find("li").each(function(){i.after(this),i=m(this)}),s&&r.remove()):this.utils.isStartOfElement(t)?e.find("li").each(function(){r.before(this),i=m(this)}):(n=this.selection.extractEndOfNode(t),r.after(m("<li>").append(n)),r.append(e),i=e),this.marker.remove(),i&&this.caret.end(i)},placeHtml:function(t){var e=document.createElement("span");e.id="redactor-insert-marker",e=this.insert.node(e),m(e).before(t),this.selection.restore(),this.caret.after(e),m(e).remove()},placeNode:function(t,e){var i=this.selection.get(),n=this.selection.range(i);if(null==n)return!1;!1!==e&&n.deleteContents(),n.insertNode(t),n.collapse(!1),this.selection.update(i,n)},nodeToPoint:function(t,e){if(e=e[0]||e,this.utils.isEmpty())return e=this.utils.isBlock(e)?e:m("<p />").append(e),this.core.editor().html(e),e;var i,n,r,s=t.clientX,o=t.clientY;return document.caretPositionFromPoint?(i=document.caretPositionFromPoint(s,o),(n=document.getSelection().getRangeAt(0)).setStart(i.offsetNode,i.offset),n.collapse(!0),n.insertNode(e)):document.caretRangeFromPoint?(n=document.caretRangeFromPoint(s,o)).insertNode(e):void 0!==document.body.createTextRange&&((n=document.body.createTextRange()).moveToPoint(s,o),(r=n.duplicate()).moveToPoint(s,o),n.setEndPoint("EndToEnd",r),n.select()),e},nodeToCaretPositionFromPoint:function(t,e){this.insert.nodeToPoint(t,e)},marker:function(){this.marker.insert()}}},keydown:function(){return{init:function(t){if(!this.rtePaste){var e=t.which,i=37<=e&&e<=40;if(this.keydown.ctrl=t.ctrlKey||t.metaKey,this.keydown.parent=this.selection.parent(),this.keydown.current=this.selection.current(),this.keydown.block=this.selection.block(),this.keydown.pre=this.utils.isTag(this.keydown.current,"pre"),this.keydown.blockquote=this.utils.isTag(this.keydown.current,"blockquote"),this.keydown.figcaption=this.utils.isTag(this.keydown.current,"figcaption"),this.keydown.figure=this.utils.isTag(this.keydown.current,"figure"),!1===this.core.callback("keydown",t))return t.preventDefault(),!1;if(this.shortcuts.init(t,e),this.keydown.checkEvents(i,e),this.keydown.setupBuffer(t,e),this.utils.isSelectAll()&&(e===this.keyCode.ENTER||e===this.keyCode.BACKSPACE||e===this.keyCode.DELETE))return t.preventDefault(),this.code.set(this.opts.emptyHtml),void this.events.changeHandler();if(this.keydown.addArrowsEvent(i),this.keydown.setupSelectAll(t,e),this.opts.enterKey||e!==this.keyCode.ENTER){if(this.opts.enterKey&&e===this.keyCode.DOWN&&this.keydown.onArrowDown(),this.opts.enterKey&&e===this.keyCode.UP&&this.keydown.onArrowUp(),("textarea"===this.opts.type||"div"===this.opts.type)&&this.keydown.current&&3===this.keydown.current.nodeType&&m(this.keydown.parent).hasClass("redactor-in")&&this.keydown.wrapToParagraph(),!this.keyup.lastShiftKey&&e===this.keyCode.SPACE&&(t.ctrlKey||t.shiftKey))return t.preventDefault(),this.keydown.onShiftSpace();if(e===this.keyCode.ENTER&&(t.ctrlKey||t.shiftKey)&&(null===h||"ios"!==h.platform()))return t.preventDefault(),this.keydown.onShiftEnter(t);if(e===this.keyCode.ENTER&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey)return this.keydown.onEnter(t);if(e===this.keyCode.TAB||t.metaKey&&221===e||t.metaKey&&219===e)return this.keydown.onTab(t,e);if(this.detect.isFirefox()&&e===this.keyCode.BACKSPACE&&this.keydown.block&&"P"===this.keydown.block.tagName&&this.utils.isStartOfElement(this.keydown.block))if(0!==(n=m(this.keydown.block).prev()).length)return t.preventDefault(),n.append(this.marker.get()),n.append(m(this.keydown.block).html()),m(this.keydown.block).remove(),void this.selection.restore();if(e===this.keyCode.BACKSPACE||e===this.keyCode.DELETE){if(this.observe.image&&void 0!==this.observe.image&&0!==m("#redactor-image-box").length){t.preventDefault();var n=this.observe.image.closest("figure, p").prev();return this.image.remove(!1),this.observe.image=!1,void(n&&0!==n.length?this.caret.end(n):this.core.editor().focus())}this.keydown.onBackspaceAndDeleteBefore()}if(e===this.keyCode.DELETE){var r=m(this.keydown.block).next();if(this.utils.isEndOfElement(this.keydown.block)&&0!==r.length&&"FIGURE"===r[0].tagName)return r.remove(),!1;if(!(!this.keydown.block||"LI"!==this.keydown.block.tagName)&&this.keydown.block){var s=m(this.keydown.block).parents("ul, ol").last(),o=s.next();if(this.utils.isRedactorParent(s)&&this.utils.isEndOfElement(s)&&0!==o.length&&("UL"===o[0].tagName||"OL"===o[0].tagName))return t.preventDefault(),s.append(o.contents()),o.remove(),!1}if(this.utils.isEndOfElement(this.keydown.block)&&0!==r.length&&"PRE"===r[0].tagName)return m(this.keydown.block).append(r.text()),r.remove(),!1}if(e===this.keyCode.DELETE&&0!==m("#redactor-image-box").length&&this.image.remove(),e===this.keyCode.BACKSPACE){if(this.detect.isFirefox()&&this.line.removeOnBackspace(t),this.list.combineAfterAndBefore(this.keydown.block))return void t.preventDefault();var a=this.selection.block();if(a&&"LI"===a.tagName&&this.utils.isCollapsed()&&this.utils.isStartOfElement())return this.indent.decrease(),void t.preventDefault();this.keydown.removeInvisibleSpace(),this.keydown.removeEmptyListInTable(t)}e!==this.keyCode.BACKSPACE&&e!==this.keyCode.DELETE||this.keydown.onBackspaceAndDeleteAfter(t)}else{t.preventDefault();var l=this.selection.get(),c=this.selection.range(l);c.collapsed||c.deleteContents()}}},onShiftSpace:function(){return this.buffer.set(),this.insert.raw(" "),!1},onShiftEnter:function(t){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(t):this.insert.raw("<br>")},onBackspaceAndDeleteBefore:function(){this.utils.saveScroll()},onBackspaceAndDeleteAfter:function(e){setTimeout(m.proxy(function(){this.code.syncFire=!1,this.keydown.removeEmptyLists();var t="";0!==this.opts.keepStyleAttr.length&&(t=","+this.opts.keepStyleAttr.join(",")),this.core.editor().find("*[style]").not("img, figure, iframe, #redactor-image-box, #redactor-image-editter, [data-redactor-style-cache], [data-redactor-span]"+t).removeAttr("style"),this.keydown.formatEmpty(e),this.code.syncFire=!0},this),1)},onEnter:function(t){if(!1===this.core.callback("enter",t))return t.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(t))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(t);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(t);if(this.keydown.figure)setTimeout(m.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){if(setTimeout(m.proxy(function(){this.keydown.replaceToParagraph("DIV")},this),1),"LI"===this.keydown.block.tagName){var e=this.selection.current(),i=m(e).closest("li",this.$editor[0]),n=i.parents("ul,ol",this.$editor[0]).last();if(0!==i.length&&this.utils.isEmpty(i.html())&&0===n.next().length&&this.utils.isEmpty(n.find("li").last().html())){n.find("li").last().remove();var r=m(this.opts.emptyHtml);return n.after(r),this.caret.start(r),!1}}}else if(!this.keydown.block)return this.keydown.insertParagraph(t);this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?this.keydown.insertBreakLine(t):this.opts.keepInlineOnEnter||setTimeout(m.proxy(function(){var t,e,i,n,r=this.selection.inline();r&&this.utils.isEmpty(r.innerHTML)&&(t=this.selection.block(),m(r).remove(),(e=document.createRange()).setStart(t,0),i=document.createTextNode(""),e.insertNode(i),e.setStartAfter(i),e.collapse(!0),(n=window.getSelection()).removeAllRanges(),n.addRange(e))},this),1)},checkEvents:function(t,e){t||"click"!==this.core.getEvent()&&"arrow"!==this.core.getEvent()||(this.core.addEvent(!1),this.keydown.checkKeyEvents(e)&&this.buffer.set())},checkKeyEvents:function(t){var e=this.keyCode,i=[e.BACKSPACE,e.DELETE,e.ENTER,e.ESC,e.TAB,e.CTRL,e.META,e.ALT,e.SHIFT];return-1===m.inArray(t,i)},addArrowsEvent:function(t){t&&("click"!==this.core.getEvent()&&"arrow"!==this.core.getEvent()?this.core.addEvent("arrow"):this.core.addEvent(!1))},setupBuffer:function(t,e){return this.keydown.ctrl&&90===e&&!t.shiftKey&&!t.altKey&&this.sBuffer.length?(t.preventDefault(),void this.buffer.undo()):this.keydown.ctrl&&90===e&&t.shiftKey&&!t.altKey&&0!==this.sRebuffer.length?(t.preventDefault(),void this.buffer.redo()):void(this.keydown.ctrl||e!==this.keyCode.SPACE&&e!==this.keyCode.BACKSPACE&&e!==this.keyCode.DELETE&&(e!==this.keyCode.ENTER||t.ctrlKey||t.shiftKey)||this.buffer.set())},exitFromBlockquote:function(t){if(this.utils.isEndOfElement(this.keydown.blockquote)&&-1!==this.clean.removeSpacesHard(m(this.keydown.blockquote).html()).search(/(<br\s?\/?>){1}$/i)){t.preventDefault(),m(this.keydown.blockquote).children().last().filter("br").remove(),m(this.keydown.blockquote).children().last().filter("span").remove();var e=m(this.opts.emptyHtml);return m(this.keydown.blockquote).after(e),this.caret.start(e),!0}},onArrowDown:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],e=0;e<t.length;e++)if(t[e])return this.keydown.insertAfterLastElement(t[e]),!1},onArrowUp:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],e=0;e<t.length;e++)if(t[e])return this.keydown.insertBeforeFirstElement(t[e]),!1},insertAfterLastElement:function(t){var e,i;this.utils.isEndOfElement(t)&&(e=this.core.editor().contents().last(),0===("FIGCAPTION"===t.tagName?m(this.keydown.block).parent().next():m(this.keydown.block).next()).length&&(0!==e.length||e[0]===t?(i=m(this.opts.emptyHtml),"FIGCAPTION"===t.tagName?m(t).parent().after(i):m(t).after(i),this.caret.start(i)):this.caret.start(e)))},insertBeforeFirstElement:function(t){var e;this.utils.isStartOfElement()&&(1<this.core.editor().contents().length&&this.core.editor().contents().first()[0]!==t||(e=m(this.opts.emptyHtml),m(t).before(e),this.caret.start(e)))},onTab:function(t,e){if(!this.opts.tabKey)return!0;var i=this.keydown.block&&"LI"===this.keydown.block.tagName;if(this.utils.isEmpty(this.code.get())||!i&&!this.keydown.pre&&!1===this.opts.tabAsSpaces)return!0;t.preventDefault(),this.buffer.set();var n,r=i&&this.utils.isStartOfElement(this.keydown.block);return this.keydown.pre&&!t.shiftKey?(n=this.opts.preSpaces?document.createTextNode(Array(this.opts.preSpaces+1).join(" ")):document.createTextNode("\t"),this.insert.node(n)):!1===this.opts.tabAsSpaces||r?t.metaKey&&219===e||(!t.metaKey||221!==e)&&t.shiftKey?this.indent.decrease():this.indent.increase():(n=document.createTextNode(Array(this.opts.tabAsSpaces+1).join(" ")),this.insert.node(n)),!1},setupSelectAll:function(t,e){this.keydown.ctrl&&65===e?this.utils.enableSelectAll():e===this.keyCode.LEFT_WIN||this.keydown.ctrl||this.utils.disableSelectAll()},insertNewLine:function(t){t.preventDefault();var e=document.createTextNode("\n"),i=this.selection.get(),n=this.selection.range(i);return n.deleteContents(),n.insertNode(e),this.caret.after(e),!1},insertParagraph:function(t){t.preventDefault();var e=document.createElement("p");e.innerHTML="<br>";var i=this.selection.get(),n=this.selection.range(i);return n.deleteContents(),n.insertNode(e),this.caret.start(e),!1},insertBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t)},insertDblBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t,!0)},insertBreakLineProcessing:function(t,e){t.stopPropagation();var i,n=document.createElement("br");return this.insert.node(n),!0===e?(i=document.createElement("br"),this.insert.node(i),this.caret.after(i)):this.caret.after(n),!1},wrapToParagraph:function(){var t=m(this.keydown.current),e=m("<p>").append(t.clone());t.replaceWith(e);var i=m(e).next();void 0!==i[0]&&"BR"===i[0].tagName&&i.remove(),this.caret.end(e)},replaceToParagraph:function(t){var i=this.selection.block(),e=m(i).prev(),n=i.innerHTML.replace(/<br\s?\/?>/gi,"");if(i.tagName===t&&this.utils.isEmpty(n)&&!m(i).hasClass("redactor-in")){var r=document.createElement("p");return m(i).replaceWith(r),this.keydown.setCaretToParagraph(r),!1}if("P"===i.tagName)return m(i).removeAttr("class").removeAttr("style"),this.detect.isIe()&&this.utils.isEmpty(n)&&this.utils.isInline(this.keydown.parent)&&m(i).on("input",m.proxy(function(){var t,e=this.selection.parent();this.utils.isInline(e)&&(t=m(e).html(),m(i).html(t),this.caret.end(i)),m(i).off("keyup")},this)),!1;if(e.hasClass(this.opts.videoContainerClass)){e.removeAttr("class");r=document.createElement("p");return e.replaceWith(r),this.keydown.setCaretToParagraph(r),!1}},setCaretToParagraph:function(t){var e=document.createRange();e.setStart(t,0);var i=document.createTextNode("");e.insertNode(i),e.setStartAfter(i),e.collapse(!0);var n=window.getSelection();n.removeAllRanges(),n.addRange(e)},removeInvisibleSpace:function(){var t=m(this.keydown.current);0===t.text().search(/^\u200B$/g)&&t.remove()},removeEmptyListInTable:function(t){var e=m(this.keydown.current),i=m(this.keydown.parent),n=e.closest("td",this.$editor[0]);if(0!==n.length&&e.closest("li",this.$editor[0])&&1===i.children("li").length){if(!this.utils.isEmpty(e.text()))return;t.preventDefault(),e.remove(),i.remove(),this.caret.start(n)}},removeEmptyLists:function(){function t(){""===m.trim(this.innerHTML).replace(/\/t\/n/g,"")&&m(this).remove()}this.core.editor().find("li").each(t),this.core.editor().find("ul, ol").each(t)},formatEmpty:function(t){var e,i=m.trim(this.core.editor().html());if(this.utils.isEmpty(i))return t.preventDefault(),"inline"===this.opts.type||"pre"===this.opts.type?(this.core.editor().html(this.marker.html()),this.selection.restore()):(e=function(){this.core.editor().html(this.opts.emptyHtml),this.focus.start()}.bind(this),null!==h&&"ios"===h.platform()?setTimeout(e,50):e()),!1}}},keyup:function(){return{init:function(t){if(!this.rtePaste){var e,i=t.which;if(this.keyup.block=this.selection.block(),this.keyup.current=this.selection.current(),this.keyup.parent=this.selection.parent(),this.keyup.lastShiftKey=t.shiftKey,!1===this.core.callback("keyup",t))return t.preventDefault(),!1;if(i===this.keyCode.ENTER&&this.keyup.block&&"FIGURE"===this.keyup.block.tagName){var n=m(this.keyup.block).prev();if(0!==n.length&&"FIGURE"===n[0].tagName){var r=this.utils.replaceToTag(n,"p");return void this.caret.start(r)}}if(i===this.keyCode.BACKSPACE||i===this.keyCode.DELETE){if(this.utils.isSelectAll())return void this.focus.start();if(this.keyup.block&&this.keydown.block&&"FIGURE"===this.keyup.block.tagName&&this.utils.isStartOfElement(this.keydown.block)){t.preventDefault(),this.selection.save(),m(this.keyup.block).find("figcaption").remove(),m(this.keyup.block).find("img").first().remove(),this.utils.replaceToTag(this.keyup.block,"p");var s=this.marker.find();return m("html, body").animate({scrollTop:s.position().top+20},500),void this.selection.restore()}this.keyup.block&&"P"===this.keyup.block.tagName&&(e=m(this.keyup.block).find("img").length,""===m(this.keyup.block).text().replace(/\u200B/g,"")&&0!==e&&this.utils.replaceToTag(this.keyup.block,"figure")),this.keyup.block&&"FIGURE"===this.keyup.block.tagName&&0===m(this.keyup.block).find("img").length&&(this.selection.save(),this.utils.replaceToTag(this.keyup.block,"p"),this.selection.restore())}}}}},lang:function(){return{load:function(){this.opts.curLang=this.opts.langs[this.opts.lang]},get:function(t){return void 0!==this.opts.curLang[t]?this.opts.curLang[t]:""}}},line:function(){return{insert:function(){this.buffer.set(),this.insert.html(this.line.getLineHtml());var t=this.core.editor().find("#redactor-hr-tmp-id");return t.removeAttr("id"),this.core.callback("insertedLine",t),t},getLineHtml:function(){var t='<hr id="redactor-hr-tmp-id" />';return!this.detect.isFirefox()&&this.utils.isEmpty()&&(t+="<p>"+this.opts.emptyHtml+"</p>"),t},removeOnBackspace:function(t){var e,i;this.utils.isCollapsed()&&(0===(e=m(this.selection.block())).length||!this.utils.isStartOfElement(e)||(i=e.prev())&&0!==i.length&&"HR"===i[0].tagName&&(t.preventDefault(),i.remove()))}}},link:function(){return{get:function(){return m(this.selection.inlines("a"))},is:function(){var t=this.selection.nodes(),e=m(this.selection.current()).closest("a",this.core.editor()[0]);return!(0===e.length||1<t.length)&&e},unlink:function(t){void 0!==t&&t.preventDefault&&t.preventDefault(),this.buffer.set();var e,i=this.selection.inlines("a");0!==i.length&&(e=this.link.replaceLinksToText(i),this.observe.closeAllTooltip(),this.core.callback("deletedLink",e))},insert:function(t,e){var i,n=this.link.is();return(!0===e||!1!==(t=this.link.buildLinkFromObject(n,t)))&&(this.buffer.set(),t=this.core.callback("beforeInsertingLink",t),!1===n?(n=m("<a />"),n=this.link.update(n,t),i=(n=m(this.insert.node(n))).parent(),!1===this.utils.isRedactorParent(i)&&n.wrap("<p>"),i.hasClass("redactor-unlink")&&i.replaceWith(function(){return m(this).contents()}),this.caret.after(n),this.core.callback("insertedLink",n)):(n=this.link.update(n,t),this.caret.after(n)),n)},update:function(t,e){return t.text(e.text),t.attr("href",e.url),this.link.target(t,e.target),t},target:function(t,e){return e?t.attr("target","_blank"):t.removeAttr("target")},show:function(t){void 0!==t&&t.preventDefault&&t.preventDefault(),this.observe.closeAllTooltip();var e=this.link.is();this.link.buildModal(e);var i=this.link.buildLinkFromElement(e);i.url=this.link.removeSelfHostFromUrl(i.url),this.opts.linkNewTab&&!e&&(i.target=!0),this.link.setModalValues(i),this.modal.show(),this.detect.isDesktop()&&m("#redactor-link-url").focus()},setModalValues:function(t){m("#redactor-link-blank").prop("checked",t.target),m("#redactor-link-url").val(t.url),m("#redactor-link-url-text").val(t.text)},buildModal:function(t){this.modal.load("link",this.lang.get(!1===t?"link-insert":"link-edit"),600),this.modal.getActionButton().text(this.lang.get(!1===t?"insert":"save")).on("click",m.proxy(this.link.callback,this))},callback:function(){var t=this.link.buildLinkFromModal();if(!1===t)return!1;this.modal.close(),this.link.insert(t,!0)},cleanUrl:function(t){return void 0===t?"":m.trim(t.replace(/[^\W\w\D\d+&\'@#/%?=~_|!:,.;\(\)]/gi,""))},cleanText:function(t){return void 0===t?"":m.trim(t.replace(/(<([^>]+)>)/gi,""))},getText:function(t){return""===t.text&&""!==t.url?this.link.truncateUrl(t.url.replace(/<|>/g,"")):t.text},isUrl:function(t){return!!new RegExp("^((https?|ftp):\\/\\/)?(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t)&&t},isMailto:function(t){return-1!==t.search("@")&&!1===/(http|ftp|https):\/\//i.test(t)},isEmpty:function(t){return""===t.url||""===t.text&&""===t.url},truncateUrl:function(t){return t.length>this.opts.linkSize?t.substring(0,this.opts.linkSize)+"...":t},parse:function(t){return this.link.isMailto(t.url)?t.url="mailto:"+t.url.replace("mailto:",""):0!==t.url.search("#")&&this.opts.linkValidation&&(t.url=this.link.isUrl(t.url)?"http://"+t.url.replace(/(ftp|https?):\/\//gi,""):t.url),!this.link.isEmpty(t)&&!1!==t.url&&t},buildLinkFromModal:function(){var t={};return t.url=this.link.cleanUrl(m("#redactor-link-url").val()),t.text=this.link.cleanText(m("#redactor-link-url-text").val()),t.text=this.link.getText(t),t.target=!!m("#redactor-link-blank").prop("checked"),this.link.parse(t)},buildLinkFromObject:function(t,e){return e.url=this.link.cleanUrl(e.url),e.text=void 0===e.text&&this.selection.is()?this.selection.text():this.link.cleanText(e.text),e.text=this.link.getText(e),e.target=!1===t?e.target:this.link.buildTarget(t),this.link.parse(e)},buildLinkFromElement:function(t){var e={url:"",text:this.selection.is()?this.selection.text():"",target:!1};return!1!==t&&(e.url=t.attr("href"),e.text=t.text(),e.target=this.link.buildTarget(t)),e},buildTarget:function(t){return void 0!==t.attr("target")&&"_blank"===t.attr("target")},removeSelfHostFromUrl:function(t){var e=self.location.href.replace("#","").replace(/\/$/i,"");return t.replace(/^\/\#/,"#").replace(e,"").replace("mailto:","")},replaceLinksToText:function(t){var r,e=m.each(t,function(t,e){var i=m(e),n=m('<span class="redactor-unlink" />').append(i.contents());return i.replaceWith(n),0===t&&(r=n),i});return 1===t.length&&this.selection.isCollapsed()&&this.caret.after(r),e}}},linkify:function(){return{isKey:function(){},isLink:function(){},isFiltered:function(){},handler:function(){},format:function(){},convertVideoLinks:function(){},convertImages:function(){},convertLinks:function(){}}},list:function(){return{toggle:function(t){if(!this.utils.inBlocks(["table","td","th","tr"])){t=(t="unorderedlist"===(t="orderedlist"===t?"ol":t)?"ul":t).toLowerCase(),this.buffer.set(),this.selection.save();var e=this.list._getBlocks(),i=this.selection.block(),n=m(i).parents("ul, ol").last();return 0===e.length&&0!==n.length&&(e=[n.get(0)]),e=this.list._isUnformat(t,e)?this.list._unformat(t,e):this.list._format(t,e),this.selection.restore(),e}},get:function(){var t=this.selection.current(),e=m(t).closest("ul, ol",this.core.editor()[0]);return 0!==e.length&&e},combineAfterAndBefore:function(t){var e=m(t).prev(),i=m(t).next(),n=t&&"P"===t.tagName&&("<br>"===t.innerHTML||""===t.innerHTML),r=1===e.closest("ol, ul",this.core.editor()[0]).length&&1===i.closest("ol, ul",this.core.editor()[0]).length;return!(!n||!r)&&(e.children("li").last().append(this.marker.get()),e.append(i.contents()),this.selection.restore(),!0)},_getBlocks:function(){for(var t=[],e=this.selection.blocks(),i=0;i<e.length;i++){m(e[i]).parent().hasClass("redactor-in")&&t.push(e[i])}return t},_isUnformat:function(t,e){for(var i,n=0,r=0;r<e.length;r++){3!==e[r].nodeType&&((i=e[r].tagName.toLowerCase())!==t&&"figure"!==i||n++)}return n===e.length},_uniteBlocks:function(t,e){for(var i=0,n={0:[]},r=!1,s=0;s<t.length;s++){var o=m(t[s]).closest("th, td");0!==o.length?(o.get(0)!==r&&(n[++i]=[]),this.list._isUniteBlock(t[s],e)&&n[i].push(t[s])):this.list._isUniteBlock(t[s],e)?n[i].push(t[s]):n[++i]=[],r=o.get()}return n},_isUniteBlock:function(t,e){return 3===t.nodeType||-1!==e.indexOf(t.tagName.toLowerCase())},_createList:function(t,e,i){var n=e[e.length-1],r=m(n),s=m("<"+t+">");return r.after(s),s},_createListItem:function(t){var e,i=m("<li>");return 3===t.nodeType?i.append(t):(e=m(t),i.append(e.contents()),e.remove()),i},_format:function(t,e){var i=this.list._uniteBlocks(e,["p","div","blockquote","pre","h1","h2","h3","h4","h5","h6","ul","ol"]),n=[];for(var r in i){for(var s=i[r],o=this.list._createList(t,i[r]),a=0;a<s.length;a++){var l=3===s[a].nodeType||"UL"!==s[a].tagName&&"OL"!==s[a].tagName?this.list._createListItem(s[a]):m(s[a]).contents();o.append(l)}n.push(o.get(0))}return n},_unformat:function(t,e){if(1===e.length){var i=m(e[0]),n=i.find("li"),r=this.selection.blocks(["li"]),s=this.selection.block(),o=m(s).closest("li");if(0===r.length&&0!==o.length&&(r=[o.get(0)]),r.length===n.length)return this.list._unformatEntire(e[0]);var a=this.list._getItemsPosition(n,r);if("Top"===a)return this.list._unformatAtSide("before",r,i);if("Bottom"===a)return r.reverse(),this.list._unformatAtSide("after",r,i);if("Middle"===a){var l=m(r[r.length-1]),c=!1,h=!1,d=m("<"+i.get(0).tagName.toLowerCase()+">");n.each(function(t,e){var i;c&&((i=m(e)).children("ul, ol").length,0!==i.closest(".redactor-split-item").length||!1!==h&&0!==i.closest(h).length||i.addClass("redactor-split-item"),h=i),e===l.get(0)&&(c=!0)}),n.filter(".redactor-split-item").each(function(t,e){m(e).removeClass("redactor-split-item"),d.append(e)}),i.after(d),r.reverse();for(var u=0;u<r.length;u++){var p=m(r[u]),f=this.list._createUnformatContainer(p);i.after(f),f.find("ul, ol").remove(),p.remove()}return}}else for(u=0;u<e.length;u++)3!==e[u].nodeType&&e[u].tagName.toLowerCase()===t&&this.list._unformatEntire(e[u])},_unformatEntire:function(t){var r=m(t);r.find("li").each(function(t,e){var i=m(e),n=this.list._createUnformatContainer(i);i.remove(),r.before(n)}.bind(this)),r.remove()},_unformatAtSide:function(t,r,e){for(var i=0;i<r.length;i++){var n=m(r[i]),s=this.list._createUnformatContainer(n);e[t](s);var o=s.find("ul, ol").first();n.append(o),o.each(function(t,e){var i=m(e),n=i.closest("li");n.get(0)===r[t]&&(i.unwrap(),n.addClass("r-unwrapped"))}),this.utils.isEmpty(n.html())&&n.remove()}e.find(".r-unwrapped").each(function(t){var e=m(t);""===e.html().trim()?e.remove():e.removeClass("r-unwrapped")})},_getItemsPosition:function(t,e){var i="Middle",n=e[0],r=e[e.length-1],s=t.first().get(0),o=t.last().get(0);return s===n&&o!==r?i="Top":s!==n&&o===r&&(i="Bottom"),i},_createUnformatContainer:function(t){var e=m("<p>");return e.append(t.contents()),e}}},marker:function(){return{get:function(t){t=void 0===t?1:t;var e=document.createElement("span");return e.id="selection-marker-"+t,e.className="redactor-selection-marker",e.innerHTML=this.opts.invisibleSpace,e},html:function(t){return this.utils.getOuterHtml(this.marker.get(t))},find:function(t){return t=void 0===t?1:t,this.core.editor().find("span#selection-marker-"+t)},insert:function(){var t=this.selection.get(),e=this.selection.range(t);this.marker.insertNode(e,this.marker.get(1),!0),e&&!1===e.collapsed&&this.marker.insertNode(e,this.marker.get(2),!1)},remove:function(){this.core.editor().find(".redactor-selection-marker").each(this.marker.iterateRemove)},insertNode:function(t,e,i){var n=this.selection.parent();if(null!==t&&0!==m(n).closest(".redactor-in").length){t=t.cloneRange();try{t.collapse(i),t.insertNode(e)}catch(t){this.focus.start()}}},iterateRemove:function(t,e){var i=m(e),n=i.text().replace(/\u200B/g,"");i.parent()[0];""===n?i.remove():i.replaceWith(function(){return m(this).contents()})}}},modal:function(){return{callbacks:{},templates:function(){this.opts.modal={"image-edit":"",image:"",file:"",link:String()+'<div class="redactor-modal-tab" data-title="General"><section><label>URL</label><input type="url" id="redactor-link-url" aria-label="URL" /></section><section><label>'+this.lang.get("text")+'</label><input type="text" id="redactor-link-url-text" aria-label="'+this.lang.get("text")+'" /></section><section><label class="checkbox"><input type="checkbox" id="redactor-link-blank"> '+this.lang.get("link-in-new-tab")+'</label></section><section><button id="redactor-modal-button-action">'+this.lang.get("insert")+'</button><button id="redactor-modal-button-cancel">'+this.lang.get("cancel")+"</button></section></div>"},m.extend(this.opts,this.opts.modal)},addCallback:function(t,e){this.modal.callbacks[t]=e},addTemplate:function(t,e){this.opts.modal[t]=e},getTemplate:function(t){return this.opts.modal[t]},getModal:function(){return this.$modalBody},getActionButton:function(){return this.$modalBody.find("#redactor-modal-button-action")},getCancelButton:function(){return this.$modalBody.find("#redactor-modal-button-cancel")},getDeleteButton:function(){return this.$modalBody.find("#redactor-modal-button-delete")},load:function(){},show:function(){},buildWidth:function(){},buildTabber:function(){},showTab:function(){},setTitle:function(){},setContent:function(){this.$modalBody.html(this.modal.getTemplate(this.modal.templateName)),this.modal.getCancelButton().on("mousedown",m.proxy(this.modal.close,this))},setDraggable:function(){},setEnter:function(){},build:function(){this.modal.buildOverlay(),this.$modalBox=m('<div id="redactor-modal-box"/>').hide(),this.$modal=m('<div id="redactor-modal" role="dialog" />'),this.$modalHeader=m('<div id="redactor-modal-header" />'),this.$modalClose=m('<button type="button" id="redactor-modal-close" aria-label="'+this.lang.get("close")+'" />').html("×"),this.$modalBody=m('<div id="redactor-modal-body" />'),this.$modal.append(this.$modalHeader),this.$modal.append(this.$modalBody),this.$modal.append(this.$modalClose),this.$modalBox.append(this.$modal),this.$modalBox.appendTo(document.body)},buildOverlay:function(){this.$modalOverlay=m('<div id="redactor-modal-overlay">').hide(),m("body").prepend(this.$modalOverlay)},enableEvents:function(){},disableEvents:function(){},closeHandler:function(){},close:function(){}}},observe:function(){return{load:function(){void 0===this.opts.destroyed&&(this.observe.links(),this.observe.images())},isCurrent:function(t,e){return void 0===e&&(e=m(this.selection.current())),e.is(t)||0<e.parents(t).length},toolbar:function(){this.observe.buttons(),this.observe.dropdowns()},buttons:function(t,e){var r=this.selection.current(),s=this.selection.parent();!1!==t?this.button.setInactiveAll():this.button.setInactiveAll(e),!1!==t||"html"===e?this.utils.isRedactorParent(r)&&("none"!==this.core.editor().css("display")&&(this.utils.isCurrentOrParentHeader()||this.utils.isCurrentOrParent(["table","pre","blockquote","li"])?this.button.disable("horizontalrule"):this.button.enable("horizontalrule")),m.each(this.opts.activeButtonsStates,m.proxy(function(t,e){var i=m(s).closest(t,this.$editor[0]),n=m(r).closest(t,this.$editor[0]);(0===i.length||this.utils.isRedactorParent(i))&&this.utils.isRedactorParent(n)&&(0===i.length&&0===n.closest(t,this.$editor[0]).length||this.button.setActive(e))},this))):-1!==m.inArray(e,this.opts.activeButtons)&&this.button.toggleActive(e)},dropdowns:function(){var a=m("<div />").html(this.selection.html()).find("a").length,l=m(this.selection.current()),c=this.utils.isRedactorParent(l);m.each(this.opts.observe.dropdowns,m.proxy(function(t,e){var i=e.observe,n=i.element,r=e.item,s=void 0!==i.in&&i.in,o=void 0!==i.out&&i.out;0<l.closest(n).length&&c||"a"===n&&0!==a?this.observe.setDropdownProperties(r,s,o):this.observe.setDropdownProperties(r,o,s)},this))},setDropdownProperties:function(t,e,i){i&&void 0!==i.attr&&this.observe.setDropdownAttr(t,i.attr,!0),void 0!==e.attr&&this.observe.setDropdownAttr(t,e.attr),void 0!==e.title&&t.find("span").text(e.title)},setDropdownAttr:function(i,t,n){m.each(t,function(t,e){"class"===t?n?i.removeClass(e):i.addClass(e):n?i.removeAttr(t):i.attr(t,e)})},addDropdown:function(t,e,i){void 0!==i.observe&&(i.item=t,this.opts.observe.dropdowns.push(i))},images:function(){this.opts.imageEditable&&(this.core.editor().addClass("redactor-layer-img-edit"),this.core.editor().find("img").each(m.proxy(function(t,e){var i=m(e);i.closest("a",this.$editor[0]).on("click",function(t){t.preventDefault()}),this.image.setEditable(i)},this)))},links:function(){this.opts.linkTooltip&&this.core.editor().find("a").each(m.proxy(function(t,e){var i=m(e);!0!==i.data("cached")&&(i.data("cached",!0),i.on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,m.proxy(this.observe.showTooltip,this)))},this))},getTooltipPosition:function(t){return t.offset()},showTooltip:function(t){var e,i,n,r,s,o,a,l,c,h,d=m(t.target);"IMG"!==d[0].tagName&&("A"!==d[0].tagName&&(d=d.closest("a",this.$editor[0])),"A"===d[0].tagName&&(e=d,i=this.observe.getTooltipPosition(e),n=m('<span class="redactor-link-tooltip"></span>'),void 0===(r=e.attr("href"))&&(r=""),24<r.length&&(r=r.substring(0,24)+"..."),s=m('<a href="'+e.attr("href")+'" target="_blank" />').html(r).addClass("redactor-link-tooltip-action"),o=m('<a href="#" />').html(this.lang.get("edit")).on("click",m.proxy(this.link.show,this)).addClass("redactor-link-tooltip-action"),a=m('<a href="#" />').html(this.lang.get("unlink")).on("click",m.proxy(this.link.unlink,this)).addClass("redactor-link-tooltip-action"),n.append(s).append(" | ").append(o).append(" | ").append(a),l=parseInt(e.css("line-height"),10),c=Math.ceil((t.pageY-i.top)/l),h=i.top+c*l,n.css({top:h+"px",left:i.left+"px"}),m(".redactor-link-tooltip").remove(),m("body").append(n),this.core.editor().on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,m.proxy(this.observe.closeTooltip,this)),m(document).on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,m.proxy(this.observe.closeTooltip,this))))},closeAllTooltip:function(){m(".redactor-link-tooltip").remove()},closeTooltip:function(t){var e=(t=t.originalEvent||t).target,i=m(e).closest("a",this.$editor[0]);0!==i.length&&"A"===i[0].tagName&&"A"!==e.tagName||"A"===e.tagName&&this.utils.isRedactorParent(e)||m(e).hasClass("redactor-link-tooltip-action")||(this.observe.closeAllTooltip(),this.core.editor().off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,m.proxy(this.observe.closeTooltip,this)),m(document).off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,m.proxy(this.observe.closeTooltip,this)))}}},offset:function(){return{get:function(t){var e=this.offset.clone(t);if(!1===e)return 0;var i=document.createElement("div");return i.appendChild(e.cloneContents()),i.innerHTML=i.innerHTML.replace(/<img(.*?[^>])>$/gi,"i"),m.trim(m(i).text()).replace(/[\t\n\r\n]/g,"").replace(/\u200B/g,"").length},clone:function(t){var e=this.selection.get(),i=this.selection.range(e);if(null===i&&void 0===t)return!1;if(!1===(t=void 0===t?this.$editor:t))return!1;t=t[0]||t;var n=i.cloneRange();return n.selectNodeContents(t),n.setEnd(i.endContainer,i.endOffset),n},set:function(t,e){e=void 0===e?t:e,this.focus.is()||this.focus.start();for(var i,n=this.selection.get(),r=this.selection.range(n),s=0,o=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);null!==(i=o.nextNode());)if(t<(s+=i.nodeValue.length)&&(r.setStart(i,i.nodeValue.length+t-s),t=1/0),e<=s){r.setEnd(i,i.nodeValue.length+e-s);break}r.collapse(!1),this.selection.update(n,r)}}},paragraphize:function(){return{load:function(t){return!1===this.opts.paragraphize||"inline"===this.opts.type||"pre"===this.opts.type?t:""===t||"<p></p>"===t?this.opts.emptyHtml:(t+="\n",this.paragraphize.safes=[],this.paragraphize.z=0,t=(t=(t=t.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi,"</blockquote>")).replace(/<\/pre>/gi,"</pre>\n\n")).replace(/<p>\s<br><\/p>/gi,"<p></p>"),t=(t=this.paragraphize.getSafes(t)).replace("<br>","\n"),t=this.paragraphize.convert(t),t=this.paragraphize.clear(t),t=(t=this.paragraphize.restoreSafes(t)).replace(new RegExp("<br\\s?/?>\n?<("+this.opts.paragraphizeBlocks.join("|")+")(.*?[^>])>","gi"),"<p><br /></p>\n<$1$2>"),m.trim(t))},getSafes:function(t){var e=m("<div />").append(t);return e.find("blockquote p").replaceWith(function(){return m(this).append("<br />").contents()}),e.find(this.opts.paragraphizeBlocks.join(", ")).each(m.proxy(function(t,e){return this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=e.outerHTML,m(e).replaceWith("\n#####replace"+this.paragraphize.z+"#####\n\n")},this)),e.find("span.redactor-selection-marker").each(m.proxy(function(t,e){return this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=e.outerHTML,m(e).replaceWith("\n#####replace"+this.paragraphize.z+"#####\n\n")},this)),e.html()},restoreSafes:function(i){return m.each(this.paragraphize.safes,function(t,e){e=void 0!==e?e.replace(/\$/g,"$"):e,i=i.replace("#####replace"+t+"#####",e)}),i},convert:function(t){t=(t=(t=(t=t.replace(/\r\n/g,"xparagraphmarkerz")).replace(/\n/g,"xparagraphmarkerz")).replace(/\r/g,"xparagraphmarkerz")).replace(/\s+/g," ");return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t="<p>"+(t=(t=(t=m.trim(t)).replace(/xparagraphmarkerzxparagraphmarkerz/gi,"</p><p>")).replace(/xparagraphmarkerz/gi,"<br>"))+"</p>").replace("<p></p>","")).replace("\r\n\r\n","")).replace(/<\/p><p>/g,"</p>\r\n\r\n<p>")).replace(new RegExp("<br\\s?/?></p>","g"),"</p>")).replace(new RegExp("<p><br\\s?/?>","g"),"<p>")).replace(new RegExp("<p><br\\s?/?>","g"),"<p>")).replace(new RegExp("<br\\s?/?></p>","g"),"</p>")).replace(/<p> <\/p>/gi,"")).replace(/<p>\s?<br> <\/p>/gi,"")).replace(/<p>\s?<br>/gi,"<p>")},clear:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<p>(.*?)#####replace(.*?)#####\s?<\/p>/gi,"<p>$1</p>#####replace$2#####")).replace(/(<br\s?\/?>){2,}<\/p>/gi,"</p>")).replace(new RegExp("</blockquote></p>","gi"),"</blockquote>")).replace(new RegExp("<p></blockquote>","gi"),"</blockquote>")).replace(new RegExp("<p><blockquote>","gi"),"<blockquote>")).replace(new RegExp("<blockquote></p>","gi"),"<blockquote>")).replace(new RegExp("<p><p ","gi"),"<p ")).replace(new RegExp("<p><p>","gi"),"<p>")).replace(new RegExp("</p></p>","gi"),"</p>")).replace(new RegExp("<p>\\s?</p>","gi"),"")).replace(new RegExp("\n</p>","gi"),"</p>")).replace(new RegExp("<p>\t?\t?\n?<p>","gi"),"<p>")).replace(new RegExp("<p>\t*</p>","gi"),"")}}},paste:function(){return{init:function(t){this.rtePaste=!0;var n=!("pre"!==this.opts.type&&!this.utils.isCurrentOrParent("pre"));this.detect.isDesktop()&&!this.paste.pre&&this.opts.clipboardImageUpload&&this.opts.imageUpload&&this.paste.detectClipboardUpload(t)?this.detect.isIe()&&setTimeout(m.proxy(this.paste.clipboardUpload,this),100):(this.utils.saveScroll(),this.selection.save(),this.paste.createPasteBox(n),m(window).on("scroll.redactor-freeze",m.proxy(function(){m(window).scrollTop(this.saveBodyScroll)},this)),setTimeout(m.proxy(function(){var t=this.paste.getPasteBoxCode(n);this.buffer.set(),this.selection.restore(),this.utils.restoreScroll();var e=this.clean.getCurrentType(t),t=this.clean.onPaste(t,e),i=this.core.callback("paste",t);t=void 0===i?t:i,this.paste.insert(t,e),this.rtePaste=!1,n&&this.clean.cleanPre(),m(window).off("scroll.redactor-freeze")},this),1))},getPasteBoxCode:function(t){var e=t?this.$pasteBox.val():this.$pasteBox.html();return this.$pasteBox.remove(),e},createPasteBox:function(t){var e={position:"fixed",width:"1px",top:0,left:"-9999px"};this.$pasteBox=t?m("<textarea>").css(e):m("<div>").attr("contenteditable","true").css(e),this.paste.appendPasteBox(),this.$pasteBox.focus()},appendPasteBox:function(){var t;this.detect.isIe()?this.core.box().append(this.$pasteBox):0<(t=m(".modal-body:visible")).length?t.append(this.$pasteBox):m("body").prepend(this.$pasteBox)},detectClipboardUpload:function(t){var e=(t=t.originalEvent||t).clipboardData;if(this.detect.isIe()||this.detect.isFirefox())return!1;if(-1!==e.types.indexOf("public.tiff"))return t.preventDefault(),!1;if(e.items&&e.items.length){var i=e.items[0].getAsFile();if(null===i)return!1;var n=new FileReader;return n.readAsDataURL(i),n.onload=m.proxy(this.paste.insertFromClipboard,this),!0}},clipboardUpload:function(){var t=this.$editor.find("img");m.each(t,m.proxy(function(t,i){var e,n;-1!==i.src.search(/^data\:image/i)&&(e=window.FormData?new FormData:null,window.FormData&&(this.upload.direct=!0,this.upload.type="image",this.upload.url=this.opts.imageUpload,this.upload.callback=m.proxy(function(t){var e;this.detect.isIe()?m(i).wrap(m("<figure />")):(e=m(i).parent(),this.utils.replaceToTag(e,"figure")),i.src=t.url,this.core.callback("imageUpload",m(i),t)},this),n=this.utils.dataURItoBlob(i.src),e.append("clipboard",1),e.append(this.opts.imageUploadParam,n),this.upload.send(e,!1),this.code.sync(),this.rtePaste=!1))},this))},insertFromClipboard:function(t){var e,i=window.FormData?new FormData:null;window.FormData&&(this.upload.direct=!0,this.upload.type="image",this.upload.url=this.opts.imageUpload,this.upload.callback=this.image.insert,e=this.utils.dataURItoBlob(t.target.result),i.append("clipboard",1),i.append(this.opts.imageUploadParam,e),this.upload.send(i,t),this.rtePaste=!1)},insert:function(t,e){e.pre?this.insert.raw(t):e.text?this.insert.text(t):this.insert.html(t,e),this.detect.isFirefox()&&this.opts.imageUpload&&this.opts.clipboardImageUpload&&setTimeout(m.proxy(this.paste.clipboardUpload,this),100)}}},placeholder:function(){return{enable:function(){},show:function(){},update:function(){},hide:function(){},is:function(){},init:function(){},enabled:function(){},enableEvents:function(){},disableEvents:function(){},build:function(){},buildPosition:function(){},getPosition:function(){},isEditorEmpty:function(){},isAttr:function(){},destroy:function(){}}},progress:function(){return{$box:null,$bar:null,target:document.body,show:function(){},hide:function(){},update:function(){},is:function(){},build:function(){},destroy:function(){}}},selection:function(){return{get:function(){return window.getSelection?window.getSelection():document.selection&&"Control"!==document.selection.type?document.selection:null},range:function(t){return void 0===t&&(t=this.selection.get()),t.getRangeAt&&t.rangeCount?t.getRangeAt(0):null},is:function(){return!this.selection.isCollapsed()},isRedactor:function(){var t=this.selection.range();if(null!==t){var e=t.startContainer.parentNode;if(m(e).hasClass("redactor-in")||0!==m(e).parents(".redactor-in").length)return!0}return!1},isCollapsed:function(){var t=this.selection.get();return null!==t&&t.isCollapsed},update:function(t,e){null!==e&&(t.removeAllRanges(),t.addRange(e))},current:function(){var t=this.selection.get();return null!==t&&t.anchorNode},parent:function(){var t=this.selection.current();return null!==t&&t.parentNode},block:function(t){for(t=t||this.selection.current();t;){if(this.utils.isBlockTag(t.tagName))return!m(t).hasClass("redactor-in")&&t;t=t.parentNode}return!1},inline:function(t){for(t=t||this.selection.current();t;){if(this.utils.isInlineTag(t.tagName))return!m(t).hasClass("redactor-in")&&t;t=t.parentNode}return!1},element:function(t){for(t=t||this.selection.current();t;){if(1===t.nodeType)return!m(t).hasClass("redactor-in")&&t;t=t.parentNode}return!1},prev:function(){return null!==this.selection.current()&&this.selection.current().previousSibling},next:function(){return null!==this.selection.current()&&this.selection.current().nextSibling},blocks:function(t){var i=[],e=this.selection.nodes(t);m.each(e,m.proxy(function(t,e){this.utils.isBlock(e)&&i.push(e)},this));var n=this.selection.block();return 0===i.length&&!1===n?[]:0===i.length&&!1!==n?[n]:i},inlines:function(t){var i=[],e=this.selection.nodes(t);m.each(e,m.proxy(function(t,e){this.utils.isInline(e)&&i.push(e)},this));var n=this.selection.inline();return 0===i.length&&!1===n?[]:0===i.length&&!1!==n?[n]:i},nodes:function(t){var n=void 0===t?[]:m.isArray(t)?t:[t],e=this.selection.get(),i=this.selection.range(e),r=[],s=[];if(this.utils.isCollapsed())r=[this.selection.current()];else{var o=i.startContainer,a=i.endContainer;if(o===a)return[o];for(;o&&o!==a;)r.push(o=this.selection.nextNode(o));for(o=i.startContainer;o&&o!==i.commonAncestorContainer;)r.unshift(o),o=o.parentNode}return m.each(r,function(t,e){if(e){var i=1===e.nodeType&&e.tagName.toLowerCase();if(m(e).hasClass("redactor-script-tag")||m(e).hasClass("redactor-selection-marker"))return;if(i&&0!==n.length&&-1===m.inArray(i,n))return;s.push(e)}}),0===s.length?[]:s},nextNode:function(t){if(t.hasChildNodes())return t.firstChild;for(;t&&!t.nextSibling;)t=t.parentNode;return t?t.nextSibling:null},save:function(){this.marker.insert(),this.savedSel=this.core.editor().html()},restore:function(t){var e=this.marker.find(1),i=this.marker.find(2);this.detect.isFirefox()&&this.core.editor().focus(),0!==e.length&&0!==i.length?this.caret.set(e,i):0!==e.length?this.caret.start(e):this.core.editor().focus(),!1!==t&&(this.marker.remove(),this.savedSel=!1)},saveInstant:function(){var t=this.core.editor()[0],e=t.ownerDocument.defaultView.getSelection();if(e.getRangeAt&&e.rangeCount){var i=e.getRangeAt(0),n=i.cloneRange();n.selectNodeContents(t),n.setEnd(i.startContainer,i.startOffset);var r=n.toString().length;return this.saved={start:r,end:r+i.toString().length,node:i.startContainer},this.saved}},restoreInstant:function(t){if(void 0!==t||this.saved){this.saved=void 0!==t?t:this.saved;var e=this.core.editor().find(this.saved.node);if(0===e.length||0!==e.text().trim().replace(/\u200B/g,"").length){var i,n=this.core.editor()[0],r=n.ownerDocument,s=r.defaultView,o=0;(i=r.createRange()).setStart(n,0),i.collapse(!0);for(var a,l,c=[n],h=!1,d=!1;!d&&(a=c.pop());)if(3==a.nodeType){var u=o+a.length;!h&&this.saved.start>=o&&this.saved.start<=u&&(i.setStart(a,this.saved.start-o),h=!0),h&&this.saved.end>=o&&this.saved.end<=u&&(i.setEnd(a,this.saved.end-o),d=!0),o=u}else for(var p=a.childNodes.length;p--;)c.push(a.childNodes[p]);(l=s.getSelection()).removeAllRanges(),l.addRange(i)}else try{(i=document.createRange()).setStart(e[0],0),(l=window.getSelection()).removeAllRanges(),l.addRange(i)}catch(t){}}},node:function(t){m(t).prepend(this.marker.get(1)),m(t).append(this.marker.get(2)),this.selection.restore()},all:function(){this.core.editor().focus();var t=this.selection.get(),e=this.selection.range(t);e.selectNodeContents(this.core.editor()[0]),this.selection.update(t,e)},remove:function(){this.selection.get().removeAllRanges()},replace:function(t){this.insert.html(t)},text:function(){return this.selection.get().toString()},html:function(){var t="",e=this.selection.get();if(e.rangeCount){for(var i=document.createElement("div"),n=e.rangeCount,r=0;r<n;++r)i.appendChild(e.getRangeAt(r).cloneContents());t=this.clean.onGet(i.innerHTML)}return t},extractEndOfNode:function(t){var e=this.selection.get(),i=this.selection.range(e),n=i.cloneRange();return n.selectNodeContents(t),n.setStart(i.endContainer,i.endOffset),n.extractContents()},removeMarkers:function(){this.marker.remove()},marker:function(t){return this.marker.get(t)},markerHtml:function(t){return this.marker.html(t)}}},shortcuts:function(){return{hotkeysSpecialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},hotkeysShiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},init:function(i,t){if(!1===this.opts.shortcuts)return!i.ctrlKey&&!i.metaKey||66!==t&&73!==t||i.preventDefault(),!1;m.each(this.opts.shortcuts,m.proxy(function(t,e){this.shortcuts.build(i,t,e)},this))},build:function(t,e,i){for(var n=m.proxy(function(){this.shortcuts.buildHandler(i)},this),r=e.split(","),s=r.length,o=0;o<s;o++)"string"==typeof r[o]&&this.shortcuts.handler(t,m.trim(r[o]),n)},buildHandler:function(t){var e;"-1"!==t.func.search(/\./)?void 0!==this[(e=t.func.split("."))[0]]&&this[e[0]][e[1]].apply(this,t.params):this[t.func].apply(this,t.params)},handler:function(i,t,e){t=t.toLowerCase().split(" ");var n=this.shortcuts.hotkeysSpecialKeys[i.keyCode],r=String.fromCharCode(i.which).toLowerCase(),s="",o={};m.each(["alt","ctrl","meta","shift"],function(t,e){i[e+"Key"]&&n!==e&&(s+=e+"+")}),n&&(o[s+n]=!0),r&&(o[s+r]=!0,o[s+this.shortcuts.hotkeysShiftNums[r]]=!0,"shift+"===s&&(o[this.shortcuts.hotkeysShiftNums[r]]=!0));for(var a=t.length,l=0;l<a;l++)if(o[t[l]])return i.preventDefault(),e.apply(this,arguments)}}},storage:function(){return{data:[],add:function(){},status:function(){},observe:function(){},changes:function(){}}},toolbar:function(){return{build:function(){this.button.hideButtons(),this.button.hideButtonsOnMobile(),this.$toolbarBox=m('<div class="redactor-toolbar-box" />'),this.$toolbarBox[0].innerHTML='<ul class="redactor-toolbar" id="redactor-toolbar-'+this.uuid+'" role="toolbar"></ul>',this.$toolbar=m(this.$toolbarBox[0].children[0]),this.$box[0].insertBefore(this.$toolbarBox[0],this.$box[0].firstChild),this.button.$toolbar=this.$toolbar,this.button.setFormatting(),this.button.load(this.$toolbar),require(["Core"],function(t){this.$toolbar[0].addEventListener("keydown",this.toolbar.keydown.bind(this,t))}.bind(this))},createContainer:function(){},append:function(){},setOverflow:function(){},setFixed:function(){},setUnfixed:function(){},getBoxTop:function(){},observeScroll:function(){},observeScrollResize:function(){},observeScrollEnable:function(){},observeScrollDisable:function(){},setDropdownsFixed:function(){},unsetDropdownsFixed:function(){},setDropdownPosition:function(){},keydown:function(t,e){var i=document.activeElement;if(i.classList.contains("re-button")){if(-1!==[13,32,35,36,37,39,40].indexOf(e.which)){if(13===e.which||32===e.which)return e.preventDefault(),void require(["Core"],function(t){t.triggerEvent(i,"mousedown")});if(40!==e.which){e.preventDefault();var n,r=Array.prototype.slice.call(elBySelAll(".re-button",this.$toolbar[0])),s=null;null!==(s=35===e.which?r[r.length-1]:36===e.which?r[0]:(n=r.indexOf(i),37===e.which?-1===--n&&(n=r.length-1):39===e.which&&++n===r.length&&(n=0),r[n]))&&s.focus()}else{if("true"!==elAttr(i,"aria-haspopup"))return;e.preventDefault(),t.triggerEvent(i,"mousedown");var o=m(i).data("dropdown"),a=elBySel("li",o[0]);a&&a.focus()}}}}}},upload:function(){return{init:function(){},directUpload:function(){},onDrop:function(){},traverseFile:function(){},setConfig:function(){},getType:function(){},getHiddenFields:function(){},send:function(){},onDrag:function(){},onDragLeave:function(){},clearImageFields:function(){},addImageFields:function(){},removeImageFields:function(){},clearFileFields:function(){},addFileFields:function(){},removeFileFields:function(){}}},uploads3:function(){return{send:function(){},executeOnSignedUrl:function(){},createCORSRequest:function(){},sendToS3:function(){}}},utils:function(){return{isEmpty:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=void 0===t?this.core.editor().html():t).replace(/[\u200B-\u200D\uFEFF]/g,"")).replace(/ /gi,"")).replace(/<\/?br\s?\/?>/g,"")).replace(/\s/g,"")).replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,"")).replace(/<iframe(.*?[^>])>$/i,"iframe")).replace(/<source(.*?[^>])>$/i,"source")).replace(/<[^\/>][^>]*><\/[^>]+>/gi,"")).replace(/<[^\/>][^>]*><\/[^>]+>/gi,""),""===(t=m.trim(t))},isElement:function(e){try{return e instanceof HTMLElement}catch(t){return"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}},strpos:function(t,e,i){var n=t.indexOf(e,i);return 0<=n&&n},dataURItoBlob:function(t){for(var e=(0<=t.split(",")[0].indexOf("base64")?atob:unescape)(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return new Blob([n],{type:i})},getOuterHtml:function(t){return m("<div>").append(m(t).eq(0).clone()).html()},cloneAttributes:function(t,e){t=t[0]||t,e=m(e);for(var i=t.attributes,n=i.length;n--;){var r=i[n];e.attr(r.name,r.value)}return e},breakBlockTag:function(){var t=this.selection.block();if(!t)return!1;var e=this.utils.isEmpty(t.innerHTML),i=t.tagName.toLowerCase();if("pre"===i||"li"===i||"td"===i||"th"===i)return!1;if(!e&&this.utils.isStartOfElement(t))return{$block:m(t),$next:m(t).next(),type:"start"};if(!e&&this.utils.isEndOfElement(t))return{$block:m(t),$next:m(t).next(),type:"end"};var n=this.selection.extractEndOfNode(t),r=m("<"+i+" />").append(n),r=this.utils.cloneAttributes(t,r);return m(t).after(r),{$block:m(t),$next:r,type:"break"}},inBlocks:function(t){t=m.isArray(t)?t:[t];for(var e,i=this.selection.blocks(),n=i.length,r=!1,s=0;s<n;s++){!1!==i[s]&&(e=i[s].tagName.toLowerCase(),-1!==m.inArray(e,t)&&(r=!0))}return r},inInlines:function(t){t=m.isArray(t)?t:[t];for(var e=this.selection.inlines(),i=e.length,n=!1,r=0;r<i;r++){var s=e[r].tagName.toLowerCase();-1!==m.inArray(s,t)&&(n=!0)}return n},isTag:function(t,e){var i=m(t).closest(e,this.core.editor()[0]);return 1===i.length&&i[0]},isBlock:function(t){return null!==t&&((t=t[0]||t)&&this.utils.isBlockTag(t.tagName))},isBlockTag:function(t){return void 0!==t&&this.reIsBlock.test(t)},isInline:function(t){return(t=t[0]||t)&&this.utils.isInlineTag(t.tagName)},isInlineTag:function(t){return void 0!==t&&this.reIsInline.test(t)},isRedactorParent:function(t){return!!t&&(0!==m(t).parents(".redactor-in").length&&!m(t).hasClass("redactor-in")&&t)},isCurrentOrParentHeader:function(){return this.utils.isCurrentOrParent(["H1","H2","H3","H4","H5","H6"])},isCurrentOrParent:function(t){var i=this.selection.parent(),n=this.selection.current();if(m.isArray(t)){var r=0;return m.each(t,m.proxy(function(t,e){this.utils.isCurrentOrParentOne(n,i,e)&&r++},this)),0!==r}return this.utils.isCurrentOrParentOne(n,i,t)},isCurrentOrParentOne:function(t,e,i){return i=i.toUpperCase(),e&&e.tagName===i?e:!(!t||t.tagName!==i)&&t},isEditorRelative:function(){var t=this.core.editor().css("position");return-1!==m.inArray(["absolute","fixed","relative"],t)},setEditorRelative:function(){this.core.editor().addClass("redactor-relative")},getScrollTarget:function(){var t=m(this.opts.scrollTarget);return 0!==t.length?t:m(document)},freezeScroll:function(){this.freezeScrollTop=this.utils.getScrollTarget().scrollTop(),this.utils.getScrollTarget().scrollTop(this.freezeScrollTop)},unfreezeScroll:function(){void 0!==this.freezeScrollTop&&this.utils.getScrollTarget().scrollTop(this.freezeScrollTop)},saveScroll:function(){this.tmpScrollTop=this.utils.getScrollTarget().scrollTop()},restoreScroll:function(){void 0!==this.tmpScrollTop&&this.utils.getScrollTarget().scrollTop(this.tmpScrollTop)},isStartOfElement:function(t){return!(void 0===t&&!(t=this.selection.block()))&&0===this.offset.get(t)},isEndOfElement:function(t){if(void 0===t&&!(t=this.selection.block()))return!1;var e=m.trim(m(t).text()).replace(/[\t\n\r\n]/g,"").replace(/\u200B/g,"");return this.offset.get(t)===e.length},removeEmptyAttr:function(t,e){var i=m(t);return void 0===i.attr(e)||""===i.attr(e)&&(i.removeAttr(e),!0)},replaceToTag:function(t,e){var i;return m(t).replaceWith(function(){i=m("<"+e+" />").append(m(this).contents());for(var t=0;t<this.attributes.length;t++)i.attr(this.attributes[t].name,this.attributes[t].value);return i}),i},isSelectAll:function(){return this.selectAll},enableSelectAll:function(){this.selectAll=!0},disableSelectAll:function(){this.selectAll=!1},disableBodyScroll:function(){},measureScrollbar:function(){var t=m("body"),e=document.createElement("div");e.className="redactor-scrollbar-measure",t.append(e);var i=e.offsetWidth-e.clientWidth;return t[0].removeChild(e),i},enableBodyScroll:function(){},appendFields:function(t,i){if(!t)return i;if("object"==typeof t)return m.each(t,function(t,e){null!==e&&0===e.toString().indexOf("#")&&(e=m(e).val()),i.append(t,e)}),i;var e=m(t);if(0===e.length)return i;return e.each(function(){i.append(m(this).attr("name"),m(this).val())}),i},appendForms:function(t,i){if(!t)return i;var e=m(t);if(0===e.length)return i;var n=e.serializeArray();return m.each(n,function(t,e){i.append(e.name,e.value)}),i},isRgb:function(t){return 0===t.search(/^rgb/i)},rgb2hex:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""},isCollapsed:function(){return this.selection.isCollapsed()},isMobile:function(){return this.detect.isMobile()},isDesktop:function(){return this.detect.isDesktop()},isPad:function(){return this.detect.isIpad()}}},browser:function(){return{webkit:function(){return this.detect.isWebkit()},ff:function(){return this.detect.isFirefox()},ie:function(){return this.detect.isIe()}}}},m(window).on("load.tools.redactor",function(){m('[data-tools="redactor"]').redactor()}),l.prototype.init.prototype=l.prototype}(jQuery),function(s){function n(t,e,i,n){var r={duration:.5,iterate:1,delay:0,prefix:"redactor-",timing:"linear"};this.animation=e,this.slide="slideDown"===this.animation||"slideUp"===this.animation,this.$element=s(t),this.prefixes=["","-moz-","-o-animation-","-webkit-"],this.queue=[],"function"==typeof i?(n=i,this.opts=r):this.opts=s.extend(r,i),this.slide&&this.$element.height(this.$element.height()),this.init(n)}s.fn.redactorAnimation=function(t,e,i){return this.each(function(){new n(this,t,e,i)})},n.prototype={init:function(t){this.queue.push(this.animation),this.clean(),"show"===this.animation?(this.opts.timing="linear",this.$element.removeClass("hide").show(),"function"==typeof t&&t(this)):"hide"===this.animation?(this.opts.timing="linear",this.$element.hide(),"function"==typeof t&&t(this)):this.animate(t)},animate:function(t){this.$element.addClass("redactor-animated").css("display","").removeClass("hide"),this.$element.addClass(this.opts.prefix+this.queue[0]),this.set(this.opts.duration+"s",this.opts.delay+"s",this.opts.iterate,this.opts.timing);var e=1<this.queue.length?null:t;this.complete("AnimationEnd",s.proxy(function(){this.$element.hasClass(this.opts.prefix+this.queue[0])&&(this.clean(),this.queue.shift(),this.queue.length&&this.animate(t))},this),e)},set:function(t,e,i,n){for(var r=this.prefixes.length;r--;)this.$element.css(this.prefixes[r]+"animation-duration",t),this.$element.css(this.prefixes[r]+"animation-delay",e),this.$element.css(this.prefixes[r]+"animation-iteration-count",i),this.$element.css(this.prefixes[r]+"animation-timing-function",n)},clean:function(){this.$element.removeClass("redactor-animated"),this.$element.removeClass(this.opts.prefix+this.queue[0]),this.set("","","","")},complete:function(t,e,i){this.$element.one(t.toLowerCase()+" webkit"+t+" o"+t+" MS"+t,s.proxy(function(){"function"==typeof e&&e(),"function"==typeof i&&i(this);-1!==s.inArray(this.animation,["fadeOut","slideUp","zoomOut","slideOutUp","slideOutRight","slideOutLeft"])&&this.$element.css("display","none"),this.slide&&this.$element.css("height","")},this))}}}(jQuery); })(this);
+(function (window, undefined) { !function(t){"use strict";function e(t,i){return new e.prototype.init(t,i)}var i,n;Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;return function(){return e.apply(t)}}),i=0,n=null,"function"==typeof window.require&&require(["Environment"],(function(t){n=t})),t.fn.redactor=function(i){var n=[],r=Array.prototype.slice.call(arguments,1);return"string"==typeof i?this.each((function(){var e,s,o=t.data(this,"redactor");"-1"!==i.search(/\./)?void 0!==o[(e=i.split("."))[0]]&&(e=o[e[0]][e[1]]):e=o[i],void 0!==o&&t.isFunction(e)?void 0!==(s=e.apply(o,r))&&s!==o&&n.push(s):t.error('No such method "'+i+'" for Redactor')})):this.each((function(){t.data(this,"redactor",{}),t.data(this,"redactor",e(this,i))})),0===n.length?this:1===n.length?n[0]:n},t.Redactor=e,t.Redactor.VERSION="2.99",t.Redactor.modules=["air","autosave","block","buffer","build","button","caret","clean","code","core","detect","dropdown","events","file","focus","image","indent","inline","insert","keydown","keyup","lang","line","link","linkify","list","marker","modal","observe","offset","paragraphize","paste","placeholder","progress","selection","shortcuts","storage","toolbar","upload","uploads3","utils","browser"],t.Redactor.settings={},t.Redactor.opts={animation:!1,lang:"en",direction:"ltr",spellcheck:!0,overrideStyles:!0,stylesClass:!1,scrollTarget:document,focus:!1,focusEnd:!1,clickToEdit:!1,structure:!1,tabindex:!1,minHeight:!1,maxHeight:!1,maxWidth:!1,plugins:!1,callbacks:{},placeholder:!1,linkify:!0,enterKey:!0,pastePlainText:!1,pasteImages:!0,pasteLinks:!0,pasteBlockTags:["pre","h1","h2","h3","h4","h5","h6","table","tbody","thead","tfoot","th","tr","td","ul","ol","li","blockquote","p","figure","figcaption"],pasteInlineTags:["br","strong","ins","code","del","span","samp","kbd","sup","sub","mark","var","cite","small","b","u","em","i"],preClass:!1,preSpaces:4,tabAsSpaces:!1,tabKey:!0,autosave:!1,autosaveName:!1,autosaveFields:!1,imageUpload:null,imageUploadParam:"file",imageUploadFields:!1,imageUploadForms:!1,imageTag:"figure",imageEditable:!0,imageCaption:!0,imagePosition:!1,imageResizable:!1,imageFloatMargin:"10px",dragImageUpload:!0,multipleImageUpload:!0,clipboardImageUpload:!0,fileUpload:null,fileUploadParam:"file",fileUploadFields:!1,fileUploadForms:!1,dragFileUpload:!0,s3:!1,linkNewTab:!1,linkTooltip:!0,linkNofollow:!1,linkSize:30,linkValidation:!0,pasteLinkTarget:!1,videoContainerClass:"video-container",toolbar:!0,toolbarFixed:!0,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:!1,toolbarOverflow:!1,air:!1,airWidth:!1,formatting:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],formattingAdd:!1,buttons:["format","bold","italic","deleted","lists","image","file","link","horizontalrule"],buttonsTextLabeled:!1,buttonsHide:[],buttonsHideOnMobile:[],script:!0,removeNewlines:!1,removeComments:!0,replaceTags:{b:"strong",i:"em",strike:"del"},keepStyleAttr:[],keepInlineOnEnter:!1,shortcuts:{"ctrl+shift+m, meta+shift+m":{func:"inline.removeFormat"},"ctrl+b, meta+b":{func:"inline.format",params:["bold"]},"ctrl+i, meta+i":{func:"inline.format",params:["italic"]},"ctrl+h, meta+h":{func:"inline.format",params:["superscript"]},"ctrl+l, meta+l":{func:"inline.format",params:["subscript"]},"ctrl+k, meta+k":{func:"link.show"},"ctrl+shift+7":{func:"list.toggle",params:["orderedlist"]},"ctrl+shift+8":{func:"list.toggle",params:["unorderedlist"]}},shortcutsAdd:!1,activeButtons:["deleted","italic","bold"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted"},langs:{en:{format:"Format",image:"Image",file:"File",link:"Link",bold:"Bold",italic:"Italic",deleted:"Strikethrough",underline:"Underline","bold-abbr":"B","italic-abbr":"I","deleted-abbr":"S","underline-abbr":"U",lists:"Lists","link-insert":"Insert link","link-edit":"Edit link","link-in-new-tab":"Open link in new tab",unlink:"Unlink",cancel:"Cancel",close:"Close",insert:"Insert",save:"Save",delete:"Delete",text:"Text",edit:"Edit",title:"Title",paragraph:"Normal text",quote:"Quote",code:"Code",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",filename:"Name",optional:"optional",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",horizontalrule:"Line","upload-label":"Drop file here or ",caption:"Caption",bulletslist:"Bullets",numberslist:"Numbers","image-position":"Position",none:"None",left:"Left",right:"Right",center:"Center","accessibility-help-label":"Rich text editor"}},type:"textarea",inline:!1,inlineTags:["a","span","strong","strike","b","u","em","i","code","del","ins","samp","kbd","sup","sub","mark","var","cite","small"],blockTags:["pre","ul","ol","li","p","h1","h2","h3","h4","h5","h6","dl","dt","dd","div","td","blockquote","output","figcaption","figure","address","section","header","footer","aside","article","iframe"],paragraphize:!0,paragraphizeBlocks:["table","div","pre","form","ul","ol","h1","h2","h3","h4","h5","h6","dl","blockquote","figcaption","address","section","header","footer","aside","article","object","style","script","iframe","select","input","textarea","button","option","map","area","math","hr","fieldset","legend","hgroup","nav","figure","details","menu","summary","p"],emptyHtml:"<p>​</p>",invisibleSpace:"​",emptyHtmlRendered:t("").html("").html(),imageTypes:["image/png","image/jpeg","image/gif","image/webp"],userAgent:navigator.userAgent.toLowerCase(),observe:{dropdowns:[]},regexps:{linkyoutube:/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/gi,linkvimeo:/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,linkimage:/((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/gi,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi}},e.fn=t.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,UP:38,DOWN:40,ENTER:13,SPACE:32,ESC:27,TAB:9,CTRL:17,META:91,SHIFT:16,ALT:18,RIGHT:39,LEFT:37,LEFT_WIN:91},init:function(e,n){if(this.$element=t(e),this.uuid=i++,this.sBuffer=[],this.sRebuffer=[],this.loadOptions(n),this.loadModules(),this.opts.clickToEdit&&!this.$element.hasClass("redactor-click-to-edit"))return this.loadToEdit(n);this.$element.hasClass("redactor-click-to-edit")&&this.$element.removeClass("redactor-click-to-edit"),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i"),this.reIsInline=new RegExp("^("+this.opts.inlineTags.join("|").toUpperCase()+")$","i"),this.opts.dragImageUpload=null!==this.opts.imageUpload&&this.opts.dragImageUpload,this.opts.dragFileUpload=null!==this.opts.fileUpload&&this.opts.dragFileUpload,this.formatting={},this.lang.load(),t.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.$editor=this.$element,this.detectType(),this.core.callback("start"),this.core.callback("startToEdit"),this.start=!0,this.build.start()},detectType:function(){this.build.isInline()||this.opts.inline?this.opts.type="inline":this.build.isTag("DIV")?this.opts.type="div":this.build.isTag("PRE")&&(this.opts.type="pre")},loadToEdit:function(e){this.$element.on("click.redactor-click-to-edit",t.proxy((function(){this.initToEdit(e)}),this)),this.$element.addClass("redactor-click-to-edit")},initToEdit:function(e){t.extend(e.callbacks,{startToEdit:function(){this.insert.node(this.marker.get(),!1)},initToEdit:function(){this.selection.restore(),this.clickToCancelStorage=this.code.get(),t(this.opts.clickToCancel).off(".redactor-click-to-edit"),t(this.opts.clickToCancel).show().on("click.redactor-click-to-edit",t.proxy((function(i){i.preventDefault(),this.core.destroy(),this.events.syncFire=!1,this.$element.html(this.clickToCancelStorage),this.core.callback("cancel",this.clickToCancelStorage),this.events.syncFire=!0,this.clickToCancelStorage="",t(this.opts.clickToCancel).hide(),t(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",t.proxy((function(){this.initToEdit(e)}),this)),this.$element.addClass("redactor-click-to-edit")}),this)),t(this.opts.clickToSave).off(".redactor-click-to-edit"),t(this.opts.clickToSave).show().on("click.redactor-click-to-edit",t.proxy((function(i){i.preventDefault(),this.core.destroy(),this.core.callback("save",this.code.get()),t(this.opts.clickToCancel).hide(),t(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",t.proxy((function(){this.initToEdit(e)}),this)),this.$element.addClass("redactor-click-to-edit")}),this))}}),this.$element.redactor(e),this.$element.off(".redactor-click-to-edit")},loadOptions:function(e){var i={};void 0!==t.Redactor.settings.namespace?this.$element.hasClass(t.Redactor.settings.namespace)&&(i=t.Redactor.settings):i=t.Redactor.settings,this.opts=t.extend({},t.Redactor.opts,this.$element.data(),e),this.opts=t.extend({},this.opts,i)},getModuleMethods:function(t){return Object.getOwnPropertyNames(t).filter((function(e){return"function"==typeof t[e]}))},loadModules:function(){var e,i=t.Redactor.modules.length;for(e=0;e<i;e++)this.bindModuleMethods(t.Redactor.modules[e])},bindModuleMethods:function(t){var e,i,n;if(void 0!==this[t])for(this[t]=this[t](),i=(e=this.getModuleMethods(this[t])).length,n=0;n<i;n++)this[t][e[n]]=this[t][e[n]].bind(this)},air:function(){return{enabled:!1,collapsed:function(){},collapsedEnd:function(){},build:function(){},append:function(){},createContainer:function(){},show:function(){},bindHide:function(){},hide:function(){}}},autosave:function(){return{enabled:!1,html:!1,init:function(){},is:function(){},send:function(){},getHiddenFields:function(){},success:function(){},disable:function(){}}},block:function(){return{format:function(e,i,n,r){if(e="quote"===e?"blockquote":e,this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],-1!==t.inArray(e,this.block.tags))return"p"===e&&void 0===i&&(i="class"),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(e,i,n,r):this.block.formatUncollapsed(e,i,n,r)},formatCollapsed:function(e,i,n,r){var s,o,a,l,c,h;if(this.selection.save(),o=(s=this.selection.block()).tagName.toLowerCase(),-1!==t.inArray(o,this.block.tags)){if(a=!1,o===e&&void 0===i&&(e="p",a=!0),a&&(this.block.removeAllClass(),this.block.removeAllAttr()),"blockquote"===o&&this.utils.isEndOfElement(s)?(this.marker.remove(),(l=document.createElement("p")).innerHTML=this.opts.invisibleSpace,t(s).after(l),this.caret.start(l),0!==(c=t(s).children().last()).length&&"BR"===c[0].tagName&&c.remove()):l=this.utils.replaceToTag(s,e),"object"==typeof i)for(h in r=n,i)l=this.block.setAttr(l,h,i[h],r);else l=this.block.setAttr(l,i,n,r);return"pre"===e&&1===l.length&&t(l).html(t.trim(t(l).html())),this.selection.restore(),this.block.removeInlineTags(l),l}this.selection.restore()},formatUncollapsed:function(e,i,n,r){var s,o,a,l,c,h,d,u;for(this.selection.save(),s=[],(o=this.selection.blocks())[0]&&(t(o[0]).hasClass("redactor-in")||t(o[0]).hasClass("redactor-box"))&&(o=this.core.editor().find(this.opts.blockTags.join(", "))),a=o.length,l=0;l<a;l++)if(c=o[l].tagName.toLowerCase(),-1!==t.inArray(c,this.block.tags)&&"figure"!==c){if(h=this.utils.replaceToTag(o[l],e),"object"==typeof i)for(d in r=n,i)h=this.block.setAttr(h,d,i[d],r);else h=this.block.setAttr(h,i,n,r);s.push(h),this.block.removeInlineTags(h)}return this.selection.restore(),"pre"===e&&0!==s.length&&(u=s[0],t.each(s,(function(e,i){0!==e&&(t(u).append("\n"+t.trim(i.html())),t(i).remove())})),(s=[]).push(u)),s},removeInlineTags:function(e){var i,n,r;e=e[0]||e,i=this.opts.inlineTags,n=["PRE","H1","H2","H3","H4","H5","H6"],-1!==t.inArray(e.tagName,n)&&("PRE"!==e.tagName&&(r=i.indexOf("a"),i.splice(r,1)),t(e).find(i.join(",")).not(".redactor-selection-marker").contents().unwrap())},setAttr:function(t,e,i,n){if(void 0===e)return t;var r=void 0===n?"replace":n;return t="class"===e?this.block[r+"Class"](i,t):"remove"===r||"removeAll"===r?this.block[r+"Attr"](e,t):this.block[r+"Attr"](e,i,t)},getBlocks:function(e){var i,n;return e=void 0===e?this.selection.blocks():e,t(e).hasClass("redactor-box")?(i=[],n=this.core.editor().children(),t.each(n,t.proxy((function(t,e){this.utils.isBlock(e)&&i.push(e)}),this)),i):e},replaceClass:function(e,i){return t(this.block.getBlocks(i)).removeAttr("class").addClass(e)[0]},toggleClass:function(e,i){return t(this.block.getBlocks(i)).toggleClass(e)[0]},addClass:function(e,i){return t(this.block.getBlocks(i)).addClass(e)[0]},removeClass:function(e,i){return t(this.block.getBlocks(i)).removeClass(e)[0]},removeAllClass:function(e){return t(this.block.getBlocks(e)).removeAttr("class")[0]},replaceAttr:function(e,i,n){return n=this.block.removeAttr(e,n),t(n).attr(e,i)[0]},toggleAttr:function(e,i,n){var r,s;return n=this.block.getBlocks(n),r=this,s=[],t.each(n,(function(n,o){t(o).attr(e)?s.push(r.block.removeAttr(e,o)):s.push(r.block.addAttr(e,i,o))})),s},addAttr:function(e,i,n){return t(this.block.getBlocks(n)).attr(e,i)[0]},removeAttr:function(e,i){return t(this.block.getBlocks(i)).removeAttr(e)[0]},removeAllAttr:function(e){e=this.block.getBlocks(e);var i=[];return t.each(e,(function(t,e){if(void 0!==e.attributes)for(;e.attributes.length;)e.removeAttribute(e.attributes[0].name);i.push(e)})),i}}},buffer:function(){return{set:function(t){void 0===t&&this.buffer.clear(),void 0===t||"undo"===t?this.buffer.setUndo():this.buffer.setRedo()},setUndo:function(){var t=this.selection.saveInstant(),e=this.sBuffer[this.sBuffer.length-1],i=this.core.editor().html(),n=void 0===e||e[0]!==i;n&&this.sBuffer.push([i,t])},setRedo:function(){var t=this.selection.saveInstant();this.sRebuffer.push([this.core.editor().html(),t])},add:function(){this.sBuffer.push([this.core.editor().html(),0])},undo:function(){if(0!==this.sBuffer.length){var t=this.sBuffer.pop();this.buffer.set("redo"),this.core.editor().html(t[0]),this.selection.restoreInstant(t[1]),this.selection.restore(),this.observe.load()}},redo:function(){if(0!==this.sRebuffer.length){var t=this.sRebuffer.pop();this.buffer.set("undo"),this.core.editor().html(t[0]),this.selection.restoreInstant(t[1]),this.selection.restore(),this.observe.load()}},clear:function(){this.sRebuffer=[]}}},build:function(){return{start:function(){if("textarea"!==this.opts.type)throw new Error("Only `<textarea>` types are allowed.");this.build.startTextarea(),this.build.setIn(),this.build.setId(),this.build.enableEditor(),this.build.setOptions(),this.build.callEditor()},createContainerBox:function(){this.$box=t('<div class="redactor-box" role="application" />')},setIn:function(){this.core.editor().addClass("redactor-in")},setId:function(){var t="textarea"===this.opts.type?"redactor-uuid-"+this.uuid:this.$element.attr("id");this.core.editor().attr("id",void 0===t?"redactor-uuid-"+this.uuid:t)},getName:function(){var t=this.$element.attr("name");return void 0===t?"content-"+this.uuid:t},buildTextarea:function(){},loadFromTextarea:function(){this.$editor=t("<div />"),this.$textarea=this.$element,this.$element.attr("name",this.build.getName()),this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element),this.build.setStartAttrs(),this.$editor.addClass("redactor-layer"),this.opts.overrideStyles&&this.$editor.addClass("redactor-styles"),this.$element.hide(),this.$box.prepend('<span class="redactor-voice-label" id="redactor-voice-'+this.uuid+'" aria-hidden="false">'+this.lang.get("accessibility-help-label")+"</span>")},setStartAttrs:function(){this.$editor.attr({"aria-labelledby":"redactor-voice-"+this.uuid,role:"presentation"})},startTextarea:function(){this.build.createContainerBox(),this.build.loadFromTextarea(),this.code.start(this.core.textarea().val()),this.core.textarea().val(this.clean.onSync(this.$editor.html()))},isTag:function(t){return this.$element[0].tagName===t},isInline:function(){return!this.build.isTag("TEXTAREA")&&!this.build.isTag("DIV")&&!this.build.isTag("PRE")},enableEditor:function(){this.core.editor().attr({contenteditable:!0})},setOptions:function(){"inline"===this.opts.type&&(this.opts.enterKey=!1),"inline"!==this.opts.type&&"pre"!==this.opts.type||(this.opts.toolbarMobile=!1,this.opts.toolbar=!1),this.core.editor().attr("spellcheck",this.opts.spellcheck),this.opts.structure&&this.core.editor().addClass("redactor-structure"),this.opts.stylesClass&&this.core.editor().addClass(this.opts.stylesClass),"textarea"===this.opts.type&&(this.core.box().attr("dir",this.opts.direction),this.core.editor().attr("dir",this.opts.direction),this.opts.tabindex&&this.core.editor().attr("tabindex",this.opts.tabindex),this.opts.minHeight?this.core.editor().css("min-height",this.opts.minHeight):this.core.editor().css("min-height","40px"),this.opts.maxHeight&&this.core.editor().css("max-height",this.opts.maxHeight),this.opts.maxWidth&&this.core.editor().css({"max-width":this.opts.maxWidth,margin:"auto"}))},callEditor:function(){this.build.disableBrowsersEditing(),this.events.init(),this.build.setHelpers(),this.toolbarsButtons=this.button.init(),this.toolbar.build(),this.core.editor().on("mouseup.redactor-observe."+this.uuid+" keyup.redactor-observe."+this.uuid+" focus.redactor-observe."+this.uuid+" touchstart.redactor-observe."+this.uuid,t.proxy(this.observe.toolbar,this)),this.core.element().on("blur.callback.redactor",t.proxy((function(){this.button.setInactiveAll()}),this)),this.modal.templates(),this.build.plugins(),this.code.html=this.code.cleaned(this.core.editor().html()),this.core.callback("init"),this.core.callback("initToEdit"),this.start=!1},setHelpers:function(){this.opts.focus?setTimeout(this.focus.start,100):this.opts.focusEnd&&setTimeout(this.focus.end,100)},disableBrowsersEditing:function(){try{document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1),document.execCommand("AutoUrlDetect",!1,!1)}catch(t){}},plugins:function(){this.opts.plugins&&t.each(this.opts.plugins,t.proxy((function(i,n){var r,s,o,a,l,c="undefined"!=typeof RedactorPlugins&&void 0!==RedactorPlugins[n]?RedactorPlugins:e.fn;if(t.isFunction(c[n])){for(this[n]=c[n](),s=(r=this.getModuleMethods(this[n])).length,o=0;o<s;o++)this[n][r[o]]=this[n][r[o]].bind(this);void 0!==this[n].langs&&(a={},void 0!==this[n].langs[this.opts.lang]?a=this[n].langs[this.opts.lang]:void 0===this[n].langs[this.opts.lang]&&void 0!==this[n].langs.en&&(a=this[n].langs.en),l=this,t.each(a,(function(t,e){void 0===l.opts.curLang[t]&&(l.opts.curLang[t]=e)}))),"function"==typeof this[n].init&&this[n].init()}}),this))}}},button:function(){return{toolbar:function(){return void 0!==this.button.$toolbar&&this.button.$toolbar?this.button.$toolbar:this.$toolbar},init:function(){return{format:{title:this.lang.get("format"),icon:!0,dropdown:{p:{title:this.lang.get("paragraph"),func:"block.format"},blockquote:{title:this.lang.get("quote"),func:"block.format"},pre:{title:this.lang.get("code"),func:"block.format"},h1:{title:this.lang.get("heading1"),func:"block.format"},h2:{title:this.lang.get("heading2"),func:"block.format"},h3:{title:this.lang.get("heading3"),func:"block.format"},h4:{title:this.lang.get("heading4"),func:"block.format"},h5:{title:this.lang.get("heading5"),func:"block.format"},h6:{title:this.lang.get("heading6"),func:"block.format"}}},bold:{title:this.lang.get("bold-abbr"),icon:!0,label:this.lang.get("bold"),func:"inline.format"},italic:{title:this.lang.get("italic-abbr"),icon:!0,label:this.lang.get("italic"),func:"inline.format"},deleted:{title:this.lang.get("deleted-abbr"),icon:!0,label:this.lang.get("deleted"),func:"inline.format"},underline:{title:this.lang.get("underline-abbr"),icon:!0,label:this.lang.get("underline"),func:"inline.format"},lists:{title:this.lang.get("lists"),icon:!0,dropdown:{unorderedlist:{title:"• "+this.lang.get("unorderedlist"),func:"list.toggle"},orderedlist:{title:"1. "+this.lang.get("orderedlist"),func:"list.toggle"},outdent:{title:"< "+this.lang.get("outdent"),func:"indent.decrease",observe:{element:"li",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},indent:{title:"> "+this.lang.get("indent"),func:"indent.increase",observe:{element:"li",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},ul:{title:"• "+this.lang.get("bulletslist"),icon:!0,func:"list.toggle"},ol:{title:"1. "+this.lang.get("numberslist"),icon:!0,func:"list.toggle"},outdent:{title:this.lang.get("outdent"),icon:!0,func:"indent.decrease"},indent:{title:this.lang.get("indent"),icon:!0,func:"indent.increase"},image:{title:this.lang.get("image"),icon:!0,func:"image.show"},file:{title:this.lang.get("file"),icon:!0,func:"file.show"},link:{title:this.lang.get("link"),icon:!0,dropdown:{link:{title:this.lang.get("link-insert"),func:"link.show",observe:{element:"a",in:{title:this.lang.get("link-edit")},out:{title:this.lang.get("link-insert")}}},unlink:{title:this.lang.get("unlink"),func:"link.unlink",observe:{element:"a",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},horizontalrule:{title:this.lang.get("horizontalrule"),icon:!0,func:"line.insert"}}},setFormatting:function(){for(var t in this.toolbarsButtons.format.dropdown)this.toolbarsButtons.format.dropdown.hasOwnProperty(t)&&-1===this.opts.formatting.indexOf(t)&&delete this.toolbarsButtons.format.dropdown[t]},hideButtons:function(){0!==this.opts.buttonsHide.length&&this.button.hideButtonsSlicer(this.opts.buttonsHide)},hideButtonsOnMobile:function(){this.detect.isMobile()&&0!==this.opts.buttonsHideOnMobile.length&&this.button.hideButtonsSlicer(this.opts.buttonsHideOnMobile)},hideButtonsSlicer:function(e){t.each(e,t.proxy((function(t,e){var i=this.opts.buttons.indexOf(e);-1!==i&&this.opts.buttons.splice(i,1)}),this))},load:function(t){this.button.buttons=[],this.opts.buttons.forEach(function(e){if(("image"!==e||this.image.is())&&this.toolbarsButtons.hasOwnProperty(e)){var i=elCreate("li");i.appendChild(this.button.build(e,this.toolbarsButtons[e])[0]),t[0].appendChild(i)}}.bind(this))},buildButtonTooltip:function(){},build:function(e,i){var n,r=t('<a href="javascript:void(null);" rel="'+e+'" />');return r.addClass("re-button re-"+e),r.attr({role:"button",tabindex:"-1"}),r.html(i.title),(i.func||i.command||i.dropdown)&&this.button.setEvent(r,e,i),i.dropdown&&(r.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0),n=t('<ul class="dropdownMenu redactor-dropdown-menu redactor-dropdown-menu-'+r[0].rel+'" data-dropdown-allow-flip="horizontal" data-dropdown-ignore-page-scroll="true" />'),r.data("dropdown",n),this.dropdown.build(e,n,i.dropdown),this.button.setupDropdown(r[0],n[0])),this.button.buttons.push(r),r},setupDropdown:function(t,e){require(["Ui/SimpleDropdown"],function(i){i.initFragment(t,e),i.registerCallback(t.id,function(t,e){"close"===e&&this.dropdown.hideOut()}.bind(this)),elData(t,"a11y-mouse-event","mousedown"),elData(t,"aria-expanded",!1),t.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation()}))}.bind(this))},getButtons:function(){return this.button.toolbar().find("a.re-button")},getButtonsKeys:function(){return this.button.buttons},setEvent:function(e,i,n){e.on("mousedown",t.proxy((function(t){var r,s;return t.preventDefault(),e.hasClass("redactor-button-disabled")||(r="func",s=n.func,n.command?(r="command",s=n.command):n.dropdown&&(r="dropdown",s=!1),this.button.toggle(t,i,r,s)),!1}),this))},toggle:function(t,e,i,n,r){!this.detect.isIe()&&this.detect.isDesktop()||(this.utils.freezeScroll(),t.returnValue=!1),"command"===i?this.inline.format(n):"dropdown"===i?this.dropdown.show(t,e):this.button.clickCallback(t,n,e,r),"dropdown"!==i&&this.dropdown.hideAll(!1),!this.detect.isIe()&&this.detect.isDesktop()||this.utils.unfreezeScroll()},clickCallback:function(e,i,n,r){var s;if(e instanceof Event?e.preventDefault():e&&e.originalEvent&&e.originalEvent.preventDefault(),r=void 0===r?n:r,t.isFunction(i))i.call(this,n);else if("-1"!==i.search(/\./)){if(void 0===this[(s=i.split("."))[0]])return;"object"==typeof r?this[s[0]][s[1]].apply(this,r):this[s[0]][s[1]].call(this,r)}else"object"==typeof r?this[i].apply(this,r):this[i].call(this,r);this.observe.buttons(e,n)},all:function(){return this.button.buttons},get:function(t){if(!1!==this.opts.toolbar)return this.button.toolbar().find("a.re-"+t)},set:function(t,e){if(!1!==this.opts.toolbar){var i=this.button.toolbar().find("a.re-"+t);return i.html(e).attr("aria-label",e),i}},add:function(e,i){if(!0!==this.button.isAdded(e))return t();var n=this.button.build(e,{title:i});return this.button.toolbar().append(t("<li>").append(n)),n},addFirst:function(e,i){if(!0!==this.button.isAdded(e))return t();var n=this.button.build(e,{title:i});return this.button.toolbar().prepend(t("<li>").append(n)),n},addAfter:function(e,i,n){var r,s;return!0!==this.button.isAdded(i)?t():(r=this.button.build(i,{title:n}),0!==(s=this.button.get(e)).length?s.parent().after(t("<li>").append(r)):this.button.toolbar().append(t("<li>").append(r)),r)},addBefore:function(e,i,n){var r,s;return!0!==this.button.isAdded(i)?t():(r=this.button.build(i,{title:n}),0!==(s=this.button.get(e)).length?s.parent().before(t("<li>").append(r)):this.button.toolbar().append(t("<li>").append(r)),r)},isAdded:function(t){var e=this.opts.buttonsHideOnMobile.indexOf(t);return!(!1===this.opts.toolbar||-1!==e&&this.detect.isMobile())},setIcon:function(t,e){this.opts.buttonsTextLabeled||t.html(e).addClass("re-button-icon")},changeIcon:function(t,e){var i=this.button.get(t);0!==i.length&&i.find("i").removeAttr("class").addClass("re-icon-"+e)},addCallback:function(e,i){var n,r;void 0!==e&&!1!==this.opts.toolbar&&(n="dropdown"===i?"dropdown":"func",r=e.attr("rel"),e.on("mousedown",t.proxy((function(t){if(e.hasClass("redactor-button-disabled"))return!1;this.button.toggle(t,r,n,i)}),this)))},addDropdown:function(e,i){var n,r;if(!1!==this.opts.toolbar)return e.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0),n=e.attr("rel"),this.button.addCallback(e,"dropdown"),r=t('<ul class="dropdownMenu redactor-dropdown-menu redactor-dropdown-menu-'+n+'" data-dropdown-allow-flip="horizontal" data-dropdown-ignore-page-scroll="true" />'),e.data("dropdown",r),i&&(this.dropdown.build(n,r,i),this.button.setupDropdown(e[0],r[0])),r},setActive:function(t){this.button.get(t).addClass("redactor-act").attr({"aria-pressed":!0,tabindex:0})},setInactive:function(t){this.button.get(t).removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},setInactiveAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(e=e.not(".re-"+t)),e.removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},disable:function(t){this.button.get(t).addClass("redactor-button-disabled").attr("aria-disabled",!0)},enable:function(t){this.button.get(t).removeClass("redactor-button-disabled").attr("aria-disabled",!1)},disableAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(Array.isArray(t)||(t=[t]),t=t.map((function(t){return".re-"+t})),e=e.not(t.join(","))),e.addClass("redactor-button-disabled").attr("aria-disabled",!0)},enableAll:function(){this.button.toolbar().find("a.re-button").removeClass("redactor-button-disabled").attr("aria-disabled",!1)},remove:function(t){this.button.get(t).remove()}}},caret:function(){return{set:function(t,e,i){var n,r,s=this.core.editor().scrollTop();this.core.editor().focus(),this.core.editor().scrollTop(s),i=void 0===i?0:1,t=t[0]||t,e=e[0]||e,n=this.selection.get(),r=this.selection.range(n);try{r.setStart(t,0),r.setEnd(e,i)}catch(t){}this.selection.update(n,r)},prepare:function(t){return this.detect.isFirefox()&&void 0!==this.start&&this.core.editor().focus(),t[0]||t},start:function(e){var i,n,r,s;if(e=this.caret.prepare(e)){if("BR"===e.tagName)return this.caret.before(e);r=t(e).children().first(),s=this.utils.isInlineTag(e.tagName),""===e.innerHTML||s?this.caret.setStartEmptyOrInline(e,s):r&&0!==r.length&&this.utils.isInlineTag(r[0].tagName)&&""===r.text()?this.caret.setStartEmptyOrInline(r[0],!0):((i=window.getSelection()).removeAllRanges(),(n=document.createRange()).selectNodeContents(e),n.collapse(!0),i.addRange(n))}},setStartEmptyOrInline:function(e,i){var n=window.getSelection(),r=document.createRange(),s=document.createTextNode("");r.setStart(e,0),r.insertNode(s),r.setStartAfter(s),r.collapse(!0),n.removeAllRanges(),n.addRange(r),i||this.core.editor().on("keydown.redactor-remove-textnode",(function(){t(s).remove(),t(this).off("keydown.redactor-remove-textnode")}))},end:function(e){var i,n,r;if(e=this.caret.prepare(e)){if("BR"!==e.tagName&&""===e.innerHTML)return this.caret.start(e);if("BR"===e.tagName)return(r=document.createElement("span")).className="redactor-invisible-space",r.innerHTML="​",t(e).after(r),(i=window.getSelection()).removeAllRanges(),(n=document.createRange()).setStartBefore(r),n.setEndBefore(r),i.addRange(n),void t(r).replaceWith((function(){return t(this).contents()}));if(e.lastChild&&1===e.lastChild.nodeType)return this.caret.after(e.lastChild);if((i=window.getSelection()).getRangeAt||i.rangeCount)try{(n=i.getRangeAt(0)).selectNodeContents(e),n.collapse(!1),i.removeAllRanges(),i.addRange(n)}catch(t){}}},after:function(e){var i,n,r,s;if(e=this.caret.prepare(e))return"BR"===e.tagName?this.caret.end(e):void(this.utils.isBlockTag(e.tagName)?void 0===(r=this.caret.next(e))?this.caret.end(e):("TABLE"===r.tagName?r=t(r).find("th, td").first()[0]:"UL"!==r.tagName&&"OL"!==r.tagName||(r=t(r).find("li").first()[0]),this.caret.start(r)):(s=document.createTextNode(""),(i=window.getSelection()).removeAllRanges(),(n=document.createRange()).setStartAfter(e),n.insertNode(s),n.setStartAfter(s),n.collapse(!0),i.addRange(n)))},before:function(e){var i,n,r;(e=this.caret.prepare(e))&&(this.utils.isBlockTag(e.tagName)?void 0===(r=this.caret.prev(e))?this.caret.start(e):("TABLE"===r.tagName?r=t(r).find("th, td").last()[0]:"UL"!==r.tagName&&"OL"!==r.tagName||(r=t(r).find("li").last()[0]),this.caret.end(r)):((i=window.getSelection()).removeAllRanges(),(n=document.createRange()).setStartBefore(e),n.collapse(!0),i.addRange(n)))},next:function(e){var i=t(e).next();return i.hasClass("redactor-script-tag, redactor-selection-marker")?i.next()[0]:i[0]},prev:function(e){var i=t(e).prev();return i.hasClass("redactor-script-tag, redactor-selection-marker")?i.prev()[0]:i[0]},offset:function(t){return this.offset.get(t)}}},clean:function(){return{onSet:function(e){var i,n,r,s,o;return e=this.clean.savePreCode(e),this.opts.script&&(e=e.replace(/<script(.*?[^>]?)>([\w\W]*?)<\/script>/gi,'<pre class="redactor-script-tag" $1>$2</pre>')),e=(e=(e=(e=(e=e.replace(/\$/g,"$")).replace(/&/g,"&")).replace(/<a href="(.*?[^>]?)®(.*?[^>]?)">/gi,'<a href="$1®$2">')).replace(/<span id="selection-marker-1"(.*?[^>]?)><\/span>/gi,"###marker1###")).replace(/<span id="selection-marker-2"(.*?[^>]?)><\/span>/gi,"###marker2###"),i=this,n=t("<div/>").html(t.parseHTML(e,document,!0)),(r=this.opts.replaceTags)&&(s=Object.keys(this.opts.replaceTags),n.find(s.join(",")).each((function(t,e){i.utils.replaceToTag(e,r[e.tagName.toLowerCase()])}))),n.find("span, a").attr("data-redactor-span",!0),n.find(this.opts.inlineTags.join(",")).each((function(){var e=t(this);e.attr("style")&&e.attr("data-redactor-style-cache",e.attr("style"))})),e=n.html(),o=["font","html","head","link","body","meta","applet"],this.opts.script||o.push("script"),e=this.clean.stripTags(e,o),this.opts.removeComments&&(e=e.replace(/<!--[\s\S]*?-->/gi,"")),-1!==(e=(e=(e=this.paragraphize.load(e)).replace("###marker1###",'<span id="selection-marker-1" class="redactor-selection-marker"></span>')).replace("###marker2###",'<span id="selection-marker-2" class="redactor-selection-marker"></span>')).search(/^(||\s||<br\s?\/?>|| )$/i)?this.opts.emptyHtml:e},onGet:function(t){return this.clean.onSync(t)},onSync:function(e){var i,n;return-1!==(e=(e=e.replace(/\u200B/g,"")).replace(/​/gi,"")).search(/^<p>(||\s||<br\s?\/?>|| )<\/p>$/i)?"":(e=(e=(e=(e=e.replace(/<span(.*?)id="redactor-image-box"(.*?[^>])>([\w\W]*?)<img(.*?)><\/span>/gi,"$3<img$4>")).replace(/<span(.*?)id="redactor-image-resizer"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<span(.*?)id="redactor-image-editter"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<img(.*?)style="(.*?)opacity: 0\.5;(.*?)"(.*?)>/gi,'<img$1style="$2$3"$4>'),(i=t("<div/>").html(t.parseHTML(e,document,!0))).find('*[style=""]').removeAttr("style"),i.find('*[class=""]').removeAttr("class"),i.find('*[rel=""]').removeAttr("rel"),i.find('*[data-image=""]').removeAttr("data-image"),i.find('*[alt=""]').removeAttr("alt"),i.find('*[title=""]').removeAttr("title"),i.find("*[data-redactor-style-cache]").removeAttr("data-redactor-style-cache"),i.find(".redactor-invisible-space, .redactor-unlink").each((function(){t(this).contents().unwrap()})),i.find("span, a").removeAttr("data-redactor-span data-redactor-style-cache").each((function(){0===this.attributes.length&&t(this).contents().unwrap()})),i.find("img").removeAttr("rel"),i.find(".redactor-selection-marker, #redactor-insert-marker").remove(),e=i.html(),this.opts.script&&(e=e.replace(/<pre class="redactor-script-tag"(.*?[^>]?)>([\w\W]*?)<\/pre>/gi,"<script$1>$2<\/script>")),e=(e=(e=(e=(e=this.clean.restoreFormTags(e)).replace(new RegExp("<br\\s?/?></h","gi"),"</h")).replace(new RegExp("<br\\s?/?></li>","gi"),"</li>")).replace(new RegExp("</li><br\\s?/?>","gi"),"</li>")).replace(/<pre>/gi,"<pre>\n"),this.opts.preClass&&(e=e.replace(/<pre>/gi,'<pre class="'+this.opts.preClass+'">')),this.opts.linkNofollow&&(e=(e=e.replace(/<a(.*?)rel="nofollow"(.*?[^>])>/gi,"<a$1$2>")).replace(/<a(.*?[^>])>/gi,'<a$1 rel="nofollow">')),n={"™":"™","©":"©","…":"…","—":"—","‐":"‐"},t.each(n,(function(t,i){e=e.replace(new RegExp(t,"g"),i)})),e=(e=e.replace(/&/g,"&")).replace(/\n{2,}/g,"\n"),this.opts.removeNewlines&&(e=e.replace(/\r?\n/g,"")),e)},onPaste:function(e,i,n){!0!==n&&(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2")).replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3")).replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>([\w\W]*?)<\/span>/gi,"<b><i>$2</i></b>")).replace(/<span[^>]*(font-style: italic; font-weight: 700|font-weight: 700; font-style: italic)[^>]*>([\w\W]*?)<\/span>/gi,"<b><i>$2</i></b>")).replace(/<span[^>]*font-style: italic[^>]*>([\w\W]*?)<\/span>/gi,"<i>$1</i>")).replace(/<span[^>]*font-weight: bold[^>]*>([\w\W]*?)<\/span>/gi,"<b>$1</b>")).replace(/<span[^>]*font-weight: 700[^>]*>([\w\W]*?)<\/span>/gi,"<b>$1</b>")).replace(/<o:p[^>]*>/gi,"")).replace(/<\/o:p>/gi,""),this.clean.isHtmlMsWord(e)&&(e=this.clean.cleanMsWord(e)));return e=t.trim(e),i.pre?this.opts.preSpaces&&(e=e.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))):(e=this.clean.replaceBrToNl(e),e=this.clean.removeTagsInsidePre(e)),!0!==n&&(e=this.clean.removeEmptyInlineTags(e),!1===i.encode&&(e=e.replace(/&/g,"&"),e=this.clean.convertTags(e,i),e=this.clean.getPlainText(e),e=this.clean.reconvertTags(e,i))),i.text&&(e=this.clean.replaceNbspToSpaces(e),e=this.clean.getPlainText(e)),i.lists&&(e=e.replace("\n","<br>")),i.encode&&(e=this.clean.encodeHtml(e)),i.paragraphize&&(e=(e=e.replace(/ \n/g," ")).replace(/\n /g," "),e=(e=this.paragraphize.load(e)).replace(/<p><\/p>/g,"")),e=(e=e.replace(/<li><p>/g,"<li>")).replace(/<\/p><\/li>/g,"</li>")},getCurrentType:function(t,e){var i=this.selection.blocks(),n={text:!1,encode:!1,paragraphize:!0,line:this.clean.isHtmlLine(t),blocks:this.clean.isHtmlBlocked(t),pre:!1,lists:!1,block:!0,inline:!0,links:!0,images:!0};return 1===i.length&&this.utils.isCurrentOrParent(["h1","h2","h3","h4","h5","h6","a","figcaption"])?(n.text=!0,n.paragraphize=!1,n.inline=!1,n.images=!1,n.links=!1,n.line=!0):"inline"===this.opts.type||!1===this.opts.enterKey?(n.paragraphize=!1,n.block=!1,n.line=!0):1===i.length&&this.utils.isCurrentOrParent(["li"])?(n.lists=!0,n.block=!1,n.paragraphize=!1,n.images=!1):1===i.length&&this.utils.isCurrentOrParent(["th","td","blockquote"])?(n.block=!1,n.paragraphize=!1):("pre"===this.opts.type||1===i.length&&this.utils.isCurrentOrParent("pre"))&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),!0===n.line&&(n.paragraphize=!1),!0===e&&(n.text=!1),n},isHtmlBlocked:function(t){var e=t.match(new RegExp("</("+this.opts.blockTags.join("|").toUpperCase()+")>","gi")),i=t.match(new RegExp("<hr(.*?[^>])>","gi"));return null!==e||null!==i},isHtmlLine:function(t){var e,i;return!this.clean.isHtmlBlocked(t)&&(e=t.match(/<br\s?\/?>/gi),i=t.match(/\n/gi),!e&&!i)},isHtmlMsWord:function(t){return t.match(/class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i)},removeEmptyInlineTags:function(e){var i=this.opts.inlineTags,n=t("<div/>").html(t.parseHTML(e,document,!0)),r=this,s=n.find("span"),o=n.find(i.join(","));return o.removeAttr("style"),o.each((function(){var e=t(this).html();0===this.attributes.length&&r.utils.isEmpty(e)&&t(this).replaceWith((function(){return t(this).contents()}))})),s.each((function(){t(this).html();0===this.attributes.length&&t(this).replaceWith((function(){return t(this).contents()}))})),e=(e=(e=(e=n.html()).replace("\x3c!--?php","<?php")).replace("\x3c!--?","<?")).replace("?--\x3e","?>"),n.remove(),e},cleanMsWord:function(e){var i,n,r,s;return e=(e=(e=(e=(e=e.replace(/<!--[\s\S]*?-->/g,"")).replace(/<o:p>[\s\S]*?<\/o:p>/gi,"")).replace(/\n/g," ")).replace(/<\/p>/gi,'</p><p><br data-redactor="br"></p>')).replace(/<\/div>|<\/li>|<\/td>/gi,"\n\n"),i=t("<div/>").html(e),elBySelAll("br",i[0],(function(t){var e,i;if("br"===elData(t,"redactor"))t.removeAttribute("data-redactor");else if((e=t.parentNode)&&"P"===e.nodeName){for(i=elCreate("p");t.nextSibling;)i.appendChild(t.nextSibling);e.parentNode.insertBefore(i,e.nextSibling),elRemove(t)}})),n=!1,r=1,s=[],i.find("p[style]").each((function(){var e,o,a,l,c,h,d,u=t(this).attr("style").match(/mso\-list\:l([0-9]+)\slevel([0-9]+)/);if(u)if(e=parseInt(u[1]),o=parseInt(u[2]),a=t(this).html().match(/^[\w]+\./)?"ol":"ul",(l=t("<li/>").html(t(this).html())).html(l.html().replace(/^([\w\.]+)</,"<")),l.find("span:first").remove(),1==o&&-1==t.inArray(e,s))c=t("<"+a+"/>").attr({"data-level":o,"data-list":e}).html(l),t(this).replaceWith(c),n=e,s.push(e);else{if(o>r){for(h=i.find('[data-level="'+r+'"][data-list="'+n+'"]'),d=r;d<o;d++)(c=t("<"+a+"/>")).appendTo(h.find("li").last()),h=c;h.attr({"data-level":o,"data-list":e}).html(l)}else i.find('[data-level="'+o+'"][data-list="'+e+'"]').last().append(l);r=o,n=e,t(this).remove()}})),i.find("[data-level][data-list]").removeAttr("data-level data-list"),elBySelAll("ol, ul",i[0],(function(t){["nextElementSibling","previousElementSibling"].forEach((function(e){for(var i=t[e];i&&"P"===i.nodeName&&""===i.className&&"<br>"===i.innerHTML;)elRemove(i),i=t[e]}))})),e=i.html()},replaceNbspToSpaces:function(t){return t.replace(" "," ")},replaceBrToNl:function(t){return t.replace(/<br\s?\/?>/gi,"\n")},replaceNlToBr:function(t){return t.replace(/\n/g,"<br />")},convertTags:function(e,i){var n,r,s,o,a,l=t("<div>").html(e);if(l.find("iframe").remove(),(n=l.find("a")).removeAttr("style"),!1!==this.opts.pasteLinkTarget&&n.attr("target",this.opts.pasteLinkTarget),i.links&&this.opts.pasteLinks&&l.find("a").each((function(t,e){var i,n,r,s;if(e.href){for(i='#####[a href="'+e.href+'"',r=0,s=e.attributes.length;r<s;r++)"href"!==(n=e.attributes.item(r)).name&&(i+=" "+n.name+'="'+n.value+'"');e.outerHTML=i+"]#####"+e.innerHTML+"#####[/a]#####"}})),e=l.html(),i.images&&this.opts.pasteImages&&(e=e.replace(/<img(.*?)src="(.*?)"(.*?[^>])>/gi,'#####[img$1src="$2"$3]#####')),this.opts.pastePlainText)return e;for(r=i.lists?["ul","ol","li"]:this.opts.pasteBlockTags,o=(s=i.block||i.lists?i.inline?r.concat(this.opts.pasteInlineTags):r:i.inline?this.opts.pasteInlineTags:[]).length,a=0;a<o;a++)e=e.replace(new RegExp("</"+s[a]+">","gi"),"###/"+s[a]+"###"),e="td"===s[a]||"th"===s[a]?e.replace(new RegExp("<"+s[a]+'(.*?[^>])((colspan|rowspan)="(.*?[^>])")?(.*?[^>])>',"gi"),"###"+s[a]+" $2###"):this.utils.isInlineTag(s[a])?(e=(e=e.replace(new RegExp("<"+s[a]+'([^>]*)class="([^>]*)"[^>]*>',"gi"),"###"+s[a]+' class="$2"###')).replace(new RegExp("<"+s[a]+'([^>]*)data-redactor-style-cache="([^>]*)"[^>]*>',"gi"),"###"+s[a]+' cache="$2"###')).replace(new RegExp("<"+s[a]+"[^>]*>","gi"),"###"+s[a]+"###"):e.replace(new RegExp("<"+s[a]+"[^>]*>","gi"),"###"+s[a]+"###");return e},reconvertTags:function(t,e){var i,n,r,s,o;if((e.links&&this.opts.pasteLinks||e.images&&this.opts.pasteImages)&&(t=(t=t.replace(new RegExp("#####\\[","gi"),"<")).replace(new RegExp("\\]#####","gi"),">")),this.opts.pastePlainText)return t;for(i=e.lists?["ul","ol","li"]:this.opts.pasteBlockTags,r=(n=e.block||e.lists?e.inline?i.concat(this.opts.pasteInlineTags):i:e.inline?this.opts.pasteInlineTags:[]).length,s=0;s<r;s++)t=t.replace(new RegExp("###/"+n[s]+"###","gi"),"</"+n[s]+">");for(s=0;s<r;s++)t=t.replace(new RegExp("###"+n[s]+"###","gi"),"<"+n[s]+">");for(s=0;s<r;s++)"td"===n[s]||"th"===n[s]?t=t.replace(new RegExp("###"+n[s]+"s?(.*?[^#])###","gi"),"<"+n[s]+"$1>"):this.utils.isInlineTag(n[s])&&(o="span"===n[s]?' data-redactor-span="true"':"",t=(t=t.replace(new RegExp("###"+n[s]+' cache="(.*?[^#])"###',"gi"),"<"+n[s]+' style="$1"'+o+' data-redactor-style-cache="$1">')).replace(new RegExp("###"+n[s]+"s?(.*?[^#])###","gi"),"<"+n[s]+"$1>"));return t},cleanPre:function(e){e=void 0===e?t(this.selection.block()).closest("pre",this.core.editor()[0]):e,t(e).find("br").replaceWith((function(){return document.createTextNode("\n")})),t(e).find("p").replaceWith((function(){return t(this).contents()}))},removeTagsInsidePre:function(e){var i=t("<div />").append(e);return i.find("pre").replaceWith((function(){var e=t(this).html();return e=(e=e.replace(/<br\s?\/?>|<\/p>|<\/div>|<\/li>|<\/td>/gi,"\n")).replace(/(<([^>]+)>)/gi,""),t("<pre />").append(e)})),e=i.html(),i.remove(),e},getPlainText:function(e){e=(e=(e=(e=(e=(e=e.replace(/<!--[\s\S]*?-->/gi,"")).replace(/<style[\s\S]*?style>/gi,"")).replace(/<p><\/p>/g,"")).replace(/<\/div>|<\/li>|<\/td>/gi,"\n")).replace(/<\/p>/gi,"\n\n")).replace(/<\/H[1-6]>/gi,"\n\n");var i=document.createElement("div");return i.innerHTML=e,e=i.textContent||i.innerText,t.trim(e)},savePreCode:function(t){return t=this.clean.savePreFormatting(t),t=this.clean.saveCodeFormatting(t),t=this.clean.restoreSelectionMarkers(t)},savePreFormatting:function(e){var i=e.match(/<pre(.*?)>([\w\W]*?)<\/pre>/gi);return null===i||t.each(i,t.proxy((function(t,i){var n,r,s,o=[],a=!1;i.match(/<pre(.*?)>(([\n\r\s]+)?)<code(.*?)>/i)?(a=!0,n=(o=i.match(/<pre(.*?)>(([\n\r\s]+)?)<code(.*?)>([\w\W]*?)<\/code>(([\n\r\s]+)?)<\/pre>/i))[5],r=o[1],s=o[4]):(n=(o=i.match(/<pre(.*?)>([\w\W]*?)<\/pre>/i))[2],r=o[1]),n=(n=n.replace(/<br\s?\/?>/g,"\n")).replace(/ /g," "),this.opts.preSpaces&&(n=n.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),n=(n=this.clean.encodeEntities(n)).replace(/\$/g,"$"),e=a?e.replace(i,"<pre"+r+"><code"+s+">"+n+"</code></pre>"):e.replace(i,"<pre"+r+">"+n+"</pre>")}),this)),e},saveCodeFormatting:function(e){var i=e.match(/<code(.*?)>([\w\W]*?)<\/code>/gi);return null===i||t.each(i,t.proxy((function(t,i){var n=i.match(/<code(.*?)>([\w\W]*?)<\/code>/i);n[2]=n[2].replace(/ /g," "),n[2]=this.clean.encodeEntities(n[2]),n[2]=n[2].replace(/\$/g,"$"),e=e.replace(i,"<code"+n[1]+">"+n[2]+"</code>")}),this)),e},restoreSelectionMarkers:function(t){return t=t.replace(/<span id="selection-marker-([0-9])" class="redactor-selection-marker"><\/span>/g,'<span id="selection-marker-$1" class="redactor-selection-marker"></span>')},saveFormTags:function(t){return t},restoreFormTags:function(t){return t.replace(/<section(.*?) rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>")},encodeHtml:function(t){return t=(t=(t=(t=t.replace(/”/g,'"')).replace(/“/g,'"')).replace(/‘/g,"'")).replace(/’/g,"'"),t=this.clean.encodeEntities(t)},encodeEntities:function(t){return t=(t=String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},stripTags:function(t,e){if(void 0===e)return t.replace(/(<([^>]+)>)/gi,"");return t.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(function(t,i){return-1===e.indexOf(i.toLowerCase())?t:""}))},removeMarkers:function(t){return t.replace(/<span(.*?[^>]?)class="redactor-selection-marker"(.*?[^>]?)>([\w\W]*?)<\/span>/gi,"")},removeSpaces:function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=t.trim(e)).replace(/\n/g,"")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g," ")).replace(/[\s\n]*$/g," ")).replace(/>\s{2,}</g,"> <")).replace(/\n\n/g,"\n")).replace(/\u200B/g,"")},removeSpacesHard:function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=t.trim(e)).replace(/\n/g,"")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g,"")).replace(/[\s\n]*$/g,"")).replace(/>\s{2,}</g,"><")).replace(/\n\n/g,"\n")).replace(/\u200B/g,"")},normalizeCurrentHeading:function(){var t=this.selection.block();this.utils.isCurrentOrParentHeader()&&t&&t.normalize()}}},code:function(){return{syncFire:!0,html:!1,start:function(e){e=(e=t.trim(e)).replace(/^(<span id="selection-marker-1" class="redactor-selection-marker"><\/span>)/,""),e=(e=this.clean.onSet(e)).replace(/<p><span id="selection-marker-1" class="redactor-selection-marker"><\/span><\/p>/,""),this.events.stopDetectChanges(),this.core.editor().html(e),this.observe.load(),this.events.startDetectChanges()},set:function(e,i){e=t.trim(e),(i=i||{}).start&&(this.start=i.start),"textarea"===this.opts.type?e=this.clean.onSet(e):"div"===this.opts.type&&""===e&&(e=this.opts.emptyHtml),this.core.editor().html(e),"textarea"===this.opts.type&&this.code.sync()},get:function(){if("textarea"===this.opts.type)return this.core.textarea().val();var t=this.core.editor().html();return t=this.clean.onGet(t)},sync:function(){var e,i;if(this.code.syncFire&&(e=this.core.editor().html(),i=this.code.cleaned(e),!this.code.isSync(i))){if(this.code.html=i,"textarea"!==this.opts.type)return this.core.callback("sync",e),void this.core.callback("change",e);"textarea"===this.opts.type&&setTimeout(t.proxy((function(){this.code.startSync(e)}),this),10)}},startSync:function(t){t=this.core.callback("syncBefore",t),t=this.clean.onSync(t),this.core.textarea().val(t),this.core.callback("sync",t),!1===this.start&&this.core.callback("change",t),this.start=!1},isSync:function(t){var e=!1!==this.code.html&&this.code.html;return!1!==e&&e===t},cleaned:function(t){return t=t.replace(/\u200B/g,""),this.clean.removeMarkers(t)}}},core:function(){return{id:function(){return this.$editor.attr("id")},element:function(){return this.$element},editor:function(){return void 0===this.$editor?t():this.$editor},textarea:function(){return this.$textarea},box:function(){return"textarea"===this.opts.type?this.$box:this.$element},toolbar:function(){return!!this.$toolbar&&this.$toolbar},air:function(){return!!this.$air&&this.$air},object:function(){return t.extend({},this)},structure:function(){this.core.editor().toggleClass("redactor-structure")},addEvent:function(t){this.core.event=t},getEvent:function(){return this.core.event},callback:function(e,i,n){var r,s,o,a,l,c="redactor",h=!1,d=t._data(this.core.element()[0],"events");if(void 0!==d&&void 0!==d[e])for(r=d[e].length,s=0;s<r;s++)d[e][s].namespace==="callback."+c&&(o=d[e][s].handler,h=void 0===(a=void 0===n?[i]:[i,n])?o.call(this,i):o.call(this,i,a));return h||(void 0===this.opts.callbacks[e]?void 0===n?i:n:(l=this.opts.callbacks[e],t.isFunction(l)?void 0===n?l.call(this,i):l.call(this,i,n):void 0===n?i:n))},destroy:function(){var e,i;this.opts.destroyed=!0,this.core.callback("destroy"),t("#redactor-voice-"+this.uuid).remove(),this.core.editor().removeClass("redactor-in redactor-styles redactor-structure redactor-layer-img-edit"),this.core.editor().off("keydown.redactor-remove-textnode"),this.core.editor().off(".redactor-observe."+this.uuid),this.$element.off(".redactor").removeData("redactor"),this.core.editor().off(".redactor"),t(document).off(".redactor-air."+this.uuid),t(document).off("mousedown.redactor-blur."+this.uuid),t(document).off("mousedown.redactor."+this.uuid),t(document).off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid),t(window).off(".redactor-toolbar."+this.uuid),t(window).off("touchmove.redactor."+this.uuid),t("body").off("scroll.redactor."+this.uuid),t(this.opts.toolbarFixedTarget).off("scroll.redactor."+this.uuid),e=this,!1!==this.opts.plugins&&t.each(this.opts.plugins,(function(i,n){t(window).off(".redactor-plugin-"+n),t(document).off(".redactor-plugin-"+n),t("body").off(".redactor-plugin-"+n),e.core.editor().off(".redactor-plugin-"+n)})),this.$element.off("click.redactor-click-to-edit"),this.$element.removeClass("redactor-click-to-edit"),this.core.editor().removeClass("redactor-layer"),this.core.editor().removeAttr("contenteditable"),i=this.code.get(),this.opts.toolbar&&this.$toolbar&&this.$toolbar.find("a").each((function(){var e=t(this);e.data("dropdown")&&(e.data("dropdown").remove(),e.data("dropdown",{}))})),"textarea"===this.opts.type&&(this.$box.after(this.$element),this.$box.remove(),this.$element.val(i).show()),this.opts.toolbar&&this.$toolbar&&this.$toolbar.remove(),this.$modalBox&&this.$modalBox.remove(),this.$modalOverlay&&this.$modalOverlay.remove(),t(".redactor-link-tooltip").remove()}}},detect:function(){return{isWebkit:function(){return/webkit/.test(this.opts.userAgent)},isFirefox:function(){return this.opts.userAgent.indexOf("firefox")>-1},isIe:function(t){return document.documentMode||/Edge/.test(navigator.userAgent)?"edge":((e=RegExp("msie"+(isNaN(t)?"":"\\s"+t),"i").test(navigator.userAgent))||(e=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)),e);var e},isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isDesktop:function(){return!/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent)},isIpad:function(){return/iPad/.test(navigator.userAgent)}}},dropdown:function(){return{active:!1,button:!1,key:!1,position:[],getDropdown:function(){return this.dropdown.active},build:function(e,i,n){var r,s,o,a,l,c,h=document.createDocumentFragment();for(s in n)n.hasOwnProperty(s)&&(r=n[s],o=this.dropdown.buildItem(s,r),this.observe.addDropdown(t(o),s,r),h.appendChild(o));for(a=!1,l=0,c=h.childNodes.length;l<c;l++)if(h.childNodes[l].nodeType===Node.ELEMENT_NODE){a=!0;break}a&&(i[0].rel=e,i[0].appendChild(h))},buildFormatting:function(){},buildItem:function(e,i){var n=elCreate("li");return void 0!==i.classname&&n.classList.add(i.classname),0===e.toLowerCase().indexOf("divider")?(n.classList.add("redactor-dropdown-divider"),n):(n.innerHTML='<a href="#" class="redactor-dropdown-'+e+'" role="button"><span>'+i.title+"</span></a>",t(n.children[0]).on("mousedown",function(t){t.preventDefault(),this.dropdown.buildClick(t,e,i)}.bind(this)),n)},buildClick:function(e,i,n){if(!t(e.target).hasClass("redactor-dropdown-link-inactive")){var r=this.dropdown.buildCommand(n);void 0!==n.args?this.button.toggle(e,i,r.type,r.callback,n.args):this.button.toggle(e,i,r.type,r.callback)}},buildCommand:function(t){var e={type:"func"};return e.callback=t.func,t.command?(e.type="command",e.callback=t.command):t.dropdown&&(e.type="dropdown",e.callback=t.dropdown),e},show:function(e,i){this.detect.isDesktop()&&this.core.editor().focus(),this.dropdown.hideAll(!1,i),this.dropdown.key=i,this.dropdown.button=this.button.get(this.dropdown.key),require(["Ui/SimpleDropdown"],function(e){var i=this.dropdown.button[0].id;e.toggleDropdown(i),e.isOpen(i)?(this.dropdown.active=t(e.getDropdownMenu(i)),this.core.callback("dropdownShow",{dropdown:this.dropdown.active,key:this.dropdown.key,button:this.dropdown.button}),this.button.setActive(this.dropdown.key),this.dropdown.button.addClass("dropact").attr("aria-expanded",!0),this.dropdown.enableCallback()):this.dropdown.hide()}.bind(this)),e.preventDefault()},showIsFixedToolbar:function(){},showIsUnFixedToolbar:function(){},enableEvents:function(){},enableCallback:function(){this.core.callback("dropdownShown",{dropdown:this.dropdown.active,key:this.dropdown.key,button:this.dropdown.button})},getButtonPosition:function(){},closeHandler:function(){},hideAll:function(t,e){this.dropdown.hideOut(e)},hide:function(){this.dropdown.hideOut()},hideOut:function(t){if(!1!==this.dropdown.active&&this.dropdown.button[0].rel!==t){this.core.callback("dropdownHide",this.dropdown.active);var e=this.dropdown.button[0].id;require(["Ui/SimpleDropdown"],(function(t){t.close(e)})),this.dropdown.button.removeClass("redactor-act dropact").attr("aria-expanded",!1),this.dropdown.button=!1,this.dropdown.key=!1,this.dropdown.active=!1}}}},events:function(){return{focused:!1,blured:!0,dropImage:!1,stopChanges:!1,stopDetectChanges:function(){this.events.stopChanges=!0},startDetectChanges:function(){var t=this;setTimeout((function(){t.events.stopChanges=!1}),1)},dragover:function(e){e.preventDefault(),"IMG"===e.target.tagName&&t(e.target).addClass("redactor-image-dragover")},dragleave:function(t){this.core.editor().find("img").removeClass("redactor-image-dragover")},drop:function(t){return t=t.originalEvent||t,this.core.editor().find("img").removeClass("redactor-image-dragover"),"inline"===this.opts.type||"pre"===this.opts.type?(t.preventDefault(),!1):void 0===window.FormData||!t.dataTransfer||(0===t.dataTransfer.files.length?this.events.onDrop(t):(this.events.onDropUpload(t),void this.core.callback("drop",t)))},click:function(t){var e=this.core.getEvent(),i="click"!==e&&"arrow"!==e&&"click";this.core.addEvent(i),this.utils.disableSelectAll(),this.core.callback("click",t)},focus:function(t){var e,i;this.rtePaste||(this.events.isCallback("focus")&&this.core.callback("focus",t),this.events.focused=!0,this.events.blured=!1,!1===this.selection.current()&&(e=this.selection.get(),(i=this.selection.range(e)).setStart(this.core.editor()[0],0),i.setEnd(this.core.editor()[0],0),this.selection.update(e,i)))},blur:function(e){this.start||this.rtePaste||0===t(e.target).closest("#"+this.core.id()+", .redactor-toolbar, .redactor-dropdown, #redactor-modal-box").length&&(!this.events.blured&&this.events.isCallback("blur")&&this.core.callback("blur",e),this.events.focused=!1,this.events.blured=!0)},touchImageEditing:function(){var e=-1;this.events.imageEditing=!1,t(window).on("touchmove.redactor."+this.uuid,t.proxy((function(){this.events.imageEditing=!0,-1!==e&&clearTimeout(e),e=setTimeout(t.proxy((function(){this.events.imageEditing=!1}),this),500)}),this))},init:function(){this.core.editor().on("dragover.redactor dragenter.redactor",t.proxy(this.events.dragover,this)),this.core.editor().on("dragleave.redactor",t.proxy(this.events.dragleave,this)),this.core.editor().on("drop.redactor",t.proxy(this.events.drop,this)),this.core.editor().on("click.redactor",t.proxy(this.events.click,this)),this.core.editor().on("paste.redactor",t.proxy(this.paste.init,this)),this.core.editor().on("keydown.redactor",t.proxy(this.keydown.init,this)),this.core.editor().on("keyup.redactor",t.proxy(this.keyup.init,this)),this.core.editor().on("focus.redactor",t.proxy(this.events.focus,this)),t(document).on("mousedown.redactor-blur."+this.uuid,t.proxy(this.events.blur,this)),this.events.touchImageEditing(),this.events.createObserver(),this.events.setupObserver()},createObserver:function(){var e=this;this.events.observer=new MutationObserver((function(i){i.forEach(t.proxy(e.events.iterateObserver,e))}))},iterateObserver:function(t){var e=!1;(("textarea"===this.opts.type||"div"===this.opts.type)&&!this.detect.isFirefox()&&t.target===this.core.editor()[0]||"class"===t.attributeName&&t.target===this.core.editor()[0]||"data-vivaldi-spatnav-clickable"==t.attributeName)&&(e=!0),e||(this.observe.load(),this.events.changeHandler())},setupObserver:function(){this.events.observer.observe(this.core.editor()[0],{attributes:!0,subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0})},changeHandler:function(){this.events.stopChanges||this.code.sync()},onDropUpload:function(t){var e,i,n;if(t.preventDefault(),t.stopPropagation(),(this.opts.dragImageUpload||this.opts.dragFileUpload)&&(null!==this.opts.imageUpload||null!==this.opts.fileUpload))for("IMG"===t.target.tagName&&(this.events.dropImage=t.target),i=(e=t.dataTransfer.files).length,n=0;n<i;n++)this.upload.directUpload(e[n],t)},onDrop:function(t){this.core.callback("drop",t)},isCallback:function(e){return void 0!==this.opts.callbacks[e]&&t.isFunction(this.opts.callbacks[e])},stopDetect:function(){this.events.stopDetectChanges()},startDetect:function(){this.events.startDetectChanges()}}},file:function(){return{is:function(){},show:function(){},insert:function(){},release:function(){},text:function(t){}}},focus:function(){return{start:function(){if(this.core.editor().focus(),"inline"!==this.opts.type){var t=this.focus.first();!1!==t&&this.caret.start(t)}},end:function(){var t,e,i,n;this.core.editor().focus(),0!==(t=this.opts.inline?this.core.editor():this.focus.last()).length&&(e=this.focus.lastChild(t),this.detect.isWebkit()||!1===e?(i=this.selection.get(),null!==(n=this.selection.range(i))?(n.selectNodeContents(t[0]),n.collapse(!1),this.selection.update(i,n)):this.caret.end(t)):this.caret.end(e))},first:function(){var t=this.core.editor().children().first();return(0!==t.length||0!==t[0].length&&"BR"!==t[0].tagName&&"HR"!==t[0].tagName&&3!==t[0].nodeType)&&("UL"===t[0].tagName||"OL"===t[0].tagName?t.find("li").first():t)},last:function(){return this.core.editor().children().last()},lastChild:function(t){var e=t[0].lastChild;return!(null===e||!this.utils.isInlineTag(e.tagName))&&e},is:function(){return this.core.editor()[0]===document.activeElement}}},image:function(){return{is:function(){return!(!this.opts.imageUpload||!this.opts.imageUpload&&!this.opts.s3)},show:function(){this.modal.load("image",this.lang.get("image"),700),this.upload.init("#redactor-modal-image-droparea",this.opts.imageUpload,this.image.insert),this.modal.show()},insert:function(e,i,n){var r,s,o,a,l,c,h,d,u,p,f;return void 0!==e.error?(this.modal.close(),this.events.dropImage=!1,void this.core.callback("imageUploadError",e,n)):!1!==this.events.dropImage?(r=t(this.events.dropImage),this.core.callback("imageDelete",r[0].src,r),r.attr("src",e.url),this.events.dropImage=!1,void this.core.callback("imageUpload",r,e)):(s=t("<"+this.opts.imageTag+">"),(r=t("<img>")).attr("src",e.url),o=void 0===e.id?"":e.id,a=void 0===e.s3?"image":"s3",r.attr("data-"+a,o),s.append(r),l=this.utils.isTag(this.selection.current(),"pre"),i?(this.marker.remove(),c=this.insert.nodeToPoint(n,this.marker.get()),h=t(c).next(),this.selection.restore(),this.buffer.set(),void 0!==h&&0!==h.length&&"IMG"===h[0].tagName?(this.core.callback("imageDelete",h[0].src,h),h.closest("figure, p",this.core.editor()[0]).replaceWith(s),this.caret.after(s)):(l?t(l).after(s):this.insert.node(s),this.caret.after(s))):(this.modal.close(),this.buffer.set(),l?t(l).after(s):this.insert.node(s),this.caret.after(s)),this.events.dropImage=!1,d=r[0].nextSibling,u=s.next(),p=t(d).text().replace(/\u200B/g,""),f=u.text().replace(/\u200B/g,""),""===p&&t(d).remove(),1===u.length&&"FIGURE"===u[0].tagName&&""===f&&u.remove(),void(null!==i?this.core.callback("imageUpload",r,e):this.core.callback("imageInserted",r,e)))},setEditable:function(e){if(e.on("dragstart",(function(t){t.preventDefault()})),this.opts.imageResizable){var i=t.proxy((function(i){this.observe.image=e,this.image.resizer=this.image.loadEditableControls(e),t(document).on("mousedown.redactor-image-resize-hide."+this.uuid,t.proxy(this.image.hideResize,this)),this.image.resizer&&this.image.resizer.on("mousedown.redactor touchstart.redactor",t.proxy((function(t){this.image.setResizable(t,e)}),this))}),this);e.off("mousedown.redactor").on("mousedown.redactor",t.proxy(this.image.hideResize,this)),e.off("click.redactor touchstart.redactor").on("click.redactor touchstart.redactor",i)}else e.off("click.redactor touchstart.redactor").on("click.redactor touchstart.redactor",t.proxy((function(i){setTimeout(t.proxy((function(){this.image.showEdit(e)}),this),200)}),this))},setResizable:function(t,e){t.preventDefault(),this.image.resizeHandle={x:t.pageX,y:t.pageY,el:e,ratio:e.width()/e.height(),h:e.height()},(t=t.originalEvent||t).targetTouches&&(this.image.resizeHandle.x=t.targetTouches[0].pageX,this.image.resizeHandle.y=t.targetTouches[0].pageY),this.image.startResize()},startResize:function(){t(document).on("mousemove.redactor-image-resize touchmove.redactor-image-resize",t.proxy(this.image.moveResize,this)),t(document).on("mouseup.redactor-image-resize touchend.redactor-image-resize",t.proxy(this.image.stopResize,this))},moveResize:function(t){var e,i;t.preventDefault(),t=t.originalEvent||t,e=this.image.resizeHandle.h,t.targetTouches?e+=t.targetTouches[0].pageY-this.image.resizeHandle.y:e+=t.pageY-this.image.resizeHandle.y,i=Math.round(e*this.image.resizeHandle.ratio),e<50||i<100||this.core.editor().width()<=i||(this.image.resizeHandle.el.attr({width:i,height:e}),this.image.resizeHandle.el.width(i),this.image.resizeHandle.el.height(e),this.code.sync())},stopResize:function(){this.handle=!1,t(document).off(".redactor-image-resize"),this.image.hideResize()},hideResize:function(e){var i;e&&0!==t(e.target).closest("#redactor-image-box",this.$editor[0]).length||(e&&"IMG"==e.target.tagName&&t(e.target),0!==(i=this.$editor.find("#redactor-image-box")).length&&(t("#redactor-image-editter").remove(),t("#redactor-image-resizer").remove(),i.find("img").css({marginTop:i[0].style.marginTop,marginBottom:i[0].style.marginBottom,marginLeft:i[0].style.marginLeft,marginRight:i[0].style.marginRight}),i.css("margin",""),i.find("img").css("opacity",""),i.replaceWith((function(){return t(this).contents()})),t(document).off("mousedown.redactor-image-resize-hide."+this.uuid),void 0!==this.image.resizeHandle&&this.image.resizeHandle.el.attr("rel",this.image.resizeHandle.el.attr("style"))))},loadResizableControls:function(e,i){if(this.opts.imageResizable&&!this.detect.isMobile()){var n=t('<span id="redactor-image-resizer" data-redactor="verified"></span>');return this.detect.isDesktop()||n.css({width:"15px",height:"15px"}),n.attr("contenteditable",!1),i.append(n),i.append(e),n}return i.append(e),!1},loadEditableControls:function(e){var i,n;if(0===t("#redactor-image-box").length)return(i=t('<span id="redactor-image-box" data-redactor="verified">')).css("float",e.css("float")).attr("contenteditable",!1),"auto"!=e[0].style.margin?(i.css({marginTop:e[0].style.marginTop,marginBottom:e[0].style.marginBottom,marginLeft:e[0].style.marginLeft,marginRight:e[0].style.marginRight}),e.css("margin","")):i.css({display:"block",margin:"auto"}),e.css("opacity",".5").after(i),this.opts.imageEditable&&(this.image.editter=t('<span id="redactor-image-editter" data-redactor="verified">'+this.lang.get("edit")+"</span>"),this.image.editter.attr("contenteditable",!1),this.image.editter.on("click",t.proxy((function(){this.image.showEdit(e)}),this)),i.append(this.image.editter),n=this.image.editter.innerWidth(),this.image.editter.css("margin-left","-"+n/2+"px")),this.image.loadResizableControls(e,i)},showEdit:function(e){var i,n,r,s,o;this.events.imageEditing||(this.observe.image=e,i=e.closest("a",this.$editor[0]),r=0!==(n=e.closest("figure",this.$editor[0])).length?n:e,this.modal.load("image-edit",this.lang.get("edit"),705),this.image.buttonDelete=this.modal.getDeleteButton().text(this.lang.get("delete")),this.image.buttonSave=this.modal.getActionButton().text(this.lang.get("save")),this.image.buttonDelete.on("click",t.proxy(this.image.remove,this)),this.image.buttonSave.on("click",t.proxy(this.image.update,this)),!1===this.opts.imageCaption?t("#redactor-image-caption").val("").hide().prev().hide():0!==(s=e.closest(this.opts.imageTag,this.$editor[0]).find("figcaption"))&&t("#redactor-image-caption").val(s.text()).show(),this.opts.imagePosition?(o=(0!==n.length?"center"===r.css("text-align"):"block"==r.css("display")&&"none"==r.css("float"))?"center":r.css("float"),t("#redactor-image-align").val(o)):t(".redactor-image-position-option").hide(),t("#redactor-image-preview").html(t('<img src="'+e.attr("src")+'" style="max-width: 100%;">')),t("#redactor-image-title").val(e.attr("alt")),0!==i.length&&(t("#redactor-image-link").val(i.attr("href")),"_blank"===i.attr("target")&&t("#redactor-image-link-blank").prop("checked",!0)),t(".redactor-link-tooltip").remove(),this.modal.show(),this.detect.isDesktop()&&t("#redactor-image-title").focus())},update:function(){var e,i,n,r,s,o,a=this.observe.image,l=a.closest("a",this.core.editor()[0]),c=t("#redactor-image-title").val().replace(/(<([^>]+)>)/gi,"");a.attr("alt",c).attr("title",c),this.image.setFloating(a),""!==(e=t.trim(t("#redactor-image-link").val()).replace(/(<([^>]+)>)/gi,""))?(i="((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}",n=new RegExp("^(http|ftp|https)://"+i,"i"),r=new RegExp("^"+i,"i"),-1===e.search(n)&&0===e.search(r)&&this.opts.linkProtocol&&(e=this.opts.linkProtocol+"://"+e),s=!!t("#redactor-image-link-blank").prop("checked"),0===l.length?(o=t('<a href="'+e+'" id="redactor-img-tmp">'+this.utils.getOuterHtml(a)+"</a>"),s&&o.attr("target","_blank"),a=a.replaceWith(o),(l=this.core.editor().find("#redactor-img-tmp")).removeAttr("id")):(l.attr("href",e),s?l.attr("target","_blank"):l.removeAttr("target"))):0!==l.length&&l.replaceWith(this.utils.getOuterHtml(a)),this.image.addCaption(a,l),this.modal.close(),this.buffer.set()},setFloating:function(e){var i=e.closest("figure",this.$editor[0]),n=0!==i.length?i:e,r=t("#redactor-image-align").val(),s="",o="",a="",l="";switch(r){case"left":s="left",a="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0";break;case"right":s="right",a="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin;break;case"center":0!==i.length?l="center":(o="block",a="auto")}n.css({float:s,display:o,margin:a,"text-align":l}),n.attr("rel",e.attr("style"))},addCaption:function(e,i){var n=t("#redactor-image-caption").val(),r=0!==i.length?i:e,s=r.next();0!==s.length&&"FIGCAPTION"===s[0].tagName||(s=!1),""!==n?!1===s?(s=t("<figcaption />").text(n),r.after(s)):s.text(n):!1!==s&&s.remove()},remove:function(e,i,n){var r,s,o,a;if(i=void 0===i?t(this.observe.image):i,"boolean"!=typeof e&&this.buffer.set(),this.events.stopDetectChanges(),r=i.closest("a",this.core.editor()[0]),s=i.closest(this.opts.imageTag,this.core.editor()[0]),i.parent(),!1===this.core.callback("imageDelete",e,i[0]))return e&&e.preventDefault(),!1;0!==t("#redactor-image-box").length&&t("#redactor-image-box").parent(),0!==s.length?(a=s.prev(),o=s.next(),s.remove()):0!==r.length?(r.parent(),r.remove()):i.remove(),t("#redactor-image-box").remove(),!1!==e&&(o&&0!==o.length?this.caret.start(o):a&&0!==a.length&&this.caret.end(a)),"boolean"!=typeof e&&this.modal.close(),this.utils.restoreScroll(),this.observe.image=!1,this.events.startDetectChanges(),this.code.sync()}}},indent:function(){return{increase:function(){var e,i,n,r,s,o;this.list.get()&&(i=(e=t(this.selection.current()).closest("li")).closest("ul, ol",this.core.editor()[0]),0!==(n=e.closest("li").prev()).length&&"LI"===n[0].tagName&&(this.buffer.set(),this.utils.isCollapsed()?(r=i[0].tagName,s=t("<"+r+" />"),this.selection.save(),1===(o=n.find("ol").first()).length?o.append(e):(r=i[0].tagName,(s=t("<"+r+" />")).append(e),n.append(s)),this.selection.restore()):(document.execCommand("indent"),this.selection.save(),this.indent.removeEmpty(),this.indent.normalize(),this.selection.restore())))},decrease:function(){var e,i,n,r,s;if(this.list.get()){if(t(this.selection.current()).closest("li").closest("ul, ol",this.core.editor()[0]),this.buffer.set(),document.execCommand("outdent"),e=t(this.selection.current()).closest("li",this.core.editor()[0]),this.utils.isCollapsed()&&this.indent.repositionItem(e),i=null,0===e.length){if((n=this.selection.block())&&-1!==n.nodeName.indexOf("-")){for(this.selection.save(),i=elCreate("div");n.childNodes.length;)i.appendChild(n.childNodes[0]);n.appendChild(i),this.selection.restore()}document.execCommand("formatblock",!1,"p"),0!==(r=(e=t(this.selection.current())).next()).length&&"BR"===r[0].tagName&&r.remove()}if(this.selection.save(),null!==i){for(s=i.parentNode;i.childNodes.length;)s.insertBefore(i.childNodes[0],i);s.removeChild(i)}this.indent.removeEmpty(),this.indent.normalize(),this.selection.restore()}},repositionItem:function(t){var e,i=t.next();0===i.length||"UL"===i[0].tagName&&"OL"===i[0].tagName||t.append(i),0!==(e=t.prev()).length&&"LI"!==e[0].tagName&&(this.selection.save(),t.parents("li",this.core.editor()[0]).after(t),this.selection.restore())},normalize:function(){this.core.editor().find("li").each(t.proxy((function(e,i){var n,r,s=t(i),o="";0!==this.opts.keepStyleAttr.length&&(o=","+this.opts.keepStyleAttr.join(",")),s.find(this.opts.inlineTags.join(",")).not("img"+o).removeAttr("style"),0===(n=s.parent()).length||"LI"!==n[0].tagName?0===(r=s.next()).length||"UL"!==r[0].tagName&&"OL"!==r[0].tagName||s.append(r):n.after(s)}),this))},removeEmpty:function(e){var i=this.core.editor().find("ul, ol"),n=this.core.editor().find("li");n.each(t.proxy((function(t,e){this.indent.removeItemEmpty(e)}),this)),i.each(t.proxy((function(t,e){this.indent.removeItemEmpty(e)}),this)),n.each(t.proxy((function(t,e){this.indent.removeItemEmpty(e)}),this))},removeItemEmpty:function(e){var i=e.innerHTML.replace(/[\t\s\n]/g,"");""===(i=i.replace(/<span><\/span>/g,""))&&t(e).remove()}}},inline:function(){return{format:function(t,e,i,n){if(!this.utils.isCurrentOrParent(["PRE","CODE"])){var r=this.inline.getParams(e,i,n);t=this.inline.arrangeTag(t),this.buffer.set(),this.utils.isCollapsed()?this.inline.formatCollapsed(t,r):this.inline.formatUncollapsed(t,r)}},formatCollapsed:function(e,i){var n,r,s,o=this.selection.inline();o?(r=o.tagName.toLowerCase())===e?this.utils.isEmpty(o.innerHTML)?(this.caret.after(o),t(o).remove()):(s=this.inline.insertBreakpoint(o,r),this.caret.after(s)):0===t(o).closest(e).length?(n=this.inline.insertInline(e),n=this.inline.setParams(n,i)):(s=this.inline.insertBreakpoint(o,r),this.caret.after(s)):(n=this.inline.insertInline(e),n=this.inline.setParams(n,i))},formatUncollapsed:function(e,i){var n,r,s,o,a,l,c,h,d,u,p,f,g,m;if(this.selection.save(),null===(r=window.getSelection().getRangeAt(0)).cloneContents().querySelector(e)&&((n=r.startContainer).nodeType===Node.TEXT_NODE&&(n=n.parentElement),null!==(s=n.closest(e))&&this.core.editor()[0].contains(s))){for(o=document.createElement(e),s.insertAdjacentElement("beforebegin",o),(a=document.createRange()).selectNodeContents(s),a.setEnd(r.startContainer,r.startOffset),o.appendChild(a.extractContents()),l=document.createElement(e),s.insertAdjacentElement("afterend",l),(c=document.createRange()).selectNodeContents(s),c.setStart(r.endContainer,r.endOffset),l.appendChild(c.extractContents()),h=s.parentElement;s.childNodes.length;)h.insertBefore(s.childNodes[0],s);s.remove()}else{for(d=this.inline.getClearedNodes(),this.inline.setNodesStriked(d,e,i),this.selection.restore(),document.execCommand("strikethrough"),this.selection.saveInstant(),f=0,g=(u=this.core.editor()[0].querySelectorAll('[style*="line-through"]')).length;f<g;f++)n=u[0],p=document.createElement("strike"),n.parentNode.insertBefore(p,n),p.appendChild(n),n.style.removeProperty("text-decoration");m=this,this.core.editor().find("strike").each((function(){var n,r,s,o=m.utils.replaceToTag(this,e);if(m.inline.setParams(o[0],i),n=o.find(e),0!==(s=(r=o.parent()).parent()).length&&s[0].tagName.toLowerCase()===e&&s.html()==r[0].outerHTML)return o.replaceWith((function(){return t(this).contents()})),void s.replaceWith((function(){return t(this).contents()}));0!==n.length&&m.inline.cleanInsideOrParent(n,i),r.html()==o[0].outerHTML&&m.inline.cleanInsideOrParent(r,i),m.detect.isFirefox()&&m.core.editor().find(e+":empty").remove()})),this.selection.restoreInstant()}},cleanInsideOrParent:function(t,e){if(e)for(var i in e.data)this.inline.removeSpecificAttr(t,i,e.data[i])},getClearedNodes:function(){var e,i=this.selection.nodes(),n=[],r=i.length,s=0;for(e=0;e<r;e++)if(t(i[e]).hasClass("redactor-selection-marker")){s=e+2;break}for(e=0;e<r;e++)e>=s&&!this.utils.isBlockTag(i[e].tagName)&&n.push(i[e]);return n},isConvertableAttr:function(e,i,n){var r,s,o,a,l,c,h,d=t(e).attr(i);if(d)if("style"===i){for(r=(n=t.trim(n).replace(/;$/,"")).split(";"),s=0,o=0;o<r.length;o++)a=r[o].split(":"),l=t.trim(a[0]),c=t.trim(a[1]),-1!==l.search(/color/)?!(h=t(e).css(l))||h!==c&&this.utils.rgb2hex(h)!==c||s++:t(e).css(l)===c&&s++;if(s===r.length)return 1}else if(d===n)return 1;return 0},isConvertable:function(t,e,i,n){var r,s;if(e===i){if(!n)return!0;for(s in r=0,n.data)r+=this.inline.isConvertableAttr(t,s,n.data[s]);if(r===Object.keys(n.data).length)return!0}return!1},setNodesStriked:function(e,i,n){var r,s,o,a;for(r=0;r<e.length;r++)s=e[r].tagName?e[r].tagName.toLowerCase():void 0,a=(o=e[r].parentNode)&&o.tagName?o.tagName.toLowerCase():void 0,this.inline.isConvertable(o,a,i,n)&&t(o).replaceWith((function(){return t("<strike>").append(t(this).contents())})).attr("data-redactor-inline-converted"),this.inline.isConvertable(e[r],s,i,n)&&t(e[r]).replaceWith((function(){return t("<strike>").append(t(this).contents())}))},insertBreakpoint:function(e,i){var n,r,s,o=document.createElement("span");return o.id="redactor-inline-breakpoint",o=this.insert.node(o),r=this.utils.isEndOfElement(e)?"":"<"+i+">",n=(n=this.utils.getOuterHtml(e)).replace(/<span id="redactor-inline-breakpoint"><\/span>/i,"</"+i+">"+r),s=t(n),t(e).replaceWith(s),""!==r&&this.utils.cloneAttributes(e,s.last()),s.first()},insertInline:function(t){var e=document.createElement(t);return this.insert.node(e),this.caret.start(e),e},arrangeTag:function(t){var e,i=["b","bold","i","italic","underline","strikethrough","deleted","superscript","subscript"],n=["strong","strong","em","em","u","del","del","sup","sub"];for(t=t.toLowerCase(),e=0;e<i.length;e++)t===i[e]&&(t=n[e]);return t},getStyleParams:function(t){var e,i,n={},r=t.trim().replace(/;$/,"").split(";");for(e=0;e<r.length;e++)(i=r[e].split(":"))&&(n[i[0].trim()]=i[1].trim());return n},getParams:function(t,e,i){var n=!1,r="toggle";return"object"==typeof t?(n=t,r=void 0!==e?e:r):void 0!==t&&void 0!==e&&((n={})[t]=e,r=void 0!==i?i:r),!!n&&{func:r,data:n}},setParams:function(e,i){var n,r;if(i)for(n in i.data)r=t(e),"style"===n?(e=this.inline[i.func+"Style"](i.data[n],e),r.attr("data-redactor-style-cache",r.attr("style"))):e="class"===n?this.inline[i.func+"Class"](i.data[n],e):"remove"===i.func?this.inline[i.func+"Attr"](n,e):this.inline[i.func+"Attr"](n,i.data[n],e),"style"===n&&"SPAN"===e.tagName&&r.attr("data-redactor-span",!0);return e},eachInline:function(t,e){var i,n,r=void 0===t?this.selection.inlines():[t];if(r)for(n=0;n<r.length;n++)i=e(r[n])[0];return i},replaceClass:function(e,i){return this.inline.eachInline(i,(function(i){return t(i).removeAttr("class").addClass(e)}))},toggleClass:function(e,i){return this.inline.eachInline(i,(function(i){return t(i).toggleClass(e)}))},addClass:function(e,i){return this.inline.eachInline(i,(function(i){return t(i).addClass(e)}))},removeClass:function(e,i){return this.inline.eachInline(i,(function(i){return t(i).removeClass(e)}))},removeAllClass:function(e){return this.inline.eachInline(e,(function(e){return t(e).removeAttr("class")}))},replaceAttr:function(e,i,n){return this.inline.eachInline(n,(function(i){return t(i).removeAttr(e).attr(e.value)}))},toggleAttr:function(e,i,n){return this.inline.eachInline(n,(function(i){return t(i).attr(e)?t(i).removeAttr(e):t(i).attr(e.value)}))},addAttr:function(e,i,n){return this.inline.eachInline(n,(function(n){return t(n).attr(e,i)}))},removeAttr:function(e,i){return this.inline.eachInline(i,(function(i){var n=t(i);return n.removeAttr(e),"style"===e&&n.removeAttr("data-redactor-style-cache"),n}))},removeAllAttr:function(e){return this.inline.eachInline(e,(function(e){var i,n=t(e),r=e.attributes.length;for(i=0;i<r;i++)n.removeAttr(e.attributes[i].name);return n}))},removeSpecificAttr:function(e,i,n){var r,s=t(e);"style"===i?(r=n.split(":")[0].trim(),s.css(r,""),this.utils.removeEmptyAttr(e,"style")&&s.removeAttr("data-redactor-style-cache")):s.removeAttr(i)[0]},hasParentStyle:function(t){var e=t.parent();return 1===e.length&&e[0].tagName===t[0].tagName&&e.html()===t[0].outerHTML&&e},addParentStyle:function(e){var i,n=this.inline.hasParentStyle(e);return n?(i=this.inline.getStyleParams(e.attr("style")),n.css(i),n.attr("data-redactor-style-cache",n.attr("style")),e.replaceWith((function(){return t(this).contents()}))):e.attr("data-redactor-style-cache",e.attr("style")),e},replaceStyle:function(e,i){e=this.inline.getStyleParams(e);var n=this;return this.inline.eachInline(i,(function(i){var r,s=t(i);return s.removeAttr("style").css(e),(r=s.attr("style"))&&s.attr("style",r.replace(/"/g,"'")),s=n.inline.addParentStyle(s)}))},toggleStyle:function(e,i){e=this.inline.getStyleParams(e);var n=this;return this.inline.eachInline(i,(function(i){var r,s,o,a,l=t(i);for(r in e)s=e[r],o=l.css(r),(o=n.utils.isRgb(o)?n.utils.rgb2hex(o):o.replace(/"/g,""))===(s=n.utils.isRgb(s)?n.utils.rgb2hex(s):s.replace(/"/g,""))?l.css(r,""):l.css(r,s);return(a=l.attr("style"))&&l.attr("style",a.replace(/"/g,"'")),n.utils.removeEmptyAttr(i,"style")?l.removeAttr("data-redactor-style-cache"):l=n.inline.addParentStyle(l),l}))},addStyle:function(e,i){e=this.inline.getStyleParams(e);var n=this;return this.inline.eachInline(i,(function(i){var r,s=t(i);return s.css(e),(r=s.attr("style"))&&s.attr("style",r.replace(/"/g,"'")),s=n.inline.addParentStyle(s)}))},removeStyle:function(e,i){e=this.inline.getStyleParams(e);var n=this;return this.inline.eachInline(i,(function(i){var r,s=t(i);for(r in e)s.css(r,"");return n.utils.removeEmptyAttr(i,"style")?s.removeAttr("data-redactor-style-cache"):s.attr("data-redactor-style-cache",s.attr("style")),s}))},removeAllStyle:function(e){return this.inline.eachInline(e,(function(e){return t(e).removeAttr("style").removeAttr("data-redactor-style-cache")}))},removeStyleRule:function(e){var i,n,r,s=this.selection.parent(),o=this.selection.inlines();for(this.buffer.set(),s&&"SPAN"===s.tagName&&this.inline.removeStyleRuleAttr(t(s),e),i=0;i<o.length;i++)n=o[i],r=t(n),-1==t.inArray(n.tagName.toLowerCase(),this.opts.inlineTags)||r.hasClass("redactor-selection-marker")||this.inline.removeStyleRuleAttr(r,e)},removeStyleRuleAttr:function(t,e){t.css(e,""),this.utils.removeEmptyAttr(t,"style")?t.removeAttr("data-redactor-style-cache"):t.attr("data-redactor-style-cache",t.attr("style"))},update:function(t,e,i,n){var r,s,o,a,l;if(t=this.inline.arrangeTag(t),r=this.inline.getParams(e,i,n),o=[],s=this.selection.inlines())for(a=0;a<s.length;a++)l=s[a],"*"!==t&&l.tagName.toLowerCase()!==t||o.push(this.inline.setParams(l,r));return o},removeFormat:function(){var e,i;for(this.selection.save(),e=this.inline.getClearedNodes(),i=0;i<e.length;i++)1===e[i].nodeType&&t(e[i]).replaceWith((function(){return t(this).contents()}));this.selection.restore()}}},insert:function(){return{set:function(t){this.code.set(t),this.focus.end()},html:function(e,i){var n,r,s,o,a,l,c,h,d;this.core.editor().focus(),n=this.selection.block(),r=this.selection.inline(),void 0===i&&(i=this.clean.getCurrentType(e,!0),e=this.clean.onPaste(e,i,!0)),e=t.parseHTML(e),s=t(e).last(),o=this.selection.get(),(a=this.selection.range(o)).deleteContents(),this.selection.update(o,a),!i.lists||0===(l=t(e)).length||"UL"!==l[0].tagName&&"OL"!==l[0].tagName?(i.blocks&&n?this.utils.isSelectAll()?(this.core.editor().html(e),this.focus.end()):!1===(c=this.utils.breakBlockTag())?this.insert.placeHtml(e):(t(e).children().last().append(this.marker.get()),"start"===c.type?c.$block.before(e):c.$block.after(e),this.selection.restore(),this.core.editor().find("p").each((function(){""===t.trim(this.innerHTML)&&t(this).remove()}))):(r&&((h=t("<div/>").html(e)).find(r.tagName.toLowerCase()).each((function(){t(this).contents().unwrap()})),e=h.html(),e=t.parseHTML(e),s=t(e).last()),this.utils.isSelectAll()?(d=t(this.opts.emptyHtml),this.core.editor().html("").append(d),d.html(e),this.caret.end(d)):this.insert.placeHtml(e)),this.utils.disableSelectAll(),i.pre&&this.clean.cleanPre(),this.caret.end(s)):this.insert.appendLists(n,l)},text:function(e){var i,n,r,s,o,a;e=e.toString(),e=t.trim(e),(i=document.createElement("div")).innerHTML=e,void 0!==(e=i.textContent||i.innerText)&&(this.core.editor().focus(),n=this.selection.blocks(),e=e.replace(/\n/g," "),this.utils.isSelectAll()?(r=t(this.opts.emptyHtml),this.core.editor().html("").append(r),r.html(e),this.caret.end(r)):(s=this.selection.get(),o=document.createTextNode(e),s.getRangeAt&&s.rangeCount&&((a=s.getRangeAt(0)).deleteContents(),a.insertNode(o),a.setStartAfter(o),a.collapse(!0),this.selection.update(s,a)),n.length>1&&(t(o).wrap("<p>"),this.caret.after(o))),this.utils.disableSelectAll(),this.clean.normalizeCurrentHeading())},raw:function(t){var e,i,n,r,s,o;for(this.core.editor().focus(),e=this.selection.get(),(i=this.selection.range(e)).deleteContents(),(n=document.createElement("div")).innerHTML=t,r=document.createDocumentFragment();s=n.firstChild;)o=r.appendChild(s);i.insertNode(r),o&&((i=i.cloneRange()).setStartAfter(o),i.collapse(!0),e.removeAllRanges(),e.addRange(i))},node:function(e,i){var n,r,s,o;return void 0!==this.start&&this.core.editor().focus(),e=e[0]||e,n=this.selection.block(),r=this.utils.isBlockTag(e.tagName),s=!0,this.utils.isSelectAll()?(r?this.core.editor().html(e):this.core.editor().html(t("<p>").html(e)),this.code.sync()):r&&n?!1===(o=this.utils.breakBlockTag())?this.insert.placeNode(e,i):("start"===o.type?o.$block.before(e):o.$block.after(e),this.core.editor().find("p:empty").remove()):s=this.insert.placeNode(e,i),this.utils.disableSelectAll(),s&&this.caret.end(e),e},appendLists:function(e,i){var n,r,s=t(e),o=this.utils.isEmpty(e.innerHTML);o||this.utils.isEndOfElement(e)?(n=s,i.find("li").each((function(){n.after(this),n=t(this)})),o&&s.remove()):this.utils.isStartOfElement(e)?i.find("li").each((function(){s.before(this),n=t(this)})):(r=this.selection.extractEndOfNode(e),s.after(t("<li>").append(r)),s.append(i),n=i),this.marker.remove(),n&&this.caret.end(n)},placeHtml:function(e){var i=document.createElement("span");i.id="redactor-insert-marker",i=this.insert.node(i),t(i).before(e),this.selection.restore(),this.caret.after(i),t(i).remove()},placeNode:function(t,e){var i=this.selection.get(),n=this.selection.range(i);if(null==n)return!1;!1!==e&&n.deleteContents(),n.insertNode(t),n.collapse(!1),this.selection.update(i,n)},nodeToPoint:function(e,i){var n,r,s,o,a;return i=i[0]||i,this.utils.isEmpty()?(i=this.utils.isBlock(i)?i:t("<p />").append(i),this.core.editor().html(i),i):(r=e.clientX,s=e.clientY,document.caretPositionFromPoint?(o=document.caretPositionFromPoint(r,s),(n=document.getSelection().getRangeAt(0)).setStart(o.offsetNode,o.offset),n.collapse(!0),n.insertNode(i)):document.caretRangeFromPoint?(n=document.caretRangeFromPoint(r,s)).insertNode(i):void 0!==document.body.createTextRange&&((n=document.body.createTextRange()).moveToPoint(r,s),(a=n.duplicate()).moveToPoint(r,s),n.setEndPoint("EndToEnd",a),n.select()),i)},nodeToCaretPositionFromPoint:function(t,e){this.insert.nodeToPoint(t,e)},marker:function(){this.marker.insert()}}},keydown:function(){return{init:function(e){var i,r,s,o,a,l,c,h,d;if(!this.rtePaste){if(r=(i=e.which)>=37&&i<=40,this.keydown.ctrl=e.ctrlKey||e.metaKey,this.keydown.parent=this.selection.parent(),this.keydown.current=this.selection.current(),this.keydown.block=this.selection.block(),this.keydown.pre=this.utils.isTag(this.keydown.current,"pre"),this.keydown.blockquote=this.utils.isTag(this.keydown.current,"blockquote"),this.keydown.figcaption=this.utils.isTag(this.keydown.current,"figcaption"),this.keydown.figure=this.utils.isTag(this.keydown.current,"figure"),!1===this.core.callback("keydown",e))return e.preventDefault(),!1;if(this.shortcuts.init(e,i),this.keydown.checkEvents(r,i),this.keydown.setupBuffer(e,i),this.utils.isSelectAll()&&(i===this.keyCode.ENTER||i===this.keyCode.BACKSPACE||i===this.keyCode.DELETE))return e.preventDefault(),this.code.set(this.opts.emptyHtml),void this.events.changeHandler();if(this.keydown.addArrowsEvent(r),this.keydown.setupSelectAll(e,i),!this.opts.enterKey&&i===this.keyCode.ENTER)return e.preventDefault(),s=this.selection.get(),void((o=this.selection.range(s)).collapsed||o.deleteContents());if(this.opts.enterKey&&i===this.keyCode.DOWN&&this.keydown.onArrowDown(),this.opts.enterKey&&i===this.keyCode.UP&&this.keydown.onArrowUp(),("textarea"===this.opts.type||"div"===this.opts.type)&&this.keydown.current&&3===this.keydown.current.nodeType&&t(this.keydown.parent).hasClass("redactor-in")&&this.keydown.wrapToParagraph(),!this.keyup.lastShiftKey&&i===this.keyCode.SPACE&&(e.ctrlKey||e.shiftKey))return e.preventDefault(),this.keydown.onShiftSpace();if(i===this.keyCode.ENTER&&(e.ctrlKey||e.shiftKey)&&(null===n||"ios"!==n.platform()))return e.preventDefault(),this.keydown.onShiftEnter(e);if(i===this.keyCode.ENTER&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey)return this.keydown.onEnter(e);if(i===this.keyCode.TAB||e.metaKey&&221===i||e.metaKey&&219===i)return this.keydown.onTab(e,i);if(this.detect.isFirefox()&&i===this.keyCode.BACKSPACE&&this.keydown.block&&"P"===this.keydown.block.tagName&&this.utils.isStartOfElement(this.keydown.block)&&0!==(a=t(this.keydown.block).prev()).length)return e.preventDefault(),a.append(this.marker.get()),a.append(t(this.keydown.block).html()),t(this.keydown.block).remove(),void this.selection.restore();if(i===this.keyCode.BACKSPACE||i===this.keyCode.DELETE){if(this.observe.image&&void 0!==this.observe.image&&0!==t("#redactor-image-box").length)return e.preventDefault(),a=this.observe.image.closest("figure, p").prev(),this.image.remove(!1),this.observe.image=!1,void(a&&0!==a.length?this.caret.end(a):this.core.editor().focus());this.keydown.onBackspaceAndDeleteBefore()}if(i===this.keyCode.DELETE){if(l=t(this.keydown.block).next(),this.utils.isEndOfElement(this.keydown.block)&&0!==l.length&&"FIGURE"===l[0].tagName)return l.remove(),!1;if(!(!this.keydown.block||"LI"!==this.keydown.block.tagName)&&this.keydown.block&&(h=(c=t(this.keydown.block).parents("ul, ol").last()).next(),this.utils.isRedactorParent(c)&&this.utils.isEndOfElement(c)&&0!==h.length&&("UL"===h[0].tagName||"OL"===h[0].tagName)))return e.preventDefault(),c.append(h.contents()),h.remove(),!1;if(this.utils.isEndOfElement(this.keydown.block)&&0!==l.length&&"PRE"===l[0].tagName)return t(this.keydown.block).append(l.text()),l.remove(),!1}if(i===this.keyCode.DELETE&&0!==t("#redactor-image-box").length&&this.image.remove(),i===this.keyCode.BACKSPACE){if(this.detect.isFirefox()&&this.line.removeOnBackspace(e),this.list.combineAfterAndBefore(this.keydown.block))return void e.preventDefault();if((d=this.selection.block())&&"LI"===d.tagName&&this.utils.isCollapsed()&&this.utils.isStartOfElement())return this.indent.decrease(),void e.preventDefault();this.keydown.removeInvisibleSpace(),this.keydown.removeEmptyListInTable(e)}i!==this.keyCode.BACKSPACE&&i!==this.keyCode.DELETE||this.keydown.onBackspaceAndDeleteAfter(e)}},onShiftSpace:function(){return this.buffer.set(),this.insert.raw(" "),!1},onShiftEnter:function(t){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(t):this.insert.raw("<br>")},onBackspaceAndDeleteBefore:function(){this.utils.saveScroll()},onBackspaceAndDeleteAfter:function(e){setTimeout(t.proxy((function(){var t;this.code.syncFire=!1,this.keydown.removeEmptyLists(),t="",0!==this.opts.keepStyleAttr.length&&(t=","+this.opts.keepStyleAttr.join(",")),this.core.editor().find("*[style]").not("img, figure, iframe, #redactor-image-box, #redactor-image-editter, [data-redactor-style-cache], [data-redactor-span]"+t).removeAttr("style"),this.keydown.formatEmpty(e),this.code.syncFire=!0}),this),1)},onEnter:function(e){var i,n,r,s,o=this.core.callback("enter",e);if(!1===o)return e.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(e))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(e);if(this.keydown.figure)setTimeout(t.proxy((function(){this.keydown.replaceToParagraph("FIGURE")}),this),1);else if(this.keydown.block){if(setTimeout(t.proxy((function(){this.keydown.replaceToParagraph("DIV")}),this),1),"LI"===this.keydown.block.tagName&&(i=this.selection.current(),r=(n=t(i).closest("li",this.$editor[0])).parents("ul,ol",this.$editor[0]).last(),0!==n.length&&this.utils.isEmpty(n.html())&&0===r.next().length&&this.utils.isEmpty(r.find("li").last().html())))return r.find("li").last().remove(),s=t(this.opts.emptyHtml),r.after(s),this.caret.start(s),!1}else if(!this.keydown.block)return this.keydown.insertParagraph(e);this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?this.keydown.insertBreakLine(e):this.opts.keepInlineOnEnter||setTimeout(t.proxy((function(){var e,i,n,r,s=this.selection.inline();s&&this.utils.isEmpty(s.innerHTML)&&(e=this.selection.block(),t(s).remove(),(i=document.createRange()).setStart(e,0),n=document.createTextNode(""),i.insertNode(n),i.setStartAfter(n),i.collapse(!0),(r=window.getSelection()).removeAllRanges(),r.addRange(i))}),this),1)},checkEvents:function(t,e){t||"click"!==this.core.getEvent()&&"arrow"!==this.core.getEvent()||(this.core.addEvent(!1),this.keydown.checkKeyEvents(e)&&this.buffer.set())},checkKeyEvents:function(e){var i=this.keyCode,n=[i.BACKSPACE,i.DELETE,i.ENTER,i.ESC,i.TAB,i.CTRL,i.META,i.ALT,i.SHIFT];return-1===t.inArray(e,n)},addArrowsEvent:function(t){t&&("click"!==this.core.getEvent()&&"arrow"!==this.core.getEvent()?this.core.addEvent("arrow"):this.core.addEvent(!1))},setupBuffer:function(t,e){return this.keydown.ctrl&&90===e&&!t.shiftKey&&!t.altKey&&this.sBuffer.length?(t.preventDefault(),void this.buffer.undo()):this.keydown.ctrl&&90===e&&t.shiftKey&&!t.altKey&&0!==this.sRebuffer.length?(t.preventDefault(),void this.buffer.redo()):void(this.keydown.ctrl||e!==this.keyCode.SPACE&&e!==this.keyCode.BACKSPACE&&e!==this.keyCode.DELETE&&(e!==this.keyCode.ENTER||t.ctrlKey||t.shiftKey)||this.buffer.set())},exitFromBlockquote:function(e){var i;if(this.utils.isEndOfElement(this.keydown.blockquote))return-1!==this.clean.removeSpacesHard(t(this.keydown.blockquote).html()).search(/(<br\s?\/?>){1}$/i)?(e.preventDefault(),t(this.keydown.blockquote).children().last().filter("br").remove(),t(this.keydown.blockquote).children().last().filter("span").remove(),i=t(this.opts.emptyHtml),t(this.keydown.blockquote).after(i),this.caret.start(i),!0):void 0},onArrowDown:function(){var t,e=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption];for(t=0;t<e.length;t++)if(e[t])return this.keydown.insertAfterLastElement(e[t]),!1},onArrowUp:function(){var t,e=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption];for(t=0;t<e.length;t++)if(e[t])return this.keydown.insertBeforeFirstElement(e[t]),!1},insertAfterLastElement:function(e){var i,n;this.utils.isEndOfElement(e)&&(i=this.core.editor().contents().last(),0===("FIGCAPTION"===e.tagName?t(this.keydown.block).parent().next():t(this.keydown.block).next()).length&&(0!==i.length||i[0]===e?(n=t(this.opts.emptyHtml),"FIGCAPTION"===e.tagName?t(e).parent().after(n):t(e).after(n),this.caret.start(n)):this.caret.start(i)))},insertBeforeFirstElement:function(e){if(this.utils.isStartOfElement()&&!(this.core.editor().contents().length>1&&this.core.editor().contents().first()[0]!==e)){var i=t(this.opts.emptyHtml);t(e).before(i),this.caret.start(i)}},onTab:function(t,e){var i,n,r;return!this.opts.tabKey||(i=this.keydown.block&&"LI"===this.keydown.block.tagName,!(!this.utils.isEmpty(this.code.get())&&(i||this.keydown.pre||!1!==this.opts.tabAsSpaces))||(t.preventDefault(),this.buffer.set(),n=i&&this.utils.isStartOfElement(this.keydown.block),this.keydown.pre&&!t.shiftKey?(r=this.opts.preSpaces?document.createTextNode(Array(this.opts.preSpaces+1).join(" ")):document.createTextNode("\t"),this.insert.node(r)):!1===this.opts.tabAsSpaces||n?t.metaKey&&219===e?this.indent.decrease():t.metaKey&&221===e?this.indent.increase():t.shiftKey?this.indent.decrease():this.indent.increase():(r=document.createTextNode(Array(this.opts.tabAsSpaces+1).join(" ")),this.insert.node(r)),!1))},setupSelectAll:function(t,e){this.keydown.ctrl&&65===e?this.utils.enableSelectAll():e===this.keyCode.LEFT_WIN||this.keydown.ctrl||this.utils.disableSelectAll()},insertNewLine:function(t){var e,i,n;return t.preventDefault(),e=document.createTextNode("\n"),i=this.selection.get(),(n=this.selection.range(i)).deleteContents(),n.insertNode(e),this.caret.after(e),!1},insertParagraph:function(t){var e,i,n;return t.preventDefault(),(e=document.createElement("p")).innerHTML="<br>",i=this.selection.get(),(n=this.selection.range(i)).deleteContents(),n.insertNode(e),this.caret.start(e),!1},insertBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t)},insertDblBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t,!0)},insertBreakLineProcessing:function(t,e){var i,n;return t.stopPropagation(),i=document.createElement("br"),this.insert.node(i),!0===e?(n=document.createElement("br"),this.insert.node(n),this.caret.after(n)):this.caret.after(i),!1},wrapToParagraph:function(){var e,i=t(this.keydown.current),n=t("<p>").append(i.clone());i.replaceWith(n),void 0!==(e=t(n).next())[0]&&"BR"===e[0].tagName&&e.remove(),this.caret.end(n)},replaceToParagraph:function(e){var i,n=this.selection.block(),r=t(n).prev(),s=n.innerHTML.replace(/<br\s?\/?>/gi,"");return n.tagName===e&&this.utils.isEmpty(s)&&!t(n).hasClass("redactor-in")?(i=document.createElement("p"),t(n).replaceWith(i),this.keydown.setCaretToParagraph(i),!1):"P"===n.tagName?(t(n).removeAttr("class").removeAttr("style"),this.detect.isIe()&&this.utils.isEmpty(s)&&this.utils.isInline(this.keydown.parent)&&t(n).on("input",t.proxy((function(){var e,i=this.selection.parent();this.utils.isInline(i)&&(e=t(i).html(),t(n).html(e),this.caret.end(n)),t(n).off("keyup")}),this)),!1):r.hasClass(this.opts.videoContainerClass)?(r.removeAttr("class"),i=document.createElement("p"),r.replaceWith(i),this.keydown.setCaretToParagraph(i),!1):void 0},setCaretToParagraph:function(t){var e,i,n=document.createRange();n.setStart(t,0),e=document.createTextNode(""),n.insertNode(e),n.setStartAfter(e),n.collapse(!0),(i=window.getSelection()).removeAllRanges(),i.addRange(n)},removeInvisibleSpace:function(){var e=t(this.keydown.current);0===e.text().search(/^\u200B$/g)&&e.remove()},removeEmptyListInTable:function(e){var i=t(this.keydown.current),n=t(this.keydown.parent),r=i.closest("td",this.$editor[0]);if(0!==r.length&&i.closest("li",this.$editor[0])&&1===n.children("li").length){if(!this.utils.isEmpty(i.text()))return;e.preventDefault(),i.remove(),n.remove(),this.caret.start(r)}},removeEmptyLists:function(){var e=function(){""===t.trim(this.innerHTML).replace(/\/t\/n/g,"")&&t(this).remove()};this.core.editor().find("li").each(e),this.core.editor().find("ul, ol").each(e)},formatEmpty:function(e){var i,r=t.trim(this.core.editor().html());if(this.utils.isEmpty(r))return e.preventDefault(),"inline"===this.opts.type||"pre"===this.opts.type?(this.core.editor().html(this.marker.html()),this.selection.restore()):(i=function(){this.core.editor().html(this.opts.emptyHtml),this.focus.start()}.bind(this),null!==n&&"ios"===n.platform()?setTimeout(i,50):i()),!1}}},keyup:function(){return{init:function(e){var i,n,r,s,o;if(!this.rtePaste){if(i=e.which,this.keyup.block=this.selection.block(),this.keyup.current=this.selection.current(),this.keyup.parent=this.selection.parent(),this.keyup.lastShiftKey=e.shiftKey,!1===this.core.callback("keyup",e))return e.preventDefault(),!1;if(i===this.keyCode.ENTER&&this.keyup.block&&"FIGURE"===this.keyup.block.tagName&&0!==(n=t(this.keyup.block).prev()).length&&"FIGURE"===n[0].tagName)return r=this.utils.replaceToTag(n,"p"),void this.caret.start(r);if(i===this.keyCode.BACKSPACE||i===this.keyCode.DELETE){if(this.utils.isSelectAll())return void this.focus.start();if(this.keyup.block&&this.keydown.block&&"FIGURE"===this.keyup.block.tagName&&this.utils.isStartOfElement(this.keydown.block))return e.preventDefault(),this.selection.save(),t(this.keyup.block).find("figcaption").remove(),t(this.keyup.block).find("img").first().remove(),this.utils.replaceToTag(this.keyup.block,"p"),s=this.marker.find(),t("html, body").animate({scrollTop:s.position().top+20},500),void this.selection.restore();this.keyup.block&&"P"===this.keyup.block.tagName&&(o=t(this.keyup.block).find("img").length,""===t(this.keyup.block).text().replace(/\u200B/g,"")&&0!==o&&this.utils.replaceToTag(this.keyup.block,"figure")),this.keyup.block&&"FIGURE"===this.keyup.block.tagName&&0===t(this.keyup.block).find("img").length&&(this.selection.save(),this.utils.replaceToTag(this.keyup.block,"p"),this.selection.restore())}}}}},lang:function(){return{load:function(){this.opts.curLang=this.opts.langs[this.opts.lang]},get:function(t){return void 0!==this.opts.curLang[t]?this.opts.curLang[t]:""}}},line:function(){return{insert:function(){this.buffer.set(),this.insert.html(this.line.getLineHtml());var t=this.core.editor().find("#redactor-hr-tmp-id");return t.removeAttr("id"),this.core.callback("insertedLine",t),t},getLineHtml:function(){var t='<hr id="redactor-hr-tmp-id" />';return!this.detect.isFirefox()&&this.utils.isEmpty()&&(t+="<p>"+this.opts.emptyHtml+"</p>"),t},removeOnBackspace:function(e){var i,n;this.utils.isCollapsed()&&0!==(i=t(this.selection.block())).length&&this.utils.isStartOfElement(i)&&(n=i.prev())&&0!==n.length&&"HR"===n[0].tagName&&(e.preventDefault(),n.remove())}}},link:function(){return{get:function(){return t(this.selection.inlines("a"))},is:function(){var e=this.selection.nodes(),i=t(this.selection.current()).closest("a",this.core.editor()[0]);return!(0===i.length||e.length>1)&&i},unlink:function(t){var e,i;void 0!==t&&t.preventDefault&&t.preventDefault(),this.buffer.set(),0!==(e=this.selection.inlines("a")).length&&(i=this.link.replaceLinksToText(e),this.observe.closeAllTooltip(),this.core.callback("deletedLink",i))},insert:function(e,i){var n,r=this.link.is();return(!0===i||!1!==(e=this.link.buildLinkFromObject(r,e)))&&(this.buffer.set(),e=this.core.callback("beforeInsertingLink",e),!1===r?(r=t("<a />"),r=this.link.update(r,e),n=(r=t(this.insert.node(r))).parent(),!1===this.utils.isRedactorParent(n)&&r.wrap("<p>"),n.hasClass("redactor-unlink")&&n.replaceWith((function(){return t(this).contents()})),this.caret.after(r),this.core.callback("insertedLink",r)):(r=this.link.update(r,e),this.caret.after(r)),r)},update:function(t,e){return t.text(e.text),t.attr("href",e.url),this.link.target(t,e.target),t},target:function(t,e){return e?t.attr("target","_blank"):t.removeAttr("target")},show:function(e){var i,n;void 0!==e&&e.preventDefault&&e.preventDefault(),this.observe.closeAllTooltip(),i=this.link.is(),this.link.buildModal(i),(n=this.link.buildLinkFromElement(i)).url=this.link.removeSelfHostFromUrl(n.url),this.opts.linkNewTab&&!i&&(n.target=!0),this.link.setModalValues(n),this.modal.show(),this.detect.isDesktop()&&t("#redactor-link-url").focus()},setModalValues:function(e){t("#redactor-link-blank").prop("checked",e.target),t("#redactor-link-url").val(e.url),t("#redactor-link-url-text").val(e.text)},buildModal:function(e){this.modal.load("link",this.lang.get(!1===e?"link-insert":"link-edit"),600),this.modal.getActionButton().text(this.lang.get(!1===e?"insert":"save")).on("click",t.proxy(this.link.callback,this))},callback:function(){var t=this.link.buildLinkFromModal();if(!1===t)return!1;this.modal.close(),this.link.insert(t,!0)},cleanUrl:function(e){return void 0===e?"":t.trim(e.replace(/[^\W\w\D\d+&\'@#/%?=~_|!:,.;\(\)]/gi,""))},cleanText:function(e){return void 0===e?"":t.trim(e.replace(/(<([^>]+)>)/gi,""))},getText:function(t){return""===t.text&&""!==t.url?this.link.truncateUrl(t.url.replace(/<|>/g,"")):t.text},isUrl:function(t){return!!new RegExp("^((https?|ftp):\\/\\/)?(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t)&&t},isMailto:function(t){return-1!==t.search("@")&&!1===/(http|ftp|https):\/\//i.test(t)},isEmpty:function(t){return""===t.url||""===t.text&&""===t.url},truncateUrl:function(t){return t.length>this.opts.linkSize?t.substring(0,this.opts.linkSize)+"...":t},parse:function(t){return this.link.isMailto(t.url)?t.url="mailto:"+t.url.replace("mailto:",""):0!==t.url.search("#")&&this.opts.linkValidation&&(t.url=this.link.isUrl(t.url)?"http://"+t.url.replace(/(ftp|https?):\/\//gi,""):t.url),!this.link.isEmpty(t)&&!1!==t.url&&t},buildLinkFromModal:function(){var e={};return e.url=this.link.cleanUrl(t("#redactor-link-url").val()),e.text=this.link.cleanText(t("#redactor-link-url-text").val()),e.text=this.link.getText(e),e.target=!!t("#redactor-link-blank").prop("checked"),this.link.parse(e)},buildLinkFromObject:function(t,e){return e.url=this.link.cleanUrl(e.url),e.text=void 0===e.text&&this.selection.is()?this.selection.text():this.link.cleanText(e.text),e.text=this.link.getText(e),e.target=!1===t?e.target:this.link.buildTarget(t),this.link.parse(e)},buildLinkFromElement:function(t){var e={url:"",text:this.selection.is()?this.selection.text():"",target:!1};return!1!==t&&(e.url=t.attr("href"),e.text=t.text(),e.target=this.link.buildTarget(t)),e},buildTarget:function(t){return void 0!==t.attr("target")&&"_blank"===t.attr("target")},removeSelfHostFromUrl:function(t){var e=self.location.href.replace("#","").replace(/\/$/i,"");return t.replace(/^\/\#/,"#").replace(e,"").replace("mailto:","")},replaceLinksToText:function(e){var i,n=t.each(e,(function(e,n){var r=t(n),s=t('<span class="redactor-unlink" />').append(r.contents());return r.replaceWith(s),0===e&&(i=s),r}));return 1===e.length&&this.selection.isCollapsed()&&this.caret.after(i),n}}},linkify:function(){return{isKey:function(){},isLink:function(){},isFiltered:function(){},handler:function(){},format:function(){},convertVideoLinks:function(){},convertImages:function(){},convertLinks:function(){}}},list:function(){return{toggle:function(e){var i,n,r;if(!this.utils.inBlocks(["table","td","th","tr"]))return e=(e="unorderedlist"===(e="orderedlist"===e?"ol":e)?"ul":e).toLowerCase(),this.buffer.set(),this.selection.save(),i=this.list._getBlocks(),n=this.selection.block(),r=t(n).parents("ul, ol").last(),0===i.length&&0!==r.length&&(i=[r.get(0)]),i=this.list._isUnformat(e,i)?this.list._unformat(e,i):this.list._format(e,i),this.selection.restore(),i},get:function(){var e=this.selection.current(),i=t(e).closest("ul, ol",this.core.editor()[0]);return 0!==i.length&&i},combineAfterAndBefore:function(e){var i=t(e).prev(),n=t(e).next(),r=e&&"P"===e.tagName&&("<br>"===e.innerHTML||""===e.innerHTML),s=1===i.closest("ol, ul",this.core.editor()[0]).length&&1===n.closest("ol, ul",this.core.editor()[0]).length;return!(!r||!s)&&(i.children("li").last().append(this.marker.get()),i.append(n.contents()),this.selection.restore(),!0)},_getBlocks:function(){var e,i=[],n=this.selection.blocks();for(e=0;e<n.length;e++)t(n[e]).parent().hasClass("redactor-in")&&i.push(n[e]);return i},_isUnformat:function(t,e){var i,n,r=0;for(i=0;i<e.length;i++)3!==e[i].nodeType&&((n=e[i].tagName.toLowerCase())!==t&&"figure"!==n||r++);return r===e.length},_uniteBlocks:function(e,i){var n,r,s=0,o={0:[]},a=!1;for(n=0;n<e.length;n++)0!==(r=t(e[n]).closest("th, td")).length?(r.get(0)!==a&&(o[++s]=[]),this.list._isUniteBlock(e[n],i)&&o[s].push(e[n])):this.list._isUniteBlock(e[n],i)?o[s].push(e[n]):o[++s]=[],a=r.get();return o},_isUniteBlock:function(t,e){return 3===t.nodeType||-1!==e.indexOf(t.tagName.toLowerCase())},_createList:function(e,i,n){var r=i[i.length-1],s=t(r),o=t("<"+e+">");return s.after(o),o},_createListItem:function(e){var i,n=t("<li>");return 3===e.nodeType?n.append(e):(i=t(e),n.append(i.contents()),i.remove()),n},_format:function(e,i){var n,r,s,o,a,l=["p","div","blockquote","pre","h1","h2","h3","h4","h5","h6","ul","ol"],c=this.list._uniteBlocks(i,l),h=[];for(n in c){for(r=c[n],s=this.list._createList(e,c[n]),o=0;o<r.length;o++)3===r[o].nodeType||"UL"!==r[o].tagName&&"OL"!==r[o].tagName?(a=this.list._createListItem(r[o]),s.append(a)):(a=t(r[o]).contents(),s.append(a));h.push(s.get(0))}return h},_unformat:function(e,i){var n,r,s,o,a,l,c,h,d,u,p,f,g;if(1===i.length){if(r=(n=t(i[0])).find("li"),s=this.selection.blocks(["li"]),o=this.selection.block(),a=t(o).closest("li"),0===s.length&&0!==a.length&&(s=[a.get(0)]),s.length===r.length)return this.list._unformatEntire(i[0]);if("Top"===(l=this.list._getItemsPosition(r,s)))return this.list._unformatAtSide("before",s,n);if("Bottom"===l)return s.reverse(),this.list._unformatAtSide("after",s,n);if("Middle"===l){for(c=t(s[s.length-1]),h=!1,d=!1,u=t("<"+n.get(0).tagName.toLowerCase()+">"),r.each((function(e,i){var n;h&&(0!==(n=t(i)).children("ul, ol").length,0!==n.closest(".redactor-split-item").length||!1!==d&&0!==n.closest(d).length||n.addClass("redactor-split-item"),d=n),i===c.get(0)&&(h=!0)})),r.filter(".redactor-split-item").each((function(e,i){t(i).removeClass("redactor-split-item"),u.append(i)})),n.after(u),s.reverse(),p=0;p<s.length;p++)f=t(s[p]),g=this.list._createUnformatContainer(f),n.after(g),g.find("ul, ol").remove(),f.remove();return}}else for(p=0;p<i.length;p++)3!==i[p].nodeType&&i[p].tagName.toLowerCase()===e&&this.list._unformatEntire(i[p])},_unformatEntire:function(e){var i=t(e),n=i.find("li");n.each(function(e,n){var r=t(n),s=this.list._createUnformatContainer(r);r.remove(),i.before(s)}.bind(this)),i.remove()},_unformatAtSide:function(e,i,n){var r,s,o,a;for(r=0;r<i.length;r++)s=t(i[r]),o=this.list._createUnformatContainer(s),n[e](o),a=o.find("ul, ol").first(),s.append(a),a.each((function(e,n){var r=t(n),s=r.closest("li");s.get(0)===i[e]&&(r.unwrap(),s.addClass("r-unwrapped"))})),this.utils.isEmpty(s.html())&&s.remove();n.find(".r-unwrapped").each((function(e){var i=t(e);""===i.html().trim()?i.remove():i.removeClass("r-unwrapped")}))},_getItemsPosition:function(t,e){var i="Middle",n=e[0],r=e[e.length-1],s=t.first().get(0),o=t.last().get(0);return s===n&&o!==r?i="Top":s!==n&&o===r&&(i="Bottom"),i},_createUnformatContainer:function(e){var i=t("<p>");return i.append(e.contents()),i}}},marker:function(){return{get:function(t){t=void 0===t?1:t;var e=document.createElement("span");return e.id="selection-marker-"+t,e.className="redactor-selection-marker",e.innerHTML=this.opts.invisibleSpace,e},html:function(t){return this.utils.getOuterHtml(this.marker.get(t))},find:function(t){return t=void 0===t?1:t,this.core.editor().find("span#selection-marker-"+t)},insert:function(){var t=this.selection.get(),e=this.selection.range(t);this.marker.insertNode(e,this.marker.get(1),!0),e&&!1===e.collapsed&&this.marker.insertNode(e,this.marker.get(2),!1)},remove:function(){this.core.editor().find(".redactor-selection-marker").each(this.marker.iterateRemove)},insertNode:function(e,i,n){var r=this.selection.parent();if(null!==e&&0!==t(r).closest(".redactor-in").length){e=e.cloneRange();try{e.collapse(n),e.insertNode(i)}catch(t){this.focus.start()}}},iterateRemove:function(e,i){var n=t(i),r=n.text().replace(/\u200B/g,"");n.parent()[0];""===r?n.remove():n.replaceWith((function(){return t(this).contents()}))}}},modal:function(){return{callbacks:{},templates:function(){this.opts.modal={"image-edit":"",image:"",file:"",link:String()+'<div class="redactor-modal-tab" data-title="General"><section><label>URL</label><input type="url" id="redactor-link-url" aria-label="URL" /></section><section><label>'+this.lang.get("text")+'</label><input type="text" id="redactor-link-url-text" aria-label="'+this.lang.get("text")+'" /></section><section><label class="checkbox"><input type="checkbox" id="redactor-link-blank"> '+this.lang.get("link-in-new-tab")+'</label></section><section><button id="redactor-modal-button-action">'+this.lang.get("insert")+'</button><button id="redactor-modal-button-cancel">'+this.lang.get("cancel")+"</button></section></div>"},t.extend(this.opts,this.opts.modal)},addCallback:function(t,e){this.modal.callbacks[t]=e},addTemplate:function(t,e){this.opts.modal[t]=e},getTemplate:function(t){return this.opts.modal[t]},getModal:function(){return this.$modalBody},getActionButton:function(){return this.$modalBody.find("#redactor-modal-button-action")},getCancelButton:function(){return this.$modalBody.find("#redactor-modal-button-cancel")},getDeleteButton:function(){return this.$modalBody.find("#redactor-modal-button-delete")},load:function(){},show:function(){},buildWidth:function(){},buildTabber:function(){},showTab:function(){},setTitle:function(){},setContent:function(){this.$modalBody.html(this.modal.getTemplate(this.modal.templateName)),this.modal.getCancelButton().on("mousedown",t.proxy(this.modal.close,this))},setDraggable:function(){},setEnter:function(){},build:function(){this.modal.buildOverlay(),this.$modalBox=t('<div id="redactor-modal-box"/>').hide(),this.$modal=t('<div id="redactor-modal" role="dialog" />'),this.$modalHeader=t('<div id="redactor-modal-header" />'),this.$modalClose=t('<button type="button" id="redactor-modal-close" aria-label="'+this.lang.get("close")+'" />').html("×"),this.$modalBody=t('<div id="redactor-modal-body" />'),this.$modal.append(this.$modalHeader),this.$modal.append(this.$modalBody),this.$modal.append(this.$modalClose),this.$modalBox.append(this.$modal),this.$modalBox.appendTo(document.body)},buildOverlay:function(){this.$modalOverlay=t('<div id="redactor-modal-overlay">').hide(),t("body").prepend(this.$modalOverlay)},enableEvents:function(){},disableEvents:function(){},closeHandler:function(){},close:function(){}}},observe:function(){return{load:function(){void 0===this.opts.destroyed&&(this.observe.links(),this.observe.images())},isCurrent:function(e,i){return void 0===i&&(i=t(this.selection.current())),i.is(e)||i.parents(e).length>0},toolbar:function(){this.observe.buttons(),this.observe.dropdowns()},buttons:function(e,i){var n=this.selection.current(),r=this.selection.parent();!1!==e?this.button.setInactiveAll():this.button.setInactiveAll(i),!1!==e||"html"===i?this.utils.isRedactorParent(n)&&("none"!==this.core.editor().css("display")&&(this.utils.isCurrentOrParentHeader()||this.utils.isCurrentOrParent(["table","pre","blockquote","li"])?this.button.disable("horizontalrule"):this.button.enable("horizontalrule")),t.each(this.opts.activeButtonsStates,t.proxy((function(e,i){var s=t(r).closest(e,this.$editor[0]),o=t(n).closest(e,this.$editor[0]);(0===s.length||this.utils.isRedactorParent(s))&&this.utils.isRedactorParent(o)&&(0===s.length&&0===o.closest(e,this.$editor[0]).length||this.button.setActive(i))}),this))):-1!==t.inArray(i,this.opts.activeButtons)&&this.button.toggleActive(i)},dropdowns:function(){var e=t("<div />").html(this.selection.html()).find("a").length,i=t(this.selection.current()),n=this.utils.isRedactorParent(i);t.each(this.opts.observe.dropdowns,t.proxy((function(t,r){var s=r.observe,o=s.element,a=r.item,l=void 0!==s.in&&s.in,c=void 0!==s.out&&s.out;i.closest(o).length>0&&n||"a"===o&&0!==e?this.observe.setDropdownProperties(a,l,c):this.observe.setDropdownProperties(a,c,l)}),this))},setDropdownProperties:function(t,e,i){i&&void 0!==i.attr&&this.observe.setDropdownAttr(t,i.attr,!0),void 0!==e.attr&&this.observe.setDropdownAttr(t,e.attr),void 0!==e.title&&t.find("span").text(e.title)},setDropdownAttr:function(e,i,n){t.each(i,(function(t,i){"class"===t?n?e.removeClass(i):e.addClass(i):n?e.removeAttr(t):e.attr(t,i)}))},addDropdown:function(t,e,i){void 0!==i.observe&&(i.item=t,this.opts.observe.dropdowns.push(i))},images:function(){this.opts.imageEditable&&(this.core.editor().addClass("redactor-layer-img-edit"),this.core.editor().find("img").each(t.proxy((function(e,i){var n=t(i);n.closest("a",this.$editor[0]).on("click",(function(t){t.preventDefault()})),this.image.setEditable(n)}),this)))},links:function(){this.opts.linkTooltip&&this.core.editor().find("a").each(t.proxy((function(e,i){var n=t(i);!0!==n.data("cached")&&(n.data("cached",!0),n.on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.showTooltip,this)))}),this))},getTooltipPosition:function(t){return t.offset()},showTooltip:function(e){var i,n,r,s,o,a,l,c,h,d,u=t(e.target);"IMG"!==u[0].tagName&&("A"!==u[0].tagName&&(u=u.closest("a",this.$editor[0])),"A"===u[0].tagName&&(i=u,n=this.observe.getTooltipPosition(i),r=t('<span class="redactor-link-tooltip"></span>'),void 0===(s=i.attr("href"))&&(s=""),s.length>24&&(s=s.substring(0,24)+"..."),o=t('<a href="'+i.attr("href")+'" target="_blank" />').html(s).addClass("redactor-link-tooltip-action"),a=t('<a href="#" />').html(this.lang.get("edit")).on("click",t.proxy(this.link.show,this)).addClass("redactor-link-tooltip-action"),l=t('<a href="#" />').html(this.lang.get("unlink")).on("click",t.proxy(this.link.unlink,this)).addClass("redactor-link-tooltip-action"),r.append(o).append(" | ").append(a).append(" | ").append(l),c=parseInt(i.css("line-height"),10),h=Math.ceil((e.pageY-n.top)/c),d=n.top+h*c,r.css({top:d+"px",left:n.left+"px"}),t(".redactor-link-tooltip").remove(),t("body").append(r),this.core.editor().on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.closeTooltip,this)),t(document).on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.closeTooltip,this))))},closeAllTooltip:function(){t(".redactor-link-tooltip").remove()},closeTooltip:function(e){var i,n;i=(e=e.originalEvent||e).target,0!==(n=t(i).closest("a",this.$editor[0])).length&&"A"===n[0].tagName&&"A"!==i.tagName||"A"===i.tagName&&this.utils.isRedactorParent(i)||t(i).hasClass("redactor-link-tooltip-action")||(this.observe.closeAllTooltip(),this.core.editor().off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.closeTooltip,this)),t(document).off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.closeTooltip,this)))}}},offset:function(){return{get:function(e){var i,n=this.offset.clone(e);return!1===n?0:((i=document.createElement("div")).appendChild(n.cloneContents()),i.innerHTML=i.innerHTML.replace(/<img(.*?[^>])>$/gi,"i"),t.trim(t(i).text()).replace(/[\t\n\r\n]/g,"").replace(/\u200B/g,"").length)},clone:function(t){var e,i=this.selection.get(),n=this.selection.range(i);return(null!==n||void 0!==t)&&(!1!==(t=void 0===t?this.$editor:t)&&(t=t[0]||t,(e=n.cloneRange()).selectNodeContents(t),e.setEnd(n.endContainer,n.endOffset),e))},set:function(t,e){var i,n,r,s,o;for(e=void 0===e?t:e,this.focus.is()||this.focus.start(),i=this.selection.get(),n=this.selection.range(i),s=0,o=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);null!==(r=o.nextNode());)if((s+=r.nodeValue.length)>t&&(n.setStart(r,r.nodeValue.length+t-s),t=1/0),s>=e){n.setEnd(r,r.nodeValue.length+e-s);break}n.collapse(!1),this.selection.update(i,n)}}},paragraphize:function(){return{load:function(e){return!1===this.opts.paragraphize||"inline"===this.opts.type||"pre"===this.opts.type?e:""===e||"<p></p>"===e?this.opts.emptyHtml:(e+="\n",this.paragraphize.safes=[],this.paragraphize.z=0,e=(e=(e=e.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi,"</blockquote>")).replace(/<\/pre>/gi,"</pre>\n\n")).replace(/<p>\s<br><\/p>/gi,"<p></p>"),e=(e=this.paragraphize.getSafes(e)).replace("<br>","\n"),e=this.paragraphize.convert(e),e=this.paragraphize.clear(e),e=(e=this.paragraphize.restoreSafes(e)).replace(new RegExp("<br\\s?/?>\n?<("+this.opts.paragraphizeBlocks.join("|")+")(.*?[^>])>","gi"),"<p><br /></p>\n<$1$2>"),t.trim(e))},getSafes:function(e){var i=t("<div />").append(e);return i.find("blockquote p").replaceWith((function(){return t(this).append("<br />").contents()})),i.find(this.opts.paragraphizeBlocks.join(", ")).each(t.proxy((function(e,i){return this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=i.outerHTML,t(i).replaceWith("\n#####replace"+this.paragraphize.z+"#####\n\n")}),this)),i.find("span.redactor-selection-marker").each(t.proxy((function(e,i){return this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=i.outerHTML,t(i).replaceWith("\n#####replace"+this.paragraphize.z+"#####\n\n")}),this)),i.html()},restoreSafes:function(e){return t.each(this.paragraphize.safes,(function(t,i){i=void 0!==i?i.replace(/\$/g,"$"):i,e=e.replace("#####replace"+t+"#####",i)})),e},convert:function(e){var i,n,r;return i=/\s+/g,e=(e=(e=(e=e.replace(/\r\n/g,"xparagraphmarkerz")).replace(/\n/g,"xparagraphmarkerz")).replace(/\r/g,"xparagraphmarkerz")).replace(i," "),n=/xparagraphmarkerzxparagraphmarkerz/gi,r=/xparagraphmarkerz/gi,e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e="<p>"+(e=(e=(e=t.trim(e)).replace(n,"</p><p>")).replace(r,"<br>"))+"</p>").replace("<p></p>","")).replace("\r\n\r\n","")).replace(/<\/p><p>/g,"</p>\r\n\r\n<p>")).replace(new RegExp("<br\\s?/?></p>","g"),"</p>")).replace(new RegExp("<p><br\\s?/?>","g"),"<p>")).replace(new RegExp("<p><br\\s?/?>","g"),"<p>")).replace(new RegExp("<br\\s?/?></p>","g"),"</p>")).replace(/<p> <\/p>/gi,"")).replace(/<p>\s?<br> <\/p>/gi,"")).replace(/<p>\s?<br>/gi,"<p>")},clear:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<p>(.*?)#####replace(.*?)#####\s?<\/p>/gi,"<p>$1</p>#####replace$2#####")).replace(/(<br\s?\/?>){2,}<\/p>/gi,"</p>")).replace(new RegExp("</blockquote></p>","gi"),"</blockquote>")).replace(new RegExp("<p></blockquote>","gi"),"</blockquote>")).replace(new RegExp("<p><blockquote>","gi"),"<blockquote>")).replace(new RegExp("<blockquote></p>","gi"),"<blockquote>")).replace(new RegExp("<p><p ","gi"),"<p ")).replace(new RegExp("<p><p>","gi"),"<p>")).replace(new RegExp("</p></p>","gi"),"</p>")).replace(new RegExp("<p>\\s?</p>","gi"),"")).replace(new RegExp("\n</p>","gi"),"</p>")).replace(new RegExp("<p>\t?\t?\n?<p>","gi"),"<p>")).replace(new RegExp("<p>\t*</p>","gi"),"")}}},paste:function(){return{init:function(e){this.rtePaste=!0;var i=!("pre"!==this.opts.type&&!this.utils.isCurrentOrParent("pre"));this.detect.isDesktop()&&!this.paste.pre&&this.opts.clipboardImageUpload&&this.opts.imageUpload&&this.paste.detectClipboardUpload(e)?this.detect.isIe()&&setTimeout(t.proxy(this.paste.clipboardUpload,this),100):(this.utils.saveScroll(),this.selection.save(),this.paste.createPasteBox(i),t(window).on("scroll.redactor-freeze",t.proxy((function(){t(window).scrollTop(this.saveBodyScroll)}),this)),setTimeout(t.proxy((function(){var e,n,r=this.paste.getPasteBoxCode(i);this.buffer.set(),this.selection.restore(),this.utils.restoreScroll(),e=this.clean.getCurrentType(r),r=this.clean.onPaste(r,e),r=void 0===(n=this.core.callback("paste",r))?r:n,this.paste.insert(r,e),this.rtePaste=!1,i&&this.clean.cleanPre(),t(window).off("scroll.redactor-freeze")}),this),1))},getPasteBoxCode:function(t){var e=t?this.$pasteBox.val():this.$pasteBox.html();return this.$pasteBox.remove(),e},createPasteBox:function(e){var i={position:"fixed",width:"1px",top:0,left:"-9999px"};this.$pasteBox=e?t("<textarea>").css(i):t("<div>").attr("contenteditable","true").css(i),this.paste.appendPasteBox(),this.$pasteBox.focus()},appendPasteBox:function(){if(this.detect.isIe())this.core.box().append(this.$pasteBox);else{var e=t(".modal-body:visible");e.length>0?e.append(this.$pasteBox):t("body").prepend(this.$pasteBox)}},detectClipboardUpload:function(e){var i,n,r;return i=(e=e.originalEvent||e).clipboardData,!this.detect.isIe()&&!this.detect.isFirefox()&&(-1!==i.types.indexOf("public.tiff")?(e.preventDefault(),!1):i.items&&i.items.length?null!==(n=i.items[0].getAsFile())&&((r=new FileReader).readAsDataURL(n),r.onload=t.proxy(this.paste.insertFromClipboard,this),!0):void 0)},clipboardUpload:function(){var e=this.$editor.find("img");t.each(e,t.proxy((function(e,i){var n,r;-1!==i.src.search(/^data\:image/i)&&(n=window.FormData?new FormData:null,window.FormData&&(this.upload.direct=!0,this.upload.type="image",this.upload.url=this.opts.imageUpload,this.upload.callback=t.proxy((function(e){if(this.detect.isIe())t(i).wrap(t("<figure />"));else{var n=t(i).parent();this.utils.replaceToTag(n,"figure")}i.src=e.url,this.core.callback("imageUpload",t(i),e)}),this),r=this.utils.dataURItoBlob(i.src),n.append("clipboard",1),n.append(this.opts.imageUploadParam,r),this.upload.send(n,!1),this.code.sync(),this.rtePaste=!1))}),this))},insertFromClipboard:function(t){var e,i=window.FormData?new FormData:null;window.FormData&&(this.upload.direct=!0,this.upload.type="image",this.upload.url=this.opts.imageUpload,this.upload.callback=this.image.insert,e=this.utils.dataURItoBlob(t.target.result),i.append("clipboard",1),i.append(this.opts.imageUploadParam,e),this.upload.send(i,t),this.rtePaste=!1)},insert:function(e,i){i.pre?this.insert.raw(e):i.text?this.insert.text(e):this.insert.html(e,i),this.detect.isFirefox()&&this.opts.imageUpload&&this.opts.clipboardImageUpload&&setTimeout(t.proxy(this.paste.clipboardUpload,this),100)}}},placeholder:function(){return{enable:function(){},show:function(){},update:function(){},hide:function(){},is:function(){},init:function(){},enabled:function(){},enableEvents:function(){},disableEvents:function(){},build:function(){},buildPosition:function(){},getPosition:function(){},isEditorEmpty:function(){},isAttr:function(){},destroy:function(){}}},progress:function(){return{$box:null,$bar:null,target:document.body,show:function(){},hide:function(){},update:function(){},is:function(){},build:function(){},destroy:function(){}}},selection:function(){return{get:function(){return window.getSelection?window.getSelection():document.selection&&"Control"!==document.selection.type?document.selection:null},range:function(t){return void 0===t&&(t=this.selection.get()),t.getRangeAt&&t.rangeCount?t.getRangeAt(0):null},is:function(){return!this.selection.isCollapsed()},isRedactor:function(){var e,i=this.selection.range();return!(null===i||(e=i.startContainer.parentNode,!t(e).hasClass("redactor-in")&&0===t(e).parents(".redactor-in").length))},isCollapsed:function(){var t=this.selection.get();return null!==t&&t.isCollapsed},update:function(t,e){null!==e&&(t.removeAllRanges(),t.addRange(e))},current:function(){var t=this.selection.get();return null!==t&&t.anchorNode},parent:function(){var t=this.selection.current();return null!==t&&t.parentNode},block:function(e){for(e=e||this.selection.current();e;){if(this.utils.isBlockTag(e.tagName))return!t(e).hasClass("redactor-in")&&e;e=e.parentNode}return!1},inline:function(e){for(e=e||this.selection.current();e;){if(this.utils.isInlineTag(e.tagName))return!t(e).hasClass("redactor-in")&&e;e=e.parentNode}return!1},element:function(e){for(e||(e=this.selection.current());e;){if(1===e.nodeType)return!t(e).hasClass("redactor-in")&&e;e=e.parentNode}return!1},prev:function(){return null!==this.selection.current()&&this.selection.current().previousSibling},next:function(){return null!==this.selection.current()&&this.selection.current().nextSibling},blocks:function(e){var i,n=[],r=this.selection.nodes(e);return t.each(r,t.proxy((function(t,e){this.utils.isBlock(e)&&n.push(e)}),this)),i=this.selection.block(),0===n.length&&!1===i?[]:0===n.length&&!1!==i?[i]:n},inlines:function(e){var i,n=[],r=this.selection.nodes(e);return t.each(r,t.proxy((function(t,e){this.utils.isInline(e)&&n.push(e)}),this)),i=this.selection.inline(),0===n.length&&!1===i?[]:0===n.length&&!1!==i?[i]:n},nodes:function(e){var i,n,r=void 0===e?[]:t.isArray(e)?e:[e],s=this.selection.get(),o=this.selection.range(s),a=[],l=[];if(this.utils.isCollapsed())a=[this.selection.current()];else{if((i=o.startContainer)===(n=o.endContainer))return[i];for(;i&&i!==n;)a.push(i=this.selection.nextNode(i));for(i=o.startContainer;i&&i!==o.commonAncestorContainer;)a.unshift(i),i=i.parentNode}return t.each(a,(function(e,i){if(i){var n=1===i.nodeType&&i.tagName.toLowerCase();if(t(i).hasClass("redactor-script-tag")||t(i).hasClass("redactor-selection-marker"))return;if(n&&0!==r.length&&-1===t.inArray(n,r))return;l.push(i)}})),0===l.length?[]:l},nextNode:function(t){if(t.hasChildNodes())return t.firstChild;for(;t&&!t.nextSibling;)t=t.parentNode;return t?t.nextSibling:null},save:function(){this.marker.insert(),this.savedSel=this.core.editor().html()},restore:function(t){var e=this.marker.find(1),i=this.marker.find(2);this.detect.isFirefox()&&this.core.editor().focus(),0!==e.length&&0!==i.length?this.caret.set(e,i):0!==e.length?this.caret.start(e):this.core.editor().focus(),!1!==t&&(this.marker.remove(),this.savedSel=!1)},saveInstant:function(){var t,e,i,n=this.core.editor()[0],r=n.ownerDocument,s=r.defaultView,o=s.getSelection();if(o.getRangeAt&&o.rangeCount)return(e=(t=o.getRangeAt(0)).cloneRange()).selectNodeContents(n),e.setEnd(t.startContainer,t.startOffset),i=e.toString().length,this.saved={start:i,end:i+t.toString().length,node:t.startContainer},this.saved},restoreInstant:function(t){var e,i,n,r,s,o,a,l,c,h,d,u,p;if(void 0!==t||this.saved)if(this.saved=void 0!==t?t:this.saved,0===(e=this.core.editor().find(this.saved.node)).length||0!==e.text().trim().replace(/\u200B/g,"").length){for(o=(s=(r=this.core.editor()[0]).ownerDocument).defaultView,a=0,(i=s.createRange()).setStart(r,0),i.collapse(!0),l=[r],h=!1,d=!1;!d&&(c=l.pop());)if(3==c.nodeType)u=a+c.length,!h&&this.saved.start>=a&&this.saved.start<=u&&(i.setStart(c,this.saved.start-a),h=!0),h&&this.saved.end>=a&&this.saved.end<=u&&(i.setEnd(c,this.saved.end-a),d=!0),a=u;else for(p=c.childNodes.length;p--;)l.push(c.childNodes[p]);(n=o.getSelection()).removeAllRanges(),n.addRange(i)}else try{(i=document.createRange()).setStart(e[0],0),(n=window.getSelection()).removeAllRanges(),n.addRange(i)}catch(t){}},node:function(e){t(e).prepend(this.marker.get(1)),t(e).append(this.marker.get(2)),this.selection.restore()},all:function(){var t,e;this.core.editor().focus(),t=this.selection.get(),(e=this.selection.range(t)).selectNodeContents(this.core.editor()[0]),this.selection.update(t,e)},remove:function(){this.selection.get().removeAllRanges()},replace:function(t){this.insert.html(t)},text:function(){return this.selection.get().toString()},html:function(){var t,e,i,n="",r=this.selection.get();if(r.rangeCount){for(t=document.createElement("div"),e=r.rangeCount,i=0;i<e;++i)t.appendChild(r.getRangeAt(i).cloneContents());n=this.clean.onGet(t.innerHTML)}return n},extractEndOfNode:function(t){var e=this.selection.get(),i=this.selection.range(e),n=i.cloneRange();return n.selectNodeContents(t),n.setStart(i.endContainer,i.endOffset),n.extractContents()},removeMarkers:function(){this.marker.remove()},marker:function(t){return this.marker.get(t)},markerHtml:function(t){return this.marker.html(t)}}},shortcuts:function(){return{hotkeysSpecialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},hotkeysShiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},init:function(e,i){if(!1===this.opts.shortcuts)return!e.ctrlKey&&!e.metaKey||66!==i&&73!==i||e.preventDefault(),!1;t.each(this.opts.shortcuts,t.proxy((function(t,i){this.shortcuts.build(e,t,i)}),this))},build:function(e,i,n){var r,s=t.proxy((function(){this.shortcuts.buildHandler(n)}),this),o=i.split(","),a=o.length;for(r=0;r<a;r++)"string"==typeof o[r]&&this.shortcuts.handler(e,t.trim(o[r]),s)},buildHandler:function(t){var e;"-1"!==t.func.search(/\./)?void 0!==this[(e=t.func.split("."))[0]]&&this[e[0]][e[1]].apply(this,t.params):this[t.func].apply(this,t.params)},handler:function(e,i,n){var r,s,o,a,l,c;for(i=i.toLowerCase().split(" "),r=this.shortcuts.hotkeysSpecialKeys[e.keyCode],s=String.fromCharCode(e.which).toLowerCase(),o="",a={},t.each(["alt","ctrl","meta","shift"],(function(t,i){e[i+"Key"]&&r!==i&&(o+=i+"+")})),r&&(a[o+r]=!0),s&&(a[o+s]=!0,a[o+this.shortcuts.hotkeysShiftNums[s]]=!0,"shift+"===o&&(a[this.shortcuts.hotkeysShiftNums[s]]=!0)),l=i.length,c=0;c<l;c++)if(a[i[c]])return e.preventDefault(),n.apply(this,arguments)}}},storage:function(){return{data:[],add:function(){},status:function(){},observe:function(){},changes:function(){}}},toolbar:function(){return{build:function(){this.button.hideButtons(),this.button.hideButtonsOnMobile(),this.$toolbarBox=t('<div class="redactor-toolbar-box" />'),this.$toolbarBox[0].innerHTML='<ul class="redactor-toolbar" id="redactor-toolbar-'+this.uuid+'" role="toolbar"></ul>',this.$toolbar=t(this.$toolbarBox[0].children[0]),this.$box[0].insertBefore(this.$toolbarBox[0],this.$box[0].firstChild),this.button.$toolbar=this.$toolbar,this.button.setFormatting(),this.button.load(this.$toolbar),require(["Core"],function(t){this.$toolbar[0].addEventListener("keydown",this.toolbar.keydown.bind(this,t))}.bind(this))},createContainer:function(){},append:function(){},setOverflow:function(){},setFixed:function(){},setUnfixed:function(){},getBoxTop:function(){},observeScroll:function(){},observeScrollResize:function(){},observeScrollEnable:function(){},observeScrollDisable:function(){},setDropdownsFixed:function(){},unsetDropdownsFixed:function(){},setDropdownPosition:function(){},keydown:function(e,i){var n,r,s,o,a,l=document.activeElement;if(l.classList.contains("re-button")&&-1!==[13,32,35,36,37,39,40].indexOf(i.which)){if(13===i.which||32===i.which)return i.preventDefault(),void require(["Core"],(function(t){t.triggerEvent(l,"mousedown")}));if(40===i.which){if("true"!==elAttr(l,"aria-haspopup"))return;return i.preventDefault(),e.triggerEvent(l,"mousedown"),n=t(l).data("dropdown"),void((r=elBySel("li",n[0]))&&r.focus())}i.preventDefault(),s=Array.prototype.slice.call(elBySelAll(".re-button",this.$toolbar[0])),o=null,35===i.which?o=s[s.length-1]:36===i.which?o=s[0]:(a=s.indexOf(l),37===i.which?-1===--a&&(a=s.length-1):39===i.which&&++a===s.length&&(a=0),o=s[a]),null!==o&&o.focus()}}}},upload:function(){return{init:function(){},directUpload:function(){},onDrop:function(){},traverseFile:function(){},setConfig:function(){},getType:function(){},getHiddenFields:function(){},send:function(){},onDrag:function(){},onDragLeave:function(){},clearImageFields:function(){},addImageFields:function(){},removeImageFields:function(){},clearFileFields:function(){},addFileFields:function(){},removeFileFields:function(){}}},uploads3:function(){return{send:function(){},executeOnSignedUrl:function(){},createCORSRequest:function(){},sendToS3:function(){}}},utils:function(){return{isEmpty:function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=void 0===e?this.core.editor().html():e).replace(/[\u200B-\u200D\uFEFF]/g,"")).replace(/ /gi,"")).replace(/<\/?br\s?\/?>/g,"")).replace(/\s/g,"")).replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,"")).replace(/<iframe(.*?[^>])>$/i,"iframe")).replace(/<source(.*?[^>])>$/i,"source")).replace(/<[^\/>][^>]*><\/[^>]+>/gi,"")).replace(/<[^\/>][^>]*><\/[^>]+>/gi,""),""===(e=t.trim(e))},isElement:function(t){try{return t instanceof HTMLElement}catch(e){return"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument}},strpos:function(t,e,i){var n=t.indexOf(e,i);return n>=0&&n},dataURItoBlob:function(t){var e,i,n,r;for(e=t.split(",")[0].indexOf("base64")>=0?atob(t.split(",")[1]):unescape(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return new Blob([n],{type:i})},getOuterHtml:function(e){return t("<div>").append(t(e).eq(0).clone()).html()},cloneAttributes:function(e,i){var n,r,s;for(e=e[0]||e,i=t(i),r=(n=e.attributes).length;r--;)s=n[r],i.attr(s.name,s.value);return i},breakBlockTag:function(){var e,i,n,r,s=this.selection.block();return!!s&&(e=this.utils.isEmpty(s.innerHTML),"pre"!==(i=s.tagName.toLowerCase())&&"li"!==i&&"td"!==i&&"th"!==i&&(!e&&this.utils.isStartOfElement(s)?{$block:t(s),$next:t(s).next(),type:"start"}:!e&&this.utils.isEndOfElement(s)?{$block:t(s),$next:t(s).next(),type:"end"}:(n=this.selection.extractEndOfNode(s),r=t("<"+i+" />").append(n),r=this.utils.cloneAttributes(s,r),t(s).after(r),{$block:t(s),$next:r,type:"break"})))},inBlocks:function(e){var i,n,r,s,o;for(e=t.isArray(e)?e:[e],n=(i=this.selection.blocks()).length,r=!1,s=0;s<n;s++)!1!==i[s]&&(o=i[s].tagName.toLowerCase(),-1!==t.inArray(o,e)&&(r=!0));return r},inInlines:function(e){var i,n,r,s,o;for(e=t.isArray(e)?e:[e],n=(i=this.selection.inlines()).length,r=!1,s=0;s<n;s++)o=i[s].tagName.toLowerCase(),-1!==t.inArray(o,e)&&(r=!0);return r},isTag:function(e,i){var n=t(e).closest(i,this.core.editor()[0]);return 1===n.length&&n[0]},isBlock:function(t){return null!==t&&((t=t[0]||t)&&this.utils.isBlockTag(t.tagName))},isBlockTag:function(t){return void 0!==t&&this.reIsBlock.test(t)},isInline:function(t){return(t=t[0]||t)&&this.utils.isInlineTag(t.tagName)},isInlineTag:function(t){return void 0!==t&&this.reIsInline.test(t)},isRedactorParent:function(e){return!!e&&(0!==t(e).parents(".redactor-in").length&&!t(e).hasClass("redactor-in")&&e)},isCurrentOrParentHeader:function(){return this.utils.isCurrentOrParent(["H1","H2","H3","H4","H5","H6"])},isCurrentOrParent:function(e){var i,n=this.selection.parent(),r=this.selection.current();return t.isArray(e)?(i=0,t.each(e,t.proxy((function(t,e){this.utils.isCurrentOrParentOne(r,n,e)&&i++}),this)),0!==i):this.utils.isCurrentOrParentOne(r,n,e)},isCurrentOrParentOne:function(t,e,i){return i=i.toUpperCase(),e&&e.tagName===i?e:!(!t||t.tagName!==i)&&t},isEditorRelative:function(){var e=this.core.editor().css("position"),i=["absolute","fixed","relative"];return-1!==t.inArray(i,e)},setEditorRelative:function(){this.core.editor().addClass("redactor-relative")},getScrollTarget:function(){var e=t(this.opts.scrollTarget);return 0!==e.length?e:t(document)},freezeScroll:function(){this.freezeScrollTop=this.utils.getScrollTarget().scrollTop(),this.utils.getScrollTarget().scrollTop(this.freezeScrollTop)},unfreezeScroll:function(){void 0!==this.freezeScrollTop&&this.utils.getScrollTarget().scrollTop(this.freezeScrollTop)},saveScroll:function(){this.tmpScrollTop=this.utils.getScrollTarget().scrollTop()},restoreScroll:function(){void 0!==this.tmpScrollTop&&this.utils.getScrollTarget().scrollTop(this.tmpScrollTop)},isStartOfElement:function(t){return!(void 0===t&&!(t=this.selection.block()))&&0===this.offset.get(t)},isEndOfElement:function(e){var i;return!(void 0===e&&!(e=this.selection.block()))&&(i=t.trim(t(e).text()).replace(/[\t\n\r\n]/g,"").replace(/\u200B/g,""),this.offset.get(e)===i.length)},removeEmptyAttr:function(e,i){var n=t(e);return void 0===n.attr(i)||""===n.attr(i)&&(n.removeAttr(i),!0)},replaceToTag:function(e,i){var n;return t(e).replaceWith((function(){n=t("<"+i+" />").append(t(this).contents());for(var e=0;e<this.attributes.length;e++)n.attr(this.attributes[e].name,this.attributes[e].value);return n})),n},isSelectAll:function(){return this.selectAll},enableSelectAll:function(){this.selectAll=!0},disableSelectAll:function(){this.selectAll=!1},disableBodyScroll:function(){},measureScrollbar:function(){var e,i=t("body"),n=document.createElement("div");return n.className="redactor-scrollbar-measure",i.append(n),e=n.offsetWidth-n.clientWidth,i[0].removeChild(n),e},enableBodyScroll:function(){},appendFields:function(e,i){var n;return e?"object"==typeof e?(t.each(e,(function(e,n){null!==n&&0===n.toString().indexOf("#")&&(n=t(n).val()),i.append(e,n)})),i):(0===(n=t(e)).length||("",n.each((function(){i.append(t(this).attr("name"),t(this).val())}))),i):i},appendForms:function(e,i){var n,r;return e?(0===(n=t(e)).length||(r=n.serializeArray(),t.each(r,(function(t,e){i.append(e.name,e.value)}))),i):i},isRgb:function(t){return 0===t.search(/^rgb/i)},rgb2hex:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""},isCollapsed:function(){return this.selection.isCollapsed()},isMobile:function(){return this.detect.isMobile()},isDesktop:function(){return this.detect.isDesktop()},isPad:function(){return this.detect.isIpad()}}},browser:function(){return{webkit:function(){return this.detect.isWebkit()},ff:function(){return this.detect.isFirefox()},ie:function(){return this.detect.isIe()}}}},t(window).on("load.tools.redactor",(function(){t('[data-tools="redactor"]').redactor()})),e.prototype.init.prototype=e.prototype}(jQuery),function(t){function e(e,i,n,r){var s={duration:.5,iterate:1,delay:0,prefix:"redactor-",timing:"linear"};this.animation=i,this.slide="slideDown"===this.animation||"slideUp"===this.animation,this.$element=t(e),this.prefixes=["","-moz-","-o-animation-","-webkit-"],this.queue=[],"function"==typeof n?(r=n,this.opts=s):this.opts=t.extend(s,n),this.slide&&this.$element.height(this.$element.height()),this.init(r)}t.fn.redactorAnimation=function(t,i,n){return this.each((function(){new e(this,t,i,n)}))},e.prototype={init:function(t){this.queue.push(this.animation),this.clean(),"show"===this.animation?(this.opts.timing="linear",this.$element.removeClass("hide").show(),"function"==typeof t&&t(this)):"hide"===this.animation?(this.opts.timing="linear",this.$element.hide(),"function"==typeof t&&t(this)):this.animate(t)},animate:function(e){this.$element.addClass("redactor-animated").css("display","").removeClass("hide"),this.$element.addClass(this.opts.prefix+this.queue[0]),this.set(this.opts.duration+"s",this.opts.delay+"s",this.opts.iterate,this.opts.timing);var i=this.queue.length>1?null:e;this.complete("AnimationEnd",t.proxy((function(){this.$element.hasClass(this.opts.prefix+this.queue[0])&&(this.clean(),this.queue.shift(),this.queue.length&&this.animate(e))}),this),i)},set:function(t,e,i,n){for(var r=this.prefixes.length;r--;)this.$element.css(this.prefixes[r]+"animation-duration",t),this.$element.css(this.prefixes[r]+"animation-delay",e),this.$element.css(this.prefixes[r]+"animation-iteration-count",i),this.$element.css(this.prefixes[r]+"animation-timing-function",n)},clean:function(){this.$element.removeClass("redactor-animated"),this.$element.removeClass(this.opts.prefix+this.queue[0]),this.set("","","","")},complete:function(e,i,n){this.$element.one(e.toLowerCase()+" webkit"+e+" o"+e+" MS"+e,t.proxy((function(){"function"==typeof i&&i(),"function"==typeof n&&n(this);-1!==t.inArray(this.animation,["fadeOut","slideUp","zoomOut","slideOutUp","slideOutRight","slideOutLeft"])&&this.$element.css("display","none"),this.slide&&this.$element.css("height","")}),this))}}}(jQuery); })(this);
// plugins/WoltLabArticle.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabArticle=function(){"use strict";return{init:function(){var i=this.button.add("woltlabArticle","");require(["WoltLabSuite/Core/Ui/Redactor/Article"],function(t){new t(this,i[0])}.bind(this))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabArticle=function(){"use strict";return{init:function(){var t=this.button.add("woltlabArticle","");require(["WoltLabSuite/Core/Ui/Redactor/Article"],function(i){new i(this,t[0])}.bind(this))}}}; })(this);
// plugins/WoltLabAttachment.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabAttachment=function(){"use strict";return{init:function(){this.opts.woltlab.attachments&&require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertAttachment_"+this.$element[0].id,this.WoltLabAttachment._insert.bind(this)),t.add("com.woltlab.wcf.redactor2","deleteAttachment_"+this.$element[0].id,this.WoltLabAttachment._delete.bind(this)),t.add("com.woltlab.wcf.redactor2","replaceAttachment_"+this.$element[0].id,this.WoltLabAttachment._replaceAttachment.bind(this))}.bind(this))},_insert:function(t){if(!this.WoltLabSource.isActive()){var e=t.attachmentId;if(this.buffer.set(),t.url){var i="wcfImgAttachment"+this.uuid,a=elById(i);a&&a.removeAttribute("id"),this.insert.html('<img src="'+t.url+'" class="woltlabAttachment" data-attachment-id="'+e+'" id="'+i+'">');for(var n=!0,c=a=elById(i);c=c.nextSibling;)if(c.nodeType!==Node.TEXT_NODE||""!==c.textContent.replace(/\u200B/g,"").trim()){n=!1;break}n?this.caret.after(a.parentNode):window.setTimeout(function(){var t,e,a,n=elById(i);n&&(n.removeAttribute("id"),(t=n.nextSibling)&&t.nodeType===Node.TEXT_NODE&&""===t.textContent||(t=document.createTextNode(""),n.parentNode.insertBefore(t,n.nextSibling)),(e=document.createRange()).selectNode(t),e.collapse(!1),(a=window.getSelection()).removeAllRanges(),a.addRange(e))}.bind(this),10)}else this.insert.text("[attach="+e+"][/attach]");this.buffer.set()}},_replaceAttachment:function(t){var e=elCreate("img");e.className="woltlabAttachment",e.src=t.src,elData(e,"attachment-id",t.attachmentId),t.img.parentNode.insertBefore(e,t.img),elRemove(t.img)},_delete:function(t){var e=t.attachmentId,a=this.core.editor()[0];elBySelAll('.woltlabAttachment[data-attachment-id="'+e+'"]',a,function(t){elRemove(t)});var n="[attach="+e+"][/attach]";if(!1!==a.textContent.indexOf(n)){for(var i,c=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1),r=[];i=c.nextNode();)-1!==i.textContent.indexOf(n)&&r.push(i);for(var o=0,l=r.length;o<l;o++)r[o].textContent=r[o].textContent.replace(new RegExp("\\[attach="+e+"\\]\\[\\/attach\\]","g"),"")}}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabAttachment=function(){"use strict";return{init:function(){this.opts.woltlab.attachments&&require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertAttachment_"+this.$element[0].id,this.WoltLabAttachment._insert.bind(this)),t.add("com.woltlab.wcf.redactor2","deleteAttachment_"+this.$element[0].id,this.WoltLabAttachment._delete.bind(this)),t.add("com.woltlab.wcf.redactor2","replaceAttachment_"+this.$element[0].id,this.WoltLabAttachment._replaceAttachment.bind(this))}.bind(this))},_insert:function(t){var e,a,n,i,c;if(!this.WoltLabSource.isActive()){if(e=t.attachmentId,this.buffer.set(),t.url){for(a="wcfImgAttachment"+this.uuid,(n=elById(a))&&n.removeAttribute("id"),this.insert.html('<img src="'+t.url+'" class="woltlabAttachment" data-attachment-id="'+e+'" id="'+a+'">'),i=!0,c=n=elById(a);c=c.nextSibling;)if(c.nodeType!==Node.TEXT_NODE||""!==c.textContent.replace(/\u200B/g,"").trim()){i=!1;break}i?this.caret.after(n.parentNode):window.setTimeout(function(){var t,e,n,i=elById(a);i&&(i.removeAttribute("id"),(t=i.nextSibling)&&t.nodeType===Node.TEXT_NODE&&""===t.textContent||(t=document.createTextNode(""),i.parentNode.insertBefore(t,i.nextSibling)),(e=document.createRange()).selectNode(t),e.collapse(!1),(n=window.getSelection()).removeAllRanges(),n.addRange(e))}.bind(this),10)}else this.insert.text("[attach="+e+"][/attach]");this.buffer.set()}},_replaceAttachment:function(t){var e=elCreate("img");e.className="woltlabAttachment",e.src=t.src,elData(e,"attachment-id",t.attachmentId),t.img.parentNode.insertBefore(e,t.img),elRemove(t.img)},_delete:function(t){var e,a,n,i,c,o,r=t.attachmentId,l=this.core.editor()[0];if(elBySelAll('.woltlabAttachment[data-attachment-id="'+r+'"]',l,(function(t){elRemove(t)})),e="[attach="+r+"][/attach]",!1!==l.textContent.indexOf(e)){for(a=document.createTreeWalker(l,NodeFilter.SHOW_TEXT,null,!1),i=[];n=a.nextNode();)-1!==n.textContent.indexOf(e)&&i.push(n);for(c=0,o=i.length;c<o;c++)i[c].textContent=i[c].textContent.replace(new RegExp("\\[attach="+r+"\\]\\[\\/attach\\]","g"),"")}}}}; })(this);
// plugins/WoltLabAutosave.js
(function (window, undefined) { $.Redactor.prototype.WoltLabAutosave=function(){"use strict";return{init:function(){this.opts.woltlab.autosave&&(this.opts.woltlab.autosave.watch(this),this.opts.woltlab.autosave.createOverlay(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveDestroy_"+this.$element[0].id,this.WoltLabAutosave.destroy.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveReset_"+this.$element[0].id,this.WoltLabAutosave.reset.bind(this)))},destroy:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.destroy()},reset:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.clear()}}}; })(this);
// plugins/WoltLabBlock.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabBlock=function(){"use strict";return{preserveBlocks:["pre","woltlab-quote","woltlab-spoiler"],init:function(){this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(e,t,o,i){if(e="quote"===e?"blockquote":e,-1!==$.inArray(e,this.block.tags))return"p"===e&&void 0===t&&(t="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(e,t,o,i):this.block.formatUncollapsed(e,t,o,i)}.bind(this);var c=function(e,t){return!(document.activeElement!==e||!1===t||!this.utils.isRedactorParent(t))}.bind(this),d=this.block.formatCollapsed;this.block.formatCollapsed=function(e,t,o,i){var s=this.selection.block();if(!s||"LI"!==s.nodeName&&"TD"!==s.nodeName){var r=this.core.editor()[0];c(r,s)||(this.selection.restore(),document.activeElement!==r&&r.focus()),c(r,s)||(this.focus.end(),this.selection.save());var l=d.call(this,e,t,o,i),n=l.length;if(1===n&&l[0].nodeName.match(/^H[1-6]$/)){var a=l[0];1===a.childElementCount&&"BR"===a.children[0].nodeName&&this.utils.isEmpty(a.innerHTML)&&(a.innerHTML="")}else for(var h=0;h<n;h++)this.WoltLabBlock._paragraphize(l[h]);return this.caret.end(l),l}}.bind(this),this.block.formatUncollapsed=function(e,t,o,i){var s;this.selection.save(),this.selection.blocks().forEach(function(e){var t;"OL"!==e.nodeName&&"UL"!==e.nodeName||(e.parentNode.nodeName.toLowerCase(),t=elCreate("div"),e.parentNode.insertBefore(t,e),t.appendChild(e))}),this.selection.restore(),this.selection.save();var r=[],l=this.selection.blocks();l[0]&&($(l[0]).hasClass("redactor-in")||$(l[0]).hasClass("redactor-box"))&&(l=this.core.editor().find(this.opts.blockTags.join(", ")));for(var n,a=l.length,h=0;h<a;h++){var c=l[h].tagName.toLowerCase();if(-1!==$.inArray(c,this.block.tags)&&"figure"!==c){if(s="pre"!==e&&-1!==this.WoltLabBlock.preserveBlocks.indexOf(l[h].nodeName.toLowerCase())?(s=elCreate(e),l[h].parentNode.insertBefore(s,l[h]),s.appendChild(l[h]),$(s)):this.utils.replaceToTag(l[h],e),"object"==typeof t)for(var d in i=o,t)s=this.block.setAttr(s,d,t[d],i);else s=this.block.setAttr(s,t,o,i);r.push(s),this.block.removeInlineTags(s)}}this.selection.restore(),"pre"===e&&0!==r.length&&(n=r[0],$.each(r,function(e,t){0!==e&&($(n).append("\n"+$.trim(t.html())),$(t).remove())}),(r=[]).push(n));var p,f=null;for(h=0,p=r.length;h<p;h++)if(s=r[h][0]||r[h],this.WoltLabBlock._paragraphize(s),0===h)f=s;else{for(;s.childNodes.length;)f.appendChild(s.childNodes[0]);elRemove(s)}return f&&elBySelAll("br",f,function(e){e.parentNode.insertBefore(document.createTextNode("\n"),e),elRemove(e)}),$(f)}.bind(this),this.block.removeAllAttr=function(e){e=this.block.getBlocks(e);var o=[];return $.each(e,function(e,t){for(void 0===t.attributes&&o.push(t);t.attributes.length;)t.removeAttribute(t.attributes[0].name);o.push(t)}),o}.bind(this),this.block.getBlocks=function(e){if(e=void 0===e?this.selection.blocks():e,$(e).hasClass("redactor-box")||$(e).hasClass("redactor-layer")){var o=[],t=this.core.editor().children();return $.each(t,$.proxy(function(e,t){this.utils.isBlock(t)&&o.push(t)},this)),o}return e}.bind(this)},register:function(e,t){-1===this.block.tags.indexOf(e)&&(this.block.tags.push(e),this.opts.paragraphizeBlocks.push(e),-1===this.opts.blockTags.indexOf(e)&&(this.opts.blockTags.push(e),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")),t&&this.WoltLabKeydown.register(e))},_paragraphize:function(e){if(-1===["p","pre","h1","h2","h3","h4","h5","h6","div","figure"].indexOf(e.nodeName.toLowerCase())){for(var t,o=!1,i=0,s=e.childNodes.length;i<s;i++){if((t=e.childNodes[i]).nodeType===Node.TEXT_NODE){o=!0;break}if(t.nodeType===Node.ELEMENT_NODE&&-1===this.block.tags.indexOf(t.nodeName.toLowerCase())){o=!0;break}}if(o)for(var r,l=e.childNodes[0],n=null;l;)r=l.nextSibling,l.nodeType!==Node.ELEMENT_NODE||-1===this.block.tags.indexOf(l.nodeName.toLowerCase())?(null===n&&(n=elCreate("p"),e.insertBefore(n,l)),n.appendChild(l)):null!==n&&(n=null),l=r}}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabBlock=function(){"use strict";return{preserveBlocks:["pre","woltlab-quote","woltlab-spoiler"],init:function(){var e,t;this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(e,t,o,i){if(e="quote"===e?"blockquote":e,-1!==$.inArray(e,this.block.tags))return"p"===e&&void 0===t&&(t="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(e,t,o,i):this.block.formatUncollapsed(e,t,o,i)}.bind(this),e=function(e,t){return!(document.activeElement!==e||!1===t||!this.utils.isRedactorParent(t))}.bind(this),t=this.block.formatCollapsed,this.block.formatCollapsed=function(o,i,s,r){var l,n,a,h,c,d=this.selection.block();if(!d||"LI"!==d.nodeName&&"TD"!==d.nodeName){if(l=this.core.editor()[0],e(l,d)||(this.selection.restore(),document.activeElement!==l&&l.focus()),e(l,d)||(this.focus.end(),this.selection.save()),1===(a=(n=t.call(this,o,i,s,r)).length)&&n[0].nodeName.match(/^H[1-6]$/))1===(h=n[0]).childElementCount&&"BR"===h.children[0].nodeName&&this.utils.isEmpty(h.innerHTML)&&(h.innerHTML="");else for(c=0;c<a;c++)this.WoltLabBlock._paragraphize(n[c]);return this.caret.end(n),n}}.bind(this),this.block.formatUncollapsed=function(e,t,o,i){var s,r,l,n,a,h,c,d,p,f;for(this.selection.save(),this.selection.blocks().forEach((function(e){if("OL"===e.nodeName||"UL"===e.nodeName){e.parentNode.nodeName.toLowerCase();var t=elCreate("div");e.parentNode.insertBefore(t,e),t.appendChild(e)}})),this.selection.restore(),this.selection.save(),l=[],(n=this.selection.blocks())[0]&&($(n[0]).hasClass("redactor-in")||$(n[0]).hasClass("redactor-box"))&&(n=this.core.editor().find(this.opts.blockTags.join(", "))),a=n.length,r=0;r<a;r++)if(h=n[r].tagName.toLowerCase(),-1!==$.inArray(h,this.block.tags)&&"figure"!==h){if("pre"!==e&&-1!==this.WoltLabBlock.preserveBlocks.indexOf(n[r].nodeName.toLowerCase())?(s=elCreate(e),n[r].parentNode.insertBefore(s,n[r]),s.appendChild(n[r]),s=$(s)):s=this.utils.replaceToTag(n[r],e),"object"==typeof t)for(c in i=o,t)s=this.block.setAttr(s,c,t[c],i);else s=this.block.setAttr(s,t,o,i);l.push(s),this.block.removeInlineTags(s)}for(this.selection.restore(),"pre"===e&&0!==l.length&&(d=l[0],$.each(l,(function(e,t){0!==e&&($(d).append("\n"+$.trim(t.html())),$(t).remove())})),(l=[]).push(d)),f=null,r=0,p=l.length;r<p;r++)if(s=l[r][0]||l[r],this.WoltLabBlock._paragraphize(s),0===r)f=s;else{for(;s.childNodes.length;)f.appendChild(s.childNodes[0]);elRemove(s)}return f&&elBySelAll("br",f,(function(e){e.parentNode.insertBefore(document.createTextNode("\n"),e),elRemove(e)})),$(f)}.bind(this),this.block.removeAllAttr=function(e){e=this.block.getBlocks(e);var t=[];return $.each(e,(function(e,o){for(void 0===o.attributes&&t.push(o);o.attributes.length;)o.removeAttribute(o.attributes[0].name);t.push(o)})),t}.bind(this),this.block.getBlocks=function(e){var t,o;return e=void 0===e?this.selection.blocks():e,$(e).hasClass("redactor-box")||$(e).hasClass("redactor-layer")?(t=[],o=this.core.editor().children(),$.each(o,$.proxy((function(e,o){this.utils.isBlock(o)&&t.push(o)}),this)),t):e}.bind(this)},register:function(e,t){-1===this.block.tags.indexOf(e)&&(this.block.tags.push(e),this.opts.paragraphizeBlocks.push(e),-1===this.opts.blockTags.indexOf(e)&&(this.opts.blockTags.push(e),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")),t&&this.WoltLabKeydown.register(e))},_paragraphize:function(e){var t,o,i,s,r,l,n;if(-1===["p","pre","h1","h2","h3","h4","h5","h6","div","figure"].indexOf(e.nodeName.toLowerCase())){for(o=!1,i=0,s=e.childNodes.length;i<s;i++){if((t=e.childNodes[i]).nodeType===Node.TEXT_NODE){o=!0;break}if(t.nodeType===Node.ELEMENT_NODE&&-1===this.block.tags.indexOf(t.nodeName.toLowerCase())){o=!0;break}}if(o)for(r=e.childNodes[0],n=null;r;)l=r.nextSibling,r.nodeType!==Node.ELEMENT_NODE||-1===this.block.tags.indexOf(r.nodeName.toLowerCase())?(null===n&&(n=elCreate("p"),e.insertBefore(n,r)),n.appendChild(r)):null!==n&&(n=null),r=l}}}}; })(this);
// plugins/WoltLabButton.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabButton=function(){"use strict";var o;return{init:function(){for(var t,e,o=0,n=this.opts.woltlab.customButtons.length;o<n;o++)e=this.opts.woltlab.customButtons[o],t=this.button.add(e,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);var s,i,a,r,l=this.core.toolbar()[0];for(o=0,n=this.opts.buttons.length;o<n;o++)if("wcfSeparator"!==(e=this.opts.buttons[o])){if(!this.opts.woltlab.buttons.hasOwnProperty(e))throw new Error("Missing button definition for '"+e+"'.");switch(s=this.opts.woltlab.buttons[e],"underline"===e&&(this.opts.activeButtonsStates.u="underline"),e){case"subscript":case"superscript":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.setEvent(t,e,{func:"inline.format"}),this.opts.activeButtonsStates["subscript"===e?"sub":"sup"]=e;break;case"redo":case"undo":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.addCallback(t,this.buffer[e]);break;default:t=this.button.get(e)}if(a=!(i=s.icon).match(/^fa-/)&&i.match(/\.(gif|jpe?g|png|svg)$/),this.button.setIcon(t,'<span class="icon icon16 '+(a?"redactorButtonImage":i)+'"'+(a?" style=\"background-image: url('"+WCF_PATH+"icon/"+i+"')\"":"")+"></span>"),!t[0])throw new Error("Missing button element for '"+e+"'.");t[0].title=s.title,t[0].classList.add("jsTooltip"),"lists"===e&&(r=t.data("dropdown"),elBySel(".redactor-dropdown-outdent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.outdent"),elBySel(".redactor-dropdown-indent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.indent"))}var d=this.opts.buttons.indexOf("tt");-1!==this.opts.buttons.indexOf("code")&&-1!==d&&(this.opts.buttons.splice(d,1),this.opts.buttons.splice(this.opts.buttons.indexOf("code")+1,0,"tt"));for(var c,u={},h=[];l.childElementCount;)c=l.removeChild(l.children[0]),e=elAttr(c.children[0],"rel"),u[e]=c,h.push(e);var b=!1;for(o=0,n=this.opts.buttons.length;o<n;o++)"wcfSeparator"!==(e=this.opts.buttons[o])?(c=u[e],l.appendChild(c),h.splice(h.indexOf(e),1),b&&(c.classList.add("redactor-toolbar-separator"),b=!1)):b=!0;for(o=0,n=l.childElementCount;o<n;o++)t=(c=l.children[o]).children[0],elData(c,"show-on-mobile",-1!==this.opts.woltlab.buttonMobile.indexOf(t.rel));h.forEach(function(t){l.appendChild(u[t])}),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(t){t.on("screen-xs",{match:this.WoltLabButton._enableToggleButton.bind(this),unmatch:this.WoltLabButton._disableToggleButton.bind(this),setup:this.WoltLabButton._setupToggleButton.bind(this)})}.bind(this)),l.addEventListener("dragstart",function(t){t.preventDefault()}),elAttr(elBySel(".re-html",l),"tabindex",0)},_handleCustomButton:function(t){var e,o,n={cancel:!1};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,n),!0!==n.cancel&&(this.buffer.set(),(e=this.marker.get()).classList.add("woltlab-bbcode-marker"),o="["+t+"]"+this.selection.html()+e.outerHTML+"[/"+t+"]",this.insert.html(o),this.selection.restore()),window.setTimeout(function(){document.activeElement!==this.$editor[0]&&this.$editor[0].focus()}.bind(this),10)},_enableToggleButton:function(){null===o.parentNode&&this.$toolbar[0].appendChild(o)},_disableToggleButton:function(){o&&null!==o.parentNode&&this.$toolbar[0].removeChild(o)},_setupToggleButton:function(){(o=elCreate("li")).className="redactorToolbarToggle",o.innerHTML='<a href="#"><span class="icon icon16 fa-caret-down"></span></a>',elData(o,"show-on-mobile",!0);var e=o.children[0].children[0],t=function(t){t instanceof Event&&t.preventDefault(),this.$toolbar[0].classList.toggle("redactorToolbarOverride")&&document.activeElement&&document.activeElement!==this.$editor[0]&&document.activeElement.blur(),e.classList.toggle("fa-caret-down"),e.classList.toggle("fa-caret-up")}.bind(this);o.children[0].addEventListener("mousedown",t),this.$toolbar[0].appendChild(o),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this.$element[0].id,function(){this.$toolbar[0].classList.contains("redactorToolbarOverride")&&t()}.bind(this))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabButton=function(){"use strict";var t;return{init:function(){var t,e,o,n,s,i,a,r,l,d,c,u,h,b;for(o=0,n=this.opts.woltlab.customButtons.length;o<n;o++)e=this.opts.woltlab.customButtons[o],t=this.button.add(e,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);for(s=this.core.toolbar()[0],o=0,n=this.opts.buttons.length;o<n;o++)if("wcfSeparator"!==(e=this.opts.buttons[o])){if(!this.opts.woltlab.buttons.hasOwnProperty(e))throw new Error("Missing button definition for '"+e+"'.");switch(i=this.opts.woltlab.buttons[e],"underline"===e&&(this.opts.activeButtonsStates.u="underline"),e){case"subscript":case"superscript":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.setEvent(t,e,{func:"inline.format"}),this.opts.activeButtonsStates["subscript"===e?"sub":"sup"]=e;break;case"redo":case"undo":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.addCallback(t,this.buffer[e]);break;default:t=this.button.get(e)}if(r=!(a=i.icon).match(/^fa-/)&&a.match(/\.(gif|jpe?g|png|svg)$/),this.button.setIcon(t,'<span class="icon icon16 '+(r?"redactorButtonImage":a)+'"'+(r?" style=\"background-image: url('"+WCF_PATH+"icon/"+a+"')\"":"")+"></span>"),!t[0])throw new Error("Missing button element for '"+e+"'.");t[0].title=i.title,t[0].classList.add("jsTooltip"),"lists"===e&&(l=t.data("dropdown"),elBySel(".redactor-dropdown-outdent span",l[0]).textContent=WCF.Language.get("wcf.editor.list.outdent"),elBySel(".redactor-dropdown-indent span",l[0]).textContent=WCF.Language.get("wcf.editor.list.indent"))}for(d=this.opts.buttons.indexOf("tt"),-1!==this.opts.buttons.indexOf("code")&&-1!==d&&(this.opts.buttons.splice(d,1),this.opts.buttons.splice(this.opts.buttons.indexOf("code")+1,0,"tt")),u={},h=[];s.childElementCount;)c=s.removeChild(s.children[0]),e=elAttr(c.children[0],"rel"),u[e]=c,h.push(e);for(b=!1,o=0,n=this.opts.buttons.length;o<n;o++)"wcfSeparator"!==(e=this.opts.buttons[o])?(c=u[e],s.appendChild(c),h.splice(h.indexOf(e),1),b&&(c.classList.add("redactor-toolbar-separator"),b=!1)):b=!0;for(o=0,n=s.childElementCount;o<n;o++)t=(c=s.children[o]).children[0],elData(c,"show-on-mobile",-1!==this.opts.woltlab.buttonMobile.indexOf(t.rel));h.forEach((function(t){s.appendChild(u[t])})),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(t){t.on("screen-xs",{match:this.WoltLabButton._enableToggleButton.bind(this),unmatch:this.WoltLabButton._disableToggleButton.bind(this),setup:this.WoltLabButton._setupToggleButton.bind(this)})}.bind(this)),s.addEventListener("dragstart",(function(t){t.preventDefault()})),elAttr(elBySel(".re-html",s),"tabindex",0)},_handleCustomButton:function(t){var e,o,n={cancel:!1};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,n),!0!==n.cancel&&(this.buffer.set(),(e=this.marker.get()).classList.add("woltlab-bbcode-marker"),o="["+t+"]"+this.selection.html()+e.outerHTML+"[/"+t+"]",this.insert.html(o),this.selection.restore()),window.setTimeout(function(){document.activeElement!==this.$editor[0]&&this.$editor[0].focus()}.bind(this),10)},_enableToggleButton:function(){null===t.parentNode&&this.$toolbar[0].appendChild(t)},_disableToggleButton:function(){t&&null!==t.parentNode&&this.$toolbar[0].removeChild(t)},_setupToggleButton:function(){var e,o;(t=elCreate("li")).className="redactorToolbarToggle",t.innerHTML='<a href="#"><span class="icon icon16 fa-caret-down"></span></a>',elData(t,"show-on-mobile",!0),e=t.children[0].children[0],o=function(t){t instanceof Event&&t.preventDefault(),this.$toolbar[0].classList.toggle("redactorToolbarOverride")&&document.activeElement&&document.activeElement!==this.$editor[0]&&document.activeElement.blur(),e.classList.toggle("fa-caret-down"),e.classList.toggle("fa-caret-up")}.bind(this),t.children[0].addEventListener("mousedown",o),this.$toolbar[0].appendChild(t),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this.$element[0].id,function(){this.$toolbar[0].classList.contains("redactorToolbarOverride")&&o()}.bind(this))}}}; })(this);
// plugins/WoltLabCaret.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabCaret=function(){"use strict";var u,f=!1,g=!1;return{init:function(){var t=this.caret.after;this.caret.after=function(e){e=this.caret.prepare(e),this.utils.isBlockTag(e.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(e),t.call(this,e)}.bind(this);var n=this.caret.start;this.caret.start=function(e){if(g){if(!(e=this.caret.prepare(e)))return;"P"===e.nodeName&&""===e.innerHTML&&(e.innerHTML="<br>")}n.call(this,e)}.bind(this);var i=this.core.editor()[0];require(["Environment"],function(e){f="ios"===e.platform(),(g="safari"===e.browser())&&i.classList.add("jsSafariMarginClickTarget");var t=this.WoltLabCaret._handleEditorClick.bind(this),n=this.WoltLabCaret._handleEditorMouseUp.bind(this);g&&f?(i.addEventListener("touchstart",function(e){u=e.target},{passive:!0}),i.addEventListener("touchend",function(e){t(e),n(e)}.bind(this))):(i.addEventListener(WCF_CLICK_EVENT,function(e){this.WoltLabCaret._detectTripleClick(e),t(e)}.bind(this)),i.addEventListener("mouseup",n))}.bind(this));var o=this.caret.end;this.caret.end=function(e){"OL"!==(e=this.caret.prepare(e)).nodeName&&"UL"!==e.nodeName||null===(e=e.lastElementChild)&&(e=e.parentNode);var t,n=!1;if(e.nodeType===Node.ELEMENT_NODE&&e.lastChild&&"P"===e.lastChild.nodeName?n=!0:f?(t=this.core.editor()[0],e.parentNode===t&&"<p><br></p>"===t.innerHTML&&(n=!0)):"P"===e.nodeName&&0===e.childNodes.length&&(e.innerHTML="",n=!0),n){var i=window.getSelection(),r=document.createRange();return r.selectNodeContents(e.lastChild),r.collapse(!1),i.removeAllRanges(),void i.addRange(r)}return"P"===e.nodeName&&1===e.childNodes.length&&"BR"===e.childNodes[0].nodeName?this.caret.before(e.childNodes[0]):o.call(this,e)}.bind(this);var r=this.selection.nodes;this.selection.nodes=function(e){var t=r.call(this,e);if(1===t.length&&t[0]===this.$editor[0]){var n=this.selection.range(this.selection.get());if(n.startContainer===n.endContainer)return[n.startContainer]}return t}.bind(this),this.WoltLabCaret._initInternalRange();var a=this.selection.saveInstant;this.selection.saveInstant=function(){var e,t,n=a.call(this);return n&&(n.isAtNodeStart=!1,!(e=window.getSelection()).rangeCount||e.isCollapsed||(t=e.getRangeAt(0)).startContainer.nodeType===Node.TEXT_NODE&&0===t.startOffset&&(n.isAtNodeStart=!0)),n}.bind(this);var d=this.selection.restoreInstant;this.selection.restoreInstant=function(e){if(void 0!==e||this.saved){var t=void 0!==e?e:this.saved;d.call(this,e);var n,i,r,o=window.getSelection();if(o.rangeCount)if(!0===t.isAtNodeStart){if(!o.isCollapsed){var a=o.getRangeAt(0),s=a.startContainer;if(t.node===s)return;for(;null!==s&&"P"!==s.nodeName;)s=s.parentNode;if(null!==s&&null!==(s=s.nextElementSibling)&&"P"===s.nodeName&&0===s.textContent.replace(/\u200B/g,"").length){s=s.nextElementSibling;for(var l=t.node;null!==l&&l!==s;)l=l.parentNode;l===s&&((a=a.cloneRange()).setStart(t.node,0),o.removeAllRanges(),o.addRange(a))}}}else o.isCollapsed&&(n=o.anchorNode,i=this.core.editor()[0],n.nodeType!==Node.TEXT_NODE||n.parentNode!==i||o.anchorOffset!==n.textContent.length||(r=n.nextElementSibling)&&"P"===r.nodeName&&this.caret.start(r))}}.bind(this),this.selection.nodes=function(e){var i=void 0===e?[]:$.isArray(e)?e:[e],t=this.selection.get(),n=this.selection.range(t),r=[],o=[];if(this.utils.isCollapsed())r=[this.selection.current()];else{var a=n.startContainer,s=n.endContainer;if(a===s)return[a];for(var l=n.commonAncestorContainer;a&&a!==s;)r.push(a=this.selection.nextNode(a,l));for(a=n.startContainer;a&&a!==l;)r.unshift(a),a=a.parentNode}return $.each(r,function(e,t){if(t){var n=1===t.nodeType&&t.tagName.toLowerCase();if($(t).hasClass("redactor-script-tag")||$(t).hasClass("redactor-selection-marker"))return;if(n&&0!==i.length&&-1===$.inArray(n,i))return;o.push(t)}}),0===o.length?[]:o}.bind(this),this.selection.nextNode=function(e,t){if(e.hasChildNodes())return e.firstChild;for(;e&&!e.nextSibling;)if(e=e.parentNode,t&&e===t)return null;return e?e.nextSibling:null}},paragraphAfterBlock:function(e){var t=e.nextElementSibling;t&&"P"!==t.nodeName&&(t=elCreate("p"),"<p><br></p>"===this.opts.emptyHtml?t.innerHTML="<br>":t.textContent="",e.parentNode.insertBefore(t,e.nextSibling)),this.caret.after(e)},endOfEditor:function(){var e=this.core.editor()[0];document.activeElement!==e&&e.focus();var t=e.lastElementChild;"P"===t.nodeName?this.caret.end(t):this.caret.after(t)},_initInternalRange:function(){function i(){o=a.rangeCount?a.getRangeAt(0).cloneRange():null}var r=this.core.editor()[0],o=null,a=window.getSelection();this.WoltLabCaret.forceSelectionSave=i;function n(){if(null!==o){if(document.activeElement===r){var e=a.getRangeAt(0);if(0!==e.startOffset)return;for(var t=e.startContainer;t;){if(t.parentNode===r){if(t.previousSibling)return;break}if(t.previousSibling)return;t=t.parentNode}if(!t)return}var n=r.scrollLeft,i=r.scrollTop;r.focus(),r.scrollLeft=n,r.scrollTop=i,a.removeAllRanges(),a.addRange(o),o=null}}r.addEventListener("keyup",i),r.addEventListener("mouseup",function(){a.rangeCount&&i()});var e=this.selection.save;this.selection.save=function(){o=null,e.call(this)}.bind(this);var t=this.selection.restore;this.selection.restore=function(){o&&null===elBySel(".redactor-selection-marker",this.$editor[0])&&(n(),a.rangeCount&&this.utils.isRedactorParent(a.getRangeAt(0).commonAncestorContainer))||t.call(this)}.bind(this);var s=this.buffer.set;this.buffer.set=function(e){var t;document.activeElement!==r&&((t=window.getSelection()).rangeCount&&!1!==this.utils.isRedactorParent(t.anchorNode)?r.focus():n()),s.call(this,e),i()}.bind(this);var l=this.insert.html;this.insert.html=function(e,t){var n=elBySel(".redactor-selection-marker",this.$editor[0]);l.call(this,e,t),!n&&null!==elBySel(".redactor-selection-marker",this.$editor[0])||i()}.bind(this),require(["Environment"],function(e){"ios"===e.platform()&&(r.addEventListener("focus",function(){document.addEventListener("selectionchange",i)}),r.addEventListener("blur",function(){document.removeEventListener("selectionchange",i)}))}.bind(this))},_detectTripleClick:function(e){var t,n,i;e.detail<3||((t=window.getSelection()).isCollapsed||"TR"===(i=t.getRangeAt(0)).commonAncestorContainer.nodeName&&(n=elClosest(i.startContainer,"td"),(i=document.createRange()).selectNodeContents(n),t.removeAllRanges(),t.addRange(i)))},_handleEditorClick:function(e){var t=e.clientY,n=f&&u===e.target&&this.utils.isBlockTag(u.nodeName);if(void 0===t&&n&&(t=e.changedTouches[0].clientY),this.selection.get().isCollapsed||n&&void 0!==t){var i,r=this.selection.block();if(!1===r)if(this.selection.current()!==this.$editor[0]||(i=this.$editor[0].childNodes[this.selection.get().anchorOffset]).nodeType===Node.ELEMENT_NODE&&"TABLE"===i.nodeName&&(r=i),!1===r)return;var o=!1;g&&this.utils.isBlockTag(e.target.nodeName)&&t>e.target.getBoundingClientRect().bottom&&(r=e.target,o=!0);for(var a=e.target;a&&!this.utils.isBlockTag(a.nodeName);)a=a.parentNode;if(a&&(o||a!==r)&&("P"!==r.nodeName||(r=r.parentNode)!==this.$editor[0]&&this.utils.isBlockTag(r.nodeName))){if("TD"===r.nodeName)for(;"TABLE"!==r.nodeName;)r=r.parentNode;if(!r.nodeName.match(/^H\d$/)&&!$(r).closest("ol, ul",this.$editor[0]).length){for(var s,l,d,c,h=r;h;){if(t<(l=h.getBoundingClientRect()).top)s=!0,r=h;else{if(!(t>l.bottom))break;s=!1,r=h}if(!h.parentNode||h.parentNode===this.$editor[0])break;h=h.parentNode}void 0!==s&&((d=r[(s?"previous":"next")+"ElementSibling"])&&"P"===d.nodeName?this.caret.end(d):(this.buffer.set(),(c=elCreate("p")).textContent="",r.parentNode.insertBefore(c,s?r:r.nextSibling),this.caret.end(c)))}}}},_handleEditorMouseUp:function(e){var t,n=window.getSelection();if(n.isCollapsed||g&&f&&u===e.target&&this.utils.isBlockTag(u.nodeName))if(e.target===this.$editor[0])(i=n.anchorNode).nodeType===Node.TEXT_NODE&&(i=i.parentNode),"KBD"===i.nodeName&&(null!==(t=i.previousSibling)&&""===t.textContent||(t=document.createTextNode(""),i.parentNode.insertBefore(t,i)),this.caret.before(t));else if("KBD"===e.target.nodeName){var i,r,o,a=e.target;if((i=n.anchorNode).nodeType===Node.TEXT_NODE){for(t=i;(t=t.nextSibling)&&t.nodeType===Node.TEXT_NODE&&(""===t.textContent||""===t.textContent););t===a&&(0!==a.childNodes.length&&""===a.childNodes[0].textContent||(r=document.createTextNode(""),a.insertBefore(r,a.firstChild)),(o=document.createRange()).setStartAfter(a.childNodes[0]),o.setEndAfter(a.childNodes[0]),n.removeAllRanges(),n.addRange(o))}}},_addParagraphAfterBlock:function(e){var t=e.nextElementSibling;t&&("P"===t.nodeName||this.utils.isBlockTag(t.nodeName))||((t=elCreate("p")).textContent="",e.parentNode.insertBefore(t,e.nextSibling))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabCaret=function(){"use strict";var e,t=!1,n=!1;return{init:function(){var i,o,r,a,s,l,d=this.caret.after;this.caret.after=function(e){e=this.caret.prepare(e),this.utils.isBlockTag(e.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(e),d.call(this,e)}.bind(this),i=this.caret.start,this.caret.start=function(e){if(n){if(!(e=this.caret.prepare(e)))return;"P"===e.nodeName&&""===e.innerHTML&&(e.innerHTML="<br>")}i.call(this,e)}.bind(this),o=this.core.editor()[0],require(["Environment"],function(i){var r,a;t="ios"===i.platform(),(n="safari"===i.browser())&&o.classList.add("jsSafariMarginClickTarget"),r=this.WoltLabCaret._handleEditorClick.bind(this),a=this.WoltLabCaret._handleEditorMouseUp.bind(this),n&&t?(o.addEventListener("touchstart",(function(t){e=t.target}),{passive:!0}),o.addEventListener("touchend",function(e){r(e),a(e)}.bind(this))):(o.addEventListener("click",function(e){this.WoltLabCaret._detectTripleClick(e),r(e)}.bind(this)),o.addEventListener("mouseup",a))}.bind(this)),r=this.caret.end,this.caret.end=function(e){var n,i,o,a;return"OL"!==(e=this.caret.prepare(e)).nodeName&&"UL"!==e.nodeName||null===(e=e.lastElementChild)&&(e=e.parentNode),n=!1,e.nodeType===Node.ELEMENT_NODE&&e.lastChild&&"P"===e.lastChild.nodeName?n=!0:t?(i=this.core.editor()[0],e.parentNode===i&&"<p><br></p>"===i.innerHTML&&(n=!0)):"P"===e.nodeName&&0===e.childNodes.length&&(e.innerHTML="",n=!0),n?(o=window.getSelection(),(a=document.createRange()).selectNodeContents(e.lastChild),a.collapse(!1),o.removeAllRanges(),void o.addRange(a)):"P"===e.nodeName&&1===e.childNodes.length&&"BR"===e.childNodes[0].nodeName?this.caret.before(e.childNodes[0]):r.call(this,e)}.bind(this),a=this.selection.nodes,this.selection.nodes=function(e){var t,n=a.call(this,e);return 1===n.length&&n[0]===this.$editor[0]&&(t=this.selection.range(this.selection.get())).startContainer===t.endContainer?[t.startContainer]:n}.bind(this),this.WoltLabCaret._initInternalRange(),s=this.selection.saveInstant,this.selection.saveInstant=function(){var e,t,n=s.call(this);return n&&(n.isAtNodeStart=!1,(e=window.getSelection()).rangeCount&&!e.isCollapsed&&(t=e.getRangeAt(0)).startContainer.nodeType===Node.TEXT_NODE&&0===t.startOffset&&(n.isAtNodeStart=!0)),n}.bind(this),l=this.selection.restoreInstant,this.selection.restoreInstant=function(e){var t,n,i,o,r,a,s,d;if((void 0!==e||this.saved)&&(t=void 0!==e?e:this.saved,l.call(this,e),(n=window.getSelection()).rangeCount))if(!0===t.isAtNodeStart){if(!n.isCollapsed){if(o=(i=n.getRangeAt(0)).startContainer,t.node===o)return;for(;null!==o&&"P"!==o.nodeName;)o=o.parentNode;if(null!==o&&null!==(o=o.nextElementSibling)&&"P"===o.nodeName&&0===o.textContent.replace(/\u200B/g,"").length){for(o=o.nextElementSibling,r=t.node;null!==r&&r!==o;)r=r.parentNode;r===o&&((i=i.cloneRange()).setStart(t.node,0),n.removeAllRanges(),n.addRange(i))}}}else n.isCollapsed&&(a=n.anchorNode,s=this.core.editor()[0],a.nodeType===Node.TEXT_NODE&&a.parentNode===s&&n.anchorOffset===a.textContent.length&&(d=a.nextElementSibling)&&"P"===d.nodeName&&this.caret.start(d))}.bind(this),this.selection.nodes=function(e){var t,n,i,o=void 0===e?[]:$.isArray(e)?e:[e],r=this.selection.get(),a=this.selection.range(r),s=[],l=[];if(this.utils.isCollapsed())s=[this.selection.current()];else{if((t=a.startContainer)===(n=a.endContainer))return[t];for(i=a.commonAncestorContainer;t&&t!==n;)s.push(t=this.selection.nextNode(t,i));for(t=a.startContainer;t&&t!==i;)s.unshift(t),t=t.parentNode}return $.each(s,(function(e,t){if(t){var n=1===t.nodeType&&t.tagName.toLowerCase();if($(t).hasClass("redactor-script-tag")||$(t).hasClass("redactor-selection-marker"))return;if(n&&0!==o.length&&-1===$.inArray(n,o))return;l.push(t)}})),0===l.length?[]:l}.bind(this),this.selection.nextNode=function(e,t){if(e.hasChildNodes())return e.firstChild;for(;e&&!e.nextSibling;)if(e=e.parentNode,t&&e===t)return null;return e?e.nextSibling:null}},paragraphAfterBlock:function(e){var t=e.nextElementSibling;t&&"P"!==t.nodeName&&(t=elCreate("p"),"<p><br></p>"===this.opts.emptyHtml?t.innerHTML="<br>":t.textContent="",e.parentNode.insertBefore(t,e.nextSibling)),this.caret.after(e)},endOfEditor:function(){var e,t=this.core.editor()[0];document.activeElement!==t&&t.focus(),"P"===(e=t.lastElementChild).nodeName?this.caret.end(e):this.caret.after(e)},_initInternalRange:function(){var e,t,n,i,o,r=this.core.editor()[0],a=null,s=window.getSelection(),l=function(){a=s.rangeCount?s.getRangeAt(0).cloneRange():null};this.WoltLabCaret.forceSelectionSave=l,e=function(){var e,t,n,i;if(null!==a){if(document.activeElement===r){if(0!==(e=s.getRangeAt(0)).startOffset)return;for(t=e.startContainer;t;){if(t.parentNode===r){if(t.previousSibling)return;break}if(t.previousSibling)return;t=t.parentNode}if(!t)return}n=r.scrollLeft,i=r.scrollTop,r.focus(),r.scrollLeft=n,r.scrollTop=i,s.removeAllRanges(),s.addRange(a),a=null}},r.addEventListener("keyup",l),r.addEventListener("mouseup",(function(){s.rangeCount&&l()})),t=this.selection.save,this.selection.save=function(){a=null,t.call(this)}.bind(this),n=this.selection.restore,this.selection.restore=function(){a&&null===elBySel(".redactor-selection-marker",this.$editor[0])&&(e(),s.rangeCount&&this.utils.isRedactorParent(s.getRangeAt(0).commonAncestorContainer))||n.call(this)}.bind(this),i=this.buffer.set,this.buffer.set=function(t){if(document.activeElement!==r){var n=window.getSelection();n.rangeCount&&!1!==this.utils.isRedactorParent(n.anchorNode)?r.focus():e()}i.call(this,t),l()}.bind(this),o=this.insert.html,this.insert.html=function(e,t){var n=elBySel(".redactor-selection-marker",this.$editor[0]);o.call(this,e,t),(n||null===elBySel(".redactor-selection-marker",this.$editor[0]))&&l()}.bind(this),require(["Environment"],function(e){"ios"===e.platform()&&(r.addEventListener("focus",(function(){document.addEventListener("selectionchange",l)})),r.addEventListener("blur",(function(){document.removeEventListener("selectionchange",l)})))}.bind(this))},_detectTripleClick:function(e){var t,n,i;e.detail<3||(t=window.getSelection()).isCollapsed||"TR"===(n=t.getRangeAt(0)).commonAncestorContainer.nodeName&&(i=elClosest(n.startContainer,"td"),(n=document.createRange()).selectNodeContents(i),t.removeAllRanges(),t.addRange(n))},_handleEditorClick:function(i){var o,r,a,s,l,d,c,h,u,f=i.clientY,g=t&&e===i.target&&this.utils.isBlockTag(e.nodeName);if(void 0===f&&g&&(f=i.changedTouches[0].clientY),(this.selection.get().isCollapsed||g&&void 0!==f)&&(!1!==(o=this.selection.block())||(this.selection.current()===this.$editor[0]&&(r=this.$editor[0].childNodes[this.selection.get().anchorOffset]).nodeType===Node.ELEMENT_NODE&&"TABLE"===r.nodeName&&(o=r),!1!==o))){for(a=!1,n&&this.utils.isBlockTag(i.target.nodeName)&&f>i.target.getBoundingClientRect().bottom&&(o=i.target,a=!0),s=i.target;s&&!this.utils.isBlockTag(s.nodeName);)s=s.parentNode;if(s&&(a||s!==o)&&("P"!==o.nodeName||(o=o.parentNode)!==this.$editor[0]&&this.utils.isBlockTag(o.nodeName))){if("TD"===o.nodeName)for(;"TABLE"!==o.nodeName;)o=o.parentNode;if(!o.nodeName.match(/^H\d$/)&&!$(o).closest("ol, ul",this.$editor[0]).length){for(c=o;c;){if(f<(d=c.getBoundingClientRect()).top)l=!0,o=c;else{if(!(f>d.bottom))break;l=!1,o=c}if(!c.parentNode||c.parentNode===this.$editor[0])break;c=c.parentNode}void 0!==l&&((h=o[(l?"previous":"next")+"ElementSibling"])&&"P"===h.nodeName?this.caret.end(h):(this.buffer.set(),(u=elCreate("p")).textContent="",o.parentNode.insertBefore(u,l?o:o.nextSibling),this.caret.end(u)))}}}},_handleEditorMouseUp:function(i){var o,r,a,s,l,d=window.getSelection();if(d.isCollapsed||n&&t&&e===i.target&&this.utils.isBlockTag(e.nodeName))if(i.target===this.$editor[0])(o=d.anchorNode).nodeType===Node.TEXT_NODE&&(o=o.parentNode),"KBD"===o.nodeName&&(null!==(r=o.previousSibling)&&""===r.textContent||(r=document.createTextNode(""),o.parentNode.insertBefore(r,o)),this.caret.before(r));else if("KBD"===i.target.nodeName&&(a=i.target,(o=d.anchorNode).nodeType===Node.TEXT_NODE)){for(r=o;(r=r.nextSibling)&&r.nodeType===Node.TEXT_NODE&&(""===r.textContent||""===r.textContent););r===a&&(0!==a.childNodes.length&&""===a.childNodes[0].textContent||(s=document.createTextNode(""),a.insertBefore(s,a.firstChild)),(l=document.createRange()).setStartAfter(a.childNodes[0]),l.setEndAfter(a.childNodes[0]),d.removeAllRanges(),d.addRange(l))}},_addParagraphAfterBlock:function(e){var t=e.nextElementSibling;t&&("P"===t.nodeName||this.utils.isBlockTag(t.nodeName))||((t=elCreate("p")).textContent="",e.parentNode.insertBefore(t,e.nextSibling))}}}; })(this);
// plugins/WoltLabClean.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var n=this.clean.onSet;this.clean.onSet=function(e){e=(e=(e=e.replace(/\u200B/g,"")).replace(/&amp;/g,"@@@WCF_LITERAL_AMP@@@")).replace(/&/g,"&WCF_AMPERSAND&"),e=(e=(e=n.call(this,e)).replace(/&WCF_AMPERSAND&(amp;)?/g,"&")).replace(/@@@WCF_LITERAL_AMP@@@/g,"&amp;");var t=elCreate("div");return t.innerHTML=e,elBySelAll("*",t,function(e){for(var t,n=[],r=0,l=e.attributes.length;r<l;r++)0===(t=e.attributes[r]).name.indexOf("on")&&n.push(t.name);n.forEach(e.removeAttribute.bind(e))}),elBySelAll("iframe",t,elRemove),elBySelAll("pre",t,function(e){e.classList.contains("redactor-script-tag")&&elRemove(e)}),elBySelAll("td",t,function(e){0===e.childNodes.length&&(e.innerHTML="")}),elBySelAll("pre, woltlab-quote, woltlab-spoiler",t,function(e){0!==e.childElementCount||0!==e.textContent.length&&!e.textContent.match(/^\r?\n$/)||(e.textContent="")}),e=t.innerHTML}.bind(this);var r=this.clean.onSync;this.clean.onSync=function(e){var t=elCreate("div");t.innerHTML=e;var n={};return elBySelAll("pre",t,function(e){var t=WCF.getUUID();n[t]=e.textContent,e.textContent=t}),elBySelAll("p",t,function(e){var t,n=e.lastElementChild;n&&"BR"===n.nodeName&&(n.nextSibling?n.nextSibling.textContent.replace(/[\r\n\t]/g,"").match(/^\u200B+$/)&&((t=elCreate("p")).innerHTML="<br>",e.parentNode.insertBefore(t,e.nextSibling),e.removeChild(n.nextSibling),e.removeChild(n)):(n.previousElementSibling||n.previousSibling&&""!==n.previousSibling.textContent.replace(/\u200B/g,"").trim())&&e.removeChild(n))}),elBySelAll("span",t,function(e){var t;0<e.childNodes.length&&((t=e.childNodes[e.childNodes.length-1]).nodeType===Node.TEXT_NODE&&t.textContent.match(/\n$/)&&(t.textContent=t.textContent.replace(/\n+$/,e.parentNode.lastChild===e?"":" ")))}),e=(e=(e=t.innerHTML).replace(/<p>\u200B<\/p>/g,"<p><br></p>")).replace(/&/g,"&WCF_AMPERSAND&"),e=(e=r.call(this,e)).replace(/&WCF_AMPERSAND&/g,"&"),t.innerHTML=e,elBySelAll("pre",t,function(e){n.hasOwnProperty(e.textContent)&&(e.textContent=n[e.textContent])}),e=t.innerHTML}.bind(this);var l=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=l.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var b=this.clean.onPaste;this.clean.onPaste=function(e,t,n){if(t.pre||this.utils.isCurrentOrParent("kbd"))return t.pre&&this.opts.preSpaces&&(e=e.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),WCF.String.escapeHTML(e);this.clean.isHtmlMsWord(e)&&(e=this.clean.cleanMsWord(e));var r,l=elCreate("div");l.innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,"");var i=!0;for(s=0,c=l.childElementCount;s<c;s++){if("DIV"!==(r=l.children[s]).nodeName||0===r.childNodes.length){i=!1;break}if(1===r.childNodes.length&&1===r.childElementCount){var o=r.children[0];if(0===o.childNodes.length&&"BR"!==o.nodeName){i=!1;break}}}if(i){for(var a=[],s=0,c=l.childElementCount;s<c;s++)a.push(l.children[s]);a.forEach(function(e){var t=elCreate("p");for(l.insertBefore(t,e);0<e.childNodes.length;)t.appendChild(e.childNodes[0]);l.removeChild(e)})}var h,d,p=null!==elBySel(".MsoNormal",l),u=elBySelAll("[style]",l);for(s=0,c=u.length;s<c;s++){h=[];for(var f=0,m=(r=u[s]).style.length;f<m;f++){var g,v,y=r.style[f];-1===this.opts.woltlab.allowedInlineStyles.indexOf(y)&&("font-weight"===y&&"STRONG"!==r.nodeName?("bold"!==(v=r.style.getPropertyValue(y))&&"bolder"!==v||(v=600),500<(v=~~v)&&(d=elCreate("strong"),r.parentNode.insertBefore(d,r),d.appendChild(r))):p&&"margin-bottom"===y&&"P"===r.nodeName&&(v=r.style.getPropertyValue(y)).match(/^12(?:\.0)?pt$/)&&((g=elCreate("p")).innerHTML="<br>",r.parentNode.insertBefore(g,r.nextSibling)),h.push(y))}h.forEach(function(e){r.style.removeProperty(e)})}return elBySelAll("span",l,function(e){if(!e.classList.contains("redactor-selection-marker"))if(e.hasAttribute("style")&&e.style.length)for(var t=e.style.getPropertyValue("color"),n=e.style.getPropertyValue("font-family"),r=e.style.getPropertyValue("font-size"),l=(t?1:0)+(n?1:0)+(r?1:0);1<l;){if(this.opts.pastePlainText)return e.style.removeProperty("color"),e.style.removeProperty("font-family"),void e.style.removeProperty("font-size");var i=elCreate("span");t?(i.style.setProperty("color",t,""),e.style.removeProperty("color"),t="",l--):n?(i.style.setProperty("font-family",n,""),e.style.removeProperty("font-family"),n="",l--):r&&(i.style.setProperty("font-size",r,""),e.style.removeProperty("font-size"),r="",l--),e.parentNode.insertBefore(i,e),i.appendChild(e)}else{for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}.bind(this)),elBySelAll("p",l,function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="<br>"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")}),elBySelAll("img",l,function(e){e.removeAttribute("style")}),elBySelAll("br",l,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)}),elBySelAll("kbd",l,function(e){for(e.insertBefore(document.createTextNode("[tt]"),e.firstChild),e.appendChild(document.createTextNode("[/tt]"));e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}),e=(e=(e=b.call(this,l.innerHTML,t,n)).replace(/\n*@@@WOLTLAB-BR-MARKER@@@\n*/g,"<woltlab-br-marker></woltlab-br-marker>")).replace(/(<p>)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,function(e,t,n){return t?'<p class="text-'+n+'">':""}),l.innerHTML=e.replace(/&quot;/g,"""),elBySelAll("woltlab-br-marker",l,function(e){var t=e.parentNode;if(null!==t){for(var n=!1,r=t;null!==r;)"P"===r.nodeName&&(n=!0),r=r.parentNode;if(n){var l=elCreate("p"),i=!(l.innerHTML="<br>"),o=e.nextSibling;o&&"WOLTLAB-BR-MARKER"===o.nodeName&&(i=!0);for(var a=!i;e.nextSibling;)a&&0!==e.nextSibling.textContent.replace(/\u200B/g,"").trim().length&&(a=!1),l.appendChild(e.nextSibling);a||elRemove(l.firstElementChild);var s=e.previousSibling;s&&"BR"===s.nodeName&&elRemove(s),t.parentNode.insertBefore(l,t.nextSibling),i&&((l=elCreate("p")).innerHTML="<br>",t.parentNode.insertBefore(l,t.nextSibling))}else t.insertBefore(elCreate("br"),e);elRemove(e)}}),elBySelAll("p",l,function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent?(t=!0,elBySelAll("*",e,function(e){"SPAN"!==e.nodeName&&(t=!1)})):0===e.textContent.trim().length&&(elBySelAll("span",e,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),0===e.children.length&&(e.innerHTML="<br>")),t&&elRemove(e)}),l.innerHTML}.bind(this);function i(e,t){for(var n,r,l={},i=0,o=t.length;i<o;i++)n=t[i],r=elAttr(e,n),"style"===n&&0===e.style.length&&0===r.indexOf("font-family")&&(r=r.replace(/"/g,"")),l[n]=r;a.push({element:e,attributes:l})}var a=[],o=this.clean.convertTags;this.clean.convertTags=function(e,t){var n=elCreate("div");n.innerHTML=e,a=[],WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,{addToStorage:i,div:n}),elBySelAll("span",n,function(e){i(e,["style"])}),a.forEach(function(e,t){var n=e.element,r=n.parentNode;for(r.insertBefore(document.createTextNode("###custom"+t+"###"),n),r.insertBefore(document.createTextNode("###/custom"+t+"###"),n.nextSibling);n.childNodes.length;)r.insertBefore(n.childNodes[0],n);r.removeChild(n)});var r=!1;t.links&&this.opts.pasteLinks&&(elBySelAll("a",n,function(e){e.href&&(e.outerHTML='#@###[a href="'+e.href+'"]###@#'+e.innerHTML+"#@###[/a]###@#")}),r=!0,t.links=!1);var l=!1;return t.images&&this.opts.pasteImages&&(elBySelAll("img",n,function(e){if(e.src){for(var t,n='#####[img src="'+e.src+'"',r=0,l=e.attributes.length;r<l;r++)"src"!==(t=e.attributes.item(r)).name&&(n+=" "+t.name+'="'+t.value+'"');e.outerHTML=n+"]#####"}}),l=!0,t.images=!1),e=o.call(this,n.innerHTML,t),l&&(t.images=!0),r&&(t.links=!0),e}.bind(this);var s=this.clean.reconvertTags;this.clean.reconvertTags=function(e,t){var n;return a.length&&(e=e.replace(/###(\/?)custom(\d+)###/g,'<$1woltlab-custom-tag data-index="$2">'),(n=elCreate("div")).innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(a[t]){var n=a[t],r=elCreate(n.element.nodeName);for(var l in n.attributes)n.attributes.hasOwnProperty(l)&&elAttr(r,l,n.attributes[l]);for(e.parentNode.insertBefore(r,e);e.childNodes.length;)r.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML),(t.links&&this.opts.pasteLinks||t.images&&this.opts.pasteImages)&&(e=(e=e.replace(new RegExp("#@###\\[","gi"),"<")).replace(new RegExp("\\]###@#","gi"),">")),s.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e};var c=this.clean.getCurrentType;this.clean.getCurrentType=function(e,t){var n=c.call(this,e,t);return this.utils.isCurrentOrParent(["kbd"])&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),n}.bind(this);this.clean.removeEmptyInlineTags;this.clean.removeEmptyInlineTags=function(e){var t=this.opts.inlineTags,n=$("<div/>").html($.parseHTML(e,document,!0)),r=this,l=n.find("span"),i=n.find(t.join(","));return i.filter(":not(span)").removeAttr("style"),i.each(function(){var e=$(this).html();0===this.attributes.length&&r.utils.isEmpty(e)&&$(this).replaceWith(function(){return $(this).contents()})}),l.each(function(){$(this).html();0===this.attributes.length&&$(this).replaceWith(function(){return $(this).contents()})}),e=(e=(e=(e=n.html()).replace("\x3c!--?php","<?php")).replace("\x3c!--?","<?")).replace("?--\x3e","?>"),n.remove(),e}.bind(this)},removeRedundantStyles:function(){var t,r=[];elBySelAll(["del","em","strong","sub","sup","u"].join(","),this.$editor[0],function(e){elBySelAll(e.nodeName,e,function(e){r.push(e)})}),this.opts.pastePlainText||(elBySelAll("span[style]",this.$editor[0],function(n){["color","font-family","font-size"].forEach(function(e){var t=n.style.getPropertyValue(e);t&&window.getComputedStyle(n.parentNode).getPropertyValue(e)===t&&r.push(n)})}),r.forEach(function(e){for(t=e.parentNode;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var e,t,n,l,r,i,o,a,s=this.clean.onSet;this.clean.onSet=function(e){e=(e=(e=e.replace(/\u200B/g,"")).replace(/&amp;/g,"@@@WCF_LITERAL_AMP@@@")).replace(/&/g,"&WCF_AMPERSAND&"),e=(e=(e=s.call(this,e)).replace(/&WCF_AMPERSAND&(amp;)?/g,"&")).replace(/@@@WCF_LITERAL_AMP@@@/g,"&amp;");var t=elCreate("div");return t.innerHTML=e,elBySelAll("*",t,(function(e){var t,n,l,r=[];for(n=0,l=e.attributes.length;n<l;n++)0===(t=e.attributes[n]).name.indexOf("on")&&r.push(t.name);r.forEach(e.removeAttribute.bind(e))})),elBySelAll("iframe",t,elRemove),elBySelAll("pre",t,(function(e){e.classList.contains("redactor-script-tag")&&elRemove(e)})),elBySelAll("td",t,(function(e){0===e.childNodes.length&&(e.innerHTML="")})),elBySelAll("pre, woltlab-quote, woltlab-spoiler",t,(function(e){0!==e.childElementCount||0!==e.textContent.length&&!e.textContent.match(/^\r?\n$/)||(e.textContent="")})),e=t.innerHTML}.bind(this),e=this.clean.onSync,this.clean.onSync=function(t){var n,l=elCreate("div");return l.innerHTML=t,n={},elBySelAll("pre",l,(function(e){var t=WCF.getUUID();n[t]=e.textContent,e.textContent=t})),elBySelAll("p",l,(function(e){var t,n=e.lastElementChild;n&&"BR"===n.nodeName&&(n.nextSibling?n.nextSibling.textContent.replace(/[\r\n\t]/g,"").match(/^\u200B+$/)&&((t=elCreate("p")).innerHTML="<br>",e.parentNode.insertBefore(t,e.nextSibling),e.removeChild(n.nextSibling),e.removeChild(n)):(n.previousElementSibling||n.previousSibling&&""!==n.previousSibling.textContent.replace(/\u200B/g,"").trim())&&e.removeChild(n))})),elBySelAll("span",l,(function(e){if(e.childNodes.length>0){var t=e.childNodes[e.childNodes.length-1];t.nodeType===Node.TEXT_NODE&&t.textContent.match(/\n$/)&&(t.textContent=t.textContent.replace(/\n+$/,e.parentNode.lastChild===e?"":" "))}})),t=(t=(t=l.innerHTML).replace(/<p>\u200B<\/p>/g,"<p><br></p>")).replace(/&/g,"&WCF_AMPERSAND&"),t=(t=e.call(this,t)).replace(/&WCF_AMPERSAND&/g,"&"),l.innerHTML=t,elBySelAll("pre",l,(function(e){n.hasOwnProperty(e.textContent)&&(e.textContent=n[e.textContent])})),t=l.innerHTML}.bind(this),t=this.clean.savePreFormatting,this.clean.savePreFormatting=function(e){var n=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=t.call(this,e),this.clean.encodeEntities=n,e}.bind(this),n=this.clean.onPaste,this.clean.onPaste=function(e,t,l){var r,i,o,a,s,c,h,d,p,u,f,m,g,y,v,b;if(t.pre||this.utils.isCurrentOrParent("kbd"))return t.pre&&this.opts.preSpaces&&(e=e.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),WCF.String.escapeHTML(e);for(this.clean.isHtmlMsWord(e)&&(e=this.clean.cleanMsWord(e)),(r=elCreate("div")).innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,""),s=!0,o=0,a=r.childElementCount;o<a;o++){if("DIV"!==(i=r.children[o]).nodeName||0===i.childNodes.length){s=!1;break}if(1===i.childNodes.length&&1===i.childElementCount&&0===(c=i.children[0]).childNodes.length&&"BR"!==c.nodeName){s=!1;break}}if(s){for(h=[],o=0,a=r.childElementCount;o<a;o++)h.push(r.children[o]);h.forEach((function(e){var t=elCreate("p");for(r.insertBefore(t,e);e.childNodes.length>0;)t.appendChild(e.childNodes[0]);r.removeChild(e)}))}for(d=null!==elBySel(".MsoNormal",r),o=0,a=(p=elBySelAll("[style]",r)).length;o<a;o++){for(f=[],y=0,v=(i=p[o]).style.length;y<v;y++)u=i.style[y],-1===this.opts.woltlab.allowedInlineStyles.indexOf(u)&&("font-weight"===u&&"STRONG"!==i.nodeName?("bold"!==(g=i.style.getPropertyValue(u))&&"bolder"!==g||(g=600),(g=~~g)>500&&(m=elCreate("strong"),i.parentNode.insertBefore(m,i),m.appendChild(i))):d&&"margin-bottom"===u&&"P"===i.nodeName&&(g=i.style.getPropertyValue(u)).match(/^12(?:\.0)?pt$/)&&((b=elCreate("p")).innerHTML="<br>",i.parentNode.insertBefore(b,i.nextSibling)),f.push(u));f.forEach((function(e){i.style.removeProperty(e)}))}return elBySelAll("span",r,function(e){var t,n,l,r,i;if(!e.classList.contains("redactor-selection-marker"))if(e.hasAttribute("style")&&e.style.length)for(r=((t=e.style.getPropertyValue("color"))?1:0)+((n=e.style.getPropertyValue("font-family"))?1:0)+((l=e.style.getPropertyValue("font-size"))?1:0);r>1;){if(this.opts.pastePlainText)return e.style.removeProperty("color"),e.style.removeProperty("font-family"),void e.style.removeProperty("font-size");i=elCreate("span"),t?(i.style.setProperty("color",t,""),e.style.removeProperty("color"),t="",r--):n?(i.style.setProperty("font-family",n,""),e.style.removeProperty("font-family"),n="",r--):l&&(i.style.setProperty("font-size",l,""),e.style.removeProperty("font-size"),l="",r--),e.parentNode.insertBefore(i,e),i.appendChild(e)}else{for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}.bind(this)),elBySelAll("p",r,(function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="<br>"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")})),elBySelAll("img",r,(function(e){e.removeAttribute("style")})),elBySelAll("br",r,(function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)})),elBySelAll("kbd",r,(function(e){for(e.insertBefore(document.createTextNode("[tt]"),e.firstChild),e.appendChild(document.createTextNode("[/tt]"));e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)})),e=(e=(e=n.call(this,r.innerHTML,t,l)).replace(/\n*@@@WOLTLAB-BR-MARKER@@@\n*/g,"<woltlab-br-marker></woltlab-br-marker>")).replace(/(<p>)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,(function(e,t,n){return t?'<p class="text-'+n+'">':""})),r.innerHTML=e.replace(/&quot;/g,"""),elBySelAll("woltlab-br-marker",r,(function(e){var t,n,l,r,i,o,a,s=e.parentNode;if(null!==s){for(t=!1,n=s;null!==n;)"P"===n.nodeName&&(t=!0),n=n.parentNode;if(t){for((l=elCreate("p")).innerHTML="<br>",r=!1,(i=e.nextSibling)&&"WOLTLAB-BR-MARKER"===i.nodeName&&(r=!0),o=!r;e.nextSibling;)o&&0!==e.nextSibling.textContent.replace(/\u200B/g,"").trim().length&&(o=!1),l.appendChild(e.nextSibling);o||elRemove(l.firstElementChild),(a=e.previousSibling)&&"BR"===a.nodeName&&elRemove(a),s.parentNode.insertBefore(l,s.nextSibling),r&&((l=elCreate("p")).innerHTML="<br>",s.parentNode.insertBefore(l,s.nextSibling))}else s.insertBefore(elCreate("br"),e);elRemove(e)}})),elBySelAll("p",r,(function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent?(t=!0,elBySelAll("*",e,(function(e){"SPAN"!==e.nodeName&&(t=!1)}))):0===e.textContent.trim().length&&(elBySelAll("span",e,(function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}})),0===e.children.length&&(e.innerHTML="<br>")),t&&elRemove(e)})),r.innerHTML}.bind(this),l=[],r=function(e,t){var n,r,i,o,a={};for(i=0,o=t.length;i<o;i++)n=t[i],r=elAttr(e,n),"style"===n&&0===e.style.length&&0===r.indexOf("font-family")&&(r=r.replace(/"/g,"")),a[n]=r;l.push({element:e,attributes:a})},i=this.clean.convertTags,this.clean.convertTags=function(e,t){var n,o,a=elCreate("div");return a.innerHTML=e,l=[],WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,{addToStorage:r,div:a}),elBySelAll("span",a,(function(e){r(e,["style"])})),l.forEach((function(e,t){var n=e.element,l=n.parentNode;for(l.insertBefore(document.createTextNode("###custom"+t+"###"),n),l.insertBefore(document.createTextNode("###/custom"+t+"###"),n.nextSibling);n.childNodes.length;)l.insertBefore(n.childNodes[0],n);l.removeChild(n)})),n=!1,t.links&&this.opts.pasteLinks&&(elBySelAll("a",a,(function(e){e.href&&(e.outerHTML='#@###[a href="'+e.href+'"]###@#'+e.innerHTML+"#@###[/a]###@#")})),n=!0,t.links=!1),o=!1,t.images&&this.opts.pasteImages&&(elBySelAll("img",a,(function(e){var t,n,l,r;if(e.src){for(t='#####[img src="'+e.src+'"',l=0,r=e.attributes.length;l<r;l++)"src"!==(n=e.attributes.item(l)).name&&(t+=" "+n.name+'="'+n.value+'"');e.outerHTML=t+"]#####"}})),o=!0,t.images=!1),e=i.call(this,a.innerHTML,t),o&&(t.images=!0),n&&(t.links=!0),e}.bind(this),o=this.clean.reconvertTags,this.clean.reconvertTags=function(e,t){if(l.length){e=e.replace(/###(\/?)custom(\d+)###/g,'<$1woltlab-custom-tag data-index="$2">');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,(function(e){var t,n,r,i=~~elData(e,"index");if(l[i]){for(r in t=l[i],n=elCreate(t.element.nodeName),t.attributes)t.attributes.hasOwnProperty(r)&&elAttr(n,r,t.attributes[r]);for(e.parentNode.insertBefore(n,e);e.childNodes.length;)n.appendChild(e.childNodes[0])}elRemove(e)})),e=n.innerHTML}return(t.links&&this.opts.pasteLinks||t.images&&this.opts.pasteImages)&&(e=(e=e.replace(new RegExp("#@###\\[","gi"),"<")).replace(new RegExp("\\]###@#","gi"),">")),o.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e},a=this.clean.getCurrentType,this.clean.getCurrentType=function(e,t){var n=a.call(this,e,t);return this.utils.isCurrentOrParent(["kbd"])&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),n}.bind(this),this.clean.removeEmptyInlineTags,this.clean.removeEmptyInlineTags=function(e){var t=this.opts.inlineTags,n=$("<div/>").html($.parseHTML(e,document,!0)),l=this,r=n.find("span"),i=n.find(t.join(","));return i.filter(":not(span)").removeAttr("style"),i.each((function(){var e=$(this).html();0===this.attributes.length&&l.utils.isEmpty(e)&&$(this).replaceWith((function(){return $(this).contents()}))})),r.each((function(){$(this).html();0===this.attributes.length&&$(this).replaceWith((function(){return $(this).contents()}))})),e=(e=(e=(e=n.html()).replace("\x3c!--?php","<?php")).replace("\x3c!--?","<?")).replace("?--\x3e","?>"),n.remove(),e}.bind(this)},removeRedundantStyles:function(){var e,t=[],n=["del","em","strong","sub","sup","u"];elBySelAll(n.join(","),this.$editor[0],(function(e){elBySelAll(e.nodeName,e,(function(e){t.push(e)}))})),this.opts.pastePlainText||(elBySelAll("span[style]",this.$editor[0],(function(e){["color","font-family","font-size"].forEach((function(n){var l=e.style.getPropertyValue(n);l&&window.getComputedStyle(e.parentNode).getPropertyValue(n)===l&&t.push(e)}))})),t.forEach((function(t){for(e=t.parentNode;t.childNodes.length;)e.insertBefore(t.childNodes[0],t);e.removeChild(t)})))}}}; })(this);
// plugins/WoltLabCode.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this));var e=this.code.start;this.code.start=function(t){e.call(this,t),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id),elBySelAll("kbd",this.$editor[0],function(t){var e,i=t.nextSibling;i&&i.nodeType===Node.TEXT_NODE&&""===i.textContent.substr(0,1)||(e=document.createTextNode(""),t.parentNode.insertBefore(e,i))})}.bind(this);var i=this.code.set;this.code.set=function(t,e){i.call(this,t,e),this.utils.isEmpty()&&this.observe.toolbar()}.bind(this);var t=this.code.get;this.code.get=function(){return this.code.html=!1,this.code.startSync(this.core.editor().html()),t.call(this)}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){var t,e,i;require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this)),t=this.code.start,this.code.start=function(e){t.call(this,e),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id),elBySelAll("kbd",this.$editor[0],(function(t){var e,i=t.nextSibling;i&&i.nodeType===Node.TEXT_NODE&&""===i.textContent.substr(0,1)||(e=document.createTextNode(""),t.parentNode.insertBefore(e,i))}))}.bind(this),e=this.code.set,this.code.set=function(t,i){e.call(this,t,i),this.utils.isEmpty()&&this.observe.toolbar()}.bind(this),i=this.code.get,this.code.get=function(){return this.code.html=!1,this.code.startSync(this.core.editor().html()),i.call(this)}.bind(this)}}}; })(this);
// plugins/WoltLabColor.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabColor=function(){"use strict";var l=["000000","800000","8B4513","2F4F4F","008080","000080","4B0082","696969","B22222","A52A2A","DAA520","006400","40E0D0","0000CD","800080","808080","FF0000","FF8C00","FFD700","008000","00FFFF","0000FF","EE82EE","A9A9A9","FFA07A","FFA500","FFFF00","00FF00","AFEEEE","ADD8E6","DDA0DD","D3D3D3","FFF0F5","FAEBD7","FFFFE0","F0FFF0","F0FFFF","F0F8FF","E6E6FA","FFFFFF"];return{init:function(){for(var o,t=this.WoltLabColor.setColor.bind(this),e={},r=0,F=l.length;r<F;r++)e["color_"+(o=l[r])]={title:"#"+o,func:t};e.removeColor={title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)};var i=this.button.add("woltlabColor","");this.button.addDropdown(i,e);var s=i.data("dropdown");s.find("a").each(function(o,t){t.className.match(/redactor-dropdown-color_([A-F0-9]{6})/)&&(t.style.setProperty("color","#"+RegExp.$1,""),t.parentNode.classList.add("woltlab-color-selection"))}),$('<li class="dropdownDivider"></li>').insertBefore(s.children("li").last())},setColor:function(t){t=t.replace(/^color_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.format(this.$editor[0],"color","#"+t),this.buffer.set()}.bind(this)),this.selection.restore()},removeColor:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"color"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabColor=function(){"use strict";var o=["000000","800000","8B4513","2F4F4F","008080","000080","4B0082","696969","B22222","A52A2A","DAA520","006400","40E0D0","0000CD","800080","808080","FF0000","FF8C00","FFD700","008000","00FFFF","0000FF","EE82EE","A9A9A9","FFA07A","FFA500","FFFF00","00FF00","AFEEEE","ADD8E6","DDA0DD","D3D3D3","FFF0F5","FAEBD7","FFFFE0","F0FFF0","F0FFFF","F0F8FF","E6E6FA","FFFFFF"];return{init:function(){var t,e,r,F,i,s=this.WoltLabColor.setColor.bind(this),l={};for(e=0,r=o.length;e<r;e++)l["color_"+(t=o[e])]={title:"#"+t,func:s};l.removeColor={title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)},F=this.button.add("woltlabColor",""),this.button.addDropdown(F,l),(i=F.data("dropdown")).find("a").each((function(o,t){t.className.match(/redactor-dropdown-color_([A-F0-9]{6})/)&&(t.style.setProperty("color","#"+RegExp.$1,""),t.parentNode.classList.add("woltlab-color-selection"))})),$('<li class="dropdownDivider"></li>').insertBefore(i.children("li").last())},setColor:function(o){o=o.replace(/^color_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"color","#"+o),this.buffer.set()}.bind(this)),this.selection.restore()},removeColor:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"color"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
// plugins/WoltLabDragAndDrop.js
(function (window, undefined) { $.Redactor.prototype.WoltLabDragAndDrop=function(){"use strict";return{init:function(){(this.opts.woltlab.attachments||this.opts.woltlab.media)&&require(["WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(t){t.init(this)}.bind(this))}}}; })(this);
// plugins/WoltLabEvent.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabEvent=function(){"use strict";return{init:function(){this._callbacks=[],this._elementId=this.$element[0].id,elData(this.$editor[0],"element-id",this._elementId),require(["EventHandler"],function(t){this.WoltLabEvent._setEvents(t),t.add("com.woltlab.wcf.redactor2","destroy_"+this._elementId,function(){t.removeAllBySuffix("com.woltlab.wcf.redactor2",this._elementId)}.bind(this))}.bind(this));var t=window.navigator.userAgent.toLowerCase();-1===t.indexOf("windows phone")&&-1===t.indexOf("edge/")&&(this.$editor[0].addEventListener("focus",function(){document.documentElement.classList.add("redactorActive")}),this.$editor[0].addEventListener("focusout",function(){window.setTimeout(function(){document.activeElement&&document.activeElement.classList.contains("redactor-layer")||document.documentElement.classList.remove("redactorActive")},100)})),this.events.iterateObserver=function(t){var e=!1;(!("textarea"!==this.opts.type&&"div"!==this.opts.type||this.detect.isFirefox()||t.target!==this.core.editor()[0]||"childList"!==t.type||t.addedNodes.length||t.removedNodes.length)||"class"===t.attributeName&&t.target===this.core.editor()[0]||"data-vivaldi-spatnav-clickable"===t.attributeName||"attributes"===t.type&&null===t.attributeName)&&(e=!0),e||(this.observe.load(),this.events.changeHandler())}.bind(this),this.events.observer.disconnect(),this.events.createObserver(),this.events.setupObserver()},_setEvents:function(i){var n=this.$element[0].id,t=this.observe.load;this.observe.load=function(){t.call(this),i.fire("com.woltlab.wcf.redactor2","observe_load_"+n,{editor:this.$editor[0]})}.bind(this),this.opts.callbacks.keyup=function(t){var e={cancel:!1,event:t};return i.fire("com.woltlab.wcf.redactor","keyup_"+n,e),!1===e.cancel},i.add("com.woltlab.wcf.redactor2","getText_"+n,function(t){t.message=this.code.get()}.bind(this)),i.add("com.woltlab.wcf.redactor2","reset_"+n,function(){this.code.set("")}.bind(this))},register:function(s,e){require(["EventHandler"],function(i){var n=this.uuid;-1===this._callbacks.indexOf(s)&&(this.opts.callbacks[s]=function(t){var e={cancel:!1,event:t,redactor:this};return i.fire("com.woltlab.wcf.redactor2",s+"_"+n+"_"+this.WoltLabEvent._elementId,e),!1===e.cancel}.bind(this),this._callbacks.push(s)),require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2",s+"_"+n+"_"+this.WoltLabEvent._elementId,e)}.bind(this))}.bind(this))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabEvent=function(){"use strict";return{init:function(){this._callbacks=[],this._elementId=this.$element[0].id,elData(this.$editor[0],"element-id",this._elementId),require(["EventHandler"],function(t){this.WoltLabEvent._setEvents(t),t.add("com.woltlab.wcf.redactor2","destroy_"+this._elementId,function(){t.removeAllBySuffix("com.woltlab.wcf.redactor2",this._elementId)}.bind(this))}.bind(this));var t=window.navigator.userAgent.toLowerCase();-1===t.indexOf("windows phone")&&-1===t.indexOf("edge/")&&(this.$editor[0].addEventListener("focus",(function(){document.documentElement.classList.add("redactorActive")})),this.$editor[0].addEventListener("focusout",(function(){window.setTimeout((function(){document.activeElement&&document.activeElement.classList.contains("redactor-layer")||document.documentElement.classList.remove("redactorActive")}),100)}))),this.events.iterateObserver=function(t){var e=!1;(("textarea"===this.opts.type||"div"===this.opts.type)&&!this.detect.isFirefox()&&t.target===this.core.editor()[0]&&"childList"===t.type&&!t.addedNodes.length&&!t.removedNodes.length||"class"===t.attributeName&&t.target===this.core.editor()[0]||"data-vivaldi-spatnav-clickable"===t.attributeName||"attributes"===t.type&&null===t.attributeName)&&(e=!0),e||(this.observe.load(),this.events.changeHandler())}.bind(this),this.events.observer.disconnect(),this.events.createObserver(),this.events.setupObserver()},_setEvents:function(t){var e=this.$element[0].id,i=this.observe.load;this.observe.load=function(){i.call(this),t.fire("com.woltlab.wcf.redactor2","observe_load_"+e,{editor:this.$editor[0]})}.bind(this),this.opts.callbacks.keyup=function(i){var n={cancel:!1,event:i};return t.fire("com.woltlab.wcf.redactor","keyup_"+e,n),!1===n.cancel},t.add("com.woltlab.wcf.redactor2","getText_"+e,function(t){t.message=this.code.get()}.bind(this)),t.add("com.woltlab.wcf.redactor2","reset_"+e,function(){this.code.set("")}.bind(this))},register:function(t,e){require(["EventHandler"],function(i){var n=this.uuid;-1===this._callbacks.indexOf(t)&&(this.opts.callbacks[t]=function(e){var s={cancel:!1,event:e,redactor:this};return i.fire("com.woltlab.wcf.redactor2",t+"_"+n+"_"+this.WoltLabEvent._elementId,s),!1===s.cancel}.bind(this),this._callbacks.push(t)),require(["EventHandler"],function(i){i.add("com.woltlab.wcf.redactor2",t+"_"+n+"_"+this.WoltLabEvent._elementId,e)}.bind(this))}.bind(this))}}}; })(this);
// plugins/WoltLabFont.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabFont=function(){"use strict";return{_fonts:["Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"],init:function(){var o=this.WoltLabFont.setFont.bind(this),i={};this.WoltLabFont._fonts.forEach(function(t,e){i["fontFamily_"+e]={title:t.split(",")[0].replace(/['"]/g,""),func:o}}),i.removeFont={title:this.lang.get("remove-font"),func:this.WoltLabFont.removeFont.bind(this)};var t=this.button.add("woltlabFont","");this.button.addDropdown(t,i);var e=t.data("dropdown");e.find("a").each(function(t,e){e.className.match(/^redactor-dropdown-fontFamily_(\d+)$/)&&e.style.setProperty("font-family",this.WoltLabFont._fonts[RegExp.$1],"")}.bind(this)),$('<li class="dropdownDivider"></li>').insertBefore(e.children("li").last())},setFont:function(e){e=e.replace(/^fontFamily_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"font-family",this.WoltLabFont._fonts[e]),this.buffer.set()}.bind(this)),this.selection.restore()},removeFont:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.removeFormat(this.$editor[0],"font-family"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabFont=function(){"use strict";return{_fonts:["Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"],init:function(){var t,e,o=this.WoltLabFont.setFont.bind(this),i={};this.WoltLabFont._fonts.forEach((function(t,e){i["fontFamily_"+e]={title:t.split(",")[0].replace(/['"]/g,""),func:o}})),i.removeFont={title:this.lang.get("remove-font"),func:this.WoltLabFont.removeFont.bind(this)},t=this.button.add("woltlabFont",""),this.button.addDropdown(t,i),(e=t.data("dropdown")).find("a").each(function(t,e){e.className.match(/^redactor-dropdown-fontFamily_(\d+)$/)&&e.style.setProperty("font-family",this.WoltLabFont._fonts[RegExp.$1],"")}.bind(this)),$('<li class="dropdownDivider"></li>').insertBefore(e.children("li").last())},setFont:function(t){t=t.replace(/^fontFamily_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.format(this.$editor[0],"font-family",this.WoltLabFont._fonts[t]),this.buffer.set()}.bind(this)),this.selection.restore()},removeFont:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.removeFormat(this.$editor[0],"font-family"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
// plugins/WoltLabFullscreen.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabFullscreen=function(){"use strict";var t,l=!1;return{init:function(){var e=this.button.add("woltlabFullscreen","");this.button.addCallback(e,this.WoltLabFullscreen._toggle.bind(this)),t=e[0],elHide(t.parentNode),require(["Ui/Screen"],function(e){e.on("screen-sm-up",{match:function(){elShow(t.parentNode)},unmatch:function(){elHide(t.parentNode),l&&this.WoltLabFullscreen._toggle()}.bind(this),setup:function(){elShow(t.parentNode)}})}.bind(this))},_toggle:function(){t.children[0].classList.toggle("fa-compress"),t.children[0].classList.toggle("fa-expand");var e=elClosest(this.core.box()[0],".anchorFixedHeader");e&&e.classList.toggle("disableAnchorFixedHeader"),l=this.core.box()[0].classList.toggle("redactorBoxFullscreen")?(WCF.System.DisableScrolling.disable(),!0):(WCF.System.DisableScrolling.enable(),!1)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabFullscreen=function(){"use strict";var e,t=!1;return{init:function(){var l=this.button.add("woltlabFullscreen","");this.button.addCallback(l,this.WoltLabFullscreen._toggle.bind(this)),e=l[0],elHide(e.parentNode),require(["Ui/Screen"],function(l){l.on("screen-sm-up",{match:function(){elShow(e.parentNode)},unmatch:function(){elHide(e.parentNode),t&&this.WoltLabFullscreen._toggle()}.bind(this),setup:function(){elShow(e.parentNode)}})}.bind(this))},_toggle:function(){e.children[0].classList.toggle("fa-compress"),e.children[0].classList.toggle("fa-expand");var l=elClosest(this.core.box()[0],".anchorFixedHeader");l&&l.classList.toggle("disableAnchorFixedHeader"),this.core.box()[0].classList.toggle("redactorBoxFullscreen")?(WCF.System.DisableScrolling.disable(),t=!0):(WCF.System.DisableScrolling.enable(),t=!1)}}}; })(this);
// plugins/WoltLabHtml.js
(function (window, undefined) { $.Redactor.prototype.WoltLabHtml=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Html"],function(t){new t(this)}.bind(this))}}}; })(this);
// plugins/WoltLabImage.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function(){var t;this.opts.woltlab.allowImages&&(t=this.button.add("woltlabImage",""),this.button.addCallback(t,this.WoltLabImage.add));var i=this.image.showEdit;this.image.showEdit=function(t){var e,a=t[0];a.classList.contains("smiley")||(i(t),this.modal.setTitle(WCF.Language.get("wcf.editor.image.edit")),this.modal.getActionButton().text(WCF.Language.get("wcf.global.button.save")),this.modal.getDeleteButton().text(WCF.Language.get("wcf.global.button.delete")),elById("redactor-image-source").value=a.src,e=elById("redactor-image-float"),a.classList.contains("messageFloatObjectLeft")?e.value="left":a.classList.contains("messageFloatObjectRight")&&(e.value="right"),a.classList.contains("woltlabAttachment")&&elRemove(elById("redactor-image-source-container")))}.bind(this);var o=this.image.update;this.image.update=function(){function t(t,e){$('<small class="innerError" />').text(e).insertAfter(t)}var e=this.observe.image[0],a=elById("redactor-image-source");if(!e.classList.contains("woltlabAttachment")){var i=a.value.trim();if(""===i)return t(a,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return t(a,WCF.Language.get("wcf.editor.image.source.error.invalid"));if(this.opts.woltlab.forceSecureImages&&0===i.indexOf("http://"))return t(a,WCF.Language.get("wcf.editor.image.source.error.insecure"));if(!this.WoltLabImage.isValidSource(i))return t(a,WCF.Language.get("wcf.editor.image.source.error.blocked"));e.src=i}e.classList.remove("messageFloatObjectLeft"),e.classList.remove("messageFloatObjectRight");var r=elById("redactor-image-float").value;"left"!==r&&"right"!==r||e.classList.add("messageFloatObject"+WCF.String.ucfirst(r)),o.call(this),e.removeAttribute("alt"),e.removeAttribute("title"),this.caret.after(e)}.bind(this),this.opts.modal["image-edit"]='<div class="section"><dl id="redactor-image-source-container"><dt><label for="redactor-image-source">'+WCF.Language.get("wcf.editor.image.source")+'</label></dt><dd><input type="text" id="redactor-image-source" class="long"></dd></dl><dl><dt><label for="redactor-image-link">'+WCF.Language.get("wcf.editor.image.link")+'</label></dt><dd><input type="text" id="redactor-image-link" class="long"></dd></dl><dl><dt><label for="redactor-image-float">'+WCF.Language.get("wcf.editor.image.float")+'</label></dt><dd><select id="redactor-image-float"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+WCF.Language.get("wcf.editor.image.float.left")+'</option><option value="right">'+WCF.Language.get("wcf.editor.image.float.right")+'</option></select></dd></dl><input id="redactor-image-title" style="display: none"><input id="redactor-image-caption" style="display: none"><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary">Insert</button><button id="redactor-modal-button-delete" class="redactor-modal-button-offset">Delete</button></div></div>'},add:function(){this.modal.load("image-edit",WCF.Language.get("wcf.editor.image.insert")),this.modal.show(),this.modal.getDeleteButton().hide();var t=this.modal.getActionButton()[0];t.addEventListener(WCF_CLICK_EVENT,this.WoltLabImage.insert),t.textContent=WCF.Language.get("wcf.global.button.insert"),this.WoltLabModal.rebuild()},insert:function(t){t.preventDefault(),this.modal.getModal().find(".innerError").remove();function e(t,e){$('<small class="innerError" />').text(e).insertAfter(t)}var a=elById("redactor-image-source"),i=a.value.trim();if(""===i)return e(a,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return e(a,WCF.Language.get("wcf.editor.image.source.error.invalid"));if(this.opts.woltlab.forceSecureImages&&0===i.indexOf("http://"))return e(a,WCF.Language.get("wcf.editor.image.source.error.insecure"));if(!this.WoltLabImage.isValidSource(i))return e(a,WCF.Language.get("wcf.editor.image.source.error.blocked"));var r=elById("redactor-image-link"),o=r.value.trim();if(""!==o&&!o.match(this.opts.regexps.url))return e(r,WCF.Language.get("wcf.editor.image.link.error.invalid"));var l=elById("redactor-image-float").value,s="";"left"!==l&&"right"!==l||(s="messageFloatObject"+WCF.String.ucfirst(l));var n,d='<img src="'+WCF.String.escapeHTML(i)+'"'+(s?' class="'+s+'"':"")+">";o&&(n=WCF.getUUID(),d='<a href="'+WCF.String.escapeHTML(o)+'" data-uuid="'+n+'">'+d+"</a>"),this.modal.close(),this.buffer.set(),this.insert.html(d),n&&window.setTimeout(function(){var t=elBySel('a[data-uuid="'+n+'"]',this.core.editor()[0]);t&&(t.removeAttribute("data-uuid"),this.caret.after(t))}.bind(this),1)},isValidSource:function(t){var e=elCreate("a");if(e.href=t,""===e.hostname)return!0;if(this.opts.woltlab.images.secureOnly&&"https:"!==e.protocol)return!1;if(!this.opts.woltlab.images.external){var a=!1,i=[];if(this.opts.woltlab.images.whitelist.forEach(function(t){0===t.indexOf("*.")?i.push(t.replace(/^\*\./,"")):e.hostname===t&&(a=!0)}),a||i.forEach(function(t){e.hostname.substr(-1*t.length)===t&&(a=!0)}),!a)return!1}return!0},validateImages:function(){elBySelAll("img:not(.smiley):not(.woltlabAttachment)",this.core.editor()[0],function(t){this.WoltLabImage.isValidSource(t.src)||t.classList.add("editorImageBlocked")}.bind(this))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function(){var t,e,a;this.opts.woltlab.allowImages&&(t=this.button.add("woltlabImage",""),this.button.addCallback(t,this.WoltLabImage.add)),e=this.image.showEdit,this.image.showEdit=function(t){var a,i=t[0];i.classList.contains("smiley")||(e(t),this.modal.setTitle(WCF.Language.get("wcf.editor.image.edit")),this.modal.getActionButton().text(WCF.Language.get("wcf.global.button.save")),this.modal.getDeleteButton().text(WCF.Language.get("wcf.global.button.delete")),elById("redactor-image-source").value=i.src,a=elById("redactor-image-float"),i.classList.contains("messageFloatObjectLeft")?a.value="left":i.classList.contains("messageFloatObjectRight")&&(a.value="right"),i.classList.contains("woltlabAttachment")&&elRemove(elById("redactor-image-source-container")))}.bind(this),a=this.image.update,this.image.update=function(){var t,e,i=this.observe.image[0],o=elById("redactor-image-source"),r=function(t,e){$('<small class="innerError" />').text(e).insertAfter(t)};if(!i.classList.contains("woltlabAttachment")){if(""===(t=o.value.trim()))return r(o,WCF.Language.get("wcf.global.form.error.empty"));if(!t.match(this.opts.regexps.url))return r(o,WCF.Language.get("wcf.editor.image.source.error.invalid"));if(this.opts.woltlab.forceSecureImages&&0===t.indexOf("http://"))return r(o,WCF.Language.get("wcf.editor.image.source.error.insecure"));if(!this.WoltLabImage.isValidSource(t))return r(o,WCF.Language.get("wcf.editor.image.source.error.blocked"));i.src=t}i.classList.remove("messageFloatObjectLeft"),i.classList.remove("messageFloatObjectRight"),"left"!==(e=elById("redactor-image-float").value)&&"right"!==e||i.classList.add("messageFloatObject"+WCF.String.ucfirst(e)),a.call(this),i.removeAttribute("alt"),i.removeAttribute("title"),this.caret.after(i)}.bind(this),this.opts.modal["image-edit"]='<div class="section"><dl id="redactor-image-source-container"><dt><label for="redactor-image-source">'+WCF.Language.get("wcf.editor.image.source")+'</label></dt><dd><input type="text" id="redactor-image-source" class="long"></dd></dl><dl><dt><label for="redactor-image-link">'+WCF.Language.get("wcf.editor.image.link")+'</label></dt><dd><input type="text" id="redactor-image-link" class="long"></dd></dl><dl><dt><label for="redactor-image-float">'+WCF.Language.get("wcf.editor.image.float")+'</label></dt><dd><select id="redactor-image-float"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+WCF.Language.get("wcf.editor.image.float.left")+'</option><option value="right">'+WCF.Language.get("wcf.editor.image.float.right")+'</option></select></dd></dl><input id="redactor-image-title" style="display: none"><input id="redactor-image-caption" style="display: none"><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary">Insert</button><button id="redactor-modal-button-delete" class="redactor-modal-button-offset">Delete</button></div></div>'},add:function(){this.modal.load("image-edit",WCF.Language.get("wcf.editor.image.insert")),this.modal.show(),this.modal.getDeleteButton().hide();var t=this.modal.getActionButton()[0];t.addEventListener("click",this.WoltLabImage.insert),t.textContent=WCF.Language.get("wcf.global.button.insert"),this.WoltLabModal.rebuild()},insert:function(t){var e,a,i,o,r,l,s,n,d;return t.preventDefault(),this.modal.getModal().find(".innerError").remove(),a=function(t,e){$('<small class="innerError" />').text(e).insertAfter(t)},""===(i=(e=elById("redactor-image-source")).value.trim())?a(e,WCF.Language.get("wcf.global.form.error.empty")):i.match(this.opts.regexps.url)?this.opts.woltlab.forceSecureImages&&0===i.indexOf("http://")?a(e,WCF.Language.get("wcf.editor.image.source.error.insecure")):this.WoltLabImage.isValidSource(i)?""===(r=(o=elById("redactor-image-link")).value.trim())||r.match(this.opts.regexps.url)?(s="","left"!==(l=elById("redactor-image-float").value)&&"right"!==l||(s="messageFloatObject"+WCF.String.ucfirst(l)),n='<img src="'+WCF.String.escapeHTML(i)+'"'+(s?' class="'+s+'"':"")+">",r&&(d=WCF.getUUID(),n='<a href="'+WCF.String.escapeHTML(r)+'" data-uuid="'+d+'">'+n+"</a>"),this.modal.close(),this.buffer.set(),this.insert.html(n),void(d&&window.setTimeout(function(){var t=elBySel('a[data-uuid="'+d+'"]',this.core.editor()[0]);t&&(t.removeAttribute("data-uuid"),this.caret.after(t))}.bind(this),1))):a(o,WCF.Language.get("wcf.editor.image.link.error.invalid")):a(e,WCF.Language.get("wcf.editor.image.source.error.blocked")):a(e,WCF.Language.get("wcf.editor.image.source.error.invalid"))},isValidSource:function(t){var e,a,i=elCreate("a");return i.href=t,""===i.hostname||(!this.opts.woltlab.images.secureOnly||"https:"===i.protocol)&&!(!this.opts.woltlab.images.external&&(e=!1,a=[],this.opts.woltlab.images.whitelist.forEach((function(t){0===t.indexOf("*.")?a.push(t.replace(/^\*\./,"")):i.hostname===t&&(e=!0)})),e||a.forEach((function(t){i.hostname.substr(-1*t.length)===t&&(e=!0)})),!e))},validateImages:function(){elBySelAll("img:not(.smiley):not(.woltlabAttachment)",this.core.editor()[0],function(t){this.WoltLabImage.isValidSource(t.src)||t.classList.add("editorImageBlocked")}.bind(this))}}}; })(this);
// plugins/WoltLabIndent.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabIndent=function(){"use strict";return{init:function(){var s,a,d,i;this.detect.isFirefox()&&(d=this.indent.decrease,this.indent.decrease=function(){if(this.list.get()){var e=$(this.selection.current()).closest("li",this.core.editor()[0]);if(0===e.closest("ul, ol",this.core.editor()[0]).parent().closest("ul, ol",this.core.editor()[0]).length){var t,i,n=e[0];if(null!==elBySel("ul, ol",n)){if(this.buffer.set(),this.selection.save(),null!==(r=n.previousElementSibling)){for(t=elCreate(n.parentNode.nodeName.toLowerCase());r.nextSibling;)t.appendChild(r.nextSibling);(i=r.parentNode).parentNode.insertBefore(t,i.nextSibling)}if(null!==n.nextElementSibling){for(t=elCreate(n.parentNode.nodeName.toLowerCase());n.nextSibling;)t.appendChild(n.nextSibling);(i=n.parentNode).parentNode.insertBefore(t,i.nextSibling)}for(i=n.parentNode;n.childNodes.length;)i.parentNode.insertBefore(n.childNodes[0],i);return elRemove(i),void this.selection.restore()}}else{elBySelAll("woltlab-list-marker",this.core.editor()[0],elRemove),this.selection.save(),s=elCreate("woltlab-list-marker"),e[0].insertBefore(s,e[0].firstChild);var l=e[0].lastElementChild;if("BR"===l.nodeName){for(var o="",r=l;r=r.nextSibling;)o+=r.textContent;""===o.replace(/\u200B/g,"").trim()&&elRemove(l)}a=elCreate("woltlab-list-marker"),e[0].appendChild(a),this.selection.restore()}d.call(this)}}.bind(this),i=this.indent.removeEmpty,this.indent.removeEmpty=function(){if(s&&s.parentNode){for(var e,t=elCreate("li");(e=s.nextSibling)&&e!==a;)t.appendChild(e);s.parentNode.insertBefore(t,s),elBySelAll("woltlab-list-marker",this.core.editor()[0],elRemove),a=s=void 0}i.call(this)}.bind(this)),this.indent.repositionItem=function(e){var t=e.next();0===t.length||"UL"===t[0].tagName&&"OL"===t[0].tagName||e.append(t);var i=e.prev();0!==i.length&&"LI"!==i[0].tagName&&(this.selection.save(),e.closest("li",this.core.editor()[0]).after(e),this.selection.restore())}.bind(this),this.indent.normalize=function(){var e,t;this.detect.isFirefox()&&(!(e=this.selection.block())||"P"!==e.nodeName||(t=e.previousElementSibling)&&"BR"===t.nodeName&&elRemove(t)),this.core.editor().find("li").each($.proxy(function(e,t){var i=$(t),n="";0!==this.opts.keepStyleAttr.length&&(n=","+this.opts.keepStyleAttr.join(",")),i.find(this.opts.inlineTags.join(",")).not("img"+n).not("span").removeAttr("style");var l=i.parent();if(0===l.length||"LI"!==l[0].tagName){var o=i.next();0===o.length||"UL"!==o[0].tagName&&"OL"!==o[0].tagName||i.append(o)}else{for(;t.nextSibling;)t.appendChild(t.nextSibling);l.after(i)}},this))}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabIndent=function(){"use strict";return{init:function(){var e,t,i,n;this.detect.isFirefox()&&(i=this.indent.decrease,this.indent.decrease=function(){var n,l,o,r,s,a,d;if(this.list.get()){if(0===(n=$(this.selection.current()).closest("li",this.core.editor()[0])).closest("ul, ol",this.core.editor()[0]).parent().closest("ul, ol",this.core.editor()[0]).length){if(l=n[0],null!==elBySel("ul, ol",l)){if(this.buffer.set(),this.selection.save(),null!==(o=l.previousElementSibling)){for(r=elCreate(l.parentNode.nodeName.toLowerCase());o.nextSibling;)r.appendChild(o.nextSibling);(s=o.parentNode).parentNode.insertBefore(r,s.nextSibling)}if(null!==l.nextElementSibling){for(r=elCreate(l.parentNode.nodeName.toLowerCase());l.nextSibling;)r.appendChild(l.nextSibling);(s=l.parentNode).parentNode.insertBefore(r,s.nextSibling)}for(s=l.parentNode;l.childNodes.length;)s.parentNode.insertBefore(l.childNodes[0],s);return elRemove(s),void this.selection.restore()}}else{if(elBySelAll("woltlab-list-marker",this.core.editor()[0],elRemove),this.selection.save(),e=elCreate("woltlab-list-marker"),n[0].insertBefore(e,n[0].firstChild),"BR"===(a=n[0].lastElementChild).nodeName){for(d="",o=a;o=o.nextSibling;)d+=o.textContent;""===d.replace(/\u200B/g,"").trim()&&elRemove(a)}t=elCreate("woltlab-list-marker"),n[0].appendChild(t),this.selection.restore()}i.call(this)}}.bind(this),n=this.indent.removeEmpty,this.indent.removeEmpty=function(){if(e&&e.parentNode){for(var i,l=elCreate("li");(i=e.nextSibling)&&i!==t;)l.appendChild(i);e.parentNode.insertBefore(l,e),elBySelAll("woltlab-list-marker",this.core.editor()[0],elRemove),e=void 0,t=void 0}n.call(this)}.bind(this)),this.indent.repositionItem=function(e){var t,i=e.next();0===i.length||"UL"===i[0].tagName&&"OL"===i[0].tagName||e.append(i),0!==(t=e.prev()).length&&"LI"!==t[0].tagName&&(this.selection.save(),e.closest("li",this.core.editor()[0]).after(e),this.selection.restore())}.bind(this),this.indent.normalize=function(){var e,t;this.detect.isFirefox()&&(e=this.selection.block())&&"P"===e.nodeName&&(t=e.previousElementSibling)&&"BR"===t.nodeName&&elRemove(t),this.core.editor().find("li").each($.proxy((function(e,t){var i,n,l=$(t),o="";if(0!==this.opts.keepStyleAttr.length&&(o=","+this.opts.keepStyleAttr.join(",")),l.find(this.opts.inlineTags.join(",")).not("img"+o).not("span").removeAttr("style"),0===(i=l.parent()).length||"LI"!==i[0].tagName)0===(n=l.next()).length||"UL"!==n[0].tagName&&"OL"!==n[0].tagName||l.append(n);else{for(;t.nextSibling;)t.appendChild(t.nextSibling);i.after(l)}}),this))}.bind(this)}}}; })(this);
// plugins/WoltLabInlineCode.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabInlineCode=function(){"use strict";var s;return{init:function(){this.opts.activeButtonsStates.kbd="tt",require(["Environment","EventHandler"],function(e,t){s=e,t.add("com.woltlab.wcf.redactor2","bbcode_tt_"+this.$element[0].id,this.WoltLabInlineCode._toggle.bind(this))}.bind(this))},_toggle:function(e){var t;e.cancel=!0;var o=window.getSelection();if(o.isCollapsed){t=null;var n=o.anchorNode;n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var r,d,i=!1;if("KBD"===n.nodeName&&""!==n.textContent.replace(/\u200b/g,"")&&(r=o.anchorNode,d=o.anchorOffset,r.nodeType===Node.TEXT_NODE&&0===d?t=r:r===n&&(0===d?i=!0:t=n.childNodes[d-1])),!1===i&&null!==t)for(var a,l=0,c=n.childNodes.length;l<c;l++){if((a=n.childNodes[l])===t){i=!0;break}if(a.nodeType!==Node.TEXT_NODE||""!==a.textContent.replace(/\u200b/g,""))break}if(i){var N=n.previousSibling;return null!==N&&N.nodeType===Node.TEXT_NODE&&""===N.textContent||(N=document.createTextNode(""),n.parentNode.insertBefore(N,n)),void this.caret.before(n)}}if(this.button.toggle({},"kbd","func","inline.format"),(t=o.anchorNode).nodeType===Node.TEXT_NODE&&(t=t.parentNode),"KBD"===t.nodeName){var f=t.nextSibling;if("ios"===s.platform()&&"safari"===s.browser())return void(f&&"BR"===f.nodeName&&t.parentNode.insertBefore(document.createTextNode(""),f));for(;f;){if(f.nodeType!==Node.TEXT_NODE||f.textContent.length)return;f=f.nextSibling}f?f.textContent="":t.parentNode.appendChild(document.createTextNode(""))}}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabInlineCode=function(){"use strict";var e;return{init:function(){this.opts.activeButtonsStates.kbd="tt",require(["Environment","EventHandler"],function(t,o){e=t,o.add("com.woltlab.wcf.redactor2","bbcode_tt_"+this.$element[0].id,this.WoltLabInlineCode._toggle.bind(this))}.bind(this))},_toggle:function(t){var o,n,d,i,r,a,l,c,N,f,s;if(t.cancel=!0,(n=window.getSelection()).isCollapsed){if(o=null,(d=n.anchorNode).nodeType===Node.TEXT_NODE&&(d=d.parentNode),i=!1,"KBD"===d.nodeName&&""!==d.textContent.replace(/\u200b/g,"")&&(r=n.anchorNode,a=n.anchorOffset,r.nodeType===Node.TEXT_NODE&&0===a?o=r:r===d&&(0===a?i=!0:o=d.childNodes[a-1])),!1===i&&null!==o)for(c=0,N=d.childNodes.length;c<N;c++){if((l=d.childNodes[c])===o){i=!0;break}if(l.nodeType!==Node.TEXT_NODE||""!==l.textContent.replace(/\u200b/g,""))break}if(i)return null!==(f=d.previousSibling)&&f.nodeType===Node.TEXT_NODE&&""===f.textContent||(f=document.createTextNode(""),d.parentNode.insertBefore(f,d)),void this.caret.before(d)}if(this.button.toggle({},"kbd","func","inline.format"),(o=n.anchorNode).nodeType===Node.TEXT_NODE&&(o=o.parentNode),"KBD"===o.nodeName){if(s=o.nextSibling,"ios"===e.platform()&&"safari"===e.browser())return void(s&&"BR"===s.nodeName&&o.parentNode.insertBefore(document.createTextNode(""),s));for(;s;){if(s.nodeType!==Node.TEXT_NODE||s.textContent.length)return;s=s.nextSibling}s?s.textContent="":o.parentNode.appendChild(document.createTextNode(""))}}}}; })(this);
// plugins/WoltLabInsert.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){var s=this.opts.woltlab.placeholderCallback;var a=this.insert.html;this.insert.html=function(e,t){s=s&&s();var o=window.getSelection();o.rangeCount&&"IMG"===o.anchorNode.nodeName&&this.caret.after(o.anchorNode),this.placeholder.hide(),this.core.editor().focus(),!this.detect.isFirefox()||null===(o.anchorNode.nodeType===Node.TEXT_NODE?o.anchorNode.parentNode:o.anchorNode).closest(".redactor-layer")&&(this.selection.restore(),null===(o.anchorNode.nodeType===Node.TEXT_NODE?o.anchorNode.parentNode:o.anchorNode).closest(".redactor-layer")&&(this.WoltLabCaret.endOfEditor(),this.selection.save()));var r,i=this.selection.block(),n=""===this.$editor[0].innerHTML.replace(/<\/?p>/g,"").replace(/<br>/g,"").replace(/\u200B/g,"").trim();a.call(this,e,t),n&&(i=this.$editor[0].firstElementChild),i&&"P"===i.nodeName&&i.nextElementSibling&&(r=!1,(0===i.childElementCount&&""===i.textContent.replace(/\u200B/g,"").trim()||1===i.childElementCount&&"<br>"===i.innerHTML)&&(r=!0),r&&elRemove(i)),this.detect.isFirefox()&&(this.selection.save(),function e(t){var o=t.querySelector("p > p");if(null!==o){for(var r=o.parentElement,i=r.parentElement;r.childNodes.length;)i.insertBefore(r.childNodes[0],r);r.remove(),e(t)}}(this.$editor[0]),this.selection.restore()),o.rangeCount&&"IMG"===o.anchorNode.nodeName&&this.caret.after(o.anchorNode)}.bind(this);var t=this.insert.text;this.insert.text=function(e){s=s&&s(),this.core.editor().focus(),this.selection.restore(),elClosest(window.getSelection().anchorNode,".redactor-layer")!==this.core.editor()[0]&&this.WoltLabCaret.endOfEditor(),t.call(this,e),this.selection.saveInstant()}.bind(this),this.insert.placeHtml=function(e){var t=!1;e.forEach(function(e){e instanceof Element&&e.classList.contains("woltlab-bbcode-marker")&&(t=!0)});var o=document.createElement("span");o.id="redactor-insert-marker",o=this.insert.node(o),$(o).before(e),t||(this.selection.restore(),this.caret.after(o)),$(o).remove()}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){function e(t){var o,r,i=t.querySelector("p > p");if(null!==i){for(r=(o=i.parentElement).parentElement;o.childNodes.length;)r.insertBefore(o.childNodes[0],o);o.remove(),e(t)}}var t,o=this.opts.woltlab.placeholderCallback,r=this.insert.html;this.insert.html=function(t,i){var n,s,c,a;o&&(o=o()),(n=window.getSelection()).rangeCount&&"IMG"===n.anchorNode.nodeName&&this.caret.after(n.anchorNode),this.placeholder.hide(),this.core.editor().focus(),this.detect.isFirefox()&&null===(n.anchorNode.nodeType===Node.TEXT_NODE?n.anchorNode.parentNode:n.anchorNode).closest(".redactor-layer")&&(this.selection.restore(),null===(n.anchorNode.nodeType===Node.TEXT_NODE?n.anchorNode.parentNode:n.anchorNode).closest(".redactor-layer")&&(this.WoltLabCaret.endOfEditor(),this.selection.save())),s=this.selection.block(),c=""===this.$editor[0].innerHTML.replace(/<\/?p>/g,"").replace(/<br>/g,"").replace(/\u200B/g,"").trim(),r.call(this,t,i),c&&(s=this.$editor[0].firstElementChild),s&&"P"===s.nodeName&&s.nextElementSibling&&(a=!1,(0===s.childElementCount&&""===s.textContent.replace(/\u200B/g,"").trim()||1===s.childElementCount&&"<br>"===s.innerHTML)&&(a=!0),a&&elRemove(s)),this.detect.isFirefox()&&(this.selection.save(),e(this.$editor[0]),this.selection.restore()),n.rangeCount&&"IMG"===n.anchorNode.nodeName&&this.caret.after(n.anchorNode)}.bind(this),t=this.insert.text,this.insert.text=function(e){o&&(o=o()),this.core.editor().focus(),this.selection.restore(),elClosest(window.getSelection().anchorNode,".redactor-layer")!==this.core.editor()[0]&&this.WoltLabCaret.endOfEditor(),t.call(this,e),this.selection.saveInstant()}.bind(this),this.insert.placeHtml=function(e){var t,o=!1;e.forEach((function(e){e instanceof Element&&e.classList.contains("woltlab-bbcode-marker")&&(o=!0)})),(t=document.createElement("span")).id="redactor-insert-marker",t=this.insert.node(t),$(t).before(e),o||(this.selection.restore(),this.caret.after(t)),$(t).remove()}.bind(this)}}}; })(this);
// plugins/WoltLabKeydown.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var s=!1,n=[];return{init:function(){var b=window.getSelection();require(["Environment"],function(e){s="safari"===e.browser()});var y=this.keydown.init;this.keydown.init=function(e){if(this.detect.isFirefox()&&b.isCollapsed&&e.which===this.keyCode.BACKSPACE&&((N=b.anchorNode).nodeType===Node.ELEMENT_NODE&&0<b.anchorOffset&&(N=N.childNodes[b.anchorOffset-1]),N.nodeType===Node.TEXT_NODE&&""===N.textContent)){for(var t=[],i=N;i=i.previousSibling;){if(i.nodeType===Node.ELEMENT_NODE){"IMG"!==i.nodeName&&(t=[]);break}if(i.nodeType===Node.TEXT_NODE){var n=i.textContent;if(""!==n&&""!==n){t=[];break}t.push(i)}}t.length&&t.forEach(elRemove)}if((e.originalEvent.which===this.keyCode.BACKSPACE||e.originalEvent.which===this.keyCode.DELETE)&&b.isCollapsed){var o=this.selection.block();if("P"===o.nodeName){if(this.list.combineAfterAndBefore(o))return void e.originalEvent.preventDefault();if(this.utils.isEmpty(o.innerHTML)&&o.previousElementSibling!==o.nextElementSibling){var r=null,l=null;return e.originalEvent.which===this.keyCode.BACKSPACE?null===o.previousElementSibling?l=o.nextElementSibling:r=o.previousElementSibling:null===o.nextElementSibling?r=o.previousElementSibling:l=o.nextElementSibling,elRemove(o),null===l?("OL"!==r.nodeName&&"UL"!==r.nodeName||(r=r.lastElementChild),this.caret.end(r)):("OL"!==l.nodeName&&"UL"!==l.nodeName||(l=l.firstElementChild),this.caret.start(l)),void e.originalEvent.preventDefault()}}else{if(e.originalEvent.which===this.keyCode.DELETE&&-1!==["H1","H2","H3","H4","H5","H6"].indexOf(o.nodeName)&&this.utils.isEmpty(o.innerHTML)){var s=o.nextElementSibling;return s?s=o.nextElementSibling:((s=elCreate("p")).innerHTML=this.opts.invisibleSpace,o.parentNode.appendChild(s)),o.parentNode.removeChild(o),this.caret.start(s),void e.originalEvent.preventDefault()}if(this.detect.isWebkit()&&"LI"===o.nodeName&&e.which===this.keyCode.DELETE){var a=b.anchorNode;if(a.nodeType===Node.TEXT_NODE&&a.textContent.length===b.anchorOffset&&a.parentNode.lastChild===a){var d=o.nextElementSibling;if(d&&"LI"===d.nodeName){for(this.buffer.set(),this.selection.save();d.childNodes.length;)o.appendChild(d.childNodes[0]);return elRemove(d),this.selection.restore(),void e.preventDefault()}}}}}var h,c=null;if(e.which===this.keyCode.BACKSPACE&&this.detect.isFirefox()){var f=this.selection.block();if(f&&"P"===f.tagName&&this.utils.isStartOfElement(f)){var u=f.previousElementSibling;if(u&&("OL"===u.nodeName||"UL"===u.nodeName)){this.buffer.set(),this.selection.save();for(var m=u.lastElementChild;f.childNodes.length;)m.appendChild(f.childNodes[0]);return elRemove(f),this.selection.restore(),void e.preventDefault()}u&&"P"===u.nodeName&&null!==(c=u.lastElementChild)&&"BR"!==c.nodeName&&(c=null)}}if(!1===y.call(this,e)||e.originalEvent.defaultPrevented)null===c||!this.detect.isFirefox()||1===(h=b.getRangeAt(0)).startOffset&&h.startContainer.firstElementChild===c&&elRemove(c);else if(!(39!==(e=e.originalEvent).which||e.ctrlKey||e.shiftKey||e.metaKey||e.altKey)){if(!b.isCollapsed)return;var v=b.anchorNode;if(v.nodeType!==Node.TEXT_NODE||b.getRangeAt(0).startOffset!==v.textContent.length)return;var p=v.parentNode;if("KBD"!==p.nodeName)return;for(var g=!0,N=p;N&&N!==this.core.editor()[0];){if(null!==N.nextSibling){for(;N.nextSibling&&N.nextSibling.nodeType===Node.TEXT_NODE&&0===N.nextSibling.textContent.length;)N.parentNode.removeChild(N.nextSibling);if(N.nextSibling&&"BR"!==N.nextSibling.nodeName||null!==N.nextSibling.nextSibling){g=!1;break}}N=N.parentNode}g&&p.parentNode.insertBefore(document.createTextNode(""),p.nextSibling)}}.bind(this);var e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("linux")&&-1!==e.indexOf("android")&&-1!==e.indexOf("chrome")&&(this.keydown.checkEvents=function(){this.core.addEvent(!1)}.bind(this)),this.core.editor().off("keydown.redactor"),this.core.editor().on("keydown.redactor",this.keydown.init.bind(this)),this.keydown.onArrowDown=function(){for(var e,t,i=this.WoltLabKeydown._getBlocks(),n=0;n<i.length;n++)if(t=i[n]){if(!this.utils.isEndOfElement(t))continue;if(null!==(e=t.nextElementSibling)&&"P"===e.nodeName)break;return void this.keydown.insertAfterLastElement(t)}}.bind(this),this.keydown.onArrowUp=function(){for(var e,t,i=this.WoltLabKeydown._getBlocks(),n=0;n<i.length;n++)if(t=i[n]){if(!this.utils.isStartOfElement())break;if(null===(e=t.previousElementSibling)||"P"===e.nodeName)return void this.keydown.insertBeforeFirstElement(t);var o=$(this.opts.emptyHtml)[0];t.parentNode.insertBefore(o,t),this.caret.end(o);break}}.bind(this);var n=function(e){if(!1===this.core.callback("enter",e))return e.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(e))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(e);if(this.keydown.figure)setTimeout($.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){var t,i,n,o,r=null;this.detect.isFirefox()&&"P"===this.keydown.block.nodeName&&b.isCollapsed&&(null!==(t=elClosest(b.getRangeAt(0).startContainer,"a"))&&null===elBySel("br",t)&&(r=this.keydown.block)),setTimeout($.proxy(function(){var t,e,i;this.keydown.replaceToParagraph("DIV"),null!==r&&null!==r.previousElementSibling&&(t=[],elBySelAll("a",r.previousElementSibling,function(e){t.push(e)}),t.length&&(e=t[t.length-1],null!==(i=elBySel("br",e))&&elRemove(i)))},this),1),"LI"===this.keydown.block.tagName&&(i=this.selection.current(),n=elClosest(i,"li"),this.utils.isRedactorParent(n)&&this.utils.isEmpty(n.innerHTML)&&null===n.nextElementSibling&&(n.innerHTML=s?"<br>":"",s&&((o=document.createRange()).selectNodeContents(n),o.collapse(!1),b.removeAllRanges(),b.addRange(o))))}else if(!this.keydown.block)return this.keydown.insertParagraph(e);return this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?(this.keydown.insertBreakLine(e),void setTimeout(function(){for(var e=this.selection.block(),t=this.selection.inline();t&&t!==e;){if("A"===t.nodeName){var i=!1;if(0===t.childNodes.length?i=!0:""===t.textContent.replace(/\u200B/g,"").trim()&&(i=!0,elBySelAll("*",t,function(e){"SPAN"!==e.nodeName&&(i=!1)})),i){for(;t.childNodes.length;)t.parentNode.insertBefore(t.childNodes[0],t);elRemove(t);break}}t=t.parentNode}}.bind(this),1)):void 0}.bind(this);this.keydown.onEnter=function(e){var t=this.keydown.blockquote;t&&(this.keydown.blockquote=!1);var i=n.call(this,e);return t&&(this.keydown.blockquote=t),i}.bind(this),this.keydown.replaceToParagraph=function(e){var t=this.selection.block(),i=t.innerHTML.replace(/<br\s?\/?>/gi,"");if(t.tagName===e&&this.utils.isEmpty(i)&&!$(t).hasClass("redactor-in")){var n=document.createElement("p");$(t).replaceWith(n);var o=document.createRange();o.setStart(n,0);var r=document.createTextNode("");o.insertNode(r),o.setStartAfter(r),o.collapse(!0);var l=window.getSelection();return l.removeAllRanges(),l.addRange(o),!1}"P"===t.tagName&&$(t).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(e){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(e):this.insert.raw("<br>")}.bind(this);var r=this.keydown.onTab;this.keydown.onTab=function(e,t){if(!this.keydown.pre){var i=$(this.selection.current()).closest("ul, ol, td",this.core.editor()[0]);if(0===i.length)return!0;if("TD"===(i=i[0]).nodeName){var n,o=null;return e.originalEvent.shiftKey?null===(o=i.previousElementSibling)&&null!==(o=i.parentNode.previousElementSibling)&&(o=o.lastElementChild):null===(o=i.nextElementSibling)&&(null===(o=i.parentNode.nextElementSibling)&&(this.table.addRowBelow(),o=i.parentNode.nextElementSibling),o=o.firstElementChild),null!==o&&(this.utils.isEmpty(o.innerHTML)?this.caret.end(o):((n=document.createRange()).selectNodeContents(o),b.removeAllRanges(),b.addRange(n))),e.originalEvent.preventDefault(),!1}}return r.call(this,e,t)}.bind(this);var l=this.keydown.formatEmpty;this.keydown.formatEmpty=function(e){for(var t,i=this.$editor[0],n=0,o=i.childElementCount;n<o;n++)if("P"!==(t=i.children[n]).nodeName&&this.utils.isBlockTag(t.nodeName))return;return l.call(this,e)}.bind(this);var t=this.keydown.removeInvisibleSpace;this.keydown.removeInvisibleSpace=function(){this.keydown.current!==this.$editor[0]&&t.call(this)}.bind(this),require(["Core","Environment"],function(i,e){var t,n,o;"desktop"!==e.platform()||null!==(t=this.$editor[0].closest("form, .message, .jsOuterEditorContainer"))&&(null===(n=elBySel(".formSubmit",t))||(o=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',n))&&(o.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(e){var t;83===e.event.which&&(t=!1,window.navigator.platform.match(/^Mac/)?e.event.ctrlKey&&e.event.altKey&&(t=!0):e.event.altKey&&!e.event.ctrlKey&&(t=!0),t&&(e.cancel=!0,"function"==typeof o.click?o.click():i.triggerEvent(o,WCF_CLICK_EVENT)))}.bind(this))))}.bind(this)),this.WoltLabKeydown._handleBackspaceAndDelete()},register:function(e){-1===n.indexOf(e)&&n.push(e)},_getBlocks:function(){for(var e=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],t=0,i=n.length;t<i;t++)e.push(this.utils.isTag(this.keydown.current,n[t]));return e},_handleBackspaceAndDelete:function(){function f(e){return null===elBySel("img",e)&&""===e.textContent.replace(/\u200B/g,"").trim()}var t=function(e){var t,i=this.selection.block();if(i)if("TD"===i.nodeName){var n=i.innerHTML;""===n?e.preventDefault():""===n&&(e.preventDefault(),i.innerHTML="")}else if(-1!==i.nodeName.indexOf("-")&&f(i))(t=i.parentNode).insertBefore(this.marker.get(),i.nextSibling),elRemove(i),this.selection.restore();else if((t=i&&"P"===i.nodeName?i.parentNode:null)&&-1!==t.nodeName.indexOf("-")){var o=window.getSelection().getRangeAt(0),r=document.createRange();r.setStartBefore(i),r.setEnd(o.startContainer,o.startOffset);var l=r.cloneContents(),s=elCreate("div");if(s.appendChild(l),f(s)){e.preventDefault();var a=i.previousElementSibling,d=null;if(a)d=f(a);else for(t=i;(t=t.parentNode)&&t!==this.$editor[0];)if(a=t.previousElementSibling){d=!1;break}if(d)elRemove(a);else if(null!==d){var h,c=i.parentNode;if("P"===a.nodeName){for(a.appendChild(this.marker.get());i.childNodes.length;){if("BR"===(h=i.childNodes[0]).nodeName){elRemove(h);break}a.appendChild(h)}0===i.childNodes.length&&elRemove(i),this.selection.restore()}else a.appendChild(i),i.insertBefore(this.marker.get(),i.firstChild),this.selection.restore();f(c)&&elRemove(c)}else null===d&&(t=i.parentNode,f(t)&&elRemove(t))}}}.bind(this),i=function(e){var t,i=this.selection.block();if(-1!==i.nodeName.indexOf("-")&&f(i))(t=i.parentNode).insertBefore(this.marker.get(),i.nextSibling),elRemove(i),this.selection.restore();else if((t=i&&"P"===i.nodeName?i.parentNode:null)&&-1!==t.nodeName.indexOf("-")){var n=window.getSelection().getRangeAt(0),o=document.createRange();o.setStart(n.startContainer,n.startOffset),o.setEndAfter(i);var r=o.cloneContents(),l=elCreate("div");if(l.appendChild(r),f(l)){e.preventDefault();var s=i.nextElementSibling,a=null;if(s)a=f(s);else for(t=i;(t=t.parentNode)&&t!==this.$editor[0];)if(s=t.nextElementSibling){a=!1;break}if(a)elRemove(s);else if(null!==a){var d=s.parentNode;if("P"===s.nodeName){for(;s.childNodes.length;)i.appendChild(s.childNodes[0]);elRemove(s)}else{if(i.appendChild(this.marker.get()),t=i.parentNode,-1!==s.nodeName.indexOf("-")){var h=s.firstElementChild;if(h&&"P"===h.nodeName){for(;h.childNodes.length;)i.appendChild(h.childNodes[0]);s.removeChild(h),f(s)&&elRemove(s)}}else t.insertBefore(s,i.nextSibling);this.selection.restore()}f(d)&&elRemove(d)}else null===a&&(t=i.parentNode,f(t)&&elRemove(t))}}}.bind(this),l=function(){return this.opts.blockTags.filter(function(e){return-1!==e.indexOf("-")}).join(",")}.bind(this),s=[],a=function(){elBySelAll(l(),this.core.editor()[0],function(o){null!==o.parentNode&&-1!==s.indexOf(o)&&["nextElementSibling","previousElementSibling"].forEach(function(e){for(var t,i=o[e];null!==i&&i.nodeName===o.nodeName&&-1===s.indexOf(i);){if("previousElementSibling"===e)for(var n=i.childNodes.length-1;0<=n;n--)o.insertBefore(i.childNodes[n],o.firstChild);else for(;0<i.childNodes.length;)o.appendChild(i.childNodes[0]);t=i[e],elRemove(i),i=t}})})}.bind(this),d=0,h=function(){var n=!1;elBySelAll(l(),this.core.editor()[0],function(e){var t=elData(e,"firefox-duplication-bug");if(""!==t){var i=s[parseInt(t,10)];if(null!==i&&null!==i.parentNode&&e!==i&&i.contains(e)){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);return e.parentNode.removeChild(e),void(n=!0)}e.removeAttribute("data-firefox-duplication-bug")}}),n&&elBySelAll("h1,h2,h3,h4,h5,h6",this.core.editor()[0],function(e){elBySelAll("p",e,function(e){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);e.parentNode.removeChild(e)})}),d=0}.bind(this);this.keydown.onBackspaceAndDeleteAfter=function(o){this.detect.isFirefox()&&(this.selection.isCollapsed()?o.which===this.keyCode.BACKSPACE?t(o):o.which===this.keyCode.DELETE&&i(o):o.which!==this.keyCode.BACKSPACE&&o.which!==this.keyCode.DELETE||elBySelAll(l(),this.core.editor()[0],function(e){s.push(e),elData(e,"firefox-duplication-bug",d++)}));var e,r=!1;o.which===this.keyCode.BACKSPACE&&this.selection.isCollapsed()&&this.detect.isWebkit()&&(!1!==(e=this.selection.block())&&"PRE"===e.nodeName&&(r=!0)),setTimeout($.proxy(function(){var e;if(0<s.length&&(this.selection.save(),a(),h(),this.selection.restore(),s=[]),r){var t=this.selection.block();if((!1===t||"PRE"!==t.nodeName)&&(e=this.selection.current()).nodeType===Node.TEXT_NODE&&e.nextSibling&&"SPAN"===e.nextSibling.nodeName){var i=e.nextSibling;if(-1!==i.style.getPropertyValue("font-family").indexOf("monospace")&&"pre-wrap"===i.style.getPropertyValue("white-space")){for(;i.childNodes.length;)i.parentNode.insertBefore(i.childNodes[0],i);elRemove(i)}}}this.code.syncFire=!1,this.keydown.removeEmptyLists();var n="";0!==this.opts.keepStyleAttr.length&&(n=","+this.opts.keepStyleAttr.join(",")),this.core.editor().find("*[style]").not("span, img, figure, iframe, #redactor-image-box, #redactor-image-editter, [data-redactor-style-cache], [data-redactor-span]"+n).removeAttr("style"),this.keydown.formatEmpty(o),"KBD"===(e=this.selection.current()).nodeName&&0===e.innerHTML.length&&elRemove(e),this.code.syncFire=!0},this),1)}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var e=!1,t=[];return{init:function(){var t,i,n,o,l,r,s=window.getSelection();require(["Environment"],(function(t){e="safari"===t.browser()})),t=this.keydown.init,this.keydown.init=function(e){var i,n,o,l,r,d,a,h,c,f,u,m,p,g,b,N,v,y;if(this.detect.isFirefox()&&s.isCollapsed&&e.which===this.keyCode.BACKSPACE&&((i=s.anchorNode).nodeType===Node.ELEMENT_NODE&&s.anchorOffset>0&&(i=i.childNodes[s.anchorOffset-1]),i.nodeType===Node.TEXT_NODE&&""===i.textContent)){for(n=[],o=i;o=o.previousSibling;){if(o.nodeType===Node.ELEMENT_NODE){"IMG"!==o.nodeName&&(n=[]);break}if(o.nodeType===Node.TEXT_NODE){if(""!==(l=o.textContent)&&""!==l){n=[];break}n.push(o)}}n.length&&n.forEach(elRemove)}if((e.originalEvent.which===this.keyCode.BACKSPACE||e.originalEvent.which===this.keyCode.DELETE)&&s.isCollapsed)if("P"===(r=this.selection.block()).nodeName){if(this.list.combineAfterAndBefore(r))return void e.originalEvent.preventDefault();if(this.utils.isEmpty(r.innerHTML)&&r.previousElementSibling!==r.nextElementSibling)return d=null,a=null,e.originalEvent.which===this.keyCode.BACKSPACE?null===r.previousElementSibling?a=r.nextElementSibling:d=r.previousElementSibling:null===r.nextElementSibling?d=r.previousElementSibling:a=r.nextElementSibling,elRemove(r),null===a?("OL"!==d.nodeName&&"UL"!==d.nodeName||(d=d.lastElementChild),this.caret.end(d)):("OL"!==a.nodeName&&"UL"!==a.nodeName||(a=a.firstElementChild),this.caret.start(a)),void e.originalEvent.preventDefault()}else{if(e.originalEvent.which===this.keyCode.DELETE&&-1!==["H1","H2","H3","H4","H5","H6"].indexOf(r.nodeName)&&this.utils.isEmpty(r.innerHTML))return(h=r.nextElementSibling)?h=r.nextElementSibling:((h=elCreate("p")).innerHTML=this.opts.invisibleSpace,r.parentNode.appendChild(h)),r.parentNode.removeChild(r),this.caret.start(h),void e.originalEvent.preventDefault();if(this.detect.isWebkit()&&"LI"===r.nodeName&&e.which===this.keyCode.DELETE&&(c=s.anchorNode).nodeType===Node.TEXT_NODE&&c.textContent.length===s.anchorOffset&&c.parentNode.lastChild===c&&(f=r.nextElementSibling)&&"LI"===f.nodeName){for(this.buffer.set(),this.selection.save();f.childNodes.length;)r.appendChild(f.childNodes[0]);return elRemove(f),this.selection.restore(),void e.preventDefault()}}if(u=null,e.which===this.keyCode.BACKSPACE&&this.detect.isFirefox()&&(m=this.selection.block())&&"P"===m.tagName&&this.utils.isStartOfElement(m)){if((p=m.previousElementSibling)&&("OL"===p.nodeName||"UL"===p.nodeName)){for(this.buffer.set(),this.selection.save(),g=p.lastElementChild;m.childNodes.length;)g.appendChild(m.childNodes[0]);return elRemove(m),this.selection.restore(),void e.preventDefault()}p&&"P"===p.nodeName&&null!==(u=p.lastElementChild)&&"BR"!==u.nodeName&&(u=null)}if(!1===t.call(this,e)||e.originalEvent.defaultPrevented)null!==u&&this.detect.isFirefox()&&1===(y=s.getRangeAt(0)).startOffset&&y.startContainer.firstElementChild===u&&elRemove(u);else if(!(39!==(e=e.originalEvent).which||e.ctrlKey||e.shiftKey||e.metaKey||e.altKey)){if(!s.isCollapsed)return;if((b=s.anchorNode).nodeType!==Node.TEXT_NODE||s.getRangeAt(0).startOffset!==b.textContent.length)return;if("KBD"!==(N=b.parentNode).nodeName)return;for(v=!0,i=N;i&&i!==this.core.editor()[0];){if(null!==i.nextSibling){for(;i.nextSibling&&i.nextSibling.nodeType===Node.TEXT_NODE&&0===i.nextSibling.textContent.length;)i.parentNode.removeChild(i.nextSibling);if(i.nextSibling&&"BR"!==i.nextSibling.nodeName||null!==i.nextSibling.nextSibling){v=!1;break}}i=i.parentNode}v&&N.parentNode.insertBefore(document.createTextNode(""),N.nextSibling)}}.bind(this),-1!==(i=window.navigator.userAgent.toLowerCase()).indexOf("linux")&&-1!==i.indexOf("android")&&-1!==i.indexOf("chrome")&&(this.keydown.checkEvents=function(){this.core.addEvent(!1)}.bind(this)),this.core.editor().off("keydown.redactor"),this.core.editor().on("keydown.redactor",this.keydown.init.bind(this)),this.keydown.onArrowDown=function(){var e,t,i,n=this.WoltLabKeydown._getBlocks();for(i=0;i<n.length;i++)if(t=n[i]){if(!this.utils.isEndOfElement(t))continue;if(null!==(e=t.nextElementSibling)&&"P"===e.nodeName)break;return void this.keydown.insertAfterLastElement(t)}}.bind(this),this.keydown.onArrowUp=function(){var e,t,i,n,o=this.WoltLabKeydown._getBlocks();for(i=0;i<o.length;i++)if(t=o[i]){if(!this.utils.isStartOfElement())break;if(null!==(e=t.previousElementSibling)&&"P"!==e.nodeName){n=$(this.opts.emptyHtml)[0],t.parentNode.insertBefore(n,t),this.caret.end(n);break}return void this.keydown.insertBeforeFirstElement(t)}}.bind(this),n=function(t){var i,n,o,l,r,d=this.core.callback("enter",t);if(!1===d)return t.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(t))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(t);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(t);if(this.keydown.figure)setTimeout($.proxy((function(){this.keydown.replaceToParagraph("FIGURE")}),this),1);else if(this.keydown.block)i=null,this.detect.isFirefox()&&"P"===this.keydown.block.nodeName&&s.isCollapsed&&null!==(n=elClosest(s.getRangeAt(0).startContainer,"a"))&&null===elBySel("br",n)&&(i=this.keydown.block),setTimeout($.proxy((function(){var e,t,n;this.keydown.replaceToParagraph("DIV"),null!==i&&null!==i.previousElementSibling&&(e=[],elBySelAll("a",i.previousElementSibling,(function(t){e.push(t)})),e.length&&(t=e[e.length-1],null!==(n=elBySel("br",t))&&elRemove(n)))}),this),1),"LI"===this.keydown.block.tagName&&(o=this.selection.current(),l=elClosest(o,"li"),this.utils.isRedactorParent(l)&&this.utils.isEmpty(l.innerHTML)&&null===l.nextElementSibling&&(l.innerHTML=e?"<br>":"",e&&((r=document.createRange()).selectNodeContents(l),r.collapse(!1),s.removeAllRanges(),s.addRange(r))));else if(!this.keydown.block)return this.keydown.insertParagraph(t);return this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?(this.keydown.insertBreakLine(t),void setTimeout(function(){for(var e,t=this.selection.block(),i=this.selection.inline();i&&i!==t;){if("A"===i.nodeName&&(e=!1,0===i.childNodes.length?e=!0:""===i.textContent.replace(/\u200B/g,"").trim()&&(e=!0,elBySelAll("*",i,(function(t){"SPAN"!==t.nodeName&&(e=!1)}))),e)){for(;i.childNodes.length;)i.parentNode.insertBefore(i.childNodes[0],i);elRemove(i);break}i=i.parentNode}}.bind(this),1)):void 0}.bind(this),this.keydown.onEnter=function(e){var t,i=this.keydown.blockquote;return i&&(this.keydown.blockquote=!1),t=n.call(this,e),i&&(this.keydown.blockquote=i),t}.bind(this),this.keydown.replaceToParagraph=function(e){var t,i,n,o,l=this.selection.block(),r=l.innerHTML.replace(/<br\s?\/?>/gi,"");if(l.tagName===e&&this.utils.isEmpty(r)&&!$(l).hasClass("redactor-in"))return t=document.createElement("p"),$(l).replaceWith(t),(i=document.createRange()).setStart(t,0),n=document.createTextNode(""),i.insertNode(n),i.setStartAfter(n),i.collapse(!0),(o=window.getSelection()).removeAllRanges(),o.addRange(i),!1;"P"===l.tagName&&$(l).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(e){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(e):this.insert.raw("<br>")}.bind(this),o=this.keydown.onTab,this.keydown.onTab=function(e,t){var i,n,l;if(!this.keydown.pre){if(0===(i=$(this.selection.current()).closest("ul, ol, td",this.core.editor()[0])).length)return!0;if("TD"===(i=i[0]).nodeName)return n=null,e.originalEvent.shiftKey?null===(n=i.previousElementSibling)&&null!==(n=i.parentNode.previousElementSibling)&&(n=n.lastElementChild):null===(n=i.nextElementSibling)&&(null===(n=i.parentNode.nextElementSibling)&&(this.table.addRowBelow(),n=i.parentNode.nextElementSibling),n=n.firstElementChild),null!==n&&(this.utils.isEmpty(n.innerHTML)?this.caret.end(n):((l=document.createRange()).selectNodeContents(n),s.removeAllRanges(),s.addRange(l))),e.originalEvent.preventDefault(),!1}return o.call(this,e,t)}.bind(this),l=this.keydown.formatEmpty,this.keydown.formatEmpty=function(e){var t,i,n,o=this.$editor[0];for(i=0,n=o.childElementCount;i<n;i++)if("P"!==(t=o.children[i]).nodeName&&this.utils.isBlockTag(t.nodeName))return;return l.call(this,e)}.bind(this),r=this.keydown.removeInvisibleSpace,this.keydown.removeInvisibleSpace=function(){this.keydown.current!==this.$editor[0]&&r.call(this)}.bind(this),require(["Core","Environment"],function(e,t){var i,n,o;"desktop"===t.platform()&&null!==(i=this.$editor[0].closest("form, .message, .jsOuterEditorContainer"))&&null!==(n=elBySel(".formSubmit",i))&&(o=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',n))&&(o.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(t){if(83===t.event.which){var i=!1;window.navigator.platform.match(/^Mac/)?t.event.ctrlKey&&t.event.altKey&&(i=!0):t.event.altKey&&!t.event.ctrlKey&&(i=!0),i&&(t.cancel=!0,"function"==typeof o.click?o.click():e.triggerEvent(o,"click"))}}.bind(this)))}.bind(this)),this.WoltLabKeydown._handleBackspaceAndDelete()},register:function(e){-1===t.indexOf(e)&&t.push(e)},_getBlocks:function(){var e,i,n=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption];for(e=0,i=t.length;e<i;e++)n.push(this.utils.isTag(this.keydown.current,t[e]));return n},_handleBackspaceAndDelete:function(){var e=function(e){return null===elBySel("img",e)&&""===e.textContent.replace(/\u200B/g,"").trim()},t=function(t){var i,n,o,l,r,s,d,a,h,c,f=this.selection.block();if(f)if("TD"===f.nodeName)""===(n=f.innerHTML)?t.preventDefault():""===n&&(t.preventDefault(),f.innerHTML="");else if(-1!==f.nodeName.indexOf("-")&&e(f))(i=f.parentNode).insertBefore(this.marker.get(),f.nextSibling),elRemove(f),this.selection.restore();else if((i=f&&"P"===f.nodeName?f.parentNode:null)&&-1!==i.nodeName.indexOf("-")&&(o=window.getSelection().getRangeAt(0),(l=document.createRange()).setStartBefore(f),l.setEnd(o.startContainer,o.startOffset),r=l.cloneContents(),(s=elCreate("div")).appendChild(r),e(s))){if(t.preventDefault(),a=null,d=f.previousElementSibling)a=e(d);else for(i=f;(i=i.parentNode)&&i!==this.$editor[0];)if(d=i.previousElementSibling){a=!1;break}if(a)elRemove(d);else if(null!==a){if(h=f.parentNode,"P"===d.nodeName){for(d.appendChild(this.marker.get());f.childNodes.length;){if("BR"===(c=f.childNodes[0]).nodeName){elRemove(c);break}d.appendChild(c)}0===f.childNodes.length&&elRemove(f),this.selection.restore()}else d.appendChild(f),f.insertBefore(this.marker.get(),f.firstChild),this.selection.restore();e(h)&&elRemove(h)}else null===a&&(i=f.parentNode,e(i)&&elRemove(i))}}.bind(this),i=function(t){var i,n,o,l,r,s,d,a,h,c=this.selection.block();if(-1!==c.nodeName.indexOf("-")&&e(c))(i=c.parentNode).insertBefore(this.marker.get(),c.nextSibling),elRemove(c),this.selection.restore();else if((i=c&&"P"===c.nodeName?c.parentNode:null)&&-1!==i.nodeName.indexOf("-")&&(n=window.getSelection().getRangeAt(0),(o=document.createRange()).setStart(n.startContainer,n.startOffset),o.setEndAfter(c),l=o.cloneContents(),(r=elCreate("div")).appendChild(l),e(r))){if(t.preventDefault(),d=null,s=c.nextElementSibling)d=e(s);else for(i=c;(i=i.parentNode)&&i!==this.$editor[0];)if(s=i.nextElementSibling){d=!1;break}if(d)elRemove(s);else if(null!==d){if(a=s.parentNode,"P"===s.nodeName){for(;s.childNodes.length;)c.appendChild(s.childNodes[0]);elRemove(s)}else{if(c.appendChild(this.marker.get()),i=c.parentNode,-1!==s.nodeName.indexOf("-")){if((h=s.firstElementChild)&&"P"===h.nodeName){for(;h.childNodes.length;)c.appendChild(h.childNodes[0]);s.removeChild(h),e(s)&&elRemove(s)}}else i.insertBefore(s,c.nextSibling);this.selection.restore()}e(a)&&elRemove(a)}else null===d&&(i=c.parentNode,e(i)&&elRemove(i))}}.bind(this),n=function(){return this.opts.blockTags.filter((function(e){return-1!==e.indexOf("-")})).join(",")}.bind(this),o=[],l=function(){elBySelAll(n(),this.core.editor()[0],(function(e){null!==e.parentNode&&-1!==o.indexOf(e)&&["nextElementSibling","previousElementSibling"].forEach((function(t){for(var i,n,l=e[t];null!==l&&l.nodeName===e.nodeName&&-1===o.indexOf(l);){if("previousElementSibling"===t)for(n=l.childNodes.length-1;n>=0;n--)e.insertBefore(l.childNodes[n],e.firstChild);else for(;l.childNodes.length>0;)e.appendChild(l.childNodes[0]);i=l[t],elRemove(l),l=i}}))}))}.bind(this),r=0,s=function(){var e=!1;elBySelAll(n(),this.core.editor()[0],(function(t){var i,n=elData(t,"firefox-duplication-bug");if(""!==n){if(null!==(i=o[parseInt(n,10)])&&null!==i.parentNode&&t!==i&&i.contains(t)){for(;t.childNodes.length;)t.parentNode.insertBefore(t.childNodes[0],t);return t.parentNode.removeChild(t),void(e=!0)}t.removeAttribute("data-firefox-duplication-bug")}})),e&&elBySelAll("h1,h2,h3,h4,h5,h6",this.core.editor()[0],(function(e){elBySelAll("p",e,(function(e){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);e.parentNode.removeChild(e)}))})),r=0}.bind(this);this.keydown.onBackspaceAndDeleteAfter=function(e){var d,a;this.detect.isFirefox()&&(this.selection.isCollapsed()?e.which===this.keyCode.BACKSPACE?t(e):e.which===this.keyCode.DELETE&&i(e):e.which!==this.keyCode.BACKSPACE&&e.which!==this.keyCode.DELETE||elBySelAll(n(),this.core.editor()[0],(function(e){o.push(e),elData(e,"firefox-duplication-bug",r++)}))),d=!1,e.which===this.keyCode.BACKSPACE&&this.selection.isCollapsed()&&this.detect.isWebkit()&&!1!==(a=this.selection.block())&&"PRE"===a.nodeName&&(d=!0),setTimeout($.proxy((function(){var t,i,n,r;if(o.length>0&&(this.selection.save(),l(),s(),this.selection.restore(),o=[]),d&&(!1===(i=this.selection.block())||"PRE"!==i.nodeName)&&(t=this.selection.current()).nodeType===Node.TEXT_NODE&&t.nextSibling&&"SPAN"===t.nextSibling.nodeName&&-1!==(n=t.nextSibling).style.getPropertyValue("font-family").indexOf("monospace")&&"pre-wrap"===n.style.getPropertyValue("white-space")){for(;n.childNodes.length;)n.parentNode.insertBefore(n.childNodes[0],n);elRemove(n)}this.code.syncFire=!1,this.keydown.removeEmptyLists(),r="",0!==this.opts.keepStyleAttr.length&&(r=","+this.opts.keepStyleAttr.join(",")),this.core.editor().find("*[style]").not("span, img, figure, iframe, #redactor-image-box, #redactor-image-editter, [data-redactor-style-cache], [data-redactor-span]"+r).removeAttr("style"),this.keydown.formatEmpty(e),"KBD"===(t=this.selection.current()).nodeName&&0===t.innerHTML.length&&elRemove(t),this.code.syncFire=!0}),this),1)}.bind(this)}}}; })(this);
// plugins/WoltLabKeyup.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabKeyup=function(){"use strict";return{init:function(){this.WoltLabEvent.register("keyup",function(e){e.event.originalEvent.which===this.keyCode.ENTER&&this.WoltLabKeyup._keyupEnter()}.bind(this))},_keyupEnter:function(){var e=this.$editor[0],n=window.getSelection(),t=null;if(this.detect.isFirefox()){var r=n.anchorNode;if(r.nodeType===Node.TEXT_NODE&&0===n.anchorOffset&&(t=r.parentNode).childNodes[0]===r&&(r=r.parentNode),"LI"===r.nodeName){var i=r.parentNode;if("LI"===(t=i.parentNode).nodeName&&null===i.previousSibling)return t.insertBefore(this.marker.get(),i),t.insertBefore(elCreate("br"),i),void this.selection.restore()}}var o,l=elClosest(n.anchorNode,"li");null!==l&&e.contains(l)&&(null===(o=l.previousElementSibling)||"OL"!==o.nodeName&&"UL"!==o.nodeName||o.previousElementSibling.appendChild(o));for(var a=n.anchorNode;a.parentNode;){if(a.parentNode===e){t=a;break}a=a.parentNode}null!==t&&"P"===t.nodeName&&(this.WoltLabKeyup._rebuildEmptyParagraph(t,!1),null!==(t=t.previousElementSibling)&&"P"===t.nodeName&&this.WoltLabKeyup._rebuildEmptyParagraph(t,!0))},_rebuildEmptyParagraph:function(e,n){if(!(0<e.textContent.replace(/\u200B/g,"").trim().length)){for(var t,r=e;r.nodeType===Node.ELEMENT_NODE&&0!==r.childNodes.length;){if(1<r.children.length)return;r=1===r.children.length?r.children[0]:r.childNodes[0]}r.nodeType===Node.TEXT_NODE&&(t=elCreate("br"),r.parentNode.appendChild(t),n&&elRemove(r))}}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabKeyup=function(){"use strict";return{init:function(){this.WoltLabEvent.register("keyup",function(e){e.event.originalEvent.which===this.keyCode.ENTER&&this.WoltLabKeyup._keyupEnter()}.bind(this))},_keyupEnter:function(){var e,n,t,o,r,i=this.$editor[0],l=window.getSelection(),d=null;if(this.detect.isFirefox()&&((e=l.anchorNode).nodeType===Node.TEXT_NODE&&0===l.anchorOffset&&(d=e.parentNode).childNodes[0]===e&&(e=e.parentNode),"LI"===e.nodeName&&"LI"===(d=(n=e.parentNode).parentNode).nodeName&&null===n.previousSibling))return d.insertBefore(this.marker.get(),n),d.insertBefore(elCreate("br"),n),void this.selection.restore();for(null!==(t=elClosest(l.anchorNode,"li"))&&i.contains(t)&&(null===(o=t.previousElementSibling)||"OL"!==o.nodeName&&"UL"!==o.nodeName||o.previousElementSibling.appendChild(o)),r=l.anchorNode;r.parentNode;){if(r.parentNode===i){d=r;break}r=r.parentNode}null!==d&&"P"===d.nodeName&&(this.WoltLabKeyup._rebuildEmptyParagraph(d,!1),null!==(d=d.previousElementSibling)&&"P"===d.nodeName&&this.WoltLabKeyup._rebuildEmptyParagraph(d,!0))},_rebuildEmptyParagraph:function(e,n){var t,o;if(!(e.textContent.replace(/\u200B/g,"").trim().length>0)){for(t=e;t.nodeType===Node.ELEMENT_NODE&&0!==t.childNodes.length;){if(t.children.length>1)return;t=1===t.children.length?t.children[0]:t.childNodes[0]}t.nodeType===Node.TEXT_NODE&&(o=elCreate("br"),t.parentNode.appendChild(o),n&&elRemove(t))}}}}; })(this);
// plugins/WoltLabLine.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabLine=function(){"use strict";return{init:function(){this.line.removeOnBackspace=function(){var t,i;this.utils.isCollapsed()&&(0===(t=$(this.selection.block())).length||!this.utils.isStartOfElement(t)||(i=t.prev()).length&&"HR"===i[0].tagName&&(e.preventDefault(),i.remove()))}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabLine=function(){"use strict";return{init:function(){this.line.removeOnBackspace=function(){var t,i;this.utils.isCollapsed()&&0!==(t=$(this.selection.block())).length&&this.utils.isStartOfElement(t)&&(i=t.prev()).length&&"HR"===i[0].tagName&&(e.preventDefault(),i.remove())}.bind(this)}}}; })(this);
// plugins/WoltLabLink.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabLink=function(){"use strict";var r=null;return{init:function(){this.link.isUrl=function(i){var t="((xn--)?[\\W\\w\\D\\d]+(-(?!-[\\W\\w\\D\\d])+)*\\.)+[\\W\\w]{2,}",e=new RegExp("^(http|ftp|https|steam|ts3server)://"+t,"i"),s=new RegExp("^"+t,"i"),r=new RegExp(".(html|php)$","i"),l=new RegExp("^/","i"),n=new RegExp("^tel:(.*?)","i");return-1===i.search(e)&&-1!==i.search(s)&&-1===i.search(r)&&"/"!==i.substring(0,1)&&(i="http://"+i),(-1!==i.search(e)||-1!==i.search(r)||-1!==i.search(l)||-1!==i.search(n))&&i}.bind(this),this.link.show=this.WoltLabLink.show.bind(this),this.link.parse=function(i){var t;return this.link.isMailto(i.url)?i.url="mailto:"+i.url.replace("mailto:",""):0!==i.url.search("#")&&this.opts.linkValidation&&(!1===(t=this.link.isUrl(i.url))&&(t="http://"+i.url),i.url=t),!this.link.isEmpty(i)&&!1!==i.url&&i}.bind(this),require(["WoltLabSuite/Core/Ui/Redactor/Link"],function(i){r=i})},show:function(i){void 0!==i&&i.preventDefault&&i.preventDefault();var t=this.selection.is();this.selection.save(),this.observe.closeAllTooltip();var e=this.link.is();t&&this.selection.restore();var s=this.link.buildLinkFromElement(e);t&&this.selection.save(),r.showDialog({insert:!1===e,submitCallback:function(){var i=this.link.buildLinkFromModal();return!1!==i&&(this.selection.restore(),this.link.insert(i,!0),!0)}.bind(this)}),s.url=this.link.removeSelfHostFromUrl(s.url),this.link.setModalValues(s),this.detect.isDesktop()&&$("#redactor-link-url").focus()}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabLink=function(){"use strict";var i=null;return{init:function(){this.link.isUrl=function(i){var t="((xn--)?[\\W\\w\\D\\d]+(-(?!-[\\W\\w\\D\\d])+)*\\.)+[\\W\\w]{2,}",e=new RegExp("^(http|ftp|https|steam|ts3server)://"+t,"i"),s=new RegExp("^"+t,"i"),l=new RegExp(".(html|php)$","i"),r=new RegExp("^/","i"),n=new RegExp("^tel:(.*?)","i");return-1===i.search(e)&&-1!==i.search(s)&&-1===i.search(l)&&"/"!==i.substring(0,1)&&(i="http://"+i),(-1!==i.search(e)||-1!==i.search(l)||-1!==i.search(r)||-1!==i.search(n))&&i}.bind(this),this.link.show=this.WoltLabLink.show.bind(this),this.link.parse=function(i){if(this.link.isMailto(i.url))i.url="mailto:"+i.url.replace("mailto:","");else if(0!==i.url.search("#")&&this.opts.linkValidation){var t=this.link.isUrl(i.url);!1===t&&(t="http://"+i.url),i.url=t}return!this.link.isEmpty(i)&&!1!==i.url&&i}.bind(this),require(["WoltLabSuite/Core/Ui/Redactor/Link"],(function(t){i=t}))},show:function(t){var e,s,l;void 0!==t&&t.preventDefault&&t.preventDefault(),e=this.selection.is(),this.selection.save(),this.observe.closeAllTooltip(),s=this.link.is(),e&&this.selection.restore(),l=this.link.buildLinkFromElement(s),e&&this.selection.save(),i.showDialog({insert:!1===s,submitCallback:function(){var i=this.link.buildLinkFromModal();return!1!==i&&(this.selection.restore(),this.link.insert(i,!0),!0)}.bind(this)}),l.url=this.link.removeSelfHostFromUrl(l.url),this.link.setModalValues(l),this.detect.isDesktop()&&$("#redactor-link-url").focus()}}}; })(this);
// plugins/WoltLabList.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabList=function(){"use strict";return{parentsQualifiedForLists:["woltlab-quote","woltlab-spoiler"],init:function(){this.list.combineAfterAndBefore=function(t){var e,i,s=$(t).prev(),n=$(t).next(),o=t&&"P"===t.tagName&&("<br>"===t.innerHTML||""===t.innerHTML),r=1===s.closest("ol, ul",this.core.editor()[0]).length&&1===n.closest("ol, ul",this.core.editor()[0]).length,l=!1;if(r&&!o&&0===t.textContent.replace(/\u200b/g,"").trim().length&&(e=["A","B","BR","EM","I","STRONG","U"],i=!0,elBySelAll("*",t,function(t){-1===e.indexOf(t.nodeName)&&("SPAN"===t.nodeName&&""===t.className.trim()||(i=!1))}),i&&(o=l=!0)),o&&r){if("LI"===t.nodeName&&l)return s.append(this.marker.get()),elRemove(t),this.selection.restore(),!0;s.children("li").last().append(this.marker.get()),s.append(n.contents());var a=t.nextElementSibling;return"OL"!==a.nodeName&&"UL"!==a.nodeName||0!==a.childElementCount||elRemove(a),l&&elRemove(t),this.selection.restore(),!0}return!1}.bind(this),this.list.toggle=function(t){if(!this.utils.inBlocks(["table","td","th","tr"])){t=(t="unorderedlist"===(t="orderedlist"===t?"ol":t)?"ul":t).toLowerCase(),this.buffer.set(),this.selection.save();var e=this.list._getBlocks(),i=this.selection.block(),s=$(i).parent().closest("ol, ul",this.core.editor()[0]);return 0===e.length&&0!==s.length&&(e=[s.get(0)]),e=this.list._isUnformat(t,e)?this.list._unformat(t,e):this.list._format(t,e),this.selection.restore(),e}}.bind(this),this.list._getBlocks=function(){return this.selection.blocks().filter(function(t){var e=t.parentNode;return!!e.classList.contains("redactor-in")||-1!==this.WoltLabList.parentsQualifiedForLists.indexOf(e.nodeName.toLowerCase())}.bind(this))}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabList=function(){"use strict";return{parentsQualifiedForLists:["woltlab-quote","woltlab-spoiler"],init:function(){this.list.combineAfterAndBefore=function(t){var e,i,s,n=$(t).prev(),o=$(t).next(),l=t&&"P"===t.tagName&&("<br>"===t.innerHTML||""===t.innerHTML),r=1===n.closest("ol, ul",this.core.editor()[0]).length&&1===o.closest("ol, ul",this.core.editor()[0]).length,a=!1;return r&&!l&&0===t.textContent.replace(/\u200b/g,"").trim().length&&(e=["A","B","BR","EM","I","STRONG","U"],i=!0,elBySelAll("*",t,(function(t){-1===e.indexOf(t.nodeName)&&("SPAN"===t.nodeName&&""===t.className.trim()||(i=!1))})),i&&(a=!0,l=!0)),!(!l||!r)&&("LI"===t.nodeName&&a?(n.append(this.marker.get()),elRemove(t),this.selection.restore(),!0):(n.children("li").last().append(this.marker.get()),n.append(o.contents()),"OL"!==(s=t.nextElementSibling).nodeName&&"UL"!==s.nodeName||0!==s.childElementCount||elRemove(s),a&&elRemove(t),this.selection.restore(),!0))}.bind(this),this.list.toggle=function(t){var e,i,s;if(!this.utils.inBlocks(["table","td","th","tr"]))return t=(t="unorderedlist"===(t="orderedlist"===t?"ol":t)?"ul":t).toLowerCase(),this.buffer.set(),this.selection.save(),e=this.list._getBlocks(),i=this.selection.block(),s=$(i).parent().closest("ol, ul",this.core.editor()[0]),0===e.length&&0!==s.length&&(e=[s.get(0)]),e=this.list._isUnformat(t,e)?this.list._unformat(t,e):this.list._format(t,e),this.selection.restore(),e}.bind(this),this.list._getBlocks=function(){return this.selection.blocks().filter(function(t){var e=t.parentNode;return!!e.classList.contains("redactor-in")||-1!==this.WoltLabList.parentsQualifiedForLists.indexOf(e.nodeName.toLowerCase())}.bind(this))}.bind(this)}}}; })(this);
// plugins/WoltLabMedia.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabMedia=function(){"use strict";return{init:function(){var t=this.button.add("woltlabMedia","");$(t).addClass("jsMediaEditorButton");var e=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_wsm_"+this.$element[0].id,function(t){var e,a,i;1!==t.attributes.length&&(e="",3===t.attributes.length&&("left"===t.attributes[2]?e=" messageFloatObjectLeft":"right"===t.attributes[2]&&(e=" messageFloatObjectRight")),(a=elCreate("img")).className="woltlabSuiteMedia"+e,a.src=this.opts.woltlab.mediaUrl.replace(/&/,"&").replace("-123456789",t.attributes[0]).replace("thumbnail=void",function(){return t.attributes[1]?"thumbnail="+t.attributes[1]:""}),elData(a,"media-id",t.attributes[0]),elData(a,"media-size",t.attributes[1]),(i=t.metacode).parentNode.insertBefore(a,i),elRemove(i),t.cancel=!0)}.bind(this));WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this.$element[0].id,function(){WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_wsm_"+this.$element[0].id,e)}.bind(this)),require(["WoltLabSuite/Core/Media/Manager/Editor"],function(t){new t({editor:this})}.bind(this))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabMedia=function(){"use strict";return{init:function(){var t,e=this.button.add("woltlabMedia","");$(e).addClass("jsMediaEditorButton"),t=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_wsm_"+this.$element[0].id,function(t){var e,a,i;1!==t.attributes.length&&(e="",3===t.attributes.length&&("left"===t.attributes[2]?e=" messageFloatObjectLeft":"right"===t.attributes[2]&&(e=" messageFloatObjectRight")),(a=elCreate("img")).className="woltlabSuiteMedia"+e,a.src=this.opts.woltlab.mediaUrl.replace(/&/,"&").replace("-123456789",t.attributes[0]).replace("thumbnail=void",(function(){return t.attributes[1]?"thumbnail="+t.attributes[1]:""})),elData(a,"media-id",t.attributes[0]),elData(a,"media-size",t.attributes[1]),(i=t.metacode).parentNode.insertBefore(a,i),elRemove(i),t.cancel=!0)}.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this.$element[0].id,function(){WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_wsm_"+this.$element[0].id,t)}.bind(this)),require(["WoltLabSuite/Core/Media/Manager/Editor"],function(t){new t({editor:this})}.bind(this))}}}; })(this);
// plugins/WoltLabMention.js
(function (window, undefined) { $.Redactor.prototype.WoltLabMention=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Mention"],function(t){new t(this)}.bind(this))}}}; })(this);
// plugins/WoltLabModal.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabModal=function(){"use strict";var e=null,o="",n=null,r={close:function(){this.selection.restore(),n.getDialog("redactorOverlay-"+this.uuid)&&n.close("redactorOverlay-"+this.uuid)},load:function(t,i){e.innerHTML=this.modal.getTemplate(t),o=i},setTitle:function(t){n.setTitle(this,t)},show:function(){this.selection.save(),n.open(this),n.setTitle(this,o)}};return{init:function(){(e=elCreate("div")).className="redactorModalWrapper",e.id="redactorOverlay-"+this.uuid,elHide(e),document.body.appendChild(e),this.$modalBody=$(e),require(["Ui/Dialog"],function(t){for(var i in n=t,r)r.hasOwnProperty(i)&&(this.modal[i]=r[i].bind(this))}.bind(this)),this._dialogSetup=function(){return{id:"redactorOverlay-"+this.uuid,options:{onClose:function(t){var i=n.getDialog(t);elBySelAll("[id]",i.content,function(t){t.removeAttribute("id")})}}}}},rebuild:function(){n&&n.rebuild("redactorOverlay-"+this.uuid)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabModal=function(){"use strict";var t=null,i="",e=null,o={close:function(){this.selection.restore(),e.getDialog("redactorOverlay-"+this.uuid)&&e.close("redactorOverlay-"+this.uuid)},load:function(e,o){t.innerHTML=this.modal.getTemplate(e),i=o},setTitle:function(t){e.setTitle(this,t)},show:function(){this.selection.save(),e.open(this),e.setTitle(this,i)}};return{init:function(){(t=elCreate("div")).className="redactorModalWrapper",t.id="redactorOverlay-"+this.uuid,elHide(t),document.body.appendChild(t),this.$modalBody=$(t),require(["Ui/Dialog"],function(t){for(var i in e=t,o)o.hasOwnProperty(i)&&(this.modal[i]=o[i].bind(this))}.bind(this)),this._dialogSetup=function(){return{id:"redactorOverlay-"+this.uuid,options:{onClose:function(t){var i=e.getDialog(t);elBySelAll("[id]",i.content,(function(t){t.removeAttribute("id")}))}}}}},rebuild:function(){e&&e.rebuild("redactorOverlay-"+this.uuid)}}}; })(this);
// plugins/WoltLabObserve.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabObserve=function(){"use strict";return{init:function(){var i=elByClass("re-button",this.button.toolbar()[0]);this.button.setInactiveAll=function(t){for(var e,s=0,o=i.length;s<o;s++)(e=i[s]).classList.contains("re-"+t)||(e.classList.remove("redactor-act"),"html"!==e.rel&&elAttr(e,"tabindex",-1),elAttr(e,"aria-pressed",!1))}.bind(this),this.observe.buttons=function(t,e){var s=this.selection.current();if(!1!==t?this.button.setInactiveAll():this.button.setInactiveAll(e),!1!==t||"html"===e){if(this.utils.isRedactorParent(s)){var o=this.WoltLabSource.isActive();this.utils.isCurrentOrParentHeader()||this.utils.isCurrentOrParent(["table","pre","blockquote","li"])?this.button.disable("horizontalrule"):o||this.button.enable("horizontalrule"),this.utils.isCurrentOrParent(["table","li"])?(this.button.disable("code"),this.button.disable("spoiler"),this.button.disable("woltlabHtml"),this.button.disable("woltlabQuote")):o||(this.button.enable("code"),this.button.enable("spoiler"),this.button.enable("woltlabHtml"),this.button.enable("woltlabQuote")),o&&this.button.setActive("html"),this.core.box()[0].classList.contains("redactorBoxFullscreen")&&this.button.setActive("woltlabFullscreen");var i=this.$editor[0];if(s.nodeType!==Node.ELEMENT_NODE&&(s=s.parentNode),s.closest(".redactor-layer")===i)for(var r,n,l=[];s!==i;)n=s.nodeName.toLowerCase(),-1===l.indexOf(n)&&("pre"===(r=n)&&s.classList.contains("woltlabHtml")&&(r="woltlab-html"),this.opts.activeButtonsStates.hasOwnProperty(r)&&this.button.setActive(this.opts.activeButtonsStates[r]),"pre"!==n&&l.push(n)),s=s.parentNode}}else-1!==$.inArray(e,this.opts.activeButtons)&&this.button.toggleActive(e)}.bind(this),this.observe.dropdowns=function(){var t=this.selection.current();t&&t.nodeType!==Node.ELEMENT_NODE&&(t=t.parentNode);var e,s=this.$editor[0],o=t&&t.closest(".redactor-layer")===s,i=[];if(o)for(;t!==s;)e=t.nodeName.toLowerCase(),-1===i.indexOf(e)&&i.push(e),t=t.parentNode;for(var r,n=null,l=0,a=this.opts.observe.dropdowns.length;l<a;l++){var b=(r=this.opts.observe.dropdowns[l]).observe,h=b.element,u=r.item,c=!!b.in&&b.in,d=!!b.out&&b.out;"a"===h&&null===n&&(n=$("<div />").html(this.selection.html()).find("a").length),-1!==i.indexOf(h)&&o||"a"===h&&0!==n?this.observe.setDropdownProperties(u,c,d):this.observe.setDropdownProperties(u,d,c)}}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabObserve=function(){"use strict";return{init:function(){var t=elByClass("re-button",this.button.toolbar()[0]);this.button.setInactiveAll=function(e){var s,o,i;for(o=0,i=t.length;o<i;o++)(s=t[o]).classList.contains("re-"+e)||(s.classList.remove("redactor-act"),"html"!==s.rel&&elAttr(s,"tabindex",-1),elAttr(s,"aria-pressed",!1))}.bind(this),this.observe.buttons=function(t,e){var s,o,i,n,r,l=this.selection.current();if(!1!==t?this.button.setInactiveAll():this.button.setInactiveAll(e),!1!==t||"html"===e){if(this.utils.isRedactorParent(l)&&(s=this.WoltLabSource.isActive(),this.utils.isCurrentOrParentHeader()||this.utils.isCurrentOrParent(["table","pre","blockquote","li"])?this.button.disable("horizontalrule"):s||this.button.enable("horizontalrule"),this.utils.isCurrentOrParent(["table","li"])?(this.button.disable("code"),this.button.disable("spoiler"),this.button.disable("woltlabHtml"),this.button.disable("woltlabQuote")):s||(this.button.enable("code"),this.button.enable("spoiler"),this.button.enable("woltlabHtml"),this.button.enable("woltlabQuote")),s&&this.button.setActive("html"),this.core.box()[0].classList.contains("redactorBoxFullscreen")&&this.button.setActive("woltlabFullscreen"),o=this.$editor[0],l.nodeType!==Node.ELEMENT_NODE&&(l=l.parentNode),l.closest(".redactor-layer")===o))for(r=[];l!==o;)n=l.nodeName.toLowerCase(),-1===r.indexOf(n)&&(i=n,"pre"===n&&l.classList.contains("woltlabHtml")&&(i="woltlab-html"),this.opts.activeButtonsStates.hasOwnProperty(i)&&this.button.setActive(this.opts.activeButtonsStates[i]),"pre"!==n&&r.push(n)),l=l.parentNode}else-1!==$.inArray(e,this.opts.activeButtons)&&this.button.toggleActive(e)}.bind(this),this.observe.dropdowns=function(){var t,e,s,o,i,n,r,l,a,b,h,u,c,d=this.selection.current();if(d&&d.nodeType!==Node.ELEMENT_NODE&&(d=d.parentNode),t=this.$editor[0],o=[],e=d&&d.closest(".redactor-layer")===t)for(;d!==t;)s=d.nodeName.toLowerCase(),-1===o.indexOf(s)&&o.push(s),d=d.parentNode;for(i=null,r=0,l=this.opts.observe.dropdowns.length;r<l;r++)b=(a=(n=this.opts.observe.dropdowns[r]).observe).element,h=n.item,u=!!a.in&&a.in,c=!!a.out&&a.out,"a"===b&&null===i&&(i=$("<div />").html(this.selection.html()).find("a").length),-1!==o.indexOf(b)&&e||"a"===b&&0!==i?this.observe.setDropdownProperties(h,u,c):this.observe.setDropdownProperties(h,c,u)}.bind(this)}}}; })(this);
// plugins/WoltLabPage.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var e=this.button.add("woltlabPage","");require(["WoltLabSuite/Core/Ui/Redactor/Page"],function(t){new t(this,e[0])}.bind(this))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabPage","");require(["WoltLabSuite/Core/Ui/Redactor/Page"],function(e){new e(this,t[0])}.bind(this))}}}; })(this);
// plugins/WoltLabPaste.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabPaste=function(){"use strict";var p=null;return{init:function(){var l=null,m=!1,g=document.documentMode&&"object"==typeof window.clipboardData,o=null,d=null,h=function(t){this.rtePaste=!0;var e=!("pre"!==this.opts.type&&!this.utils.isCurrentOrParent("pre"));e&&t.preventDefault(),this.utils.saveScroll(),this.selection.save(),this.paste.createPasteBox(e);var i=this.paste.getPasteBoxCode(e);this.buffer.set(),this.selection.restore(),this.utils.restoreScroll();var n=this.clean.getCurrentType(i),i=this.clean.onPaste(i,n),r=this.core.callback("paste",i);i=void 0===r?i:r,this.paste.insert(i,n),this.rtePaste=!1,e&&this.clean.cleanPre()}.bind(this),c=this.paste.init;this.paste.init=function(t){d=o=null;var e,i,n,r,s,a="pre"===this.opts.type||this.utils.isCurrentOrParent("pre");m=!a&&this.utils.isCurrentOrParent("kbd"),a||m?(l=g?window.clipboardData.getData("Text"):t.originalEvent.clipboardData.getData("text/plain"),e=this.clean.encodeEntities,this.clean.encodeEntities=function(t){return this.clean.encodeEntities=e,WCF.String.escapeHTML(t)}.bind(this)):g||(n=!1,-1!==(i=t.originalEvent.clipboardData.types).indexOf("text/html")&&((o=t.originalEvent.clipboardData.getData("text/html")).trim().match(/^<html[^>]*>[\s\S]*?<body[^>]*>([\s\S]+)<\/body>[\s\S]*?<\/html>$/)&&(o=RegExp.$1.replace(/^\s*(?:<!--StartFragment-->)(.+)(?:<!--EndFragment-->)?\s*$/,"$1")),n=0!==o.trim().length),n||-1===i.indexOf("text/plain")||(r=WCF.String.escapeHTML(t.originalEvent.clipboardData.getData("text/plain")),d="",1===(s=r.split("\n")).length?d=r:s.forEach(function(t){""===(t=t.trim())&&(t="<br>"),d+="<p>"+t+"</p>"}))),null===d&&null===o||t.preventDefault(),"android"===p.platform()&&"chrome"===p.browser()?h(t):c.call(this,t)}.bind(this),require(["Environment"],function(t){var e;"ios"===(p=t).platform()&&(e=this.paste.appendPasteBox,this.paste.appendPasteBox=function(){this.$pasteBox.css({fontSize:"16px",height:"1px",left:"1px",overflow:"hidden",position:"absolute",top:~~(window.innerHeight/4)+window.pageYOffset+"px",width:"1px"}),e.call(this)}.bind(this))}.bind(this));var e=this.paste.createPasteBox;this.paste.createPasteBox=function(t){null===o&&null===d&&e.call(this,t)}.bind(this);var i=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(t){if(null!==o||null!==d)return this.tmpScrollTop=void 0,o||d;var e=i.call(this,t);return!m&&(!t||e&&!g)?e:l}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){t=t.originalEvent||t;var e=null;if(g){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var i=t.clipboardData,n=i.types;if(Array.isArray(n)&&-1!==n.indexOf("public.tiff")){if(0===i.files.length)return;if(1!==i.files.length)return t.preventDefault(),!1;d=!0,null!==(e=i.files[0])&&t.preventDefault()}if(null===e){if(!i.items||!i.items.length)return;if(this.detect.isWebkit()){for(var r,s=!1,a=!1,l=0,o=i.items.length;l<o;l++)"string"===(r=i.items[l]).kind&&"text/html"===r.type?a=!0:"file"===r.kind&&(s=!0);if(s&&a)return!1}var d=!1;if(null===(e=i.items[0].getAsFile())){if(this.detect.isWebkit()&&1<i.items.length&&(d=!0,null!==(e=i.items[1].getAsFile())&&t.preventDefault()),null===e)return!1}else this.detect.isWebkit()&&1===i.items.length&&t.preventDefault()}}var h=new FileReader;return h.readAsDataURL(e),h.onload=this.paste.insertFromClipboard.bind(this),!1===d}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}),this.rtePaste=!1)}.bind(this);var A="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",x=this.paste.insert;this.paste.insert=function(t,e){if(m&&(e.pre=!0),this.utils.isCurrentOrParent("kbd")){x.call(this,t,e);var i=this.selection.current();i.nodeType===Node.TEXT_NODE&&(i=i.parentNode);for(var n=i.closest("kbd"),r=elByTag("p",n);r.length;)r[0].outerHTML=r[0].innerHTML;var s=n.innerHTML.split(/<br\s*\/?>/);if(1<s.length){for(var a=this.selection.block(),l=1,o=s.length;l<o;l++){var d=elCreate(a.nodeName);d.innerHTML="<kbd>"+s[l]+(l===o-1?this.marker.html():"")+"</kbd>",a.parentNode.insertBefore(d,a.nextSibling),a=d}n.innerHTML=s[0],this.selection.restore()}}else{if(e.pre)return x.call(this,t,e);var h=elCreate("div");if(h.innerHTML=t,1===h.childElementCount&&"A"===h.children[0].nodeName){var c=h.children[0];if(h.firstChild===c&&h.lastChild===c&&c.href===c.textContent){for(;c.childNodes.length;)h.insertBefore(c.childNodes[0],c);h.removeChild(c)}}var p=[];e.pre||e.text||elBySelAll("img",h,function(t){var e,i=t.src;0===i.indexOf("data:image")&&i!==A&&(t.src=A,e=WCF.getUUID(),elData(t,"uuid",e),p.push({src:i,uuid:e}),elHide(t))}.bind(this)),elBySelAll("pre",h,function(t){elBySelAll("br",t,function(t){var e=t.parentNode;e.insertBefore(document.createTextNode("\n"),t),e.removeChild(t)})}),x.call(this,h.innerHTML,e);var u=window.getSelection();u.rangeCount&&"A"===u.anchorNode.nodeName&&u.anchorOffset===u.anchorNode.childNodes.length&&this.caret.after(u.anchorNode),p.length&&window.setTimeout(function(){for(var t,e,i=0,n=p.length;i<n;i++)t=p[i],(e=elBySel('img[data-uuid="'+t.uuid+'"]',this.$editor[0]))&&(g?e.parentNode.removeChild(e):WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.src),replace:e}))}.bind(this),50);for(var f,b=[],v=this.core.editor()[0],l=0,o=v.childNodes.length;l<o;l++)(f=v.childNodes[l]).nodeType===Node.TEXT_NODE&&""===f.textContent&&b.push(f);b.forEach(elRemove),this.WoltLabClean.removeRedundantStyles(),this.rtePaste=!1}}.bind(this),this.paste.clipboardUpload=function(){}}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabPaste=function(){"use strict";var t=null;return{init:function(){var e,i,n,s,r=null,l=!1,a=document.documentMode&&"object"==typeof window.clipboardData,o=null,d=null,h=function(t){var e,i,n,s;this.rtePaste=!0,(e=!("pre"!==this.opts.type&&!this.utils.isCurrentOrParent("pre")))&&t.preventDefault(),this.utils.saveScroll(),this.selection.save(),this.paste.createPasteBox(e),i=this.paste.getPasteBoxCode(e),this.buffer.set(),this.selection.restore(),this.utils.restoreScroll(),n=this.clean.getCurrentType(i),i=this.clean.onPaste(i,n),i=void 0===(s=this.core.callback("paste",i))?i:s,this.paste.insert(i,n),this.rtePaste=!1,e&&this.clean.cleanPre()}.bind(this),c=this.paste.init;this.paste.init=function(e){var i,n,s,p,u,f;d=o=null,i="pre"===this.opts.type||this.utils.isCurrentOrParent("pre"),l=!i&&this.utils.isCurrentOrParent("kbd"),i||l?(r=a?window.clipboardData.getData("Text"):e.originalEvent.clipboardData.getData("text/plain"),n=this.clean.encodeEntities,this.clean.encodeEntities=function(t){return this.clean.encodeEntities=n,WCF.String.escapeHTML(t)}.bind(this)):a||(p=!1,-1!==(s=e.originalEvent.clipboardData.types).indexOf("text/html")&&((o=e.originalEvent.clipboardData.getData("text/html")).trim().match(/^<html[^>]*>[\s\S]*?<body[^>]*>([\s\S]+)<\/body>[\s\S]*?<\/html>$/)&&(o=RegExp.$1.replace(/^\s*(?:<!--StartFragment-->)(.+)(?:<!--EndFragment-->)?\s*$/,"$1")),p=0!==o.trim().length),p||-1===s.indexOf("text/plain")||(u=WCF.String.escapeHTML(e.originalEvent.clipboardData.getData("text/plain")),d="",1===(f=u.split("\n")).length?d=u:f.forEach((function(t){""===(t=t.trim())&&(t="<br>"),d+="<p>"+t+"</p>"})))),null===d&&null===o||e.preventDefault(),"android"===t.platform()&&"chrome"===t.browser()?h(e):c.call(this,e)}.bind(this),require(["Environment"],function(e){if("ios"===(t=e).platform()){var i=this.paste.appendPasteBox;this.paste.appendPasteBox=function(){this.$pasteBox.css({fontSize:"16px",height:"1px",left:"1px",overflow:"hidden",position:"absolute",top:~~(window.innerHeight/4)+window.pageYOffset+"px",width:"1px"}),i.call(this)}.bind(this)}}.bind(this)),e=this.paste.createPasteBox,this.paste.createPasteBox=function(t){null===o&&null===d&&e.call(this,t)}.bind(this),i=this.paste.getPasteBoxCode,this.paste.getPasteBoxCode=function(t){if(null!==o||null!==d)return this.tmpScrollTop=void 0,o||d;var e=i.call(this,t);return l?r:!t||e&&!a?e:r}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){var e,i,n,s,r,l,o,d,h,c;if(t=t.originalEvent||t,e=null,a){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;if(n=(i=t.clipboardData).types,Array.isArray(n)&&-1!==n.indexOf("public.tiff")){if(0===i.files.length)return;if(1!==i.files.length)return t.preventDefault(),!1;h=!0,null!==(e=i.files[0])&&t.preventDefault()}if(null===e){if(!i.items||!i.items.length)return;if(this.detect.isWebkit()){for(r=!1,l=!1,o=0,d=i.items.length;o<d;o++)"string"===(s=i.items[o]).kind&&"text/html"===s.type?l=!0:"file"===s.kind&&(r=!0);if(r&&l)return!1}if(h=!1,null===(e=i.items[0].getAsFile())){if(this.detect.isWebkit()&&i.items.length>1&&(h=!0,null!==(e=i.items[1].getAsFile())&&t.preventDefault()),null===e)return!1}else this.detect.isWebkit()&&1===i.items.length&&t.preventDefault()}}return(c=new FileReader).readAsDataURL(e),c.onload=this.paste.insertFromClipboard.bind(this),!1===h}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}),this.rtePaste=!1)}.bind(this),n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",s=this.paste.insert,this.paste.insert=function(t,e){var i,r,o,d,h,c,p,u,f,b,m,g,A,v,x;if(l&&(e.pre=!0),this.utils.isCurrentOrParent("kbd")){for(s.call(this,t,e),(i=this.selection.current()).nodeType===Node.TEXT_NODE&&(i=i.parentNode),r=i.closest("kbd"),o=elByTag("p",r);o.length;)o[0].outerHTML=o[0].innerHTML;if((d=r.innerHTML.split(/<br\s*\/?>/)).length>1){for(h=this.selection.block(),c=1,p=d.length;c<p;c++)(u=elCreate(h.nodeName)).innerHTML="<kbd>"+d[c]+(c===p-1?this.marker.html():"")+"</kbd>",h.parentNode.insertBefore(u,h.nextSibling),h=u;r.innerHTML=d[0],this.selection.restore()}}else{if(e.pre)return s.call(this,t,e);if((f=elCreate("div")).innerHTML=t,1===f.childElementCount&&"A"===f.children[0].nodeName&&(b=f.children[0],f.firstChild===b&&f.lastChild===b&&b.href===b.textContent)){for(;b.childNodes.length;)f.insertBefore(b.childNodes[0],b);f.removeChild(b)}for(m=[],e.pre||e.text||elBySelAll("img",f,function(t){var e,i=t.src;0===i.indexOf("data:image")&&i!==n&&(t.src=n,e=WCF.getUUID(),elData(t,"uuid",e),m.push({src:i,uuid:e}),elHide(t))}.bind(this)),elBySelAll("pre",f,(function(t){elBySelAll("br",t,(function(t){var e=t.parentNode;e.insertBefore(document.createTextNode("\n"),t),e.removeChild(t)}))})),s.call(this,f.innerHTML,e),(g=window.getSelection()).rangeCount&&"A"===g.anchorNode.nodeName&&g.anchorOffset===g.anchorNode.childNodes.length&&this.caret.after(g.anchorNode),m.length&&window.setTimeout(function(){var t,e,i,n;for(i=0,n=m.length;i<n;i++)t=m[i],(e=elBySel('img[data-uuid="'+t.uuid+'"]',this.$editor[0]))&&(a?e.parentNode.removeChild(e):WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.src),replace:e}))}.bind(this),50),v=[],c=0,p=(x=this.core.editor()[0]).childNodes.length;c<p;c++)(A=x.childNodes[c]).nodeType===Node.TEXT_NODE&&""===A.textContent&&v.push(A);v.forEach(elRemove),this.WoltLabClean.removeRedundantStyles(),this.rtePaste=!1}}.bind(this),this.paste.clipboardUpload=function(){}}}}; })(this);
// plugins/WoltLabQuote.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabQuote=function(){"use strict";return{init:function(){var o=this.button.add("woltlabQuote","");this.WoltLabBlock.register("woltlab-quote",!0),this.opts.replaceTags.blockquote="woltlab-quote",this.opts.activeButtonsStates["woltlab-quote"]="woltlabQuote",require(["WoltLabSuite/Core/Ui/Redactor/Quote"],function(t){new t(this,o)}.bind(this))}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabQuote=function(){"use strict";return{init:function(){var t=this.button.add("woltlabQuote","");this.WoltLabBlock.register("woltlab-quote",!0),this.opts.replaceTags.blockquote="woltlab-quote",this.opts.activeButtonsStates["woltlab-quote"]="woltlabQuote",require(["WoltLabSuite/Core/Ui/Redactor/Quote"],function(o){new o(this,t)}.bind(this))}}}; })(this);
// plugins/WoltLabReply.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabReply=function(){"use strict";var s=null,i=null,o=null;return{init:function(){var t=this.$editor[0].closest(".messageContent"),e=elById("messageQuickReply");t&&t.classList.contains("messageQuickReplyContent")&&e&&e.classList.contains("messageQuickReplyCollapsed")&&(s=this.WoltLabReply._click.bind(this),i=t,o=e,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","showEditor",this.WoltLabReply.showEditor.bind(this)),i.addEventListener(WCF_CLICK_EVENT,s))},showEditor:function(){o?o.classList.contains("messageQuickReplyCollapsed")&&(o.classList.remove("messageQuickReplyCollapsed"),i.removeEventListener(WCF_CLICK_EVENT,s),this.WoltLabCaret.endOfEditor()):this.WoltLabCaret.endOfEditor()},_click:function(t){t.preventDefault(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","showEditor")}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabReply=function(){"use strict";var t=null,e=null,s=null;return{init:function(){var i=this.$editor[0].closest(".messageContent"),l=elById("messageQuickReply");i&&i.classList.contains("messageQuickReplyContent")&&l&&l.classList.contains("messageQuickReplyCollapsed")&&(t=this.WoltLabReply._click.bind(this),e=i,s=l,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","showEditor",this.WoltLabReply.showEditor.bind(this)),e.addEventListener("click",t))},showEditor:function(){s?s.classList.contains("messageQuickReplyCollapsed")&&(s.classList.remove("messageQuickReplyCollapsed"),e.removeEventListener("click",t),this.WoltLabCaret.endOfEditor()):this.WoltLabCaret.endOfEditor()},_click:function(t){t.preventDefault(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","showEditor")}}}; })(this);
// plugins/WoltLabSize.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){for(var e,t=[8,10,12,14,18,24,36],i=this.WoltLabSize.setSize.bind(this),o={},s=0,r=t.length;s<r;s++)o["size_"+(e=t[s])]={title:e,func:i};o.removeSize={title:this.lang.get("remove-size"),func:this.WoltLabSize.removeSize.bind(this)};var n=this.button.add("woltlabSize","");this.button.addDropdown(n,o);var a=n.data("dropdown");a.find("a").each(function(e,t){t.className.match(/redactor-dropdown-size_(\d{1,2})/)&&(t.style.setProperty("font-size",RegExp.$1+"pt",""),t.parentNode.classList.add("woltlab-size-selection"))}),$('<li class="dropdownDivider"></li>').insertBefore(a.children("li").last())},setSize:function(t){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.format(this.$editor[0],"font-size",t.replace(/^size_/,"")+"pt"),this.buffer.set()}.bind(this)),this.selection.restore()},removeSize:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.removeFormat(this.$editor[0],"font-size"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){var e,t,i,o,s,r=[8,10,12,14,18,24,36],n=this.WoltLabSize.setSize.bind(this),a={};for(t=0,i=r.length;t<i;t++)a["size_"+(e=r[t])]={title:e,func:n};a.removeSize={title:this.lang.get("remove-size"),func:this.WoltLabSize.removeSize.bind(this)},o=this.button.add("woltlabSize",""),this.button.addDropdown(o,a),(s=o.data("dropdown")).find("a").each((function(e,t){t.className.match(/redactor-dropdown-size_(\d{1,2})/)&&(t.style.setProperty("font-size",RegExp.$1+"pt",""),t.parentNode.classList.add("woltlab-size-selection"))})),$('<li class="dropdownDivider"></li>').insertBefore(s.children("li").last())},setSize:function(e){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"font-size",e.replace(/^size_/,"")+"pt"),this.buffer.set()}.bind(this)),this.selection.restore()},removeSize:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.removeFormat(this.$editor[0],"font-size"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
// plugins/WoltLabSmiley.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabSmiley=function(){"use strict";var c=0;return{init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(e){var t,i,o,n,r,d;this.WoltLabSource.isActive()||(this.buffer.set(),t="wscSmiley_"+this.uuid+"_"+c++,(i=e.img.cloneNode()).id=t,this.insert.html(i.outerHTML),(i=elById(t)).removeAttribute("id"),(o=i.nextSibling)&&o.nodeType===Node.TEXT_NODE&&""===o.textContent&&o.remove(),i.parentNode.insertBefore(document.createTextNode(" "),i),n=document.createTextNode(" "),i.parentNode.insertBefore(n,i.nextSibling),i.outerHTML=i.outerHTML,r=window.getSelection(),(d=document.createRange()).selectNode(n),d.collapse(!1),r.removeAllRanges(),r.addRange(d),this.WoltLabCaret.forceSelectionSave())}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabSmiley=function(){"use strict";var e=0;return{init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(t){var i,o,n,r,d,c;this.WoltLabSource.isActive()||(this.buffer.set(),i="wscSmiley_"+this.uuid+"_"+e++,(o=t.img.cloneNode()).id=i,this.insert.html(o.outerHTML),(o=elById(i)).removeAttribute("id"),(n=o.nextSibling)&&n.nodeType===Node.TEXT_NODE&&""===n.textContent&&n.remove(),o.parentNode.insertBefore(document.createTextNode(" "),o),r=document.createTextNode(" "),o.parentNode.insertBefore(r,o.nextSibling),o.outerHTML=o.outerHTML,d=window.getSelection(),(c=document.createRange()).selectNode(r),c.collapse(!1),d.removeAllRanges(),d.addRange(c),this.WoltLabCaret.forceSelectionSave())}}}; })(this);
// plugins/WoltLabSource.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){function i(e){elBySelAll("woltlab-quote",e,function(e){var t;2!==e.childElementCount||"P"!==e.children[0].nodeName||"P"!==e.children[1].nodeName||""===(t=e.children[0]).innerHTML.trim()&&"<br>"===e.children[1].innerHTML.trim()&&e.removeChild(t)})}var l=this.$element[0].id;var n=this.source.hide;this.source.hide=function(){var e,t=$("<div />").html(this.source.$textarea.val());e=t[0],elBySelAll(".icon, .fa",e,function(e){var t=(t=e.className.split(" ")).filter(function(e){return"fa"!==e&&"icon"!==e&&(!e.match(/^icon\d{2}$/)&&!e.match(/^fa-[a-z\-]+$/))});e.className=t.join(" "),""===e.className.trim()&&""===e.innerHTML&&elRemove(e)}),this.source.$textarea.val(t[0].innerHTML),n.call(this),setTimeout(function(){this.focus.end(),i(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this);var o=this.source.$textarea[0];this.$element[0].parentNode.insertBefore(o,this.$element[0]);var a=this.source.show;this.source.show=function(){var e=this.$editor[0].offsetHeight,t=this.code.get();a.call(this),this.source.$textarea.val(t.replace(/ /g," ")),o.style.setProperty("height",Math.ceil(e)+"px",""),o.style.setProperty("display","block","");var n,r=elCreate("div");r.innerHTML=o.value,i(r),n=r,elBySelAll("pre, woltlab-quote, woltlab-spoiler",n,function(e){e.removeAttribute("data-title")}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","source_stripIntermediateCode_"+l,{div:n}),o.value=this.WoltLabSource.format(r.innerHTML),o.selectionStart=o.selectionEnd=o.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+l,function(e){o.clientHeight&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t=["ul","ol","li","table","tbody","thead","tr","td","th"];this.block.tags.forEach(function(e){t.push(e)}),t=t.join("|").toLowerCase();for(var n,r=["p","li","td","th"],i="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",l=[],o=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("<pre"+i+">[\\s\\S]*?</pre>","g"),function(e){return l.push(e),"@@@WCF_PRE_BACKUP_"+(l.length-1)+"@@@"})).replace(new RegExp("\\s*</("+t+")>\\s*","g"),function(e,t){return(-1===r.indexOf(t)?"\n":"")+"</"+t+">"})).replace(new RegExp("\\s*<("+t+")("+i+")>\\s*","g"),function(e,t,n){return"\n<"+t+n+">"+(-1===r.indexOf(t)?"\n":"")})).replace(new RegExp("(<(?:"+t+")(?:"+i+")>\n)\n+(?=<(?:"+t+")(?:"+i+")>)","g"),"$1")).replace(/<woltlab-quote([^>]*)>\n\t*\n(\t*)<p/,"<woltlab-quote$1>\n$2<p")).replace(new RegExp("<(ol|ul)("+i+")>\\s*","g"),"<$1$2>\n")).replace(/(<\/[ou]l>)<\/li>/g,"$1\n</li>")).split(/\n/),a=0,c=new RegExp("^<("+t+")"),s=new RegExp("^</("+t+")>$"),h=!1,u=0,d=o.length;u<d;u++){if(h=!1,(n=o[u]).match(c)?-1===r.indexOf(RegExp.$1)&&(h=!0):n.match(s)&&-1===r.indexOf(RegExp.$1)&&a--,0<a){var p=a;for(o[u]="";p--;)o[u]+="\t";o[u]+=n}h&&a++}for(e=o.join("\n"),u=0,d=l.length;u<d;u++)e=e.replace("@@@WCF_PRE_BACKUP_"+u+"@@@",l[u]);return(e=e.replace(/\r?\n<\/pre>/g,"</pre>")).trim()}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){var e,t,n=this.$element[0].id,i=function(e){elBySelAll("woltlab-quote",e,(function(e){var t;2===e.childElementCount&&"P"===e.children[0].nodeName&&"P"===e.children[1].nodeName&&""===(t=e.children[0]).innerHTML.trim()&&"<br>"===e.children[1].innerHTML.trim()&&e.removeChild(t)}))},r=function(e){elBySelAll("pre, woltlab-quote, woltlab-spoiler",e,(function(e){e.removeAttribute("data-title")})),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","source_stripIntermediateCode_"+n,{div:e})},o=this.source.hide;this.source.hide=function(){var e=$("<div />").html(this.source.$textarea.val());!function(e){elBySelAll(".icon, .fa",e,(function(e){var t=e.className.split(" ");t=t.filter((function(e){return"fa"!==e&&"icon"!==e&&!e.match(/^icon\d{2}$/)&&!e.match(/^fa-[a-z\-]+$/)})),e.className=t.join(" "),""===e.className.trim()&&""===e.innerHTML&&elRemove(e)}))}(e[0]),this.source.$textarea.val(e[0].innerHTML),o.call(this),setTimeout(function(){this.focus.end(),i(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this),e=this.source.$textarea[0],this.$element[0].parentNode.insertBefore(e,this.$element[0]),t=this.source.show,this.source.show=function(){var n,o=this.$editor[0].offsetHeight,l=this.code.get();t.call(this),this.source.$textarea.val(l.replace(/ /g," ")),e.style.setProperty("height",Math.ceil(o)+"px",""),e.style.setProperty("display","block",""),(n=elCreate("div")).innerHTML=e.value,i(n),r(n),e.value=this.WoltLabSource.format(n.innerHTML),e.selectionStart=e.selectionEnd=e.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+n,function(t){e.clientHeight&&(t.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),t.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t,n,i,r,o,l,a,c,s,h,u,d,p=["ul","ol","li","table","tbody","thead","tr","td","th"];for(this.block.tags.forEach((function(e){p.push(e)})),p=p.join("|").toLowerCase(),t=["p","li","td","th"],n="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",i=[],r=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("<pre"+n+">[\\s\\S]*?</pre>","g"),(function(e){return i.push(e),"@@@WCF_PRE_BACKUP_"+(i.length-1)+"@@@"}))).replace(new RegExp("\\s*</("+p+")>\\s*","g"),(function(e,n){return(-1===t.indexOf(n)?"\n":"")+"</"+n+">"}))).replace(new RegExp("\\s*<("+p+")("+n+")>\\s*","g"),(function(e,n,i){return"\n<"+n+i+">"+(-1===t.indexOf(n)?"\n":"")}))).replace(new RegExp("(<(?:"+p+")(?:"+n+")>\n)\n+(?=<(?:"+p+")(?:"+n+")>)","g"),"$1")).replace(/<woltlab-quote([^>]*)>\n\t*\n(\t*)<p/,"<woltlab-quote$1>\n$2<p")).replace(new RegExp("<(ol|ul)("+n+")>\\s*","g"),"<$1$2>\n")).replace(/(<\/[ou]l>)<\/li>/g,"$1\n</li>")).split(/\n/),o=0,s=new RegExp("^<("+p+")"),h=new RegExp("^</("+p+")>$"),u=!1,l=0,a=r.length;l<a;l++){if(u=!1,(c=r[l]).match(s)?-1===t.indexOf(RegExp.$1)&&(u=!0):c.match(h)&&-1===t.indexOf(RegExp.$1)&&o--,o>0){for(d=o,r[l]="";d--;)r[l]+="\t";r[l]+=c}u&&o++}for(e=r.join("\n"),l=0,a=i.length;l<a;l++)e=e.replace("@@@WCF_PRE_BACKUP_"+l+"@@@",i[l]);return(e=e.replace(/\r?\n<\/pre>/g,"</pre>")).trim()}}}; })(this);
// plugins/WoltLabSpoiler.js
(function (window, undefined) { $.Redactor.prototype.WoltLabSpoiler=function(){"use strict";return{init:function(){this.WoltLabBlock.register("woltlab-spoiler",!0),this.opts.activeButtonsStates["woltlab-spoiler"]="woltlabSpoiler",require(["WoltLabSuite/Core/Ui/Redactor/Spoiler"],function(t){new t(this)}.bind(this))}}}; })(this);
// plugins/WoltLabTable.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabTable=function(){"use strict";var t=null;return{init:function(){this.WoltLabEvent.register("insertedTable",function(){window.setTimeout(function(){var e,t=this.selection.block()||this.selection.current();if(t!==this.$editor[0]||(e=window.getSelection()).isCollapsed&&e.anchorNode===this.$editor[0]&&0<e.anchorOffset&&(t=e.anchorNode.childNodes[e.anchorOffset-1]),"TBODY"===t.nodeName&&(t=t.parentNode),"TABLE"===t.nodeName){for(var i,o=[],r=0,s=t.childNodes.length;r<s;r++)(i=t.childNodes[r]).nodeType===Node.TEXT_NODE&&0<i.textContent.length&&o.push(i);o.forEach(elRemove);var l=elBySel("td",t);l&&this.caret.end(l)}}.bind(this),10)}.bind(this));var e=this.button.get("table").data("dropdown").find(".redactor-dropdown-insert_table");e.off("mousedown"),e[0].addEventListener("mousedown",this.WoltLabTable._promptTableSize.bind(this)),require(["WoltLabSuite/Core/Ui/Redactor/Table"],function(e){t=e})},_promptTableSize:function(e){e.preventDefault(),this.table.getTable()||(this.selection.save(),t.showDialog({submitCallback:function(){this.WoltLabTable._insertTable(~~elById("redactor-table-rows").value,~~elById("redactor-table-cols").value)}.bind(this)}))},_insertTable:function(e,t){this.placeholder.hide();for(var i="<tr>",o=0;o<t;o++)i+="<td>"+this.opts.invisibleSpace+"</td>";i+="</tr>";var r="<table>";for(o=0;o<e;o++)r+=0===o?i.replace(new RegExp("^(<tr><td>"+this.opts.invisibleSpace+")"),"$1"+this.marker.html()):i;r+="</table>",this.selection.restore(),this.buffer.set();var s=this.selection.current();0!==$(s).closest("li",this.core.editor()[0]).length?$(s).closest("ul, ol").first().after(r):this.insert.html(r),this.selection.restore(),this.core.callback("insertedTable",void 0)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabTable=function(){"use strict";var e=null;return{init:function(){var t;this.WoltLabEvent.register("insertedTable",function(){window.setTimeout(function(){var e,t,i,o,s,l,n=this.selection.block()||this.selection.current();if(n===this.$editor[0]&&(e=window.getSelection()).isCollapsed&&e.anchorNode===this.$editor[0]&&e.anchorOffset>0&&(n=e.anchorNode.childNodes[e.anchorOffset-1]),"TBODY"===n.nodeName&&(n=n.parentNode),"TABLE"===n.nodeName){for(i=[],o=0,s=n.childNodes.length;o<s;o++)(t=n.childNodes[o]).nodeType===Node.TEXT_NODE&&t.textContent.length>0&&i.push(t);i.forEach(elRemove),(l=elBySel("td",n))&&this.caret.end(l)}}.bind(this),10)}.bind(this)),(t=this.button.get("table").data("dropdown").find(".redactor-dropdown-insert_table")).off("mousedown"),t[0].addEventListener("mousedown",this.WoltLabTable._promptTableSize.bind(this)),require(["WoltLabSuite/Core/Ui/Redactor/Table"],(function(t){e=t}))},_promptTableSize:function(t){t.preventDefault(),this.table.getTable()||(this.selection.save(),e.showDialog({submitCallback:function(){this.WoltLabTable._insertTable(~~elById("redactor-table-rows").value,~~elById("redactor-table-cols").value)}.bind(this)}))},_insertTable:function(e,t){var i,o,s,l;for(this.placeholder.hide(),o="<tr>",i=0;i<t;i++)o+="<td>"+this.opts.invisibleSpace+"</td>";for(o+="</tr>",s="<table>",i=0;i<e;i++)s+=0===i?o.replace(new RegExp("^(<tr><td>"+this.opts.invisibleSpace+")"),"$1"+this.marker.html()):o;s+="</table>",this.selection.restore(),this.buffer.set(),l=this.selection.current(),0!==$(l).closest("li",this.core.editor()[0]).length?$(l).closest("ul, ol").first().after(s):this.insert.html(s),this.selection.restore(),this.core.callback("insertedTable",void 0)}}}; })(this);
// plugins/WoltLabUtils.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabUtils=function(){"use strict";return{init:function(){var r=this.utils.replaceToTag;this.utils.replaceToTag=function(t,i){return"figure"===i?t:r.call(this,t,i)}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabUtils=function(){"use strict";return{init:function(){var t=this.utils.replaceToTag;this.utils.replaceToTag=function(i,r){return"figure"===r?i:t.call(this,i,r)}.bind(this)}}}; })(this);
// plugins/alignment.js
-(function (window, undefined) { jQuery.Redactor.prototype.alignment=function(){return{langs:{en:{align:"Align","align-left":"Align Left","align-center":"Align Center","align-right":"Align Right","align-justify":"Align Justify"}},init:function(){var t=this,e={};e.left={title:t.lang.get("align-left"),func:t.alignment.setLeft},e.center={title:t.lang.get("align-center"),func:t.alignment.setCenter},e.right={title:t.lang.get("align-right"),func:t.alignment.setRight},e.justify={title:t.lang.get("align-justify"),func:t.alignment.setJustify};var i=this.button.add("alignment",this.lang.get("align"));this.button.setIcon(i,'<i class="re-icon-alignment"></i>'),this.button.addDropdown(i,e)},removeAlign:function(){this.block.removeClass("text-center"),this.block.removeClass("text-right"),this.block.removeClass("text-justify")},setLeft:function(){this.buffer.set(),this.alignment.removeAlign()},setCenter:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-center"),this.core.editor().focus()},setRight:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-right"),this.core.editor().focus()},setJustify:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-justify"),this.core.editor().focus()}}}; })(this);
+(function (window, undefined) { jQuery.Redactor.prototype.alignment=function(){return{langs:{en:{align:"Align","align-left":"Align Left","align-center":"Align Center","align-right":"Align Right","align-justify":"Align Justify"}},init:function(){var t,e=this,i={};i.left={title:e.lang.get("align-left"),func:e.alignment.setLeft},i.center={title:e.lang.get("align-center"),func:e.alignment.setCenter},i.right={title:e.lang.get("align-right"),func:e.alignment.setRight},i.justify={title:e.lang.get("align-justify"),func:e.alignment.setJustify},t=this.button.add("alignment",this.lang.get("align")),this.button.setIcon(t,'<i class="re-icon-alignment"></i>'),this.button.addDropdown(t,i)},removeAlign:function(){this.block.removeClass("text-center"),this.block.removeClass("text-right"),this.block.removeClass("text-justify")},setLeft:function(){this.buffer.set(),this.alignment.removeAlign()},setCenter:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-center"),this.core.editor().focus()},setRight:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-right"),this.core.editor().focus()},setJustify:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-justify"),this.core.editor().focus()}}}; })(this);
// plugins/source.js
-(function (window, undefined) { !function(o){o.Redactor.prototype.source=function(){return{init:function(){var e=this.button.addFirst("html","HTML");this.button.addCallback(e,this.source.toggle);this.source.$textarea=o("<textarea />"),this.source.$textarea.css({width:"100%",margin:"0",background:"#111","box-sizing":"border-box",color:"rgba(255, 255, 255, .8)","font-size":"14px",outline:"none",padding:"16px","line-height":"22px","font-family":'Menlo, Monaco, Consolas, "Courier New", monospace'}).hide(),"textarea"===this.opts.type?this.core.box().append(this.source.$textarea):this.core.box().after(this.source.$textarea),this.core.element().on("destroy.callback.redactor",o.proxy(function(){this.source.$textarea.remove()},this))},toggle:function(){return this.source.$textarea.hasClass("open")?this.source.hide():this.source.show()},setCaretOnShow:function(){},setCaretOnHide:function(e){return e},hide:function(){this.source.$textarea.removeClass("open").hide(),this.source.$textarea.off(".redactor-source");var e=this.source.$textarea.val(),e=this.paragraphize.load(e);this.code.start(e),this.button.enableAll(),this.core.editor().show().focus(),this.selection.restore(),this.code.sync()},show:function(){this.selection.save();var e=this.core.editor().innerHeight(),t=this.code.get();t=(t=t.replace(/\n\n\n/g,"\n")).replace(/\n\n/g,"\n"),this.core.editor().hide(),this.button.disableAll(["html","woltlabFullscreen"]),this.source.$textarea.val(t).height(e).addClass("open").show(),this.source.$textarea.on("keyup.redactor-source",o.proxy(function(){"textarea"===this.opts.type&&this.core.textarea().val(this.source.$textarea.val())},this)),this.marker.remove(),o(window).scrollTop(scroll),this.source.$textarea[0].setSelectionRange&&this.source.$textarea[0].setSelectionRange(this.source.start,this.source.end),this.source.$textarea[0].scrollTop=0,setTimeout(o.proxy(function(){this.source.$textarea.focus(),this.button.setActive("html")},this),0)},enlargeOffset:function(){}}}}(jQuery); })(this);
+(function (window, undefined) { !function(e){e.Redactor.prototype.source=function(){return{init:function(){var t,o=this.button.addFirst("html","HTML");this.button.addCallback(o,this.source.toggle),t={width:"100%",margin:"0",background:"#111","box-sizing":"border-box",color:"rgba(255, 255, 255, .8)","font-size":"14px",outline:"none",padding:"16px","line-height":"22px","font-family":'Menlo, Monaco, Consolas, "Courier New", monospace'},this.source.$textarea=e("<textarea />"),this.source.$textarea.css(t).hide(),"textarea"===this.opts.type?this.core.box().append(this.source.$textarea):this.core.box().after(this.source.$textarea),this.core.element().on("destroy.callback.redactor",e.proxy((function(){this.source.$textarea.remove()}),this))},toggle:function(){return this.source.$textarea.hasClass("open")?this.source.hide():this.source.show()},setCaretOnShow:function(){},setCaretOnHide:function(e){return e},hide:function(){this.source.$textarea.removeClass("open").hide(),this.source.$textarea.off(".redactor-source");var e=this.source.$textarea.val();e=this.paragraphize.load(e),this.code.start(e),this.button.enableAll(),this.core.editor().show().focus(),this.selection.restore(),this.code.sync()},show:function(){var t,o;this.selection.save(),t=this.core.editor().innerHeight(),o=(o=(o=this.code.get()).replace(/\n\n\n/g,"\n")).replace(/\n\n/g,"\n"),this.core.editor().hide(),this.button.disableAll(["html","woltlabFullscreen"]),this.source.$textarea.val(o).height(t).addClass("open").show(),this.source.$textarea.on("keyup.redactor-source",e.proxy((function(){"textarea"===this.opts.type&&this.core.textarea().val(this.source.$textarea.val())}),this)),this.marker.remove(),e(window).scrollTop(scroll),this.source.$textarea[0].setSelectionRange&&this.source.$textarea[0].setSelectionRange(this.source.start,this.source.end),this.source.$textarea[0].scrollTop=0,setTimeout(e.proxy((function(){this.source.$textarea.focus(),this.button.setActive("html")}),this),0)},enlargeOffset:function(){}}}}(jQuery); })(this);
// plugins/table.js
-(function (window, undefined) { !function(o){o.Redactor.prototype.table=function(){return{langs:{en:{table:"Table","insert-table":"Insert table","insert-row-above":"Insert row above","insert-row-below":"Insert row below","insert-column-left":"Insert column left","insert-column-right":"Insert column right","add-head":"Add head","delete-head":"Delete head","delete-column":"Delete column","delete-row":"Delete row","delete-table":"Delete table"}},init:function(){var e={};e.insert_table={title:this.lang.get("insert-table"),func:this.table.insert,observe:{element:"table",in:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_row_above={title:this.lang.get("insert-row-above"),func:this.table.addRowAbove,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_row_below={title:this.lang.get("insert-row-below"),func:this.table.addRowBelow,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_column_left={title:this.lang.get("insert-column-left"),func:this.table.addColumnLeft,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_column_right={title:this.lang.get("insert-column-right"),func:this.table.addColumnRight,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.add_head={title:this.lang.get("add-head"),func:this.table.addHead,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_head={title:this.lang.get("delete-head"),func:this.table.deleteHead,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_column={title:this.lang.get("delete-column"),func:this.table.deleteColumn,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_row={title:this.lang.get("delete-row"),func:this.table.deleteRow,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_table={title:this.lang.get("delete-table"),func:this.table.deleteTable,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}};var t=this.button.addBefore("link","table",this.lang.get("table"));this.button.setIcon(t,'<i class="re-icon-table"></i>'),this.button.addDropdown(t,e)},insert:function(){if(!this.table.getTable()){this.placeholder.hide();for(var e=o("<div>"),t=o("<table />"),a=0;a<2;a++){for(var i=o("<tr>"),l=0;l<3;l++){var r=o("<td>"+this.opts.invisibleSpace+"</td>");0===a&&0===l&&r.append(this.marker.get()),o(i).append(r)}t.append(i)}e.append(t);var n=e.html();this.buffer.set();var s=this.selection.current();0!==o(s).closest("li",this.core.editor()[0]).length?o(s).closest("ul, ol").first().after(n):(this.air.collapsed(),this.insert.html(n)),this.selection.restore(),this.core.callback("insertedTable",t)}},getTable:function(){var e=o(this.selection.current()).closest("table");return!!this.utils.isRedactorParent(e)&&(0!==e.length&&e)},restoreAfterDelete:function(e){this.selection.restore(),e.find("span.redactor-selection-marker").remove()},deleteTable:function(){var e,t=this.table.getTable();t&&(this.buffer.set(),e=t.next(),this.opts.linebreaks||0===e.length?this.caret.after(t):this.caret.start(e),t.remove())},deleteRow:function(){var e,t,a,i,l=this.table.getTable();l&&(e=o(this.selection.current()),this.buffer.set(),!(a=(t=e.closest("tr")).prev().length?t.prev():t.next()).length||(i=a.children("td, th").first()).length&&i.prepend(this.marker.get()),t.remove(),this.table.restoreAfterDelete(l))},deleteColumn:function(){var l,e=this.table.getTable();e&&(this.buffer.set(),l=o(this.selection.current()).closest("td, th")[0].cellIndex,e.find("tr").each(o.proxy(function(e,t){var a=o(t),i=l-1<0?l+1:l-1;0===e&&a.find("td, th").eq(i).prepend(this.marker.get()),a.find("td, th").eq(l).remove()},this)),this.table.restoreAfterDelete(e))},addHead:function(){var e,t=this.table.getTable();t&&(this.buffer.set(),0===t.find("thead").length?((e=t.find("tr").first().clone()).find("td").replaceWith(o.proxy(function(){return o("<th>").html(this.opts.invisibleSpace)},this)),$thead=o("<thead></thead>").append(e),t.prepend($thead)):this.table.deleteHead())},deleteHead:function(){var e,t=this.table.getTable();!t||0!==(e=t.find("thead")).length&&(this.buffer.set(),e.remove())},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(e){var t,a;this.table.getTable()&&(this.buffer.set(),(a=(t=o(this.selection.current()).closest("tr")).clone()).find("th").replaceWith(function(){var e=o("<td>");return e[0].attributes=this.attributes,e.append(o(this).contents())}),a.find("td").html(this.opts.invisibleSpace),"after"===e?t.after(a):t.before(a))},addColumn:function(l){var r,e,t,a,i=this.table.getTable();i&&(r=0,e=o(this.selection.current()),this.buffer.set(),t=e.closest("tr"),a=e.closest("td, th"),t.find("td, th").each(o.proxy(function(e,t){o(t)[0]===a[0]&&(r=e)},this)),i.find("tr").each(o.proxy(function(e,t){var a=o(t).find("td, th").eq(r),i=a.clone();i.html(this.opts.invisibleSpace),"after"===l?a.after(i):a.before(i)},this)))}}}}(jQuery); })(this);
+(function (window, undefined) { !function(e){e.Redactor.prototype.table=function(){return{langs:{en:{table:"Table","insert-table":"Insert table","insert-row-above":"Insert row above","insert-row-below":"Insert row below","insert-column-left":"Insert column left","insert-column-right":"Insert column right","add-head":"Add head","delete-head":"Delete head","delete-column":"Delete column","delete-row":"Delete row","delete-table":"Delete table"}},init:function(){var e,t={};t.insert_table={title:this.lang.get("insert-table"),func:this.table.insert,observe:{element:"table",in:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.insert_row_above={title:this.lang.get("insert-row-above"),func:this.table.addRowAbove,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.insert_row_below={title:this.lang.get("insert-row-below"),func:this.table.addRowBelow,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.insert_column_left={title:this.lang.get("insert-column-left"),func:this.table.addColumnLeft,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.insert_column_right={title:this.lang.get("insert-column-right"),func:this.table.addColumnRight,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.add_head={title:this.lang.get("add-head"),func:this.table.addHead,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.delete_head={title:this.lang.get("delete-head"),func:this.table.deleteHead,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.delete_column={title:this.lang.get("delete-column"),func:this.table.deleteColumn,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.delete_row={title:this.lang.get("delete-row"),func:this.table.deleteRow,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},t.delete_table={title:this.lang.get("delete-table"),func:this.table.deleteTable,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e=this.button.addBefore("link","table",this.lang.get("table")),this.button.setIcon(e,'<i class="re-icon-table"></i>'),this.button.addDropdown(e,t)},insert:function(){var t,a,i,l,n,r,s,o,d,h;if(!this.table.getTable()){for(this.placeholder.hide(),t=2,a=3,i=e("<div>"),l=e("<table />"),n=0;n<t;n++){for(r=e("<tr>"),s=0;s<a;s++)o=e("<td>"+this.opts.invisibleSpace+"</td>"),0===n&&0===s&&o.append(this.marker.get()),e(r).append(o);l.append(r)}i.append(l),d=i.html(),this.buffer.set(),h=this.selection.current(),0!==e(h).closest("li",this.core.editor()[0]).length?e(h).closest("ul, ol").first().after(d):(this.air.collapsed(),this.insert.html(d)),this.selection.restore(),this.core.callback("insertedTable",l)}},getTable:function(){var t=e(this.selection.current()).closest("table");return!!this.utils.isRedactorParent(t)&&(0!==t.length&&t)},restoreAfterDelete:function(e){this.selection.restore(),e.find("span.redactor-selection-marker").remove()},deleteTable:function(){var e,t=this.table.getTable();t&&(this.buffer.set(),e=t.next(),this.opts.linebreaks||0===e.length?this.caret.after(t):this.caret.start(e),t.remove())},deleteRow:function(){var t,a,i,l,n=this.table.getTable();n&&(t=e(this.selection.current()),this.buffer.set(),(i=(a=t.closest("tr")).prev().length?a.prev():a.next()).length&&(l=i.children("td, th").first()).length&&l.prepend(this.marker.get()),a.remove(),this.table.restoreAfterDelete(n))},deleteColumn:function(){var t,a,i=this.table.getTable();i&&(this.buffer.set(),t=e(this.selection.current()).closest("td, th"),a=t[0].cellIndex,i.find("tr").each(e.proxy((function(t,i){var l=e(i),n=a-1<0?a+1:a-1;0===t&&l.find("td, th").eq(n).prepend(this.marker.get()),l.find("td, th").eq(a).remove()}),this)),this.table.restoreAfterDelete(i))},addHead:function(){var t,a=this.table.getTable();a&&(this.buffer.set(),0===a.find("thead").length?((t=a.find("tr").first().clone()).find("td").replaceWith(e.proxy((function(){return e("<th>").html(this.opts.invisibleSpace)}),this)),$thead=e("<thead></thead>").append(t),a.prepend($thead)):this.table.deleteHead())},deleteHead:function(){var e,t=this.table.getTable();t&&0!==(e=t.find("thead")).length&&(this.buffer.set(),e.remove())},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(t){var a,i,l=this.table.getTable();l&&(this.buffer.set(),(i=(a=e(this.selection.current()).closest("tr")).clone()).find("th").replaceWith((function(){var t=e("<td>");return t[0].attributes=this.attributes,t.append(e(this).contents())})),i.find("td").html(this.opts.invisibleSpace),"after"===t?a.after(i):a.before(i))},addColumn:function(t){var a,i,l,n,r=this.table.getTable();r&&(a=0,i=e(this.selection.current()),this.buffer.set(),l=i.closest("tr"),n=i.closest("td, th"),l.find("td, th").each(e.proxy((function(t,i){e(i)[0]===n[0]&&(a=t)}),this)),r.find("tr").each(e.proxy((function(i,l){var n=e(l).find("td, th").eq(a),r=n.clone();r.html(this.opts.invisibleSpace),"after"===t?n.after(r):n.before(r)}),this)))}}}}(jQuery); })(this);
// WCF.Combined.min.js -- DO NOT EDIT
// 3rdParty/jquery.js
-(function (window, undefined) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";function g(e){return null!=e&&e===e.window}var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,v=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),m={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,noModule:!0};function b(e,t,n){var r,i=(t=t||E).createElement("script");if(i.text=e,n)for(r in c)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.3.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!x(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||x(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(o=i?(i=!1,n&&Array.isArray(n)?n:[]):n&&k.isPlainObject(n)?n:{},a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){b(e)},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return v.apply([],a)},guid:1,support:m}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function i(){T()}var e,d,b,o,a,h,p,g,w,u,l,T,C,s,E,v,c,y,m,k="sizzle"+ +new Date,x=n.document,S=0,r=0,D=ae(),N=ae(),A=ae(),j=function(e,t){return e===t&&(l=!0),0},q={}.hasOwnProperty,t=[],L=t.pop,H=t.push,O=t.push,P=t.slice,M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",$="\\["+I+"*("+W+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+W+"))|)"+I+"*\\]",B=":("+W+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",F=new RegExp(I+"+","g"),_=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),z=new RegExp("^"+I+"*,"+I+"*"),X=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),U=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),V=new RegExp(B),G=new RegExp("^"+W+"$"),Y={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=ve(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){H.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,n,r){var i,o,a,s,u,l,c,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:x)!==C&&T(t),t=t||C,E)){if(11!==p&&(u=Z.exec(e)))if(i=u[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&m(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&d.getElementsByClassName&&t.getElementsByClassName)return O.apply(n,t.getElementsByClassName(i)),n}if(d.qsa&&!A[e+" "]&&(!v||!v.test(e))){if(1!==p)f=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ne,re):t.setAttribute("id",s=k),o=(l=h(e)).length;o--;)l[o]="#"+s+" "+ge(l[o]);c=l.join(","),f=ee.test(e)&&de(t.parentNode)||t}if(c)try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){}finally{s===k&&t.removeAttribute("id")}}}return g(e.replace(_,"$1"),t,n,r)}function ae(){var n=[];function r(e,t){return n.push(e+" ")>b.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function se(e){return e[k]=!0,e}function ue(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ie(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(a){return se(function(o){return o=+o,se(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=oe.support={},a=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=oe.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==C&&9===r.nodeType&&r.documentElement&&(s=(C=r).documentElement,E=!a(C),x!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",i,!1):n.attachEvent&&n.attachEvent("onunload",i)),d.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ue(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ue(function(e){return s.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,f);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},c=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ue(function(e){s.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),s.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(y=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&ue(function(e){d.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),c.push("!=",B)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=K.test(s.compareDocumentPosition),m=t||K.test(s.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===x&&m(x,e)?-1:t===C||t.ownerDocument===x&&m(x,t)?1:u?M(u,e)-M(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?M(u,e)-M(u,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===x?-1:s[r]===x?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),t=t.replace(U,"='$1']"),d.matchesSelector&&E&&!A[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=y.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<oe(t,C,null,[e]).length},oe.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),m(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&q.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},oe.escape=function(e){return(e+"").replace(ne,re)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=oe.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=oe.selectors={cacheLength:50,createPseudo:se,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,f),e[3]=(e[3]||e[4]||e[5]||"").replace(te,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=D[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&D(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=oe.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!=m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){for(;l;){for(a=e;a=a[l];)if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){for(d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];a=++s&&a&&a[l]||(d=s=0)||u.pop();)if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)for(;(a=++s&&a&&a[l]||(d=s=0)||u.pop())&&((x?a.nodeName.toLowerCase()!==f:1!==a.nodeType)||!++d||(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,t){for(var n,r=a(e,o),i=r.length;i--;)e[n=M(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:se(function(e){var r=[],i=[],s=p(e.replace(_,"$1"));return s[k]?se(function(e,t,n,r){for(var i,o=s(e,null,r,[]),a=e.length;a--;)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:se(function(t){return function(e){return 0<oe(t,e).length}}),contains:se(function(t){return t=t.replace(te,f),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:se(function(n){return G.test(n||"")||oe.error("unsupported lang: "+n),n=n.replace(te,f).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===s},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:pe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=function(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}(e);function he(){}function ge(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ve(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&s(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function ye(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function me(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function xe(d,h,g,v,y,e){return v&&!v[k]&&(v=xe(v)),y&&!y[k]&&(y=xe(y,e)),se(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:me(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=me(p,u),v(i,[],n,r),o=i.length;o--;)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a));if(e){if(y||d){if(y){for(i=[],o=p.length;o--;)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}for(o=p.length;o--;)(a=p[o])&&-1<(i=y?M(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=me(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):O.apply(t,p)})}function be(v,y){function e(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(a=0,t||o.ownerDocument===C||(T(o),n=!E);s=v[a++];)if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){for(a=0;s=y[a++];)s(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=L.call(r));f=me(f)}O.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&oe.uniqueSort(r)}return i&&(S=h,w=p),c}var m=0<y.length,x=0<v.length;return m?se(e):e}return he.prototype=b.filters=b.pseudos,b.setFilters=new he,h=oe.tokenize=function(e,t){var n,r,i,o,a,s,u,l=N[e+" "];if(l)return t?0:l.slice(0);for(a=e,s=[],u=b.preFilter;a;){for(o in n&&!(r=z.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(_," ")}),a=a.slice(n.length)),b.filter)!(r=Y[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):N(e,s).slice(0)},p=oe.compile=function(e,t){var n,r=[],i=[],o=A[e+" "];if(!o){for(n=(t=t||h(e)).length;n--;)(o=function e(t){for(var i,n,r,o=t.length,a=b.relative[t[0].type],s=a||b.relative[" "],u=a?1:0,l=ve(function(e){return e===i},s,!0),c=ve(function(e){return-1<M(i,e)},s,!0),f=[function(e,t,n){var r=!a&&(n||t!==w)||((i=t).nodeType?l:c)(e,t,n);return i=null,r}];u<o;u++)if(n=b.relative[t[u].type])f=[ve(ye(f),n)];else{if((n=b.filter[t[u].type].apply(null,t[u].matches))[k]){for(r=++u;r<o&&!b.relative[t[r].type];r++);return xe(1<u&&ye(f),1<u&&ge(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(_,"$1"),n,u<r&&e(t.slice(u,r)),r<o&&e(t=t.slice(r)),r<o&&ge(t))}f.push(n)}return ye(f)}(t[n]))[k]?r.push(o):i.push(o);(o=A(e,be(i,r))).selector=e}return o},g=oe.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,f),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=Y.needsContext.test(e)?0:o.length;i--&&(a=o[i],!b.relative[s=a.type]);)if((u=b.find[s])&&(r=u(a.matches[0].replace(te,f),ee.test(o[0].type)&&de(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&ge(o)))return O.apply(n,r),n;break}}return(l||p(e,c))(r,t,!E,n,!t||ee.test(e)&&de(t.parentNode)||t),n},d.sortStable=k.split("").sort(j).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;function T(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function S(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var D=k.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return x(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),A.test(r[1])&&k.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&x(i=e.promise)?i.call(e).done(t).fail(n):e&&x(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(M)||[],function(e,t){n[t]=!0}),n):k.extend({},r);function i(){for(s=s||r.once,a=o=!0;l.length;c=-1)for(t=l.shift();++c<u.length;)!1===u[c].apply(t[0],t[1])&&r.stopOnFalse&&(c=u.length,t=!1);r.memory||(t=!1),o=!1,s&&(u=t?[]:"")}var o,t,a,s,u=[],l=[],c=-1,f={add:function(){return u&&(t&&!o&&(c=u.length-1,l.push(t)),function n(e){k.each(e,function(e,t){x(t)?r.unique&&f.has(t)||u.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!o&&i()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;-1<(n=k.inArray(t,u,n));)u.splice(n,1),n<=c&&c--}),this},has:function(e){return e?-1<k.inArray(e,u):0<u.length},empty:function(){return u=u&&[],this},disable:function(){return s=l=[],u=t="",this},disabled:function(){return!u},lock:function(){return s=l=[],t||o||(u=t=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),o||i()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!a}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=x(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&x(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){function e(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,x(t)?s?t.call(e,l(u,o,R,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,I,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}}var n=this,r=arguments,t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,x(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,x(t)?t:R)),o[2][3].add(l(0,e,x(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){function t(t){return function(e){i[t]=this,o[t]=1<arguments.length?s.call(arguments):e,--n||a.resolveWith(i,o)}}var n=arguments.length,r=n,i=Array(r),o=s.call(arguments),a=k.Deferred();if(n<=1&&(W(e,a.done(t(r)).resolve,a.reject,!n),"pending"===a.state()||x(o[r]&&o[r].then)))return a.then();for(;r--;)W(o[r],t(r),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var B=k.Deferred();function F(){E.removeEventListener("DOMContentLoaded",F),C.removeEventListener("load",F),k.ready()}k.fn.ready=function(e){return B.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||B.resolveWith(E,[k])}}),k.ready.then=B.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",F),C.addEventListener("load",F));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,x(r)||(a=!0),l&&(t=a?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,X=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(X,U)}function G(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(M)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;return o&&void 0===e?void 0!==(t=J.get(o,n))||void 0!==(t=ee(o,n))?t:void 0:void this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(t=a.length;t--;)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(a,[a])}var r,i=1,o=k.Deferred(),a=this,s=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=Q.get(a[s],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});function te(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i}var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],oe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&k.contains(e.ownerDocument,e)&&"none"===k.css(e,"display")};function ae(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=(k.cssNumber[t]||"px"!==l&&+u)&&re.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var se={};function ue(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&oe(r)&&(l[c]=(u=s=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=se[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),se[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return ue(this,!0)},hide:function(){return ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){oe(this)?k(this).show():k(this).hide()})}});var le=/^(?:checkbox|radio)$/i,ce=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,pe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function de(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&N(e,t)?k.merge([e],n):n}function he(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}pe.optgroup=pe.option,pe.tbody=pe.tfoot=pe.colgroup=pe.caption=pe.thead,pe.th=pe.td;var ge,ve,ye=/<|&#?\w+;/;function me(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(ye.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(ce.exec(o)||["",""])[1].toLowerCase(),u=pe[s]||pe._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=k.contains(o.ownerDocument,o),a=de(f.appendChild(o),"script"),l&&he(a),n)for(c=0;o=a[c++];)fe.test(o.type||"")&&n.push(o);return f}ge=E.createDocumentFragment().appendChild(E.createElement("div")),(ve=E.createElement("input")).setAttribute("type","radio"),ve.setAttribute("checked","checked"),ve.setAttribute("name","t"),ge.appendChild(ve),m.checkClone=ge.cloneNode(!0).cloneNode(!0).lastChild.checked,ge.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!ge.cloneNode(!0).lastChild.defaultValue;var xe=E.documentElement,be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function ke(){try{return E.activeElement}catch(e){}}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(xe,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(M)||[""]).length;l--;)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=k.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:x(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ke()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ke()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){k.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ne=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Pe(n,r,i,o){r=v.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=x(d);if(h||1<f&&"string"==typeof d&&!m.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=me(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(de(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,de(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,He),c=0;c<s;c++)u=a[c],fe.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&k._evalUrl(u.src):b(u.textContent.replace(je,""),l,u))}return n}function Me(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(de(r)),r.parentNode&&(n&&k.contains(r.ownerDocument,r)&&he(de(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(De,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=k.contains(e.ownerDocument,e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=de(c),r=0,i=(o=de(e)).length;r<i;r++)s=o[r],u=a[r],l=void 0,"input"===(l=u.nodeName.toLowerCase())&&le.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||de(e),a=a||de(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=de(c,"script")).length&&he(a,!f&&de(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=qe(this,e)).insertBefore(e,t.firstChild)})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(de(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!pe[(ce.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(de(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(de(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Re,Ie,We,$e,Be,Fe,_e,ze=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ue=new RegExp(ie.join("|"),"i");function Ve(){var e;_e&&(Fe.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",_e.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",xe.appendChild(Fe).appendChild(_e),e=C.getComputedStyle(_e),Re="1%"!==e.top,Be=12===Ge(e.marginLeft),_e.style.right="60%",$e=36===Ge(e.right),Ie=36===Ge(e.width),_e.style.position="absolute",We=36===_e.offsetWidth||"absolute",xe.removeChild(Fe),_e=null)}function Ge(e){return Math.round(parseFloat(e))}function Ye(e,t,n){var r,i,o,a,s=e.style;return(n=n||Xe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||k.contains(e.ownerDocument,e)||(a=k.style(e,t)),!m.pixelBoxStyles()&&ze.test(a)&&Ue.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Fe=E.createElement("div"),(_e=E.createElement("div")).style&&(_e.style.backgroundClip="content-box",_e.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===_e.style.backgroundClip,k.extend(m,{boxSizingReliable:function(){return Ve(),Ie},pixelBoxStyles:function(){return Ve(),$e},pixelPosition:function(){return Ve(),Re},reliableMarginLeft:function(){return Ve(),Be},scrollboxSize:function(){return Ve(),We}}));var Je=/^(none|table(?!-c[ea]).+)/,Ke=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"},tt=["Webkit","Moz","ms"],nt=E.createElement("div").style;function rt(e){return k.cssProps[e]||(k.cssProps[e]=function(e){if(e in nt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}function it(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function ot(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+ie[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+ie[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+ie[a]+"Width",!0,i))):(u+=k.css(e,"padding"+ie[a],!0,i),"padding"!==n?u+=k.css(e,"border"+ie[a]+"Width",!0,i):s+=k.css(e,"border"+ie[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function at(e,t,n){var r=Xe(e),i=Ye(e,t,r),o="border-box"===k.css(e,"boxSizing",!1,r),a=o;if(ze.test(i)){if(!n)return i;i="auto"}return a=a&&(m.boxSizingReliable()||i===e.style[t]),"auto"!==i&&(parseFloat(i)||"inline"!==k.css(e,"display",!1,r))||(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+ot(e,t,n||(o?"border":"content"),a,r,i)+"px"}function st(e,t,n,r,i){return new st.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Ke.test(t),l=e.style;if(u||(t=rt(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=ae(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Ke.test(t)||(t=rt(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,s){k.cssHooks[s]={get:function(e,t,n){if(t)return!Je.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?at(e,s,n):te(e,Ze,function(){return at(e,s,n)})},set:function(e,t,n){var r,i=Xe(e),o="border-box"===k.css(e,"boxSizing",!1,i),a=n&&ot(e,s,n,o,i);return o&&m.scrollboxSize()===i.position&&(a-=Math.ceil(e["offset"+s[0].toUpperCase()+s.slice(1)]-parseFloat(i[s])-ot(e,s,"border",!1,i)-.5)),a&&(r=re.exec(t))&&"px"!==(r[3]||"px")&&(e.style[s]=t,t=k.css(e,s)),it(0,t,a)}}}),k.cssHooks.marginLeft=Qe(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-te(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ie[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=it)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),(k.Tween=st).prototype={constructor:st,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=st.propHooks[this.prop];return e&&e.get?e.get(this):st.propHooks._default.get(this)},run:function(e){var t,n=st.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=st.prototype.init,k.fx.step={};var ut,lt,ct,ft,pt=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ht(){lt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ht):C.setTimeout(ht,k.fx.interval),k.fx.tick())}function gt(){return C.setTimeout(function(){ut=void 0}),ut=Date.now()}function vt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function yt(e,t,n){for(var r,i=(mt.tweeners[t]||[]).concat(mt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function mt(o,e,t){var n,a,r=0,i=mt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=ut||gt(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:ut||gt(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=mt.prefilters[r].call(l,o,c,l.opts))return x(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,yt,l),x(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(mt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ae(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=x(e)?(t=e,["*"]):e.match(M)).length;r<i;r++)n=e[r],mt.tweeners[n]=mt.tweeners[n]||[],mt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&oe(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],pt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(ue([e],!0),l=e.style.display||l,c=k.css(e,"display"),ue([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&ue([e],!0),p.done(function(){for(r in g||ue([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=yt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?mt.prefilters.unshift(e):mt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||x(e)&&e,duration:e,easing:n&&t||t&&!x(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){x(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(oe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){function i(){var e=mt(this,k.extend({},t),a);(o||Q.get(this,"finish"))&&e.stop(!0)}var o=k.isEmptyObject(t),a=k.speed(e,n,r);return i.finish=i,o||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(i,e,o){function a(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&dt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(vt(r,!0),e,t,n)}}),k.each({slideDown:vt("show"),slideUp:vt("hide"),slideToggle:vt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),ut=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){lt||(lt=!0,ht())},k.fx.stop=function(){lt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ct=E.createElement("input"),ft=E.createElement("select").appendChild(E.createElement("option")),ct.type="checkbox",m.checkOn=""!==ct.value,m.optSelected=ft.selected,(ct=E.createElement("input")).value="t",ct.type="radio",m.radioValue="t"===ct.value;var xt,bt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):!(i&&"get"in i&&null!==(r=i.get(e,t)))&&null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=bt[t]||k.find.attr;bt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=bt[o],bt[o]=r,r=null!=a(e,t,n)?o:null,bt[o]=i),r}});var wt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;function Ct(e){return(e.match(M)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).addClass(t.call(this,e,Et(this)))});if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).removeClass(t.call(this,e,Et(this)))});if(!arguments.length)return this.attr("class","");if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"==o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):x(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,Et(this),t),t)}):this.each(function(){var e,t,n,r;if(a)for(t=0,n=k(this),r=kt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!=o||((e=Et(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==i&&Q.get(this,"__className__")||""))})},hasClass:function(e){for(var t,n=0,r=" "+e+" ";t=this[n++];)if(1===t.nodeType&&-1<(" "+Ct(Et(t))+" ").indexOf(r))return!0;return!1}});var St=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=x(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:Ct(k.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(((n=r[u]).selected||u===i)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=k(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},m.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in C;function Dt(e){e.stopPropagation()}var Nt=/^(?:focusinfocus|focusoutblur)$/;k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f=[n||E],p=y.call(e,"type")?e.type:e,d=y.call(e,"namespace")?e.namespace.split("."):[],h=c=o=n=n||E;if(3!==n.nodeType&&8!==n.nodeType&&!Nt.test(p+k.event.triggered)&&(-1<p.indexOf(".")&&(p=(d=p.split(".")).shift(),d.sort()),s=p.indexOf(":")<0&&"on"+p,(e=e[k.expando]?e:new k.Event(p,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=d.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),l=k.event.special[p]||{},r||!l.trigger||!1!==l.trigger.apply(n,t))){if(!r&&!l.noBubble&&!g(n)){for(a=l.delegateType||p,Nt.test(a+p)||(h=h.parentNode);h;h=h.parentNode)f.push(h),o=h;o===(n.ownerDocument||E)&&f.push(o.defaultView||o.parentWindow||C)}for(i=0;(h=f[i++])&&!e.isPropagationStopped();)c=h,e.type=1<i?a:l.bindType||p,(u=(Q.get(h,"events")||{})[e.type]&&Q.get(h,"handle"))&&u.apply(h,t),(u=s&&h[s])&&u.apply&&G(h)&&(e.result=u.apply(h,t),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||l._default&&!1!==l._default.apply(f.pop(),t)||!G(n)||s&&x(n[p])&&!g(n)&&((o=n[s])&&(n[s]=null),k.event.triggered=p,e.isPropagationStopped()&&c.addEventListener(p,Dt),n[p](),e.isPropagationStopped()&&c.removeEventListener(p,Dt),k.event.triggered=void 0,o&&(n[s]=o)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),m.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){function i(e){k.event.simulate(r,e.target,k.event.fix(e))}k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var At=C.location,jt=Date.now(),qt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Lt=/\[\]$/,Ht=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;k.param=function(e,t){function n(e,t){var n=x(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)}var r,i=[];if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)!function n(r,e,i,o){var t;if(Array.isArray(e))k.each(e,function(e,t){i||Lt.test(r)?o(r,t):n(r+"["+("object"==typeof t&&null!=t?e:"")+"]",t,i,o)});else if(i||"object"!==w(e))o(r,e);else for(t in e)n(r+"["+t+"]",e[t],i,o)}(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Pt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!le.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Ht,"\r\n")}}):{name:t.name,value:n.replace(Ht,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,$t=/^(?:GET|HEAD)$/,Bt=/^\/\//,Ft={},_t={},zt="*/".concat("*"),Xt=E.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(M)||[];if(x(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r=r||{})[n]=t[n]);return r&&k.extend(!0,e,r),e}Xt.href=At.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,k.ajaxSettings),t):Gt(k.ajaxSettings,e)},ajaxPrefilter:Ut(Ft),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n)for(n={};t=Wt.exec(p);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||At.href)+"").replace(Bt,At.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(M)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),Vt(Ft,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!$t.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(qt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(qt.test(f)?"&":"?")+"_="+jt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a=a||i}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return x(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(x(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return x(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=x(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=k.ajaxSettings.xhr();m.cors=!!Qt&&"withCredentials"in Qt,m.ajax=Qt=!!Qt,k.ajaxTransport(function(i){var o,a;if(m.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=k("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||k.expando+"_"+jt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=x(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(qt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&x(i)&&i(o[0]),o=i=void 0}),"script"}),m.createHTMLDocument=((Jt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=me([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Ct(e.slice(s)),e=e.slice(0,s)),x(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,r.left):(a=parseFloat(o)||0,parseFloat(u)||0),x(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||xe})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;return g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n?r?r[i]:e[t]:void(r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n)},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=Qe(m.pixelPosition,function(e,t){if(t)return t=Ye(e,n),ze.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return g(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),x(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=N,k.isFunction=x,k.isWindow=g,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var en=C.jQuery,tn=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=tn),e&&C.jQuery===k&&(C.jQuery=en),k},e||(C.jQuery=C.$=k),k}); })(this);
+(function (window, undefined) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";function n(e,t,n){var r,i=(t=t||qt).createElement("script");if(i.text=e,n)for(r in Xt)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function r(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Rt[It.call(e)]||"object":typeof e}function i(e){var t=!!e&&"length"in e&&e.length,n=r(e);return!_t(e)&&!zt(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return _t(t)?Vt.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?Vt.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?Vt.grep(e,(function(e){return Mt.call(t,e)>-1!==n})):Vt.filter(t,e,n)}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){return e}function l(e){throw e}function c(e,t,n,r){var i;try{e&&_t(i=e.promise)?i.call(e).done(t).fail(n):e&&_t(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){qt.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),Vt.ready()}function p(e,t){return t.toUpperCase()}function d(e){return e.replace(fe,"ms-").replace(pe,p)}function h(){this.expando=Vt.expando+h.uid++}function g(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(me,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ye.test(e)?JSON.parse(e):e)}(n)}catch(e){}ge.set(e,t,n)}else n=void 0;return n}function y(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return Vt.css(e,t,"")},u=s(),l=n&&n[3]||(Vt.cssNumber[t]?"":"px"),c=(Vt.cssNumber[t]||"px"!==l&&+u)&&xe.exec(Vt.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)Vt.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,Vt.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function m(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ce[r];return i||(t=n.body.appendChild(n.createElement(r)),i=Vt.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ce[r]=i,i)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=he.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&we(r)&&(i[o]=m(r))):"none"!==n&&(i[o]="none",he.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function x(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&o(e,t)?Vt.merge([e],n):n}function b(e,t){for(var n=0,r=e.length;n<r;n++)he.set(e[n],"globalEval",!t||he.get(t[n],"globalEval"))}function w(e,t,n,i,o){for(var a,s,u,l,c,f,p=t.createDocumentFragment(),d=[],h=0,g=e.length;h<g;h++)if((a=e[h])||0===a)if("object"===r(a))Vt.merge(d,a.nodeType?[a]:a);else if(Ne.test(a)){for(s=s||p.appendChild(t.createElement("div")),u=(ke.exec(a)||["",""])[1].toLowerCase(),l=De[u]||De._default,s.innerHTML=l[1]+Vt.htmlPrefilter(a)+l[2],f=l[0];f--;)s=s.lastChild;Vt.merge(d,s.childNodes),(s=p.firstChild).textContent=""}else d.push(t.createTextNode(a));for(p.textContent="",h=0;a=d[h++];)if(i&&Vt.inArray(a,i)>-1)o&&o.push(a);else if(c=Vt.contains(a.ownerDocument,a),s=x(p.appendChild(a),"script"),c&&b(s),n)for(f=0;a=s[f++];)Se.test(a.type||"")&&n.push(a);return p}function T(){return!0}function C(){return!1}function E(){try{return qt.activeElement}catch(e){}}function k(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)k(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=C;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return Vt().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=Vt.guid++)),e.each((function(){Vt.event.add(this,t,i,r,n)}))}function S(e,t){return o(e,"table")&&o(11!==t.nodeType?t:t.firstChild,"tr")&&Vt(e).children("tbody")[0]||e}function D(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function N(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function A(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(he.hasData(e)&&(o=he.access(e),a=he.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)Vt.event.add(t,i,l[i][n]);ge.hasData(e)&&(s=ge.access(e),u=Vt.extend({},s),ge.set(t,u))}}function j(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ee.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function q(e,t,r,i){t=Ot.apply([],t);var o,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0],g=_t(h);if(g||p>1&&"string"==typeof h&&!Ft.checkClone&&Pe.test(h))return e.each((function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),q(o,t,r,i)}));if(p&&(a=(o=w(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=a),a||i)){for(u=(s=Vt.map(x(o,"script"),D)).length;f<p;f++)l=o,f!==d&&(l=Vt.clone(l,!0,!0),u&&Vt.merge(s,x(l,"script"))),r.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,Vt.map(s,N),f=0;f<u;f++)l=s[f],Se.test(l.type||"")&&!he.access(l,"globalEval")&&Vt.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?Vt._evalUrl&&Vt._evalUrl(l.src):n(l.textContent.replace(Me,""),c,l))}return e}function L(e,t,n){for(var r,i=t?Vt.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||Vt.cleanData(x(r)),r.parentNode&&(n&&Vt.contains(r.ownerDocument,r)&&b(x(r,"script")),r.parentNode.removeChild(r));return e}function H(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||Vt.contains(e.ownerDocument,e)||(a=Vt.style(e,t)),!Ft.pixelBoxStyles()&&Re.test(a)&&We.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function O(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function P(e){var t=Vt.cssProps[e];return t||(t=Vt.cssProps[e]=function(e){if(e in Xe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ze.length;n--;)if((e=ze[n]+t)in Xe)return e}(e)||e),t}function M(e,t,n){var r=xe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function R(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=Vt.css(e,n+be[a],!0,i)),r?("content"===n&&(u-=Vt.css(e,"padding"+be[a],!0,i)),"margin"!==n&&(u-=Vt.css(e,"border"+be[a]+"Width",!0,i))):(u+=Vt.css(e,"padding"+be[a],!0,i),"padding"!==n?u+=Vt.css(e,"border"+be[a]+"Width",!0,i):s+=Vt.css(e,"border"+be[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function I(e,t,n){var r=Ie(e),i=H(e,t,r),o="border-box"===Vt.css(e,"boxSizing",!1,r),a=o;if(Re.test(i)){if(!n)return i;i="auto"}return a=a&&(Ft.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===Vt.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+R(e,t,n||(o?"border":"content"),a,r,i)+"px"}function W(e,t,n,r,i){return new W.prototype.init(e,t,n,r,i)}function $(){Ve&&(!1===qt.hidden&&e.requestAnimationFrame?e.requestAnimationFrame($):e.setTimeout($,Vt.fx.interval),Vt.fx.tick())}function B(){return e.setTimeout((function(){Ue=void 0})),Ue=Date.now()}function F(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=be[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function _(e,t,n){for(var r,i=(z.tweeners[t]||[]).concat(z.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function z(e,t,n){var r,i,o=0,a=z.prefilters.length,s=Vt.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=Ue||B(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:Vt.extend({},t),opts:Vt.extend(!0,{specialEasing:{},easing:Vt.easing._default},n),originalProperties:t,originalOptions:n,startTime:Ue||B(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Vt.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=d(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=Vt.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=z.prefilters[o].call(l,e,c,l.opts))return _t(r.stop)&&(Vt._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return Vt.map(c,_,l),_t(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),Vt.fx.timer(Vt.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function X(e){return(e.match(se)||[]).join(" ")}function U(e){return e.getAttribute&&e.getAttribute("class")||""}function V(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(se)||[]}function G(e,t,n,i){var o;if(Array.isArray(t))Vt.each(t,(function(t,r){n||at.test(e)?i(e,r):G(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==r(t))i(e,t);else for(o in t)G(e+"["+o+"]",t[o],n,i)}function Y(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(se)||[];if(_t(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Q(e,t,n,r){function i(s){var u;return o[s]=!0,Vt.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)})),u}var o={},a=e===vt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function J(e,t){var n,r,i=Vt.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Vt.extend(!0,e,r),e}var K,Z,ee,te,ne,re,ie,oe,ae,se,ue,le,ce,fe,pe,de,he,ge,ye,me,ve,xe,be,we,Te,Ce,Ee,ke,Se,De,Ne,Ae,je,qe,Le,He,Oe,Pe,Me,Re,Ie,We,$e,Be,Fe,_e,ze,Xe,Ue,Ve,Ge,Ye,Qe,Je,Ke,Ze,et,tt,nt,rt,it,ot,at,st,ut,lt,ct,ft,pt,dt,ht,gt,yt,mt,vt,xt,bt,wt,Tt,Ct,Et,kt,St,Dt,Nt,At,jt=[],qt=e.document,Lt=Object.getPrototypeOf,Ht=jt.slice,Ot=jt.concat,Pt=jt.push,Mt=jt.indexOf,Rt={},It=Rt.toString,Wt=Rt.hasOwnProperty,$t=Wt.toString,Bt=$t.call(Object),Ft={},_t=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},zt=function(e){return null!=e&&e===e.window},Xt={type:!0,src:!0,noModule:!0},Ut="3.3.1",Vt=function(e,t){return new Vt.fn.init(e,t)},Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;return Vt.fn=Vt.prototype={jquery:Ut,constructor:Vt,length:0,toArray:function(){return Ht.call(this)},get:function(e){return null==e?Ht.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=Vt.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Vt.each(this,e)},map:function(e){return this.pushStack(Vt.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(Ht.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Pt,sort:jt.sort,splice:jt.splice},Vt.extend=Vt.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||_t(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(Vt.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&Vt.isPlainObject(n)?n:{},a[t]=Vt.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},Vt.extend({expando:"jQuery"+(Ut+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==It.call(e))&&(!(t=Lt(e))||"function"==typeof(n=Wt.call(t,"constructor")&&t.constructor)&&$t.call(n)===Bt)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){n(e)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Gt,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?Vt.merge(n,"string"==typeof e?[e]:e):Pt.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:Mt.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;a<r;a++)null!=(o=t(e[a],a,n))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,n))&&s.push(o);return Ot.apply([],s)},guid:1,support:Ft}),"function"==typeof Symbol&&(Vt.fn[Symbol.iterator]=jt[Symbol.iterator]),Vt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){Rt["[object "+t+"]"]=t.toLowerCase()})),K=function(e){function t(e,t,n,r){var i,o,a,s,u,l,c,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:W)!==q&&j(t),t=t||q,H)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&R(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!O||!O.test(e))){if(1!==h)p=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=I),o=(l=E(e)).length;o--;)l[o]="#"+s+" "+d(l[o]);c=l.join(","),p=ye.test(e)&&f(t.parentNode)||t}if(c)try{return Q.apply(n,p.querySelectorAll(c)),n}catch(e){}finally{s===I&&t.removeAttribute("id")}}}return S(e.replace(oe,"$1"),t,n,r)}function n(){var e=[];return function t(n,r){return e.push(n+" ")>w.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function r(e){return e[I]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r((function(t){return t=+t,r((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function f(e){return e&&void 0!==e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=B++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[$,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[I]||(t[I]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===$&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function g(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function y(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function m(e,n,i,o,a,s){return o&&!o[I]&&(o=m(o)),a&&!a[I]&&(a=m(a,s)),r((function(r,s,u,l){var c,f,p,d=[],h=[],g=s.length,m=r||function(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}(n||"*",u.nodeType?[u]:u,[]),v=!e||!r&&n?m:y(m,d,e,u,l),x=i?a||(r?e:g||o)?[]:s:v;if(i&&i(v,x,u,l),o)for(c=y(x,h),o(c,[],u,l),f=c.length;f--;)(p=c[f])&&(x[h[f]]=!(v[h[f]]=p));if(r){if(a||e){if(a){for(c=[],f=x.length;f--;)(p=x[f])&&c.push(v[f]=p);a(null,x=[],c,l)}for(f=x.length;f--;)(p=x[f])&&(c=a?K(r,p):d[f])>-1&&(r[c]=!(s[c]=p))}}else x=y(x===s?x.splice(g,x.length):x),a?a(null,s,x,l):Q.apply(s,x)}))}function v(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=h((function(e){return e===t}),a,!0),l=h((function(e){return K(t,e)>-1}),a,!0),c=[function(e,n,r){var i=!o&&(r||n!==D)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[h(g(c),n)];else{if((n=w.filter[e[s].type].apply(null,e[s].matches))[I]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return m(s>1&&g(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&d(e))}c.push(n)}return g(c)}var x,b,w,T,C,E,k,S,D,N,A,j,q,L,H,O,P,M,R,I="sizzle"+1*new Date,W=e.document,$=0,B=0,F=n(),_=n(),z=n(),X=function(e,t){return e===t&&(A=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\[[\\x20\\t\\r\\n\\f]*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),ae=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),se=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),ue=new RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,de=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),ve=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){j()},Te=h((function(e){return!0===e.disabled&&("form"in e||"label"in e)}),{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(W.childNodes),W.childNodes),V[W.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(x in b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==q&&9===r.nodeType&&r.documentElement?(L=(q=r).documentElement,H=!C(q),W!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i((function(e){return e.className="i",!e.getAttribute("className")})),b.getElementsByTagName=i((function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length})),b.getElementsByClassName=he.test(q.getElementsByClassName),b.getById=i((function(e){return L.appendChild(e).id=I,!q.getElementsByName||!q.getElementsByName(I).length})),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ve);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ve);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},P=[],O=[],(b.qsa=he.test(q.querySelectorAll))&&(i((function(e){L.appendChild(e).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+Z+")"),e.querySelectorAll("[id~="+I+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||O.push(".#.+[+~]")})),i((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")}))),(b.matchesSelector=he.test(M=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i((function(e){b.disconnectedMatch=M.call(e,"*"),M.call(e,"[s!='']:x"),P.push("!=",re)})),O=O.length&&new RegExp(O.join("|")),P=P.length&&new RegExp(P.join("|")),t=he.test(L.compareDocumentPosition),R=t||he.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===W&&R(W,e)?-1:t===q||t.ownerDocument===W&&R(W,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===W?-1:u[r]===W?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&j(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&H&&!z[n+" "]&&(!P||!P.test(n))&&(!O||!O.test(n)))try{var r=M.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&j(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&j(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:b.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},(w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=F[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+ee+"|$)"))&&F(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(y){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&v){for(x=(d=(l=(c=(f=(p=y)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1])&&l[2],p=d&&y.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[$,d,x];break}}else if(v&&(x=d=(l=(c=(f=(p=t)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++x||(v&&((c=(f=p[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[$,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[I]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r((function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=K(e,i[a])]=!(t[r]=i[a])})):function(e){return o(e,0,i)}):o}},pseudos:{not:r((function(e){var t=[],n=[],i=k(e.replace(oe,"$1"));return i[I]?r((function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}})),has:r((function(e){return function(n){return t(e,n).length>0}})),contains:r((function(e){return e=e.replace(me,ve),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}})),lang:r((function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ve).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return de.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c((function(){return[0]})),last:c((function(e,t){return[t-1]})),eq:c((function(e,t,n){return[n<0?n+t:n]})),even:c((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:c((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:c((function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e})),gt:c((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=u(x);return p.prototype=w.filters=w.pseudos,w.setFilters=new p,E=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=_[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){for(a in r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length)),w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):_(e,u).slice(0)},k=t.compile=function(e,n){var i,o=[],a=[],s=z[e+" "];if(!s){for(n||(n=E(e)),i=n.length;i--;)(s=v(n[i]))[I]?o.push(s):a.push(s);(s=z(e,function(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,p,d=0,h="0",g=r&&[],m=[],v=D,x=r||o&&w.find.TAG("*",l),b=$+=null==v?1:Math.random()||.1,T=x.length;for(l&&(D=a===q||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===q||(j(c),s=!H);p=e[f++];)if(p(c,a||q,s)){u.push(c);break}l&&($=b)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,m,a,s);if(r){if(d>0)for(;h--;)g[h]||m[h]||(m[h]=G.call(u));m=y(m)}Q.apply(u,m),l&&!r&&m.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&($=b,D=v),g};return i?r(a):a}(a,o))).selector=e}return s},S=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&E(e=l.selector||e);if(n=n||[],1===c.length){if((o=c[0]=c[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&H&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ve),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ve),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&d(o)))return Q.apply(n,r),n;break}}return(l||k(e,c))(r,t,!H,n,!t||ye.test(e)&&f(t.parentNode)||t),n},b.sortStable=I.split("").sort(X).join("")===I,b.detectDuplicates=!!A,j(),b.sortDetached=i((function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))})),i((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||o("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),b.attributes&&i((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||o("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),i((function(e){return null==e.getAttribute("disabled")}))||o(Z,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),t}(e),Vt.find=K,Vt.expr=K.selectors,Vt.expr[":"]=Vt.expr.pseudos,Vt.uniqueSort=Vt.unique=K.uniqueSort,Vt.text=K.getText,Vt.isXMLDoc=K.isXML,Vt.contains=K.contains,Vt.escapeSelector=K.escape,Z=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Vt(e).is(n))break;r.push(e)}return r},ee=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},te=Vt.expr.match.needsContext,ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Vt.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Vt.find.matchesSelector(r,e)?[r]:[]:Vt.find.matches(e,Vt.grep(t,(function(e){return 1===e.nodeType})))},Vt.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Vt(e).filter((function(){for(t=0;t<r;t++)if(Vt.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)Vt.find(e,i[t],n);return r>1?Vt.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&te.test(e)?Vt(e):e||[],!1).length}}),ie=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,(Vt.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||re,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ie.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Vt?t[0]:t,Vt.merge(this,Vt.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:qt,!0)),ne.test(r[1])&&Vt.isPlainObject(t))for(r in t)_t(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=qt.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):_t(e)?void 0!==n.ready?n.ready(e):e(Vt):Vt.makeArray(e,this)}).prototype=Vt.fn,re=Vt(qt),oe=/^(?:parents|prev(?:Until|All))/,ae={children:!0,contents:!0,next:!0,prev:!0},Vt.fn.extend({has:function(e){var t=Vt(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(Vt.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&Vt(e);if(!te.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Vt.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Vt.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?Mt.call(Vt(e),this[0]):Mt.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Vt.uniqueSort(Vt.merge(this.get(),Vt(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Vt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z(e,"parentNode")},parentsUntil:function(e,t,n){return Z(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return Z(e,"nextSibling")},prevAll:function(e){return Z(e,"previousSibling")},nextUntil:function(e,t,n){return Z(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z(e,"previousSibling",n)},siblings:function(e){return ee((e.parentNode||{}).firstChild,e)},children:function(e){return ee(e.firstChild)},contents:function(e){return o(e,"iframe")?e.contentDocument:(o(e,"template")&&(e=e.content||e),Vt.merge([],e.childNodes))}},(function(e,t){Vt.fn[e]=function(n,r){var i=Vt.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Vt.filter(r,i)),this.length>1&&(ae[e]||Vt.uniqueSort(i),oe.test(e)&&i.reverse()),this.pushStack(i)}})),se=/[^\x20\t\r\n\f]+/g,Vt.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return Vt.each(e.match(se)||[],(function(e,n){t[n]=!0})),t}(e):Vt.extend({},e);var t,n,i,o,a=[],s=[],u=-1,l=function(){for(o=o||e.once,i=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)!1===a[u].apply(n[0],n[1])&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,o&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function t(n){Vt.each(n,(function(n,i){_t(i)?e.unique&&c.has(i)||a.push(i):i&&i.length&&"string"!==r(i)&&t(i)}))}(arguments),n&&!t&&l()),this},remove:function(){return Vt.each(arguments,(function(e,t){for(var n;(n=Vt.inArray(t,a,n))>-1;)a.splice(n,1),n<=u&&u--})),this},has:function(e){return e?Vt.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return o=s=[],n||t||(a=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},Vt.extend({Deferred:function(t){var n=[["notify","progress",Vt.Callbacks("memory"),Vt.Callbacks("memory"),2],["resolve","done",Vt.Callbacks("once memory"),Vt.Callbacks("once memory"),0,"resolved"],["reject","fail",Vt.Callbacks("once memory"),Vt.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return Vt.Deferred((function(t){Vt.each(n,(function(n,r){var i=_t(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&_t(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,c=arguments,f=function(){var e,f;if(!(t<a)){if((e=r.apply(s,c))===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,_t(f)?i?f.call(e,o(a,n,u,i),o(a,n,l,i)):(a++,f.call(e,o(a,n,u,i),o(a,n,l,i),o(a,n,u,n.notifyWith))):(r!==u&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},p=i?f:function(){try{f()}catch(e){Vt.Deferred.exceptionHook&&Vt.Deferred.exceptionHook(e,p.stackTrace),t+1>=a&&(r!==l&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?p():(Vt.Deferred.getStackHook&&(p.stackTrace=Vt.Deferred.getStackHook()),e.setTimeout(p))}}var a=0;return Vt.Deferred((function(e){n[0][3].add(o(0,e,_t(i)?i:u,e.notifyWith)),n[1][3].add(o(0,e,_t(t)?t:u)),n[2][3].add(o(0,e,_t(r)?r:l))})).promise()},promise:function(e){return null!=e?Vt.extend(e,i):i}},o={};return Vt.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=Ht.call(arguments),o=Vt.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?Ht.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(c(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||_t(i[n]&&i[n].then)))return o.then();for(;n--;)c(i[n],a(n),o.reject);return o.promise()}}),ue=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,Vt.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&ue.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},Vt.readyException=function(t){e.setTimeout((function(){throw t}))},le=Vt.Deferred(),Vt.fn.ready=function(e){return le.then(e).catch((function(e){Vt.readyException(e)})),this},Vt.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Vt.readyWait:Vt.isReady)||(Vt.isReady=!0,!0!==e&&--Vt.readyWait>0||le.resolveWith(qt,[Vt]))}}),Vt.ready.then=le.then,"complete"===qt.readyState||"loading"!==qt.readyState&&!qt.documentElement.doScroll?e.setTimeout(Vt.ready):(qt.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f)),ce=function(e,t,n,i,o,a,s){var u=0,l=e.length,c=null==n;if("object"===r(n))for(u in o=!0,n)ce(e,t,u,n[u],!0,a,s);else if(void 0!==i&&(o=!0,_t(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(Vt(e),n)})),t))for(;u<l;u++)t(e[u],n,s?i:i.call(e[u],u,t(e[u],n)));return o?e:c?t.call(e):l?t(e[0],n):a},fe=/^-ms-/,pe=/-([a-z])/g,de=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},h.uid=1,h.prototype={cache:function(e){var t=e[this.expando];return t||(t={},de(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[d(t)]=n;else for(r in t)i[d(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][d(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(d):(t=d(t))in r?[t]:t.match(se)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||Vt.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Vt.isEmptyObject(t)}},he=new h,ge=new h,ye=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,me=/[A-Z]/g,Vt.extend({hasData:function(e){return ge.hasData(e)||he.hasData(e)},data:function(e,t,n){return ge.access(e,t,n)},removeData:function(e,t){ge.remove(e,t)},_data:function(e,t,n){return he.access(e,t,n)},_removeData:function(e,t){he.remove(e,t)}}),Vt.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=ge.get(o),1===o.nodeType&&!he.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=d(r.slice(5)),g(o,r,i[r]));he.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){ge.set(this,e)})):ce(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=ge.get(o,e))||void 0!==(n=g(o,e))?n:void 0;this.each((function(){ge.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){ge.remove(this,e)}))}}),Vt.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=he.get(e,t),n&&(!r||Array.isArray(n)?r=he.access(e,t,Vt.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Vt.queue(e,t),r=n.length,i=n.shift(),o=Vt._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){Vt.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return he.get(e,n)||he.access(e,n,{empty:Vt.Callbacks("once memory").add((function(){he.remove(e,[t+"queue",n])}))})}}),Vt.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Vt.queue(this[0],e):void 0===t?this:this.each((function(){var n=Vt.queue(this,e,t);Vt._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Vt.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){Vt.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=Vt.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=he.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),ve=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,xe=new RegExp("^(?:([+-])=|)("+ve+")([a-z%]*)$","i"),be=["Top","Right","Bottom","Left"],we=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&Vt.contains(e.ownerDocument,e)&&"none"===Vt.css(e,"display")},Te=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i},Ce={},Vt.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){we(this)?Vt(this).show():Vt(this).hide()}))}}),Ee=/^(?:checkbox|radio)$/i,ke=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Se=/^$|^module$|\/(?:java|ecma)script/i,(De={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]}).optgroup=De.option,De.tbody=De.tfoot=De.colgroup=De.caption=De.thead,De.th=De.td,Ne=/<|&#?\w+;/,Dt=qt.createDocumentFragment().appendChild(qt.createElement("div")),(Nt=qt.createElement("input")).setAttribute("type","radio"),Nt.setAttribute("checked","checked"),Nt.setAttribute("name","t"),Dt.appendChild(Nt),Ft.checkClone=Dt.cloneNode(!0).cloneNode(!0).lastChild.checked,Dt.innerHTML="<textarea>x</textarea>",Ft.noCloneChecked=!!Dt.cloneNode(!0).lastChild.defaultValue,Ae=qt.documentElement,je=/^key/,qe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Le=/^([^.]*)(?:\.(.+)|)/,Vt.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=he.get(e);if(y)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&Vt.find.matchesSelector(Ae,i),n.guid||(n.guid=Vt.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return void 0!==Vt&&Vt.event.triggered!==t.type?Vt.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(se)||[""]).length;l--;)d=g=(s=Le.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=Vt.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=Vt.event.special[d]||{},c=Vt.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Vt.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),Vt.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=he.hasData(e)&&he.get(e);if(y&&(u=y.events)){for(l=(t=(t||"").match(se)||[""]).length;l--;)if(d=g=(s=Le.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=Vt.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||Vt.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)Vt.event.remove(e,d+t[l],n,r,!0);Vt.isEmptyObject(u)&&he.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Vt.event.fix(e),u=new Array(arguments.length),l=(he.get(this,"events")||{})[s.type]||[],c=Vt.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=Vt.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((Vt.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?Vt(i,this).index(l)>-1:Vt.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(Vt.Event.prototype,e,{enumerable:!0,configurable:!0,get:_t(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[Vt.expando]?e:new Vt.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==E()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===E()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&o(this,"input"))return this.click(),!1},_default:function(e){return o(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},Vt.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},Vt.Event=function(e,t){if(!(this instanceof Vt.Event))return new Vt.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?T:C,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&Vt.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[Vt.expando]=!0},Vt.Event.prototype={constructor:Vt.Event,isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=T,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=T,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=T,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},Vt.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&qe.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},Vt.event.addProp),Vt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){Vt.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||Vt.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),Vt.fn.extend({on:function(e,t,n,r){return k(this,e,t,n,r)},one:function(e,t,n,r){return k(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Vt(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=C),this.each((function(){Vt.event.remove(this,e,n,t)}))}}),He=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Vt.extend({htmlPrefilter:function(e){return e.replace(He,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=Vt.contains(e.ownerDocument,e);if(!(Ft.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Vt.isXMLDoc(e)))for(a=x(s),r=0,i=(o=x(e)).length;r<i;r++)j(o[r],a[r]);if(t)if(n)for(o=o||x(e),a=a||x(s),r=0,i=o.length;r<i;r++)A(o[r],a[r]);else A(e,s);return(a=x(s,"script")).length>0&&b(a,!u&&x(e,"script")),s},cleanData:function(e){for(var t,n,r,i=Vt.event.special,o=0;void 0!==(n=e[o]);o++)if(de(n)){if(t=n[he.expando]){if(t.events)for(r in t.events)i[r]?Vt.event.remove(n,r):Vt.removeEvent(n,r,t.handle);n[he.expando]=void 0}n[ge.expando]&&(n[ge.expando]=void 0)}}}),Vt.fn.extend({detach:function(e){return L(this,e,!0)},remove:function(e){return L(this,e)},text:function(e){return ce(this,(function(e){return void 0===e?Vt.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return q(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||S(this,e).appendChild(e)}))},prepend:function(){return q(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return q(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return q(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Vt.cleanData(x(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return Vt.clone(this,e,t)}))},html:function(e){return ce(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!De[(ke.exec(e)||["",""])[1].toLowerCase()]){e=Vt.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(Vt.cleanData(x(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return q(this,arguments,(function(t){var n=this.parentNode;Vt.inArray(this,e)<0&&(Vt.cleanData(x(this)),n&&n.replaceChild(t,this))}),e)}}),Vt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){Vt.fn[e]=function(e){for(var n,r=[],i=Vt(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),Vt(i[a])[t](n),Pt.apply(r,n.get());return this.pushStack(r)}})),Re=new RegExp("^("+ve+")(?!px)[a-z%]+$","i"),Ie=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},We=new RegExp(be.join("|"),"i"),function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ae.appendChild(u).appendChild(l);var t=e.getComputedStyle(l);r="1%"!==t.top,s=12===n(t.marginLeft),l.style.right="60%",a=36===n(t.right),i=36===n(t.width),l.style.position="absolute",o=36===l.offsetWidth||"absolute",Ae.removeChild(u),l=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u=qt.createElement("div"),l=qt.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",Ft.clearCloneStyle="content-box"===l.style.backgroundClip,Vt.extend(Ft,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),s},scrollboxSize:function(){return t(),o}}))}(),$e=/^(none|table(?!-c[ea]).+)/,Be=/^--/,Fe={position:"absolute",visibility:"hidden",display:"block"},_e={letterSpacing:"0",fontWeight:"400"},ze=["Webkit","Moz","ms"],Xe=qt.createElement("div").style,Vt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=H(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=d(t),u=Be.test(t),l=e.style;if(u||(t=P(s)),a=Vt.cssHooks[t]||Vt.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=xe.exec(n))&&i[1]&&(n=y(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(Vt.cssNumber[s]?"":"px")),Ft.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=d(t);return Be.test(t)||(t=P(s)),(a=Vt.cssHooks[t]||Vt.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=H(e,t,r)),"normal"===i&&t in _e&&(i=_e[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),Vt.each(["height","width"],(function(e,t){Vt.cssHooks[t]={get:function(e,n,r){if(n)return!$e.test(Vt.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?I(e,t,r):Te(e,Fe,(function(){return I(e,t,r)}))},set:function(e,n,r){var i,o=Ie(e),a="border-box"===Vt.css(e,"boxSizing",!1,o),s=r&&R(e,t,r,a,o);return a&&Ft.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-R(e,t,"border",!1,o)-.5)),s&&(i=xe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=Vt.css(e,t)),M(0,n,s)}}})),Vt.cssHooks.marginLeft=O(Ft.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(H(e,"marginLeft"))||e.getBoundingClientRect().left-Te(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),Vt.each({margin:"",padding:"",border:"Width"},(function(e,t){Vt.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+be[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(Vt.cssHooks[e+t].set=M)})),Vt.fn.extend({css:function(e,t){return ce(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=Vt.css(e,t[a],!1,r);return o}return void 0!==n?Vt.style(e,t,n):Vt.css(e,t)}),e,t,arguments.length>1)}}),Vt.Tween=W,W.prototype={constructor:W,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||Vt.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Vt.cssNumber[n]?"":"px")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,n=W.propHooks[this.prop];return this.options.duration?this.pos=t=Vt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Vt.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){Vt.fx.step[e.prop]?Vt.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Vt.cssProps[e.prop]]&&!Vt.cssHooks[e.prop]?e.elem[e.prop]=e.now:Vt.style(e.elem,e.prop,e.now+e.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Vt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Vt.fx=W.prototype.init,Vt.fx.step={},Ge=/^(?:toggle|show|hide)$/,Ye=/queueHooks$/,Vt.Animation=Vt.extend(z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return y(n.elem,e,xe.exec(t),n),n}]},tweener:function(e,t){_t(e)?(t=e,e=["*"]):e=e.match(se);for(var n,r=0,i=e.length;r<i;r++)n=e[r],z.tweeners[n]=z.tweeners[n]||[],z.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&we(e),y=he.get(e,"fxshow");for(r in n.queue||(null==(a=Vt._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always((function(){p.always((function(){a.unqueued--,Vt.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],Ge.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||Vt.style(e,r)}if((u=!Vt.isEmptyObject(t))||!Vt.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=he.get(e,"display")),"none"===(c=Vt.css(e,"display"))&&(l?c=l:(v([e],!0),l=e.style.display||l,c=Vt.css(e,"display"),v([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===Vt.css(e,"float")&&(u||(p.done((function(){h.display=l})),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=he.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&v([e],!0),p.done((function(){for(r in g||v([e]),he.remove(e,"fxshow"),d)Vt.style(e,r,d[r])}))),u=_(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?z.prefilters.unshift(e):z.prefilters.push(e)}}),Vt.speed=function(e,t,n){var r=e&&"object"==typeof e?Vt.extend({},e):{complete:n||!n&&t||_t(e)&&e,duration:e,easing:n&&t||t&&!_t(t)&&t};return Vt.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in Vt.fx.speeds?r.duration=Vt.fx.speeds[r.duration]:r.duration=Vt.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){_t(r.old)&&r.old.call(this),r.queue&&Vt.dequeue(this,r.queue)},r},Vt.fn.extend({fadeTo:function(e,t,n,r){return this.filter(we).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Vt.isEmptyObject(e),o=Vt.speed(t,n,r),a=function(){var t=z(this,Vt.extend({},e),o);(i||he.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=Vt.timers,a=he.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&Ye.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||Vt.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=he.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Vt.timers,a=r?r.length:0;for(n.finish=!0,Vt.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),Vt.each(["toggle","show","hide"],(function(e,t){var n=Vt.fn[t];Vt.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(F(t,!0),e,r,i)}})),Vt.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){Vt.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),Vt.timers=[],Vt.fx.tick=function(){var e,t=0,n=Vt.timers;for(Ue=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||Vt.fx.stop(),Ue=void 0},Vt.fx.timer=function(e){Vt.timers.push(e),Vt.fx.start()},Vt.fx.interval=13,Vt.fx.start=function(){Ve||(Ve=!0,$())},Vt.fx.stop=function(){Ve=null},Vt.fx.speeds={slow:600,fast:200,_default:400},Vt.fn.delay=function(t,n){return t=Vt.fx&&Vt.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},function(){var e=qt.createElement("input"),t=qt.createElement("select").appendChild(qt.createElement("option"));e.type="checkbox",Ft.checkOn=""!==e.value,Ft.optSelected=t.selected,(e=qt.createElement("input")).value="t",e.type="radio",Ft.radioValue="t"===e.value}(),Je=Vt.expr.attrHandle,Vt.fn.extend({attr:function(e,t){return ce(this,Vt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){Vt.removeAttr(this,e)}))}}),Vt.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?Vt.prop(e,t,n):(1===o&&Vt.isXMLDoc(e)||(i=Vt.attrHooks[t.toLowerCase()]||(Vt.expr.match.bool.test(t)?Qe:void 0)),void 0!==n?null===n?void Vt.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=Vt.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!Ft.radioValue&&"radio"===t&&o(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(se);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Qe={set:function(e,t,n){return!1===t?Vt.removeAttr(e,n):e.setAttribute(n,n),n}},Vt.each(Vt.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Je[t]||Vt.find.attr;Je[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Je[a],Je[a]=i,i=null!=n(e,t,r)?a:null,Je[a]=o),i}})),Ke=/^(?:input|select|textarea|button)$/i,Ze=/^(?:a|area)$/i,Vt.fn.extend({prop:function(e,t){return ce(this,Vt.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[Vt.propFix[e]||e]}))}}),Vt.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Vt.isXMLDoc(e)||(t=Vt.propFix[t]||t,i=Vt.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Vt.find.attr(e,"tabindex");return t?parseInt(t,10):Ke.test(e.nodeName)||Ze.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),Ft.optSelected||(Vt.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Vt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){Vt.propFix[this.toLowerCase()]=this})),Vt.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(_t(e))return this.each((function(t){Vt(this).addClass(e.call(this,t,U(this)))}));if((t=V(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=X(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(_t(e))return this.each((function(t){Vt(this).removeClass(e.call(this,t,U(this)))}));if(!arguments.length)return this.attr("class","");if((t=V(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=X(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):_t(e)?this.each((function(n){Vt(this).toggleClass(e.call(this,n,U(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=Vt(this),a=V(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=U(this))&&he.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":he.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+X(U(n))+" ").indexOf(t)>-1)return!0;return!1}}),et=/\r/g,Vt.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=_t(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,Vt(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=Vt.map(i,(function(e){return null==e?"":e+""}))),(t=Vt.valHooks[this.type]||Vt.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=Vt.valHooks[i.type]||Vt.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(et,""):null==n?"":n:void 0}}),Vt.extend({valHooks:{option:{get:function(e){var t=Vt.find.attr(e,"value");return null!=t?t:X(Vt.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,u=s?null:[],l=s?a+1:i.length;for(r=a<0?l:s?a:0;r<l;r++)if(((n=i[r]).selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!o(n.parentNode,"optgroup"))){if(t=Vt(n).val(),s)return t;u.push(t)}return u},set:function(e,t){for(var n,r,i=e.options,o=Vt.makeArray(t),a=i.length;a--;)((r=i[a]).selected=Vt.inArray(Vt.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Vt.each(["radio","checkbox"],(function(){Vt.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=Vt.inArray(Vt(e).val(),t)>-1}},Ft.checkOn||(Vt.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),Ft.focusin="onfocusin"in e,tt=/^(?:focusinfocus|focusoutblur)$/,nt=function(e){e.stopPropagation()},Vt.extend(Vt.event,{trigger:function(t,n,r,i){var o,a,s,u,l,c,f,p,d=[r||qt],h=Wt.call(t,"type")?t.type:t,g=Wt.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=r=r||qt,3!==r.nodeType&&8!==r.nodeType&&!tt.test(h+Vt.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),l=h.indexOf(":")<0&&"on"+h,(t=t[Vt.expando]?t:new Vt.Event(h,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Vt.makeArray(n,[t]),f=Vt.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!zt(r)){for(u=f.delegateType||h,tt.test(u+h)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||qt)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?u:f.bindType||h,(c=(he.get(a,"events")||{})[t.type]&&he.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&de(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),n)||!de(r)||l&&_t(r[h])&&!zt(r)&&((s=r[l])&&(r[l]=null),Vt.event.triggered=h,t.isPropagationStopped()&&p.addEventListener(h,nt),r[h](),t.isPropagationStopped()&&p.removeEventListener(h,nt),Vt.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=Vt.extend(new Vt.Event,n,{type:e,isSimulated:!0});Vt.event.trigger(r,null,t)}}),Vt.fn.extend({trigger:function(e,t){return this.each((function(){Vt.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return Vt.event.trigger(e,t,n,!0)}}),Ft.focusin||Vt.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){Vt.event.simulate(t,e.target,Vt.event.fix(e))};Vt.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=he.access(r,t);i||r.addEventListener(e,n,!0),he.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=he.access(r,t)-1;i?he.access(r,t,i):(r.removeEventListener(e,n,!0),he.remove(r,t))}}})),rt=e.location,it=Date.now(),ot=/\?/,Vt.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||Vt.error("Invalid XML: "+t),n},at=/\[\]$/,st=/\r?\n/g,ut=/^(?:submit|button|image|reset|file)$/i,lt=/^(?:input|select|textarea|keygen)/i,Vt.param=function(e,t){var n,r=[],i=function(e,t){var n=_t(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!Vt.isPlainObject(e))Vt.each(e,(function(){i(this.name,this.value)}));else for(n in e)G(n,e[n],t,i);return r.join("&")},Vt.fn.extend({serialize:function(){return Vt.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=Vt.prop(this,"elements");return e?Vt.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!Vt(this).is(":disabled")&<.test(this.nodeName)&&!ut.test(e)&&(this.checked||!Ee.test(e))})).map((function(e,t){var n=Vt(this).val();return null==n?null:Array.isArray(n)?Vt.map(n,(function(e){return{name:t.name,value:e.replace(st,"\r\n")}})):{name:t.name,value:n.replace(st,"\r\n")}})).get()}}),ct=/%20/g,ft=/#.*$/,pt=/([?&])_=[^&]*/,dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gt=/^(?:GET|HEAD)$/,yt=/^\/\//,mt={},vt={},xt="*/".concat("*"),(bt=qt.createElement("a")).href=rt.href,Vt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:rt.href,type:"GET",isLocal:ht.test(rt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Vt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,Vt.ajaxSettings),t):J(Vt.ajaxSettings,e)},ajaxPrefilter:Y(mt),ajaxTransport:Y(vt),ajax:function(t,n){function r(t,n,r,s){var l,p,d,b,w,T=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",C.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,C,r)),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,b,C,l),l?(h.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(Vt.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(Vt.etag[o]=w)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,l=!(d=b.error))):(d=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(n||T)+"",l?m.resolveWith(g,[p,T,C]):m.rejectWith(g,[C,T,d]),C.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[C,h,l?p:d]),v.fireWith(g,[C,T]),f&&(y.trigger("ajaxComplete",[C,h]),--Vt.active||Vt.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=Vt.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?Vt(g):Vt.event,m=Vt.Deferred(),v=Vt.Callbacks("once memory"),x=h.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=dt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(m.promise(C),h.url=((t||h.url||rt.href)+"").replace(yt,rt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(se)||[""],null==h.crossDomain){l=qt.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=bt.protocol+"//"+bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Vt.param(h.data,h.traditional)),Q(mt,h,n,C),c)return C;for(p in(f=Vt.event&&h.global)&&0==Vt.active++&&Vt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!gt.test(h.type),o=h.url.replace(ft,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(ct,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(ot.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(pt,"$1"),d=(ot.test(o)?"&":"?")+"_="+it+++d),h.url=o+d),h.ifModified&&(Vt.lastModified[o]&&C.setRequestHeader("If-Modified-Since",Vt.lastModified[o]),Vt.etag[o]&&C.setRequestHeader("If-None-Match",Vt.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+xt+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,C,h)||c))return C.abort();if(T="abort",v.add(h.complete),C.done(h.success),C.fail(h.error),i=Q(vt,h,n,C)){if(C.readyState=1,f&&y.trigger("ajaxSend",[C,h]),c)return C;h.async&&h.timeout>0&&(u=e.setTimeout((function(){C.abort("timeout")}),h.timeout));try{c=!1,i.send(b,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return Vt.get(e,t,n,"json")},getScript:function(e,t){return Vt.get(e,void 0,t,"script")}}),Vt.each(["get","post"],(function(e,t){Vt[t]=function(e,n,r,i){return _t(n)&&(i=i||r,r=n,n=void 0),Vt.ajax(Vt.extend({url:e,type:t,dataType:i,data:n,success:r},Vt.isPlainObject(e)&&e))}})),Vt._evalUrl=function(e){return Vt.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},Vt.fn.extend({wrapAll:function(e){var t;return this[0]&&(_t(e)&&(e=e.call(this[0])),t=Vt(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return _t(e)?this.each((function(t){Vt(this).wrapInner(e.call(this,t))})):this.each((function(){var t=Vt(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=_t(e);return this.each((function(n){Vt(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){Vt(this).replaceWith(this.childNodes)})),this}}),Vt.expr.pseudos.hidden=function(e){return!Vt.expr.pseudos.visible(e)},Vt.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Vt.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}},wt={0:200,1223:204},Tt=Vt.ajaxSettings.xhr(),Ft.cors=!!Tt&&"withCredentials"in Tt,Ft.ajax=Tt=!!Tt,Vt.ajaxTransport((function(t){var n,r;if(Ft.cors||Tt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),Vt.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),Vt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Vt.globalEval(e),e}}}),Vt.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),Vt.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=Vt("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),qt.head.appendChild(t[0])},abort:function(){n&&n()}}})),Ct=[],Et=/(=)\?(?=&|$)|\?\?/,Vt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ct.pop()||Vt.expando+"_"+it++;return this[e]=!0,e}}),Vt.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Et.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Et.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=_t(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Et,"$1"+i):!1!==t.jsonp&&(t.url+=(ot.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||Vt.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){void 0===o?Vt(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Ct.push(i)),a&&_t(o)&&o(a[0]),a=o=void 0})),"script"})),Ft.createHTMLDocument=((At=qt.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===At.childNodes.length),Vt.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(Ft.createHTMLDocument?((r=(t=qt.implementation.createHTMLDocument("")).createElement("base")).href=qt.location.href,t.head.appendChild(r)):t=qt),o=!n&&[],(i=ne.exec(e))?[t.createElement(i[1])]:(i=w([e],t,o),o&&o.length&&Vt(o).remove(),Vt.merge([],i.childNodes)));var r,i,o},Vt.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=X(e.slice(s)),e=e.slice(0,s)),_t(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&Vt.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?Vt("<div>").append(Vt.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},Vt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){Vt.fn[t]=function(e){return this.on(t,e)}})),Vt.expr.pseudos.animated=function(e){return Vt.grep(Vt.timers,(function(t){return e===t.elem})).length},Vt.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=Vt.css(e,"position"),c=Vt(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=Vt.css(e,"top"),u=Vt.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),_t(t)&&(t=t.call(e,n,Vt.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},Vt.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){Vt.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===Vt.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===Vt.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=Vt(e).offset()).top+=Vt.css(e,"borderTopWidth",!0),i.left+=Vt.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-Vt.css(r,"marginTop",!0),left:t.left-i.left-Vt.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===Vt.css(e,"position");)e=e.offsetParent;return e||Ae}))}}),Vt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;Vt.fn[e]=function(r){return ce(this,(function(e,r,i){var o;if(zt(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),Vt.each(["top","left"],(function(e,t){Vt.cssHooks[t]=O(Ft.pixelPosition,(function(e,n){if(n)return n=H(e,t),Re.test(n)?Vt(e).position()[t]+"px":n}))})),Vt.each({Height:"height",Width:"width"},(function(e,t){Vt.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){Vt.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return ce(this,(function(t,n,i){var o;return zt(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?Vt.css(t,n,s):Vt.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),Vt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){Vt.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),Vt.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Vt.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),Vt.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),_t(e))return r=Ht.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(Ht.call(arguments)))}).guid=e.guid=e.guid||Vt.guid++,i},Vt.holdReady=function(e){e?Vt.readyWait++:Vt.ready(!0)},Vt.isArray=Array.isArray,Vt.parseJSON=JSON.parse,Vt.nodeName=o,Vt.isFunction=_t,Vt.isWindow=zt,Vt.camelCase=d,Vt.type=r,Vt.now=Date.now,Vt.isNumeric=function(e){var t=Vt.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return Vt})),kt=e.jQuery,St=e.$,Vt.noConflict=function(t){return e.$===Vt&&(e.$=St),t&&e.jQuery===Vt&&(e.jQuery=kt),Vt},t||(e.jQuery=e.$=Vt),Vt})); })(this);
// 3rdParty/jquery-ui.js
-(function (window, undefined) { !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(P){P.ui=P.ui||{};P.ui.version="1.12.1";var o,i=0,a=Array.prototype.slice;P.cleanData=(o=P.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)try{(e=P._data(i,"events"))&&e.remove&&P(i).triggerHandler("remove")}catch(t){}o(t)}),P.widget=function(t,i,e){var s,o,n,r={},a=t.split(".")[0],h=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=P.Widget),P.isArray(e)&&(e=P.extend.apply(null,[{}].concat(e))),P.expr[":"][h.toLowerCase()]=function(t){return!!P.data(t,h)},P[a]=P[a]||{},s=P[a][t],o=P[a][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},P.extend(o,s,{version:e.version,_proto:P.extend({},e),_childConstructors:[]}),(n=new i).options=P.widget.extend({},n.options),P.each(e,function(e,s){function o(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}P.isFunction(s)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=n,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=s}),o.prototype=P.widget.extend(n,{widgetEventPrefix:s&&n.widgetEventPrefix||t},r,{constructor:o,namespace:a,widgetName:t,widgetFullName:h}),s?(P.each(s._childConstructors,function(t,e){var i=e.prototype;P.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),P.widget.bridge(t,o),o},P.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),o=0,n=s.length;o<n;o++)for(e in s[o])i=s[o][e],s[o].hasOwnProperty(e)&&void 0!==i&&(P.isPlainObject(i)?t[e]=P.isPlainObject(t[e])?P.widget.extend({},t[e],i):P.widget.extend({},i):t[e]=i);return t},P.widget.bridge=function(n,e){var r=e.prototype.widgetFullName||n;P.fn[n]=function(i){var t="string"==typeof i,s=a.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=P.data(this,r);return"instance"===i?(o=e,!1):e?P.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:P.error("no such method '"+i+"' for "+n+" widget instance"):P.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(s.length&&(i=P.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=P.data(this,r);t?(t.option(i||{}),t._init&&t._init()):P.data(this,r,new e(i,this))})),o}},P.Widget=function(){},P.Widget._childConstructors=[],P.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=P(e||this.defaultElement||this)[0],this.element=P(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=P(),this.hoverable=P(),this.focusable=P(),this.classesElementLookup={},e!==this&&(P.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=P(e.style?e.ownerDocument:e.document||e),this.window=P(this.document[0].defaultView||this.document[0].parentWindow)),this.options=P.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:P.noop,_create:P.noop,_init:P.noop,destroy:function(){var i=this;this._destroy(),P.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:P.noop,widget:function(){return this.element},option:function(t,e){var i,s,o,n=t;if(0===arguments.length)return P.widget.extend({},this.options);if("string"==typeof t)if(n={},t=(i=t.split(".")).shift(),i.length){for(s=n[t]=P.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];n[t]=e}return this._setOptions(n),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=P(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var n=[],r=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=r.classesElementLookup[t[s]]||P(),i=o.add?P(P.unique(i.get().concat(o.element.get()))):P(i.not(o.element).get()),r.classesElementLookup[t[s]]=i,n.push(t[s]),e&&o.classes[t[s]]&&n.push(o.classes[t[s]])}return o=P.extend({element:this.element,classes:this.options.classes||{}},o),this._on(o.element,{remove:"_untrackClassesElement"}),o.keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(i){var s=this;P.each(s.classesElementLookup,function(t,e){-1!==P.inArray(i.target,e)&&(s.classesElementLookup[t]=P(e.not(i.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof t||null===t,n={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:s};return n.element.toggleClass(this._classes(n),s),this},_on:function(r,a,t){var h,l=this;"boolean"!=typeof r&&(t=a,a=r,r=!1),t?(a=h=P(a),this.bindings=this.bindings.add(a)):(t=a,a=this.element,h=this.widget()),P.each(t,function(t,e){function i(){if(r||!0!==l.options.disabled&&!P(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||P.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),o=s[1]+l.eventNamespace,n=s[2];n?h.on(o,n,i):a.on(o,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=P(this.bindings.not(t).get()),this.focusable=P(this.focusable.not(t).get()),this.hoverable=P(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(P(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(P(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,o,n=this.options[t];if(i=i||{},(e=P.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(s in o)s in e||(e[s]=o[s]);return this.element.trigger(e,i),!(P.isFunction(n)&&!1===n.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},P.each({show:"fadeIn",hide:"fadeOut"},function(n,r){P.Widget.prototype["_"+n]=function(e,t,i){var s;"string"==typeof t&&(t={effect:t});var o=t?!0!==t&&"number"!=typeof t&&t.effect||r:n;"number"==typeof(t=t||{})&&(t={duration:t}),s=!P.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&P.effects&&P.effects.effect[o]?e[n](t):o!==n&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){P(this)[n](),i&&i.call(e[0]),t()})}});var n,x,C,s,r,h,l,c,z;P.widget;function H(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function I(t,e){return parseInt(P.css(t,e),10)||0}x=Math.max,C=Math.abs,s=/left|center|right/,r=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,c=/%$/,z=P.fn.position,P.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=P("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];return P("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?P.position.scrollbarWidth():0,height:s?P.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=P(t||window),i=P.isWindow(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?P(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},P.fn.position=function(p){if(!p||!p.of)return z.apply(this,arguments);p=P.extend({},p);var f,u,d,g,m,t,e,v=P(p.of),_=P.position.getWithinInfo(p.within),b=P.position.getScrollInfo(_),w=(p.collision||"flip").split(" "),y={},i=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:P.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()};return v[0].preventDefault&&(p.at="left top"),u=i.width,d=i.height,g=i.offset,m=P.extend({},g),P.each(["my","at"],function(){var t,e,i=(p[this]||"").split(" ");1===i.length&&(i=s.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]),i[0]=s.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),y[this]=[t?t[0]:0,e?e[0]:0],p[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===p.at[0]?m.left+=u:"center"===p.at[0]&&(m.left+=u/2),"bottom"===p.at[1]?m.top+=d:"center"===p.at[1]&&(m.top+=d/2),f=H(y.at,u,d),m.left+=f[0],m.top+=f[1],this.each(function(){var i,t,r=P(this),a=r.outerWidth(),h=r.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),o=a+e+I(this,"marginRight")+b.width,n=h+s+I(this,"marginBottom")+b.height,l=P.extend({},m),c=H(y.my,r.outerWidth(),r.outerHeight());"right"===p.my[0]?l.left-=a:"center"===p.my[0]&&(l.left-=a/2),"bottom"===p.my[1]?l.top-=h:"center"===p.my[1]&&(l.top-=h/2),l.left+=c[0],l.top+=c[1],i={marginLeft:e,marginTop:s},P.each(["left","top"],function(t,e){P.ui.position[w[t]]&&P.ui.position[w[t]][e](l,{targetWidth:u,targetHeight:d,elemWidth:a,elemHeight:h,collisionPosition:i,collisionWidth:o,collisionHeight:n,offset:[f[0]+c[0],f[1]+c[1]],my:p.my,at:p.at,within:_,elem:r})}),p.using&&(t=function(t){var e=g.left-l.left,i=e+u-a,s=g.top-l.top,o=s+d-h,n={target:{element:v,left:g.left,top:g.top,width:u,height:d},element:{element:r,left:l.left,top:l.top,width:a,height:h},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<s?"bottom":"middle"};u<a&&C(e+i)<u&&(n.horizontal="center"),d<h&&C(s+o)<d&&(n.vertical="middle"),x(C(e),C(i))>x(C(s),C(o))?n.important="horizontal":n.important="vertical",p.using.call(this,t,n)}),r.offset(P.extend(l,{using:t}))})},P.ui.position={fit:{left:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollLeft:s.offset.left,n=s.width,r=t.left-e.collisionPosition.marginLeft,a=o-r,h=r+e.collisionWidth-n-o;e.collisionWidth>n?0<a&&h<=0?(i=t.left+a+e.collisionWidth-n-o,t.left+=a-i):t.left=!(0<h&&a<=0)&&h<a?o+n-e.collisionWidth:o:0<a?t.left+=a:0<h?t.left-=h:t.left=x(t.left-r,t.left)},top:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollTop:s.offset.top,n=e.within.height,r=t.top-e.collisionPosition.marginTop,a=o-r,h=r+e.collisionHeight-n-o;e.collisionHeight>n?0<a&&h<=0?(i=t.top+a+e.collisionHeight-n-o,t.top+=a-i):t.top=!(0<h&&a<=0)&&h<a?o+n-e.collisionHeight:o:0<a?t.top+=a:0<h?t.top-=h:t.top=x(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,n=o.offset.left+o.scrollLeft,r=o.width,a=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,l=h-a,c=h+e.collisionWidth-r-a,p="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,u=-2*e.offset[0];l<0?((i=t.left+p+f+u+e.collisionWidth-r-n)<0||i<C(l))&&(t.left+=p+f+u):0<c&&(0<(s=t.left-e.collisionPosition.marginLeft+p+f+u-a)||C(s)<c)&&(t.left+=p+f+u)},top:function(t,e){var i,s,o=e.within,n=o.offset.top+o.scrollTop,r=o.height,a=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,l=h-a,c=h+e.collisionHeight-r-a,p="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,u=-2*e.offset[1];l<0?((s=t.top+p+f+u+e.collisionHeight-r-n)<0||s<C(l))&&(t.top+=p+f+u):0<c&&(0<(i=t.top-e.collisionPosition.marginTop+p+f+u-a)||C(i)<c)&&(t.top+=p+f+u)}},flipfit:{left:function(){P.ui.position.flip.left.apply(this,arguments),P.ui.position.fit.left.apply(this,arguments)},top:function(){P.ui.position.flip.top.apply(this,arguments),P.ui.position.fit.top.apply(this,arguments)}}};P.ui.position,P.extend(P.expr[":"],{data:P.expr.createPseudo?P.expr.createPseudo(function(e){return function(t){return!!P.data(t,e)}}):function(t,e,i){return!!P.data(t,i[3])}}),P.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),P.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):P(this[0].form)},P.ui.formResetMixin={_formResetHandler:function(){var e=P(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");P.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element.form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(P.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},P.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},P.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=P(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&o.length?o:P(this[0].ownerDocument||document)},P.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var t,p=!1;P(document).on("mouseup",function(){p=!1});P.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===P.data(t.target,e.widgetName+".preventClickEvent"))return P.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!p){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&P(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===P.data(t.target,this.widgetName+".preventClickEvent")&&P.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),p=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(P.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&P.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,p=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),P.ui.plugin={add:function(t,e,i){var s,o=P.ui[t].prototype;for(s in i)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var o,n=t.plugins[e];if(n&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<n.length;o++)t.options[n[o][0]]&&n[o][1].apply(t.element,i)}},P.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return(i=i||e.body).nodeName||(i=e.body),i},P.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&P(t).trigger("blur")};P.widget("ui.draggable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<P(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=P(this);return P("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=P.ui.safeActiveElement(this.document[0]);P(t.target).closest(e).length||P.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),P.ui.ddmanager&&(P.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===P(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),P.ui.ddmanager&&!e.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),P.ui.ddmanager&&P.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new P.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return P.ui.ddmanager&&!this.options.dropBehaviour&&(i=P.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||P.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?P(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),P.ui.ddmanager&&P.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),P.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new P.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!P(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper),s=i?P(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,o=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=P(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,P(o).width()-this.helperProportions.width-this.margins.left,(P(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[P(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,P(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,P(window).scrollLeft()+P(window).width()-this.helperProportions.width-this.margins.left,P(window).scrollTop()+(P(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,o,n,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(s=this.relativeContainer.offset(),[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=!i||o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1],n=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=!i||n-this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),P.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),P.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),P.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=P.extend({},t,{item:i.element});i.sortables=[],P(i.options.connectToSortable).each(function(){var t=P(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=P.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,P.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,o){P.each(o.sortables,function(){var t=!1,e=this;e.positionAbs=o.positionAbs,e.helperProportions=o.helperProportions,e.offset.click=o.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,P.each(o.sortables,function(){return this.positionAbs=o.positionAbs,this.helperProportions=o.helperProportions,this.offset.click=o.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&P.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,o._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=o.offset.click.top,e.offset.click.left=o.offset.click.left,e.offset.parent.left-=o.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=o.offset.parent.top-e.offset.parent.top,o._trigger("toSortable",i),o.dropped=e.element,P.each(o.sortables,function(){this.refreshPositions()}),o.currentItem=o.element,e.fromOutside=o),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(o._parent),o._refreshOffsets(i),s.position=o._generatePosition(i,!0),o._trigger("fromSortable",i),o.dropped=!1,P.each(o.sortables,function(){this.refreshPositions()}))})}}),P.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=P("body"),o=i.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(t,e,i){var s=i.options;s._cursor&&P("body").css("cursor",s._cursor)}}),P.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(t,e,i){var s=i.options;s._opacity&&P(e.helper).css("opacity",s._opacity)}}),P.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,o=!1,n=i.scrollParentNotHidden[0],r=i.document[0];n!==r&&"HTML"!==n.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+n.offsetHeight-t.pageY<s.scrollSensitivity?n.scrollTop=o=n.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(n.scrollTop=o=n.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+n.offsetWidth-t.pageX<s.scrollSensitivity?n.scrollLeft=o=n.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(n.scrollLeft=o=n.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-P(r).scrollTop()<s.scrollSensitivity?o=P(r).scrollTop(P(r).scrollTop()-s.scrollSpeed):P(window).height()-(t.pageY-P(r).scrollTop())<s.scrollSensitivity&&(o=P(r).scrollTop(P(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-P(r).scrollLeft()<s.scrollSensitivity?o=P(r).scrollLeft(P(r).scrollLeft()-s.scrollSpeed):P(window).width()-(t.pageX-P(r).scrollLeft())<s.scrollSensitivity&&(o=P(r).scrollLeft(P(r).scrollLeft()+s.scrollSpeed)))),!1!==o&&P.ui.ddmanager&&!s.dropBehaviour&&P.ui.ddmanager.prepareOffsets(i,t)}}),P.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],P(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=P(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,o,n,r,a,h,l,c,p,f=i.options,u=f.snapTolerance,d=e.offset.left,g=d+i.helperProportions.width,m=e.offset.top,v=m+i.helperProportions.height,_=i.snapElements.length-1;0<=_;_--)h=(a=i.snapElements[_].left-i.margins.left)+i.snapElements[_].width,c=(l=i.snapElements[_].top-i.margins.top)+i.snapElements[_].height,g<a-u||h+u<d||v<l-u||c+u<m||!P.contains(i.snapElements[_].item.ownerDocument,i.snapElements[_].item)?(i.snapElements[_].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(l-v)<=u,o=Math.abs(c-m)<=u,n=Math.abs(a-g)<=u,r=Math.abs(h-d)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l-i.helperProportions.height,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h}).left)),p=s||o||n||r,"outer"!==f.snapMode&&(s=Math.abs(l-m)<=u,o=Math.abs(c-v)<=u,n=Math.abs(a-d)<=u,r=Math.abs(h-g)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h-i.helperProportions.width}).left)),!i.snapElements[_].snapping&&(s||o||n||r||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=s||o||n||r||p)}}),P.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,o=i.options,n=P.makeArray(P(o.stack)).sort(function(t,e){return(parseInt(P(t).css("zIndex"),10)||0)-(parseInt(P(e).css("zIndex"),10)||0)});n.length&&(s=parseInt(P(n[0]).css("zIndex"),10)||0,P(n).each(function(t){P(this).css("zIndex",s+t)}),this.css("zIndex",s+n.length))}}),P.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(t,e,i){var s=i.options;s._zIndex&&P(e.helper).css("zIndex",s._zIndex)}});P.ui.draggable;P.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=P.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){P.ui.ddmanager.droppables[t]=P.ui.ddmanager.droppables[t]||[],P.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=P.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept=P.isFunction(e)?e:function(t){return t.is(e)}:"scope"===t&&(i=P.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=P.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=P.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||P.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=P(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&f(i,P.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var f=P.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,n=(t.positionAbs||t.position.absolute).top+t.margins.top,r=o+t.helperProportions.width,a=n+t.helperProportions.height,h=e.offset.left,l=e.offset.top,c=h+e.proportions().width,p=l+e.proportions().height;switch(i){case"fit":return h<=o&&r<=c&&l<=n&&a<=p;case"intersect":return h<o+t.helperProportions.width/2&&r-t.helperProportions.width/2<c&&l<n+t.helperProportions.height/2&&a-t.helperProportions.height/2<p;case"pointer":return u(s.pageY,l,e.proportions().height)&&u(s.pageX,h,e.proportions().width);case"touch":return(l<=n&&n<=p||l<=a&&a<=p||n<l&&p<a)&&(h<=o&&o<=c||h<=r&&r<=c||o<h&&c<r);default:return!1}};function u(t,e,i){return e<=t&&t<e+i}!(P.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,o=P.ui.ddmanager.droppables[t.options.scope]||[],n=e?e.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||t&&!o[i].accept.call(o[i].element[0],t.currentItem||t.element))){for(s=0;s<r.length;s++)if(r[s]===o[i].element[0]){o[i].proportions().height=0;continue t}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===n&&o[i]._activate.call(o[i],e),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return P.each((P.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&f(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,r){n.options.refreshPositions&&P.ui.ddmanager.prepareOffsets(n,r),P.each(P.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s,o;this.options.disabled||this.greedyChild||!this.visible||(o=!(s=f(n,this,this.options.tolerance,r))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return P(this).droppable("instance").options.scope===e})).length&&((t=P(i[0]).droppable("instance")).greedyChild="isover"===o)),t&&"isover"===o&&(t.isover=!1,t.isout=!0,t._out.call(t,r)),this[o]=!0,this["isout"===o?"isover":"isout"]=!1,this["isover"===o?"_over":"_out"].call(this,r),t&&"isout"===o&&(t.isout=!1,t.isover=!0,t._over.call(t,r)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)}})!==P.uiBackCompat&&P.widget("ui.droppable",P.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});P.ui.droppable;P.widget("ui.resizable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===P(t).css("overflow"))return!1;var i,s=e&&"left"===e?"scrollLeft":"scrollTop";return 0<t[s]||(t[s]=1,i=0<t[s],t[s]=0,i)},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),P.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(P("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&P(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();function t(t){P(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,i,s,o,n=this.options,r=this;if(this.handles=n.handles||(P(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=P(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=P.trim(i[e])),o=P("<div>"),this._addClass(o,"ui-resizable-handle "+s),o.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(o);this._renderAxis=function(t){var e,i,s,o;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=P(this.handles[e]),this._on(this.handles[e],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=P(this.handles[e],this.element),o=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=P(this.handles[e])[0])!==t.target&&!P.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,o=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(e+=P(o.containment).scrollLeft()||0,i+=P(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=P(".ui-resizable-"+this.axis).css("cursor"),P("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i,s=this.originalMousePosition,o=this.axis,n=t.pageX-s.left||0,r=t.pageY-s.top||0,a=this._change[o];return this._updatePrevProperties(),a&&(e=a.apply(this,[t,n,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),P.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,o,n,r,a,h=this.options,l=this;return this._helper&&(s=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:l.sizeDiff.height,o=i?0:l.sizeDiff.width,n={width:l.helper.width()-o,height:l.helper.height()-s},r=parseFloat(l.element.css("left"))+(l.position.left-l.originalPosition.left)||null,a=parseFloat(l.element.css("top"))+(l.position.top-l.originalPosition.top)||null,h.animate||this.element.css(P.extend(n,{top:a,left:r})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!h.animate&&this._proportionallyResize()),P("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,o,n=this.options,r={minWidth:this._isNumber(n.minWidth)?n.minWidth:0,maxWidth:this._isNumber(n.maxWidth)?n.maxWidth:1/0,minHeight:this._isNumber(n.minHeight)?n.minHeight:0,maxHeight:this._isNumber(n.maxHeight)?n.maxHeight:1/0};(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),s>r.minHeight&&(r.minHeight=s),i<r.maxWidth&&(r.maxWidth=i),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),n&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),o&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||P("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){P.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),P.ui.plugin.add("resizable","animate",{stop:function(e){var i=P(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),n=o&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,a={width:i.size.width-r,height:i.size.height-n},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,l=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(P.extend(a,l&&h?{top:l,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&P(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),P.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,o,n,r,a=P(this).resizable("instance"),h=a.options,l=a.element,c=h.containment,p=c instanceof P?c.get(0):/parent/.test(c)?l.parent().get(0):c;p&&(a.containerElement=P(p),/document/.test(c)||c===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:P(document),left:0,top:0,width:P(document).width(),height:P(document).height()||document.body.parentNode.scrollHeight}):(i=P(p),s=[],P(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=a._num(i.css("padding"+e))}),a.containerOffset=i.offset(),a.containerPosition=i.position(),a.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=a.containerOffset,e=a.containerSize.height,o=a.containerSize.width,n=a._hasScroll(p,"left")?p.scrollWidth:o,r=a._hasScroll(p)?p.scrollHeight:e,a.parentData={element:p,left:t.left,top:t.top,width:n,height:r}))},resize:function(t){var e,i,s,o,n=P(this).resizable("instance"),r=n.options,a=n.containerOffset,h=n.position,l=n._aspectRatio||t.shiftKey,c={top:0,left:0},p=n.containerElement,f=!0;p[0]!==document&&/static/.test(p.css("position"))&&(c=a),h.left<(n._helper?a.left:0)&&(n.size.width=n.size.width+(n._helper?n.position.left-a.left:n.position.left-c.left),l&&(n.size.height=n.size.width/n.aspectRatio,f=!1),n.position.left=r.helper?a.left:0),h.top<(n._helper?a.top:0)&&(n.size.height=n.size.height+(n._helper?n.position.top-a.top:n.position.top),l&&(n.size.width=n.size.height*n.aspectRatio,f=!1),n.position.top=n._helper?a.top:0),s=n.containerElement.get(0)===n.element.parent().get(0),o=/relative|absolute/.test(n.containerElement.css("position")),s&&o?(n.offset.left=n.parentData.left+n.position.left,n.offset.top=n.parentData.top+n.position.top):(n.offset.left=n.element.offset().left,n.offset.top=n.element.offset().top),e=Math.abs(n.sizeDiff.width+(n._helper?n.offset.left-c.left:n.offset.left-a.left)),i=Math.abs(n.sizeDiff.height+(n._helper?n.offset.top-c.top:n.offset.top-a.top)),e+n.size.width>=n.parentData.width&&(n.size.width=n.parentData.width-e,l&&(n.size.height=n.size.width/n.aspectRatio,f=!1)),i+n.size.height>=n.parentData.height&&(n.size.height=n.parentData.height-i,l&&(n.size.width=n.size.height*n.aspectRatio,f=!1)),f||(n.position.left=n.prevPosition.left,n.position.top=n.prevPosition.top,n.size.width=n.prevSize.width,n.size.height=n.prevSize.height)},stop:function(){var t=P(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,o=t.containerElement,n=P(t.helper),r=n.offset(),a=n.outerWidth()-t.sizeDiff.width,h=n.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h}),t._helper&&!e.animate&&/static/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h})}}),P.ui.plugin.add("resizable","alsoResize",{start:function(){var t=P(this).resizable("instance").options;P(t.alsoResize).each(function(){var t=P(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=P(this).resizable("instance"),s=e.options,o=e.originalSize,n=e.originalPosition,r={height:e.size.height-o.height||0,width:e.size.width-o.width||0,top:e.position.top-n.top||0,left:e.position.left-n.left||0};P(s.alsoResize).each(function(){var t=P(this),s=P(this).data("ui-resizable-alsoresize"),o={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];P.each(e,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&0<=i&&(o[e]=i||null)}),t.css(o)})},stop:function(){P(this).removeData("ui-resizable-alsoresize")}}),P.ui.plugin.add("resizable","ghost",{start:function(){var t=P(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==P.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=P(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=P(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),P.ui.plugin.add("resizable","grid",{resize:function(){var t,e=P(this).resizable("instance"),i=e.options,s=e.size,o=e.originalSize,n=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=a[0]||1,l=a[1]||1,c=Math.round((s.width-o.width)/h)*h,p=Math.round((s.height-o.height)/l)*l,f=o.width+c,u=o.height+p,d=i.maxWidth&&i.maxWidth<f,g=i.maxHeight&&i.maxHeight<u,m=i.minWidth&&i.minWidth>f,v=i.minHeight&&i.minHeight>u;i.grid=a,m&&(f+=h),v&&(u+=l),d&&(f-=h),g&&(u-=l),/^(se|s|e)$/.test(r)?(e.size.width=f,e.size.height=u):/^(ne)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.top=n.top-p):/^(sw)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.left=n.left-c):((u-l<=0||f-h<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<u-l?(e.size.height=u,e.position.top=n.top-p):(u=l-t.height,e.size.height=u,e.position.top=n.top+o.height-u),0<f-h?(e.size.width=f,e.position.left=n.left-c):(f=h-t.width,e.size.width=f,e.position.left=n.left+o.width-f))}});P.ui.resizable,P.widget("ui.selectable",P.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var s=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){s.elementPos=P(s.element[0]).offset(),s.selectees=P(s.options.filter,s.element[0]),s._addClass(s.selectees,"ui-selectee"),s.selectees.each(function(){var t=P(this),e=t.offset(),i={left:e.left-s.elementPos.left,top:e.top-s.elementPos.top};P.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=P("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=P(this.element[0]).offset(),this.options.disabled||(this.selectees=P(t.filter,this.element[0]),this._trigger("start",i),P(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=P.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),P(i.target).parents().addBack().each(function(){var t,e=P.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,o=this,n=this.options,r=this.opos[0],a=this.opos[1],h=s.pageX,l=s.pageY;return h<r&&(t=h,h=r,r=t),l<a&&(t=l,l=a,a=t),this.helper.css({left:r,top:a,width:h-r,height:l-a}),this.selectees.each(function(){var t=P.data(this,"selectable-item"),e=!1,i={};t&&t.element!==o.element[0]&&(i.left=t.left+o.elementPos.left,i.right=t.right+o.elementPos.left,i.top=t.top+o.elementPos.top,i.bottom=t.bottom+o.elementPos.top,"touch"===n.tolerance?e=!(i.left>h||i.right<r||i.top>l||i.bottom<a):"fit"===n.tolerance&&(e=i.left>r&&i.right<h&&i.top>a&&i.bottom<l),e?(t.selected&&(o._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(o._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(o._addClass(t.$element,"ui-selecting"),t.selecting=!0,o._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,o._addClass(t.$element,"ui-selected"),t.selected=!0):(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),o._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(o._removeClass(t.$element,"ui-selected"),t.selected=!1,o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,o._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,P(".ui-unselecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),P(".ui-selecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),P.widget("ui.sortable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),P.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),P(t.target).parents().each(function(){if(P.data(this,o.widgetName+"-item")===o)return i=P(this),!1}),P.data(t.target,o.widgetName+"-item")===o&&(i=P(t.target)),!!i&&(!(this.options.handle&&!e&&(P(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,o,n=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},P.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&"auto"!==n.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",n.cursor),this.storedStylesheet=P("<style>*{ cursor: "+n.cursor+" !important; }</style>").appendTo(o)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return P.ui.ddmanager&&(P.ui.ddmanager.current=this),P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,o,n=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-this.document.scrollTop()<n.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-n.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<n.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+n.scrollSpeed)),t.pageX-this.document.scrollLeft()<n.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-n.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<n.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+n.scrollSpeed))),!1!==r&&P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(o=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===s||P.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&P.contains(this.element[0],s))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,o,n;if(t)return P.ui.ddmanager&&!this.options.dropBehaviour&&P.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),n={},(o=this.options.axis)&&"x"!==o||(n.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(n.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,P(this.helper).animate(n,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new P.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),P.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?P(this.domPosition.prev).after(this.currentItem):P(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},P(t).each(function(){var t=(P(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(P(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,n=t.left,r=n+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||a<s+l&&s+l<h,f="y"===this.options.axis||n<e+c&&e+c<r,u=p&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:n<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,o,n=[],r=[],a=this._connectWith();if(a&&t)for(e=a.length-1;0<=e;e--)for(i=(s=P(a[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&r.push([P.isFunction(o.options.items)?o.options.items.call(o.element):P(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function h(){n.push(this)}for(r.push([P.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):P(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=r.length-1;0<=e;e--)r[e][0].each(h);return P(n)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=P.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,o,n,r,a,h,l=this.items,c=[[P.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):P(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(e=p.length-1;0<=e;e--)for(i=(s=P(p[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&(c.push([P.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):P(o.options.items,o.element),o]),this.containers.push(o));for(e=c.length-1;0<=e;e--)for(n=c[e][1],i=0,h=(r=c[e][0]).length;i<h;i++)(a=P(r[i])).data(this.widgetName+"-item",n),l.push({item:a,instance:n,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,i,s,o;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(i=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?P(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),o=s.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)o=this.containers[e].element.offset(),this.containers[e].containerCache.left=o.left,this.containers[e].containerCache.top=o.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,o.placeholder={element:function(){var t=i.currentItem[0].nodeName.toLowerCase(),e=P("<"+t+">",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),P("<tr>",i.document[0]).appendTo(e)):"tr"===t?i._createTrPlaceholder(i.currentItem,e):"img"===t&&e.attr("src",i.currentItem.attr("src")),s||e.css("visibility","hidden"),e},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=P(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){P("<td> </td>",i.document[0]).attr("colspan",P(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,o,n,r,a,h,l,c=null,p=null,f=this.containers.length-1;0<=f;f--)if(!P.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(c&&P.contains(this.containers[f].element[0],c.element[0]))continue;c=this.containers[f],p=f}else this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",t,this._uiHash(this)),this.containers[f].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,s=null,o=(h=c.floating||this._isFloating(this.currentItem))?"left":"top",n=h?"width":"height",l=h?"pageX":"pageY",e=this.items.length-1;0<=e;e--)P.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(r=this.items[e].item.offset()[o],a=!1,t[l]-r>this.items[e][n]/2&&(a=!0),Math.abs(t[l]-r)<i&&(i=Math.abs(t[l]-r),s=this.items[e],this.direction=a?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper)?P(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||P("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!e.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!e.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&P.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=P(s.containment)[0],e=P(s.containment).offset(),i="hidden"!==P(t).css("overflow"),this.containment=[e.left+(parseInt(P(t).css("borderLeftWidth"),10)||0)+(parseInt(P(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(P(t).css("borderTopWidth"),10)||0)+(parseInt(P(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(P(t).css("borderLeftWidth"),10)||0)-(parseInt(P(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(P(t).css("borderTopWidth"),10)||0)-(parseInt(P(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*i}},_generatePosition:function(t){var e,i,s=this.options,o=t.pageX,n=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(n=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(n=this.containment[3]+this.offset.click.top)),s.grid&&(e=this.originalPageY+Math.round((n-this.originalPageY)/s.grid[1])*s.grid[1],n=!this.containment||e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-s.grid[1]:e+s.grid[1],i=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=!this.containment||i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0])),{top:n-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===P.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||P([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});var d,g,m,v,e,_,b,w,y,S,W,T,k,D,E,N,O,R,L,M,A,F="ui-effects-",B="ui-effects-style",X="ui-effects-animated",Y=P;function q(t,e,i){var s=w[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:t<0?0:s.max<t?s.max:t)}function j(r){var a=_(),h=a._rgba=[];return r=r.toLowerCase(),W(e,function(t,e){var i,s=e.re.exec(r),o=s&&e.parse(s),n=e.space||"rgba";if(o)return i=a[n](o),a[b[n].cache]=i[b[n].cache],h=a._rgba=i._rgba,!1}),h.length?("0,0,0,0"===h.join()&&d.extend(h,m.transparent),a):m[r]}function $(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function U(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(o[P.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(o[e]=s[e]);return o}function K(t,e,i,s){return P.isPlainObject(t)&&(t=(e=t).effect),t={effect:t},null==e&&(e={}),P.isFunction(e)&&(s=e,i=null,e={}),"number"!=typeof e&&!P.fx.speeds[e]||(s=i,i=e,e={}),P.isFunction(i)&&(s=i,i=null),e&&P.extend(t,e),i=i||e.duration,t.duration=P.fx.off?0:"number"==typeof i?i:i in P.fx.speeds?P.fx.speeds[i]:P.fx.speeds._default,t.complete=s||e.complete,t}function V(t){return!t||"number"==typeof t||P.fx.speeds[t]||("string"==typeof t&&!P.effects.effect[t]||(P.isFunction(t)||"object"==typeof t&&!t.effect))}function Q(t,e){var i=e.outerWidth(),s=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}P.effects={effect:{}},v=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],_=(d=Y).Color=function(t,e,i,s){return new d.Color.fn.parse(t,e,i,s)},b={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},w={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},y=_.support={},S=d("<p>")[0],W=d.each,S.style.cssText="background-color:rgba(1,1,1,.5)",y.rgba=-1<S.style.backgroundColor.indexOf("rgba"),W(b,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),_.fn=d.extend(_.prototype,{parse:function(o,t,e,i){if(o===g)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=d(o).css(t),t=g);var n=this,s=d.type(o),r=this._rgba=[];return t!==g&&(o=[o,t,e,i],s="array"),"string"===s?this.parse(j(o)||m._default):"array"===s?(W(b.rgba.props,function(t,e){r[e.idx]=q(o[e.idx],e)}),this):"object"===s?(W(b,o instanceof _?function(t,e){o[e.cache]&&(n[e.cache]=o[e.cache].slice())}:function(t,i){var s=i.cache;W(i.props,function(t,e){if(!n[s]&&i.to){if("alpha"===t||null==o[t])return;n[s]=i.to(n._rgba)}n[s][e.idx]=q(o[t],e,!0)}),n[s]&&d.inArray(null,n[s].slice(0,3))<0&&(n[s][3]=1,i.from&&(n._rgba=i.from(n[s])))}),this):void 0},is:function(t){var o=_(t),n=!0,r=this;return W(b,function(t,e){var i,s=o[e.cache];return s&&(i=r[e.cache]||e.to&&e.to(r._rgba)||[],W(e.props,function(t,e){if(null!=s[e.idx])return n=s[e.idx]===i[e.idx]})),n}),n},_space:function(){var i=[],s=this;return W(b,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,r){var e=(l=_(t))._space(),i=b[e],s=0===this.alpha()?_("transparent"):this,a=s[i.cache]||i.to(s._rgba),h=a.slice(),l=l[i.cache];return W(i.props,function(t,e){var i=e.idx,s=a[i],o=l[i],n=w[e.type]||{};null!==o&&(null===s?h[i]=o:(n.mod&&(n.mod/2<o-s?s+=n.mod:n.mod/2<s-o&&(s-=n.mod)),h[i]=q((o-s)*r+s,e)))}),this[e](h)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=_(t)._rgba;return _(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=d.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+d.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),_.fn.parse.prototype=_.fn,b.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,o=t[3],n=Math.max(e,i,s),r=Math.min(e,i,s),a=n-r,h=n+r,l=.5*h,c=r===n?0:e===n?60*(i-s)/a+360:i===n?60*(s-e)/a+120:60*(e-i)/a+240,p=0==a?0:l<=.5?a/h:a/(2-h);return[Math.round(c)%360,p,l,null==o?1:o]},b.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],n=s<=.5?s*(1+i):s+i-s*i,r=2*s-n;return[Math.round(255*$(r,n,e+1/3)),Math.round(255*$(r,n,e)),Math.round(255*$(r,n,e-1/3)),o]},W(b,function(h,t){var i=t.props,r=t.cache,a=t.to,l=t.from;_.fn[h]=function(t){if(a&&!this[r]&&(this[r]=a(this._rgba)),t===g)return this[r].slice();var e,s=d.type(t),o="array"===s||"object"===s?t:arguments,n=this[r].slice();return W(i,function(t,e){var i=o["object"===s?t:e.idx];null==i&&(i=n[e.idx]),n[e.idx]=q(i,e)}),l?((e=_(l(n)))[r]=n,e):_(n)},W(i,function(r,a){_.fn[r]||(_.fn[r]=function(t){var e,i=d.type(t),s="alpha"===r?this._hsla?"hsla":"rgba":h,o=this[s](),n=o[a.idx];return"undefined"===i?n:("function"===i&&(t=t.call(this,n),i=d.type(t)),null==t&&a.empty?this:("string"===i&&(e=v.exec(t))&&(t=n+parseFloat(e[2])*("+"===e[1]?1:-1)),o[a.idx]=t,this[s](o)))})})}),_.hook=function(t){var e=t.split(" ");W(e,function(t,n){d.cssHooks[n]={set:function(t,e){var i,s,o="";if("transparent"!==e&&("string"!==d.type(e)||(i=j(e)))){if(e=_(i||e),!y.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===n?t.parentNode:t;(""===o||"transparent"===o)&&s&&s.style;)try{o=d.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(o&&"transparent"!==o?o:"_default")}e=e.toRgbaString()}try{t.style[n]=e}catch(t){}}},d.fx.step[n]=function(t){t.colorInit||(t.start=_(t.elem,n),t.end=_(t.end),t.colorInit=!0),d.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},_.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var s={};return W(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}},m=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},E=["add","remove","toggle"],N={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},P.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){P.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(Y.style(t.elem,e,t.end),t.setAttr=!0)}}),P.fn.addBack||(P.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),P.effects.animateClass=function(o,t,e,i){var n=P.speed(t,e,i);return this.queue(function(){var i=P(this),t=i.attr("class")||"",e=(e=n.children?i.find("*").addBack():i).map(function(){return{el:P(this),start:U(this)}}),s=function(){P.each(E,function(t,e){o[e]&&i[e+"Class"](o[e])})};s(),e=e.map(function(){return this.end=U(this.el[0]),this.diff=function(t,e){var i,s,o={};for(i in e)s=e[i],t[i]!==s&&(N[i]||!P.fx.step[i]&&isNaN(parseFloat(s))||(o[i]=s));return o}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=P.Deferred(),i=P.extend({},n,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),P.when.apply(P,e.get()).done(function(){s(),P.each(arguments,function(){var e=this.el;P.each(this.diff,function(t){e.css(t,"")})}),n.complete.call(i[0])})})},P.fn.extend({addClass:(D=P.fn.addClass,function(t,e,i,s){return e?P.effects.animateClass.call(this,{add:t},e,i,s):D.apply(this,arguments)}),removeClass:(k=P.fn.removeClass,function(t,e,i,s){return 1<arguments.length?P.effects.animateClass.call(this,{remove:t},e,i,s):k.apply(this,arguments)}),toggleClass:(T=P.fn.toggleClass,function(t,e,i,s,o){return"boolean"==typeof e||void 0===e?i?P.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,o):T.apply(this,arguments):P.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,o){return P.effects.animateClass.call(this,{add:e,remove:t},i,s,o)}}),P.expr&&P.expr.filters&&P.expr.filters.animated&&(P.expr.filters.animated=(O=P.expr.filters.animated,function(t){return!!P(t).data(X)||O(t)})),!1!==P.uiBackCompat&&P.extend(P.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(F+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,o=e.length;s<o;s++)null!==e[s]&&(i=t.data(F+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=P("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return i.wrap(t),i[0]!==o&&!P.contains(i[0],o)||P(o).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(P.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),P.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!P.contains(t[0],e)||P(e).trigger("focus")),t}}),P.extend(P.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),P.effects.effect[t]=i,P.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*s,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(B,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(B)||"",t.removeData(B)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=P("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(F+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=F+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){P.effects.restoreStyle(t),P.effects.removePlaceholder(t)},setTransition:function(s,t,o,n){return n=n||{},P.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(n[e]=i[0]*o+i[1])}),n}}),P.fn.extend({effect:function(){function t(t){var e=P(this),i=P.effects.mode(e,a)||n;e.data(X,!0),h.push(i),n&&("show"===i||i===n&&"hide"===i)&&e.show(),n&&"none"===i||P.effects.saveStyle(e),P.isFunction(t)&&t()}var s=K.apply(this,arguments),o=P.effects.effect[s.effect],n=o.mode,e=s.queue,i=e||"fx",r=s.complete,a=s.mode,h=[];if(P.fx.off||!o)return a?this[a](s.duration,r):this.each(function(){r&&r.call(this)});function l(t){var e=P(this);function i(){P.isFunction(r)&&r.call(e[0]),P.isFunction(t)&&t()}s.mode=h.shift(),!1===P.uiBackCompat||n?"none"===s.mode?(e[a](),i()):o.call(e[0],s,function(){e.removeData(X),P.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===a:"show"===a)?(e[a](),i()):o.call(e[0],s,i)}return!1===e?this.each(t).each(l):this.queue(i,t).queue(i,l)},show:(M=P.fn.show,function(t){if(V(t))return M.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(L=P.fn.hide,function(t){if(V(t))return L.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(R=P.fn.toggle,function(t){if(V(t)||"boolean"==typeof t)return R.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var i=this.css(t),s=[];return P.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Q(this.css("clip"),this)},transfer:function(t,e){var i=P(this),s=P(t.to),o="fixed"===s.css("position"),n=P("body"),r=o?n.scrollTop():0,a=o?n.scrollLeft():0,h=s.offset(),l={top:h.top-r,left:h.left-a,height:s.innerHeight(),width:s.innerWidth()},c=i.offset(),p=P("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:c.top-r,left:c.left-a,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){p.remove(),P.isFunction(e)&&e()})}}),P.fx.step.clip=function(t){t.clipInit||(t.start=P(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Q(t.end,t.elem)),t.clipInit=!0),P(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},A={},P.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){A[t]=function(t){return Math.pow(t,e+2)}}),P.extend(A,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),P.each(A,function(t,e){P.easing["easeIn"+t]=e,P.easing["easeOut"+t]=function(t){return 1-e(1-t)},P.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});P.effects,P.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=P(this),o=t.direction||"up",n=s.cssClip(),r={clip:P.extend({},n)},a=P.effects.createPlaceholder(s);r.clip[i[o][0]]=r.clip[i[o][1]],"show"===t.mode&&(s.cssClip(r.clip),a&&a.css(P.effects.clipToBox(r)),r.clip=n),a&&a.animate(P.effects.clipToBox(r),t.duration,t.easing),s.animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("bounce",function(t,e){var i,s,o,n=P(this),r=t.mode,a="hide"===r,h="show"===r,l=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(h||a?1:0),u=t.duration/f,d=t.easing,g="up"===l||"down"===l?"top":"left",m="up"===l||"left"===l,v=0,_=n.queue().length;for(P.effects.createPlaceholder(n),o=n.css(g),c=c||n["top"==g?"outerHeight":"outerWidth"]()/3,h&&((s={opacity:1})[g]=o,n.css("opacity",0).css(g,m?2*-c:2*c).animate(s,u,d)),a&&(c/=Math.pow(2,p-1)),(s={})[g]=o;v<p;v++)(i={})[g]=(m?"-=":"+=")+c,n.animate(i,u,d).animate(s,u,d),c=a?2*c:c/2;a&&((i={opacity:0})[g]=(m?"-=":"+=")+c,n.animate(i,u,d)),n.queue(e),P.effects.unshift(n,_,1+f)}),P.effects.define("drop","hide",function(t,e){var i,s=P(this),o="show"===t.mode,n=t.direction||"left",r="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",h="+="==a?"-=":"+=",l={opacity:0};P.effects.createPlaceholder(s),i=t.distance||s["top"==r?"outerHeight":"outerWidth"](!0)/2,l[r]=a+i,o&&(s.css(l),l[r]=h+i,l.opacity=1),s.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;P(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fold","hide",function(e,t){var i=P(this),s=e.mode,o="show"===s,n="hide"===s,r=e.size||15,a=/([0-9]+)%/.exec(r),h=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,c=P.effects.createPlaceholder(i),p=i.cssClip(),f={clip:P.extend({},p)},u={clip:P.extend({},p)},d=[p[h[0]],p[h[1]]],g=i.queue().length;a&&(r=parseInt(a[1],10)/100*d[n?0:1]),f.clip[h[0]]=r,u.clip[h[0]]=r,u.clip[h[1]]=0,o&&(i.cssClip(u.clip),c&&c.css(P.effects.clipToBox(u)),u.clip=p),i.queue(function(t){c&&c.animate(P.effects.clipToBox(f),l,e.easing).animate(P.effects.clipToBox(u),l,e.easing),t()}).animate(f,l,e.easing).animate(u,l,e.easing).queue(t),P.effects.unshift(i,g,4)}),P.effects.define("highlight","show",function(t,e){var i=P(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),P.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("size",function(o,e){var t,n,i,s=P(this),r=["fontSize"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=o.mode,c="effect"!==l,p=o.scale||"both",f=o.origin||["middle","center"],u=s.css("position"),d=s.position(),g=P.effects.scaledDimensions(s),m=o.from||g,v=o.to||P.effects.scaledDimensions(s,0);P.effects.createPlaceholder(s),"show"===l&&(i=m,m=v,v=i),n={from:{y:m.height/g.height,x:m.width/g.width},to:{y:v.height/g.height,x:v.width/g.width}},"box"!==p&&"both"!==p||(n.from.y!==n.to.y&&(m=P.effects.setTransition(s,a,n.from.y,m),v=P.effects.setTransition(s,a,n.to.y,v)),n.from.x!==n.to.x&&(m=P.effects.setTransition(s,h,n.from.x,m),v=P.effects.setTransition(s,h,n.to.x,v))),"content"!==p&&"both"!==p||n.from.y!==n.to.y&&(m=P.effects.setTransition(s,r,n.from.y,m),v=P.effects.setTransition(s,r,n.to.y,v)),f&&(t=P.effects.getBaseline(f,g),m.top=(g.outerHeight-m.outerHeight)*t.y+d.top,m.left=(g.outerWidth-m.outerWidth)*t.x+d.left,v.top=(g.outerHeight-v.outerHeight)*t.y+d.top,v.left=(g.outerWidth-v.outerWidth)*t.x+d.left),s.css(m),"content"!==p&&"both"!==p||(a=a.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var t=P(this),e=P.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},s={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=P.effects.setTransition(t,a,n.from.y,i),s=P.effects.setTransition(t,a,n.to.y,s)),n.from.x!==n.to.x&&(i=P.effects.setTransition(t,h,n.from.x,i),s=P.effects.setTransition(t,h,n.to.x,s)),c&&P.effects.saveStyle(t),t.css(i),t.animate(s,o.duration,o.easing,function(){c&&P.effects.restoreStyle(t)})})),s.animate(v,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){var t=s.offset();0===v.opacity&&s.css("opacity",m.opacity),c||(s.css("position","static"===u?"relative":u).offset(t),P.effects.saveStyle(s)),e()}})}),P.effects.define("scale",function(t,e){var i=P(this),s=t.mode,o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),n=P.extend(!0,{from:P.effects.scaledDimensions(i),to:P.effects.scaledDimensions(i,o,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(n.from.opacity=1,n.to.opacity=0),P.effects.effect.size.call(this,n,e)}),P.effects.define("puff","hide",function(t,e){var i=P.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});P.effects.effect.scale.call(this,i,e)}),P.effects.define("pulsate","show",function(t,e){var i=P(this),s=t.mode,o="show"===s,n=o||"hide"===s,r=2*(t.times||5)+(n?1:0),a=t.duration/r,h=0,l=1,c=i.queue().length;for(!o&&i.is(":visible")||(i.css("opacity",0).show(),h=1);l<r;l++)i.animate({opacity:h},a,t.easing),h=1-h;i.animate({opacity:h},a,t.easing),i.queue(e),P.effects.unshift(i,c,1+r)}),P.effects.define("shake",function(t,e){var i=1,s=P(this),o=t.direction||"left",n=t.distance||20,r=t.times||3,a=2*r+1,h=Math.round(t.duration/a),l="up"===o||"down"===o?"top":"left",c="up"===o||"left"===o,p={},f={},u={},d=s.queue().length;for(P.effects.createPlaceholder(s),p[l]=(c?"-=":"+=")+n,f[l]=(c?"+=":"-=")+2*n,u[l]=(c?"-=":"+=")+2*n,s.animate(p,h,t.easing);i<r;i++)s.animate(f,h,t.easing).animate(u,h,t.easing);s.animate(f,h,t.easing).animate(p,h/2,t.easing).queue(e),P.effects.unshift(s,d,1+a)}),P.effects.define("slide","show",function(t,e){var i,s,o=P(this),n={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=t.mode,a=t.direction||"left",h="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a,c=t.distance||o["top"==h?"outerHeight":"outerWidth"](!0),p={};P.effects.createPlaceholder(o),i=o.cssClip(),s=o.position()[h],p[h]=(l?-1:1)*c+s,p.clip=o.cssClip(),p.clip[n[a][1]]=p.clip[n[a][0]],"show"===r&&(o.cssClip(p.clip),o.css(h,p[h]),p.clip=i,p[h]=s),o.animate(p,{queue:!1,duration:t.duration,easing:t.easing,complete:e})});!1!==P.uiBackCompat&&P.effects.define("transfer",function(t,e){P(this).transfer(t,e)})}); })(this);
+(function (window, undefined) { !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){var e,i,s,o,n,r,a,h,l,c,p,f;t.ui=t.ui||{},t.ui.version="1.12.1",e=0,i=Array.prototype.slice,t.cleanData=(c=t.cleanData,function(e){var i,s,o;for(o=0;null!=(s=e[o]);o++)try{(i=t._data(s,"events"))&&i.remove&&t(s).triggerHandler("remove")}catch(t){}c(e)}),t.widget=function(e,i,s){var o,n,r,a,h={},l=e.split(".")[0];return e=e.split(".")[1],a=l+"-"+e,s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][a.toLowerCase()]=function(e){return!!t.data(e,a)},t[l]=t[l]||{},o=t[l][e],n=t[l][e]=function(t,e){if(!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},t.extend(n,o,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(s,(function(e,s){t.isFunction(s)?h[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,n=this._superApply;return this._super=t,this._superApply=o,e=s.apply(this,arguments),this._super=i,this._superApply=n,e}}():h[e]=s})),n.prototype=t.widget.extend(r,{widgetEventPrefix:o&&r.widgetEventPrefix||e},h,{constructor:n,namespace:l,widgetName:e,widgetFullName:a}),o?(t.each(o._childConstructors,(function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,n,i._proto)})),delete o._childConstructors):i._childConstructors.push(n),t.widget.bridge(e,n),n},t.widget.extend=function(e){for(var s,o,n=i.call(arguments,1),r=0,a=n.length;r<a;r++)for(s in n[r])o=n[r][s],n[r].hasOwnProperty(s)&&void 0!==o&&(t.isPlainObject(o)?e[s]=t.isPlainObject(e[s])?t.widget.extend({},e[s],o):t.widget.extend({},o):e[s]=o);return e},t.widget.bridge=function(e,s){var o=s.prototype.widgetFullName||e;t.fn[e]=function(n){var r="string"==typeof n,a=i.call(arguments,1),h=this;return r?this.length||"instance"!==n?this.each((function(){var i,s=t.data(this,o);return"instance"===n?(h=s,!1):s?t.isFunction(s[n])&&"_"!==n.charAt(0)?(i=s[n].apply(s,a))!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")})):h=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each((function(){var e=t.data(this,o);e?(e.option(n||{}),e._init&&e._init()):t.data(this,o,new s(n,this))}))),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,o,n,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},s=e.split("."),e=s.shift(),s.length){for(o=r[e]=t.widget.extend({},this.options[e]),n=0;n<s.length-1;n++)o[s[n]]=o[s[n]]||{},o=o[s[n]];if(e=s.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,o;for(i in e)o=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&o&&o.length&&(s=t(o.get()),this._removeClass(o,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,n){var r,a;for(a=0;a<i.length;a++)r=o.classesElementLookup[i[a]]||t(),r=e.add?t(t.unique(r.get().concat(e.element.get()))):t(r.not(e.element).get()),o.classesElementLookup[i[a]]=r,s.push(i[a]),n&&e.classes[i[a]]&&s.push(e.classes[i[a]])}var s=[],o=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,(function(s,o){-1!==t.inArray(e.target,o)&&(i.classesElementLookup[s]=t(o.not(e.target).get()))}))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof t||null===t,n={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:s};return n.element.toggleClass(this._classes(n),s),this},_on:function(e,i,s){var o,n=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=o=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,o=this.widget()),t.each(s,(function(s,r){function a(){if(e||!0!==n.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?n[r]:r).apply(n,arguments)}var h,l,c;"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||t.guid++),l=(h=s.match(/^([\w:-]*)\s*(.*)$/))[1]+n.eventNamespace,(c=h[2])?o.on(l,c,a):i.on(l,a)}))},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout((function(){return("string"==typeof t?i[t]:t).apply(i,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var o,n,r=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(o in n)o in i||(i[o]=n[o]);return this.element.trigger(i,s),!(t.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,i){t.Widget.prototype["_"+e]=function(s,o,n){var r,a;"string"==typeof o&&(o={effect:o}),a=o?!0===o||"number"==typeof o?i:o.effect||i:e,"number"==typeof(o=o||{})&&(o={duration:o}),r=!t.isEmptyObject(o),o.complete=n,o.delay&&s.delay(o.delay),r&&t.effects&&t.effects.effect[a]?s[e](o):a!==e&&s[a]?s[a](o.duration,o.easing,n):s.queue((function(i){t(this)[e](),n&&n.call(s[0]),i()}))}})),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var o,n=Math.max,r=Math.abs,a=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),n=s.children()[0];return t("body").append(s),e=n.offsetWidth,s.css("overflow","scroll"),e===(i=n.offsetWidth)&&(i=s[0].clientWidth),s.remove(),o=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:o,offset:!s&&!o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(o){if(!o||!o.of)return f.apply(this,arguments);o=t.extend({},o);var p,u,d,g,m,v,_=t(o.of),b=t.position.getWithinInfo(o.within),w=t.position.getScrollInfo(b),y=(o.collision||"flip").split(" "),P={};return v=s(_),_[0].preventDefault&&(o.at="left top"),u=v.width,d=v.height,g=v.offset,m=t.extend({},g),t.each(["my","at"],(function(){var t,e,i=(o[this]||"").split(" ");1===i.length&&(i=a.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=a.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),P[this]=[t?t[0]:0,e?e[0]:0],o[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]})),1===y.length&&(y[1]=y[0]),"right"===o.at[0]?m.left+=u:"center"===o.at[0]&&(m.left+=u/2),"bottom"===o.at[1]?m.top+=d:"center"===o.at[1]&&(m.top+=d/2),p=e(P.at,u,d),m.left+=p[0],m.top+=p[1],this.each((function(){var s,a,h=t(this),l=h.outerWidth(),c=h.outerHeight(),f=i(this,"marginLeft"),v=i(this,"marginTop"),x=l+f+i(this,"marginRight")+w.width,C=c+v+i(this,"marginBottom")+w.height,z=t.extend({},m),H=e(P.my,h.outerWidth(),h.outerHeight());"right"===o.my[0]?z.left-=l:"center"===o.my[0]&&(z.left-=l/2),"bottom"===o.my[1]?z.top-=c:"center"===o.my[1]&&(z.top-=c/2),z.left+=H[0],z.top+=H[1],s={marginLeft:f,marginTop:v},t.each(["left","top"],(function(e,i){t.ui.position[y[e]]&&t.ui.position[y[e]][i](z,{targetWidth:u,targetHeight:d,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[p[0]+H[0],p[1]+H[1]],my:o.my,at:o.at,within:b,elem:h})})),o.using&&(a=function(t){var e=g.left-z.left,i=e+u-l,s=g.top-z.top,a=s+d-c,p={target:{element:_,left:g.left,top:g.top,width:u,height:d},element:{element:h,left:z.left,top:z.top,width:l,height:c},horizontal:i<0?"left":e>0?"right":"center",vertical:a<0?"top":s>0?"bottom":"middle"};u<l&&r(e+i)<u&&(p.horizontal="center"),d<c&&r(s+a)<d&&(p.vertical="middle"),n(r(e),r(i))>n(r(s),r(a))?p.important="horizontal":p.important="vertical",o.using.call(this,t,p)}),h.offset(t.extend(z,{using:a}))}))},t.ui.position={fit:{left:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollLeft:s.offset.left,r=s.width,a=t.left-e.collisionPosition.marginLeft,h=o-a,l=a+e.collisionWidth-r-o;e.collisionWidth>r?h>0&&l<=0?(i=t.left+h+e.collisionWidth-r-o,t.left+=h-i):t.left=l>0&&h<=0?o:h>l?o+r-e.collisionWidth:o:h>0?t.left+=h:l>0?t.left-=l:t.left=n(t.left-a,t.left)},top:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollTop:s.offset.top,r=e.within.height,a=t.top-e.collisionPosition.marginTop,h=o-a,l=a+e.collisionHeight-r-o;e.collisionHeight>r?h>0&&l<=0?(i=t.top+h+e.collisionHeight-r-o,t.top+=h-i):t.top=l>0&&h<=0?o:h>l?o+r-e.collisionHeight:o:h>0?t.top+=h:l>0?t.top-=l:t.top=n(t.top-a,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,n=o.offset.left+o.scrollLeft,a=o.width,h=o.isWindow?o.scrollLeft:o.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,p=l+e.collisionWidth-a-h,f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,u="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,d=-2*e.offset[0];c<0?((i=t.left+f+u+d+e.collisionWidth-a-n)<0||i<r(c))&&(t.left+=f+u+d):p>0&&((s=t.left-e.collisionPosition.marginLeft+f+u+d-h)>0||r(s)<p)&&(t.left+=f+u+d)},top:function(t,e){var i,s,o=e.within,n=o.offset.top+o.scrollTop,a=o.height,h=o.isWindow?o.scrollTop:o.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,p=l+e.collisionHeight-a-h,f="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,u="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,d=-2*e.offset[1];c<0?((s=t.top+f+u+d+e.collisionHeight-a-n)<0||s<r(c))&&(t.top+=f+u+d):p>0&&((i=t.top-e.collisionPosition.marginTop+f+u+d-h)>0||r(i)<p)&&(t.top+=f+u+d)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:(p="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(p+".ui-disableSelection",(function(t){t.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout((function(){var i=e.data("ui-form-reset-instances");t.each(i,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,n=this.parents().filter((function(){var e=t(this);return(!s||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==i&&n.length?n:t(this[0].ownerDocument||document)},t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),s=!1,t(document).on("mouseup",(function(){s=!1})),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).on("click."+this.widgetName,(function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,o=1===e.which,n=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(o&&!n&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var o,n=t.ui[e].prototype;for(o in s)n.plugins[o]=n.plugins[o]||[],n.plugins[o].push([i,s[o]])},call:function(t,e,i,s){var o,n=t.plugins[e];if(n&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<n.length;o++)t.options[n[o][0]]&&n[o][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),o=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,o=this.options,n=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(s=(i=t(o.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=o.containment:this.containment=[0,0,t(n).width()-this.helperProportions.width-this.margins.left,(t(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,o,n,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1]:o,n=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=i?n-this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]:n),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var o=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))}))},stop:function(e,i,s){var o=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,(function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))}))},drag:function(e,i,s){t.each(s.sortables,(function(){var o=!1,n=this;n.positionAbs=s.positionAbs,n.helperProportions=s.helperProportions,n.offset.click=s.offset.click,n._intersectsWith(n.containerCache)&&(o=!0,t.each(s.sortables,(function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==n&&this._intersectsWith(this.containerCache)&&t.contains(n.element[0],this.element[0])&&(o=!1),o}))),o?(n.isOver||(n.isOver=1,s._parent=i.helper.parent(),n.currentItem=i.helper.appendTo(n.element).data("ui-sortable-item",!0),n.options._helper=n.options.helper,n.options.helper=function(){return i.helper[0]},e.target=n.currentItem[0],n._mouseCapture(e,!0),n._mouseStart(e,!0,!0),n.offset.click.top=s.offset.click.top,n.offset.click.left=s.offset.click.left,n.offset.parent.left-=s.offset.parent.left-n.offset.parent.left,n.offset.parent.top-=s.offset.parent.top-n.offset.parent.top,s._trigger("toSortable",e),s.dropped=n.element,t.each(s.sortables,(function(){this.refreshPositions()})),s.currentItem=s.element,n.fromOutside=s),n.currentItem&&(n._mouseDrag(e),i.position=n.position)):n.isOver&&(n.isOver=0,n.cancelHelperRemoval=!0,n.options._revert=n.options.revert,n.options.revert=!1,n._trigger("out",e,n._uiHash(n)),n._mouseStop(e,!0),n.options.revert=n.options._revert,n.options.helper=n.options._helper,n.placeholder&&n.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var o=t("body"),n=s.options;o.css("cursor")&&(n._cursor=o.css("cursor")),o.css("cursor",n.cursor)},stop:function(e,i,s){var o=s.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var o=t(i.helper),n=s.options;o.css("opacity")&&(n._opacity=o.css("opacity")),o.css("opacity",n.opacity)},stop:function(e,i,s){var o=s.options;o._opacity&&t(i.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var o=s.options,n=!1,r=s.scrollParentNotHidden[0],a=s.document[0];r!==a&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(s.overflowOffset.top+r.offsetHeight-e.pageY<o.scrollSensitivity?r.scrollTop=n=r.scrollTop+o.scrollSpeed:e.pageY-s.overflowOffset.top<o.scrollSensitivity&&(r.scrollTop=n=r.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(s.overflowOffset.left+r.offsetWidth-e.pageX<o.scrollSensitivity?r.scrollLeft=n=r.scrollLeft+o.scrollSpeed:e.pageX-s.overflowOffset.left<o.scrollSensitivity&&(r.scrollLeft=n=r.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(a).scrollTop()<o.scrollSensitivity?n=t(a).scrollTop(t(a).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<o.scrollSensitivity&&(n=t(a).scrollTop(t(a).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(a).scrollLeft()<o.scrollSensitivity?n=t(a).scrollLeft(t(a).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<o.scrollSensitivity&&(n=t(a).scrollLeft(t(a).scrollLeft()+o.scrollSpeed)))),!1!==n&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var o=s.options;s.snapElements=[],t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each((function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})}))},drag:function(e,i,s){var o,n,r,a,h,l,c,p,f,u,d=s.options,g=d.snapTolerance,m=i.offset.left,v=m+s.helperProportions.width,_=i.offset.top,b=_+s.helperProportions.height;for(f=s.snapElements.length-1;f>=0;f--)l=(h=s.snapElements[f].left-s.margins.left)+s.snapElements[f].width,p=(c=s.snapElements[f].top-s.margins.top)+s.snapElements[f].height,v<h-g||m>l+g||b<c-g||_>p+g||!t.contains(s.snapElements[f].item.ownerDocument,s.snapElements[f].item)?(s.snapElements[f].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[f].item})),s.snapElements[f].snapping=!1):("inner"!==d.snapMode&&(o=Math.abs(c-b)<=g,n=Math.abs(p-_)<=g,r=Math.abs(h-v)<=g,a=Math.abs(l-m)<=g,o&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),n&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),u=o||n||r||a,"outer"!==d.snapMode&&(o=Math.abs(c-_)<=g,n=Math.abs(p-b)<=g,r=Math.abs(h-m)<=g,a=Math.abs(l-v)<=g,o&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),n&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[f].snapping&&(o||n||r||a||u)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[f].item})),s.snapElements[f].snapping=o||n||r||a||u)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var o,n=s.options,r=t.makeArray(t(n.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));r.length&&(o=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each((function(e){t(this).css("zIndex",o+e)})),this.css("zIndex",o+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var o=t(i.helper),n=s.options;o.css("zIndex")&&(n._zIndex=o.css("zIndex")),o.css("zIndex",n.zIndex)},stop:function(e,i,s){var o=s.options;o._zIndex&&t(i.helper).css("zIndex",o._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&o(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return n=!0,!1})),!n&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),o=t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,s,o){if(!i.offset)return!1;var n=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,a=n+e.helperProportions.width,h=r+e.helperProportions.height,l=i.offset.left,c=i.offset.top,p=l+i.proportions().width,f=c+i.proportions().height;switch(s){case"fit":return l<=n&&a<=p&&c<=r&&h<=f;case"intersect":return l<n+e.helperProportions.width/2&&a-e.helperProportions.width/2<p&&c<r+e.helperProportions.height/2&&h-e.helperProportions.height/2<f;case"pointer":return t(o.pageY,c,i.proportions().height)&&t(o.pageX,l,i.proportions().width);case"touch":return(r>=c&&r<=f||h>=c&&h<=f||r<c&&h>f)&&(n>=l&&n<=p||a>=l&&a<=p||n<l&&a>p);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var s,o,n=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;s<n.length;s++)if(!(n[s].options.disabled||e&&!n[s].accept.call(n[s].element[0],e.currentItem||e.element))){for(o=0;o<a.length;o++)if(a[o]===n[s].element[0]){n[s].proportions().height=0;continue t}n[s].visible="none"!==n[s].element.css("display"),n[s].visible&&("mousedown"===r&&n[s]._activate.call(n[s],i),n[s].offset=n[s].element.offset(),n[s].proportions({width:n[s].element[0].offsetWidth,height:n[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&o(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}))},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,r,a=o(e,this,this.options.tolerance,i),h=!a&&this.isover?"isout":a&&!this.isover?"isover":null;h&&(this.options.greedy&&(n=this.options.scope,(r=this.element.parents(":data(ui-droppable)").filter((function(){return t(this).droppable("instance").options.scope===n}))).length&&((s=t(r[0]).droppable("instance")).greedyChild="isover"===h)),s&&"isover"===h&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,i),s&&"isout"===h&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}}))},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s,o=i&&"left"===i?"scrollLeft":"scrollTop";return e[o]>0||(e[o]=1,s=e[o]>0,e[o]=0,s)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",(function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())})).on("mouseleave",(function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,s,o,n,r=this.options,a=this;if(this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;i<s.length;i++)o="ui-resizable-"+(e=t.trim(s[i])),n=t("<div>"),this._addClass(n,"ui-resizable-handle "+o),n.css({zIndex:r.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(n);this._renderAxis=function(e){var i,s,o,n;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),n=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(o,n),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")})),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,o=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(e){var i,s,o,n=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),n.containment&&(i+=t(n.containment).scrollLeft()||0,s+=t(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,o=this.originalMousePosition,n=this.axis,r=e.pageX-o.left||0,a=e.pageY-o.top||0,h=this._change[n];return this._updatePrevProperties(),!!h&&(i=h.apply(this,[e,r,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,o,n,r,a,h,l=this.options,c=this;return this._helper&&(o=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,n=s?0:c.sizeDiff.width,r={width:c.helper.width()-n,height:c.helper.height()-o},a=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(r,{top:h,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,o,n,r=this.options;n={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,s=n.minWidth/this.aspectRatio,i=n.maxHeight*this.aspectRatio,o=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),s>n.minHeight&&(n.minHeight=s),i<n.maxWidth&&(n.maxWidth=i),o<n.maxHeight&&(n.maxHeight=o)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),n&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),o&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,o=i._proportionallyResizeElements,n=o.length&&/textarea/i.test(o[0].nodeName),r=n&&i._hasScroll(o[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,h={width:i.size.width-a,height:i.size.height-r},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};o&&o.length&&t(o[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,o,n,r,a,h=t(this).resizable("instance"),l=h.options,c=h.element,p=l.containment,f=p instanceof t?p.get(0):/parent/.test(p)?c.parent().get(0):p;f&&(h.containerElement=t(f),/document/.test(p)||p===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(f),i=[],t(["Top","Right","Left","Bottom"]).each((function(t,s){i[t]=h._num(e.css("padding"+s))})),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,o=h.containerSize.height,n=h.containerSize.width,r=h._hasScroll(f,"left")?f.scrollWidth:n,a=h._hasScroll(f)?f.scrollHeight:o,h.parentData={element:f,left:s.left,top:s.top,width:r,height:a}))},resize:function(e){var i,s,o,n,r=t(this).resizable("instance"),a=r.options,h=r.containerOffset,l=r.position,c=r._aspectRatio||e.shiftKey,p={top:0,left:0},f=r.containerElement,u=!0;f[0]!==document&&/static/.test(f.css("position"))&&(p=h),l.left<(r._helper?h.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-h.left:r.position.left-p.left),c&&(r.size.height=r.size.width/r.aspectRatio,u=!1),r.position.left=a.helper?h.left:0),l.top<(r._helper?h.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-h.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,u=!1),r.position.top=r._helper?h.top:0),o=r.containerElement.get(0)===r.element.parent().get(0),n=/relative|absolute/.test(r.containerElement.css("position")),o&&n?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-p.left:r.offset.left-h.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-p.top:r.offset.top-h.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio,u=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,c&&(r.size.width=r.size.height*r.aspectRatio,u=!1)),u||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,o=e.containerPosition,n=e.containerElement,r=t(e.helper),a=r.offset(),h=r.outerWidth()-e.sizeDiff.width,l=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(n.css("position"))&&t(this).css({left:a.left-o.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(n.css("position"))&&t(this).css({left:a.left-o.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each((function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})}))},resize:function(e,i){var s=t(this).resizable("instance"),o=s.options,n=s.originalSize,r=s.originalPosition,a={height:s.size.height-n.height||0,width:s.size.width-n.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};t(o.alsoResize).each((function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),o={},n=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(n,(function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)})),e.css(o)}))},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,o=i.size,n=i.originalSize,r=i.originalPosition,a=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,p=Math.round((o.width-n.width)/l)*l,f=Math.round((o.height-n.height)/c)*c,u=n.width+p,d=n.height+f,g=s.maxWidth&&s.maxWidth<u,m=s.maxHeight&&s.maxHeight<d,v=s.minWidth&&s.minWidth>u,_=s.minHeight&&s.minHeight>d;s.grid=h,v&&(u+=l),_&&(d+=c),g&&(u-=l),m&&(d-=c),/^(se|s|e)$/.test(a)?(i.size.width=u,i.size.height=d):/^(ne)$/.test(a)?(i.size.width=u,i.size.height=d,i.position.top=r.top-f):/^(sw)$/.test(a)?(i.size.width=u,i.size.height=d,i.position.left=r.left-p):((d-c<=0||u-l<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),d-c>0?(i.size.height=d,i.position.top=r.top-f):(d=c-e.height,i.size.height=d,i.position.top=r.top+n.height-d),u-l>0?(i.size.width=u,i.position.left=r.left-p):(u=l-e.width,i.size.width=u,i.position.left=r.left+n.width-u))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each((function(){var i=t(this),s=i.offset(),o={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:o.left,top:o.top,right:o.left+i.outerWidth(),bottom:o.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})}))},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))})),t(e.target).parents().addBack().each((function(){var s,o=t.data(this,"selectable-item");if(o)return s=!e.metaKey&&!e.ctrlKey||!o.$element.hasClass("ui-selected"),i._removeClass(o.$element,s?"ui-unselecting":"ui-selected")._addClass(o.$element,s?"ui-selecting":"ui-unselecting"),o.unselecting=!s,o.selecting=s,o.selected=s,s?i._trigger("selecting",e,{selecting:o.element}):i._trigger("unselecting",e,{unselecting:o.element}),!1})))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,o=this.options,n=this.opos[0],r=this.opos[1],a=e.pageX,h=e.pageY;return n>a&&(i=a,a=n,n=i),r>h&&(i=h,h=r,r=i),this.helper.css({left:n,top:r,width:a-n,height:h-r}),this.selectees.each((function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===o.tolerance?l=!(c.left>a||c.right<n||c.top>h||c.bottom<r):"fit"===o.tolerance&&(l=c.left>n&&c.right<a&&c.top>r&&c.bottom<h),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))})),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each((function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})})),t(".ui-selecting",this.element[0]).each((function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})})),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,(function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,o=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each((function(){if(t.data(this,n.widgetName+"-item")===n)return s=t(this),!1})),t.data(e.target,n.widgetName+"-item")===n&&(s=t(e.target)),!!s&&(!(this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each((function(){this===e.target&&(o=!0)})),!o))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,s){var o,n,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",r.cursor),this.storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(n)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,o,n,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),e.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(o=(s=this.items[i]).item[0],(n=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,o=this.placeholder.offset(),n=this.options.axis,r={};n&&"x"!==n||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){s._clear(e)}))}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each((function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))})),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each((function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")})),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,n=t.left,r=n+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||s+l>a&&s+l<h,f="y"===this.options.axis||e+c>n&&e+c<r,u=p&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:n<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var s,o,n,r,a=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=(n=t(l[s],this.document[0])).length-1;o>=0;o--)(r=t.data(n[o],this.widgetFullName))&&r!==this&&!r.options.disabled&&h.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0}))},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,o,n,r,a,h,l,c=this.items,p=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(i=f.length-1;i>=0;i--)for(s=(o=t(f[i],this.document[0])).length-1;s>=0;s--)(n=t.data(o[s],this.widgetFullName))&&n!==this&&!n.options.disabled&&(p.push([t.isFunction(n.options.items)?n.options.items.call(n.element[0],e,{item:this.currentItem}):t(n.options.items,n.element),n]),this.containers.push(n));for(i=p.length-1;i>=0;i--)for(r=p[i][1],s=0,l=(a=p[i][0]).length;s<l;s++)(h=t(a[s])).data(this.widgetName+"-item",r),c.push({item:h,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,s,o,n;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(s=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=o.outerWidth(),s.height=o.outerHeight()),n=o.offset(),s.left=n.left,s.top=n.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)n=this.containers[i].element.offset(),this.containers[i].containerCache.left=n.left,this.containers[i].containerCache.top=n.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,s=(e=e||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+s+">",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===s?e._createTrPlaceholder(e.currentItem,o):"img"===s&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){i&&!s.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each((function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){var i,s,o,n,r,a,h,l,c,p,f=null,u=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(f&&t.contains(this.containers[i].element[0],f.element[0]))continue;f=this.containers[i],u=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(o=1e4,n=null,r=(c=f.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",p=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[u].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[r],l=!1,e[p]-h>this.items[s][a]/2&&(l=!0),Math.abs(e[p]-h)<o&&(o=Math.abs(e[p]-h),n=this.items[s],this.direction=l?"up":"down"));if(!n&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[u])return void(this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));n?this._rearrange(e,n,null,!0):this._rearrange(e,null,this.containers[u].element,!0),this._trigger("change",e,this._uiHash()),this.containers[u]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),s[0].style.width&&!i.forceHelperSize||s.width(this.currentItem.width()),s[0].style.height&&!i.forceHelperSize||s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],i=t(o.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?0:o.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?0:o.scrollLeft())*s}},_generatePosition:function(e){var i,s,o=this.options,n=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(n=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(n=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,s=this.originalPageX+Math.round((n-this.originalPageX)/o.grid[0])*o.grid[0],n=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-o.grid[0]:s+o.grid[0]:s)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:a.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:a.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!s)}))},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)"auto"!==this._storedCSS[s]&&"static"!==this._storedCSS[s]||(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&o.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(o.push((function(t){this._trigger("remove",t,this._uiHash())})),o.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||o.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(o.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;s<o.length;s++)o[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),n="ui-effects-",r="ui-effects-style",a="ui-effects-animated",h=t,t.effects={effect:{}},function(t,e){function i(t,e,i){var s=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:s.max<t?s.max:t)}function s(e){var i=h(),s=i._rgba=[];return e=e.toLowerCase(),u(a,(function(t,o){var n,r=o.re.exec(e),a=r&&o.parse(r),h=o.space||"rgba";if(a)return n=i[h](a),i[l[h].cache]=n[l[h].cache],s=i._rgba=n._rgba,!1})),s.length?("0,0,0,0"===s.join()&&t.extend(s,n.transparent),i):n[e]}function o(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var n,r=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,o){return new t.Color.fn.parse(e,i,s,o)},l={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},p=h.support={},f=t("<p>")[0],u=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",p.rgba=f.style.backgroundColor.indexOf("rgba")>-1,u(l,(function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}})),h.fn=t.extend(h.prototype,{parse:function(o,r,a,c){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(r),r=e);var p=this,f=t.type(o),d=this._rgba=[];return r!==e&&(o=[o,r,a,c],f="array"),"string"===f?this.parse(s(o)||n._default):"array"===f?(u(l.rgba.props,(function(t,e){d[e.idx]=i(o[e.idx],e)})),this):"object"===f?(u(l,o instanceof h?function(t,e){o[e.cache]&&(p[e.cache]=o[e.cache].slice())}:function(e,s){var n=s.cache;u(s.props,(function(t,e){if(!p[n]&&s.to){if("alpha"===t||null==o[t])return;p[n]=s.to(p._rgba)}p[n][e.idx]=i(o[t],e,!0)})),p[n]&&t.inArray(null,p[n].slice(0,3))<0&&(p[n][3]=1,s.from&&(p._rgba=s.from(p[n])))}),this):void 0},is:function(t){var e=h(t),i=!0,s=this;return u(l,(function(t,o){var n,r=e[o.cache];return r&&(n=s[o.cache]||o.to&&o.to(s._rgba)||[],u(o.props,(function(t,e){if(null!=r[e.idx])return i=r[e.idx]===n[e.idx]}))),i})),i},_space:function(){var t=[],e=this;return u(l,(function(i,s){e[s.cache]&&t.push(i)})),t.pop()},transition:function(t,e){var s=h(t),o=s._space(),n=l[o],r=0===this.alpha()?h("transparent"):this,a=r[n.cache]||n.to(r._rgba),p=a.slice();return s=s[n.cache],u(n.props,(function(t,o){var n=o.idx,r=a[n],h=s[n],l=c[o.type]||{};null!==h&&(null===r?p[n]=h:(l.mod&&(h-r>l.mod/2?r+=l.mod:r-h>l.mod/2&&(r-=l.mod)),p[n]=i((h-r)*e+r,o)))})),this[o](p)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),o=h(e)._rgba;return h(t.map(i,(function(t,e){return(1-s)*o[e]+s*t})))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,(function(t,e){return null==t?e>2?1:0:t}));return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),(function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t}));return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,(function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,l.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,o=t[1]/255,n=t[2]/255,r=t[3],a=Math.max(s,o,n),h=Math.min(s,o,n),l=a-h,c=a+h,p=.5*c;return e=h===a?0:s===a?60*(o-n)/l+360:o===a?60*(n-s)/l+120:60*(s-o)/l+240,i=0===l?0:p<=.5?l/c:l/(2-c),[Math.round(e)%360,i,p,null==r?1:r]},l.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],r=s<=.5?s*(1+i):s+i-s*i,a=2*s-r;return[Math.round(255*o(a,r,e+1/3)),Math.round(255*o(a,r,e)),Math.round(255*o(a,r,e-1/3)),n]},u(l,(function(s,o){var n=o.props,a=o.cache,l=o.to,c=o.from;h.fn[s]=function(s){if(l&&!this[a]&&(this[a]=l(this._rgba)),s===e)return this[a].slice();var o,r=t.type(s),p="array"===r||"object"===r?s:arguments,f=this[a].slice();return u(n,(function(t,e){var s=p["object"===r?t:e.idx];null==s&&(s=f[e.idx]),f[e.idx]=i(s,e)})),c?((o=h(c(f)))[a]=f,o):h(f)},u(n,(function(e,i){h.fn[e]||(h.fn[e]=function(o){var n,a=t.type(o),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(o=o.call(this,c),a=t.type(o)),null==o&&i.empty?this:("string"===a&&(n=r.exec(o))&&(o=c+parseFloat(n[2])*("+"===n[1]?1:-1)),l[i.idx]=o,this[h](l)))})}))})),h.hook=function(e){var i=e.split(" ");u(i,(function(e,i){t.cssHooks[i]={set:function(e,o){var n,r,a="";if("transparent"!==o&&("string"!==t.type(o)||(n=s(o)))){if(o=h(n||o),!p.rgba&&1!==o._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&r&&r.style;)try{a=t.css(r,"backgroundColor"),r=r.parentNode}catch(t){}o=o.blend(a&&"transparent"!==a?a:"_default")}o=o.toRgbaString()}try{e.style[i]=o}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}}))},h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return u(["Top","Right","Bottom","Left"],(function(i,s){e["border"+s+"Color"]=t})),e}},n=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(h),function(){function e(e){var i,s,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,n={};if(o&&o.length&&o[0]&&o[o[0]])for(s=o.length;s--;)"string"==typeof o[i=o[s]]&&(n[t.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(n[i]=o[i]);return n}var i=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(h.style(t.elem,i,t.end),t.setAttr=!0)}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,n,r,a){var h=t.speed(n,r,a);return this.queue((function(){var n,r=t(this),a=r.attr("class")||"",l=h.children?r.find("*").addBack():r;l=l.map((function(){return{el:t(this),start:e(this)}})),(n=function(){t.each(i,(function(t,e){o[e]&&r[e+"Class"](o[e])}))})(),l=l.map((function(){return this.end=e(this.el[0]),this.diff=function(e,i){var o,n,r={};for(o in i)n=i[o],e[o]!==n&&(s[o]||!t.fx.step[o]&&isNaN(parseFloat(n))||(r[o]=n));return r}(this.start,this.end),this})),r.attr("class",a),l=l.map((function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()})),t.when.apply(t,l.get()).done((function(){n(),t.each(arguments,(function(){var e=this.el;t.each(this.diff,(function(t){e.css(t,"")}))})),h.complete.call(r[0])}))}))},t.fn.extend({addClass:function(e){return function(i,s,o,n){return s?t.effects.animateClass.call(this,{add:i},s,o,n):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,o,n){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,o,n):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,o,n,r){return"boolean"==typeof s||void 0===s?o?t.effects.animateClass.call(this,s?{add:i}:{remove:i},o,n,r):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,o,n)}}(t.fn.toggleClass),switchClass:function(e,i,s,o,n){return t.effects.animateClass.call(this,{add:i,remove:e},s,o,n)}})}(),function(){function e(e,i,s,o){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(o=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(o=s,s=i,i={}),t.isFunction(s)&&(o=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=o||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(a)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(n+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,o=e.length;s<o;s++)null!==e[s]&&(i=t.data(n+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return e.wrap(s),(e[0]===n||t.contains(e[0],n))&&t(n).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*s,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(r,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(r)||"",t.removeData(r)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),o=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(n+"placeholder",i)),e.css({position:s,left:o.left,top:o.top}),i},removePlaceholder:function(t){var e=n+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,o){return o=o||{},t.each(i,(function(t,i){var n=e.cssUnit(i);n[0]>0&&(o[i]=n[0]*s+n[1])})),o}}),t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=p.shift(),!1===t.uiBackCompat||n?"none"===s.mode?(r[c](),i()):o.call(r[0],s,(function(){r.removeData(a),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),i()})):(r.is(":hidden")?"hide"===c:"show"===c)?(r[c](),i()):o.call(r[0],s,i)}var s=e.apply(this,arguments),o=t.effects.effect[s.effect],n=o.mode,r=s.queue,h=r||"fx",l=s.complete,c=s.mode,p=[],f=function(e){var i=t(this),s=t.effects.mode(i,c)||n;i.data(a,!0),p.push(s),n&&("show"===s||s===n&&"hide"===s)&&i.show(),n&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!o?c?this[c](s.duration,l):this.each((function(){l&&l.call(this)})):!1===r?this.each(f).each(i):this.queue(h,f).queue(h,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],(function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])})),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),o=t(e.to),n="fixed"===o.css("position"),r=t("body"),a=n?r.scrollTop():0,h=n?r.scrollLeft():0,l=o.offset(),c={top:l.top-a,left:l.left-h,height:o.innerHeight(),width:o.innerWidth()},p=s.offset(),f=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:p.top-a,left:p.left-h,height:s.innerHeight(),width:s.innerWidth(),position:n?"fixed":"absolute"}).animate(c,e.duration,e.easing,(function(){f.remove(),t.isFunction(i)&&i()}))}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),f={},t.each(["Quad","Cubic","Quart","Quint","Expo"],(function(t,e){f[e]=function(e){return Math.pow(e,t+2)}})),t.extend(f,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(f,(function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}})),l=t.effects,t.effects.define("blind","hide",(function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=t(this),n=e.direction||"up",r=o.cssClip(),a={clip:t.extend({},r)},h=t.effects.createPlaceholder(o);a.clip[s[n][0]]=a.clip[s[n][1]],"show"===e.mode&&(o.cssClip(a.clip),h&&h.css(t.effects.clipToBox(a)),a.clip=r),h&&h.animate(t.effects.clipToBox(a),e.duration,e.easing),o.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("bounce",(function(e,i){var s,o,n,r=t(this),a=e.mode,h="hide"===a,l="show"===a,c=e.direction||"up",p=e.distance,f=e.times||5,u=2*f+(l||h?1:0),d=e.duration/u,g=e.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,_=0,b=r.queue().length;for(t.effects.createPlaceholder(r),n=r.css(m),p||(p=r["top"===m?"outerHeight":"outerWidth"]()/3),l&&((o={opacity:1})[m]=n,r.css("opacity",0).css(m,v?2*-p:2*p).animate(o,d,g)),h&&(p/=Math.pow(2,f-1)),(o={})[m]=n;_<f;_++)(s={})[m]=(v?"-=":"+=")+p,r.animate(s,d,g).animate(o,d,g),p=h?2*p:p/2;h&&((s={opacity:0})[m]=(v?"-=":"+=")+p,r.animate(s,d,g)),r.queue(i),t.effects.unshift(r,b,u+1)})),t.effects.define("drop","hide",(function(e,i){var s,o=t(this),n="show"===e.mode,r=e.direction||"left",a="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",l="+="===h?"-=":"+=",c={opacity:0};t.effects.createPlaceholder(o),s=e.distance||o["top"===a?"outerHeight":"outerWidth"](!0)/2,c[a]=h+s,n&&(o.css(c),c[a]=l+s,c.opacity=1),o.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fade","toggle",(function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fold","hide",(function(e,i){var s=t(this),o=e.mode,n="show"===o,r="hide"===o,a=e.size||15,h=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,p=t.effects.createPlaceholder(s),f=s.cssClip(),u={clip:t.extend({},f)},d={clip:t.extend({},f)},g=[f[l[0]],f[l[1]]],m=s.queue().length;h&&(a=parseInt(h[1],10)/100*g[r?0:1]),u.clip[l[0]]=a,d.clip[l[0]]=a,d.clip[l[1]]=0,n&&(s.cssClip(d.clip),p&&p.css(t.effects.clipToBox(d)),d.clip=f),s.queue((function(i){p&&p.animate(t.effects.clipToBox(u),c,e.easing).animate(t.effects.clipToBox(d),c,e.easing),i()})).animate(u,c,e.easing).animate(d,c,e.easing).queue(i),t.effects.unshift(s,m,4)})),t.effects.define("highlight","show",(function(e,i){var s=t(this),o={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("size",(function(e,i){var s,o,n,r=t(this),a=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,p="effect"!==c,f=e.scale||"both",u=e.origin||["middle","center"],d=r.css("position"),g=r.position(),m=t.effects.scaledDimensions(r),v=e.from||m,_=e.to||t.effects.scaledDimensions(r,0);t.effects.createPlaceholder(r),"show"===c&&(n=v,v=_,_=n),o={from:{y:v.height/m.height,x:v.width/m.width},to:{y:_.height/m.height,x:_.width/m.width}},"box"!==f&&"both"!==f||(o.from.y!==o.to.y&&(v=t.effects.setTransition(r,h,o.from.y,v),_=t.effects.setTransition(r,h,o.to.y,_)),o.from.x!==o.to.x&&(v=t.effects.setTransition(r,l,o.from.x,v),_=t.effects.setTransition(r,l,o.to.x,_))),"content"!==f&&"both"!==f||o.from.y!==o.to.y&&(v=t.effects.setTransition(r,a,o.from.y,v),_=t.effects.setTransition(r,a,o.to.y,_)),u&&(s=t.effects.getBaseline(u,m),v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left,_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left),r.css(v),"content"!==f&&"both"!==f||(h=h.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),r.find("*[width]").each((function(){var i=t(this),s=t.effects.scaledDimensions(i),n={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},r={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x};o.from.y!==o.to.y&&(n=t.effects.setTransition(i,h,o.from.y,n),r=t.effects.setTransition(i,h,o.to.y,r)),o.from.x!==o.to.x&&(n=t.effects.setTransition(i,l,o.from.x,n),r=t.effects.setTransition(i,l,o.to.x,r)),p&&t.effects.saveStyle(i),i.css(n),i.animate(r,e.duration,e.easing,(function(){p&&t.effects.restoreStyle(i)}))}))),r.animate(_,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=r.offset();0===_.opacity&&r.css("opacity",v.opacity),p||(r.css("position","static"===d?"relative":d).offset(e),t.effects.saveStyle(r)),i()}})})),t.effects.define("scale",(function(e,i){var s=t(this),o=e.mode,n=parseInt(e.percent,10)||(0===parseInt(e.percent,10)||"effect"!==o?0:100),r=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,n,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(r.from.opacity=1,r.to.opacity=0),t.effects.effect.size.call(this,r,i)})),t.effects.define("puff","hide",(function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)})),t.effects.define("pulsate","show",(function(e,i){var s=t(this),o=e.mode,n="show"===o,r=n||"hide"===o,a=2*(e.times||5)+(r?1:0),h=e.duration/a,l=0,c=1,p=s.queue().length;for(!n&&s.is(":visible")||(s.css("opacity",0).show(),l=1);c<a;c++)s.animate({opacity:l},h,e.easing),l=1-l;s.animate({opacity:l},h,e.easing),s.queue(i),t.effects.unshift(s,p,a+1)})),t.effects.define("shake",(function(e,i){var s=1,o=t(this),n=e.direction||"left",r=e.distance||20,a=e.times||3,h=2*a+1,l=Math.round(e.duration/h),c="up"===n||"down"===n?"top":"left",p="up"===n||"left"===n,f={},u={},d={},g=o.queue().length;for(t.effects.createPlaceholder(o),f[c]=(p?"-=":"+=")+r,u[c]=(p?"+=":"-=")+2*r,d[c]=(p?"-=":"+=")+2*r,o.animate(f,l,e.easing);s<a;s++)o.animate(u,l,e.easing).animate(d,l,e.easing);o.animate(u,l,e.easing).animate(f,l/2,e.easing).queue(i),t.effects.unshift(o,g,h+1)})),t.effects.define("slide","show",(function(e,i){var s,o,n=t(this),r={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,p=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),f={};t.effects.createPlaceholder(n),s=n.cssClip(),o=n.position()[l],f[l]=(c?-1:1)*p+o,f.clip=n.cssClip(),f.clip[r[h][1]]=f.clip[r[h][0]],"show"===a&&(n.cssClip(f.clip),n.css(l,f[l]),f.clip=s,f[l]=o),n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),!1!==t.uiBackCompat&&(l=t.effects.define("transfer",(function(e,i){t(this).transfer(e,i)})))})); })(this);
// 3rdParty/jquery-ui/touchPunch.js
-(function (window, undefined) { !function(t){var o,e,u,n;function c(o,t){var e,u;1<o.originalEvent.touches.length||(o.preventDefault(),e=o.originalEvent.changedTouches[0],(u=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u))}t.support.touch="ontouchend"in document,t.support.touch&&(o=t.ui.mouse.prototype,e=o._mouseInit,u=o._mouseDestroy,o._touchStart=function(o){!n&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,c(o,"mouseover"),c(o,"mousemove"),c(o,"mousedown"))},o._touchMove=function(o){n&&(this._touchMoved=!0,c(o,"mousemove"))},o._touchEnd=function(o){n&&(c(o,"mouseup"),c(o,"mouseout"),this._touchMoved||c(o,"click"),n=!1)},o._mouseInit=function(){var o=this;o.element.bind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),e.call(o)},o._mouseDestroy=function(){var o=this;o.element.unbind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),u.call(o)})}(jQuery); })(this);
+(function (window, undefined) { !function(o){function t(o,t){if(!(o.originalEvent.touches.length>1)){o.preventDefault();var e=o.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u)}}if(o.support.touch="ontouchend"in document,o.support.touch){var e,u=o.ui.mouse.prototype,n=u._mouseInit,c=u._mouseDestroy;u._touchStart=function(o){!e&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,t(o,"mouseover"),t(o,"mousemove"),t(o,"mousedown"))},u._touchMove=function(o){e&&(this._touchMoved=!0,t(o,"mousemove"))},u._touchEnd=function(o){e&&(t(o,"mouseup"),t(o,"mouseout"),this._touchMoved||t(o,"click"),e=!1)},u._mouseInit=function(){var t=this;t.element.bind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),n.call(t)},u._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),c.call(t)}}}(jQuery); })(this);
// 3rdParty/jquery-ui/nestedSortable.js
-(function (window, undefined) { !function(f){f.widget("mjs.nestedSortable",f.extend({},f.ui.sortable.prototype,{options:{tabSize:20,disableNesting:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",doNotClear:!1,listType:"ol",maxLevels:0,protectRoot:!1,rootID:null,rtl:!1,isAllowed:function(t,e){return!0}},_create:function(){if(this.element.data("sortable",this.element.data("nestedSortable")),!this.element.is(this.options.listType))throw new Error("nestedSortable: Please check the listType option is set to your actual list type");return f.ui.sortable.prototype._create.apply(this,arguments)},destroy:function(){return this.element.removeData("nestedSortable").unbind(".nestedSortable"),f.ui.sortable.prototype.destroy.apply(this,arguments)},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);var e,s=this.options;this.options.scroll&&(e=!1,this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-f(document).scrollTop()<s.scrollSensitivity?e=f(document).scrollTop(f(document).scrollTop()-s.scrollSpeed):f(window).height()-(t.pageY-f(document).scrollTop())<s.scrollSensitivity&&(e=f(document).scrollTop(f(document).scrollTop()+s.scrollSpeed)),t.pageX-f(document).scrollLeft()<s.scrollSensitivity?e=f(document).scrollLeft(f(document).scrollLeft()-s.scrollSpeed):f(window).width()-(t.pageX-f(document).scrollLeft())<s.scrollSensitivity&&(e=f(document).scrollLeft(f(document).scrollLeft()+s.scrollSpeed))),!1!==e&&f.ui.ddmanager&&!s.dropBehaviour&&f.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute");var i=this.placeholder.offset().top;this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var o=this.items.length-1;0<=o;o--){var r=this.items[o],l=r.item[0],n=this._intersectsWithPointer(r);if(n&&!(l==this.currentItem[0]||this.placeholder[1==n?"next":"prev"]()[0]==l||f.contains(this.placeholder[0],l)||"semi-dynamic"==this.options.type&&f.contains(this.element[0],l))){if(f(l).mouseenter(),this.direction=1==n?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(r))break;f(l).mouseleave(),this._rearrange(t,r),this._clearEmpty(l),this._trigger("change",t,this._uiHash());break}}var h=this.placeholder[0].parentNode.parentNode&&f(this.placeholder[0].parentNode.parentNode).closest(".ui-sortable").length?f(this.placeholder[0].parentNode.parentNode):null,a=this._getLevel(this.placeholder),p=this._getChildLevels(this.helper),c=this.placeholder[0].previousSibling?f(this.placeholder[0].previousSibling):null;if(null!=c)for(;"li"!=c[0].nodeName.toLowerCase()||c[0]==this.currentItem[0]||c[0]==this.helper[0];){if(!c[0].previousSibling){c=null;break}c=f(c[0].previousSibling)}var d=this.placeholder[0].nextSibling?f(this.placeholder[0].nextSibling):null;if(null!=d)for(;"li"!=d[0].nodeName.toLowerCase()||d[0]==this.currentItem[0]||d[0]==this.helper[0];){if(!d[0].nextSibling){d=null;break}d=f(d[0].nextSibling)}var u=document.createElement(s.listType);return this.beyondMaxLevels=0,null!=h&&null==d&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()>h.offset().left+h.outerWidth()||!s.rtl&&this.positionAbs.left<h.offset().left)?(h.after(this.placeholder[0]),this._clearEmpty(h[0]),this._trigger("change",t,this._uiHash())):null!=c&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()<c.offset().left+c.outerWidth()-s.tabSize||!s.rtl&&this.positionAbs.left>c.offset().left+s.tabSize)?(this._isAllowed(c,a,a+p+1),c.children(s.listType).length||c[0].appendChild(u),i&&i<=c.offset().top?c.children(s.listType).prepend(this.placeholder):c.children(s.listType)[0].appendChild(this.placeholder[0]),this._trigger("change",t,this._uiHash())):this._isAllowed(h,a,a+p),this._contactContainers(t),f.ui.ddmanager&&f.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){this.beyondMaxLevels&&(this.placeholder.removeClass(this.options.errorClass),this.domPosition.prev?f(this.domPosition.prev).after(this.placeholder):f(this.domPosition.parent).prepend(this.placeholder),this._trigger("revert",t,this._uiHash()));for(var s=this.items.length-1;0<=s;s--){var i=this.items[s].item[0];this._clearEmpty(i)}f.ui.sortable.prototype._mouseStop.apply(this,arguments)},serialize:function(t){var s=f.extend({},this.options,t),e=this._getItemsAsjQuery(s&&s.connected),i=[];return f(e).each(function(){var t=(f(s.item||this).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/),e=(f(s.item||this).parent(s.listType).parent(s.items).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/);t&&i.push((s.key||t[1])+"["+(s.key&&s.expression?t[1]:t[2])+"]="+(e?s.key&&s.expression?e[1]:e[2]:s.rootID))}),!i.length&&s.key&&i.push(s.key+"="),i.join("&")},toHierarchy:function(t){var o=f.extend({},this.options,t),e=(o.startDepthCount,[]);return f(this.element).children(o.items).each(function(){var t=function e(t){var s=(f(t).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/);if(s){var i={id:s[2]};return 0<f(t).children(o.listType).children(o.items).length&&(i.children=[],f(t).children(o.listType).children(o.items).each(function(){var t=e(this);i.children.push(t)})),i}}(this);e.push(t)}),e},toArray:function(t){var h=f.extend({},this.options,t),a=h.startDepthCount||0,p=[],e=2;return p.push({item_id:h.rootID,parent_id:"none",depth:a,left:"1",right:2*(f(h.items,this.element).length+1)}),f(this.element).children(h.items).each(function(){e=function t(e,s,i){var o,r,l=i+1;0<f(e).children(h.listType).children(h.items).length&&(s++,f(e).children(h.listType).children(h.items).each(function(){l=t(f(this),s,l)}),s--);o=f(e).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/);{var n;r=s===a+1?h.rootID:(n=f(e).parent(h.listType).parent(h.items).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/),n[2])}o&&p.push({item_id:o[2],parent_id:r,depth:s,left:i,right:l});i=l+1;return i}(this,a+1,e)}),p=p.sort(function(t,e){return t.left-e.left})},_clearEmpty:function(t){var e=f(t).children(this.options.listType);!e.length||e.children().length||this.options.doNotClear||e.remove()},_getLevel:function(t){var e=1;if(this.options.listType)for(var s=t.closest(this.options.listType);s&&0<s.length&&!s.is(".ui-sortable");)e++,s=s.parent().closest(this.options.listType);return e},_getChildLevels:function(t,s){var i=this,e=this.options,o=0;return s=s||0,f(t).children(e.listType).children(e.items).each(function(t,e){o=Math.max(i._getChildLevels(e,s+1),o)}),s?o+1:o},_isAllowed:function(t,e,s){var i=this.options,o=!!f(this.domPosition.parent).hasClass("ui-sortable"),r=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels");!i.isAllowed(this.currentItem,t)||t&&t.hasClass(i.disableNesting)||i.protectRoot&&(null==t&&!o||o&&1<e)?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=r<s&&0!=r?s-r:1):r<s&&0!=r?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=s-r):(this.placeholder.removeClass(i.errorClass),this.beyondMaxLevels=0)}})),f.mjs.nestedSortable.prototype.options=f.extend({},f.ui.sortable.prototype.options,f.mjs.nestedSortable.prototype.options)}(jQuery); })(this);
+(function (window, undefined) { !function(t){t.widget("mjs.nestedSortable",t.extend({},t.ui.sortable.prototype,{options:{tabSize:20,disableNesting:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",doNotClear:!1,listType:"ol",maxLevels:0,protectRoot:!1,rootID:null,rtl:!1,isAllowed:function(t,e){return!0}},_create:function(){if(this.element.data("sortable",this.element.data("nestedSortable")),!this.element.is(this.options.listType))throw new Error("nestedSortable: Please check the listType option is set to your actual list type");return t.ui.sortable.prototype._create.apply(this,arguments)},destroy:function(){return this.element.removeData("nestedSortable").unbind(".nestedSortable"),t.ui.sortable.prototype.destroy.apply(this,arguments)},_mouseDrag:function(e){var s,i,o,l,r,n,h,a,p,c,d,u,f;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),s=this.options,this.options.scroll&&(i=!1,this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-t(document).scrollTop()<s.scrollSensitivity?i=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(i=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed)),e.pageX-t(document).scrollLeft()<s.scrollSensitivity?i=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(i=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed))),!1!==i&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),o=this.placeholder.offset().top,this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),l=this.items.length-1;l>=0;l--)if(n=(r=this.items[l]).item[0],(h=this._intersectsWithPointer(r))&&!(n==this.currentItem[0]||this.placeholder[1==h?"next":"prev"]()[0]==n||t.contains(this.placeholder[0],n)||"semi-dynamic"==this.options.type&&t.contains(this.element[0],n))){if(t(n).mouseenter(),this.direction=1==h?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(r))break;t(n).mouseleave(),this._rearrange(e,r),this._clearEmpty(n),this._trigger("change",e,this._uiHash());break}if(a=this.placeholder[0].parentNode.parentNode&&t(this.placeholder[0].parentNode.parentNode).closest(".ui-sortable").length?t(this.placeholder[0].parentNode.parentNode):null,p=this._getLevel(this.placeholder),c=this._getChildLevels(this.helper),null!=(d=this.placeholder[0].previousSibling?t(this.placeholder[0].previousSibling):null))for(;"li"!=d[0].nodeName.toLowerCase()||d[0]==this.currentItem[0]||d[0]==this.helper[0];){if(!d[0].previousSibling){d=null;break}d=t(d[0].previousSibling)}if(null!=(u=this.placeholder[0].nextSibling?t(this.placeholder[0].nextSibling):null))for(;"li"!=u[0].nodeName.toLowerCase()||u[0]==this.currentItem[0]||u[0]==this.helper[0];){if(!u[0].nextSibling){u=null;break}u=t(u[0].nextSibling)}return f=document.createElement(s.listType),this.beyondMaxLevels=0,null!=a&&null==u&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()>a.offset().left+a.outerWidth()||!s.rtl&&this.positionAbs.left<a.offset().left)?(a.after(this.placeholder[0]),this._clearEmpty(a[0]),this._trigger("change",e,this._uiHash())):null!=d&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()<d.offset().left+d.outerWidth()-s.tabSize||!s.rtl&&this.positionAbs.left>d.offset().left+s.tabSize)?(this._isAllowed(d,p,p+c+1),d.children(s.listType).length||d[0].appendChild(f),o&&o<=d.offset().top?d.children(s.listType).prepend(this.placeholder):d.children(s.listType)[0].appendChild(this.placeholder[0]),this._trigger("change",e,this._uiHash())):this._isAllowed(a,p,p+c),this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,s){var i,o;for(this.beyondMaxLevels&&(this.placeholder.removeClass(this.options.errorClass),this.domPosition.prev?t(this.domPosition.prev).after(this.placeholder):t(this.domPosition.parent).prepend(this.placeholder),this._trigger("revert",e,this._uiHash())),i=this.items.length-1;i>=0;i--)o=this.items[i].item[0],this._clearEmpty(o);t.ui.sortable.prototype._mouseStop.apply(this,arguments)},serialize:function(e){var s=t.extend({},this.options,e),i=this._getItemsAsjQuery(s&&s.connected),o=[];return t(i).each((function(){var e=(t(s.item||this).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/),i=(t(s.item||this).parent(s.listType).parent(s.items).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/);e&&o.push((s.key||e[1])+"["+(s.key&&s.expression?e[1]:e[2])+"]="+(i?s.key&&s.expression?i[1]:i[2]:s.rootID))})),!o.length&&s.key&&o.push(s.key+"="),o.join("&")},toHierarchy:function(e){function s(e){var o,l=(t(e).attr(i.attribute||"id")||"").match(i.expression||/(.+)[-=_](.+)/);if(l)return o={id:l[2]},t(e).children(i.listType).children(i.items).length>0&&(o.children=[],t(e).children(i.listType).children(i.items).each((function(){var t=s(this);o.children.push(t)}))),o}var i=t.extend({},this.options,e),o=(i.startDepthCount,[]);return t(this.element).children(i.items).each((function(){var t=s(this);o.push(t)})),o},toArray:function(e){function s(e,r,n){var h,a,p=n+1;return t(e).children(i.listType).children(i.items).length>0&&(r++,t(e).children(i.listType).children(i.items).each((function(){p=s(t(this),r,p)})),r--),h=t(e).attr(i.attribute||"id").match(i.expression||/(.+)[-=_](.+)/),a=r===o+1?i.rootID:t(e).parent(i.listType).parent(i.items).attr(i.attribute||"id").match(i.expression||/(.+)[-=_](.+)/)[2],h&&l.push({item_id:h[2],parent_id:a,depth:r,left:n,right:p}),n=p+1}var i=t.extend({},this.options,e),o=i.startDepthCount||0,l=[],r=2;return l.push({item_id:i.rootID,parent_id:"none",depth:o,left:"1",right:2*(t(i.items,this.element).length+1)}),t(this.element).children(i.items).each((function(){r=s(this,o+1,r)})),l=l.sort((function(t,e){return t.left-e.left}))},_clearEmpty:function(e){var s=t(e).children(this.options.listType);!s.length||s.children().length||this.options.doNotClear||s.remove()},_getLevel:function(t){var e,s=1;if(this.options.listType)for(e=t.closest(this.options.listType);e&&e.length>0&&!e.is(".ui-sortable");)s++,e=e.parent().closest(this.options.listType);return s},_getChildLevels:function(e,s){var i=this,o=this.options,l=0;return s=s||0,t(e).children(o.listType).children(o.items).each((function(t,e){l=Math.max(i._getChildLevels(e,s+1),l)})),s?l+1:l},_isAllowed:function(e,s,i){var o=this.options,l=!!t(this.domPosition.parent).hasClass("ui-sortable"),r=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels");!o.isAllowed(this.currentItem,e)||e&&e.hasClass(o.disableNesting)||o.protectRoot&&(null==e&&!l||l&&s>1)?(this.placeholder.addClass(o.errorClass),this.beyondMaxLevels=r<i&&0!=r?i-r:1):r<i&&0!=r?(this.placeholder.addClass(o.errorClass),this.beyondMaxLevels=i-r):(this.placeholder.removeClass(o.errorClass),this.beyondMaxLevels=0)}})),t.mjs.nestedSortable.prototype.options=t.extend({},t.ui.sortable.prototype.options,t.mjs.nestedSortable.prototype.options)}(jQuery); })(this);
// 3rdParty/polyfill/focus-visible.js
-(function (window, undefined) { function applyFocusVisiblePolyfill(t){var i=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function u(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function e(e){i=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(i=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(e){e.metaKey||e.altKey||e.ctrlKey||(s(t.activeElement)&&u(t.activeElement),i=!0)},!0),document.addEventListener("mousedown",e,!0),document.addEventListener("pointerdown",e,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("visibilitychange",function(e){"hidden"==document.visibilityState&&(n&&(i=!0),a())},!0),a(),t.addEventListener("focus",function(e){var t,n,o;s(e.target)&&(i||(t=e.target,n=t.type,"INPUT"==(o=t.tagName)&&d[n]&&!t.readOnly||("TEXTAREA"==o&&!t.readOnly||!!t.isContentEditable)))&&u(e.target)},!0),t.addEventListener("blur",function(e){var t;s(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1,window.clearTimeout(o)},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}if("undefined"!=typeof window&&"undefined"!=typeof document){var event;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{event=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(event=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(event)}"undefined"!=typeof document&&applyFocusVisiblePolyfill(document); })(this);
+(function (window, undefined) { function applyFocusVisiblePolyfill(e){function t(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function n(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function o(e){s=!1}function i(){document.addEventListener("mousemove",d),document.addEventListener("mousedown",d),document.addEventListener("mouseup",d),document.addEventListener("pointermove",d),document.addEventListener("pointerdown",d),document.addEventListener("pointerup",d),document.addEventListener("touchmove",d),document.addEventListener("touchstart",d),document.addEventListener("touchend",d)}function d(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(s=!1,document.removeEventListener("mousemove",d),document.removeEventListener("mousedown",d),document.removeEventListener("mouseup",d),document.removeEventListener("pointermove",d),document.removeEventListener("pointerdown",d),document.removeEventListener("pointerup",d),document.removeEventListener("touchmove",d),document.removeEventListener("touchstart",d),document.removeEventListener("touchend",d))}var s=!0,u=!1,a=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};document.addEventListener("keydown",(function(o){o.metaKey||o.altKey||o.ctrlKey||(t(e.activeElement)&&n(e.activeElement),s=!0)}),!0),document.addEventListener("mousedown",o,!0),document.addEventListener("pointerdown",o,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("visibilitychange",(function(e){"hidden"==document.visibilityState&&(u&&(s=!0),i())}),!0),i(),e.addEventListener("focus",(function(e){var o,i,d;t(e.target)&&(s||(o=e.target,i=o.type,"INPUT"==(d=o.tagName)&&c[i]&&!o.readOnly||"TEXTAREA"==d&&!o.readOnly||o.isContentEditable))&&n(e.target)}),!0),e.addEventListener("blur",(function(e){var n;t(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(u=!0,window.clearTimeout(a),a=window.setTimeout((function(){u=!1,window.clearTimeout(a)}),100),(n=e.target).hasAttribute("data-focus-visible-added")&&(n.classList.remove("focus-visible"),n.removeAttribute("data-focus-visible-added")))}),!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}if("undefined"!=typeof window&&"undefined"!=typeof document){var event;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{event=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(event=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(event)}"undefined"!=typeof document&&applyFocusVisiblePolyfill(document); })(this);
// WCF.Assets.js
-(function (window, undefined) { !function(){var o=!1,a=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(e){function t(){!o&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;o=!0;var n=new this;for(var r in o=!1,e)n[r]="function"==typeof e[r]&&"function"==typeof i[r]&&a.test(e[r])?function(n,r){return function(){var e=this._super;this._super=i[n];var t=r.apply(this,arguments);return this._super=e,t}}(r,e[r]):e[r];return((t.prototype=n).constructor=t).extend=arguments.callee,t}}(),function(u,r){"use strict";function s(){}function o(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;n<r;n++)t.call(e,e[n],n)}}function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==r&&null!==t&&n===e}function a(e){return t("Function",e)}function l(e){return t("Array",e)}function c(e){(e=e||s)._done||(e(),e._done=1)}function i(e){var t,n,r,i,o,a={};if("object"==typeof e)for(t in e)e[t]&&(a={name:t,url:e[t]});else a={name:(r=e.split("/"),i=r[r.length-1],-1!==(o=i.indexOf("?"))?i.substring(0,o):i),url:e};return(n=y[a.name])&&n.url===a.url?n:y[a.name]=a}function p(e){for(var t in e=e||y)if(e.hasOwnProperty(t)&&e[t].state!==k)return;return 1}function d(t){t.state===r&&(t.state=A,t.onpreload=[],n({url:t.url,type:"cache"},function(){var e;(e=t).state=x,o(e.onpreload,function(e){e.call()})}))}function f(e,t){t=t||s,e.state!==k?e.state!==L?e.state!==A?(e.state=L,n(e,function(){e.state=k,t(),o(w[e.name],function(e){c(e)}),g&&p()&&o(w.ALL,function(e){c(e)})})):e.onpreload.push(function(){f(e,t)}):O.ready(e.name,t):t()}function n(r,t){function e(e){e=e||u.event,o.onload=o.onreadystatechange=o.onerror=null,t()}function i(e){("load"===(e=e||u.event).type||/loaded|complete/.test(o.readyState)&&(!v.documentMode||v.documentMode<9))&&(u.clearTimeout(r.errorTimeout),u.clearTimeout(r.cssTimeout),o.onload=o.onreadystatechange=o.onerror=null,t())}var o,n,a,l;t=t||s,a=r.url,"css"===(l=(a=a||"").split("?")[0].split("."))[l.length-1].toLowerCase()?((o=v.createElement("link")).type="text/"+(r.type||"css"),o.rel="stylesheet",o.href=r.url,r.cssRetries=0,r.cssTimeout=u.setTimeout(function e(){if(r.state!==k&&r.cssRetries<=20){for(var t=0,n=v.styleSheets.length;t<n;t++)if(v.styleSheets[t].href===o.href)return void i({type:"load"});r.cssRetries++,r.cssTimeout=u.setTimeout(e,250)}},500)):((o=v.createElement("script")).type="text/"+(r.type||"javascript"),o.src=r.url),o.onload=o.onreadystatechange=i,o.onerror=e,o.async=!1,o.defer=!1,r.errorTimeout=u.setTimeout(function(){e({type:"timeout"})},6e4),(n=v.head||v.getElementsByTagName("head")[0]).insertBefore(o,n.lastChild)}function e(){if(!v.body)return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(e,50));g||(g=!0,function(){for(var e,t=v.getElementsByTagName("script"),n=0,r=t.length;n<r;n++)if(e=t[n].getAttribute("data-headjs-load"))return O.load(e)}(),o(b,function(e){c(e)}))}function h(){v.addEventListener?(v.removeEventListener("DOMContentLoaded",h,!1),e()):"complete"===v.readyState&&(v.detachEvent("onreadystatechange",h),e())}var g,m,v=u.document,b=[],w={},y={},T="async"in v.createElement("script")||"MozAppearance"in v.documentElement.style||u.opera,E=u.head_conf&&u.head_conf.head||"head",O=u[E]=u[E]||function(){O.ready.apply(null,arguments)},A=1,x=2,L=3,k=4;if("complete"===v.readyState)e();else if(v.addEventListener)v.addEventListener("DOMContentLoaded",h,!1),u.addEventListener("load",e,!1);else{v.attachEvent("onreadystatechange",h),u.attachEvent("onload",e),m=!1;try{m=!u.frameElement&&v.documentElement}catch(e){}m&&m.doScroll&&function t(){if(!g){try{m.doScroll("left")}catch(e){return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(t,50))}e()}}()}O.load=O.js=T?function(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):(o(e,function(e){e!==t&&(e=i(e),n[e.name]=e)}),o(e,function(e){e!==t&&f(e=i(e),function(){p(n)&&c(t)})})),O}:function(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),r=n[0];return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):r?(o(n,function(e){a(e)||!e||d(i(e))}),f(i(e[0]),a(r)?r:function(){O.load.apply(null,n)})):f(i(e[0])),O},O.test=function(e,t,n,r){var i="object"==typeof e?e:{test:e,success:!!t&&(l(t)?t:[t]),failure:!!n&&(l(n)?n:[n]),callback:r||s},o=!!i.test;return o&&i.success?(i.success.push(i.callback),O.load.apply(null,i.success)):o||!i.failure?r():(i.failure.push(i.callback),O.load.apply(null,i.failure)),O},O.ready=function(e,t){var n,r,i;return e===v?(g?c(t):b.push(t),O):(a(e)&&(t=e,e="ALL"),l(e)?(n={},o(e,function(e){n[e]=y[e],O.ready(e,function(){p(n)&&c(t)})}),O):"string"==typeof e&&a(t)?((r=y[e])&&r.state===k||"ALL"===e&&p()&&g?c(t):(i=w[e])?i.push(t):i=w[e]=[t],O):O)},O.ready(v,function(){p()&&o(w.ALL,function(e){c(e)}),O.feature&&O.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(oe){var ae="left",le="right",ue="up",se="down",ce="in",pe="out",de="none",fe="auto",he="swipe",ge="pinch",me="tap",ve="doubletap",be="longtap",we="horizontal",ye="vertical",Te="all",Ee=10,Oe="start",Ae="move",xe="end",Le="cancel",ke="ontouchstart"in window,Se=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,Ce=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,Me="TouchSwipe";function r(e,v){var t=ke||Ce||!v.fallbackToMouseEvents,n=t?Ce?Se?"MSPointerDown":"pointerdown":"touchstart":"mousedown",r=t?Ce?Se?"MSPointerMove":"pointermove":"touchmove":"mousemove",i=t?Ce?Se?"MSPointerUp":"pointerup":"touchend":"mouseup",o=t?null:"mouseleave",a=Ce?Se?"MSPointerCancel":"pointercancel":"touchcancel",b=0,w=null,y=0,T=0,E=0,O=1,A=0,x=0,L=null,l=oe(e),k="start",S=0,C=null,u=0,M=0,s=0,c=0,p=0,d=null,N=null;try{l.bind(n,f),l.bind(a,m)}catch(e){oe.error("events not supported "+n+","+a+" on jQuery.swipe")}function f(e){if(!0!==l.data(Me+"_intouch")&&!(0<oe(e.target).closest(v.excludedElements,l).length)){var t,n,r=e.originalEvent?e.originalEvent:e,i=ke?r.touches[0]:r;return(k=Oe,ke?S=r.touches.length:e.preventDefault(),x=w=null,O=1,A=E=T=y=b=0,C=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),(n={})[ae]=te(ae),n[le]=te(le),n[ue]=te(ue),n[se]=te(se),L=n,Z(),!ke||S===v.fingers||v.fingers===Te||q()?($(0,i),u=ie(),2==S&&($(1,r.touches[1]),T=E=re(C[0].start,C[1].start)),(v.swipeStatus||v.pinchStatus)&&(t=F(r,k))):t=!1,!1===t)?(F(r,k=Le),t):(v.hold&&(N=setTimeout(oe.proxy(function(){l.trigger("hold",[r.target]),v.hold&&(t=v.hold.call(l,r,r.target))},this),v.longTapThreshold)),K(!0),null)}}function h(e){var t,n,r,i,o,a,l,u,s,c,p,d,f,h,g,m=e.originalEvent?e.originalEvent:e;k===xe||k===Le||G()||(n=J(ke?m.touches[0]:m),M=ie(),ke&&(S=m.touches.length),v.hold&&clearTimeout(N),k=Ae,2==S&&(0==T?($(1,m.touches[1]),T=E=re(C[0].start,C[1].start)):(J(m.touches[1]),E=re(C[0].end,C[1].end),C[0].end,C[1].end,x=O<1?pe:ce),O=(E/T*1).toFixed(2),A=Math.abs(T-E)),S===v.fingers||v.fingers===Te||!ke||q()?(f=n.start,h=n.end,g=function(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);o<0&&(o=360-Math.abs(o));return o}(f,h),function(e,t){if(v.allowPageScroll===de||q())e.preventDefault();else{var n=v.allowPageScroll===fe;switch(t){case ae:(v.swipeLeft&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case le:(v.swipeRight&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case ue:(v.swipeUp&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault();break;case se:(v.swipeDown&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault()}}}(e,w=g<=45&&0<=g||g<=360&&315<=g?ae:135<=g&&g<=225?le:45<g&&g<135?se:ue),p=n.start,d=n.end,b=Math.round(Math.sqrt(Math.pow(d.x-p.x,2)+Math.pow(d.y-p.y,2))),y=ne(),s=w,c=b,c=Math.max(c,ee(s)),L[s].distance=c,(v.swipeStatus||v.pinchStatus)&&(t=F(m,k)),v.triggerOnTouchEnd&&!v.triggerOnTouchLeave||(r=!0,v.triggerOnTouchLeave&&(i={left:(u=(l=oe(l=this)).offset()).left,right:u.left+l.outerWidth(),top:u.top,bottom:u.top+l.outerHeight()},o=n.end,a=i,r=o.x>a.left&&o.x<a.right&&o.y>a.top&&o.y<a.bottom),!v.triggerOnTouchEnd&&r?k=D(Ae):v.triggerOnTouchLeave&&!r&&(k=D(xe)),k!=Le&&k!=xe||F(m,k))):F(m,k=Le),!1===t&&F(m,k=Le))}function g(e){var t=e.originalEvent;return ke&&0<t.touches.length?(s=ie(),c=event.touches.length+1,!0):(G()&&(S=c),M=ie(),y=ne(),_()||!R()?F(t,k=Le):v.triggerOnTouchEnd||0==v.triggerOnTouchEnd&&k===Ae?(e.preventDefault(),F(t,k=xe)):!v.triggerOnTouchEnd&&Y()?z(t,k=xe,me):k===Ae&&F(t,k=Le),K(!1),null)}function m(){E=T=u=M=S=0,Z(),K(!(O=1))}function I(e){var t=e.originalEvent;v.triggerOnTouchLeave&&F(t,k=D(xe))}function P(){l.unbind(n,f),l.unbind(a,m),l.unbind(r,h),l.unbind(i,g),o&&l.unbind(o,I),K(!1)}function D(e){var t=e,n=j(),r=R(),i=_();return!n||i?t=Le:!r||e!=Ae||v.triggerOnTouchEnd&&!v.triggerOnTouchLeave?!r&&e==xe&&v.triggerOnTouchLeave&&(t=Le):t=xe,t}function F(e,t){var n=void 0;return U()&&H()||H()?n=z(e,t,he):(V()&&q()||q())&&!1!==n&&(n=z(e,t,ge)),W()&&B()&&!1!==n?n=z(e,t,ve):y>v.longTapThreshold&&b<Ee&&v.longTap&&!1!==n?n=z(e,t,be):1!==S&&ke||!(isNaN(b)||b<v.threshold)||!Y()||!1===n||(n=z(e,t,me)),t===Le&&m(),t!==xe||ke&&0!=e.touches.length||m(),n}function z(e,t,n){var r=void 0;if(n==he){if(l.trigger("swipeStatus",[t,w||null,b||0,y||0,S,C]),v.swipeStatus&&!1===(r=v.swipeStatus.call(l,e,t,w||null,b||0,y||0,S,C)))return!1;if(t==xe&&U()){if(l.trigger("swipe",[w,b,y,S,C]),v.swipe&&!1===(r=v.swipe.call(l,e,w,b,y,S,C)))return!1;switch(w){case ae:l.trigger("swipeLeft",[w,b,y,S,C]),v.swipeLeft&&(r=v.swipeLeft.call(l,e,w,b,y,S,C));break;case le:l.trigger("swipeRight",[w,b,y,S,C]),v.swipeRight&&(r=v.swipeRight.call(l,e,w,b,y,S,C));break;case ue:l.trigger("swipeUp",[w,b,y,S,C]),v.swipeUp&&(r=v.swipeUp.call(l,e,w,b,y,S,C));break;case se:l.trigger("swipeDown",[w,b,y,S,C]),v.swipeDown&&(r=v.swipeDown.call(l,e,w,b,y,S,C))}}}if(n==ge){if(l.trigger("pinchStatus",[t,x||null,A||0,y||0,S,O,C]),v.pinchStatus&&!1===(r=v.pinchStatus.call(l,e,t,x||null,A||0,y||0,S,O,C)))return!1;if(t==xe&&V())switch(x){case ce:l.trigger("pinchIn",[x||null,A||0,y||0,S,O,C]),v.pinchIn&&(r=v.pinchIn.call(l,e,x||null,A||0,y||0,S,O,C));break;case pe:l.trigger("pinchOut",[x||null,A||0,y||0,S,O,C]),v.pinchOut&&(r=v.pinchOut.call(l,e,x||null,A||0,y||0,S,O,C))}}return n==me?t!==Le&&t!==xe||(clearTimeout(d),clearTimeout(N),B()&&!W()?(p=ie(),d=setTimeout(oe.proxy(function(){p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target))},this),v.doubleTapThreshold)):(p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target)))):n==ve?t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("doubletap",[e.target]),v.doubleTap&&(r=v.doubleTap.call(l,e,e.target))):n==be&&(t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("longtap",[e.target]),v.longTap&&(r=v.longTap.call(l,e,e.target)))),r}function R(){var e=!0;return null!==v.threshold&&(e=b>=v.threshold),e}function _(){var e=!1;return null!==v.cancelThreshold&&null!==w&&(e=ee(w)-b>=v.cancelThreshold),e}function j(){var e=!v.maxTimeThreshold||!(y>=v.maxTimeThreshold);return e}function V(){var e=X(),t=Q(),n=null===v.pinchThreshold||A>=v.pinchThreshold;return e&&t&&n}function q(){return v.pinchStatus||v.pinchIn||v.pinchOut}function U(){var e=j(),t=R(),n=X(),r=Q();return!_()&&r&&n&&t&&e}function H(){return v.swipe||v.swipeStatus||v.swipeLeft||v.swipeRight||v.swipeUp||v.swipeDown}function X(){return S===v.fingers||v.fingers===Te||!ke}function Q(){return 0!==C[0].end.x}function Y(){return v.tap}function B(){return!!v.doubleTap}function W(){if(null==p)return!1;var e=ie();return B()&&e-p<=v.doubleTapThreshold}function Z(){c=s=0}function G(){var e=!1;return s&&ie()-s<=v.fingerReleaseThreshold&&(e=!0),e}function K(e){!0===e?(l.bind(r,h),l.bind(i,g),o&&l.bind(o,I)):(l.unbind(r,h,!1),l.unbind(i,g,!1),o&&l.unbind(o,I,!1)),l.data(Me+"_intouch",!0===e)}function $(e,t){var n=void 0!==t.identifier?t.identifier:0;return C[e].identifier=n,C[e].start.x=C[e].end.x=t.pageX||t.clientX,C[e].start.y=C[e].end.y=t.pageY||t.clientY,C[e]}function J(e){var t=function(e){for(var t=0;t<C.length;t++)if(C[t].identifier==e)return C[t]}(void 0!==e.identifier?e.identifier:0);return t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function ee(e){if(L[e])return L[e].distance}function te(e){return{direction:e,distance:0}}function ne(){return M-u}function re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function ie(){return(new Date).getTime()}this.enable=function(){return l.bind(n,f),l.bind(a,m),l},this.disable=function(){return P(),l},this.destroy=function(){return P(),l.data(Me,null),l},this.option=function(e,t){if(void 0!==v[e]){if(void 0===t)return v[e];v[e]=t}else oe.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}oe.fn.swipe=function(e){var t=oe(this),n=t.data(Me);if(n&&"string"==typeof e){if(n[e])return n[e].apply(this,Array.prototype.slice.call(arguments,1));oe.error("Method "+e+" does not exist on jQuery.swipe")}else if(!(n||"object"!=typeof e&&e))return function(n){!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=de);void 0!==n.click&&void 0===n.tap&&(n.tap=n.click);n=n||{};return n=oe.extend({},oe.fn.swipe.defaults,n),this.each(function(){var e=oe(this),t=e.data(Me);t||(t=new r(this,n),e.data(Me,t))})}.apply(this,arguments);return t},oe.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"},oe.fn.swipe.phases={PHASE_START:Oe,PHASE_MOVE:Ae,PHASE_END:xe,PHASE_CANCEL:Le},oe.fn.swipe.directions={LEFT:ae,RIGHT:le,UP:ue,DOWN:se,IN:ce,OUT:pe},oe.fn.swipe.pageScroll={NONE:de,HORIZONTAL:we,VERTICAL:ye,AUTO:fe},oe.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:Te}}),function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(d){var t={init:function(){var p=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each(function(){function e(){for(var e=0;e<p.length;e++)i.css(p[e],r.css(p[e]))}function t(){var e=r.val().replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/\n/g,"<br/>");i.html(e+" ").css({width:parseInt(r.width(),10)+"px"}),n()}function n(){var e=i.height(),t="hidden",n=o?e+u+a:e+u;c<n?(n=c,t="auto"):n<s&&(n=s),r.height()!==n&&r.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var r=d(this).css({resize:"none",overflow:"hidden"}),i=d("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);e();var o="border-box"==r.css("box-sizing")||"border-box"==r.css("-moz-box-sizing")||"border-box"==r.css("-webkit-box-sizing"),a=parseInt(r.css("border-top-width"))+parseInt(r.css("padding-top"))+parseInt(r.css("padding-bottom"))+parseInt(r.css("border-bottom-width")),l=parseInt(r.css("height"),10),u=parseInt(r.css("line-height"),10)||parseInt(r.css("font-size"),10),s=l<2*u?2*u:l,c=-1<parseInt(r.css("max-height"),10)?parseInt(r.css("max-height"),10):Number.MAX_VALUE;r.bind("keyup change cut paste",function(){t()}),d(window).bind("resize",function(){i.width()!==parseInt(r.width(),10)&&t()}),r.bind("blur",function(){n()}),r.bind("updateHeight",function(){e(),t()}),d(function(){t()})})}};d.fn.flexible=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void d.error("Method "+e+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery),function(e,p,n,t){"use strict";function d(e,t){for(var n=0,r=e.length;n<r;n++)o(e[n],t)}function f(t){return function(e){Y(e)&&(o(e,t),d(e.querySelectorAll(C),t))}}function h(e){var t=e.getAttribute("is"),n=e.nodeName.toUpperCase(),r=N.call(k,t?A+t.toUpperCase():O+n);return t&&-1<r&&!g(n,t)?-1:r}function g(e,t){return-1<C.indexOf(e+'[is="'+t+'"]')}function l(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;!oe||i&&i!==t||!t.attributeChangedCallback||"style"===r||t.attributeChangedCallback(r,n===e[u]?null:e.prevValue,n===e[c]?null:e.newValue)}function m(e){var t=f(e);return function(e){ee.push(t,e.target)}}function v(e){ie&&(ie=!1,e.currentTarget.removeEventListener(E,v)),d((e.target||p).querySelectorAll(C),e.detail===w?w:b),Q&&function(){for(var e,t=0,n=B.length;t<n;t++)e=B[t],M.contains(e)||(B.splice(t,1),o(e,w))}()}function r(e,t){Z.call(this,e,t),ae.call(this,{target:this})}function i(e,t){U(e,t),se?se.observe(e,$):(re&&(e.setAttribute=r,e[a]=ue(e),e.addEventListener("DOMSubtreeModified",ae)),e.addEventListener(T,l)),e.createdCallback&&oe&&(e.created=!0,e.createdCallback(),e.created=!1)}function o(e,t){var n,r=h(e);-1<r&&(ce(e,S[r]),r=0,t!==b||e[b]?t!==w||e[w]||(e[b]=!1,e[w]=!0,r=1):(e[w]=!1,e[b]=!0,r=1,Q&&N.call(B,e)<0&&B.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}var a,b,w,y,u,s,c,T,E,O,A,x,L,k,S,C,M,N,I,P,D,F,z,R,_,j,V,q,U,H,X,Q,Y,B,W,Z,G,K,$,J,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,pe,de,fe;function he(e){var t=new CustomEvent(T,{bubbles:!0});t.attrName=e,t.prevValue=this.getAttribute(e),t.newValue=null,t[c]=t.attrChange=2,G.call(this,e),this.dispatchEvent(t)}function ge(e,t){var n=this.hasAttribute(e),r=n&&this.getAttribute(e),i=new CustomEvent(T,{bubbles:!0});Z.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[s]=i.attrChange=1:i[u]=i.attrChange=0,this.dispatchEvent(i)}function me(e){var t,n=e.currentTarget,r=n[a],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(T,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[u]=t.attrChange=0:t[s]=t.attrChange=1,n.dispatchEvent(t))}t in p||(a="__"+t+(1e5*Math.random()>>0),b="attached",w="detached",y="extends",u="ADDITION",s="MODIFICATION",c="REMOVAL",T="DOMAttrModified",E="DOMContentLoaded",O="<",A="=",x=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,L=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],k=[],S=[],C="",M=p.documentElement,N=k.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},I=n.prototype,P=I.hasOwnProperty,D=I.isPrototypeOf,F=n.defineProperty,z=n.getOwnPropertyDescriptor,R=n.getOwnPropertyNames,_=n.getPrototypeOf,j=n.setPrototypeOf,V=!!n.__proto__,q=n.create||function e(t){return t?(e.prototype=t,new e):this},U=j||(V?function(e,t){return e.__proto__=t,e}:R&&z?function(e,t){for(;function(e,t){for(var n,r=R(t),i=0,o=r.length;i<o;i++)n=r[i],P.call(e,n)||F(e,n,z(t,n))}(e,t),(t=_(t))&&!D.call(t,e););return e}:function(e,t){for(var n in t)e[n]=t[n];return e}),H=e.MutationObserver||e.WebKitMutationObserver,X=(e.HTMLElement||e.Element||e.Node).prototype,Q=!D.call(X,M),Y=Q?function(e){return 1===e.nodeType}:function(e){return D.call(X,e)},B=Q&&[],W=X.cloneNode,Z=X.setAttribute,G=X.removeAttribute,K=p.createElement,$=H&&{attributes:!0,characterData:!0,attributeOldValue:!0},J=H||function(e){re=!1,M.removeEventListener(T,J)},te=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,10)},oe=ie=re=!(ne=!1),fe=j||V?(ce=function(e,t){D.call(t,e)||i(e,t)},i):ce=function(e,t){e[a]||(e[a]=n(!0),i(e,t))},Q?(re=!1,pe=z(X,"addEventListener"),de=pe.value,pe.value=function(e,t,n){e===T&&this.attributeChangedCallback&&this.setAttribute!==ge&&(this[a]={className:{name:"class",value:this.className}},this.setAttribute=ge,this.removeAttribute=he,de.call(this,"propertychange",me)),de.call(this,e,t,n)},F(X,"addEventListener",pe)):H||(M.addEventListener(T,J),M.setAttribute(a,1),M.removeAttribute(a),re&&(ae=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[a],i[a]=n=ue(i),n){if(!(r in t))return le(0,i,r,t[r],n[r],u);if(n[r]!==t[r])return le(1,i,r,t[r],n[r],s)}for(r in t)if(!(r in n))return le(2,i,r,t[r],n[r],c)}},le=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,l(a)},ue=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),p[t]=function(e,t){function o(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}var a,l,n=e.toUpperCase();if(ne||(ne=!0,H?(a=f(b),l=f(w),(se=new H(function(e){for(var t,n,r=0,i=e.length;r<i;r++)"childList"===(t=e[r]).type?(o(t.addedNodes,a),o(t.removedNodes,l)):(n=t.target,oe&&n.attributeChangedCallback&&"style"!==t.attributeName&&n.attributeChangedCallback(t.attributeName,t.oldValue,n.getAttribute(t.attributeName)))})).observe(p,{childList:!0,subtree:!0})):(ee=[],te(function e(){for(;ee.length;)ee.shift().call(null,ee.shift());te(e)}),p.addEventListener("DOMNodeInserted",m(b)),p.addEventListener("DOMNodeRemoved",m(w))),p.addEventListener(E,v),p.addEventListener("readystatechange",v),p.createElement=function(e,t){var n=K.apply(p,arguments),r=""+e,i=N.call(k,(t?A:O)+(t||r).toUpperCase()),o=-1<i;return t&&(n.setAttribute("is",t=t.toLowerCase()),o=o&&g(r.toUpperCase(),t)),oe=!p.createElement.innerHTMLHelper,o&&fe(n,S[i]),n},X.cloneNode=function(e){var t=W.call(this,!!e),n=h(t);return-1<n&&fe(t,S[n]),e&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],fe(t,S[h(t)])}(t.querySelectorAll(C)),t}),-2<N.call(k,A+n)+N.call(k,O+n))throw new Error("A "+e+" type is already registered");if(!x.test(n)||-1<N.call(L,n))throw new Error("The type "+e+" is invalid");function r(){return u?p.createElement(s,n):p.createElement(s)}var n,i=t||I,u=P.call(i,y),s=u?t[y].toUpperCase():n,c=k.push((u?A:O)+n)-1;return C=C.concat(C.length?",":"",u?s+'[is="'+e.toLowerCase()+'"]':s),r.prototype=S[c]=P.call(i,"prototype")?i.prototype:q(X),d(p.querySelectorAll(C),b),r})}(window,document,Object,"registerElement"),function(h,i,g){"use strict";function m(){return h.performance!==g&&h.performance.now!==g?h.performance.now():Date.now()}function v(e){return.5*(1-Math.cos(Math.PI*e))}function o(e){if("object"!=typeof e||e.behavior===g||"auto"===e.behavior||"instant"===e.behavior)return 1;if("smooth"!==e.behavior)throw new TypeError(e.behavior+" is not a valid value for enumeration ScrollBehavior")}function n(o,a){var l=h.scrollX||h.pageXOffset,u=h.scrollY||h.pageYOffset,s=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t=(m()-s)/w,n=v(t=1<t?1:t),r=l+(o-l)*n,i=u+(a-u)*n;return c(r,i),r===o&&i===a?(l=u=s=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}function a(u,e){if(u===i.documentElement||u===i.body)return n(e.left,e.top),g;var s=u.scrollLeft,c=u.scrollTop,p=e.left,d=e.top,f=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t,n,r,i=(m()-f)/w,o=v(i=1<i?1:i),a=s+(p-s)*o,l=c+(d-c)*o;return n=a,r=l,(t=u).scrollTop=r,t.scrollLeft=n,a===p&&l===d?(s=c=f=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}var b,w,c,r,l;"scrollBehavior"in i.documentElement.style||(w=768,c=h.scrollTo,r=h.scrollBy,l=h.Element.prototype.scrollIntoView,h.scroll=h.scrollTo=function(){return o(arguments[0])?c.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):n.call(h,~~arguments[0].left,~~arguments[0].top)},h.scrollBy=function(){if(o(arguments[0]))return r.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]);var e=h.scrollX||h.pageXOffset,t=h.scrollY||h.pageYOffset;return n(~~arguments[0].left+e,~~arguments[0].top+t)},Element.prototype.scrollIntoView=function(){var e,t,n,r;return o(arguments[0])?l.call(this,arguments[0]||!0):(r=h.getComputedStyle(i.body,null),t=parseInt(r.getPropertyValue("padding-left"),10),n=parseInt(r.getPropertyValue("padding-top"),10),e={top:this.offsetTop-2*n,left:this.offsetLeft-2*t},a(i.body,e))})}(window,document); })(this);
+(function (window, undefined) { !function(){var e=!1,t=/xyz/.test((function(){xyz}))?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function r(){!e&&this.init&&this.init.apply(this,arguments)}var i,o,a=this.prototype;for(o in e=!0,i=new this,e=!1,n)i[o]="function"==typeof n[o]&&"function"==typeof a[o]&&t.test(n[o])?function(e,t){return function(){var n,r=this._super;return this._super=a[e],n=t.apply(this,arguments),this._super=r,n}}(o,n[o]):n[o];return r.prototype=i,r.prototype.constructor=r,r.extend=arguments.callee,r}}(),function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;n<r;n++)t.call(e,e[n],n)}}function i(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function o(e){return i("Function",e)}function a(e){return i("Array",e)}function l(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function u(e){(e=e||n)._done||(e(),e._done=1)}function s(e){var t,n,r={};if("object"==typeof e)for(t in e)!e[t]||(r={name:t,url:e[t]});else r={name:l(e),url:e};return(n=T[r.name])&&n.url===r.url?n:(T[r.name]=r,r)}function c(e){for(var t in e=e||T)if(e.hasOwnProperty(t)&&e[t].state!==P)return!1;return!0}function d(e){e.state===t&&(e.state=L,e.onpreload=[],h({url:e.url,type:"cache"},(function(){!function(e){e.state=O,r(e.onpreload,(function(e){e.call()}))}(e)})))}function p(e,t){t=t||n,e.state!==P?e.state!==M?e.state!==L?(e.state=M,h(e,(function(){e.state=P,t(),r(m[e.name],(function(e){u(e)})),v&&c()&&r(m.ALL,(function(e){u(e)}))}))):e.onpreload.push((function(){p(e,t)})):S.ready(e.name,t):t()}function h(t,r){function i(t){t=t||e.event,a.onload=a.onreadystatechange=a.onerror=null,r()}function o(n){("load"===(n=n||e.event).type||/loaded|complete/.test(a.readyState)&&(!y.documentMode||y.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),a.onload=a.onreadystatechange=a.onerror=null,r())}var a,l;r=r||n,"css"===function(e){var t=(e=e||"").split("?")[0].split(".");return t[t.length-1].toLowerCase()}(t.url)?((a=y.createElement("link")).type="text/"+(t.type||"css"),a.rel="stylesheet",a.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout((function n(){if(t.state!==P&&t.cssRetries<=20){for(var r=0,i=y.styleSheets.length;r<i;r++)if(y.styleSheets[r].href===a.href)return void o({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(n,250)}}),500)):((a=y.createElement("script")).type="text/"+(t.type||"javascript"),a.src=t.url),a.onload=a.onreadystatechange=o,a.onerror=i,a.async=!1,a.defer=!1,t.errorTimeout=e.setTimeout((function(){i({type:"timeout"})}),6e4),(l=y.head||y.getElementsByTagName("head")[0]).insertBefore(a,l.lastChild)}function f(){if(!y.body)return e.clearTimeout(S.readyTimeout),void(S.readyTimeout=e.setTimeout(f,50));v||(v=!0,function(){for(var e,t=y.getElementsByTagName("script"),n=0,r=t.length;n<r;n++)if(e=t[n].getAttribute("data-headjs-load"))return void S.load(e)}(),r(b,(function(e){u(e)})))}function g(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",g,!1),f()):"complete"===y.readyState&&(y.detachEvent("onreadystatechange",g),f())}var v,w,y=e.document,b=[],m={},T={},x="async"in y.createElement("script")||"MozAppearance"in y.documentElement.style||e.opera,E=e.head_conf&&e.head_conf.head||"head",S=e[E]=e[E]||function(){S.ready.apply(null,arguments)},L=1,O=2,M=3,P=4;if("complete"===y.readyState)f();else if(y.addEventListener)y.addEventListener("DOMContentLoaded",g,!1),e.addEventListener("load",f,!1);else{y.attachEvent("onreadystatechange",g),e.attachEvent("onload",f),w=!1;try{w=!e.frameElement&&y.documentElement}catch(e){}w&&w.doScroll&&function t(){if(!v){try{w.doScroll("left")}catch(n){return e.clearTimeout(S.readyTimeout),void(S.readyTimeout=e.setTimeout(t,50))}f()}}()}S.load=S.js=x?function(){var e=arguments,t=e[e.length-1],n={};return o(t)||(t=null),a(e[0])?(e[0].push(t),S.load.apply(null,e[0]),S):(r(e,(function(e){e!==t&&(e=s(e),n[e.name]=e)})),r(e,(function(e){e!==t&&p(e=s(e),(function(){c(n)&&u(t)}))})),S)}:function(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),i=n[0];return o(t)||(t=null),a(e[0])?(e[0].push(t),S.load.apply(null,e[0]),S):(i?(r(n,(function(e){o(e)||!e||d(s(e))})),p(s(e[0]),o(i)?i:function(){S.load.apply(null,n)})):p(s(e[0])),S)},S.test=function(e,t,r,i){var o="object"==typeof e?e:{test:e,success:!!t&&(a(t)?t:[t]),failure:!!r&&(a(r)?r:[r]),callback:i||n},l=!!o.test;return l&&o.success?(o.success.push(o.callback),S.load.apply(null,o.success)):l||!o.failure?i():(o.failure.push(o.callback),S.load.apply(null,o.failure)),S},S.ready=function(e,t){var n,i,l;return e===y?(v?u(t):b.push(t),S):(o(e)&&(t=e,e="ALL"),a(e)?(n={},r(e,(function(e){n[e]=T[e],S.ready(e,(function(){c(n)&&u(t)}))})),S):"string"==typeof e&&o(t)?(i=T[e])&&i.state===P||"ALL"===e&&c()&&v?(u(t),S):((l=m[e])?l.push(t):l=m[e]=[t],S):S)},S.ready(y,(function(){c()&&r(m.ALL,(function(e){u(e)})),S.feature&&S.feature("domloaded",!0)}))}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}((function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=s),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each((function(){var r=e(this),i=r.data(M);i||(i=new n(this,t),r.data(M,i))}))}function n(t,n){function P(t){var l,u,s;if(!0!==me.data(M+"_intouch")&&!(e(t.target).closest(n.excludedElements,me).length>0))return l=t.originalEvent?t.originalEvent:t,s=S?l.touches[0]:l,Te=m,S?xe=l.touches.length:t.preventDefault(),de=0,pe=null,ye=null,he=0,fe=0,ge=0,ve=1,we=0,Ee=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),be=function(){var e={};return e[r]=te(r),e[i]=te(i),e[o]=te(o),e[a]=te(a),e}(),G(),!S||xe===n.fingers||n.fingers===y||Q()?(K(0,s),Se=ie(),2==xe&&(K(1,l.touches[1]),fe=ge=re(Ee[0].start,Ee[1].start)),(n.swipeStatus||n.pinchStatus)&&(u=z(l,Te))):u=!1,!1===u?(z(l,Te=E),u):(n.hold&&(Ie=setTimeout(e.proxy((function(){me.trigger("hold",[l.target]),n.hold&&(u=n.hold.call(me,l,l.target))}),this),n.longTapThreshold)),J(!0),null)}function A(t){var d,p,h,f,g=t.originalEvent?t.originalEvent:t;Te===x||Te===E||Z()||(p=$(S?g.touches[0]:g),Le=ie(),S&&(xe=g.touches.length),n.hold&&clearTimeout(Ie),Te=T,2==xe&&(0==fe?(K(1,g.touches[1]),fe=ge=re(Ee[0].start,Ee[1].start)):($(g.touches[1]),ge=re(Ee[0].end,Ee[1].end),Ee[0].end,Ee[1].end,ye=ve<1?u:l),ve=function(e,t){return(t/e*1).toFixed(2)}(fe,ge),we=Math.abs(fe-ge)),xe===n.fingers||n.fingers===y||!S||Q()?(function(e,t){if(n.allowPageScroll===s||Q())e.preventDefault();else{var l=n.allowPageScroll===c;switch(t){case r:(n.swipeLeft&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case i:(n.swipeRight&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case o:(n.swipeUp&&l||!l&&n.allowPageScroll!=w)&&e.preventDefault();break;case a:(n.swipeDown&&l||!l&&n.allowPageScroll!=w)&&e.preventDefault()}}}(t,pe=function(e,t){var n=function(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);o<0&&(o=360-Math.abs(o));return o}(e,t);return n<=45&&n>=0||n<=360&&n>=315?r:n>=135&&n<=225?i:n>45&&n<135?a:o}(p.start,p.end)),de=function(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}(p.start,p.end),he=ne(),function(e,t){t=Math.max(t,ee(e)),be[e].distance=t}(pe,de),(n.swipeStatus||n.pinchStatus)&&(d=z(g,Te)),n.triggerOnTouchEnd&&!n.triggerOnTouchLeave||(h=!0,n.triggerOnTouchLeave&&(f=function(t){var n=(t=e(t)).offset();return{left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()}}(this),h=function(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}(p.end,f)),!n.triggerOnTouchEnd&&h?Te=R(T):n.triggerOnTouchLeave&&!h&&(Te=R(x)),Te!=E&&Te!=x||z(g,Te))):z(g,Te=E),!1===d&&z(g,Te=E))}function I(e){var t=e.originalEvent;return S&&t.touches.length>0?(Oe=ie(),Me=event.touches.length+1,!0):(Z()&&(xe=Me),Le=ie(),he=ne(),U()||!N()?z(t,Te=E):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Te===T?(e.preventDefault(),z(t,Te=x)):!n.triggerOnTouchEnd&&Y()?_(t,Te=x,h):Te===T&&z(t,Te=E),J(!1),null)}function k(){xe=0,Le=0,Se=0,fe=0,ge=0,ve=1,G(),J(!1)}function D(e){var t=e.originalEvent;n.triggerOnTouchLeave&&z(t,Te=R(x))}function j(){me.unbind(ae,P),me.unbind(ce,k),me.unbind(le,A),me.unbind(ue,I),se&&me.unbind(se,D),J(!1)}function R(e){var t=e,r=C(),i=N(),o=U();return!r||o?t=E:!i||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==x&&n.triggerOnTouchLeave&&(t=E):t=x,t}function z(e,t){var r=void 0;return X()&&B()||B()?r=_(e,t,d):(H()&&Q()||Q())&&!1!==r&&(r=_(e,t,p)),V()&&q()&&!1!==r?r=_(e,t,f):he>n.longTapThreshold&&de<b&&n.longTap&&!1!==r?r=_(e,t,g):1!==xe&&S||!(isNaN(de)||de<n.threshold)||!Y()||!1===r||(r=_(e,t,h)),t===E&&k(),t===x&&(S?0==e.touches.length&&k():k()),r}function _(t,s,c){var v=void 0;if(c==d){if(me.trigger("swipeStatus",[s,pe||null,de||0,he||0,xe,Ee]),n.swipeStatus&&!1===(v=n.swipeStatus.call(me,t,s,pe||null,de||0,he||0,xe,Ee)))return!1;if(s==x&&X()){if(me.trigger("swipe",[pe,de,he,xe,Ee]),n.swipe&&!1===(v=n.swipe.call(me,t,pe,de,he,xe,Ee)))return!1;switch(pe){case r:me.trigger("swipeLeft",[pe,de,he,xe,Ee]),n.swipeLeft&&(v=n.swipeLeft.call(me,t,pe,de,he,xe,Ee));break;case i:me.trigger("swipeRight",[pe,de,he,xe,Ee]),n.swipeRight&&(v=n.swipeRight.call(me,t,pe,de,he,xe,Ee));break;case o:me.trigger("swipeUp",[pe,de,he,xe,Ee]),n.swipeUp&&(v=n.swipeUp.call(me,t,pe,de,he,xe,Ee));break;case a:me.trigger("swipeDown",[pe,de,he,xe,Ee]),n.swipeDown&&(v=n.swipeDown.call(me,t,pe,de,he,xe,Ee))}}}if(c==p){if(me.trigger("pinchStatus",[s,ye||null,we||0,he||0,xe,ve,Ee]),n.pinchStatus&&!1===(v=n.pinchStatus.call(me,t,s,ye||null,we||0,he||0,xe,ve,Ee)))return!1;if(s==x&&H())switch(ye){case l:me.trigger("pinchIn",[ye||null,we||0,he||0,xe,ve,Ee]),n.pinchIn&&(v=n.pinchIn.call(me,t,ye||null,we||0,he||0,xe,ve,Ee));break;case u:me.trigger("pinchOut",[ye||null,we||0,he||0,xe,ve,Ee]),n.pinchOut&&(v=n.pinchOut.call(me,t,ye||null,we||0,he||0,xe,ve,Ee))}}return c==h?s!==E&&s!==x||(clearTimeout(Ae),clearTimeout(Ie),q()&&!V()?(Pe=ie(),Ae=setTimeout(e.proxy((function(){Pe=null,me.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(me,t,t.target))}),this),n.doubleTapThreshold)):(Pe=null,me.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(me,t,t.target)))):c==f?s!==E&&s!==x||(clearTimeout(Ae),Pe=null,me.trigger("doubletap",[t.target]),n.doubleTap&&(v=n.doubleTap.call(me,t,t.target))):c==g&&(s!==E&&s!==x||(clearTimeout(Ae),Pe=null,me.trigger("longtap",[t.target]),n.longTap&&(v=n.longTap.call(me,t,t.target)))),v}function N(){var e=!0;return null!==n.threshold&&(e=de>=n.threshold),e}function U(){var e=!1;return null!==n.cancelThreshold&&null!==pe&&(e=ee(pe)-de>=n.cancelThreshold),e}function C(){return!n.maxTimeThreshold||!(he>=n.maxTimeThreshold)}function H(){var e=F(),t=W(),r=null===n.pinchThreshold||we>=n.pinchThreshold;return e&&t&&r}function Q(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function X(){var e=C(),t=N(),n=F(),r=W(),i=U(),o=!i&&r&&n&&t&&e;return o}function B(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function F(){return xe===n.fingers||n.fingers===y||!S}function W(){return 0!==Ee[0].end.x}function Y(){return!!n.tap}function q(){return!!n.doubleTap}function V(){if(null==Pe)return!1;var e=ie();return q()&&e-Pe<=n.doubleTapThreshold}function G(){Oe=0,Me=0}function Z(){var e=!1;return Oe&&ie()-Oe<=n.fingerReleaseThreshold&&(e=!0),e}function J(e){!0===e?(me.bind(le,A),me.bind(ue,I),se&&me.bind(se,D)):(me.unbind(le,A,!1),me.unbind(ue,I,!1),se&&me.unbind(se,D,!1)),me.data(M+"_intouch",!0===e)}function K(e,t){var n=void 0!==t.identifier?t.identifier:0;return Ee[e].identifier=n,Ee[e].start.x=Ee[e].end.x=t.pageX||t.clientX,Ee[e].start.y=Ee[e].end.y=t.pageY||t.clientY,Ee[e]}function $(e){var t=void 0!==e.identifier?e.identifier:0,n=function(e){for(var t=0;t<Ee.length;t++)if(Ee[t].identifier==e)return Ee[t]}(t);return n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function ee(e){if(be[e])return be[e].distance}function te(e){return{direction:e,distance:0}}function ne(){return Le-Se}function re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function ie(){return(new Date).getTime()}var oe=S||O||!n.fallbackToMouseEvents,ae=oe?O?L?"MSPointerDown":"pointerdown":"touchstart":"mousedown",le=oe?O?L?"MSPointerMove":"pointermove":"touchmove":"mousemove",ue=oe?O?L?"MSPointerUp":"pointerup":"touchend":"mouseup",se=oe?null:"mouseleave",ce=O?L?"MSPointerCancel":"pointercancel":"touchcancel",de=0,pe=null,he=0,fe=0,ge=0,ve=1,we=0,ye=0,be=null,me=e(t),Te="start",xe=0,Ee=null,Se=0,Le=0,Oe=0,Me=0,Pe=0,Ae=null,Ie=null;try{me.bind(ae,P),me.bind(ce,k)}catch(t){e.error("events not supported "+ae+","+ce+" on jQuery.swipe")}this.enable=function(){return me.bind(ae,P),me.bind(ce,k),me},this.disable=function(){return j(),me},this.destroy=function(){return j(),me.data(M,null),me},this.option=function(t,r){if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else e.error("Option "+t+" does not exist on jQuery.swipe.options");return null}}var r="left",i="right",o="up",a="down",l="in",u="out",s="none",c="auto",d="swipe",p="pinch",h="tap",f="doubletap",g="longtap",v="horizontal",w="vertical",y="all",b=10,m="start",T="move",x="end",E="cancel",S="ontouchstart"in window,L=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,O=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,M="TouchSwipe",P={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(n){var r=e(this),i=r.data(M);if(i&&"string"==typeof n){if(i[n])return i[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(i||"object"!=typeof n&&n))return t.apply(this,arguments);return r},e.fn.swipe.defaults=P,e.fn.swipe.phases={PHASE_START:m,PHASE_MOVE:T,PHASE_END:x,PHASE_CANCEL:E},e.fn.swipe.directions={LEFT:r,RIGHT:i,UP:o,DOWN:a,IN:l,OUT:u},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:v,VERTICAL:w,AUTO:c},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:y}})),function(e){var t={init:function(){var t=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each((function(){function n(){for(var e=0;e<t.length;e++)a.css(t[e],o.css(t[e]))}function r(){var e=o.val().replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/\n/g,"<br/>");a.html(e+" ").css({width:parseInt(o.width(),10)+"px"}),i()}function i(){var e=a.height(),t="hidden",n=l?e+c+u:e+c;n>p?(n=p,t="auto"):d>n&&(n=d),o.height()!==n&&o.css({overflow:t,height:n+"px"})}var o,a,l,u,s,c,d,p;if("textarea"!==this.type)return!1;o=e(this).css({resize:"none",overflow:"hidden"}),a=e("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body),n(),l="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")||"border-box"==o.css("-webkit-box-sizing"),u=parseInt(o.css("border-top-width"))+parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"))+parseInt(o.css("border-bottom-width")),s=parseInt(o.css("height"),10),c=parseInt(o.css("line-height"),10)||parseInt(o.css("font-size"),10),d=2*c>s?2*c:s,p=parseInt(o.css("max-height"),10)>-1?parseInt(o.css("max-height"),10):Number.MAX_VALUE,o.bind("keyup change cut paste",(function(){r()})),e(window).bind("resize",(function(){a.width()!==parseInt(o.width(),10)&&r()})),o.bind("blur",(function(){i()})),o.bind("updateHeight",(function(){n(),r()})),e((function(){r()}))}))}};e.fn.flexible=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery); })(this);
// WCF.js
-(function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var o=jQuery.fn.data;jQuery.fn.data=function(e,t){var i,n=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(var s in e){s.match(/ID$/)&&(i=e[s],delete e[s],e[s=s.replace(/ID$/,"-id")]=i)}n[0]=e;break;case"string":e.match(/ID$/)&&(n[0]=e.replace(/ID$/,"-id"))}var a=o.apply(this,n);if(void 0===e)for(var s in a)s.match(/Id$/)&&(a[s.replace(/Id$/,"ID")]=a[s],delete a[s]);return a},window.console||(window.console={});for(var e=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],t=0;t<e.length;t++)void 0===console[e[t]]&&(console[e[t]]=function(){});void 0===console.debug&&(console.debug=function(e){console.log(e)})}(),window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[--n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&0<window.navigator.msMaxTouchPoints,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return 0<arguments.length?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,i){return $.grep(e,function(e,t){return i!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e,t=0,i=this.get(0);return document.selection?(this.focus(),(e=document.selection.createRange()).moveStart("character",-this.val().length),t=e.text.length):!i.selectionStart&&"0"!=i.selectionStart||(t=parseInt(i.selectionStart)),t},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t,i=this.get(0);return this.focus(),document.selection?((t=document.selection.createRange()).moveStart("character",e),t.moveEnd("character",0),t.select()):!i.selectionStart&&"0"!=i.selectionStart||(i.selectionStart=e,i.selectionEnd=e),!0},wcfDropIn:function(e,t,i){return e=e||"up",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e=e||"down",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(i){var n=require("perfect-scrollbar");return this.each(function(){var e,t;return"object"==typeof i||void 0===i?(e=i,$(this).data("psID")||n.initialize(this,e)):"update"===(t=i)?n.update(this):"destroy"===t&&n.destroy(this),jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};for(var n=0,s=(i=i.split(";")).length;n<s;n++){var a=$.trim(i[n]);""!=a&&(a=a.split(":"),t[$.trim(a[0])]=$.trim(a[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,s=i.length;n<s;n++){var a=i[n];t[a]?e.css(a,t[a]):e.css(a,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),s=[],a=0;a<n.length;a+=i){for(var o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;s<a;s++){var o=i[s].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(e){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.destroy(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e,t){window.bc_wcfSimpleDropdown._toggle(null,e,null,t)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n},open:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].open(),!0)},close:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].close(),!0)},closeAll:function(){for(var e in this._dropdownMenus)this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].close()},getOpenDropdown:function(){for(var e in this._dropdownMenus)if(this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].isOpen())return this._dropdownMenus[e];return null},getDropdown:function(e){return this._dropdownMenus[e]}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var s,a=null;!0===n.staticDropdown?this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()}):(this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()}),s=$('<div class="interactiveDropdownHeader" />').appendTo(this._container),$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(s),this._linkList=$('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo(s),a=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(a),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)),this._pointer=$('<span class="elementPointer"><span /></span>').appendTo(this._container),require(["Ui/Screen"],function(e){e.is("screen-lg")&&null!==a&&a.perfectScrollbar({suppressScrollX:!0})}.bind(this)),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),WCF.System.Event.fireEvent("com.woltlab.wcf.Search","close"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open"),WCF.System.Event.fireEvent("WCF.Dropdown.Interactive.Instance","close",{instance:this})},isOpen:function(){return this._triggerElement.hasClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){require(["Ui/Alignment","Ui/Screen"],function(e,t){t.is("screen-lg")?e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0}):this._container.css({bottom:"",left:"",right:"",top:elById("pageHeaderPanel").clientHeight+"px"})}.bind(this))},rebuildScrollbar:function(){require(["Ui/Screen"],function(e){var t;e.is("screen-lg")&&((t=this._itemList.parent()).perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0}))}.bind(this))}}),WCF.Clipboard={init:function(n,s,a,o){require(["EventHandler","WoltLabSuite/Core/Controller/Clipboard"],function(e,t){for(var i in t.setup({hasMarkedItems:0<s,pageClassName:n,pageObjectId:o}),a)a.hasOwnProperty(i)&&function(t){e.add("com.woltlab.wcf.clipboard",t,function(e){null!==e.responseData&&a[t].hasOwnProperty(e.responseData.actionName)&&a[t][e.responseData.actionName].triggerEffect(e.responseData.objectIDs)})}(i)})},reload:function(){require(["WoltLabSuite/Core/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){$.isFunction(e)?(this._callback=e,this._interval=t,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(t){this._ajaxRequest=null,"jsonp"===(t=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},t)).dataType?require(["AjaxJsonp"],function(e){e.send(t.url,t.success,t.failure,{parameterName:t.jsonp})}):require(["AjaxRequest"],function(e){this._ajaxRequest=new e({data:t.data,type:t.type,url:t.url,withCredentials:t.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===t.dataType?"application/json":"",autoAbort:t.autoAbortPrevious,ignoreError:t.suppressErrors,silent:!t.showLoadingOverlay,failure:t.failure,finalize:t.after,success:t.success}),t.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(t){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(t)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(t,i){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.setOption(t,i)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(e,t,i){},_success:function(e,t,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i,n=$(t),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(e){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(s){this._containers.forEach(function(e){var t,i=$("#"+e),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),s)&&(t=this,i.wcfBlindOut("up",function(){var e=$(this).remove();t._containers.splice(t._containers.indexOf(e.wcfIdentify()),1),t._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})}))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i,n=$("#"+this._containers[t]);WCF.inArray(n.find(this._buttonSelector).data("objectID"),e)&&(n.has("ol").has("li").length?(n.is(":only-child")?n.parent().replaceWith(n.find("> ol")):n.replaceWith(n.find("> ol > li")),this._containers.splice(this._containers.indexOf(n.wcfIdentify()),1),this._didTriggerEffect(n)):(i=this,n.wcfBlindOut("up",function(){$(this).remove(),i._containers.splice(i._containers.indexOf($(this).wcfIdentify()),1),i._didTriggerEffect($(this))})))}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),i=t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable")):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable")),t.attr("title",i),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){this._threshold=parseInt(e),0!==this._threshold?($.isFunction(t)&&(this._callback=t),null!==this._callback?(this._reference=$(i||window),this._target=$(n||document),this.start(),this._scroll()):console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.")):console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.")},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop();e-(this._reference.height()+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e||new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){e({key:t,value:this._variables[t]})}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(t,i){require(["Language"],function(e){e.add(t,i)})},addObject:function(t){require(["Language"],function(e){e.addObject(t)})},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){var i=(e=String(WCF.Number.round(e,t||2))).split(".");return e=this.addThousandsSeparator(i[0]),1<i.length&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(t){var i=new WCF.Dictionary,n=0;t=(t=(t=t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return i.add(t,e.replace(/\{\/?literal\}/g,"")),t},this))).replace(/\{\*.*?\*\}/g,"");function s(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,u=t.length;c<u;c++){var h=t[c];n&&"="!=h&&" "!=h?s+=h:n&&"="==h?l=o=r=n=!1:n||r||o||" "!=h?n||!r||l||"'"!=h?n||r||o||"'"!=h?n||!o||l||'"'!=h?n||r||o||'"'!=h?n||!o&&!r||l||"\\"!=h?n||(l=!1,a+=h):(l=!0,a+=h):(o=!0,a+=h):(o=!1,a+=h):(r=!0,a+=h):(r=!1,a+=h):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i}function a(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")}for(var e in t=t.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.escapeHTML("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.formatNumeric("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return"' + "+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return"';\nif ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return"';\n}\nelse if ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in implode-tag");if(void 0===i.item)throw new Error("Missing item attribute in implode-tag");return void 0===i.glue&&(i.glue="', '"),i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+n+" = false;\nfor ($implodeKey_"+n+" in "+i.from+") {\n\tv["+i.item+"] = "+i.from+"[$implodeKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $implodeKey_"+n+";\n":"")+"\tif ($implode_"+n+") $output += "+i.glue+";\n\t$implode_"+n+" = true;\n\t$output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in foreach-tag");if(void 0===i.item)throw new Error("Missing item attribute in foreach-tag");return i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+n+" = false;\nfor ($foreachKey_"+n+" in "+i.from+") {\n\t$foreach_"+n+" = true;\n\tbreak;\n}\nif ($foreach_"+n+") {\n\tfor ($foreachKey_"+n+" in "+i.from+") {\n\t\tv["+i.item+"] = "+i.from+"[$foreachKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $foreachKey_"+n+";\n":"")+"\t\t$output += '"}).replace(/\{foreachelse\}/g,"';\n\t}\n}\nelse {\n\t{\n\t\t$output += '").replace(/\{\/foreach\}/g,"';\n\t}\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n\t$output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '"),WCF.Template.callbacks)t=WCF.Template.callbacks[e](t);t=t.replace("{ldelim}","{").replace("{rdelim}","}"),i.each(function(e){t=t.replace(e.key,e.value)}),t="$output += '"+t+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+t+" return $output;")}catch(e){throw console.debug("var $output = ''; "+t+" return $output;"),e}},fetch:function(e){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;e<t;e++){var i=this._showItems[e];$("#"+i).show()}for(e=0,t=this._hideItems.length;e<t;e++){i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e);t.data("isOpen")||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer"))),i=i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),!0);return t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(e){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(e){},_getButtonContainer:function(e){},_createButton:function(e,t){var i=elBySel(".jsStaticCollapsibleButton",t[0]);return(i=null!==i&&i.parentNode===t[0]?(i.classList.remove("jsStaticCollapsibleButton"),$(i)):$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t)).data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),$("#"+t).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(e){return{}},_updateContent:function(e,t,i){this._containerData[e].target.html(t)},_success:function(e,t,i){var n,s;e.returnValues.containerID&&(n=e.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!e.returnValues.isOpen,s=e.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(e.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[t].button,"open"==s?"chevron-down":"chevron-right"),"open"==s?this._containerData[t].target.show():this._containerData[t].target.hide(),$("#"+t).toggleClass("jsCollapsed"),this._containerData[t].isOpen="open"==s}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return s-a<n&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i}),!1}}),WCF.CloseOverlayHandler={addCallback:function(t,i){require(["Ui/CloseOverlay"],function(e){e.add(t,i)})},removeCallback:function(t){require(["Ui/CloseOverlay"],function(e){e.remove(t)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){this._isListening||(window.MutationObserver?new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0}):$(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(t){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){option=$(option);var disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions")),isActive;switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),disableOptions,enableOptions);break;case"radio":option.prop("checked")&&(isActive=!0,option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,disableOptions,enableOptions))}break;case"select":var $value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[];if(0<disableOptions.length)for(var $index in disableOptions){var $item=disableOptions[$index];$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option)}if(0<enableOptions.length)for(var $index in enableOptions){var $item=enableOptions[$index];$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option)}this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(e,t,i){if(0<t.length)for(var n=0,s=t.length;n<s;n++){var a=t[n];$.wcfIsset(a)?this._enableOption(a,!e):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}if(0<i.length)for(n=0,s=i.length;n<s;n++){var o,a=i[n];$.wcfIsset(a)?this._enableOption(a,e):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){var i,n,s,a=(e=$(e)).getTagName();"select"==a||"input"==a&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))?("input"===a&&"radio"===e[0].type&&e[0].checked||(t?e.enable():e.disable()),e.parents(".optionTypeBoolean:eq(0)")&&(i=e.wcfIdentify().replace(/\./g,"\\."),n=$("#"+i+"_no"),t?n.enable():n.disable(),(s=$("#"+i+"_never")).length&&(t?s.enable():s.disable()))):t?e.removeAttr("readonly"):e.attr("readonly",!0),t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;i<n;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){var e;this._isListening||(e=null,void 0!==document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(e){var t;this._isExecuting||(this._isExecuting=!0,t=document[this._hiddenFieldName],this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var e,t;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(e=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(t=e[e.length-1].match(/\d+/g),0<this._options.updatePageNumber?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)):window.location.reload():this._tableContainer.remove()},_remove:function(e){var t;$.getLength(e)?(t=$(e.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==t.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){null==t||$.isFunction(t)?(this._callback=t||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var t=this;new WCF.PeriodicalExecuter(function(e){t._list.is(":visible")&&t._clearList(!1),e.stop()},250)},_keyDown:function(e){var t;e.which===$.ui.keyCode.ENTER&&((t=this._searchInput.parents(".dropdown")).data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():!t.data("preventSubmit")&&-1===this._itemIndex||e.preventDefault())},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){if(this._lastValue===t)return;this._lastValue=t;var i,n={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};this._delay?(null!==this._timer&&this._timer.stop(),(i=this)._timer=new WCF.PeriodicalExecuter(function(){i._queryServer(n),i._timer.stop(),i._timer=null},this._delay)):this._queryServer(n)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(e){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){if((e.keyCode||e.which)==$.ui.keyCode.COMMA)return"";for(var i=t.split(","),n=i.length,s=0;s<n;s++)i[s]=$.trim(i[s]);for(s=0;s<n;s++){var a=i[s];if(!this._oldSearchString[s]){t=a;break}if(a!=this._oldSearchString[s]){t=a,this._caretAt=s;break}}this._oldSearchString=i}return t},_getParameters:function(e){return e},_success:function(e,t,i){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var n in e.returnValues){var s=e.returnValues[n];this._createListItem(s)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var a=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t,i,n=!1,s=$(e.currentTarget);this._commaSeperated?(t=s.data("label"),this._oldSearchString[this._caretAt]=t,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(t.toLowerCase())+t.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t,i,n=this._super(e),s=null;return e.icon?s=$(e.icon):this._includeUserGroups&&"group"===e.type&&(s=$('<span class="icon icon16 fa-users" />')),s&&(t=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(t))),n.data("type",e.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){$.isFunction(t)?WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){$.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),this._setupCallbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;t<i;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(t=0,i=this._callbacks[e].length;t<i;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.register(t)})},rebuild:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.rebuild(t)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(t,i){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.add(t,i),this._registeredCaptchas.push(t)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(t){var e;if(-1===this._registeredCaptchas.indexOf(t))return e;var i=require("WoltLabSuite/Core/Controller/Captcha");try{e=i.getData(t)}catch(e){console.debug('[WCF.System.Captcha] Unknow captcha id "'+t+'"')}return e},removeCallback:function(t){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.delete(t),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(e){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(t,e,i,n){require(["Ui/Notification"],function(e){e.show(i||this._message,t,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(t,i,n,s,a){var e;"object"==typeof s&&((e=$("<div />")).append(s),s=e.html()),require(["Ui/Confirmation"],function(e){e.show({legacyCallback:i,message:t,parameters:n,template:s||"",messageIsHtml:!0===a})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){var e;0===this._depth&&(e=$("meta[name=viewport]"),this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")),this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return!!(document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen)}},WCF.System.PageNavigation={init:function(s,a){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],function(e){for(var t=elBySelAll(s),i=0,n=t.length;i<n;i++)e.init(t[i],a)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,s){this._aborted=!1,this._actionName=e,this._callback=s||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){var t,i;null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),this._aborted||(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100?((t=e.returnValues.parameters||{}).loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()):null!==this._callback?this._callback(this,e):(this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed")),i=$('<div class="formSubmit" />').appendTo(this._dialog),$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click(function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()}),this._dialog.wcfDialog("render")))}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],_elementSelector:null,_quickOption:null,init:function(e){if(this._elementSelector=e,$(e).length){this._setOptions();for(var t=0,i=this._options.length;t<i;t++)if(this._options[t].isQuickOption){this._quickOption=this._options[t].optionName;break}this.rebuild(),WCF.DOMNodeInsertedHandler.addCallback("WCF.InlineEditor"+this._elementSelector.hashCode(),$.proxy(this.rebuild,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},rebuild:function(){var e=$(this._elementSelector),a=this;e.each(function(e,t){var i=$(t),n=i.wcfIdentify();if(void 0===a._elements[n]){var s=a._getTriggerElement(i);if(null===s||1!==s.length)return;s.on(WCF_CLICK_EVENT,$.proxy(a._show,a)).data("elementID",n),a._quickOption&&s.disableSelection().data("optionName",a._quickOption).dblclick($.proxy(a._click,a)),a._elements[n]=i}})},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(e){return null},_show:function(e){e.preventDefault();var t,i=$(e.currentTarget).data("elementID"),n=null;this._dropdowns[i]||(this._triggerElements[i]=n=this._getTriggerElement(this._elements[i]).addClass("dropdownToggle"),(t=n[0].parentNode)&&"LI"===t.nodeName&&1===t.childElementCount?t.classList.add("dropdown"):n.wrap('<span class="dropdown" />'),this._dropdowns[i]=$('<ul class="dropdownMenu" />').insertAfter(n)),this._dropdowns[i].empty();for(var s=!1,a="",o=0,r=this._options.length;o<r;o++){var l=this._options[o];"divider"===l.optionName?""!==a&&"divider"!==a&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[i]),a=l.optionName):(this._validate(i,l.optionName)||this._validateCallbacks(i,l.optionName))&&($("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[i]).data("elementID",i).data("optionName",l.optionName).data("isQuickOption",!!l.isQuickOption).click($.proxy(this._click,this)),s=!0,a=l.optionName)}if(s){var c=this._dropdowns[i].children().last();c.hasClass("dropdownDivider")&&c.remove();var u=null,h=0;if(this._dropdowns[i].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?u=i:h++)}),!h)return u.trigger("click"),this._triggerElements[i]&&WCF.Dropdown.close(this._triggerElements[i].parents(".dropdown").wcfIdentify()),!1}return null!==n&&WCF.Dropdown.initDropdown(n,e.originalEvent||e),!1},_validate:function(e,t){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;n<i;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e,t,i){this._updateData.length&&(this._updateState(e),this._updateData=[])},_updateState:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(e,t){return!1},_executeCallback:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;n<i;n++)if(this._callbacks[n].execute(this._elements[e],t))return!0;return!1},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var e;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),e.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",function(){this.classList.contains("focus-visible")&&e[0].classList.add("active")}),this._fileUpload[0].addEventListener("blur",function(){e[0].classList.remove("active")})):(e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),elAttr(e[0],"tabindex","0"),e.click($.proxy(this._showOverlay,this))),this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i,n){var s=null,a=[];if(void 0!==n)a=n;else if(t)a.push(t);else if(i){var o="";switch(i.type){case"image/png":o=".png";break;case"image/jpeg":o=".jpg";break;case"image/gif":o=".gif"}a.push({name:"pasted-from-clipboard"+o})}else a=this._fileUpload.prop("files");if(a.length){var r=new FormData,s=this._createUploadMatrix(a);if(!this._uploadMatrix[s].length)return null;for(var l,c=0,u=a.length;c<u;c++){this._uploadMatrix[s][c]&&(l=this._uploadMatrix[s][c].data("internalFileID"),i?r.append("__files["+l+"]",i,a[c].name):r.append("__files["+l+"]",a[c],a[c].name))}r.append("actionName",this._options.action),r.append("className",this._className);var h=this._getParameters();for(var d in h)r.append("parameters["+d+"]",h[d]);var p=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:r,contentType:!1,processData:!1,success:function(e,t,i){p._success(s,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){p._progress(s,e)},!1),e},xhrFields:{withCredentials:!0}})}return s},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;i<n;i++){var s=e[i],a=this._initFile(s);a.hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a)}return t}return null},_success:function(e,t){},_error:function(e,t,i){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;t<i;t++){var n=e[t],s=new FormData,a=this._createUploadMatrix(n);if(this._uploadMatrix[a].length){s.append("__files["+a+"]",n),s.append("actionName",this._options.action),s.append("className",this._className);var o=this._getParameters();for(var r in o)s.append("parameters["+r+"]",o[r]);this._sendRequest(a,s)}}},_sendRequest:function(n,e){var s=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:e,contentType:!1,processData:!1,success:function(e,t,i){s._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){s._progress(n,e)},!1),e}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(e,t){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,s,a){this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i||0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,handle:"",helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{});var o,r=$("#"+this._containerID+" .sortableList");if(r.is("tbody")&&("li:not(.sortableNoSorting)"===this._options.items&&(this._options.items="tr:not(.sortableNoSorting)",this._options.toleranceElement=""),"clone"===this._options.helper&&(this._options.helper=this._tableRowHelper.bind(this),(o=r.prev("thead"))&&o.find("th").each(function(e,t){(t=$(t)).width(t.width())}))),s?r.sortable(this._options):r.nestedSortable(this._options),this._className){var l=this._container.find(".formSubmit");if(!l.length&&!(l=this._container.next(".formSubmit")).length)return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(e,t){return t.children("td").each(function(e,t){(t=$(t)).width(t.width())}),t},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy(function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy(function(e,t){var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)},this))},this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(e,t,i){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(t){var i=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(i=!0)}.bind(this)),i||(this._activeElementID="",this._identifier=t,require(["WoltLabSuite/Core/Controller/Popover"],function(e){e.init({attributeName:"legacy",className:t,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){var i;this._itemList=$(e),this._searchInput=$(t),this._data={},this._itemList.length&&this._searchInput.length?(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput&&(i=this)._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)}),this._searchInput.parents(".dropdown").data("preventSubmit",!0)):console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(e){return null!==e||this._keyPress(null)},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return(e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t)?!0:(this.addItem({objectID:0,label:t}),e&&44===e.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){for(var e=$.trim(this._searchInput.val()),t=0,i=(e=e.split(",")).length;t<i;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){return(!this._data[e.objectID]||0===e.objectID&&this._allowCustomInput)&&($('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label)),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e,t){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(t,i,n,s,a,o){require(["WoltLabSuite/Core/Language/Chooser"],function(e){e.init(t,i,n,s,a,o)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1==this._container.length?this._convert():console.debug("[WCF.UserPanel] Unable to find container identified by '"+e+"', aborting.")},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(e){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e,t,i){var n=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());n.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(n),this._updateBadge(e.returnValues.totalCount),this._after(n)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(n),this._updateBadge(0))},_updateBadge:function(e){var t;(e=parseInt(e)||0)?((t=this._container.find(".badge")).length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle"))).before(" "),t.html(e)):this._container.find(".badge").remove()},_after:function(e){}}),jQuery.fn.extend({wcfDialog:function(s){var a=arguments;return require(["Dom/Util","Ui/Dialog"],function(e,t){var i,n=e.identify(this[0]);"close"===s?t.close(n):"render"===s?t.rebuild(n):"option"===s?3===a.length&&("title"===a[1]&&"string"==typeof a[2]?t.setTitle(n,a[2]):0===a[1].indexOf("on")?t.setCallback(n,a[1],a[2]):"closeConfirmMessage"===a[1]&&null===a[2]&&t.setCallback(n,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),i=1===a.length&&"object"==typeof a[0]?a[0]:{},t.openStatic(n,null,i),i.hasOwnProperty("title")&&t.setTitle(n,i.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,1<this._count&&this._initSlideshow()},_initSlideshow:function(){var i=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(e,t){$(t).show().css({height:i,left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var e=0;e<this._count;e++){var t=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",e).click($.proxy(this._click,this)).appendTo(this._buttonList);0==e&&t.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto").outerHeight();this._items.css("height",e+"px"),this.element.css("height",e+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){var e;this.options.cycle&&(null!==this._timer&&this._timer.stop(),(e=this)._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval))},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return 1<i.length?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(n){var s=this[0],a=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],function(e,t){var i=t.getTabMenu(e.identify(s));null!==i&&i[n].apply(i,a)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:e})}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){var i;return"activePage"==e&&t!=this.options[e]&&0<t&&t<=this.options.maxPage&&((i=this._trigger("shouldSwitch",void 0,{nextPage:t}))||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})),this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var a=this;$(".jsCategory").each(function(e,t){var n=$(t).data("parentCategoryID",null).change($.proxy(a._updateSelection,a));a._categories[n.val()]=n;var s=[];n.parents("li").find(".jsChildCategory").each(function(e,t){var i=$(t).data("parentCategoryID",n.val()).change($.proxy(a._updateSelection,a));a._categories[i.val()]=i,s.push(i.val()),i.is(":checked")&&n.prop("checked","checked")}),n.data("childCategoryIDs",s)})},_updateSelection:function(e){var t=$(e.currentTarget),i=t.data("parentCategoryID");if(t.is(":checked"))null!==i&&this._categories[i].prop("checked","checked");else if(null===i)for(var n=t.data("childCategoryIDs"),s=0,a=n.length;s<a;s++)this._categories[n[s]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2&&this._list.addClass("flexibleCategoryListDisabled")},_buildStructure:function(){var r=this;this._list.find(".jsCategory").each(function(e,t){var a=$(t).change(r._updateSelection.bind(r)),i=parseInt(a.val()),o=[];a.parents("li:eq(0)").find(".jsChildCategory").each(function(e,t){var n=$(t);n.data("parentCategory",a).change(r._updateSelection.bind(r));var i=parseInt(n.val());o.push(n);var s=[];n.parents("li:eq(0)").find(".jsSubChildCategory").each(function(e,t){var i=$(t);i.data("parentCategory",n).change(r._updateSelection.bind(r)),s.push(i)}),r._categories[i]=s}),r._categories[i]=o})},_updateSelection:function(e){var t=$(e.currentTarget),i=parseInt(t.val()),n=t.data("parentCategory");if(t.is(":checked"))n&&(n.prop("checked","checked"),(n=n.data("parentCategory"))&&n.prop("checked","checked"));else{if(this._categories[i])for(var s=0,a=this._categories[i].length;s<a;s++){var o=this._categories[i][s];o.prop("checked",!1);var r=parseInt(o.val());if(this._categories[r])for(var l=0,c=this._categories[r].length;l<c;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var u=parseInt(n.val()),s=0,a=this._categories[u].length;s<a;s++)if(this._categories[u][s].prop("checked"))return;if(n=n.data("parentCategory")){u=parseInt(n.val());for(s=0,a=this._categories[u].length;s<a;s++)if(this._categories[u][s].prop("checked"))return}}}}}),WCF.Condition={},WCF.Notice={}; })(this);
+(function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var e,t,i=jQuery.fn.data;for(jQuery.fn.data=function(e,t){var n,s,a,o=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(n in e)n.match(/ID$/)&&(s=e[n],delete e[n],e[n=n.replace(/ID$/,"-id")]=s);o[0]=e;break;case"string":e.match(/ID$/)&&(o[0]=e.replace(/ID$/,"-id"))}if(a=i.apply(this,o),void 0===e)for(n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},window.console||(window.console={}),e=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],t=0;t<e.length;t++)void 0===console[e[t]]&&(console[e[t]]=function(){});void 0===console.debug&&(console.debug=function(e){console.log(e)})}(),window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[n-=1],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,(function(e,i){return t!==e}))},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&i++;return i}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){var e,t,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;return e=0,t=this.get(0),document.selection?(this.focus(),(i=document.selection.createRange()).moveStart("character",-this.val().length),e=i.text.length):(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart)),e},setCaret:function(e){var t,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;return t=this.get(0),this.focus(),document.selection?((i=document.selection.createRange()).moveStart("character",e),i.moveEnd("character",0),i.select()):(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e),!0},wcfDropIn:function(e,t,i){return e||(e="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e||(e="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(e){var t=require("perfect-scrollbar");return this.each((function(){var i,n;return"object"==typeof e||void 0===e?(i=e,$(this).data("psID")||t.initialize(this,i)):"update"===(n=e)?t.update(this):"destroy"===n&&t.destroy(this),jQuery(this)}))}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t,i,n,s={},a=e.attr("style");if(!a)return{};for(t=0,i=(a=a.split(";")).length;t<i;t++)""!=(n=$.trim(a[t]))&&(n=n.split(":"),s[$.trim(n[0])]=$.trim(n[1]));return s},revertInlineCSS:function(e,t,i){var n,s,a;for(n=0,s=i.length;n<s;n++)t[a=i[n]]?e.css(a,t[a]):e.css(a,"")},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},base64toBlob:function(e,t,i){var n,s,a,o,r,l,c;for(t=t||"",i=i||512,n=atob(e),s=[],a=0;a<n.length;a+=i){for(o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);c=new Uint8Array(r),s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,(function(e,t){var i,n,s,a=t.split(/([A-Z][a-z0-9]+)/),o="";for(i=0,n=a.length;i<n;i++)(s=a[i].trim()).length&&(o.length&&(o+="-"),o+=s.toLowerCase());return"index.php?"+o+"/&"}))}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(e){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.destroy(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e,t){window.bc_wcfSimpleDropdown._toggle(null,e,null,t)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n,n},open:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].open(),!0)},close:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].close(),!0)},closeAll:function(){for(var e in this._dropdownMenus)this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].close()},getOpenDropdown:function(){for(var e in this._dropdownMenus)if(this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].isOpen())return this._dropdownMenus[e];return null},getDropdown:function(e){return this._dropdownMenus[e]}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){var s,a;this._options=n||{},this._triggerElement=t,s=null,!0===n.staticDropdown?this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click((function(e){e.stopPropagation()})):(this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click((function(e){e.stopPropagation()})),a=$('<div class="interactiveDropdownHeader" />').appendTo(this._container),$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(a),this._linkList=$('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo(a),s=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(s),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)),this._pointer=$('<span class="elementPointer"><span /></span>').appendTo(this._container),require(["Ui/Screen"],function(e){e.is("screen-lg")&&null!==s&&s.perfectScrollbar({suppressScrollX:!0})}.bind(this)),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),WCF.System.Event.fireEvent("com.woltlab.wcf.Search","close"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open"),WCF.System.Event.fireEvent("WCF.Dropdown.Interactive.Instance","close",{instance:this})},isOpen:function(){return this._triggerElement.hasClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){require(["Ui/Alignment","Ui/Screen"],function(e,t){t.is("screen-lg")?e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0}):this._container.css({bottom:"",left:"",right:"",top:elById("pageHeaderPanel").clientHeight+"px"})}.bind(this))},rebuildScrollbar:function(){require(["Ui/Screen"],function(e){if(e.is("screen-lg")){var t=this._itemList.parent();t.perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0})}}.bind(this))}}),WCF.Clipboard={init:function(e,t,i,n){require(["EventHandler","WoltLabSuite/Core/Controller/Clipboard"],(function(s,a){for(var o in a.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n}),i)i.hasOwnProperty(o)&&function(e){s.add("com.woltlab.wcf.clipboard",e,(function(t){null!==t.responseData&&i[e].hasOwnProperty(t.responseData.actionName)&&i[e][t.responseData.actionName].triggerEffect(t.responseData.objectIDs)}))}(o)}))},reload:function(){require(["WoltLabSuite/Core/Controller/Clipboard"],(function(e){e.reload()}))}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){$.isFunction(e)?(this._callback=e,this._interval=t,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(e){e.show()}))},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(e){e.hide()}))},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,"jsonp"===(e=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},e)).dataType?require(["AjaxJsonp"],(function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})})):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,withCredentials:e.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===e.dataType?"application/json":"",autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(t){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(i){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(e,t,i){},_success:function(e,t,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy((function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))}),this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i,n=$(t),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(e){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(e){this._containers.forEach(function(t){var i,n=$("#"+t),s=n.find(this._buttonSelector);WCF.inArray(s.data("objectID"),e)&&(i=this,n.wcfBlindOut("up",(function(){var e=$(this).remove();i._containers.splice(i._containers.indexOf(e.wcfIdentify()),1),i._didTriggerEffect(e),s.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",s.data("eventName"),{button:s,container:e})})))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){var t,i,n;for(t in this._containers)i=$("#"+this._containers[t]),WCF.inArray(i.find(this._buttonSelector).data("objectID"),e)&&(i.has("ol").has("li").length?(i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i)):(n=this,i.wcfBlindOut("up",(function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))}))))}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy((function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))}),this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){var t,i,n;for(t in this._containers)n=(i=$("#"+this._containers[t])).find(this._buttonSelector),WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),i=t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),t.attr("title",i)),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){this._threshold=parseInt(e),0!==this._threshold?($.isFunction(t)&&(this._callback=t),null!==this._callback?(this._reference=$(i||window),this._target=$(n||document),this.start(),this._scroll()):console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.")):console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.")},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e||new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy((function(e){this.add(e.key,e.value)}),this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){var t;if($.isFunction(e))for(t in this._variables)e({key:t,value:this._variables[t]})},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["Language"],(function(i){i.add(e,t)}))},addObject:function(e){require(["Language"],(function(t){t.addObject(e)}))},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){var i=(e=String(WCF.Number.round(e,t||2))).split(".");return e=this.addThousandsSeparator(i[0]),i.length>1&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],(function(e){e.setup()}))},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(e){var t,i,n,s=new WCF.Dictionary,a=0;for(n in e=(e=(e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy((function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return s.add(t,e.replace(/\{\/?literal\}/g,"")),t}),this))).replace(/\{\*.*?\*\}/g,""),t=function(e){var t,i,n,s=e.split(""),a={},o=!0,r="",l="",c=!1,u=!1,h=!1;for(t=0,i=s.length;t<i;t++)n=s[t],o&&"="!=n&&" "!=n?r+=n:o&&"="==n?(o=!1,u=!1,c=!1,h=!1):o||u||c||" "!=n?o||!u||h||"'"!=n?o||u||c||"'"!=n?o||!c||h||'"'!=n?o||u||c||'"'!=n?o||!c&&!u||h||"\\"!=n?o||(h=!1,l+=n):(h=!0,l+=n):(c=!0,l+=n):(c=!1,l+=n):(u=!0,l+=n):(u=!1,l+=n):(o=!0,a[r]=l,l=r="");if(a[r]=l,c||u||h)throw new Error('Syntax error in parameterList: "'+e+'"');return a},i=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")},e=e.replace(/\{(\$[^\}]+?)\}/g,(function(e,t){return"' + WCF.String.escapeHTML("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"})).replace(/\{#(\$[^\}]+?)\}/g,(function(e,t){return"' + WCF.String.formatNumeric("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"})).replace(/\{@(\$[^\}]+?)\}/g,(function(e,t){return"' + "+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+" + '"})).replace(/\{lang\}(.+?)\{\/lang\}/g,(function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"})).replace(/\{include (.+?)\}/g,(function(e,i){i=i.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var n=t(i);if(void 0===n.file)throw new Error("Missing file attribute in include-tag");return n.file=n.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+n.file+".fetch(v) + '"})).replace(/\{if (.+?)\}/g,(function(e,t){return"';\nif ("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"})).replace(/\{else ?if (.+?)\}/g,(function(e,t){return"';\n}\nelse if ("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"})).replace(/\{implode (.+?)\}/g,(function(e,i){a++,i=i.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var n=t(i);if(void 0===n.from)throw new Error("Missing from attribute in implode-tag");if(void 0===n.item)throw new Error("Missing item attribute in implode-tag");return void 0===n.glue&&(n.glue="', '"),n.from=n.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+a+" = false;\nfor ($implodeKey_"+a+" in "+n.from+") {\n\tv["+n.item+"] = "+n.from+"[$implodeKey_"+a+"];\n"+(void 0!==n.key?"\t\tv["+n.key+"] = $implodeKey_"+a+";\n":"")+"\tif ($implode_"+a+") $output += "+n.glue+";\n\t$implode_"+a+" = true;\n\t$output += '"})).replace(/\{foreach (.+?)\}/g,(function(e,i){a++,i=i.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var n=t(i);if(void 0===n.from)throw new Error("Missing from attribute in foreach-tag");if(void 0===n.item)throw new Error("Missing item attribute in foreach-tag");return n.from=n.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+a+" = false;\nfor ($foreachKey_"+a+" in "+n.from+") {\n\t$foreach_"+a+" = true;\n\tbreak;\n}\nif ($foreach_"+a+") {\n\tfor ($foreachKey_"+a+" in "+n.from+") {\n\t\tv["+n.item+"] = "+n.from+"[$foreachKey_"+a+"];\n"+(void 0!==n.key?"\t\tv["+n.key+"] = $foreachKey_"+a+";\n":"")+"\t\t$output += '"})).replace(/\{foreachelse\}/g,"';\n\t}\n}\nelse {\n\t{\n\t\t$output += '").replace(/\{\/foreach\}/g,"';\n\t}\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n\t$output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '"),WCF.Template.callbacks)e=WCF.Template.callbacks[n](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),s.each((function(t){e=e.replace(t.key,t.value)})),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(e){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){var e,t,i;if(this._element.prop("checked")){for(e=0,t=this._showItems.length;e<t;e++)i=this._showItems[e],$("#"+i).show();for(e=0,t=this._hideItems.length;e<t;e++)i=this._hideItems[e],$("#"+i).hide();null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy((function(e,t){this._initButton(t)}),this))},_initButton:function(e){var t=$(e),i=t.data("isOpen");i||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy((function(){this._toggleImage(t)}),this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy((function(){this._toggleImage(t)}),this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(e){this._getContainers().each($.proxy((function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))}),this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(e){},_getButtonContainer:function(e){},_createButton:function(e,t){var i=elBySel(".jsStaticCollapsibleButton",t[0]);return null!==i&&i.parentNode===t[0]?(i.classList.remove("jsStaticCollapsibleButton"),i=$(i)):i=$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t),i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(e){return{}},_updateContent:function(e,t,i){this._containerData[e].target.html(t)},_success:function(e,t,i){var n,s;e.returnValues.containerID&&(n=e.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!e.returnValues.isOpen,s=e.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(e.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===a?"chevron-down":"chevron-right"),"open"===a?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===a}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){var n,s,a;return!e.length||((n=e.getOffsets("offset").top)>(s=$(document).height())-(a=$(window).height())&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,(function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i})),!1)}}),WCF.CloseOverlayHandler={addCallback:function(e,t){require(["Ui/CloseOverlay"],(function(i){i.add(e,t)}))},removeCallback:function(e){require(["Ui/CloseOverlay"],(function(t){t.remove(e)}))},forceExecution:function(){require(["Ui/CloseOverlay"],(function(e){e.execute()}))}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(e){e.add("__legacy__",t)}))},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(e){e.trigger()}))},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver)new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0});else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each((function(t){t.value(e)})),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){var disableOptions,enableOptions,isActive,$value,relevantDisableOptions,relevantEnableOptions,$index,$item;switch(option=$(option),disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions")),option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),disableOptions,enableOptions);break;case"radio":option.prop("checked")&&(isActive=!0,option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,disableOptions,enableOptions))}break;case"select":if($value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[],disableOptions.length>0)for($index in disableOptions)$item=disableOptions[$index],$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option);if(enableOptions.length>0)for($index in enableOptions)$item=enableOptions[$index],$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option);this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(e,t,i){var n,s,a,o;if(t.length>0)for(n=0,s=t.length;n<s;n++)a=t[n],$.wcfIsset(a)?this._enableOption(a,!e):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e);if(i.length>0)for(n=0,s=i.length;n<s;n++)a=i[n],$.wcfIsset(a)?this._enableOption(a,e):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){var i,n,s,a;"select"==(i=(e=$(e)).getTagName())||"input"==i&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))?("input"===i&&"radio"===e[0].type&&e[0].checked||(t?e.enable():e.disable()),e.parents(".optionTypeBoolean:eq(0)")&&(n=e.wcfIdentify().replace(/\./g,"\\."),s=$("#"+n+"_no"),t?s.enable():s.disable(),(a=$("#"+n+"_never")).length&&(t?a.enable():a.disable()))):t?e.removeAttr("readonly"):e.attr("readonly",!0),t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;i<n;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;void 0!==document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(e){if(!this._isExecuting){this._isExecuting=!0;var t=document[this._hiddenFieldName];this._callbacks.each((function(e){e.value(t)})),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var e,t;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(e=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(t=e[e.length-1].match(/\d+/g),this._options.updatePageNumber>0?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)):window.location.reload():this._tableContainer.remove()},_remove:function(e){var t;$.getLength(e)?(t=$(e.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==t.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){null==t||$.isFunction(t)?(this._callback=t||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter((function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()}),250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():(t.data("preventSubmit")||-1!==this._itemIndex)&&e.preventDefault()}},_keyUp:function(e){var t,i,n;switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}if(""===(t=this._getSearchString(e)))this._clearList(!1);else if(t.length>=this._triggerLength){if(this._lastValue===t)return;this._lastValue=t,i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}},this._delay?(null!==this._timer&&this._timer.stop(),n=this,this._timer=new WCF.PeriodicalExecuter((function(){n._queryServer(i),n._timer.stop(),n._timer=null}),this._delay)):this._queryServer(i)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(e){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t,i,n,s,a=$.trim(this._searchInput.val());if(this._commaSeperated){if((e.keyCode||e.which)==$.ui.keyCode.COMMA)return"";for(i=(t=a.split(",")).length,n=0;n<i;n++)t[n]=$.trim(t[n]);for(n=0;n<i;n++){if(s=t[n],!this._oldSearchString[n]){a=s;break}if(s!=this._oldSearchString[n]){a=s,this._caretAt=n;break}}this._oldSearchString=t}return a},_getParameters:function(e){return e},_success:function(e,t,i){var n,s,a;if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(n in e.returnValues)s=e.returnValues[n],this._createListItem(s);else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),a=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t,i,n=!1,s=$(e.currentTarget);this._commaSeperated?(t=s.data("label"),this._oldSearchString[this._caretAt]=t,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(t.toLowerCase())+t.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t,i,n=this._super(e),s=null;return e.icon?s=$(e.icon):this._includeUserGroups&&"group"===e.type&&(s=$('<span class="icon icon16 fa-users" />')),s&&(t=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(t))),n.data("type",e.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){$.isFunction(t)?WCF.inArray(e,this._loaded)?setTimeout((function(){t()}),1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){$.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),this._setupCallbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){var t,i;if(this._setupCallbacks[e]){for(t=0,i=this._setupCallbacks[e].length;t<i;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(t=0,i=this._callbacks[e].length;t<i;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],(function(t){t.register(e)}))},rebuild:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],(function(t){t.rebuild(e)}))}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(e,t){require(["WoltLabSuite/Core/Controller/Captcha"],function(i){try{i.add(e,t),this._registeredCaptchas.push(e)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(e){var t,i;if(-1===this._registeredCaptchas.indexOf(e))return t;i=require("WoltLabSuite/Core/Controller/Captcha");try{t=i.getData(e)}catch(t){console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"')}return t},removeCallback:function(e){require(["WoltLabSuite/Core/Controller/Captcha"],function(t){try{t.delete(e),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(e){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(e,t,i,n){require(["Ui/Notification"],function(t){t.show(i||this._message,e,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(e,t,i,n,s){if("object"==typeof n){var a=$("<div />");a.append(n),n=a.html()}require(["Ui/Confirmation"],(function(a){a.show({legacyCallback:t,message:e,parameters:i,template:n||"",messageIsHtml:!0===s})}))}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var e=$("meta[name=viewport]");this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return!!(document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen)}},WCF.System.PageNavigation={init:function(e,t){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],(function(i){var n,s,a=elBySelAll(e);for(n=0,s=a.length;n<s;n++)i.init(a[n],t)}))}},WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){var t,i;for(t in e.returnValues)if(void 0!==this._callbacks[t])for(i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,s){this._aborted=!1,this._actionName=e,this._callback=s||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){var t,i;null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy((function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()}),this),title:this._title})),this._aborted||(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100?((t=e.returnValues.parameters||{}).loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()):null!==this._callback?this._callback(this,e):(this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed")),i=$('<div class="formSubmit" />').appendTo(this._dialog),$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click((function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()})),this._dialog.wcfDialog("render")))}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],_elementSelector:null,_quickOption:null,init:function(e){var t,i;if(this._elementSelector=e,$(e).length){for(this._setOptions(),t=0,i=this._options.length;t<i;t++)if(this._options[t].isQuickOption){this._quickOption=this._options[t].optionName;break}this.rebuild(),WCF.DOMNodeInsertedHandler.addCallback("WCF.InlineEditor"+this._elementSelector.hashCode(),$.proxy(this.rebuild,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},rebuild:function(){var e=$(this._elementSelector),t=this;e.each((function(e,i){var n,s=$(i),a=s.wcfIdentify();if(void 0===t._elements[a]){if(null===(n=t._getTriggerElement(s))||1!==n.length)return;n[0].addEventListener("keydown",(e=>{"Enter"===e.key&&(e.preventDefault(),n[0].dataset.isKeyboardClick="true",t._show(e))})),n.on("click",$.proxy(t._show,t)).data("elementID",a),n[0].dataset.requiresSynthethicClick=!0,t._quickOption&&n.disableSelection().data("optionName",t._quickOption).dblclick($.proxy(t._click,t)),t._elements[a]=s}}))},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(e){return null},_show:function(e){var t,i,n,s,a,o,r,l,c,u,h;for(e.preventDefault(),t=$(e.currentTarget).data("elementID"),i=null,this._dropdowns[t]||(this._triggerElements[t]=i=this._getTriggerElement(this._elements[t]).addClass("dropdownToggle"),(n=i[0].parentNode)&&"LI"===n.nodeName&&1===n.childElementCount?n.classList.add("dropdown"):i.wrap('<span class="dropdown" />'),this._dropdowns[t]=$('<ul class="dropdownMenu" />').insertAfter(i)),this._dropdowns[t].empty(),s=!1,a="",o=0,r=this._options.length;o<r;o++)"divider"===(l=this._options[o]).optionName?""!==a&&"divider"!==a&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[t]),a=l.optionName):(this._validate(t,l.optionName)||this._validateCallbacks(t,l.optionName))&&($("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[t]).data("elementID",t).data("optionName",l.optionName).data("isQuickOption",!!l.isQuickOption).click($.proxy(this._click,this)),s=!0,a=l.optionName);return s&&((c=this._dropdowns[t].children().last()).hasClass("dropdownDivider")&&c.remove(),u=null,h=0,this._dropdowns[t].children().each((function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?u=i:h++)})),!h)?(u.trigger("click"),this._triggerElements[t]&&WCF.Dropdown.close(this._triggerElements[t].parents(".dropdown").wcfIdentify()),!1):(null!==i&&WCF.Dropdown.initDropdown(i,e.originalEvent||e),!1)},_validate:function(e,t){return!1},_validateCallbacks:function(e,t){var i,n=this._callbacks.length;if(n)for(i=0;i<n;i++)if(this._callbacks[i].validate(this._elements[e],t))return!0;return!1},_success:function(e,t,i){this._updateData.length&&(this._updateState(e),this._updateData=[])},_updateState:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(e,t){return!1},_executeCallback:function(e,t){var i,n=this._callbacks.length;if(n)for(i=0;i<n;i++)if(this._callbacks[i].execute(this._elements[e],t))return!0;return!1},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var e;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),e.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",(function(){this.classList.contains("focus-visible")&&e[0].classList.add("active")})),this._fileUpload[0].addEventListener("blur",(function(){e[0].classList.remove("active")}))):(e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),elAttr(e[0],"tabindex","0"),e.click($.proxy(this._showOverlay,this))),this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i,n){var s,a,o,r,l,c,u,h,d=null,p=[];if(void 0!==n)p=n;else if(t)p.push(t);else if(i){switch(s="",i.type){case"image/png":s=".png";break;case"image/jpeg":s=".jpg";break;case"image/gif":s=".gif";break;case"image/webp":s=".webp"}p.push({name:"pasted-from-clipboard"+s})}else p=this._fileUpload.prop("files");if(p.length){if(a=new FormData,d=this._createUploadMatrix(p),!this._uploadMatrix[d].length)return null;for(o=0,r=p.length;o<r;o++)this._uploadMatrix[d][o]&&(l=this._uploadMatrix[d][o].data("internalFileID"),i?a.append("__files["+l+"]",i,p[o].name):a.append("__files["+l+"]",p[o],p[o].name));for(u in a.append("actionName",this._options.action),a.append("className",this._className),c=this._getParameters())a.append("parameters["+u+"]",c[u]);h=this,$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:a,contentType:!1,processData:!1,success:function(e,t,i){h._success(d,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",(function(e){h._progress(d,e)}),!1),e},xhrFields:{withCredentials:!0}})}return d},_createUploadMatrix:function(e){var t,i,n,s,a;if(e.length){for(t=this._uploadMatrix.length,this._uploadMatrix[t]=[],i=0,n=e.length;i<n;i++)s=e[i],(a=this._initFile(s)).hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a);return t}return null},_success:function(e,t){},_error:function(e,t,i){},_progress:function(e,t){var i,n=Math.round(100*t.loaded/t.total);for(i in this._uploadMatrix[e])this._uploadMatrix[e][i].find("progress").attr("value",n)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){var e,t,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),e=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e),t=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy((function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(t)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){var e,t,i,n,s,a,o,r=this._fileUpload.prop("files");for(e=0,t=r.length;e<t;e++)if(i=r[e],n=new FormData,s=this._createUploadMatrix(i),this._uploadMatrix[s].length){for(o in n.append("__files["+s+"]",i),n.append("actionName",this._options.action),n.append("className",this._className),a=this._getParameters())n.append("parameters["+o+"]",a[o]);this._sendRequest(s,n)}},_sendRequest:function(e,t){var i=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t,n,s){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",(function(t){i._progress(e,t)}),!1),t}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(e,t){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){var e,t,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),e=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e),t=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy((function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(t)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,s,a){var o,r,l;if(this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i||0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,handle:"",helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{}),(o=$("#"+this._containerID+" .sortableList")).is("tbody")&&("li:not(.sortableNoSorting)"===this._options.items&&(this._options.items="tr:not(.sortableNoSorting)",this._options.toleranceElement=""),"clone"===this._options.helper&&(this._options.helper=this._tableRowHelper.bind(this),(r=o.prev("thead"))&&r.find("th").each((function(e,t){(t=$(t)).width(t.width())})))),s?o.sortable(this._options):o.nestedSortable(this._options),this._className){if(!(l=this._container.find(".formSubmit")).length&&!(l=this._container.next(".formSubmit")).length)return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(e,t){return t.children("td").each((function(e,t){(t=$(t)).width(t.width())})),t},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy((function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy((function(e,t){var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)}),this))}),this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(e,t,i){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(e){var t=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(t=!0)}.bind(this)),t||(this._activeElementID="",this._identifier=e,require(["WoltLabSuite/Core/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){if(this._itemList=$(e),this._searchInput=$(t),this._data={},this._itemList.length&&this._searchInput.length){if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",(function(){setTimeout((function(){i._onPaste()}),100)}))}this._searchInput.parents(".dropdown").data("preventSubmit",!0)}else console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(e){return null!==e||this._keyPress(null)},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t?!0:(this.addItem({objectID:0,label:t}),e&&44===e.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){var e,t,i,n=$.trim(this._searchInput.val());for(e=0,t=(n=n.split(",")).length;e<t;e++)""!==(i=$.trim(n[e]))&&this.addItem({objectID:0,label:i});this._searchInput.val("")},load:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){return!(!this._data[e.objectID]||0===e.objectID&&this._allowCustomInput)||($('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label),!0)},clearList:function(){this._itemList.children("li").each($.proxy((function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))}),this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e,t){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(e,t,i,n,s,a){require(["WoltLabSuite/Core/Language/Chooser"],(function(o){o.init(e,t,i,n,s,a)}))}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1==this._container.length?this._convert():console.debug("[WCF.UserPanel] Unable to find container identified by '"+e+"', aborting.")},_convert:function(){var e,t;this._container.addClass("dropdown"),this._link=this._container.children("a").remove(),e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container),$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy((function(){return window.location=this._link.attr("href"),!1}),this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(e){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e,t,i){var n=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());n.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(n),this._updateBadge(e.returnValues.totalCount),this._after(n)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(n),this._updateBadge(0))},_updateBadge:function(e){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle"))).before(" "),t.html(e)}else this._container.find(".badge").remove()},_after:function(e){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var s,a=i.identify(this[0]);"close"===e?n.close(a):"render"===e?n.rebuild(a):"option"===e?3===t.length&&("title"===t[1]&&"string"==typeof t[2]?n.setTitle(a,t[2]):0===t[1].indexOf("on")?n.setCallback(a,t[1],t[2]):"closeConfirmMessage"===t[1]&&null===t[2]&&n.setCallback(a,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),s=1===t.length&&"object"==typeof t[0]?t[0]:{},n.openStatic(a,null,s),s.hasOwnProperty("title")&&n.setTitle(a,s.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e,t,i=$(this._items.get(0)).outerHeight();for(this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy((function(e,t){$(t).show().css({height:i,left:(this._width+this.options.itemGap)*e,width:this._width})}),this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element),e=0;e<this._count;e++)t=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",e).click($.proxy(this._click,this)).appendTo(this._buttonList),0==e&&t.find(".icon").addClass("active");this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy((function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})}),this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;this._timer=new WCF.PeriodicalExecuter((function(){e.moveTo(null)}),1e3*this.options.cycleInterval)}},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return i.length>1?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],(function(n,s){var a=s.getTabMenu(n.identify(t));null!==a&&a[e].apply(a,i)}))}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:e})}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){if("activePage"==e&&t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var e=this;$(".jsCategory").each((function(t,i){var n,s=$(i).data("parentCategoryID",null).change($.proxy(e._updateSelection,e));e._categories[s.val()]=s,n=[],s.parents("li").find(".jsChildCategory").each((function(t,i){var a=$(i).data("parentCategoryID",s.val()).change($.proxy(e._updateSelection,e));e._categories[a.val()]=a,n.push(a.val()),a.is(":checked")&&s.prop("checked","checked")})),s.data("childCategoryIDs",n)}))},_updateSelection:function(e){var t,i,n,s=$(e.currentTarget),a=s.data("parentCategoryID");if(s.is(":checked"))null!==a&&this._categories[a].prop("checked","checked");else if(null===a)for(i=0,n=(t=s.data("childCategoryIDs")).length;i<n;i++)this._categories[t[i]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each((function(){$(this).trigger("change")})),this._list.children("li").length<2&&this._list.addClass("flexibleCategoryListDisabled")},_buildStructure:function(){var e=this;this._list.find(".jsCategory").each((function(t,i){var n=$(i).change(e._updateSelection.bind(e)),s=parseInt(n.val()),a=[];n.parents("li:eq(0)").find(".jsChildCategory").each((function(t,i){var s,o,r=$(i);r.data("parentCategory",n).change(e._updateSelection.bind(e)),s=parseInt(r.val()),a.push(r),o=[],r.parents("li:eq(0)").find(".jsSubChildCategory").each((function(t,i){var n=$(i);n.data("parentCategory",r).change(e._updateSelection.bind(e)),o.push(n)})),e._categories[s]=o})),e._categories[s]=a}))},_updateSelection:function(e){var t,i,n,s,a,o,r,l=$(e.currentTarget),c=parseInt(l.val()),u=l.data("parentCategory");if(l.is(":checked"))u&&(u.prop("checked","checked"),(u=u.data("parentCategory"))&&u.prop("checked","checked"));else{if(this._categories[c])for(t=0,i=this._categories[c].length;t<i;t++)if((n=this._categories[c][t]).prop("checked",!1),s=parseInt(n.val()),this._categories[s])for(a=0,o=this._categories[s].length;a<o;a++)this._categories[s][a].prop("checked",!1);if(u){for(r=parseInt(u.val()),t=0,i=this._categories[r].length;t<i;t++)if(this._categories[r][t].prop("checked"))return;if(u=u.data("parentCategory"))for(r=parseInt(u.val()),t=0,i=this._categories[r].length;t<i;t++)if(this._categories[r][t].prop("checked"))return}}}}),WCF.Condition={},WCF.Notice={}; })(this);
// WCF.Like.js
(function (window, undefined) { "use strict";WCF.Like=Class.extend({init:function(){throw new Error("The `WCF.Like` API is obsolete and therefore no longer supported. Please use the current API `WoltLabSuite/Core/Ui/Reaction/Handler` instead.")},_domNodeInserted:function(){},_initContainers:function(){},_getContainers:function(){},_getWidgetContainer:function(){},_getObjectID:function(){},_addWidget:function(){},_buildWidget:function(){},_createWidget:function(){},_showLikeDetails:function(){},_click:function(){},_sendRequest:function(){},_success:function(){},_updateBadge:function(){},_updateSummary:function(){},_setActiveState:function(){}}); })(this);
// WCF.ACL.js
-(function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:null,_containerElements:{},_objectID:0,_objectTypeID:null,_options:{},_proxy:null,_search:null,_values:{group:{},user:{}},init:function(e,t,n,i,a,s){this._objectID=i||0,this._objectTypeID=t,this._categoryName=n,void 0===a&&(a=!0),this._values={group:{},user:{}},this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._container=$(e).hide().addClass("aclContainer");var r=this._container.children("dd"),c=$('<ul class="aclList containerList" />').appendTo(r),l=$('<input type="text" class="long" placeholder="'+WCF.Language.get("wcf.acl.search."+(a?"":"user.")+"description")+'" />').appendTo(r),o=$('<ul class="aclPermissionList containerList" />').hide().appendTo(r);elData(o[0],"grant",WCF.Language.get("wcf.acl.option.grant")),elData(o[0],"deny",WCF.Language.get("wcf.acl.option.deny")),this._containerElements={aclList:c,denyAll:null,grantAll:null,permissionList:o,searchInput:l},this._search=new WCF.Search.User(l,$.proxy(this.addObject,this),a);var h=this._container.parents("form:eq(0)");h.submit($.proxy(this.submit,this));var p=h.find("input[type=reset]:eq(0)");p.length&&p.click($.proxy(this._reset,this)),s?this._success(s):this._loadACL()},_reset:function(){this._values={group:{},user:{}},this._containerElements.aclList.empty(),this._containerElements.searchInput.val(""),this._containerElements.permissionList.hide().find("input[type=checkbox]").prop("checked",!1)},_loadACL:function(){this._proxy.setOption("data",{actionName:"loadAll",className:"wcf\\data\\acl\\option\\ACLOptionAction",parameters:{categoryName:this._categoryName,objectID:this._objectID,objectTypeID:this._objectTypeID}}),this._proxy.sendRequest()},addObject:function(e){var t=this._createListItem(e.objectID,e.label,e.type);this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),t.addClass("active"),this._search.addExcludedSearchValue(e.label),this._containerElements.permissionList.find("input[type=checkbox]").prop("checked",!1),this._containerElements.searchInput.val(""),this._containerElements.permissionList.show(),WCF.DOMNodeInsertedHandler.execute()},_createListItem:function(e,t,n){var i=$('<li><span class="icon icon16 fa-user'+("group"===n?"s":"")+'" /> <span class="aclLabel">'+t+"</span></li>").appendTo(this._containerElements.aclList);return i.data("objectID",e).data("type",n).data("label",t).click($.proxy(this._click,this)),$('<span class="icon icon16 fa-times jsTooltip pointer" title="'+WCF.Language.get("wcf.global.button.delete")+'" />').click($.proxy(this._removeItem,this)).appendTo(i),i},_removeItem:function(e){var t=$(e.currentTarget).parent(),n=t.data("type"),i=t.data("objectID");this._search.removeExcludedSearchValue(t.data("label")),t.remove(),this._values[n][i]&&delete this._values[n][i],this._selectFirstEntry()},_selectFirstEntry:function(){var e=this._containerElements.aclList.children("li:eq(0)");e.length?this._select(e,!1):this._reset()},_success:function(e,t,n){if($.getLength(e.returnValues.options)){var i=0,a={};for(var s in e.returnValues.options){var r=e.returnValues.options[s],c=$("<li><span>"+r.label+"</span></li>").data("optionID",s).data("optionName",r.optionName),l=$('<input type="checkbox" id="grant'+s+'" />').appendTo(c).wrap('<label for="grant'+s+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),o=$('<input type="checkbox" id="deny'+s+'" />').appendTo(c).wrap('<label for="deny'+s+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />');l.data("type","grant").data("optionID",s).change($.proxy(this._change,this)),o.data("type","deny").data("optionID",s).change($.proxy(this._change,this)),a[r.categoryName]||(a[r.categoryName]=[]),""===r.categoryName?c.appendTo(this._containerElements.permissionList):a[r.categoryName].push(c),i++}if(1<i&&(c=$('<li class="aclFullAccess"><span>'+WCF.Language.get("wcf.acl.option.fullAccess")+"</span></li>").prependTo(this._containerElements.permissionList),this._containerElements.grantAll=$('<input type="checkbox" id="grantAll_'+this._container.attr("id")+'" />').appendTo(c).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),this._containerElements.denyAll=$('<input type="checkbox" id="denyAll_'+this._container.attr("id")+'" />').appendTo(c).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />'),this._containerElements.grantAll.data("type","grant").change($.proxy(this._changeAll,this)),this._containerElements.denyAll.data("type","deny").change($.proxy(this._changeAll,this))),$.getLength(a))for(var h in a){var p=a[h];e.returnValues.categories[h]&&$('<li class="aclCategory">'+e.returnValues.categories[h]+"</li>").appendTo(this._containerElements.permissionList);for(var d=0,u=p.length;d<u;d++)p[d].appendTo(this._containerElements.permissionList)}this._parseData(e,"group"),this._parseData(e,"user"),this._container.show(),require(["WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager"],function(e){e.checkDependencies()}),this._selectFirstEntry()}},_parseData:function(e,t){if($.getLength(e.returnValues[t].option)){for(var n in e.returnValues[t].label)this._createListItem(n,e.returnValues[t].label[n],t),this._search.addExcludedSearchValue(e.returnValues[t].label[n]);this._values[t]=e.returnValues[t].option,WCF.DOMNodeInsertedHandler.execute()}},_click:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._select(t,!0)},_select:function(e,t){t&&this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),e.addClass("active"),this._setupPermissions(e.data("type"),e.data("objectID"))},_change:function(e){var t=$(e.currentTarget),n=t.data("optionID"),i=t.data("type");t.is(":checked")?"deny"===i?($("#grant"+n).prop("checked",!1),null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1)):($("#deny"+n).prop("checked",!1),null!==this._containerElements.denyAll&&this._containerElements.denyAll.prop("checked",!1)):"deny"===i&&null!==this._containerElements.denyAll?this._containerElements.denyAll.prop("checked",!1):"grant"===i&&null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1);var a=!0;this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);if(n.data("type")===i&&n.attr("id")!==i+"All_"+this._container.attr("id")&&!n.is(":checked"))return a=!1},this)),"deny"==i?null!==this._containerElements.denyAll&&(a?this._containerElements.denyAll.prop("checked",!0):this._containerElements.denyAll.prop("checked",!1)):null!==this._containerElements.grantAll&&(a?this._containerElements.grantAll.prop("checked",!0):this._containerElements.grantAll.prop("checked",!1))},_changeAll:function(e){var t=$(e.currentTarget),n=t.data("type");t.is(":checked")?"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")},this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")},this))):"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")},this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")},this)))},_setupPermissions:function(e,t){if(this._containerElements.permissionList.find("input[type='checkbox']").prop("checked",!1),this._values[e]&&this._values[e][t])for(var n in this._values[e][t])1==this._values[e][t][n]?$("#grant"+n).prop("checked",!0).trigger("change"):$("#deny"+n).prop("checked",!0).trigger("change");this._containerElements.permissionList.show()},_savePermissions:function(){var s,r,e=this._containerElements.aclList.find("li.active");e.length&&(s=e.data("objectID"),r=e.data("type"),this._values[r][s]={},this._containerElements.permissionList.find("input[type='checkbox']").each(function(e,t){var n,i,a=$(t);a.attr("id")!="grantAll_"+this._container.attr("id")&&a.attr("id")!="denyAll_"+this._container.attr("id")&&(n="deny"===a.data("type")?0:1,i=a.data("optionID"),a.is(":checked")?(this._values[r][s][i]=n,a.prop("checked",!1)):this._values[r]&&this._values[r][s]&&this._values[r][s][i]&&this._values[r][s][i]==n&&delete this._values[r][s][i])}.bind(this)))},submit:function(e){this._savePermissions(),this._save("group"),this._save("user")},_save:function(e){if($.getLength(this._values[e])){var t=this._container.parents("form:eq(0)");for(var n in this._values[e]){var i=this._values[e][n];for(var a in i)$('<input type="hidden" name="aclValues['+e+"]["+n+"]["+a+']" value="'+i[a]+'" />').appendTo(t)}}},getData:function(){return this._savePermissions(),this._values}}); })(this);
+(function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:null,_containerElements:{},_objectID:0,_objectTypeID:null,_options:{},_proxy:null,_search:null,_values:{group:{},user:{}},init:function(e,t,n,i,a,s){var r,c,l,o,h,p;this._objectID=i||0,this._objectTypeID=t,this._categoryName=n,void 0===a&&(a=!0),this._values={group:{},user:{}},this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._container=$(e).hide().addClass("aclContainer"),r=this._container.children("dd"),c=$('<ul class="aclList containerList" />').appendTo(r),l=$('<input type="text" class="long" placeholder="'+WCF.Language.get("wcf.acl.search."+(a?"":"user.")+"description")+'" />').appendTo(r),o=$('<ul class="aclPermissionList containerList" />').hide().appendTo(r),elData(o[0],"grant",WCF.Language.get("wcf.acl.option.grant")),elData(o[0],"deny",WCF.Language.get("wcf.acl.option.deny")),this._containerElements={aclList:c,denyAll:null,grantAll:null,permissionList:o,searchInput:l},this._search=new WCF.Search.User(l,$.proxy(this.addObject,this),a),(h=this._container.parents("form:eq(0)")).submit($.proxy(this.submit,this)),(p=h.find("input[type=reset]:eq(0)")).length&&p.click($.proxy(this._reset,this)),s?this._success(s):this._loadACL()},_reset:function(){this._values={group:{},user:{}},this._containerElements.aclList.empty(),this._containerElements.searchInput.val(""),this._containerElements.permissionList.hide().find("input[type=checkbox]").prop("checked",!1)},_loadACL:function(){this._proxy.setOption("data",{actionName:"loadAll",className:"wcf\\data\\acl\\option\\ACLOptionAction",parameters:{categoryName:this._categoryName,objectID:this._objectID,objectTypeID:this._objectTypeID}}),this._proxy.sendRequest()},addObject:function(e){var t=this._createListItem(e.objectID,e.label,e.type);this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),t.addClass("active"),this._search.addExcludedSearchValue(e.label),this._containerElements.permissionList.find("input[type=checkbox]").prop("checked",!1),this._containerElements.searchInput.val(""),this._containerElements.permissionList.show(),WCF.DOMNodeInsertedHandler.execute()},_createListItem:function(e,t,n){var i=$('<li><span class="icon icon16 fa-user'+("group"===n?"s":"")+'" /> <span class="aclLabel">'+t+"</span></li>").appendTo(this._containerElements.aclList);return i.data("objectID",e).data("type",n).data("label",t).click($.proxy(this._click,this)),$('<span class="icon icon16 fa-times jsTooltip pointer" title="'+WCF.Language.get("wcf.global.button.delete")+'" />').click($.proxy(this._removeItem,this)).appendTo(i),i},_removeItem:function(e){var t=$(e.currentTarget).parent(),n=t.data("type"),i=t.data("objectID");this._search.removeExcludedSearchValue(t.data("label")),t.remove(),this._values[n][i]&&delete this._values[n][i],this._selectFirstEntry()},_selectFirstEntry:function(){var e=this._containerElements.aclList.children("li:eq(0)");e.length?this._select(e,!1):this._reset()},_success:function(e,t,n){var i,a,s,r,c,l,o,h,p,d,u;if($.getLength(e.returnValues.options)){for(s in i=0,a={},e.returnValues.options)r=e.returnValues.options[s],c=$("<li><span>"+r.label+"</span></li>").data("optionID",s).data("optionName",r.optionName),l=$('<input type="checkbox" id="grant'+s+'" />').appendTo(c).wrap('<label for="grant'+s+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),o=$('<input type="checkbox" id="deny'+s+'" />').appendTo(c).wrap('<label for="deny'+s+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />'),l.data("type","grant").data("optionID",s).change($.proxy(this._change,this)),o.data("type","deny").data("optionID",s).change($.proxy(this._change,this)),a[r.categoryName]||(a[r.categoryName]=[]),""===r.categoryName?c.appendTo(this._containerElements.permissionList):a[r.categoryName].push(c),i++;if(i>1&&(c=$('<li class="aclFullAccess"><span>'+WCF.Language.get("wcf.acl.option.fullAccess")+"</span></li>").prependTo(this._containerElements.permissionList),this._containerElements.grantAll=$('<input type="checkbox" id="grantAll_'+this._container.attr("id")+'" />').appendTo(c).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),this._containerElements.denyAll=$('<input type="checkbox" id="denyAll_'+this._container.attr("id")+'" />').appendTo(c).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />'),this._containerElements.grantAll.data("type","grant").change($.proxy(this._changeAll,this)),this._containerElements.denyAll.data("type","deny").change($.proxy(this._changeAll,this))),$.getLength(a))for(h in a)for(p=a[h],e.returnValues.categories[h]&&$('<li class="aclCategory">'+e.returnValues.categories[h]+"</li>").appendTo(this._containerElements.permissionList),d=0,u=p.length;d<u;d++)p[d].appendTo(this._containerElements.permissionList);this._parseData(e,"group"),this._parseData(e,"user"),this._container.show(),require(["WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager"],(function(e){e.checkDependencies()})),this._selectFirstEntry()}},_parseData:function(e,t){if($.getLength(e.returnValues[t].option)){for(var n in e.returnValues[t].label)this._createListItem(n,e.returnValues[t].label[n],t),this._search.addExcludedSearchValue(e.returnValues[t].label[n]);this._values[t]=e.returnValues[t].option,WCF.DOMNodeInsertedHandler.execute()}},_click:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._select(t,!0)},_select:function(e,t){t&&this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),e.addClass("active"),this._setupPermissions(e.data("type"),e.data("objectID"))},_change:function(e){var t,n=$(e.currentTarget),i=n.data("optionID"),a=n.data("type");n.is(":checked")?"deny"===a?($("#grant"+i).prop("checked",!1),null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1)):($("#deny"+i).prop("checked",!1),null!==this._containerElements.denyAll&&this._containerElements.denyAll.prop("checked",!1)):"deny"===a&&null!==this._containerElements.denyAll?this._containerElements.denyAll.prop("checked",!1):"grant"===a&&null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1),t=!0,this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy((function(e,n){var i=$(n);if(i.data("type")===a&&i.attr("id")!==a+"All_"+this._container.attr("id")&&!i.is(":checked"))return t=!1,!1}),this)),"deny"==a?null!==this._containerElements.denyAll&&(t?this._containerElements.denyAll.prop("checked",!0):this._containerElements.denyAll.prop("checked",!1)):null!==this._containerElements.grantAll&&(t?this._containerElements.grantAll.prop("checked",!0):this._containerElements.grantAll.prop("checked",!1))},_changeAll:function(e){var t=$(e.currentTarget),n=t.data("type");t.is(":checked")?"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy((function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")}),this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy((function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")}),this))):"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy((function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")}),this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy((function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")}),this)))},_setupPermissions:function(e,t){if(this._containerElements.permissionList.find("input[type='checkbox']").prop("checked",!1),this._values[e]&&this._values[e][t])for(var n in this._values[e][t])1==this._values[e][t][n]?$("#grant"+n).prop("checked",!0).trigger("change"):$("#deny"+n).prop("checked",!0).trigger("change");this._containerElements.permissionList.show()},_savePermissions:function(){var e,t,n=this._containerElements.aclList.find("li.active");n.length&&(e=n.data("objectID"),t=n.data("type"),this._values[t][e]={},this._containerElements.permissionList.find("input[type='checkbox']").each(function(n,i){var a,s,r=$(i);r.attr("id")!="grantAll_"+this._container.attr("id")&&r.attr("id")!="denyAll_"+this._container.attr("id")&&(a="deny"===r.data("type")?0:1,s=r.data("optionID"),r.is(":checked")?(this._values[t][e][s]=a,r.prop("checked",!1)):this._values[t]&&this._values[t][e]&&this._values[t][e][s]&&this._values[t][e][s]==a&&delete this._values[t][e][s])}.bind(this)))},submit:function(e){this._savePermissions(),this._save("group"),this._save("user")},_save:function(e){var t,n,i,a;if($.getLength(this._values[e]))for(n in t=this._container.parents("form:eq(0)"),this._values[e])for(a in i=this._values[e][n])$('<input type="hidden" name="aclValues['+e+"]["+n+"]["+a+']" value="'+i[a]+'" />').appendTo(t)},getData:function(){return this._savePermissions(),this._values}}); })(this);
// WCF.Attachment.js
-(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_replaceOnLoad:{},_options:{},init:function(t,e,i,a,n,s,r,l,o){var d,c;this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:r}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(a),this._tmpHash=n,this._parentObjectID=parseInt(s),this._editorId=l,this._options=$.extend(!0,this._options,o||{}),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),WCF.System.Event.addListener("com.woltlab.wcf.action.delete","attachment",this._onDelete.bind(this)),this._makeSortable(),this._insertAllButton=$('<p class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</p>").hide(),this._editorId&&(this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+this._editorId,this._submitInline.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this._editorId,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId,function(t){t.tmpHashes&&Array.isArray(t.tmpHashes)||(t.tmpHashes=[]);var e=t.tmpHashes.indexOf(n);0<this._fileListSelector.children("li:not(.uploadFailed)").length?-1===e&&t.tmpHashes.push(n):-1!==e&&t.tmpHashes.splice(e)}.bind(this)),d=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,function(t){var e,i,a,n,s,r=this._getImageAttachments(),l=t.attributes[0]||0;r.hasOwnProperty(l)&&(e=~~$("#"+this._editorId).data("redactor").opts.woltlab.attachmentThumbnailWidth,i=!0===(i=t.attributes[2])||"true"===i||~~i&&~~i<=e,(a=elCreate("img")).className="woltlabAttachment",a.src=r[l][i?"thumbnailUrl":"url"],elData(a,"attachment-id",l),"left"===(n=t.attributes[1]||"none")?a.classList.add("messageFloatObjectLeft"):"right"===n&&a.classList.add("messageFloatObjectRight"),(s=t.metacode).parentNode.insertBefore(a,s),elRemove(s),t.cancel=!0)}.bind(this)),c=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,this._sync.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this._editorId,function(){WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","submit_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","reset_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,d),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,c)}.bind(this)))},_editorUpload:function(e){var i=null;this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0);var t=function(t){null===i?this._autoInsert.push(t):this._replaceOnLoad[t]=i,e.uploadID=t}.bind(this);e.file?this._upload(void 0,e.file,void 0,t):(this._upload(void 0,void 0,e.blob,t),i=e.replace||null)},_getImageAttachments:function(){var a={};return this._fileListSelector.children("li").each(function(t,e){var i=$(e);i.data("isImage")&&(a[~~i.data("objectID")]={thumbnailUrl:i.find(".jsButtonAttachmentInsertThumbnail").data("url"),url:i.find(".jsButtonAttachmentInsertFull").data("url")})}),a},_submitInline:function(t){var e;this._tmpHash&&(t.tmpHash=this._tmpHash,e={},WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","getMetaData_"+this._editorId,e),e.tmpHashes&&Array.isArray(e.tmpHashes)&&0<e.tmpHashes.length&&(t.tmpHash+=","+e.tmpHashes.join(",")))},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t=this._buttonSelector.next("small.innerError"),e=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,i=this._fileUpload?this._fileUpload.prop("files").length:0;if(e<=0||e<i){var a=e<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,e);return t.length||(t=$('<small class="innerError" />').insertAfter(this._buttonSelector)),t.html(a),!1}return t.remove(),!0},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._editorId&&t.button&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","deleteAttachment_"+this._editorId,{attachmentId:t.button.data("objectID")})},_upload:function(s,r,l,o){var m=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(t,d,e,i){i.show();var a=[];r?a.push(r):l?a.push(t.blobToFile(l,"pasted-from-clipboard")):a=this._fileUpload.prop("files");var c,h,n=Promise.resolve(a);this._options.autoScale&&this._options.autoScale.enable&&(c=this._buttonSelector.data("maxSize"),h=new e,n=Array.prototype.reduce.call(a,function(t,o){return t.then(function(e){if(-1===["image/png","image/gif","image/jpeg"].indexOf(o.type))return e.push(o),e;var l=new Promise(function(t,e){setTimeout(function(){t(o)},1e4)}),t=h.loadFile(o).then(function(t){var e,i,a=t.exif,n=this._options.autoScale.maxWidth,s=this._options.autoScale.maxHeight,r=this._options.autoScale.quality;return 2<=window.devicePixelRatio&&(e=window.screen.width*window.devicePixelRatio,i=window.screen.height*window.devicePixelRatio,e-10<t.image.width&&t.image.width<10+e&&i-10<t.image.height&&(n=Math.min(n,window.screen.width))),h.resize(t.image,n,s,r,o.size>c,l).then(function(t){if(void 0===t)return o;var e=this._options.autoScale.fileType;return"keep"!==this._options.autoScale.fileType&&!d.containsTransparentPixels(t)||(e=o.type),h.saveFile({exif:a,image:t},o.name,e,r)}.bind(this)).then(function(t){return t.size>o.size?(console.debug('[WCF.Attachment] File size of "'+o.name+'" increased, uploading untouched image.'),o):t})}.bind(this)).catch(function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+o.name+'":',t),o});return Promise.race([l,t]).then(function(t){return e.push(t),e})}.bind(this))}.bind(this),Promise.resolve([]))),n.then(function(t){var e=void 0;return this._validateLimit()&&(e=m(s,void 0,void 0,t)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof o&&o(e),e}.bind(this)).catch(function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)}).finally(i.hide)}.bind(this),function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)})},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><span class="icon icon64 fa-spinner" /><div><div><p>'+t.name+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_useThumbnail:function(){return!0},_success:function(t,e){var i,a,n,s,r,l,o,d,c,h,m;for(var u in this._uploadMatrix[t]){this._uploadMatrix[t].hasOwnProperty(u)&&((a=this._uploadMatrix[t][u]).find("progress").remove(),n=a.data("filename"),s=a.data("internalFileID"),e.returnValues&&e.returnValues.attachments[s]?(i=e.returnValues.attachments[s],elData(a[0],"object-id",i.attachmentID),i.tinyURL?(a.children(".fa-spinner").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),a.data("height",i.height),a.data("width",i.width),elData(a[0],"is-image",i.isImage)):a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-"+i.iconName),(r=$('<a href=""></a>')).text(n).attr("href",i.url),r[0].target="_blank",0!=i.isImage&&r.addClass("jsImageViewer").attr("title",n),a.find("p").empty().append(r),a.find("small").append(i.formattedFilesize),l=a.find("ul").addClass("buttonGroup"),o=$('<li><span class="button small jsDeleteButton" data-object-id="'+i.attachmentID+'" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</span></li>"),l.append(o),a.data("objectID",i.attachmentID),this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</span></li>").appendTo(l),$('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</span></li>").appendTo(l)):$('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</span></li>").appendTo(l)),this._triggerSync("new",{html:a[0].outerHTML}),this._registerEditorButtons(a[0]),this._replaceOnLoad.hasOwnProperty(t)&&(a.hasClass("uploadFailed")||(d=this._replaceOnLoad[t])&&d.parentNode&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","replaceAttachment_"+this._editorId,{attachmentId:i.attachmentID,img:d,src:i.thumbnailURL?i.thumbnailURL:i.url}),this._replaceOnLoad[t]=null)):(a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),h="",e.returnValues&&e.returnValues.errors[s]?"uploadFailed"===(h=(c=e.returnValues.errors[s]).errorType)&&c.additionalData.phpLimitExceeded&&(h="uploadPhpLimit"):h="uploadFailed",a.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+h)+"</small>")),a.addClass("uploadFailed")),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),a.hasClass("uploadFailed")||((m=a.find(".jsButtonAttachmentInsertThumbnail")).length||(m=a.find(".jsButtonAttachmentInsertFull")),m.trigger("click"))))}this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId,{attachmentId:elData(t.currentTarget,"object-id"),url:elData(t.currentTarget,"url")})},_insertAll:function(){for(var t,e,i=0,a=this._fileListSelector[0].childNodes.length;i<a;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(a){this._fileListSelector.find("li").each(function(t,e){var i=$(e);i.children(".fa-spinner").length&&(i.addClass("uploadFailed").children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),i.find("div > div").append($('<small class="innerError">'+(a.responseJSON&&a.responseJSON.message?a.responseJSON.message:WCF.Language.get("wcf.attachment.upload.error.uploadFailed"))+"</small>")))})},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var i=[];this._fileListSelector.children("li:not(.uploadFailed)").each(function(t,e){i.push($(e).data("objectID"))}),i.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:i,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){var e=elData(t.button[0],"object-id"),i=elBySel('.formAttachmentListItem[data-object-id="'+e+'"]',this._fileListSelector[0]);null!==i&&elRemove(i),this._removeLimitError(t)},_sync:function(t){if(t.source!==this)switch(t.type){case"new":this._syncNew(t.data);break;default:throw new Error("Unexpected type '"+t.type+"'")}},_syncNew:function(a){require(["Dom/Util"],function(t){var e=t.createFragmentFromHtml(a.html),i=elBySel("li",e);i.id="",this._registerEditorButtons(i),this._fileListSelector[0].appendChild(i),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,{source:this,type:t,data:e})}}); })(this);
+(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_replaceOnLoad:{},_options:{},init:function(t,e,i,a,n,s,r,l,o){var d,c;this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:r}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(a),this._tmpHash=n,this._parentObjectID=parseInt(s),this._editorId=l,this._options=$.extend(!0,this._options,o||{}),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),WCF.System.Event.addListener("com.woltlab.wcf.action.delete","attachment",this._onDelete.bind(this)),this._makeSortable(),this._insertAllButton=$('<p class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</p>").hide(),this._editorId&&(this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+this._editorId,this._submitInline.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this._editorId,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId,function(t){var e;t.tmpHashes&&Array.isArray(t.tmpHashes)||(t.tmpHashes=[]),e=t.tmpHashes.indexOf(n),this._fileListSelector.children("li:not(.uploadFailed)").length>0?-1===e&&t.tmpHashes.push(n):-1!==e&&t.tmpHashes.splice(e)}.bind(this)),d=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,function(t){var e,i,a,n,s,r=this._getImageAttachments(),l=t.attributes[0]||0;r.hasOwnProperty(l)&&(e=~~$("#"+this._editorId).data("redactor").opts.woltlab.attachmentThumbnailWidth,i=!0===(i=t.attributes[2])||"true"===i||~~i&&~~i<=e,(a=elCreate("img")).className="woltlabAttachment",a.src=r[l][i?"thumbnailUrl":"url"],elData(a,"attachment-id",l),"left"===(n=t.attributes[1]||"none")?a.classList.add("messageFloatObjectLeft"):"right"===n&&a.classList.add("messageFloatObjectRight"),(s=t.metacode).parentNode.insertBefore(a,s),elRemove(s),t.cancel=!0)}.bind(this)),c=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,this._sync.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this._editorId,function(){WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","submit_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","reset_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,d),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,c)}.bind(this)))},_editorUpload:function(t){var e,i=null;this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0),e=function(e){null===i?this._autoInsert.push(e):this._replaceOnLoad[e]=i,t.uploadID=e}.bind(this),t.file?this._upload(void 0,t.file,void 0,e):(this._upload(void 0,void 0,t.blob,e),i=t.replace||null)},_getImageAttachments:function(){var t={};return this._fileListSelector.children("li").each((function(e,i){var a=$(i);a.data("isImage")&&(t[~~a.data("objectID")]={thumbnailUrl:a.find(".jsButtonAttachmentInsertThumbnail").data("url"),url:a.find(".jsButtonAttachmentInsertFull").data("url")})})),t},_submitInline:function(t){if(this._tmpHash){t.tmpHash=this._tmpHash;var e={};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","getMetaData_"+this._editorId,e),e.tmpHashes&&Array.isArray(e.tmpHashes)&&e.tmpHashes.length>0&&(t.tmpHash+=","+e.tmpHashes.join(","))}},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t,e=this._buttonSelector.next("small.innerError"),i=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,a=this._fileUpload?this._fileUpload.prop("files").length:0;return i<=0||i<a?(t=i<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,i),e.length||(e=$('<small class="innerError" />').insertAfter(this._buttonSelector)),e.html(t),!1):(e.remove(),!0)},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._editorId&&t.button&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","deleteAttachment_"+this._editorId,{attachmentId:t.button.data("objectID")})},_upload:function(t,e,i,a){var n=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(s,r,l,o){var d,c,h,m;o.show(),d=[],e?d.push(e):i?d.push(s.blobToFile(i,"pasted-from-clipboard")):d=this._fileUpload.prop("files"),c=Promise.resolve(d),this._options.autoScale&&this._options.autoScale.enable&&(h=this._buttonSelector.data("maxSize"),m=new l,c=Array.prototype.reduce.call(d,function(t,e){return t.then(function(t){var i,a;return-1===["image/png","image/jpeg","image/webp"].indexOf(e.type)?(t.push(e),t):(i=new Promise((function(t,i){setTimeout((function(){t(e)}),1e4)})),a=m.loadFile(e).then(function(t){var a,n,s=t.exif,l=this._options.autoScale.maxWidth,o=this._options.autoScale.maxHeight,d=this._options.autoScale.quality;return window.devicePixelRatio>=2&&(a=window.screen.width*window.devicePixelRatio,n=window.screen.height*window.devicePixelRatio,a-10<t.image.width&&t.image.width<a+10&&n-10<t.image.height&&(l=Math.min(l,window.screen.width))),m.resize(t.image,l,o,d,e.size>h,i).then(function(t){if(void 0===t)return e;var i=this._options.autoScale.fileType;return("keep"===this._options.autoScale.fileType||r.containsTransparentPixels(t))&&(i=e.type),m.saveFile({exif:s,image:t},e.name,i,d)}.bind(this)).then((function(t){return t.size>e.size?(console.debug('[WCF.Attachment] File size of "'+e.name+'" increased, uploading untouched image.'),e):t}))}.bind(this)).catch((function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+e.name+'":',t),e})),Promise.race([i,a]).then((function(e){return t.push(e),t})))}.bind(this))}.bind(this),Promise.resolve([]))),c.then(function(e){var i=void 0;return this._validateLimit()&&(i=n(t,void 0,void 0,e)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof a&&a(i),i}.bind(this)).catch((function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)})).finally(o.hide)}.bind(this),(function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)}))},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><span class="icon icon64 fa-spinner" /><div><div><p>'+t.name+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_useThumbnail:function(){return!0},_success:function(t,e){var i,a,n,s,r,l,o,d,c,h,m,u;for(a in this._uploadMatrix[t])this._uploadMatrix[t].hasOwnProperty(a)&&((n=this._uploadMatrix[t][a]).find("progress").remove(),s=n.data("filename"),r=n.data("internalFileID"),e.returnValues&&e.returnValues.attachments[r]?(i=e.returnValues.attachments[r],elData(n[0],"object-id",i.attachmentID),i.tinyURL?(n.children(".fa-spinner").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),n.data("height",i.height),n.data("width",i.width),elData(n[0],"is-image",i.isImage)):n.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-"+i.iconName),(l=$('<a href=""></a>')).text(s).attr("href",i.url),l[0].target="_blank",0!=i.isImage&&l.addClass("jsImageViewer").attr("title",s),n.find("p").empty().append(l),n.find("small").append(i.formattedFilesize),o=n.find("ul").addClass("buttonGroup"),d=$('<li><span class="button small jsDeleteButton" data-object-id="'+i.attachmentID+'" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</span></li>"),o.append(d),n.data("objectID",i.attachmentID),this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</span></li>").appendTo(o),$('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</span></li>").appendTo(o)):$('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</span></li>").appendTo(o)),this._triggerSync("new",{html:n[0].outerHTML}),this._registerEditorButtons(n[0]),this._replaceOnLoad.hasOwnProperty(t)&&(n.hasClass("uploadFailed")||(c=this._replaceOnLoad[t])&&c.parentNode&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","replaceAttachment_"+this._editorId,{attachmentId:i.attachmentID,img:c,src:i.thumbnailURL?i.thumbnailURL:i.url}),this._replaceOnLoad[t]=null)):(n.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),h="",e.returnValues&&e.returnValues.errors[r]?"uploadFailed"===(h=(m=e.returnValues.errors[r]).errorType)&&m.additionalData.phpLimitExceeded&&(h="uploadPhpLimit"):h="uploadFailed",n.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+h)+"</small>")),n.addClass("uploadFailed")),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),n.hasClass("uploadFailed")||((u=n.find(".jsButtonAttachmentInsertThumbnail")).length||(u=n.find(".jsButtonAttachmentInsertFull")),u.trigger("click"))));this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId,{attachmentId:elData(t.currentTarget,"object-id"),url:elData(t.currentTarget,"url")})},_insertAll:function(){var t,e,i,a;for(i=0,a=this._fileListSelector[0].childNodes.length;i<a;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(t){this._fileListSelector.find("li").each((function(e,i){var a=$(i);a.children(".fa-spinner").length&&(a.addClass("uploadFailed").children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),a.find("div > div").append($('<small class="innerError">'+(t.responseJSON&&t.responseJSON.message?t.responseJSON.message:WCF.Language.get("wcf.attachment.upload.error.uploadFailed"))+"</small>")))}))},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var t=[];this._fileListSelector.children("li:not(.uploadFailed)").each((function(e,i){t.push($(i).data("objectID"))})),t.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:t,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){var e=elData(t.button[0],"object-id"),i=elBySel('.formAttachmentListItem[data-object-id="'+e+'"]',this._fileListSelector[0]);null!==i&&elRemove(i),this._removeLimitError(t)},_sync:function(t){if(t.source!==this)switch(t.type){case"new":this._syncNew(t.data);break;default:throw new Error("Unexpected type '"+t.type+"'")}},_syncNew:function(t){require(["Dom/Util"],function(e){var i=e.createFragmentFromHtml(t.html),a=elBySel("li",i);a.id="",this._registerEditorButtons(a),this._fileListSelector[0].appendChild(a),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,{source:this,type:t,data:e})}}); })(this);
// WCF.ColorPicker.js
-(function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({_bar:null,_barActive:!1,_barSelector:null,_callbackSubmit:null,_dialog:null,_didInit:!1,_elementID:"",_gradient:null,_gradientActive:!1,_gradientSelector:null,_hex:null,_hsv:{},_newColor:null,_oldColor:null,_rgba:{},_rgbaRegExp:null,init:function(t){this._callbackSubmit=null,this._elementID="",this._hsv={h:0,s:100,v:100},this._position={};var a=$(t);a.length?a.click($.proxy(this._open,this)):console.debug("[WCF.ColorPicker] Selector does not match any element, aborting.")},setCallbackSubmit:function(t){this._callbackSubmit=t},_open:function(t){this._didInit||(this._initColorPicker(),this._didInit=!0);var a=$(t.currentTarget);this._elementID=a.wcfIdentify(),this._parseColor(a);var i=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v);this._oldColor.css({backgroundColor:"rgba("+i.r+", "+i.g+", "+i.b+", "+this._rgba.a.val()/100+")"}),this._dialog.wcfDialog({backdropCloseOnClick:!1,title:WCF.Language.get("wcf.style.colorPicker")}),window.setTimeout(function(){this._hex.focus()}.bind(this),200)},_parseColor:function(t){if(t.data("hsv")&&t.data("rgb")){var a=t.data("hsv");for(var i in a)this._hsv[i]=a[i];this._updateValues(t.data("rgb"),!0,!0),this._rgba.a.val(parseInt(t.data("alpha")))}else{t.data("color").match(/^rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)$/)&&t.data("color","rgba("+RegExp.$1+", "+RegExp.$2+", "+RegExp.$3+", 1)"),null===this._rgbaRegExp&&(this._rgbaRegExp=new RegExp("^rgba\\((\\d{1,3}), ?(\\d{1,3}), ?(\\d{1,3}), ?(1|1\\.00?|0|0?\\.[0-9]{1,2})\\)$")),this._rgbaRegExp.exec(t.data("color"));var s=RegExp.$4;0===s.indexOf(".")&&(s="0"+s),s*=100,this._updateValues({r:RegExp.$1,g:RegExp.$2,b:RegExp.$3,a:Math.round(s)},!0,!0)}},_initColorPicker:function(){this._dialog=$('<div id="colorPickerContainer" />').hide().appendTo(document.body),this._gradient=$('<div id="colorPickerGradient" />').appendTo(this._dialog),this._gradientSelector=$('<span id="colorPickerGradientSelector"><span></span></span>').appendTo(this._gradient),this._bar=$('<div id="colorPickerBar" />').appendTo(this._dialog),this._barSelector=$('<span id="colorPickerBarSelector" />').appendTo(this._bar),this._gradient.mousedown($.proxy(this._mouseDownGradient,this)),this._bar.mousedown($.proxy(this._mouseDownBar,this));var a=this;$(document).mouseup(function(t){a._barActive?(a._barActive=!1,a._mouseBar(t)):a._gradientActive&&(a._gradientActive=!1,a._mouseGradient(t))}).mousemove(function(t){a._barActive?a._mouseBar(t):a._gradientActive&&a._mouseGradient(t)}),this._initColorPickerForm()},_initColorPickerForm:function(){var t=$('<div id="colorPickerForm" />').appendTo(this._dialog);$("<small>"+WCF.Language.get("wcf.style.colorPicker.new")+"</small>").appendTo(t);var a=$('<ul class="colors" />').appendTo(t);this._newColor=$('<li class="new"><span /></li>').appendTo(a).children("span"),this._oldColor=$('<li class="old"><span /></li>').appendTo(a).children("span"),$("<small>"+WCF.Language.get("wcf.style.colorPicker.current")+"</small>").appendTo(t);var i=$('<ul class="rgba" />').appendTo(t);this._createInputElement("r","R",0,255).appendTo(i),this._createInputElement("g","G",0,255).appendTo(i),this._createInputElement("b","B",0,255).appendTo(i),this._createInputElement("a","a",0,100).appendTo(i);var s=$('<ul class="hex"><li><label><span>#</span></label></li></ul>').appendTo(t);this._hex=$('<input type="text" maxlength="6" />').appendTo(s.find("label")),this._rgba.r.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.g.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.b.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.a.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._hex.blur($.proxy(this._blurHex,this)).keyup($.proxy(this._keyUpHex,this));var e=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.style.colorPicker.button.apply")+"</button>").appendTo(e).click($.proxy(this._submit,this));var r=this;this._hex.on("paste",function(){r._hex.attr("maxlength","7"),setTimeout(function(){var t=r._hex.val();"#"==t.substring(0,1)&&(t=t.substr(1)),6<t.length&&(t=t.substring(0,6)),r._hex.attr("maxlength","6").val(t)},50)}),t.find("input").focus(function(){this.select()})},_keyUpRGBA:function(t){13==t.which&&(this._blurRgba(),this._submit())},_keyUpHex:function(t){13==t.which&&(this._blurHex(),this._submit())},_submit:function(){var t=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),a={};for(var i in this._hsv)a[i]=this._hsv[i];var s=$("#"+this._elementID);s.data("hsv",a).css({backgroundColor:"rgba("+t.r+", "+t.g+", "+t.b+", "+this._rgba.a.val()/100+")"}).data("alpha",parseInt(this._rgba.a.val())),s.data("rgb",{r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()}),$("#"+s.data("store")).val("rgba("+this._rgba.r.val()+", "+this._rgba.g.val()+", "+this._rgba.b.val()+", "+this._rgba.a.val()/100+")").trigger("change"),this._dialog.wcfDialog("close"),"function"==typeof this._callbackSubmit&&this._callbackSubmit({r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val(),a:this._rgba.a.val()/100})},_createInputElement:function(t,a,i,s){var e=$('<li class="'+t+'" />'),r=$("<label />").appendTo(e);return $("<span>"+a+"</span>").appendTo(r),this._rgba[t]=$('<input type="number" value="0" min="'+i+'" max="'+s+'" step="1" />').appendTo(r),e},_mouseDownGradient:function(t){this._gradientActive=!0,this._mouseGradient(t)},_mouseGradient:function(t){var a=this._gradient.getOffsets("offset"),i=Math.max(Math.min(t.pageX-a.left,255),0),s=Math.max(Math.min(t.pageY-a.top,255),0);this._hsv.s=100*Math.max(0,Math.min(1,i/255)),this._hsv.v=100*Math.max(0,Math.min(1,(255-s)/255)),this._updateValues(null)},_mouseDownBar:function(t){this._barActive=!0,this._mouseBar(t)},_mouseBar:function(t){var a=this._bar.getOffsets("offset"),i=Math.max(Math.min(t.pageY-a.top,255),0);this._barSelector.css({top:i+"px"}),this._hsv.h=Math.max(0,Math.min(359,Math.round((255-i)/255*360))),this._updateValues(null)},_blurRgba:function(){for(var t in this._rgba){var a=parseInt(this._rgba[t].val())||0;"a"===t?this._rgba[t].val(Math.max(0,Math.min(100,a))):this._rgba[t].val(Math.max(0,Math.min(255,a)))}this._updateValues({r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()},!0,!0)},_blurHex:function(){var t=this.hexToRgb(this._hex.val());t!==Number.NaN&&this._updateValues(t,!0,!0)},_updateValues:function(t,a,i){for(var s in a=!0===a,i=!0===i,null===t&&(t=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),0==this._rgba.a.val()&&(t.a=100)),void 0===t.a&&(t.a=this._rgba.a.val()),t)this._rgba[s].val(t[s]);var e;this._hex.val(this.rgbToHex(t.r,t.g,t.b)),(a||i)&&(e=this.rgbToHsv(t.r,t.g,t.b),a&&(this._hsv.h=e.h),i&&(this._hsv.s=e.s,this._hsv.v=e.v));var r=Math.max(0,Math.min(255,255-this._hsv.h/360*255));this._barSelector.css({top:r+"px"});var o=Math.max(0,Math.min(255,this._hsv.s/100*255)),r=Math.max(0,Math.min(255,255-this._hsv.v/100*255));this._gradientSelector.css({left:o-6+"px",top:r-6+"px"}),this._newColor.css({backgroundColor:"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a/100+")"});var h=this.hsvToRgb(this._hsv.h,100,100);this._gradient.css({backgroundColor:"rgb("+h.r+", "+h.g+", "+h.b+")"})},hsvToRgb:function(t,a,i){return window.__wcf_bc_colorUtil.hsvToRgb(t,a,i)},rgbToHsv:function(t,a,i){return window.__wcf_bc_colorUtil.rgbToHsv(t,a,i)},hexToRgb:function(t){return window.__wcf_bc_colorUtil.hexToRgb(t)},rgbToHex:function(t,a,i){return window.__wcf_bc_colorUtil.rgbToHex(t,a,i)}}),void 0===window.__wcf_bc_colorUtil&&require(["ColorUtil"],function(t){}),"function"==typeof window.__wcf_bc_colorPickerInit&&window.__wcf_bc_colorPickerInit(); })(this);
+(function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({_bar:null,_barActive:!1,_barSelector:null,_callbackSubmit:null,_dialog:null,_didInit:!1,_elementID:"",_gradient:null,_gradientActive:!1,_gradientSelector:null,_hex:null,_hsv:{},_newColor:null,_oldColor:null,_rgba:{},_rgbaRegExp:null,init:function(t){this._callbackSubmit=null,this._elementID="",this._hsv={h:0,s:100,v:100},this._position={};var i=$(t);i.length?i.click($.proxy(this._open,this)):console.debug("[WCF.ColorPicker] Selector does not match any element, aborting.")},setCallbackSubmit:function(t){this._callbackSubmit=t},_open:function(t){var i,a;this._didInit||(this._initColorPicker(),this._didInit=!0),i=$(t.currentTarget),this._elementID=i.wcfIdentify(),this._parseColor(i),a=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),this._oldColor.css({backgroundColor:"rgba("+a.r+", "+a.g+", "+a.b+", "+this._rgba.a.val()/100+")"}),this._dialog.wcfDialog({backdropCloseOnClick:!1,title:WCF.Language.get("wcf.style.colorPicker")}),window.setTimeout(function(){this._hex.focus()}.bind(this),200)},_parseColor:function(t){var i,a,s;if(t.data("hsv")&&t.data("rgb")){for(a in i=t.data("hsv"))this._hsv[a]=i[a];this._updateValues(t.data("rgb"),!0,!0),this._rgba.a.val(parseInt(t.data("alpha")))}else t.data("color").match(/^rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)$/)&&t.data("color","rgba("+RegExp.$1+", "+RegExp.$2+", "+RegExp.$3+", 1)"),null===this._rgbaRegExp&&(this._rgbaRegExp=new RegExp("^rgba\\((\\d{1,3}), ?(\\d{1,3}), ?(\\d{1,3}), ?(1|1\\.00?|0|0?\\.[0-9]{1,2})\\)$")),this._rgbaRegExp.exec(t.data("color")),0===(s=RegExp.$4).indexOf(".")&&(s="0"+s),s*=100,this._updateValues({r:RegExp.$1,g:RegExp.$2,b:RegExp.$3,a:Math.round(s)},!0,!0)},_initColorPicker:function(){this._dialog=$('<div id="colorPickerContainer" />').hide().appendTo(document.body),this._gradient=$('<div id="colorPickerGradient" />').appendTo(this._dialog),this._gradientSelector=$('<span id="colorPickerGradientSelector"><span></span></span>').appendTo(this._gradient),this._bar=$('<div id="colorPickerBar" />').appendTo(this._dialog),this._barSelector=$('<span id="colorPickerBarSelector" />').appendTo(this._bar),this._gradient.mousedown($.proxy(this._mouseDownGradient,this)),this._bar.mousedown($.proxy(this._mouseDownBar,this));var t=this;$(document).mouseup((function(i){t._barActive?(t._barActive=!1,t._mouseBar(i)):t._gradientActive&&(t._gradientActive=!1,t._mouseGradient(i))})).mousemove((function(i){t._barActive?t._mouseBar(i):t._gradientActive&&t._mouseGradient(i)})),this._initColorPickerForm()},_initColorPickerForm:function(){var t,i,a,s,e,r=$('<div id="colorPickerForm" />').appendTo(this._dialog);$("<small>"+WCF.Language.get("wcf.style.colorPicker.new")+"</small>").appendTo(r),t=$('<ul class="colors" />').appendTo(r),this._newColor=$('<li class="new"><span /></li>').appendTo(t).children("span"),this._oldColor=$('<li class="old"><span /></li>').appendTo(t).children("span"),$("<small>"+WCF.Language.get("wcf.style.colorPicker.current")+"</small>").appendTo(r),i=$('<ul class="rgba" />').appendTo(r),this._createInputElement("r","R",0,255).appendTo(i),this._createInputElement("g","G",0,255).appendTo(i),this._createInputElement("b","B",0,255).appendTo(i),this._createInputElement("a","a",0,100).appendTo(i),a=$('<ul class="hex"><li><label><span>#</span></label></li></ul>').appendTo(r),this._hex=$('<input type="text" maxlength="6" />').appendTo(a.find("label")),this._rgba.r.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.g.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.b.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.a.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._hex.blur($.proxy(this._blurHex,this)).keyup($.proxy(this._keyUpHex,this)),s=$('<div class="formSubmit" />').appendTo(this._dialog),$('<button class="buttonPrimary">'+WCF.Language.get("wcf.style.colorPicker.button.apply")+"</button>").appendTo(s).click($.proxy(this._submit,this)),e=this,this._hex.on("paste",(function(){e._hex.attr("maxlength","7"),setTimeout((function(){var t=e._hex.val();"#"==t.substring(0,1)&&(t=t.substr(1)),t.length>6&&(t=t.substring(0,6)),e._hex.attr("maxlength","6").val(t)}),50)})),r.find("input").focus((function(){this.select()}))},_keyUpRGBA:function(t){13==t.which&&(this._blurRgba(),this._submit())},_keyUpHex:function(t){13==t.which&&(this._blurHex(),this._submit())},_submit:function(){var t,i,a=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),s={};for(t in this._hsv)s[t]=this._hsv[t];(i=$("#"+this._elementID)).data("hsv",s).css({backgroundColor:"rgba("+a.r+", "+a.g+", "+a.b+", "+this._rgba.a.val()/100+")"}).data("alpha",parseInt(this._rgba.a.val())),i.data("rgb",{r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()}),$("#"+i.data("store")).val("rgba("+this._rgba.r.val()+", "+this._rgba.g.val()+", "+this._rgba.b.val()+", "+this._rgba.a.val()/100+")").trigger("change"),this._dialog.wcfDialog("close"),"function"==typeof this._callbackSubmit&&this._callbackSubmit({r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val(),a:this._rgba.a.val()/100})},_createInputElement:function(t,i,a,s){var e=$('<li class="'+t+'" />'),r=$("<label />").appendTo(e);return $("<span>"+i+"</span>").appendTo(r),this._rgba[t]=$('<input type="number" value="0" min="'+a+'" max="'+s+'" step="1" />').appendTo(r),e},_mouseDownGradient:function(t){this._gradientActive=!0,this._mouseGradient(t)},_mouseGradient:function(t){var i=this._gradient.getOffsets("offset"),a=Math.max(Math.min(t.pageX-i.left,255),0),s=Math.max(Math.min(t.pageY-i.top,255),0);this._hsv.s=100*Math.max(0,Math.min(1,a/255)),this._hsv.v=100*Math.max(0,Math.min(1,(255-s)/255)),this._updateValues(null)},_mouseDownBar:function(t){this._barActive=!0,this._mouseBar(t)},_mouseBar:function(t){var i=this._bar.getOffsets("offset"),a=Math.max(Math.min(t.pageY-i.top,255),0);this._barSelector.css({top:a+"px"}),this._hsv.h=Math.max(0,Math.min(359,Math.round((255-a)/255*360))),this._updateValues(null)},_blurRgba:function(){var t,i;for(t in this._rgba)i=parseInt(this._rgba[t].val())||0,"a"===t?this._rgba[t].val(Math.max(0,Math.min(100,i))):this._rgba[t].val(Math.max(0,Math.min(255,i)));this._updateValues({r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()},!0,!0)},_blurHex:function(){var t=this.hexToRgb(this._hex.val());t!==Number.NaN&&this._updateValues(t,!0,!0)},_updateValues:function(t,i,a){var s,e,r,o,h;for(s in i=!0===i,a=!0===a,null===t&&(t=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),0==this._rgba.a.val()&&(t.a=100)),void 0===t.a&&(t.a=this._rgba.a.val()),t)this._rgba[s].val(t[s]);this._hex.val(this.rgbToHex(t.r,t.g,t.b)),(i||a)&&(e=this.rgbToHsv(t.r,t.g,t.b),i&&(this._hsv.h=e.h),a&&(this._hsv.s=e.s,this._hsv.v=e.v)),r=Math.max(0,Math.min(255,255-this._hsv.h/360*255)),this._barSelector.css({top:r+"px"}),o=Math.max(0,Math.min(255,this._hsv.s/100*255)),r=Math.max(0,Math.min(255,255-this._hsv.v/100*255)),this._gradientSelector.css({left:o-6+"px",top:r-6+"px"}),this._newColor.css({backgroundColor:"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a/100+")"}),h=this.hsvToRgb(this._hsv.h,100,100),this._gradient.css({backgroundColor:"rgb("+h.r+", "+h.g+", "+h.b+")"})},hsvToRgb:function(t,i,a){return window.__wcf_bc_colorUtil.hsvToRgb(t,i,a)},rgbToHsv:function(t,i,a){return window.__wcf_bc_colorUtil.rgbToHsv(t,i,a)},hexToRgb:function(t){return window.__wcf_bc_colorUtil.hexToRgb(t)},rgbToHex:function(t,i,a){return window.__wcf_bc_colorUtil.rgbToHex(t,i,a)}}),void 0===window.__wcf_bc_colorUtil&&require(["ColorUtil"],(function(t){})),"function"==typeof window.__wcf_bc_colorPickerInit&&window.__wcf_bc_colorPickerInit(); })(this);
// WCF.Comment.js
-(function (window, undefined) { "use strict";WCF.Comment={},WCF.Comment.Handler=Class.extend({_commentButtonList:{},_comments:{},_container:null,_containerID:"",_displayedComments:0,_loadNextComments:null,_loadNextResponses:{},_proxy:null,_responses:{},_responseCache:{},_commentData:{},_guestDialog:null,_permalinkComment:null,_permalinkResponse:null,_scrollTarget:null,init:function(e){var t,n;this._commentButtonList={},this._comments={},this._containerID=e,this._displayedComments=0,this._loadNextComments=null,this._loadNextResponses={},this._permalinkComment=null,this._permalinkResponse=null,this._responseAdd=null,this._responseCache={},this._responseRevert=null,this._responses={},this._scrollTarget=null,this._onResponsesLoaded=null,this._container=$("#"+$.wcfEscapeID(this._containerID)),this._container.length?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initComments(),this._initResponses(),this._container.data("canAdd")&&(null===elBySel(".commentListAddComment .wysiwygTextarea",this._container[0])?console.error("Missing WYSIWYG implementation, adding comments is not available."):require(["WoltLabSuite/Core/Ui/Comment/Add","WoltLabSuite/Core/Ui/Comment/Response/Add"],function(e,t){new e(elBySel(".jsCommentAdd",this._container[0])),this._responseAdd=new t(elBySel(".jsCommentResponseAdd",this._container[0]),{callbackInsert:function(){null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null)}.bind(this)})}.bind(this))),require(["WoltLabSuite/Core/Ui/Comment/Edit","WoltLabSuite/Core/Ui/Comment/Response/Edit"],function(e,t){new e(this._container[0]),new t(this._container[0])}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Comment.Handler",$.proxy(this._domNodeInserted,this)),WCF.System.ObjectStore.add("WCF.Comment.Handler",this),window.addEventListener("hashchange",function(){var t,e=window.location.hash;e&&e.match(/.+\/(comment\d+)/)&&(t=RegExp.$1,window.setTimeout(function(){var e=elById(t);e&&e.scrollIntoView({behavior:"smooth"})},100))}),window.location.hash.match(/^#(?:[^\/]+\/)?comment(\d+)(?:\/response(\d+))?/)&&((t=elById("comment"+RegExp.$1))?RegExp.$2?(n=elById("comment"+RegExp.$1+"response"+RegExp.$2))?this._scrollTo(n,!0):this._loadResponseSegment(t,RegExp.$1,RegExp.$2):this._scrollTo(t,!0):this._loadCommentSegment(RegExp.$1,RegExp.$2))):console.debug("[WCF.Comment.Handler] Unable to find container identified by '"+this._containerID+"'")},_scrollTo:function(t,n){null===this._scrollTarget&&(this._scrollTarget=elCreate("span"),this._scrollTarget.className="commentScrollTarget",document.body.appendChild(this._scrollTarget)),this._scrollTarget.style.setProperty("top",t.getBoundingClientRect().top+window.pageYOffset-49+"px",""),require(["Ui/Scroll"],function(e){e.element(this._scrollTarget,function(){n&&(t.classList.contains("commentHighlightTarget")&&(t.classList.remove("commentHighlightTarget"),t.offsetTop),t.classList.add("commentHighlightTarget"))})}.bind(this))},_loadCommentSegment:function(e,t){this._permalinkComment=elCreate("li"),this._permalinkComment.className="commentPermalinkContainer loading",this._permalinkComment.innerHTML='<span class="icon icon48 fa-spinner"></span>',this._container[0].insertBefore(this._permalinkComment,this._container[0].firstChild),this._proxy.setOption("data",{actionName:"loadComment",className:"wcf\\data\\comment\\CommentAction",objectIDs:[e],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~t}}}),this._proxy.sendRequest()},_loadResponseSegment:function(e,t,n){this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>';var s=elBySel(".commentResponseList",e);s.insertBefore(this._permalinkResponse,s.firstChild),this._proxy.setOption("data",{actionName:"loadResponse",className:"wcf\\data\\comment\\CommentAction",objectIDs:[t],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~n}}}),this._proxy.sendRequest()},_handleLoadNextComments:function(){this._displayedComments<this._container.data("comments")?(null===this._loadNextComments&&(this._loadNextComments=$('<li class="commentLoadNext showMore"><button class="small">'+WCF.Language.get("wcf.comment.more")+"</button></li>").appendTo(this._container),this._loadNextComments.children("button").click($.proxy(this._loadComments,this))),this._loadNextComments.children("button").enable()):null!==this._loadNextComments&&this._loadNextComments.remove()},_handleLoadNextResponses:function(e){var t,n=this._comments[e];n.data("displayedResponses",n.find("ul.commentResponseList > li").length),n.data("displayedResponses")<n.data("responses")?void 0===this._loadNextResponses[e]&&(t=n.data("responses")-n.data("displayedResponses"),this._loadNextResponses[e]=$('<li class="jsCommentLoadNextResponses"><a>'+WCF.Language.get("wcf.comment.response.more",{count:t})+"</a></li>").appendTo(this._commentButtonList[e]),this._loadNextResponses[e].children("a").data("commentID",e).click($.proxy(this._loadResponses,this)),this._commentButtonList[e].parent().show()):void 0!==this._loadNextResponses[e]&&this._loadNextResponses[e].remove()},_loadComments:function(){this._loadNextComments.children("button").disable(),this._proxy.setOption("data",{actionName:"loadComments",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),lastCommentTime:this._container.data("lastCommentTime")}}}),this._proxy.sendRequest()},_loadResponses:function(e){this._loadResponsesExecute($(e.currentTarget).disable().data("commentID"),!1)},_loadResponsesExecute:function(e,t){this._proxy.setOption("data",{actionName:"loadResponses",className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{commentID:e,lastResponseTime:this._comments[e].data("lastResponseTime"),loadAllResponses:t?1:0}}}),this._proxy.sendRequest()},_domNodeInserted:function(){this._initComments(),this._initResponses()},_initComments:function(){var a=(a=elBySel('link[rel="canonical"]'))?a.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");e&&(a+="#"+elData(e,"name"));var l=this,m=!1;this._container.find(".jsComment").each(function(e,t){var n=$(t).removeClass("jsComment"),s=n.data("commentID");(l._comments[s]=n)[0].id="comment"+s;var o=n.find("ul.commentResponseList");o.length||(o=n.find(".commentContent"));var i=$('<div class="commentOptionContainer" />').hide().insertAfter(o);l._commentButtonList[s]=$('<ul class="inlineList dotSeparated" />').appendTo(i),l._handleLoadNextResponses(s),l._initComment(s,n),l._initPermalink(n[0],a),l._displayedComments++,m=!0}),m&&this._handleLoadNextComments()},_initComment:function(e,t){this._container.data("canAdd")&&this._initAddResponse(e,t),t.data("canEdit")&&$('<li><a href="#" class="jsCommentEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>").data("commentID",e).appendTo(t.find("ul.buttonList:eq(0)")).click($.proxy(this._delete,this));var n=elBySel(".jsEnableComment",t[0]);n&&n.addEventListener(WCF_CLICK_EVENT,this._enableComment.bind(this))},_enableComment:function(e){e.preventDefault();var t=e.currentTarget.closest(".comment");this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\comment\\CommentAction",objectIDs:[elData(t,"object-id")]}),this._proxy.sendRequest()},_initPermalink:function(e,t){var n=elCreate("a");n.href=t+(-1===t.indexOf("#")?"#":"/")+"comment"+elData(e,"object-id");var s=elBySel(".commentContent:not(.commentResponseContent) .containerHeadline time",e);s.parentNode.insertBefore(n,s),n.appendChild(s)},_initResponses:function(){var o=(o=elBySel('link[rel="canonical"]'))?o.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");for(var i in e&&(o+="#"+elData(e,"name")),this._comments)this._comments.hasOwnProperty(i)&&elBySelAll(".jsCommentResponse",this._comments[i][0],function(e){var t=$(e).removeClass("jsCommentResponse"),n=t.data("responseID");this._responses[n]=t,e.id="comment"+i+"response"+n,this._initResponse(n,t),this._initPermalinkResponse(i,e,n,o);var s=elBySel(".jsEnableResponse",e);s&&s.addEventListener(WCF_CLICK_EVENT,this._enableCommentResponse.bind(this))}.bind(this))},_enableCommentResponse:function(e){e.preventDefault();var t=e.currentTarget.closest(".commentResponse");this._proxy.setOption("data",{actionName:"enableResponse",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{responseID:elData(t,"object-id")}}}),this._proxy.sendRequest()},_initPermalinkResponse:function(e,t,n,s){var o=elCreate("a");o.href=s+(-1===s.indexOf("#")?"#":"/")+"comment"+e+"/response"+n;var i=elBySel(".commentResponseContent .containerHeadline time",t);i.parentNode.insertBefore(o,i),o.appendChild(i)},_initResponse:function(e,t){var n,s;t.data("canEdit")&&$('<li><a href="#" class="jsCommentResponseEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&(n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>"),s=this,n.data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")).click(function(e){s._delete(e,!0)}))},_initAddResponse:function(e,t){$('<li class="jsCommentShowAddResponse"><a>'+WCF.Language.get("wcf.comment.button.response.add")+"</a></li>").data("commentID",e).click($.proxy(this._showAddResponse,this)).appendTo(this._commentButtonList[e]);this._commentButtonList[e].parent().show()},_showAddResponse:function(e){var t,n,s;e.preventDefault(),null===this._onResponsesLoaded&&(null!==this._responseAdd?null!==(t=this._responseAdd.getContainer())&&(null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null),n=$(e.currentTarget),s=n.data("commentID"),this._onResponsesLoaded=function(){n.hide(),t.parentNode&&t.parentNode.classList.contains("jsCommentResponseAddContainer")&&elRemove(t.parentNode);var e=this._commentButtonList[s][0].closest(".commentOptionContainer");e.parentNode.insertBefore(t,e.nextSibling),"string"==typeof this._responseCache[s]?this._responseAdd.setContent(this._responseCache[s]):this._responseAdd.setContent(""),this._responseRevert=function(){this._responseCache[s]=this._responseAdd.getContent(),elRemove(t),n.show()}.bind(this),this._onResponsesLoaded=null}.bind(this),n.prev().hasClass("jsCommentLoadNextResponses")?(this._loadResponsesExecute(s,!0),n.parent().children(".button").disable()):this._onResponsesLoaded()):console.error("Missing response API."))},_delete:function(n,s){n.preventDefault(),WCF.System.Confirmation.show(WCF.Language.get("wcf.comment.delete.confirmMessage"),$.proxy(function(e){var t;"confirm"===e&&(t={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")},!0!==s?t.commentID=$(n.currentTarget).data("commentID"):t.responseID=$(n.currentTarget).data("responseID"),this._proxy.setOption("data",{actionName:"remove",className:"wcf\\data\\comment\\CommentAction",parameters:{data:t}}),this._proxy.sendRequest())},this))},_success:function(e,t,n){switch(e.actionName){case"enable":this._enable(e);break;case"enableResponse":this._enableResponse(e);break;case"loadComment":this._insertComment(e);break;case"loadComments":this._insertComments(e);break;case"loadResponse":this._insertResponse(e);break;case"loadResponses":this._insertResponses(e);break;case"remove":this._remove(e)}WCF.DOMNodeInsertedHandler.execute()},_enable:function(e){var t,n,s;!e.returnValues.commentID||(t=elBySel('.comment[data-object-id="'+e.returnValues.commentID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableComment",t))&&elRemove(s.parentNode))},_enableResponse:function(e){var t,n,s;!e.returnValues.responseID||(t=elBySel('.commentResponse[data-object-id="'+e.returnValues.responseID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableResponse",t))&&elRemove(s.parentNode))},_insertComment:function(e){var t,n;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkComment),(t=this._permalinkComment.previousElementSibling).classList.add("commentPermalinkContainer"),elRemove(this._permalinkComment),this._permalinkComment=t,e.returnValues.response&&(this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>',(n=elBySel(".commentResponseList",t)).insertBefore(this._permalinkResponse,n.firstChild),this._insertResponse({returnValues:{template:e.returnValues.response}})),t.offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkComment)},_insertResponse:function(e){var t;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkResponse),(t=this._permalinkResponse.previousElementSibling).classList.add("commentResponsePermalinkContainer"),elRemove(this._permalinkResponse),(this._permalinkResponse=t).offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkResponse)},_insertComments:function(e){var t;$(e.returnValues.template).insertBefore(this._loadNextComments),this._container.data("lastCommentTime",e.returnValues.lastCommentTime),this._permalinkComment&&(t=elData(this._permalinkComment,"object-id"),null!==elBySel('.comment[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkComment),this._permalinkComment=null)),this._initComments()},_insertResponses:function(e){var t,n=this._comments[e.returnValues.commentID];$(e.returnValues.template).appendTo(n.find("ul.commentResponseList")),n.data("lastResponseTime",e.returnValues.lastResponseTime),this._handleLoadNextResponses(e.returnValues.commentID),this._permalinkResponse&&(t=elData(this._permalinkResponse,"object-id"),null!==elBySel('.commentResponse[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkResponse),this._permalinkResponse=null)),null!==this._onResponsesLoaded&&this._onResponsesLoaded()},_remove:function(e){var t,n,s;e.returnValues.commentID?(this._comments[e.returnValues.commentID].remove(),delete this._comments[e.returnValues.commentID]):(t=this._responses[e.returnValues.responseID],(n=this._comments[t.parents("li.comment:eq(0)").data("commentID")]).data("responses",parseInt(n.data("responses"))-1),s=t.parent(),t.remove(),s.children().length||s.empty(),delete this._responses[e.returnValues.responseID])},_prepareEdit:function(){console.warn("This method is no longer supported.")},_keyUp:function(){console.warn("This method is no longer supported.")},_save:function(){console.warn("This method is no longer supported.")},_failure:function(){console.warn("This method is no longer supported.")},_edit:function(){console.warn("This method is no longer supported.")},_update:function(){console.warn("This method is no longer supported.")},_createGuestDialog:function(){console.warn("This method is no longer supported.")},_keyDown:function(){console.warn("This method is no longer supported.")},_submit:function(){console.warn("This method is no longer supported.")},_keyUpEdit:function(){console.warn("This method is no longer supported.")},_saveEdit:function(){console.warn("This method is no longer supported.")},_cancelEdit:function(){console.warn("This method is no longer supported.")}}),WCF.Comment.Response={}; })(this);
+(function (window, undefined) { "use strict";WCF.Comment={},WCF.Comment.Handler=Class.extend({_commentButtonList:{},_comments:{},_container:null,_containerID:"",_displayedComments:0,_loadNextComments:null,_loadNextResponses:{},_proxy:null,_responses:{},_responseCache:{},_commentData:{},_guestDialog:null,_permalinkComment:null,_permalinkResponse:null,_scrollTarget:null,init:function(e){var t,n;this._commentButtonList={},this._comments={},this._containerID=e,this._displayedComments=0,this._loadNextComments=null,this._loadNextResponses={},this._permalinkComment=null,this._permalinkResponse=null,this._responseAdd=null,this._responseCache={},this._responseRevert=null,this._responses={},this._scrollTarget=null,this._onResponsesLoaded=null,this._container=$("#"+$.wcfEscapeID(this._containerID)),this._container.length?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initComments(),this._initResponses(),this._container.data("canAdd")&&(null===elBySel(".commentListAddComment .wysiwygTextarea",this._container[0])?console.error("Missing WYSIWYG implementation, adding comments is not available."):require(["WoltLabSuite/Core/Ui/Comment/Add","WoltLabSuite/Core/Ui/Comment/Response/Add"],function(e,t){new e(elBySel(".jsCommentAdd",this._container[0])),this._responseAdd=new t(elBySel(".jsCommentResponseAdd",this._container[0]),{callbackInsert:function(){null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null)}.bind(this)})}.bind(this))),require(["WoltLabSuite/Core/Ui/Comment/Edit","WoltLabSuite/Core/Ui/Comment/Response/Edit"],function(e,t){new e(this._container[0]),new t(this._container[0])}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Comment.Handler",$.proxy(this._domNodeInserted,this)),WCF.System.ObjectStore.add("WCF.Comment.Handler",this),window.addEventListener("hashchange",(function(){var e,t=window.location.hash;t&&t.match(/.+\/(comment\d+)/)&&(e=RegExp.$1,window.setTimeout((function(){var t=elById(e);t&&t.scrollIntoView({behavior:"smooth"})}),100))})),window.location.hash.match(/^#(?:[^\/]+\/)?comment(\d+)(?:\/response(\d+))?/)&&((t=elById("comment"+RegExp.$1))?RegExp.$2?(n=elById("comment"+RegExp.$1+"response"+RegExp.$2))?this._scrollTo(n,!0):this._loadResponseSegment(t,RegExp.$1,RegExp.$2):this._scrollTo(t,!0):this._loadCommentSegment(RegExp.$1,RegExp.$2))):console.debug("[WCF.Comment.Handler] Unable to find container identified by '"+this._containerID+"'")},_scrollTo:function(e,t){null===this._scrollTarget&&(this._scrollTarget=elCreate("span"),this._scrollTarget.className="commentScrollTarget",document.body.appendChild(this._scrollTarget)),this._scrollTarget.style.setProperty("top",e.getBoundingClientRect().top+window.pageYOffset-49+"px",""),require(["Ui/Scroll"],function(n){n.element(this._scrollTarget,(function(){t&&(e.classList.contains("commentHighlightTarget")&&(e.classList.remove("commentHighlightTarget"),e.offsetTop),e.classList.add("commentHighlightTarget"))}))}.bind(this))},_loadCommentSegment:function(e,t){this._permalinkComment=elCreate("li"),this._permalinkComment.className="commentPermalinkContainer loading",this._permalinkComment.innerHTML='<span class="icon icon48 fa-spinner"></span>',this._container[0].insertBefore(this._permalinkComment,this._container[0].firstChild),this._proxy.setOption("data",{actionName:"loadComment",className:"wcf\\data\\comment\\CommentAction",objectIDs:[e],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~t}}}),this._proxy.sendRequest()},_loadResponseSegment:function(e,t,n){this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>';var s=elBySel(".commentResponseList",e);s.insertBefore(this._permalinkResponse,s.firstChild),this._proxy.setOption("data",{actionName:"loadResponse",className:"wcf\\data\\comment\\CommentAction",objectIDs:[t],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~n}}}),this._proxy.sendRequest()},_handleLoadNextComments:function(){this._displayedComments<this._container.data("comments")?(null===this._loadNextComments&&(this._loadNextComments=$('<li class="commentLoadNext showMore"><button class="small">'+WCF.Language.get("wcf.comment.more")+"</button></li>").appendTo(this._container),this._loadNextComments.children("button").click($.proxy(this._loadComments,this))),this._loadNextComments.children("button").enable()):null!==this._loadNextComments&&this._loadNextComments.remove()},_handleLoadNextResponses:function(e){var t,n=this._comments[e];n.data("displayedResponses",n.find("ul.commentResponseList > li").length),n.data("displayedResponses")<n.data("responses")?void 0===this._loadNextResponses[e]&&(t=n.data("responses")-n.data("displayedResponses"),this._loadNextResponses[e]=$('<li class="jsCommentLoadNextResponses"><a>'+WCF.Language.get("wcf.comment.response.more",{count:t})+"</a></li>").appendTo(this._commentButtonList[e]),this._loadNextResponses[e].children("a").data("commentID",e).click($.proxy(this._loadResponses,this)),this._commentButtonList[e].parent().show()):void 0!==this._loadNextResponses[e]&&this._loadNextResponses[e].remove()},_loadComments:function(){this._loadNextComments.children("button").disable(),this._proxy.setOption("data",{actionName:"loadComments",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),lastCommentTime:this._container.data("lastCommentTime")}}}),this._proxy.sendRequest()},_loadResponses:function(e){this._loadResponsesExecute($(e.currentTarget).disable().data("commentID"),!1)},_loadResponsesExecute:function(e,t){this._proxy.setOption("data",{actionName:"loadResponses",className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{commentID:e,lastResponseTime:this._comments[e].data("lastResponseTime"),loadAllResponses:t?1:0}}}),this._proxy.sendRequest()},_domNodeInserted:function(){this._initComments(),this._initResponses()},_initComments:function(){var e,t,n,s=elBySel('link[rel="canonical"]');s=s?s.href:window.location.toString().replace(/#.+$/,""),(e=this._container[0].closest(".tabMenuContent"))&&(s+="#"+elData(e,"name")),t=this,n=!1,this._container.find(".jsComment").each((function(e,o){var i,a,l=$(o).removeClass("jsComment"),m=l.data("commentID");t._comments[m]=l,l[0].id="comment"+m,(i=l.find("ul.commentResponseList")).length||(i=l.find(".commentContent")),a=$('<div class="commentOptionContainer" />').hide().insertAfter(i),t._commentButtonList[m]=$('<ul class="inlineList dotSeparated" />').appendTo(a),t._handleLoadNextResponses(m),t._initComment(m,l),t._initPermalink(l[0],s),t._displayedComments++,n=!0})),n&&this._handleLoadNextComments()},_initComment:function(e,t){var n;this._container.data("canAdd")&&this._initAddResponse(e,t),t.data("canEdit")&&$('<li><a href="#" class="jsCommentEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>").data("commentID",e).appendTo(t.find("ul.buttonList:eq(0)")).click($.proxy(this._delete,this)),(n=elBySel(".jsEnableComment",t[0]))&&n.addEventListener("click",this._enableComment.bind(this))},_enableComment:function(e){e.preventDefault();var t=e.currentTarget.closest(".comment");this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\comment\\CommentAction",objectIDs:[elData(t,"object-id")]}),this._proxy.sendRequest()},_initPermalink:function(e,t){var n,s=elCreate("a");s.href=t+(-1===t.indexOf("#")?"#":"/")+"comment"+elData(e,"object-id"),(n=elBySel(".commentContent:not(.commentResponseContent) .containerHeadline time",e)).parentNode.insertBefore(s,n),s.appendChild(n)},_initResponses:function(){var e,t,n=elBySel('link[rel="canonical"]');for(t in n=n?n.href:window.location.toString().replace(/#.+$/,""),(e=this._container[0].closest(".tabMenuContent"))&&(n+="#"+elData(e,"name")),this._comments)this._comments.hasOwnProperty(t)&&elBySelAll(".jsCommentResponse",this._comments[t][0],function(e){var s,o=$(e).removeClass("jsCommentResponse"),i=o.data("responseID");this._responses[i]=o,e.id="comment"+t+"response"+i,this._initResponse(i,o),this._initPermalinkResponse(t,e,i,n),(s=elBySel(".jsEnableResponse",e))&&s.addEventListener("click",this._enableCommentResponse.bind(this))}.bind(this))},_enableCommentResponse:function(e){e.preventDefault();var t=e.currentTarget.closest(".commentResponse");this._proxy.setOption("data",{actionName:"enableResponse",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{responseID:elData(t,"object-id")}}}),this._proxy.sendRequest()},_initPermalinkResponse:function(e,t,n,s){var o,i=elCreate("a");i.href=s+(-1===s.indexOf("#")?"#":"/")+"comment"+e+"/response"+n,(o=elBySel(".commentResponseContent .containerHeadline time",t)).parentNode.insertBefore(i,o),i.appendChild(o)},_initResponse:function(e,t){var n,s;t.data("canEdit")&&$('<li><a href="#" class="jsCommentResponseEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&(n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>"),s=this,n.data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")).click((function(e){s._delete(e,!0)})))},_initAddResponse:function(e,t){$('<li class="jsCommentShowAddResponse"><a>'+WCF.Language.get("wcf.comment.button.response.add")+"</a></li>").data("commentID",e).click($.proxy(this._showAddResponse,this)).appendTo(this._commentButtonList[e]);this._commentButtonList[e].parent().show()},_showAddResponse:function(e){var t,n,s;e.preventDefault(),null===this._onResponsesLoaded&&(null!==this._responseAdd?null!==(t=this._responseAdd.getContainer())&&(null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null),n=$(e.currentTarget),s=n.data("commentID"),this._onResponsesLoaded=function(){n.hide(),t.parentNode&&t.parentNode.classList.contains("jsCommentResponseAddContainer")&&elRemove(t.parentNode);var e=this._commentButtonList[s][0].closest(".commentOptionContainer");e.parentNode.insertBefore(t,e.nextSibling),"string"==typeof this._responseCache[s]?this._responseAdd.setContent(this._responseCache[s]):this._responseAdd.setContent(""),this._responseRevert=function(){this._responseCache[s]=this._responseAdd.getContent(),elRemove(t),n.show()}.bind(this),this._onResponsesLoaded=null}.bind(this),n.prev().hasClass("jsCommentLoadNextResponses")?(this._loadResponsesExecute(s,!0),n.parent().children(".button").disable()):this._onResponsesLoaded()):console.error("Missing response API."))},_delete:function(e,t){e.preventDefault(),WCF.System.Confirmation.show(WCF.Language.get("wcf.comment.delete.confirmMessage"),$.proxy((function(n){if("confirm"===n){var s={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")};!0!==t?s.commentID=$(e.currentTarget).data("commentID"):s.responseID=$(e.currentTarget).data("responseID"),this._proxy.setOption("data",{actionName:"remove",className:"wcf\\data\\comment\\CommentAction",parameters:{data:s}}),this._proxy.sendRequest()}}),this))},_success:function(e,t,n){switch(e.actionName){case"enable":this._enable(e);break;case"enableResponse":this._enableResponse(e);break;case"loadComment":this._insertComment(e);break;case"loadComments":this._insertComments(e);break;case"loadResponse":this._insertResponse(e);break;case"loadResponses":this._insertResponses(e);break;case"remove":this._remove(e)}WCF.DOMNodeInsertedHandler.execute()},_enable:function(e){var t,n,s;e.returnValues.commentID&&(t=elBySel('.comment[data-object-id="'+e.returnValues.commentID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableComment",t))&&elRemove(s.parentNode))},_enableResponse:function(e){var t,n,s;e.returnValues.responseID&&(t=elBySel('.commentResponse[data-object-id="'+e.returnValues.responseID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableResponse",t))&&elRemove(s.parentNode))},_insertComment:function(e){var t,n;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkComment),(t=this._permalinkComment.previousElementSibling).classList.add("commentPermalinkContainer"),elRemove(this._permalinkComment),this._permalinkComment=t,e.returnValues.response&&(this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>',(n=elBySel(".commentResponseList",t)).insertBefore(this._permalinkResponse,n.firstChild),this._insertResponse({returnValues:{template:e.returnValues.response}})),t.offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkComment)},_insertResponse:function(e){if(""!==e.returnValues.template){$(e.returnValues.template).insertBefore(this._permalinkResponse);var t=this._permalinkResponse.previousElementSibling;t.classList.add("commentResponsePermalinkContainer"),elRemove(this._permalinkResponse),this._permalinkResponse=t,t.offsetTop,t.classList.add("commentHighlightTarget")}else elRemove(this._permalinkResponse)},_insertComments:function(e){if($(e.returnValues.template).insertBefore(this._loadNextComments),this._container.data("lastCommentTime",e.returnValues.lastCommentTime),this._permalinkComment){var t=elData(this._permalinkComment,"object-id");null!==elBySel('.comment[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkComment),this._permalinkComment=null)}this._initComments()},_insertResponses:function(e){var t,n=this._comments[e.returnValues.commentID];$(e.returnValues.template).appendTo(n.find("ul.commentResponseList")),n.data("lastResponseTime",e.returnValues.lastResponseTime),this._handleLoadNextResponses(e.returnValues.commentID),this._permalinkResponse&&(t=elData(this._permalinkResponse,"object-id"),null!==elBySel('.commentResponse[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkResponse),this._permalinkResponse=null)),null!==this._onResponsesLoaded&&this._onResponsesLoaded()},_remove:function(e){var t,n,s;e.returnValues.commentID?(this._comments[e.returnValues.commentID].remove(),delete this._comments[e.returnValues.commentID]):(t=this._responses[e.returnValues.responseID],(n=this._comments[t.parents("li.comment:eq(0)").data("commentID")]).data("responses",parseInt(n.data("responses"))-1),s=t.parent(),t.remove(),s.children().length||s.empty(),delete this._responses[e.returnValues.responseID])},_prepareEdit:function(){console.warn("This method is no longer supported.")},_keyUp:function(){console.warn("This method is no longer supported.")},_save:function(){console.warn("This method is no longer supported.")},_failure:function(){console.warn("This method is no longer supported.")},_edit:function(){console.warn("This method is no longer supported.")},_update:function(){console.warn("This method is no longer supported.")},_createGuestDialog:function(){console.warn("This method is no longer supported.")},_keyDown:function(){console.warn("This method is no longer supported.")},_submit:function(){console.warn("This method is no longer supported.")},_keyUpEdit:function(){console.warn("This method is no longer supported.")},_saveEdit:function(){console.warn("This method is no longer supported.")},_cancelEdit:function(){console.warn("This method is no longer supported.")}}),WCF.Comment.Response={}; })(this);
// WCF.ImageViewer.js
-(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var i=$("a.jsImageViewer");i.length&&i.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(i){i.ctrlKey||(i.preventDefault(),i.stopPropagation(),$(i.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(i.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy(function(i,e){e.complete&&this._checkImageSize({currentTarget:e})},this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(i){var e,t=$(i.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((e=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<e.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(i){if(null!=i.state&&"imageViewer"===i.state.name&&i.state.container===this._eventNamespace)return this.open(i),void this.showImage(i.state.image);this.close(i)}.bind(this))},open:function(i,e){return i&&i.preventDefault(),!this._isOpen&&(i&&"popstate"===i.type||window.history.pushState({name:"imageViewer"},"",""),this.options.staticViewer?(t=this._getStaticImages(),this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,e),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy(function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()},this),500)):0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),1<this._items&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable()),this._bindListener(),require(["Ui/Screen"],function(i){i.pageOverlayOpen()}),!0);var t},close:function(i){if(i&&i.preventDefault(),i&&"popstate"===i.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],function(i){i.pageOverlayClose()}),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy(function(){var i=this._active+1;i==this._items&&(i=0),this.showImage(i)},this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle.children("span").removeClass("fa-play").addClass("fa-pause"),!0)},stopSlideshow:function(i){return!!this._slideshowEnabled&&(this._timer.stop(),i&&this._ui.slideshow.toggle.children("span").removeClass("fa-pause").addClass("fa-play"),!(this._slideshowEnabled=!1))},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,$.proxy(this._renderImage,this))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(i){switch(i.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var e=this._ui.header.find("h1 > a");1==e.length?window.location=e.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(i,s,t){this._container.addClass("open");var a,e,n,h=null;i&&(h=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(h.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=h.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),1<this._items&&this.options.enableSlideshow&&!s&&!t&&this.startSlideshow()),s?this._ui.imageList.children("li").each($.proxy(function(i,e){var t=$(e);if(t.data("objectID")==s)return t.trigger("click"),this.moveToImage(t.data("index")),!1},this)):t?(a=0,$(this.options.imageSelector).each(function(i,e){if($(e).wcfIdentify()==t)return a=i,!1}),e=this._ui.imageList.children("li:eq("+a+")"),-1!==this._active&&(n=!1,this._active!=e.data("index")&&(n=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(n=!0),n&&(this._active=-1)),e.trigger("click"),this.moveToImage(e.data("index"))):null!==h&&h.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(i){this.showImage($(i.currentTarget).data("index"),!0)},showImage:function(i,e){if(this._active==i)return!1;this.stopSlideshow(e||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=i,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"","");var t=this._images[i];this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active");var s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1;null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a;var n=this._active;this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy(function(){this._imageOnLoad(n,a)},this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL);var h,o=WCF.String.escapeHTML(t.image.title);return t.image.link&&(o='<a href="'+t.image.link+'">'+o+"</a>"),this._ui.header.find("h1").html(o),this.options.staticViewer||(h=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(h='<a href="'+t.series.link+'">'+h+"</a>"),this._ui.header.find("h2").html(h)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full.data("link",t.image.fullURL?t.image.fullURL:t.image.url),this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0},_imageOnLoad:function(i,e){i==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[e].addClass("active"),this.options.staticViewer&&this._renderImage(e,null),this.startSlideshow())},_renderImage:function(i,e,t){var s=!0;e||(i=this._activeImage,e=this._images[this._active],s=!(t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()})),t.height-=22,t.width-=20;var a,n=this._ui.images[i];n.prop("src")!==e.image.url&&n.prop("src",e.image.url),s&&n[0].complete&&n.trigger("load"),this.options.staticViewer&&!e.image.height&&n[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=e.image.url,e.image.height=a.height||n[0].naturalHeight,e.image.width=a.width||n[0].naturalWidth):(n.css({height:"auto",width:"auto"}),e.image.height=n[0].height,e.image.width=n[0].width));var h=e.image.height,o=e.image.width,l=0;h>t.height&&(l=t.height/h,h=t.height,o=Math.floor(o*l)),o>t.width&&(l=t.width/o,o=t.width,h=Math.floor(h*l));var r=Math.floor((t.width-o)/2);this._ui.images[i].css({height:h+"px",left:r+10+"px",marginTop:-1*Math.round(h/2)+"px",width:o+"px"})},_initUI:function(){if(this._didInit)return!1;this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body);var e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious icon fa-angle-double-left" /><div><ul /></div><span class="wcfImageViewerButtonNext icon fa-angle-double-right" /></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><span class="icon icon48 fa-angle-left" /></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><span class="icon icon48 fa-play" /></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><span class="icon icon48 fa-angle-right" /></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><span class="icon icon48 fa-expand" /></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><span class="icon icon48 fa-external-link" /></li>').appendTo(t);return this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")}),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")})],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy(function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))},this)),o.click(function(i){window.location=$(i.currentTarget).data("link")}),$('<span class="wcfImageViewerButtonClose icon icon48 fa-times pointer jsTooltip" title="'+WCF.Language.get("wcf.global.button.close")+'" />').appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(i){i.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var t=this;this._ui.imageContainer.swipe({swipeLeft:function(i){t._container.hasClass("maximized")&&t._nextImage(i)},swipeRight:function(i){t._container.hasClass("maximized")&&t._previousImage(i)},tap:function(i,e){switch(e.tagName){case"DIV":case"IMG":t._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active").children("span").toggleClass("fa-expand").toggleClass("fa-compress"),this._renderImage(null,void 0,null)},_next:function(i,e){var t;this._ui.buttonNext.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0),this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(e||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._preload(),this._toggleButtons()},_previous:function(i,e){this._ui.buttonPrevious.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(e||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(i){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),i&&(i.preventDefault(),i.stopPropagation()))},_previousImage:function(i){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),i&&(i.preventDefault(),i.stopPropagation()))},moveToImage:function(i){var e=(i-3)*this._thumbnailWidth,t=e+5*this._thumbnailWidth,s=this._thumbnailOffset,a=this._thumbnailOffset+this._thumbnailContainerWidth;if(e<s||a<t?!0:!1){var n=0;if(e<s){for(;e<s;)n++,s-=this._thumbnailWidth;this._previous(null,n)}else{for(;a<t;)n++,a+=this._thumbnailWidth;this._next(null,n)}}},_toggleButtons:function(){0<this._thumbnailOffset?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var i=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=i?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),0<this._active?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(i){this.options.staticViewer&&(this._images=[],this._ui.imageList.empty());for(var e=0,t=i.length;e<t;e++){var s=i[e],a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList);a.data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this));var n,h=a.children("img");h.get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(h)):(n=this,h.on("load",function(){var i=$(this);i.parent().removeClass("loading"),n.options.staticViewer&&n._fixThumbnailDimensions(i)})),s.listItem=a,this._images.push(s)}},_fixThumbnailDimensions:function(i){var e=new Image;e.src=i.prop("src");var t,s=e.height,a=e.width;s==a?s=a=80:s<a?(t=80/a,a=80,s*=t):(t=80/s,s=80,a*=t),i.css({height:s+"px",width:a+"px"})},_loadNextImages:function(i){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:i&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var a=[];return $(this.options.imageSelector).each(function(i,e){var t=$(e),s=t.find("> img, .attachmentThumbnailImage > img").first();s.length||(s=t.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),a.push({image:{fullURL:s.data("source")?s.data("source").replace(/\\\//g,"/"):t.prop("href"),link:"",title:t.prop("title"),url:t.prop("href")},series:null,thumbnail:{url:s.prop("src")},user:null})}),this._items=a.length,a},_success:function(i,e,t){i.returnValues.items&&(this._items=i.returnValues.items);var s=this._initUI();this._createThumbnails(i.returnValues.images);var a=i.returnValues.targetImageID?i.returnValues.targetImageID:0;this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
+(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var i=$("a.jsImageViewer");i.length&&i.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(i){i.ctrlKey||(i.preventDefault(),i.stopPropagation(),$(i.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(i.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy((function(i,e){e.complete&&this._checkImageSize({currentTarget:e})}),this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(i){var e,t=$(i.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((e=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<e.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(i){if(null!=i.state&&"imageViewer"===i.state.name&&i.state.container===this._eventNamespace)return this.open(i),void this.showImage(i.state.image);this.close(i)}.bind(this))},open:function(i,e){if(i&&i.preventDefault(),this._isOpen)return!1;if(i&&"popstate"===i.type||window.history.pushState({name:"imageViewer"},"",""),this.options.staticViewer){var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,e),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy((function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()}),this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),require(["Ui/Screen"],(function(i){i.pageOverlayOpen()})),!0},close:function(i){if(i&&i.preventDefault(),i&&"popstate"===i.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],(function(i){i.pageOverlayClose()})),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy((function(){var i=this._active+1;i==this._items&&(i=0),this.showImage(i)}),this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle.children("span").removeClass("fa-play").addClass("fa-pause"),!0)},stopSlideshow:function(i){return!!this._slideshowEnabled&&(this._timer.stop(),i&&this._ui.slideshow.toggle.children("span").removeClass("fa-pause").addClass("fa-play"),this._slideshowEnabled=!1,!0)},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,$.proxy(this._renderImage,this))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(i){switch(i.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var e=this._ui.header.find("h1 > a");1==e.length?window.location=e.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(i,e,t){var s,a,n,h;this._container.addClass("open"),s=null,i&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!e&&!t&&this.startSlideshow()),e?this._ui.imageList.children("li").each($.proxy((function(i,t){var s=$(t);if(s.data("objectID")==e)return s.trigger("click"),this.moveToImage(s.data("index")),!1}),this)):t?(a=0,$(this.options.imageSelector).each((function(i,e){if($(e).wcfIdentify()==t)return a=i,!1})),n=this._ui.imageList.children("li:eq("+a+")"),-1!==this._active&&(h=!1,this._active!=n.data("index")&&(h=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(h=!0),h&&(this._active=-1)),n.trigger("click"),this.moveToImage(n.data("index"))):null!==s&&s.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&(this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1))},_showImage:function(i){this.showImage($(i.currentTarget).data("index"),!0)},showImage:function(i,e){var t,s,a,n,h,o;return this._active!=i&&(this.stopSlideshow(e||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=i,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"",""),t=this._images[i],this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active"),s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a,n=this._active,this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy((function(){this._imageOnLoad(n,a)}),this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL),h=WCF.String.escapeHTML(t.image.title),t.image.link&&(h='<a href="'+t.image.link+'">'+h+"</a>"),this._ui.header.find("h1").html(h),this.options.staticViewer||(o=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(o='<a href="'+t.series.link+'">'+o+"</a>"),this._ui.header.find("h2").html(o)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full.data("link",t.image.fullURL?t.image.fullURL:t.image.url),this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0)},_imageOnLoad:function(i,e){i==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[e].addClass("active"),this.options.staticViewer&&this._renderImage(e,null),this.startSlideshow())},_renderImage:function(i,e,t){var s,a,n,h,o,l,r=!0;e||(i=this._activeImage,e=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},r=!1),t.height-=22,t.width-=20,(s=this._ui.images[i]).prop("src")!==e.image.url&&s.prop("src",e.image.url),r&&s[0].complete&&s.trigger("load"),this.options.staticViewer&&!e.image.height&&s[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=e.image.url,e.image.height=a.height||s[0].naturalHeight,e.image.width=a.width||s[0].naturalWidth):(s.css({height:"auto",width:"auto"}),e.image.height=s[0].height,e.image.width=s[0].width)),n=e.image.height,h=e.image.width,o=0,n>t.height&&(o=t.height/n,n=t.height,h=Math.floor(h*o)),h>t.width&&(o=t.width/h,h=t.width,n=Math.floor(n*o)),l=Math.floor((t.width-h)/2),this._ui.images[i].css({height:n+"px",left:l+10+"px",marginTop:-1*Math.round(n/2)+"px",width:h+"px"})},_initUI:function(){var i,e,t,s,a,n,h,o;return!this._didInit&&(this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body),i=$("<div><img /><img /></div>").appendTo(this._container),e=$('<footer><span class="wcfImageViewerButtonPrevious icon fa-angle-double-left" /><div><ul /></div><span class="wcfImageViewerButtonNext icon fa-angle-double-right" /></footer>').appendTo(this._container),t=$("<ul />").appendTo(i),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><span class="icon icon48 fa-angle-left" /></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><span class="icon icon48 fa-play" /></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><span class="icon icon48 fa-angle-right" /></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><span class="icon icon48 fa-expand" /></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><span class="icon icon48 fa-external-link" /></li>').appendTo(t),this._ui={buttonNext:e.children("span.wcfImageViewerButtonNext"),buttonPrevious:e.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:i,images:[i.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")})),i.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")}))],imageList:e.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy((function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))}),this)),o.click((function(i){window.location=$(i.currentTarget).data("link")})),$('<span class="wcfImageViewerButtonClose icon icon48 fa-times pointer jsTooltip" title="'+WCF.Language.get("wcf.global.button.close")+'" />').appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||i.click(function(e){e.target===i[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(i){i.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0)},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var i=this;this._ui.imageContainer.swipe({swipeLeft:function(e){i._container.hasClass("maximized")&&i._nextImage(e)},swipeRight:function(e){i._container.hasClass("maximized")&&i._previousImage(e)},tap:function(e,t){switch(t.tagName){case"DIV":case"IMG":i._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active").children("span").toggleClass("fa-expand").toggleClass("fa-compress"),this._renderImage(null,void 0,null)},_next:function(i,e){if(this._ui.buttonNext.hasClass("pointer")){null==e&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(e||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(i,e){this._ui.buttonPrevious.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(e||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(i){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),i&&(i.preventDefault(),i.stopPropagation()))},_previousImage:function(i){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),i&&(i.preventDefault(),i.stopPropagation()))},moveToImage:function(i){var e,t=(i-3)*this._thumbnailWidth,s=t+5*this._thumbnailWidth,a=this._thumbnailOffset,n=this._thumbnailOffset+this._thumbnailContainerWidth,h=!1;if((t<a||s>n)&&(h=!0),h)if(e=0,t<a){for(;t<a;)e++,a-=this._thumbnailWidth;this._previous(null,e)}else{for(;s>n;)e++,n+=this._thumbnailWidth;this._next(null,e)}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var i=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=i?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(i){var e,t,s,a,n,h;for(this.options.staticViewer&&(this._images=[],this._ui.imageList.empty()),e=0,t=i.length;e<t;e++)s=i[e],(a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList)).data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this)),(n=a.children("img")).get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n)):(h=this,n.on("load",(function(){var i=$(this);i.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(i)}))),s.listItem=a,this._images.push(s)},_fixThumbnailDimensions:function(i){var e,t,s,a=new Image;a.src=i.prop("src"),(e=a.height)==(t=a.width)?e=t=80:e<t?(s=80/t,t=80,e*=s):(s=80/e,e=80,t*=s),i.css({height:e+"px",width:t+"px"})},_loadNextImages:function(i){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:i&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var i=[];return $(this.options.imageSelector).each((function(e,t){var s=$(t),a=s.find("> img, .attachmentThumbnailImage > img").first();a.length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),i.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:a.prop("src")},user:null})})),this._items=i.length,i},_success:function(i,e,t){var s,a;i.returnValues.items&&(this._items=i.returnValues.items),s=this._initUI(),this._createThumbnails(i.returnValues.images),a=i.returnValues.targetImageID?i.returnValues.targetImageID:0,this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
// WCF.Label.js
-(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList=Class.extend({_labelInput:{},_labelList:{},init:function(){},_keyPressed:function(){}}),WCF.Label.ACPList.Connect=Class.extend({init:function(){var t=$("#connect .structuredList li");t.length&&t.each($.proxy(function(t,e){$(e).find('input[type="checkbox"]').click($.proxy(this._click,this))},this))},_click:function(t){var e=$(t.currentTarget);if(e.is(":checked"))for(var i=(e=e.parents("li")).data("depth");;){if(!(e=e.next()).length)return!0;if(e.data("depth")<=i)return!0;e.find('input[type="checkbox"]').prop("checked","checked")}}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(a,t,e,i){if(this._container=null,this._groups={},this._showWithoutSelection=!0===i,this._initContainers(t),$.getLength(a))for(var o in a){var n=this._groups[o];n&&WCF.Dropdown.getDropdownMenu(n.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy(function(t,e){var i=$(e),n=i.data("labelID")||0;n&&a[o]==n&&this._selectLabel(i,!0)},this))}for(var s in this._containers){var r=this._containers[s];void 0===r.data("labelID")&&r.data("labelID",0)}this._container=$(t),e?$(e).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function l(t){t.addEventListener("wheel",function(t){t.preventDefault()},{passive:!1})}$(t).find(".labelChooser").each($.proxy(function(t,e){var i,n,a,o,s=$(e),r=s.data("groupID");this._groups[r]||(i=s.wcfIdentify(),null===(n=WCF.Dropdown.getDropdownMenu(i))&&(WCF.Dropdown.initDropdown(s.find(".dropdownToggle")),n=WCF.Dropdown.getDropdownMenu(i)),"div"==(a=n).getTagName()&&n.children(".scrollableDropdownMenu").length&&(a=$("<ul />").appendTo(n),n=n.children(".scrollableDropdownMenu")),this._groups[r]=s,n.children("li").data("groupID",r).click($.proxy(this._click,this)),s.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(a),this._showWithoutSelection&&l($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(a).click($.proxy(this._click,this))[0]),s.data("forceSelection")||((o=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(a)).click($.proxy(this._click,this)),l(o[0])))},this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t=this._container.find(".formSubmit");for(var e in t.find('input[type="hidden"]').each(function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()}),this._groups){var i=this._groups[e];i.data("labelID")&&$('<input type="hidden" name="labelIDs['+e+']" value="'+i.data("labelID")+'" />').appendTo(t)}},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:null,init:function(t,e,i,n,a){this._super(e,i,n,a),this._labelGroupsToCategories=t,this._updateLabelGroups(),$("#categoryID").change($.proxy(this._updateLabelGroups,this))},_updateLabelGroups:function(){$(".labelChooser").each(function(t,e){$(e).parents("dl:eq(0)").hide()});var t=parseInt($("#categoryID").val());if(this._labelGroupsToCategories[t])for(var e=0,i=this._labelGroupsToCategories[t].length;e<i;e++)$("#labelGroup"+this._labelGroupsToCategories[t][e]).parents("dl:eq(0)").show()},_submit:function(){for(var t in this._groups)this._groups[t].is(":visible")||delete this._groups[t];this._super()}}); })(this);
+(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList=Class.extend({_labelInput:{},_labelList:{},init:function(){},_keyPressed:function(){}}),WCF.Label.ACPList.Connect=Class.extend({init:function(){var t=$("#connect .structuredList li");t.length&&t.each($.proxy((function(t,e){$(e).find('input[type="checkbox"]').click($.proxy(this._click,this))}),this))},_click:function(t){var e,i=$(t.currentTarget);if(i.is(":checked"))for(e=(i=i.parents("li")).data("depth");;){if(!(i=i.next()).length)return!0;if(i.data("depth")<=e)return!0;i.find('input[type="checkbox"]').prop("checked","checked")}}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,i,n){var o,a,s,l;if(this._container=null,this._groups={},this._showWithoutSelection=!0===n,this._initContainers(e),$.getLength(t))for(o in t)(a=this._groups[o])&&WCF.Dropdown.getDropdownMenu(a.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy((function(e,i){var n=$(i),a=n.data("labelID")||0;a&&t[o]==a&&this._selectLabel(n,!0)}),this));for(s in this._containers)void 0===(l=this._containers[s]).data("labelID")&&l.data("labelID",0);this._container=$(e),i?$(i).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function e(t){t.addEventListener("wheel",(function(t){t.preventDefault()}),{passive:!1})}$(t).find(".labelChooser").each($.proxy((function(t,i){var n,o,a,s,l=$(i),r=l.data("groupID");this._groups[r]||(n=l.wcfIdentify(),null===(o=WCF.Dropdown.getDropdownMenu(n))&&(WCF.Dropdown.initDropdown(l.find(".dropdownToggle")),o=WCF.Dropdown.getDropdownMenu(n)),a=o,"div"==o.getTagName()&&o.children(".scrollableDropdownMenu").length&&(a=$("<ul />").appendTo(o),o=o.children(".scrollableDropdownMenu")),this._groups[r]=l,o.children("li").data("groupID",r).click($.proxy(this._click,this)),l.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(a),this._showWithoutSelection&&e($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(a).click($.proxy(this._click,this))[0]),l.data("forceSelection")||((s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(a)).click($.proxy(this._click,this)),e(s[0])))}),this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t,e,i=this._container.find(".formSubmit");for(t in i.find('input[type="hidden"]').each((function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()})),this._groups)(e=this._groups[t]).data("labelID")&&$('<input type="hidden" name="labelIDs['+t+']" value="'+e.data("labelID")+'" />').appendTo(i)},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:null,init:function(t,e,i,n,o){this._super(e,i,n,o),this._labelGroupsToCategories=t,this._updateLabelGroups(),$("#categoryID").change($.proxy(this._updateLabelGroups,this))},_updateLabelGroups:function(){var t,e,i;if($(".labelChooser").each((function(t,e){$(e).parents("dl:eq(0)").hide()})),[],t=parseInt($("#categoryID").val()),this._labelGroupsToCategories[t])for(e=0,i=this._labelGroupsToCategories[t].length;e<i;e++)$("#labelGroup"+this._labelGroupsToCategories[t][e]).parents("dl:eq(0)").show()},_submit:function(){for(var t in this._groups)this._groups[t].is(":visible")||delete this._groups[t];this._super()}}); })(this);
// WCF.Location.js
-(function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(e,t){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition(function(t){e(t.coords.latitude,t.coords.longitude)},function(){e(void 0,void 0)},{timeout:t||5e3}):e(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy(function(){e.open(this._map,t)},this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t=null,e=null,o=null,s=null;for(var i in this._markers){var a=this._markers[i],n=a.getPosition().lat(),r=a.getPosition().lng();null===t?(t=e=n,o=s=r):(n<t?t=n:e<n&&(e=n),n<o?o=n:s<r&&(s=r))}this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(t,o),new google.maps.LatLng(e,s)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy(function(t){t.infoWindow&&t.infoWindow.open(this._map,t)},this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng())&&(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t,e,o){if(t.returnValues&&t.returnValues.markers)for(var s in t.returnValues.markers){var i=t.returnValues.markers[s];this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))}},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a=$(i),n=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);a.append($("<p />").append(n));var r=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",a.get(0));return n.data("marker",r),r},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t);for(var e=[],o=0,s=this._markers.length;o<s;o++){var i=this._markers[o];i.draggable||(i.setVisible(t),t&&e.push(i))}this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null},this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){var o=0;for(var s in t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var i=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy(function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))},this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(t){null!==t&&$(this._searchInput).val(t)},this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(o,t,e,s,i){t&&(e=t.getPosition().lat(),s=t.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(e,s);this._geocoder.geocode({latLng:a},function(t,e){e==google.maps.GeocoderStatus.OK?o(i?t:t[0].formatted_address):o(null)})}}; })(this);
+(function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition((function(e){t(e.coords.latitude,e.coords.longitude)}),(function(){t(void 0,void 0)}),{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy((function(){e.open(this._map,t)}),this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t,e,o,s,i=null,a=null,n=null,r=null;for(t in this._markers)o=(e=this._markers[t]).getPosition().lat(),s=e.getPosition().lng(),null===i?(i=a=o,n=r=s):(i>o?i=o:a<o&&(a=o),n>o?n=o:r<s&&(r=s));this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(i,n),new google.maps.LatLng(a,r)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy((function(t){t.infoWindow&&t.infoWindow.open(this._map,t)}),this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng())&&(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t,e,o){var s,i;if(t.returnValues&&t.returnValues.markers)for(s in t.returnValues.markers)i=t.returnValues.markers[s],this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a,n=$(i),r=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);return n.append($("<p />").append(r)),a=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",n.get(0)),r.data("marker",a),a},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){var e,o,s,i;for(void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t),e=[],o=0,s=this._markers.length;o<s;o++)(i=this._markers[o]).draggable||(i.setVisible(t),t&&e.push(i));this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy((function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null}),this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){var o,s,i;if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){for(s in o=0,t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),i=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy((function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))}),this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy((function(t){null!==t&&$(this._searchInput).val(t)}),this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},(function(e,o){o==google.maps.GeocoderStatus.OK?t(i?e:e[0].formatted_address):t(null)}))}}; })(this);
// WCF.Message.js
-(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,s,i,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=s,this._buttonSelector=i||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var t=this;this._newIDInputs.change(function(e){var s=parseInt($(this).val());"current"===$(this).val()&&(s=1/0),t._oldIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),s<=t?$(this).disable():$(this).enable()})}),this._oldIDInputs.change(function(e){var s=parseInt($(this).val());"current"===$(this).val()&&(s=1/0),t._newIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=s?$(this).disable():$(this).enable()})}),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var s=this;$(this._containerSelector).each(function(e,t){$(t).find(s._buttonSelector).click($.proxy(s._click,s))})},_click:function(e){var t,s=$(e.currentTarget);e.preventDefault(),s.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(s.data("confirmMessage"),function(e){"cancel"!==e&&t._sendRequest(s)},void 0,void 0,!0)):this._sendRequest(s)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,s){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).on("unload",function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,s){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(s=$.wcfEscapeID(s),this._previewButton=$("#"+s),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)})):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+s+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){var t=this._getMessage();if(null!==t)return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1;console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var i={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each(function(e,t){var s=$(t);s.is(":checked")&&(i[s.prop("name")]=s.prop("value"))}),{data:{message:e},options:i}},_getMessage:function(){return this._textarea.redactor("code.get")},_success:function(e,t,s){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){if(null===e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;this._previewButton.html(this._previewButtonLabel).enable();var t=this._textarea.parent().children("small.innerError").empty();t.length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent()));var s="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage;return e.returnValues.realErrorMessage&&(s=e.returnValues.realErrorMessage),t.html(s),!1}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(1<arguments.length&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(t){require(["WoltLabSuite/Core/Ui/Dialog"],function(e){e.open(this,'<div class="htmlContent">'+t.returnValues.message+"</div>")}.bind(this))},_getParameters:function(e){var t=this._super(e);for(var s in this._options)this._options.hasOwnProperty(s)&&"messageFieldID"!==s&&"previewButtonID"!==s&&(t[s]=this._options[s]);return t},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){for(var t=this._messageFieldID="",s=this._textarea=null,i=0,n=this._options.messageFields.length;i<n;i++)if(t=this._options.messageFields[i],s=elById(t),null!==elBySel('.redactor-layer[data-element-id="'+s.id+'"]').offsetParent){this._messageFieldID=t,this._textarea=$(s);break}if(""===this._messageFieldID)throw new Error("Unable to identify the active message field.");this._super(e)},_getParameters:function(e){var t=this._super(e);for(var s in this._options)this._options.hasOwnProperty(s)&&-1===["messageFields","messageFieldID","previewButtonID"].indexOf(s)&&(t[s]=this._options[s]);return t},_handleResponse:function(t){require(["WoltLabSuite/Core/Ui/Dialog"],function(e){e.open(this,'<div class="htmlContent">'+t.returnValues.message+"</div>")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,s){var i;this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),s||(i=this._languageInput.find(".dropdownMenu"),$('<li class="dropdownDivider" />').appendTo(i),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(i)),this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,s){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=s||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");var s=parseInt(RegExp.$1)}else s=parseInt(t.activeTab.tab.data("smileyCategoryID"));s&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[s]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[s]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[s])))},_success:function(e,t,s){var i=parseInt(e.returnValues.smileyCategoryID);this._cache[i]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+i+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+i).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({init:function(t){require(["WoltLabSuite/Core/Ui/Smiley/Insert"],function(e){new e(t)})}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(t,e,s){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){new e({className:this._getClassName(),containerId:t,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:s||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:null,_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:null,_quoteManager:null,_selectionChangeTimer:null,_isMouseDown:!1,init:function(e,t,s,i,n,a,o){var r;this._className=t,""!==this._className?(this._objectType=s,""!==this._objectType?(this._containerSelector=i,this._message="",this._messageBodySelector=n,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._selectionChangeTimer=null,this._isMouseDown=!1,this._initContainers(),o=o&&e.supportPaste(),this._initCopyQuote(o),$(document).mouseup($.proxy(this._mouseUp,this)),document.addEventListener("selectionchange",this._selectionchange.bind(this)),this._quoteManager=e,this._quoteManager.register(this._objectType,this),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Quote.Handler"+s.hashCode(),$.proxy(this._initContainers,this)),r=this._copyQuote[0],document.addEventListener("touchstart",function(e){var t;r.classList.contains("active")&&((t=e.target)===r||r.contains(t)||(r.classList.add("touchForceInaccessible"),document.addEventListener("touchend",function(){r.classList.remove("touchForceInaccessible")},{once:!0})))},{passive:!0})):console.debug("[WCF.Message.QuoteManager] Empty object type name given, aborting.")):console.debug("[WCF.Message.QuoteManager] Empty class name given, aborting.")},_initContainers:function(){var n=this;$(this._containerSelector).each(function(e,t){var s=$(t),i=s.wcfIdentify();if(!n._containers[i]){if((n._containers[i]=s).hasClass("jsInvalidQuoteTarget"))return!0;n._messageBodySelector&&s.data("body",s.find(n._messageBodySelector).data("containerID",i)),s.mousedown($.proxy(n._mouseDown,n)),s[0].classList.add("jsQuoteMessageContainer"),n._containers[i].find(".jsQuoteMessage").click($.proxy(n._saveFullQuote,n))}})},_selectionchange:function(){if(!this._isMouseDown){if(""===this._activeContainerID){var e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return;var t=e.getRangeAt(0),s=elClosest(t.startContainer,".jsQuoteMessageContainer"),i=elClosest(t.endContainer,".jsQuoteMessageContainer");if(s&&s===i&&!s.classList.contains("jsInvalidQuoteTarget")){var n=t.commonAncestorContainer;n.nodeType!==Node.ELEMENT_NODE&&(n=n.parentNode);var a=n.offsetParent;if(s.contains(a)&&a.scrollTop+a.clientHeight<n.offsetTop)return;this._activeContainerID=s.id}}null!==this._selectionChangeTimer&&window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=window.setTimeout(this._mouseUp.bind(this),100)}},_mouseDown:function(e){this._copyQuote.removeClass("active"),this._activeContainerID=e.currentTarget.classList.contains("jsInvalidQuoteTarget")?"":e.currentTarget.id,null!==this._selectionChangeTimer&&(window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=null),this._isMouseDown=!0},_getNodeText:function(e){function t(e){switch(e.tagName){case"BLOCKQUOTE":case"SCRIPT":return NodeFilter.FILTER_REJECT;case"IMG":if(!e.classList.contains("smiley")||0===e.alt.length)return NodeFilter.FILTER_REJECT;default:return NodeFilter.FILTER_ACCEPT}}t.acceptNode=t;for(var s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,t,!0),i="",n=[];s.nextNode();){var a,o,r,l=s.currentNode;if(l.nodeType===Node.ELEMENT_NODE)switch(l.tagName){case"A":0<(r=l.textContent).indexOf("…")&&(2!==(a=r.split(/\u2026/)).length||0===(o=l.href).indexOf(a[0])&&o.substr(-1*a[1].length)===a[1]&&(i+=o,n.push(l)));break;case"BR":case"LI":case"UL":i+="\n";break;case"TD":$.browser.msie||(i+="\n");break;case"P":i+="\n\n";break;case"IMG":i+=" "+l.alt+" ";break;case"DIV":(l.classList.contains("codeBoxHeadline")||l.classList.contains("codeBoxLine"))&&(i+="\n")}else{if("A"===l.parentNode.nodeName&&-1!==n.indexOf(l.parentNode))continue;i+=l.nodeValue.replace(/\n/g," ")}}return i},_mouseUp:function(e){if(e&&e.originalEvent instanceof Event&&(null!==this._selectionChangeTimer&&(window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=null),this._isMouseDown=!1),""!==this._activeContainerID){var t=window.getSelection();if(1!==t.rangeCount||t.isCollapsed)this._copyQuote.removeClass("active");else{for(var s,i,n,a,o,r,l,c,u,h,d,_=(g=this._containers[this._activeContainerID]).data("objectID"),g=g.data("body")||g,p=t.anchorNode;p&&p!==g[0];)p=p.parentNode;p===g[0]?(s=this._getSelectedText(),""!==(i=$.trim(s))?(a=(n=t.getRangeAt(0)).startContainer.nodeType===Node.TEXT_NODE?n.startContainer.parentNode:n.startContainer,o=n.endContainer.nodeType===Node.TEXT_NODE?n.endContainer.parentNode:n.endContainer,a.closest("blockquote")||o.closest("blockquote")?this._copyQuote.removeClass("active"):(r=this._getNodeText(g[0]),-1!==this._normalize(r).indexOf(this._normalize(i))&&(this._copyQuote.addClass("active"),l=this._getBoundingRectangle(g,window.getSelection()),c=this._copyQuote.getDimensions("outer"),(u=(l.right-l.left)/2-c.width/2+l.left)<(h=g[0].getBoundingClientRect()).left?u=h.left:u+c.width>h.right&&(u=h.right-c.width),this._copyQuote.css({top:l.bottom+7+"px",left:u+"px"}),this._copyQuote.removeClass("active"),null===this._selectionChangeTimer?this._activeContainerID="":(window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=null),d=this,window.setTimeout(function(){var e=$.trim(d._getSelectedText());""!==e&&(d._copyQuote.addClass("active"),d._message=e,d._objectID=_)},10)))):this._copyQuote.removeClass("active")):this._copyQuote.removeClass("active")}}else this._copyQuote.removeClass("active")},_normalize:function(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")},_getBoundingRectangle:function(e,t){var s,i,n=null;return 0<t.rangeCount&&(s=t.getRangeAt(0).getBoundingClientRect(),i=$(document).scrollTop(),n={bottom:s.bottom+i,left:s.left,right:s.right,top:s.top+i}),n},_initCopyQuote:function(e){var t;this._copyQuote=$("#quoteManagerCopy"),this._copyQuote.length||(this._copyQuote=$('<div id="quoteManagerCopy" class="balloonTooltip interactive"><span class="jsQuoteManagerStore">'+WCF.Language.get("wcf.message.quote.quoteSelected")+"</span></div>").appendTo(document.body),t=this._copyQuote.children("span.jsQuoteManagerStore").click($.proxy(this._saveQuote,this)),e&&$('<span class="jsQuoteManagerQuoteAndInsert">'+WCF.Language.get("wcf.message.quote.quoteAndReply")+"</span>").click($.proxy(this._saveAndInsertQuote,this)).insertAfter(t))},_getSelectedText:function(){var e=window.getSelection();return e.rangeCount?this._getNodeText(e.getRangeAt(0).cloneContents()):""},_saveFullQuote:function(e){e.preventDefault();var t=$(e.currentTarget);this._proxy.setOption("data",{actionName:"saveFullQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[t.data("objectID")]}),this._proxy.sendRequest(),t.data("isQuoted")?t.data("isQuoted",!1).children("a").removeClass("active"):t.data("isQuoted",!0).children("a").addClass("active");var s=t.parents(".buttonGroupNavigation");s.hasClass("jsMobileButtonGroupNavigation")&&s.children(".dropdownLabel").trigger("click")},_saveQuote:function(e){this._proxy.setOption("data",{actionName:"saveQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[this._objectID],parameters:{message:this._message,renderQuote:!0===e}}),this._proxy.sendRequest();var t=window.getSelection();t.rangeCount&&(t.removeAllRanges(),this._copyQuote[0].classList.remove("active"))},_saveAndInsertQuote:function(){this._saveQuote(!0)},_success:function(e){var t;switch(void 0!==e.returnValues.count&&(void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs),t=void 0!==e.returnValues.fullQuoteObjectIDs?e.returnValues.fullQuoteObjectIDs:{},this._quoteManager.updateCount(e.returnValues.count,t)),e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&WCF.System.Event.fireEvent("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName,quote:e.returnValues.renderedQuote})}},updateFullQuoteObjectIDs:function(i){for(var e in this._containers)this._containers[e].find(".jsQuoteMessage").each(function(e,t){var s=$(t).data("isQuoted",0);s.children("a").removeClass("active"),WCF.inArray(s.data("objectID"),i)&&s.data("isQuoted",1).children("a").addClass("active")})}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,s,i){var n;this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,!t||(n=$("#"+t)).length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=i||[]):(this._form=null,this._supportPaste=!0===s)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){for(var s in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers){var i;this._handlers.hasOwnProperty(s)&&(i=t[s]||[],this._handlers[s].updateFullQuoteObjectIDs(i))}},insertQuotes:function(e,t,s){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:s}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,s="showQuotes";this._count?(void 0===(t=e.get(s))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(s,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(s)):e.remove(s),this._hasTemplate=!1}.bind(this))},_click:function(){var e=document.activeElement;e.classList.contains("redactor-layer")&&$("#"+elData(e,"element-id")).redactor("selection.save"),this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e);var t=$('<div class="formSubmit" />').appendTo(this._dialog);this._supportPaste&&(this._buttons.insert=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("<button>"+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0;var i,s=this._dialog.find(".jsInsertQuote");this._supportPaste?s.click($.proxy(this._insertQuote,this)):s.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(i=this)._dialog.find("input.jsRemoveQuote").each(function(e,t){var s=$(t).change($.proxy(this._change,this));WCF.inArray(s.parent("li").attr("data-quote-id"),i._removeOnSubmit)&&s.attr("checked","checked")})},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,s=$(e.currentTarget),i=s.parent("li").attr("data-quote-id");s.prop("checked")?this._removeOnSubmit.push(i):-1!==(t=this._removeOnSubmit.indexOf(i))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.find("input.jsCheckbox:checked").each($.proxy(function(e,t){this._insertQuote(null,t)},this)),this._dialog.wcfDialog("close")},_insertQuote:function(e,t){var s=$(e?e.currentTarget:t).parents("li:eq(0)"),i=s.children(".jsFullQuote")[0].textContent.trim(),n=s.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(s[0],"is-full-quote");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:a,content:i,isText:r,link:o}),this._removeOnSubmit.push(s.data("quote-id")),null!==e&&this._dialog.wcfDialog("close")},_removeSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked");var s=[];if(this._dialog.find("input.jsCheckbox:checked").each(function(e,t){s.push($(t).parents("li").attr("data-quote-id"))}),s.length){var e=[];for(var t in this._handlers)this._handlers.hasOwnProperty(t)&&e.push(t);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:0<this._handlers.length,objectTypes:e,quoteIDs:s}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){if(this._supportPaste&&0<this._removeOnSubmit.length)for(var e=this._form.find(".formSubmit"),t=0,s=this._removeOnSubmit.length;t<s;t++)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:0<this._handlers.length}),this._proxy.sendRequest())},countQuotes:function(){var e=[];for(var t in this._handlers)this._handlers.hasOwnProperty(t)&&e.push(t);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:0<e.length,objectTypes:e}),this._proxy.sendRequest()},_success:function(e){var t;null!==e&&(void 0!==e.count&&(t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{},this.updateCount(e.count,t)),void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template)))},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t,s,i=$(e.currentTarget),n=i.prop("href"),a=i.data("linkTitle")?i.data("linkTitle"):n,o=n.hashCode();void 0===this._cache[o]?(t=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),t=!0):this._dialog.empty(),s=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",n).appendTo(s),s=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+n+"']"+a+"[/url]").appendTo(s),s=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+n+'">'+WCF.String.escapeHTML(a)+"</a>").appendTo(s),""!==this._shareButtonsTemplate&&(s=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(s.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(n))),this._cache[o]=this._dialog.html(),t?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[o]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click(function(){$(this).select()});navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown(function(){return!1}).removeAttr("readonly").click(function(){this.setSelectionRange(0,9999)})}}),WCF.Message.Share.Page=Class.extend({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var s=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),e=this.element.find("> div, > fieldset");if(s.length==e.length){var i=this.element.data("preselect");e.each(function(e,t){if(null!==elBySel(".innerError",t))return i=$(s[e]).data("name"),!1}),"true"===i&&(i=!0),this._tabs=[],this._tabsByName={};for(var t=0;t<s.length;t++){var n,a=$(s[t]),o=$(e[t]),r=a.data("name");void 0===r&&(void 0!==(n=a.children("a").prop("href"))&&n.match(/#([a-zA-Z_-]+)$/)&&(r=RegExp.$1),void 0===r&&(r=a.wcfIdentify())),this._tabs.push({container:o,name:r,tab:a}),this._tabsByName[r]=t;var l=a.children("a").data("index",t).on("mousedown",this._showTab.bind(this));l.attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",o[0].id),l.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(i===r||!0===i&&0===t)&&l.trigger("mousedown")}!0===i&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click");var c=this.element.data("collapsible");void 0!==c&&(this.options.collapsible=c);var u=elData(this.element[0],"wysiwyg-container-id");u&&WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+u,function(){for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}.bind(this))}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,s){var i=null===e?t:$(e.currentTarget).data("index");s=!this.options.collapsible||!0===s;for(var n=null,a=0;a<this._tabs.length;a++){var o=this._tabs[a];if(a==i){if(!o.tab.hasClass("active")){o.tab.addClass("active"),o.container.addClass("active"),(n=o).tab.children("a").attr("aria-expanded",!0);var r,l=o.container[0];null!==elBySel(".messageTabMenuContent.active",l)||null===elBySel(".messageTabMenuContent",l)||null!==(r=elBySel("nav > ul > li[data-name] > a",l))&&$(r).trigger("mousedown");continue}if(!0===s)continue}o.tab.removeClass("active"),o.container.removeClass("active"),o.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==n&&this._trigger("show",{},{activeTab:n}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
+(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,s,i,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=s,this._buttonSelector=i||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change((function(t){var s=parseInt($(this).val());"current"===$(this).val()&&(s=1/0),e._oldIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=s?$(this).disable():$(this).enable()}))})),this._oldIDInputs.change((function(t){var s=parseInt($(this).val());"current"===$(this).val()&&(s=1/0),e._newIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=s?$(this).disable():$(this).enable()}))})),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each((function(t,s){$(s).find(e._buttonSelector).click($.proxy(e._click,e))}))},_click:function(e){var t,s=$(e.currentTarget);e.preventDefault(),s.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(s.data("confirmMessage"),(function(e){"cancel"!==e&&t._sendRequest(s)}),void 0,void 0,!0)):this._sendRequest(s)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,s){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("unload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,s){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(s=$.wcfEscapeID(s),this._previewButton=$("#"+s),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)})):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+s+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){e.preventDefault();var t=this._getMessage();if(null!==t)return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1;console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each((function(e,s){var i=$(s);i.is(":checked")&&(t[i.prop("name")]=i.prop("value"))})),{data:{message:e},options:t}},_getMessage:function(){return this._textarea.redactor("code.get")},_success:function(e,t,s){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){var t,s;return null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._previewButton.html(this._previewButtonLabel).enable(),(t=this._textarea.parent().children("small.innerError").empty()).length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent())),s="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage,e.returnValues.realErrorMessage&&(s=e.returnValues.realErrorMessage),t.html(s),!1)}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_getParameters:function(e){var t,s=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&"messageFieldID"!==t&&"previewButtonID"!==t&&(s[t]=this._options[t]);return s},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){var t,s,i,n;for(this._messageFieldID="",this._textarea=null,t="",s=null,i=0,n=this._options.messageFields.length;i<n;i++)if(t=this._options.messageFields[i],s=elById(t),null!==elBySel('.redactor-layer[data-element-id="'+s.id+'"]').offsetParent){this._messageFieldID=t,this._textarea=$(s);break}if(""===this._messageFieldID)throw new Error("Unable to identify the active message field.");this._super(e)},_getParameters:function(e){var t,s=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&-1===["messageFields","messageFieldID","previewButtonID"].indexOf(t)&&(s[t]=this._options[t]);return s},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,s){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!s){var i=this._languageInput.find(".dropdownMenu");$('<li class="dropdownDivider" />').appendTo(i),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(i)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,s){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=s||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var s;if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");s=parseInt(RegExp.$1)}else s=parseInt(t.activeTab.tab.data("smileyCategoryID"));s&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[s]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[s]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[s])))},_success:function(e,t,s){var i=parseInt(e.returnValues.smileyCategoryID);this._cache[i]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+i+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+i).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({init:function(e){require(["WoltLabSuite/Core/Ui/Smiley/Insert"],(function(t){new t(e)}))}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,s){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:s||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({init:function(e,t,s,i,n,a,o){require(["WoltLabSuite/Core/Ui/Message/Quote"],(r=>{new r.default(e,t,s,i,n,a,o)}))}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,s,i){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=i||[]):(this._form=null,this._supportPaste=!0===s))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){var s,i;for(s in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers)this._handlers.hasOwnProperty(s)&&(i=t[s]||[],this._handlers[s].updateFullQuoteObjectIDs(i))},insertQuotes:function(e,t,s){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:s}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,s="showQuotes";this._count?(void 0===(t=e.get(s))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(s,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(s)):e.remove(s),this._hasTemplate=!1}.bind(this))},_click:function(){var e=document.activeElement;e.classList.contains("redactor-layer")&&$("#"+elData(e,"element-id")).redactor("selection.save"),this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){var t,s,i;null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e),t=$('<div class="formSubmit" />').appendTo(this._dialog),this._supportPaste&&(this._buttons.insert=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("<button>"+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0,s=this._dialog.find(".jsInsertQuote"),this._supportPaste?s.click($.proxy(this._insertQuote,this)):s.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(i=this,this._dialog.find("input.jsRemoveQuote").each((function(e,t){var s=$(t).change($.proxy(this._change,this));WCF.inArray(s.parent("li").attr("data-quote-id"),i._removeOnSubmit)&&s.attr("checked","checked")})))},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,s=$(e.currentTarget),i=s.parent("li").attr("data-quote-id");s.prop("checked")?this._removeOnSubmit.push(i):-1!==(t=this._removeOnSubmit.indexOf(i))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.find("input.jsCheckbox:checked").each($.proxy((function(e,t){this._insertQuote(null,t)}),this)),this._dialog.wcfDialog("close")},_insertQuote:function(e,t){var s=$(e?e.currentTarget:t).parents("li:eq(0)"),i=s.children(".jsFullQuote")[0].textContent.trim(),n=s.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(s[0],"is-full-quote");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:a,content:i,isText:r,link:o}),this._removeOnSubmit.push(s.data("quote-id")),null!==e&&this._dialog.wcfDialog("close")},_removeSelected:function(){var e,t,s;if(this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),e=[],this._dialog.find("input.jsCheckbox:checked").each((function(t,s){e.push($(s).parents("li").attr("data-quote-id"))})),e.length){for(s in t=[],this._handlers)this._handlers.hasOwnProperty(s)&&t.push(s);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){var e,t,s;if(this._supportPaste&&this._removeOnSubmit.length>0)for(e=this._form.find(".formSubmit"),t=0,s=this._removeOnSubmit.length;t<s;t++)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e,t=[];for(e in this._handlers)this._handlers.hasOwnProperty(e)&&t.push(e);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:t.length>0,objectTypes:t}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,s,i,n,a,o;e.preventDefault(),s=(t=$(e.currentTarget)).prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):s,n=s.hashCode(),void 0===this._cache[n]?(a=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),a=!0):this._dialog.empty(),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",s).appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+s+"']"+i+"[/url]").appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+s+'">'+WCF.String.escapeHTML(i)+"</a>").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(s))),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[n]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),WCF.Message.Share.Page=Class.extend({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],(function(e){e.init()}))}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,s,i,n,a,o,r,l,u=this.element.find("> nav"),h=u.find("> ul > li:not(.jsFlexibleMenuDropdown)"),c=this.element.find("> div, > fieldset");if(h.length==c.length){for(e=this.element.data("preselect"),c.each((function(t,s){if(null!==elBySel(".innerError",s))return e=$(h[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t<h.length;t++)s=$(h[t]),i=$(c[t]),void 0===(n=s.data("name"))&&(void 0!==(a=s.children("a").prop("href"))&&a.match(/#([a-zA-Z_-]+)$/)&&(n=RegExp.$1),void 0===n&&(n=s.wcfIdentify())),this._tabs.push({container:i,name:n,tab:s}),this._tabsByName[n]=t,(o=s.children("a").data("index",t).on("mousedown",this._showTab.bind(this))).attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",i[0].id),o.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(e===n||!0===e&&0===t)&&o.trigger("mousedown");!0===e&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click"),void 0!==(r=this.element.data("collapsible"))&&(this.options.collapsible=r),(l=elData(this.element[0],"wysiwyg-container-id"))&&WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+l,function(){for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}.bind(this))}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,s){var i,n,a,o,r,l=null===e?t:$(e.currentTarget).data("index");for(s=!this.options.collapsible||!0===s,i=null,n=0;n<this._tabs.length;n++){if(a=this._tabs[n],n==l){if(!a.tab.hasClass("active")){a.tab.addClass("active"),a.container.addClass("active"),i=a,a.tab.children("a").attr("aria-expanded",!0),o=a.container[0],null===elBySel(".messageTabMenuContent.active",o)&&null!==elBySel(".messageTabMenuContent",o)&&null!==(r=elBySel("nav > ul > li[data-name] > a",o))&&$(r).trigger("mousedown");continue}if(!0===s)continue}a.tab.removeClass("active"),a.container.removeClass("active"),a.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==i&&this._trigger("show",{},{activeTab:i}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
// WCF.Poll.js
-(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:null,_count:0,_editorId:"",_maxOptions:0,init:function(e,t,i,n,o){this._count=0,this._maxOptions=i||-1,this._container=$("#"+e).children("ol:eq(0)"),this._fieldName=o||"pollOptions",this._container.length?(t=t||[],this._createOptionList(t),n?(this._editorId=n,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+n,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+n,this._submit.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+n,this._validate.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","handleError_"+n,this._handleError.bind(this))):this._container.closest("form").submit($.proxy(this._submit,this)),require(["WoltLabSuite/Core/Ui/Sortable/List"],function(t){new t({containerId:e,options:{toleranceElement:"> div"}})})):console.debug("[WCF.Poll.Management] Invalid container id given, aborting.")},_createOptionList:function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];this._createOption(n.optionValue,n.optionID)}t.length<this._maxOptions&&this._createOption()},_createOption:function(t,e,i){t=t||"",e=parseInt(e)||0,i=i||null;var n=$('<li class="sortableNode" />').data("optionID",e);null===i?n.appendTo(this._container):n.insertAfter(i);var o=$('<div class="pollOptionInput" />').appendTo(n);$('<span class="icon icon16 fa-arrows sortableNodeHandle" />').appendTo(o),$('<a role="button" href="#" class="icon icon16 fa-plus jsTooltip jsAddOption pointer" title="'+WCF.Language.get("wcf.poll.button.addOption")+'" />').click($.proxy(this._addOption,this)).appendTo(o),$('<a role="button" href="#" class="icon icon16 fa-times jsTooltip jsDeleteOption pointer" title="'+WCF.Language.get("wcf.poll.button.removeOption")+'" />').click($.proxy(this._removeOption,this)).appendTo(o);var s=$('<input type="text" value="'+t+'" maxlength="255" />').keydown($.proxy(this._keyDown,this)).appendTo(o);s.click(function(){document.activeElement!==this&&this.focus()}),null!==i&&s.focus(),WCF.DOMNodeInsertedHandler.execute(),this._count++,this._count===this._maxOptions&&this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")},_keyDown:function(t){13===t.which&&($(t.currentTarget).parent().children(".jsAddOption").trigger("click"),t.preventDefault())},_addOption:function(t){if(t.preventDefault(),this._count===this._maxOptions)return!1;var e=$(t.currentTarget).closest("li",this._container[0]);this._createOption(void 0,void 0,e)},_removeOption:function(t){t.preventDefault(),$(t.currentTarget).closest("li",this._container[0]).remove(),this._count--,this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled"),0==this._container.children("li").length&&this._createOption()},_submit:function(i){var o=[];if(this._container.children("li").each(function(t,e){var i=$(e),n=$.trim(i.find("input").val());""!=n&&o.push(i.data("optionID")+"_"+n)}),"object"==typeof i.originalEvent&&i.originalEvent instanceof Event){if(o.length)for(var t=this._container.parents("form").find(".formSubmit"),e=0,n=o.length;e<n;e++)$('<input type="hidden" name="'+this._fieldName+"["+e+']">').val(o[e]).appendTo(t)}else i.poll={pollOptions:o},this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(t,e){e.name&&("checkbox"===e.type&&!e.checked||(i.poll[e.name]=e.value))})},_reset:function(){for(var t=this._container[0];1<t.childElementCount;)t.removeChild(t.children[1]);elBySel("input",t.children[0]).value="",this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(t,e){e.name&&("checkbox"===e.type?e.checked=!1:"text"===e.type?e.value="":"number"===e.type&&(e.value=e.min))}),require(["WoltLabSuite/Core/Date/Picker"],function(t){t.clear("pollEndTime_"+this._editorId)}.bind(this))},_validate:function(t){var e,i,n;""!==elById("pollQuestion_"+this._editorId).value.trim()&&(e=0,elBySelAll('li input[type="text"]',this._container[0],function(t){""!==t.value.trim()&&e++}),0===e?(t.api.throwError(this._container[0],WCF.Language.get("wcf.global.form.error.empty")),t.valid=!1):(n=~~(i=elById("pollMaxVotes_"+this._editorId)).value)&&e<n&&(t.api.throwError(i,WCF.Language.get("wcf.poll.maxVotes.error.invalid")),t.valid=!1))},_handleError:function(t){switch(t.returnValues.fieldName){case"pollEndTime":case"pollMaxVotes":var e="pollEndTime"===t.returnValues.fieldName?"endTime":"maxVotes",i=elCreate("small");i.className="innerError",i.innerHTML=WCF.Language.get("wcf.poll."+e+".error."+t.returnValues.errorType);var n=elById(t.returnValues.fieldName+"_"+this._editorId),o=n.parentElement;o.classList.contains("inputAddon")&&(o=(n=o).parentElement),o.insertBefore(i,n.nextSibling),t.cancel=!0}}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var o,e=$(t);e.length?(this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php?poll/&t="+SECURITY_TOKEN}),o=this,e.each(function(t,e){var i=$(e),n=i.data("pollID");void 0===o._polls[n]&&(o._cache[n]={result:"",vote:""},o._polls[n]=i,o._canViewParticipants[n]=!!i.data("canViewParticipants"),o._canViewResult[n]=!!i.data("canViewResult"),o._canVote[n]=!!i.data("canVote"),o._bindListeners(n),i.data("inVote")&&o._prepareVote(n),o._toggleButtons(n))})):console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.")},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[i]&&this._polls[i].data("inVote")&&(this._cache[i].result?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].result),this._polls[i].data("inVote",!1),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getResult",pollID:i}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canVote[i]&&(this._polls[i].data("inVote")||(this._cache[i].vote?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].vote),this._polls[i].data("inVote",!0),this._prepareVote(i),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getVote",pollID:i}),this._proxy.sendRequest())))},_success:function(t,e,i){if(t&&t.actionName){var n=t.pollID;switch(t.resultTemplate&&(this._cache[n].result=t.resultTemplate),t.voteTemplate&&(this._cache[n].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,n);break;case"getVote":this._showVote(null,n);break;case"vote":this._canViewResult[n]=!0,this._canVote[n]=!!t.canVote,this._polls[n].data("isPublic")&&(this._canViewParticipants[n]=!0);var o=elBySel(".jsPollTotalVotes",this._polls[n][0]);o.textContent=WCF.String.formatNumeric(t.totalVotes),elData(o,"tooltip",t.totalVotesTooltip),this._showResult(null,n)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),i=this;this._inputElements[t]=e.find("input").change(function(){i._handleVoteButton(t)}),this._handleVoteButton(t);var n=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){i._enforceMaxVotes(t,n)}),this._enforceMaxVotes(t,n))},_enforceMaxVotes:function(t,e){var i=this._inputElements[t];i.filter(":checked").length==e?i.filter(":not(:checked)").disable():i.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],i=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?i.enable():i.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var i=!0;this._polls[t].data("inVote")?(i=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(i=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(i=!1,e.find(".jsButtonPollShowParticipants").show())),i&&e.hide()},_vote:function(t){var n,e=$(t.currentTarget).data("pollID");this._canVote[e]&&(n=[],this._inputElements[e].each(function(t,e){var i=$(e);i.is(":checked")&&n.push(i.data("optionID"))}),n.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:n,pollID:e}),this._proxy.sendRequest()))}}); })(this);
+(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:null,_count:0,_editorId:"",_maxOptions:0,init:function(t,e,i,n,o){this._count=0,this._maxOptions=i||-1,this._container=$("#"+t).children("ol:eq(0)"),this._fieldName=o||"pollOptions",this._container.length?(e=e||[],this._createOptionList(e),n?(this._editorId=n,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+n,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+n,this._submit.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+n,this._validate.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","handleError_"+n,this._handleError.bind(this))):this._container.closest("form").submit($.proxy(this._submit,this)),require(["WoltLabSuite/Core/Ui/Sortable/List"],(function(e){new e({containerId:t,options:{toleranceElement:"> div"}})}))):console.debug("[WCF.Poll.Management] Invalid container id given, aborting.")},_createOptionList:function(t){var e,i,n;for(e=0,i=t.length;e<i;e++)n=t[e],this._createOption(n.optionValue,n.optionID);t.length<this._maxOptions&&this._createOption()},_createOption:function(t,e,i){var n,o,s;t=t||"",e=parseInt(e)||0,i=i||null,n=$('<li class="sortableNode" />').data("optionID",e),null===i?n.appendTo(this._container):n.insertAfter(i),o=$('<div class="pollOptionInput" />').appendTo(n),$('<span class="icon icon16 fa-arrows sortableNodeHandle" />').appendTo(o),$('<a role="button" href="#" class="icon icon16 fa-plus jsTooltip jsAddOption pointer" title="'+WCF.Language.get("wcf.poll.button.addOption")+'" />').click($.proxy(this._addOption,this)).appendTo(o),$('<a role="button" href="#" class="icon icon16 fa-times jsTooltip jsDeleteOption pointer" title="'+WCF.Language.get("wcf.poll.button.removeOption")+'" />').click($.proxy(this._removeOption,this)).appendTo(o),(s=$('<input type="text" value="'+t+'" maxlength="255" />').keydown($.proxy(this._keyDown,this)).appendTo(o)).click((function(){document.activeElement!==this&&this.focus()})),null!==i&&s.focus(),WCF.DOMNodeInsertedHandler.execute(),this._count++,this._count===this._maxOptions&&this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")},_keyDown:function(t){13===t.which&&($(t.currentTarget).parent().children(".jsAddOption").trigger("click"),t.preventDefault())},_addOption:function(t){if(t.preventDefault(),this._count===this._maxOptions)return!1;var e=$(t.currentTarget).closest("li",this._container[0]);this._createOption(void 0,void 0,e)},_removeOption:function(t){t.preventDefault(),$(t.currentTarget).closest("li",this._container[0]).remove(),this._count--,this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled"),0==this._container.children("li").length&&this._createOption()},_submit:function(t){var e,i,n,o=[];if(this._container.children("li").each((function(t,e){var i=$(e),n=$.trim(i.find("input").val());""!=n&&o.push(i.data("optionID")+"_"+n)})),"object"==typeof t.originalEvent&&t.originalEvent instanceof Event){if(o.length)for(e=this._container.parents("form").find(".formSubmit"),i=0,n=o.length;i<n;i++)$('<input type="hidden" name="'+this._fieldName+"["+i+']">').val(o[i]).appendTo(e)}else t.poll={pollOptions:o},this._container.parents(".messageTabMenuContent:eq(0)").find("input").each((function(e,i){i.name&&("checkbox"!==i.type||i.checked)&&(t.poll[i.name]=i.value)}))},_reset:function(){for(var t=this._container[0];t.childElementCount>1;)t.removeChild(t.children[1]);elBySel("input",t.children[0]).value="",this._container.parents(".messageTabMenuContent:eq(0)").find("input").each((function(t,e){e.name&&("checkbox"===e.type?e.checked=!1:"text"===e.type?e.value="":"number"===e.type&&(e.value=e.min))})),require(["WoltLabSuite/Core/Date/Picker"],function(t){t.clear("pollEndTime_"+this._editorId)}.bind(this))},_validate:function(t){var e,i,n,o=elById("pollQuestion_"+this._editorId);""!==o.value.trim()&&(e=0,elBySelAll('li input[type="text"]',this._container[0],(function(t){""!==t.value.trim()&&e++})),0===e?(t.api.throwError(this._container[0],WCF.Language.get("wcf.global.form.error.empty")),t.valid=!1):(n=~~(i=elById("pollMaxVotes_"+this._editorId)).value)&&n>e&&(t.api.throwError(i,WCF.Language.get("wcf.poll.maxVotes.error.invalid")),t.valid=!1))},_handleError:function(t){var e,i,n,o;switch(t.returnValues.fieldName){case"pollEndTime":case"pollMaxVotes":e="pollEndTime"===t.returnValues.fieldName?"endTime":"maxVotes",(i=elCreate("small")).className="innerError",i.innerHTML=WCF.Language.get("wcf.poll."+e+".error."+t.returnValues.errorType),(o=(n=elById(t.returnValues.fieldName+"_"+this._editorId)).parentElement).classList.contains("inputAddon")&&(n=o,o=o.parentElement),o.insertBefore(i,n.nextSibling),t.cancel=!0}}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var e,i=$(t);i.length?(this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php?poll/&t="+SECURITY_TOKEN}),e=this,i.each((function(t,i){var n=$(i),o=n.data("pollID");void 0===e._polls[o]&&(e._cache[o]={result:"",vote:""},e._polls[o]=n,e._canViewParticipants[o]=!!n.data("canViewParticipants"),e._canViewResult[o]=!!n.data("canViewResult"),e._canVote[o]=!!n.data("canVote"),e._bindListeners(o),n.data("inVote")&&e._prepareVote(o),e._toggleButtons(o))}))):console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.")},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[i]&&this._polls[i].data("inVote")&&(this._cache[i].result?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].result),this._polls[i].data("inVote",!1),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getResult",pollID:i}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canVote[i]&&(this._polls[i].data("inVote")||(this._cache[i].vote?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].vote),this._polls[i].data("inVote",!0),this._prepareVote(i),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getVote",pollID:i}),this._proxy.sendRequest())))},_success:function(t,e,i){var n,o;if(t&&t.actionName)switch(n=t.pollID,t.resultTemplate&&(this._cache[n].result=t.resultTemplate),t.voteTemplate&&(this._cache[n].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,n);break;case"getVote":this._showVote(null,n);break;case"vote":this._canViewResult[n]=!0,this._canVote[n]=!!t.canVote,this._polls[n].data("isPublic")&&(this._canViewParticipants[n]=!0),(o=elBySel(".jsPollTotalVotes",this._polls[n][0])).textContent=WCF.String.formatNumeric(t.totalVotes),elData(o,"tooltip",t.totalVotesTooltip),this._showResult(null,n)}},_prepareVote:function(t){var e,i,n;this._polls[t].find(".jsButtonPollVote").disable(),e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),i=this,this._inputElements[t]=e.find("input").change((function(){i._handleVoteButton(t)})),this._handleVoteButton(t),n=e.data("maxVotes"),this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change((function(){i._enforceMaxVotes(t,n)})),this._enforceMaxVotes(t,n))},_enforceMaxVotes:function(t,e){var i=this._inputElements[t];i.filter(":checked").length==e?i.filter(":not(:checked)").disable():i.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],i=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?i.enable():i.disable()},_toggleButtons:function(t){var e,i=this._polls[t].children(".formSubmit");i.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide(),e=!0,this._polls[t].data("inVote")?(e=!1,i.find(".jsButtonPollVote").show(),this._canViewResult[t]&&i.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(e=!1,i.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(e=!1,i.find(".jsButtonPollShowParticipants").show())),e&&i.hide()},_vote:function(t){var e,i=$(t.currentTarget).data("pollID");this._canVote[i]&&(e=[],this._inputElements[i].each((function(t,i){var n=$(i);n.is(":checked")&&e.push(n.data("optionID"))})),e.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:e,pollID:i}),this._proxy.sendRequest()))}}); })(this);
// WCF.Search.Message.js
-(function (window, undefined) { "use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,s){var t,r;$.isFunction(i)?(this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this)),r=(t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify())).find("li.dropdownDivider").last(),this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(r),this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(r).children("ul"),t.find("input, label").on("click",function(e){e.stopPropagation()}),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)})):console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.")},_createListItem:function(e){this._divider.show(),this._list.parent().show(),this._super(e)},_clearList:function(e){e&&this._searchInput.val(""),this._divider.hide(),this._list.empty().parent().hide(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1}}); })(this);
+(function (window, undefined) { "use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,s){var t,r;$.isFunction(i)?(this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy((function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()}),this)),r=(t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify())).find("li.dropdownDivider").last(),this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(r),this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(r).children("ul"),t.find("input, label").on("click",(function(e){e.stopPropagation()})),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)})):console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.")},_createListItem:function(e){this._divider.show(),this._list.parent().show(),this._super(e)},_clearList:function(e){e&&this._searchInput.val(""),this._divider.hide(),this._list.empty().parent().hide(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1}}); })(this);
// WCF.User.js
-(function (window, undefined) { "use strict";WCF.User.Login=Class.extend({_loginSubmitButton:null,_password:null,_passwordContainer:null,_useCookies:null,_useCookiesContainer:null,init:function(t){this._loginSubmitButton=$("#loginSubmitButton"),this._password=$("#password"),this._passwordContainer=this._password.parents("dl"),this._useCookies=$("#useCookies"),this._useCookiesContainer=this._useCookies.parents("dl"),$("#loginForm").find("input[name=action]").change($.proxy(this._change,this)),t&&WCF.User.QuickLogin.init()},_change:function(t){"register"===$(t.currentTarget).val()?this._setState(!1,WCF.Language.get("wcf.user.button.register")):this._setState(!0,WCF.Language.get("wcf.user.button.login"))},_setState:function(t,e){t?(this._password.enable(),this._passwordContainer.removeClass("disabled"),this._useCookies.enable(),this._useCookiesContainer.removeClass("disabled")):(this._password.disable(),this._passwordContainer.addClass("disabled"),this._useCookies.disable(),this._useCookiesContainer.addClass("disabled")),this._loginSubmitButton.val(e)}}),WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:null,_dropdown:null,_identifier:"",_loadData:!0,_markAllAsReadLink:null,_options:{},_proxy:null,_triggerElement:null,_button:null,_callbackFocus:null,_callbackCloseUuid:"",_wasInsideDropdown:!1,init:function(t,e,i){var s;this._dropdown=null,this._loadData=!0,this._identifier=e,this._triggerElement=t,this._options=i,this._callbackFocus=null,this._callbackCloseUuid="",this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._triggerElement.click($.proxy(this.toggle,this)),this._button=elBySel("a",this._triggerElement[0]),this._button&&(elAttr(this._button,"role","button"),elAttr(this._button,"tabindex","0"),elAttr(this._button,"aria-haspopup",!0),elAttr(this._button,"aria-expanded",!1)),this._options.showAllLink&&this._triggerElement.dblclick($.proxy(this._dblClick,this)),!0===this._options.staticDropdown?this._loadData=!1:(s=this._triggerElement.find("span.badge")).length&&(this._badge=s)},toggle:function(t){return t instanceof Event&&t.preventDefault(),null===this._dropdown&&(this._dropdown=this._initDropdown()),this._dropdown.toggle()?(this._loadData||null===this._badge||!parseInt(this._badge.text())||this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding").length||(this._loadData=!0),this._loadData&&(this._loadData=!1,this._load()),elAttr(this._button,"aria-expanded",!0),null===this._callbackFocus&&(this._callbackFocus=this._maintainFocus.bind(this)),document.body.addEventListener("focus",this._callbackFocus,{capture:!0}),this._callbackCloseUuid=WCF.System.Event.addListener("WCF.Dropdown.Interactive.Instance","close",function(t){t.instance===this._dropdown&&(WCF.System.Event.removeListener("WCF.Dropdown.Interactive.Instance","close",this._callbackCloseUuid),document.body.removeEventListener("focus",this._callbackFocus,{capture:!0}))}.bind(this))):(elAttr(this._button,"aria-expanded",!1),WCF.System.Event.removeListener("WCF.Dropdown.Interactive.Instance","close",this._callbackCloseUuid),document.body.removeEventListener("focus",this._callbackFocus,{capture:!0})),!1},_dblClick:function(t){return t.preventDefault(),window.location=this._options.showAllLink,!1},_initDropdown:function(){var t=WCF.Dropdown.Interactive.Handler.create(this._triggerElement,this._identifier,this._options);return $('<li class="loading"><span class="icon icon24 fa-spinner" /> <span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t.getItemList()),t},_load:function(){},_success:function(t){var e,i,s;void 0!==t.returnValues.template&&(e=this._dropdown.getItemList().empty(),$(t.returnValues.template).appendTo(e),e.children().length||$('<li class="noItems">'+this._options.noItems+"</li>").appendTo(e),this._options.enableMarkAsRead&&(i=this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding"),null===this._markAllAsReadLink&&i.length&&(this._markAllAsReadLink=$('<li class="interactiveDropdownItemMarkAllAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAllAsRead")+'" class="jsTooltip"><span class="icon icon24 fa-check" /></a></li>').appendTo(this._dropdown.getLinkList())).click(function(t){return this._dropdown.close(),this._markAllAsRead(),!1}.bind(this)),i.each(function(t,e){var i=$(e).addClass("interactiveDropdownItemOutstandingIcon"),s=i.data("objectID");$('<div class="interactiveDropdownItemMarkAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAsRead")+'" class="jsTooltip"><span class="icon icon16 fa-check" /></a></div>').appendTo(i).click(function(t){return this._markAsRead(t,s),!1}.bind(this))}.bind(this))),this._dropdown.getItemList().children().each(function(t,e){var i=$(e),s=i.data("link");s&&($.browser.msie?i.click(function(t){if("A"!==t.target.tagName)return window.location=s,!1}):(i.addClass("interactiveDropdownItemShadow"),$('<a href="'+s+'" class="interactiveDropdownItemShadowLink" />').appendTo(i)),i.data("linkReplaceAll")&&i.find("> .box48 a:not(.userLink)").prop("href",s))}),this._dropdown.rebuildScrollbar()),void 0!==t.returnValues.totalCount&&this.updateBadge(t.returnValues.totalCount),this._options.enableMarkAsRead&&(t.returnValues.markAsRead?(s=this._dropdown.getItemList().children("li[data-object-id="+t.returnValues.markAsRead+"]")).length&&(s.removeClass("interactiveDropdownItemOutstanding").data("isRead",!0),s.children(".interactiveDropdownItemMarkAsRead").remove()):t.returnValues.markAllAsRead&&(this.resetItems(),this.updateBadge(0)))},_markAsRead:function(t,e){},_markAllAsRead:function(){},updateBadge:function(t){(t=parseInt(t)||0)?(null===this._badge&&(this._badge=$('<span class="badge badgeUpdate" />').appendTo(this._triggerElement.children("a")),this._badge.before(" ")),this._badge.text(t)):null!==this._badge&&(this._badge.remove(),this._badge=null),this._options.enableMarkAsRead&&(t||null===this._markAllAsReadLink||(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null)),WCF.System.Event.fireEvent("com.woltlab.wcf.userMenu","updateBadge",{count:t,identifier:this._identifier})},resetItems:function(){null!==this._dropdown&&(this._dropdown.resetItems(),this._loadData=!0)},_maintainFocus:function(t){var e;document.activeElement&&!document.activeElement.classList.contains("focus-visible")||((e=this._dropdown.getContainer()[0]).contains(t.target)?this._wasInsideDropdown=!0:this._wasInsideDropdown?(this._button.focus(),this._wasInsideDropdown=!1):elBySel("a",e).focus())}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:null,init:function(t){t.enableMarkAsRead=!0,this._super($("#userNotifications"),"userNotifications",t);try{var e;this._favico=new Favico({animation:"none",type:"circle"}),null!==this._badge&&(e=parseInt(this._badge.text())||0,this._favico.badge(e))}catch(t){console.debug("[WCF.User.Panel.Notification] Failed to initialized Favico: "+t.message)}WCF.System.PushNotification.addCallback("userNotificationCount",$.proxy(this.updateUserNotificationCount,this)),require(["EventHandler"],function(t){t.add("com.woltlab.wcf.UserMenuMobile","more",function(t){"com.woltlab.wcf.notifications"===t.identifier&&this.toggle()}.bind(this))}.bind(this))},_initDropdown:function(){var t=this._super();return $('<li><a href="'+this._options.settingsLink+'" title="'+WCF.Language.get("wcf.user.panel.settings")+'" class="jsTooltip"><span class="icon icon24 fa-cog" /></a></li>').appendTo(t.getLinkList()),t},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingNotifications",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},_markAsRead:function(t,e){this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest()},_markAllAsRead:function(t){this._proxy.setOption("data",{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._markAllAsReadLink&&(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null)},updateBadge:function(t){t=parseInt(t)||0,$("#userNotifications").attr("data-count",t),null!==this._favico&&this._favico.badge(t),this._super(t)},updateUserNotificationCount:function(t){null!==this._dropdown&&this._dropdown.resetItems(),this.updateBadge(t)},_success:function(t){this._super(t),elBySelAll(".interactiveDropdownItemShadowLink",this._dropdown.getItemList()[0],function(t){t.addEventListener("click",function(t){t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||this._dropdown.close()}.bind(this))}.bind(this))}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){this._super($("#userMenu"),"userMenu",{pointerOffset:"13px",staticDropdown:!0})}}),WCF.User.QuickLogin={init:function(){require(["EventHandler","Ui/Dialog"],function(t,s){var a=elById("loginForm"),n=elBySel(".loginFormLogin",a);n&&!n.nextElementSibling&&a.classList.add("loginFormLoginOnly");for(var o=elBySel(".loginFormRegister",a),e=function(t){if(t instanceof Event&&(t.preventDefault(),t.stopPropagation()),a.style.removeProperty("display"),s.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==n&&null!==o){var e=n.offsetTop,i=0;if(a.clientWidth>2*n.clientWidth)for(;e<o.offsetTop-50;)i+=100,n.style.setProperty("margin-bottom",i+"px","")}},i=document.getElementsByClassName("loginLink"),r=0,l=i.length;r<l;r++)i[r].addEventListener(WCF_CLICK_EVENT,e);var c=a.querySelector("#loginForm input[name=url]");null===c||c.value.match(/^https?:\/\//)||c.setAttribute("value",window.location.protocol+"//"+window.location.host+c.getAttribute("value")),t.add("com.woltlab.wcf.UserMenuMobile","more",function(t){"com.woltlab.wcf.login"===t.identifier&&(t.handler.close(!0),e())})})}},WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){this._profileContent=$("#profileContent"),this._userID=t;var s=this._profileContent.data("active"),a=!1;this._profileContent.find("div.tabMenuContent").each($.proxy(function(t,e){var i=$(e).wcfIdentify();s===i?this._hasContent[i]=!0:(this._hasContent[i]=!1,a=!0)},this)),a&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy(function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],function(t){t.getTabMenu("profileContent").select("likes")})}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(i,t,e){var s=i.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(t,e){e.insertHtml(i.returnValues.template,elById(s),"append"),t.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){var r,l,i=null;elBySelAll(".redactor-layer",this._tab[0],function(t){var e={api:{throwError:elInnerError},valid:!0};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","validate_"+elData(t,"element-id"),e),e.valid||null!==i||(i=t.parentNode)}),i?i.scrollIntoView({behavior:"smooth"}):(this._actionName="save",r=/values\[([a-zA-Z0-9._-]+)\]/,l={},this._tab.find("input, textarea, select").each(function(t,e){var i=$(e),s=null;switch(i.getTagName()){case"input":var a=i.attr("type");if(("radio"===a||"checkbox"===a)&&!i.prop("checked"))return;break;case"textarea":i.data("redactor")&&(s=i.redactor("code.get"))}var n,o=i.attr("name");r.test(o)&&(n=RegExp.$1,null===s&&(s=i.val()),"checkbox"===i.attr("type")&&/\[\]$/.test(o)?(Array.isArray(l[n])||(l[n]=[]),l[n].push(s)):l[n]=s)}),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:l}}),this._proxy.sendRequest())},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(i,s){this._destroyEditor();var a=this;this._tab.html(function(t,e){return!0!==s&&(a._cachedTemplate=e),i.returnValues.template}),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup(function(t){if(t.which===$.ui.keyCode.ENTER)return a._save(),t.preventDefault(),!1})},_destroyEditor:function(){this._tab.find("textarea").each(function(t,e){var i=$(e);i.data("redactor")&&i.redactor("core.destroy")})}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e=this._element.val();if(!e)return this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"));if(null!==this._confirmElement){var i=this._confirmElement.val();if(""!=i&&e!=i)return this._showError(this._confirmElement,this._errorMessages.notEqual)}this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.Validation.Password=WCF.User.Registration.Validation.extend({_actionName:"validatePassword",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{password:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.password.error.",notEqual:WCF.Language.get("wcf.user.confirmPassword.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".contentHeaderNavigation .jsMarkAllAsConfirmed").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})})}),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$('<a href="#" class="icon icon24 fa-check notificationItemMarkAsConfirmed jsTooltip" title="'+WCF.Language.get("wcf.user.notification.markAsConfirmed")+'" />').appendTo(i).click($.proxy(this._markAsConfirmed,this)));var s=e.querySelector(".details > p:first-child");s.classList.add("pointer"),s.addEventListener("click",function(t){window.location.href=i.data("link")})}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="htmlContent messageSignatureConstraints"></div></section>').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button class="small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.LikeLoader=Class.extend({_container:null,_likeType:"received",_likeValue:1,_loadButton:null,_noMoreEntries:null,_proxy:null,_userID:0,init:function(t){var e;this._container=$("#likeList"),this._userID=t,this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),e=$('<li class="likeListMore showMore"><button class="small">'+WCF.Language.get("wcf.like.likes.more")+"</button><small>"+WCF.Language.get("wcf.like.likes.noMoreEntries")+"</small></li>").appendTo(this._container),this._loadButton=e.children("button").click($.proxy(this._click,this)),this._noMoreEntries=e.children("small").hide(),2==this._container.find("> li").length&&(this._loadButton.hide(),this._noMoreEntries.show()),$("#likeType .button").click($.proxy(this._clickLikeType,this)),$("#likeValue .button").click($.proxy(this._clickLikeValue,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_clickLikeType:function(t){var e=$(t.currentTarget);this._likeType!=e.data("likeType")&&(this._likeType=e.data("likeType"),$("#likeType .button").removeClass("active"),e.addClass("active"),this._reload())},_clickLikeValue:function(t){var e=$(t.currentTarget);this._likeValue!=e.data("likeValue")&&(this._likeValue=e.data("likeValue"),$("#likeValue .button").removeClass("active"),e.addClass("active"),$("#likeType > li:first-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesReceived")),$("#likeType > li:last-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesGiven")),this._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),this._reload())},_reload:function(){this._container.find("> li:not(:first-child):not(:last-child)").remove(),this._container.data("lastLikeTime",0),this._click()},_click:function(){this._loadButton.enable();var t={lastLikeTime:this._container.data("lastLikeTime"),userID:this._userID,likeType:this._likeType,likeValue:this._likeValue};this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\like\\LikeAction",parameters:t}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",t.returnValues.lastLikeTime),this._noMoreEntries.hide(),this._loadButton.show().enable()):(this._noMoreEntries.show(),this._loadButton.hide())}}),WCF.User.ProfilePreview=WCF.Popover.extend({_proxy:null,_userProfiles:{},init:function(){this._super(".userLink"),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1}),WCF.System.ObjectStore.add("WCF.User.ProfilePreview",this)},_loadContent:function(){var a,n,o=$("#"+this._activeElementID).data("userID");this._userProfiles[o]?this._insertContent(this._activeElementID,this._userProfiles[o],!0):(this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[o]}),a=this._activeElementID,(n=this)._proxy.setOption("success",function(t,e,i){n._userProfiles[o]=t.returnValues.template,n._insertContent(a,t.returnValues.template,!0)}),this._proxy.setOption("failure",function(t,e,i,s){return n._userProfiles[o]=t.message,n._insertContent(a,t.message,!0),!1}),this._proxy.sendRequest())},purge:function(t){delete this._userProfiles[t],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy(function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))},this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(s,t,e){this._containerList.each($.proxy(function(t,e){var i=$(e).find(this._followButtonSelector).get(0);if(i&&$(i).data("objectID")==this._userID)return i=$(i),s.returnValues.following?(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")).children(".icon").removeClass("fa-plus").addClass("fa-minus"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")).children(".icon").removeClass("fa-minus").addClass("fa-plus"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),i.data("following",s.returnValues.following),!1},this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy(function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))},this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(s,t,e){this._containerList.each($.proxy(function(t,e){var i=$(e).find(this._ignoreButtonSelector).get(0);if(i&&$(i).data("objectID")==this._userID)return i=$(i),s.returnValues.isIgnoredUser?(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")).children(".icon").removeClass("fa-ban").addClass("fa-circle-o"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")).children(".icon").removeClass("fa-circle-o").addClass("fa-ban"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),i.data("ignored",s.returnValues.isIgnoredUser),!1},this)),(new WCF.System.Notification).show();var i=this;WCF.System.ObjectStore.invoke("WCF.User.ProfilePreview",function(t){t.purge(i._userID)})}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change(function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()}),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('<img src="'+t+'" class="userAvatarImage" alt="" />').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('<small class="innerError"></span>'),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){var i;e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount)?console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount):this._cache[this._pageNo]?(i=!1,null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),1<this._pageCount?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()):(this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest())},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy(function(t,e){var i=$(e);i.addClass("pointer");var s=i.data("objectType"),a=i.data("objectID");void 0===this._buttons[s]&&(this._buttons[s]={}),this._buttons[s][a]=i.click($.proxy(this._click,this))},this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("<div>"+t.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change(function(t){1==$(t.currentTarget).val()?s.enable():s.disable()}),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i.removeClass("fa-bookmark-o").addClass("fa-bookmark"),e.data("isSubscribed",!0);else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i.removeClass("fa-bookmark").addClass("fa-bookmark-o"),e.data("isSubscribed",!1)),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this);
+(function (window, undefined) { "use strict";WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:null,_dropdown:null,_identifier:"",_loadData:!0,_markAllAsReadLink:null,_options:{},_proxy:null,_triggerElement:null,_button:null,_callbackFocus:null,_callbackCloseUuid:"",_wasInsideDropdown:!1,init:function(t,e,i){if(this._dropdown=null,this._loadData=!0,this._identifier=e,this._triggerElement=t,this._options=i,this._callbackFocus=null,this._callbackCloseUuid="",this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._triggerElement.click($.proxy(this.toggle,this)),this._button=elBySel("a",this._triggerElement[0]),this._button&&(elAttr(this._button,"role","button"),elAttr(this._button,"tabindex","0"),elAttr(this._button,"aria-haspopup",!0),elAttr(this._button,"aria-expanded",!1)),this._options.showAllLink&&this._triggerElement.dblclick($.proxy(this._dblClick,this)),!0===this._options.staticDropdown)this._loadData=!1;else{var s=this._triggerElement.find("span.badge");s.length&&(this._badge=s)}},toggle:function(t){if(t instanceof Event&&t.preventDefault(),null===this._dropdown&&(this._dropdown=this._initDropdown()),this._dropdown.toggle()){if(!this._loadData)if(null!==this._badge)(parseInt(this._badge.text())||0)&&!this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding").length&&(this._loadData=!0);this._loadData&&(this._loadData=!1,this._load()),elAttr(this._button,"aria-expanded",!0),null===this._callbackFocus&&(this._callbackFocus=this._maintainFocus.bind(this)),document.body.addEventListener("focus",this._callbackFocus,{capture:!0}),this._callbackCloseUuid=WCF.System.Event.addListener("WCF.Dropdown.Interactive.Instance","close",function(t){t.instance===this._dropdown&&(WCF.System.Event.removeListener("WCF.Dropdown.Interactive.Instance","close",this._callbackCloseUuid),document.body.removeEventListener("focus",this._callbackFocus,{capture:!0}))}.bind(this))}else elAttr(this._button,"aria-expanded",!1),WCF.System.Event.removeListener("WCF.Dropdown.Interactive.Instance","close",this._callbackCloseUuid),document.body.removeEventListener("focus",this._callbackFocus,{capture:!0});return!1},_dblClick:function(t){return t.preventDefault(),window.location=this._options.showAllLink,!1},_initDropdown:function(){var t=WCF.Dropdown.Interactive.Handler.create(this._triggerElement,this._identifier,this._options);return $('<li class="loading"><span class="icon icon24 fa-spinner" /> <span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t.getItemList()),t},_load:function(){},_success:function(t){var e,i,s;void 0!==t.returnValues.template&&(e=this._dropdown.getItemList().empty(),$(t.returnValues.template).appendTo(e),e.children().length||$('<li class="noItems">'+this._options.noItems+"</li>").appendTo(e),this._options.enableMarkAsRead&&(i=this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding"),null===this._markAllAsReadLink&&i.length&&(this._markAllAsReadLink=$('<li class="interactiveDropdownItemMarkAllAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAllAsRead")+'" class="jsTooltip"><span class="icon icon24 fa-check" /></a></li>').appendTo(this._dropdown.getLinkList())).click(function(t){return this._dropdown.close(),this._markAllAsRead(),!1}.bind(this)),i.each(function(t,e){var i=$(e).addClass("interactiveDropdownItemOutstandingIcon"),s=i.data("objectID"),a=$('<div class="interactiveDropdownItemMarkAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAsRead")+'" class="jsTooltip"><span class="icon icon16 fa-check" /></a></div>').appendTo(i);a.click(function(t){return this._markAsRead(t,s),!1}.bind(this))}.bind(this))),this._dropdown.getItemList().children().each((function(t,e){var i=$(e),s=i.data("link");s&&($.browser.msie?i.click((function(t){if("A"!==t.target.tagName)return window.location=s,!1})):(i.addClass("interactiveDropdownItemShadow"),$('<a href="'+s+'" class="interactiveDropdownItemShadowLink" />').appendTo(i)),i.data("linkReplaceAll")&&i.find("> .box48 a:not(.userLink)").prop("href",s))})),this._dropdown.rebuildScrollbar()),void 0!==t.returnValues.totalCount&&this.updateBadge(t.returnValues.totalCount),this._options.enableMarkAsRead&&(t.returnValues.markAsRead?(s=this._dropdown.getItemList().children("li[data-object-id="+t.returnValues.markAsRead+"]")).length&&(s.removeClass("interactiveDropdownItemOutstanding").data("isRead",!0),s.children(".interactiveDropdownItemMarkAsRead").remove()):t.returnValues.markAllAsRead&&(this.resetItems(),this.updateBadge(0)))},_markAsRead:function(t,e){},_markAllAsRead:function(){},updateBadge:function(t){(t=parseInt(t)||0)?(null===this._badge&&(this._badge=$('<span class="badge badgeUpdate" />').appendTo(this._triggerElement.children("a")),this._badge.before(" ")),this._badge.text(t)):null!==this._badge&&(this._badge.remove(),this._badge=null),this._options.enableMarkAsRead&&(t||null===this._markAllAsReadLink||(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null)),WCF.System.Event.fireEvent("com.woltlab.wcf.userMenu","updateBadge",{count:t,identifier:this._identifier})},resetItems:function(){null!==this._dropdown&&(this._dropdown.resetItems(),this._loadData=!0)},_maintainFocus:function(t){if(!document.activeElement||document.activeElement.classList.contains("focus-visible")){var e=this._dropdown.getContainer()[0];e.contains(t.target)?this._wasInsideDropdown=!0:this._wasInsideDropdown?(this._button.focus(),this._wasInsideDropdown=!1):elBySel("a",e).focus()}}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:null,init:function(t){t.enableMarkAsRead=!0,this._super($("#userNotifications"),"userNotifications",t);try{require(["favico"],(t=>{if(this._favico=new t({animation:"none",type:"circle"}),null!==this._badge){var e=parseInt(this._badge.text())||0;this._favico.badge(e)}}))}catch(t){console.debug("[WCF.User.Panel.Notification] Failed to initialized Favico: "+t.message)}WCF.System.PushNotification.addCallback("userNotificationCount",$.proxy(this.updateUserNotificationCount,this)),require(["EventHandler"],function(t){t.add("com.woltlab.wcf.UserMenuMobile","more",function(t){"com.woltlab.wcf.notifications"===t.identifier&&this.toggle()}.bind(this))}.bind(this))},_initDropdown:function(){var t=this._super();return $('<li><a href="'+this._options.settingsLink+'" title="'+WCF.Language.get("wcf.user.panel.settings")+'" class="jsTooltip"><span class="icon icon24 fa-cog" /></a></li>').appendTo(t.getLinkList()),t},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingNotifications",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},_markAsRead:function(t,e){this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest()},_markAllAsRead:function(t){this._proxy.setOption("data",{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._markAllAsReadLink&&(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null)},updateBadge:function(t){t=parseInt(t)||0,$("#userNotifications").attr("data-count",t),null!==this._favico&&this._favico.badge(t),this._super(t)},updateUserNotificationCount:function(t){null!==this._dropdown&&this._dropdown.resetItems(),this.updateBadge(t)},_success:function(t){this._super(t),elBySelAll(".interactiveDropdownItemShadowLink",this._dropdown.getItemList()[0],function(t){t.addEventListener("click",function(t){t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||(this._dropdown.close(),WCF.System.Event.fireEvent("com.woltlab.wcf.UserMenuMobile","close"))}.bind(this))}.bind(this))}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){this._super($("#userMenu"),"userMenu",{pointerOffset:"13px",staticDropdown:!0})}}),WCF.User.QuickLogin={init:function(){require(["EventHandler","Ui/Dialog"],(function(t,e){var i,s,a,n,o,r,l=elById("loginForm"),c=elBySel(".loginFormLogin",l);for(c&&!c.nextElementSibling&&l.classList.add("loginFormLoginOnly"),i=elBySel(".loginFormRegister",l),s=function(t){var s,a;if(t instanceof Event&&(t.preventDefault(),t.stopPropagation()),l.style.removeProperty("display"),e.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==c&&null!==i&&(s=c.offsetTop,a=0,l.clientWidth>2*c.clientWidth))for(;s<i.offsetTop-50;)a+=100,c.style.setProperty("margin-bottom",a+"px","")},n=0,o=(a=document.getElementsByClassName("loginLink")).length;n<o;n++)a[n].addEventListener("click",s);null===(r=l.querySelector("#loginForm input[name=url]"))||r.value.match(/^https?:\/\//)||r.setAttribute("value",window.location.protocol+"//"+window.location.host+r.getAttribute("value")),t.add("com.woltlab.wcf.UserMenuMobile","more",(function(t){"com.woltlab.wcf.login"===t.identifier&&(t.handler.close(!0),s())}))}))}},WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){var t,e,i=null;elBySelAll(".redactor-layer",this._tab[0],(function(t){var e={api:{throwError:elInnerError},valid:!0};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","validate_"+elData(t,"element-id"),e),e.valid||null!==i||(i=t.parentNode)})),i?i.scrollIntoView({behavior:"smooth"}):(this._actionName="save",t=/values\[([a-zA-Z0-9._-]+)\]/,e={},this._tab.find("input, textarea, select").each((function(i,s){var a,n,o,r=$(s),l=null;switch(r.getTagName()){case"input":if(("radio"===(a=r.attr("type"))||"checkbox"===a)&&!r.prop("checked"))return;break;case"textarea":r.data("redactor")&&(l=r.redactor("code.get"))}n=r.attr("name"),t.test(n)&&(o=RegExp.$1,null===l&&(l=r.val()),"checkbox"===r.attr("type")&&/\[\]$/.test(n)?(Array.isArray(e[o])||(e[o]=[]),e[o].push(l)):e[o]=l)})),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:e}}),this._proxy.sendRequest())},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html((function(s,a){return!0!==e&&(i._cachedTemplate=a),t.returnValues.template})),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup((function(t){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1}))},_destroyEditor:function(){this._tab.find("textarea").each((function(t,e){var i=$(e);i.data("redactor")&&i.redactor("core.destroy")}))}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.Validation.Password=WCF.User.Registration.Validation.extend({_actionName:"validatePassword",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{password:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.password.error.",notEqual:WCF.Language.get("wcf.user.confirmPassword.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".contentHeaderNavigation .jsMarkAllAsConfirmed").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),(function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})}))})),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i,s=$(e);s.data("isRead")||(s.find("a:not(.userLink)").prop("href",s.data("link")),$('<a href="#" class="icon icon24 fa-check notificationItemMarkAsConfirmed jsTooltip" title="'+WCF.Language.get("wcf.user.notification.markAsConfirmed")+'" />').appendTo(s).click($.proxy(this._markAsConfirmed,this))),(i=e.querySelector(".details > p:first-child")).classList.add("pointer"),i.addEventListener("click",(function(t){window.location.href=s.data("link")}))}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="htmlContent messageSignatureConstraints"></div></section>').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button class="small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.LikeLoader=Class.extend({_container:null,_likeType:"received",_likeValue:1,_loadButton:null,_noMoreEntries:null,_proxy:null,_userID:0,init:function(t){if(this._container=$("#likeList"),this._userID=t,this._userID){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});var e=$('<li class="likeListMore showMore"><button class="small">'+WCF.Language.get("wcf.like.likes.more")+"</button><small>"+WCF.Language.get("wcf.like.likes.noMoreEntries")+"</small></li>").appendTo(this._container);this._loadButton=e.children("button").click($.proxy(this._click,this)),this._noMoreEntries=e.children("small").hide(),2==this._container.find("> li").length&&(this._loadButton.hide(),this._noMoreEntries.show()),$("#likeType .button").click($.proxy(this._clickLikeType,this)),$("#likeValue .button").click($.proxy(this._clickLikeValue,this))}else console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_clickLikeType:function(t){var e=$(t.currentTarget);this._likeType!=e.data("likeType")&&(this._likeType=e.data("likeType"),$("#likeType .button").removeClass("active"),e.addClass("active"),this._reload())},_clickLikeValue:function(t){var e=$(t.currentTarget);this._likeValue!=e.data("likeValue")&&(this._likeValue=e.data("likeValue"),$("#likeValue .button").removeClass("active"),e.addClass("active"),$("#likeType > li:first-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesReceived")),$("#likeType > li:last-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesGiven")),this._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),this._reload())},_reload:function(){this._container.find("> li:not(:first-child):not(:last-child)").remove(),this._container.data("lastLikeTime",0),this._click()},_click:function(){this._loadButton.enable();var t={lastLikeTime:this._container.data("lastLikeTime"),userID:this._userID,likeType:this._likeType,likeValue:this._likeValue};this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\like\\LikeAction",parameters:t}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",t.returnValues.lastLikeTime),this._noMoreEntries.hide(),this._loadButton.show().enable()):(this._noMoreEntries.show(),this._loadButton.hide())}}),WCF.User.ProfilePreview=WCF.Popover.extend({_proxy:null,_userProfiles:{},init:function(){this._super(".userLink"),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1}),WCF.System.ObjectStore.add("WCF.User.ProfilePreview",this)},_loadContent:function(){var t,e,i=$("#"+this._activeElementID),s=i.data("userID");this._userProfiles[s]?this._insertContent(this._activeElementID,this._userProfiles[s],!0):(this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[s]}),t=this._activeElementID,e=this,this._proxy.setOption("success",(function(i,a,n){e._userProfiles[s]=i.returnValues.template,e._insertContent(t,i.returnValues.template,!0)})),this._proxy.setOption("failure",(function(i,a,n,o){return e._userProfiles[s]=i.message,e._insertContent(t,i.message,!0),!1})),this._proxy.sendRequest())},purge:function(t){delete this._userProfiles[t],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")).children(".icon").removeClass("fa-plus").addClass("fa-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")).children(".icon").removeClass("fa-minus").addClass("fa-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){var s;this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")).children(".icon").removeClass("fa-ban").addClass("fa-circle-o"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")).children(".icon").removeClass("fa-circle-o").addClass("fa-ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1}),this)),(new WCF.System.Notification).show(),s=this,WCF.System.ObjectStore.invoke("WCF.User.ProfilePreview",(function(t){t.purge(s._userID)}))}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change((function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()})),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('<img src="'+t+'" class="userAvatarImage" alt="" />').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('<small class="innerError"></span>'),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy((function(t,e){var i,s,a=$(e);a.addClass("pointer"),i=a.data("objectType"),s=a.data("objectID"),void 0===this._buttons[i]&&(this._buttons[i]={}),this._buttons[i][s]=a.click($.proxy(this._click,this))}),this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("<div>"+t.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change((function(t){1==$(t.currentTarget).val()?s.enable():s.disable()})),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i.removeClass("fa-bookmark-o").addClass("fa-bookmark"),e.data("isSubscribed",!0);else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i.removeClass("fa-bookmark").addClass("fa-bookmark-o"),e.data("isSubscribed",!1)),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this);
// WCF.Moderation.js
-(function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:null,_languageItem:"",_proxy:null,_queueID:0,_redirectURL:"",init:function(e,t,i){this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=i,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this)),$("#moderationAssignUser").click($.proxy(this._clickAssignedUser,this))):console.debug("[WCF.Moderation.Management] Missing class name, aborting."):console.debug("[WCF.Moderation.Management] Missing button selector, aborting.")},_click:function(e){var a=$(e.currentTarget).wcfIdentify(),t="";this._confirmationTemplate[a]&&(t=this._confirmationTemplate[a]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,a)),$.proxy(function(e,t,i){var o;"confirm"===e&&(o={actionName:a,className:this._className,objectIDs:[this._queueID]},this._confirmationTemplate[a]&&(o.parameters={},$(i).find("input, textarea").each(function(e,t){var i=$(t),a=i.val();"input"===i.getTagName()&&"checkbox"===i.attr("type")&&(i.is(":checked")||(a=null)),null!==a&&(o.parameters[i.attr("name")]=a)})),this._proxy.setOption("data",o),this._proxy.sendRequest(),$(this._buttonSelector).disable())},this),{},t)},_clickAssignedUser:function(){this._proxy.setOption("data",{actionName:"getAssignUserForm",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID]}),this._proxy.sendRequest()},_success:function(e,t,i){switch(e.actionName){case"getAssignUserForm":null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.moderation.assignedUser")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find("button[data-type=submit]").click($.proxy(this._assignUser,this));break;case"assignUser":var a=$("#moderationAssignedUserContainer > dd > span").empty();e.returnValues.userID?$('<a href="'+e.returnValues.link+'" data-object-id="'+e.returnValues.userID+'" class="userLink">'+WCF.String.escapeHTML(e.returnValues.username)+"</a>").appendTo(a):a.append(e.returnValues.username),a.append(" "),e.returnValues.newStatus&&$("#moderationStatusContainer > dd").text(WCF.Language.get("wcf.moderation.status."+e.returnValues.newStatus)),this._dialog.wcfDialog("close"),(new WCF.System.Notification).show();break;default:var o=new WCF.System.Notification(WCF.Language.get("wcf.global.success")),n=this;o.show(function(){window.location=n._redirectURL})}},_failure:function(e,t,i,a){if(e.returnValues&&e.returnValues.fieldName&&"assignedUsername"==e.returnValues.fieldName){this._dialog.find("small.innerError").remove();var o="";switch(e.returnValues.errorType){case"empty":o=WCF.Language.get("wcf.global.form.error.empty");break;case"notAffected":o=WCF.Language.get("wcf.moderation.assignedUser.error.notAffected");break;default:o=WCF.Language.get("wcf.user.username.error."+e.returnValues.errorType,{username:this._dialog.find("#assignedUsername").val()})}return $('<small class="innerError">'+o+"</small>").insertAfter(this._dialog.find("#assignedUsername")),!1}return!0},_assignUser:function(){var e=this._dialog.find("input[name=assignedUserID]:checked").val(),t="";if(-1==e&&(t=$.trim(this._dialog.find("#assignedUsername").val())),-1==e&&0==t.length)return this._dialog.find("small.innerError").remove(),void $('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(this._dialog.find("#assignedUsername"));this._proxy.setOption("data",{actionName:"assignUser",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID],parameters:{assignedUserID:e,assignedUsername:t}}),this._proxy.sendRequest()}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(document).on("dblclick",".moderationList .new .columnAvatar",$.proxy(this._dblclick,this))},_dblclick:function(e){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[$(e.currentTarget).parents(".moderationQueueEntry:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(a,e,t){$(".moderationList .new").each(function(e,t){var i=$(t);WCF.inArray(i.data("queueID"),a.objectIDs)&&(i.removeClass("new"),i.find(".columnAvatar").off("dblclick"))})}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".markAllAsReadButton").click($.proxy(this._click,this))},_click:function(e){e.preventDefault(),this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_success:function(e,t,i){var a=WCF.Dropdown.Interactive.Handler.getDropdown("outstandingModeration");a&&(a.getLinkList().find(".interactiveDropdownItemMarkAllAsRead").remove(),a.getItemList().find(".interactiveDropdownItemMarkAsRead").remove()),$("#outstandingModeration .badgeUpdate").remove();var o=$(".moderationList");o.find(".new").removeClass("new"),o.find(".columnAvatar").off("dblclick")}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#enableContent, #removeContent",this._className="wcf\\data\\moderation\\queue\\ModerationQueueActivationAction",this._super(e,t,"wcf.moderation.activation.{actionName}.confirmMessage")}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(e,t){this._objectType=e,this._buttonSelector=t,this._buttons={},this._notification=null,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var o=this;$(this._buttonSelector).each(function(e,t){var i=$(t),a=i.wcfIdentify();o._buttons[a]||(o._buttons[a]=i).click($.proxy(o._click,o))})},_click:function(e){e.preventDefault(),this._objectID=$(e.currentTarget).data("objectID"),this._proxy.setOption("data",{actionName:"prepareReport",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.reported?(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.moderation.report.success"))),this._dialog.wcfDialog("close"),this._notification.show()):e.returnValues.template&&(this._showDialog(e.returnValues.template),e.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(e){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('<div id="moderationReport" />').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var e=this._dialog.find(".jsReportMessage").val();if(""==$.trim(e))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:e,objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#removeContent, #removeReport",this._className="wcf\\data\\moderation\\queue\\ModerationQueueReportAction",this._super(e,t,"wcf.moderation.report.{actionName}.confirmMessage"),this._confirmationTemplate.removeContent=$('<div class="section"><dl><dt><label for="message">'+WCF.Language.get("wcf.moderation.report.removeContent.reason")+'</label></dt><dd><textarea name="message" id="message" cols="40" rows="3" /></dd></dl></div>'),this._confirmationTemplate.removeReport=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"> '+WCF.Language.get("wcf.moderation.report.removeReport.markAsJustified")+"</label></dd></dl></div>")}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(e){e.enableMarkAsRead=!0,this._super($("#outstandingModeration"),"outstandingModeration",e),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.UserMenuMobile","more",function(e){"com.woltlab.wcf.moderation"===e.identifier&&this.toggle()}.bind(this))}.bind(this))},_initDropdown:function(){var e=this._super();return $('<li><a href="'+this._options.deletedContentLink+'" title="'+this._options.deletedContent+'" class="jsTooltip"><span class="icon icon24 fa-trash-o" /></a></li>').appendTo(e.getLinkList()),e},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingQueues",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_markAsRead:function(e,t){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[t]}),this._proxy.sendRequest()},_markAllAsRead:function(e){this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._loadData=!0}}); })(this);
+(function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:null,_languageItem:"",_proxy:null,_queueID:0,_redirectURL:"",init:function(e,t,i){this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=i,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this)),$("#moderationAssignUser").click($.proxy(this._clickAssignedUser,this))):console.debug("[WCF.Moderation.Management] Missing class name, aborting."):console.debug("[WCF.Moderation.Management] Missing button selector, aborting.")},_click:function(e){var t=$(e.currentTarget).wcfIdentify(),i="";this._confirmationTemplate[t]&&(i=this._confirmationTemplate[t]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,t)),$.proxy((function(e,i,a){if("confirm"===e){var o={actionName:t,className:this._className,objectIDs:[this._queueID]};this._confirmationTemplate[t]&&(o.parameters={},$(a).find("input, textarea").each((function(e,t){var i=$(t),a=i.val();"input"===i.getTagName()&&"checkbox"===i.attr("type")&&(i.is(":checked")||(a=null)),null!==a&&(o.parameters[i.attr("name")]=a)}))),this._proxy.setOption("data",o),this._proxy.sendRequest(),$(this._buttonSelector).disable()}}),this),{},i)},_clickAssignedUser:function(){this._proxy.setOption("data",{actionName:"getAssignUserForm",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID]}),this._proxy.sendRequest()},_success:function(e,t,i){var a,o,n;switch(e.actionName){case"getAssignUserForm":null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.moderation.assignedUser")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find("button[data-type=submit]").click($.proxy(this._assignUser,this));break;case"assignUser":a=$("#moderationAssignedUserContainer > dd > span").empty(),e.returnValues.userID?$('<a href="'+e.returnValues.link+'" data-object-id="'+e.returnValues.userID+'" class="userLink">'+WCF.String.escapeHTML(e.returnValues.username)+"</a>").appendTo(a):a.append(e.returnValues.username),a.append(" "),e.returnValues.newStatus&&$("#moderationStatusContainer > dd").text(WCF.Language.get("wcf.moderation.status."+e.returnValues.newStatus)),this._dialog.wcfDialog("close"),(new WCF.System.Notification).show();break;default:o=new WCF.System.Notification(WCF.Language.get("wcf.global.success")),n=this,o.show((function(){window.location=n._redirectURL}))}},_failure:function(e,t,i,a){if(e.returnValues&&e.returnValues.fieldName&&"assignedUsername"==e.returnValues.fieldName){this._dialog.find("small.innerError").remove();var o="";switch(e.returnValues.errorType){case"empty":o=WCF.Language.get("wcf.global.form.error.empty");break;case"notAffected":o=WCF.Language.get("wcf.moderation.assignedUser.error.notAffected");break;default:o=WCF.Language.get("wcf.user.username.error."+e.returnValues.errorType,{username:this._dialog.find("#assignedUsername").val()})}return $('<small class="innerError">'+o+"</small>").insertAfter(this._dialog.find("#assignedUsername")),!1}return!0},_assignUser:function(){var e=this._dialog.find("input[name=assignedUserID]:checked").val(),t="";if(-1==e&&(t=$.trim(this._dialog.find("#assignedUsername").val())),-1==e&&0==t.length)return this._dialog.find("small.innerError").remove(),void $('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(this._dialog.find("#assignedUsername"));this._proxy.setOption("data",{actionName:"assignUser",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID],parameters:{assignedUserID:e,assignedUsername:t}}),this._proxy.sendRequest()}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(document).on("dblclick",".moderationList .new .columnAvatar",$.proxy(this._dblclick,this))},_dblclick:function(e){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[$(e.currentTarget).parents(".moderationQueueEntry:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(e,t,i){$(".moderationList .new").each((function(t,i){var a=$(i);WCF.inArray(a.data("queueID"),e.objectIDs)&&(a.removeClass("new"),a.find(".columnAvatar").off("dblclick"))}))}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".markAllAsReadButton").click($.proxy(this._click,this))},_click:function(e){e.preventDefault(),this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_success:function(e,t,i){var a,o=WCF.Dropdown.Interactive.Handler.getDropdown("outstandingModeration");o&&(o.getLinkList().find(".interactiveDropdownItemMarkAllAsRead").remove(),o.getItemList().find(".interactiveDropdownItemMarkAsRead").remove()),$("#outstandingModeration .badgeUpdate").remove(),(a=$(".moderationList")).find(".new").removeClass("new"),a.find(".columnAvatar").off("dblclick")}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#enableContent, #removeContent",this._className="wcf\\data\\moderation\\queue\\ModerationQueueActivationAction",this._super(e,t,"wcf.moderation.activation.{actionName}.confirmMessage")}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(e,t){this._objectType=e,this._buttonSelector=t,this._buttons={},this._notification=null,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var e=this;$(this._buttonSelector).each((function(t,i){var a=$(i),o=a.wcfIdentify();e._buttons[o]||(e._buttons[o]=a,a.click($.proxy(e._click,e)))}))},_click:function(e){e.preventDefault(),this._objectID=$(e.currentTarget).data("objectID"),this._proxy.setOption("data",{actionName:"prepareReport",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.reported?(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.moderation.report.success"))),this._dialog.wcfDialog("close"),this._notification.show()):e.returnValues.template&&(this._showDialog(e.returnValues.template),e.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(e){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('<div id="moderationReport" />').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var e=this._dialog.find(".jsReportMessage").val();if(""==$.trim(e))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:e,objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(e,t,i){this._buttonSelector="#removeContent, #removeReport, #changeJustifiedStatus",this._className="wcf\\data\\moderation\\queue\\ModerationQueueReportAction",this._super(e,t,"wcf.moderation.report.{actionName}.confirmMessage"),this._confirmationTemplate.removeContent=$('<div class="section"><dl><dt><label for="message">'+WCF.Language.get("wcf.moderation.report.removeContent.reason")+'</label></dt><dd><textarea name="message" id="message" cols="40" rows="3" /></dd></dl></div>'),this._confirmationTemplate.removeReport=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"> '+WCF.Language.get("wcf.moderation.report.removeReport.markAsJustified")+"</label></dd></dl></div>"),this._confirmationTemplate.changeJustifiedStatus=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"'+(i?' checked="checked"':"")+"> "+WCF.Language.get("wcf.moderation.report.changeJustifiedStatus.markAsJustified")+"</label></dd></dl></div>")},_success:function(e,t,i){"changeJustifiedStatus"===e.actionName?(new WCF.System.Notification).show((()=>{window.location.reload()})):this._super(e,t,i)}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(e){e.enableMarkAsRead=!0,this._super($("#outstandingModeration"),"outstandingModeration",e),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.UserMenuMobile","more",function(e){"com.woltlab.wcf.moderation"===e.identifier&&this.toggle()}.bind(this))}.bind(this))},_initDropdown:function(){var e=this._super();return $('<li><a href="'+this._options.deletedContentLink+'" title="'+this._options.deletedContent+'" class="jsTooltip"><span class="icon icon24 fa-trash-o" /></a></li>').appendTo(e.getLinkList()),e},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingQueues",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_markAsRead:function(e,t){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[t]}),this._proxy.sendRequest()},_markAllAsRead:function(e){this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._loadData=!0}}); })(this);
// WCF.Combined.tiny.min.js -- DO NOT EDIT
// 3rdParty/jquery.js
-(function (window, undefined) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";function g(e){return null!=e&&e===e.window}var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,v=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),m={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,noModule:!0};function b(e,t,n){var r,i=(t=t||E).createElement("script");if(i.text=e,n)for(r in c)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.3.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!x(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||x(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(o=i?(i=!1,n&&Array.isArray(n)?n:[]):n&&k.isPlainObject(n)?n:{},a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){b(e)},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return v.apply([],a)},guid:1,support:m}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function i(){T()}var e,d,b,o,a,h,p,g,w,u,l,T,C,s,E,v,c,y,m,k="sizzle"+ +new Date,x=n.document,S=0,r=0,D=ae(),N=ae(),A=ae(),j=function(e,t){return e===t&&(l=!0),0},q={}.hasOwnProperty,t=[],L=t.pop,H=t.push,O=t.push,P=t.slice,M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",$="\\["+I+"*("+W+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+W+"))|)"+I+"*\\]",B=":("+W+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",F=new RegExp(I+"+","g"),_=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),z=new RegExp("^"+I+"*,"+I+"*"),X=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),U=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),V=new RegExp(B),G=new RegExp("^"+W+"$"),Y={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=ve(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){H.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,n,r){var i,o,a,s,u,l,c,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:x)!==C&&T(t),t=t||C,E)){if(11!==p&&(u=Z.exec(e)))if(i=u[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&m(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&d.getElementsByClassName&&t.getElementsByClassName)return O.apply(n,t.getElementsByClassName(i)),n}if(d.qsa&&!A[e+" "]&&(!v||!v.test(e))){if(1!==p)f=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ne,re):t.setAttribute("id",s=k),o=(l=h(e)).length;o--;)l[o]="#"+s+" "+ge(l[o]);c=l.join(","),f=ee.test(e)&&de(t.parentNode)||t}if(c)try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){}finally{s===k&&t.removeAttribute("id")}}}return g(e.replace(_,"$1"),t,n,r)}function ae(){var n=[];function r(e,t){return n.push(e+" ")>b.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function se(e){return e[k]=!0,e}function ue(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ie(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(a){return se(function(o){return o=+o,se(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=oe.support={},a=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=oe.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==C&&9===r.nodeType&&r.documentElement&&(s=(C=r).documentElement,E=!a(C),x!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",i,!1):n.attachEvent&&n.attachEvent("onunload",i)),d.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ue(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ue(function(e){return s.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,f);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},c=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ue(function(e){s.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),s.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(y=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&ue(function(e){d.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),c.push("!=",B)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=K.test(s.compareDocumentPosition),m=t||K.test(s.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===x&&m(x,e)?-1:t===C||t.ownerDocument===x&&m(x,t)?1:u?M(u,e)-M(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?M(u,e)-M(u,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===x?-1:s[r]===x?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),t=t.replace(U,"='$1']"),d.matchesSelector&&E&&!A[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=y.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<oe(t,C,null,[e]).length},oe.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),m(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&q.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},oe.escape=function(e){return(e+"").replace(ne,re)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=oe.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=oe.selectors={cacheLength:50,createPseudo:se,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,f),e[3]=(e[3]||e[4]||e[5]||"").replace(te,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=D[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&D(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=oe.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!=m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){for(;l;){for(a=e;a=a[l];)if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){for(d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];a=++s&&a&&a[l]||(d=s=0)||u.pop();)if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)for(;(a=++s&&a&&a[l]||(d=s=0)||u.pop())&&((x?a.nodeName.toLowerCase()!==f:1!==a.nodeType)||!++d||(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,t){for(var n,r=a(e,o),i=r.length;i--;)e[n=M(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:se(function(e){var r=[],i=[],s=p(e.replace(_,"$1"));return s[k]?se(function(e,t,n,r){for(var i,o=s(e,null,r,[]),a=e.length;a--;)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:se(function(t){return function(e){return 0<oe(t,e).length}}),contains:se(function(t){return t=t.replace(te,f),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:se(function(n){return G.test(n||"")||oe.error("unsupported lang: "+n),n=n.replace(te,f).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===s},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:pe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=function(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}(e);function he(){}function ge(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ve(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&s(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function ye(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function me(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function xe(d,h,g,v,y,e){return v&&!v[k]&&(v=xe(v)),y&&!y[k]&&(y=xe(y,e)),se(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:me(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=me(p,u),v(i,[],n,r),o=i.length;o--;)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a));if(e){if(y||d){if(y){for(i=[],o=p.length;o--;)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}for(o=p.length;o--;)(a=p[o])&&-1<(i=y?M(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=me(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):O.apply(t,p)})}function be(v,y){function e(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(a=0,t||o.ownerDocument===C||(T(o),n=!E);s=v[a++];)if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){for(a=0;s=y[a++];)s(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=L.call(r));f=me(f)}O.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&oe.uniqueSort(r)}return i&&(S=h,w=p),c}var m=0<y.length,x=0<v.length;return m?se(e):e}return he.prototype=b.filters=b.pseudos,b.setFilters=new he,h=oe.tokenize=function(e,t){var n,r,i,o,a,s,u,l=N[e+" "];if(l)return t?0:l.slice(0);for(a=e,s=[],u=b.preFilter;a;){for(o in n&&!(r=z.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(_," ")}),a=a.slice(n.length)),b.filter)!(r=Y[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):N(e,s).slice(0)},p=oe.compile=function(e,t){var n,r=[],i=[],o=A[e+" "];if(!o){for(n=(t=t||h(e)).length;n--;)(o=function e(t){for(var i,n,r,o=t.length,a=b.relative[t[0].type],s=a||b.relative[" "],u=a?1:0,l=ve(function(e){return e===i},s,!0),c=ve(function(e){return-1<M(i,e)},s,!0),f=[function(e,t,n){var r=!a&&(n||t!==w)||((i=t).nodeType?l:c)(e,t,n);return i=null,r}];u<o;u++)if(n=b.relative[t[u].type])f=[ve(ye(f),n)];else{if((n=b.filter[t[u].type].apply(null,t[u].matches))[k]){for(r=++u;r<o&&!b.relative[t[r].type];r++);return xe(1<u&&ye(f),1<u&&ge(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(_,"$1"),n,u<r&&e(t.slice(u,r)),r<o&&e(t=t.slice(r)),r<o&&ge(t))}f.push(n)}return ye(f)}(t[n]))[k]?r.push(o):i.push(o);(o=A(e,be(i,r))).selector=e}return o},g=oe.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,f),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=Y.needsContext.test(e)?0:o.length;i--&&(a=o[i],!b.relative[s=a.type]);)if((u=b.find[s])&&(r=u(a.matches[0].replace(te,f),ee.test(o[0].type)&&de(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&ge(o)))return O.apply(n,r),n;break}}return(l||p(e,c))(r,t,!E,n,!t||ee.test(e)&&de(t.parentNode)||t),n},d.sortStable=k.split("").sort(j).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;function T(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function S(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var D=k.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return x(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),A.test(r[1])&&k.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&x(i=e.promise)?i.call(e).done(t).fail(n):e&&x(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(M)||[],function(e,t){n[t]=!0}),n):k.extend({},r);function i(){for(s=s||r.once,a=o=!0;l.length;c=-1)for(t=l.shift();++c<u.length;)!1===u[c].apply(t[0],t[1])&&r.stopOnFalse&&(c=u.length,t=!1);r.memory||(t=!1),o=!1,s&&(u=t?[]:"")}var o,t,a,s,u=[],l=[],c=-1,f={add:function(){return u&&(t&&!o&&(c=u.length-1,l.push(t)),function n(e){k.each(e,function(e,t){x(t)?r.unique&&f.has(t)||u.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!o&&i()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;-1<(n=k.inArray(t,u,n));)u.splice(n,1),n<=c&&c--}),this},has:function(e){return e?-1<k.inArray(e,u):0<u.length},empty:function(){return u=u&&[],this},disable:function(){return s=l=[],u=t="",this},disabled:function(){return!u},lock:function(){return s=l=[],t||o||(u=t=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),o||i()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!a}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=x(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&x(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){function e(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,x(t)?s?t.call(e,l(u,o,R,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,I,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}}var n=this,r=arguments,t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,x(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,x(t)?t:R)),o[2][3].add(l(0,e,x(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){function t(t){return function(e){i[t]=this,o[t]=1<arguments.length?s.call(arguments):e,--n||a.resolveWith(i,o)}}var n=arguments.length,r=n,i=Array(r),o=s.call(arguments),a=k.Deferred();if(n<=1&&(W(e,a.done(t(r)).resolve,a.reject,!n),"pending"===a.state()||x(o[r]&&o[r].then)))return a.then();for(;r--;)W(o[r],t(r),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var B=k.Deferred();function F(){E.removeEventListener("DOMContentLoaded",F),C.removeEventListener("load",F),k.ready()}k.fn.ready=function(e){return B.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||B.resolveWith(E,[k])}}),k.ready.then=B.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",F),C.addEventListener("load",F));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,x(r)||(a=!0),l&&(t=a?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,X=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(X,U)}function G(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(M)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;return o&&void 0===e?void 0!==(t=J.get(o,n))||void 0!==(t=ee(o,n))?t:void 0:void this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(t=a.length;t--;)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(a,[a])}var r,i=1,o=k.Deferred(),a=this,s=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=Q.get(a[s],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});function te(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i}var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],oe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&k.contains(e.ownerDocument,e)&&"none"===k.css(e,"display")};function ae(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=(k.cssNumber[t]||"px"!==l&&+u)&&re.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var se={};function ue(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&oe(r)&&(l[c]=(u=s=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=se[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),se[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return ue(this,!0)},hide:function(){return ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){oe(this)?k(this).show():k(this).hide()})}});var le=/^(?:checkbox|radio)$/i,ce=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,pe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function de(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&N(e,t)?k.merge([e],n):n}function he(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}pe.optgroup=pe.option,pe.tbody=pe.tfoot=pe.colgroup=pe.caption=pe.thead,pe.th=pe.td;var ge,ve,ye=/<|&#?\w+;/;function me(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(ye.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(ce.exec(o)||["",""])[1].toLowerCase(),u=pe[s]||pe._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=k.contains(o.ownerDocument,o),a=de(f.appendChild(o),"script"),l&&he(a),n)for(c=0;o=a[c++];)fe.test(o.type||"")&&n.push(o);return f}ge=E.createDocumentFragment().appendChild(E.createElement("div")),(ve=E.createElement("input")).setAttribute("type","radio"),ve.setAttribute("checked","checked"),ve.setAttribute("name","t"),ge.appendChild(ve),m.checkClone=ge.cloneNode(!0).cloneNode(!0).lastChild.checked,ge.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!ge.cloneNode(!0).lastChild.defaultValue;var xe=E.documentElement,be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function ke(){try{return E.activeElement}catch(e){}}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(xe,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(M)||[""]).length;l--;)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=k.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:x(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ke()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ke()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){k.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ne=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Pe(n,r,i,o){r=v.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=x(d);if(h||1<f&&"string"==typeof d&&!m.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=me(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(de(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,de(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,He),c=0;c<s;c++)u=a[c],fe.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&k._evalUrl(u.src):b(u.textContent.replace(je,""),l,u))}return n}function Me(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(de(r)),r.parentNode&&(n&&k.contains(r.ownerDocument,r)&&he(de(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(De,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=k.contains(e.ownerDocument,e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=de(c),r=0,i=(o=de(e)).length;r<i;r++)s=o[r],u=a[r],l=void 0,"input"===(l=u.nodeName.toLowerCase())&&le.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||de(e),a=a||de(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=de(c,"script")).length&&he(a,!f&&de(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=qe(this,e)).insertBefore(e,t.firstChild)})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(de(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!pe[(ce.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(de(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(de(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Re,Ie,We,$e,Be,Fe,_e,ze=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ue=new RegExp(ie.join("|"),"i");function Ve(){var e;_e&&(Fe.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",_e.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",xe.appendChild(Fe).appendChild(_e),e=C.getComputedStyle(_e),Re="1%"!==e.top,Be=12===Ge(e.marginLeft),_e.style.right="60%",$e=36===Ge(e.right),Ie=36===Ge(e.width),_e.style.position="absolute",We=36===_e.offsetWidth||"absolute",xe.removeChild(Fe),_e=null)}function Ge(e){return Math.round(parseFloat(e))}function Ye(e,t,n){var r,i,o,a,s=e.style;return(n=n||Xe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||k.contains(e.ownerDocument,e)||(a=k.style(e,t)),!m.pixelBoxStyles()&&ze.test(a)&&Ue.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Fe=E.createElement("div"),(_e=E.createElement("div")).style&&(_e.style.backgroundClip="content-box",_e.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===_e.style.backgroundClip,k.extend(m,{boxSizingReliable:function(){return Ve(),Ie},pixelBoxStyles:function(){return Ve(),$e},pixelPosition:function(){return Ve(),Re},reliableMarginLeft:function(){return Ve(),Be},scrollboxSize:function(){return Ve(),We}}));var Je=/^(none|table(?!-c[ea]).+)/,Ke=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"},tt=["Webkit","Moz","ms"],nt=E.createElement("div").style;function rt(e){return k.cssProps[e]||(k.cssProps[e]=function(e){if(e in nt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}function it(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function ot(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+ie[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+ie[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+ie[a]+"Width",!0,i))):(u+=k.css(e,"padding"+ie[a],!0,i),"padding"!==n?u+=k.css(e,"border"+ie[a]+"Width",!0,i):s+=k.css(e,"border"+ie[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function at(e,t,n){var r=Xe(e),i=Ye(e,t,r),o="border-box"===k.css(e,"boxSizing",!1,r),a=o;if(ze.test(i)){if(!n)return i;i="auto"}return a=a&&(m.boxSizingReliable()||i===e.style[t]),"auto"!==i&&(parseFloat(i)||"inline"!==k.css(e,"display",!1,r))||(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+ot(e,t,n||(o?"border":"content"),a,r,i)+"px"}function st(e,t,n,r,i){return new st.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Ke.test(t),l=e.style;if(u||(t=rt(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=ae(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Ke.test(t)||(t=rt(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,s){k.cssHooks[s]={get:function(e,t,n){if(t)return!Je.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?at(e,s,n):te(e,Ze,function(){return at(e,s,n)})},set:function(e,t,n){var r,i=Xe(e),o="border-box"===k.css(e,"boxSizing",!1,i),a=n&&ot(e,s,n,o,i);return o&&m.scrollboxSize()===i.position&&(a-=Math.ceil(e["offset"+s[0].toUpperCase()+s.slice(1)]-parseFloat(i[s])-ot(e,s,"border",!1,i)-.5)),a&&(r=re.exec(t))&&"px"!==(r[3]||"px")&&(e.style[s]=t,t=k.css(e,s)),it(0,t,a)}}}),k.cssHooks.marginLeft=Qe(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-te(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ie[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=it)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),(k.Tween=st).prototype={constructor:st,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=st.propHooks[this.prop];return e&&e.get?e.get(this):st.propHooks._default.get(this)},run:function(e){var t,n=st.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=st.prototype.init,k.fx.step={};var ut,lt,ct,ft,pt=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ht(){lt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ht):C.setTimeout(ht,k.fx.interval),k.fx.tick())}function gt(){return C.setTimeout(function(){ut=void 0}),ut=Date.now()}function vt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function yt(e,t,n){for(var r,i=(mt.tweeners[t]||[]).concat(mt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function mt(o,e,t){var n,a,r=0,i=mt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=ut||gt(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:ut||gt(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=mt.prefilters[r].call(l,o,c,l.opts))return x(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,yt,l),x(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(mt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ae(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=x(e)?(t=e,["*"]):e.match(M)).length;r<i;r++)n=e[r],mt.tweeners[n]=mt.tweeners[n]||[],mt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&oe(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],pt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(ue([e],!0),l=e.style.display||l,c=k.css(e,"display"),ue([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&ue([e],!0),p.done(function(){for(r in g||ue([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=yt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?mt.prefilters.unshift(e):mt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||x(e)&&e,duration:e,easing:n&&t||t&&!x(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){x(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(oe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){function i(){var e=mt(this,k.extend({},t),a);(o||Q.get(this,"finish"))&&e.stop(!0)}var o=k.isEmptyObject(t),a=k.speed(e,n,r);return i.finish=i,o||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(i,e,o){function a(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&dt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(vt(r,!0),e,t,n)}}),k.each({slideDown:vt("show"),slideUp:vt("hide"),slideToggle:vt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),ut=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){lt||(lt=!0,ht())},k.fx.stop=function(){lt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ct=E.createElement("input"),ft=E.createElement("select").appendChild(E.createElement("option")),ct.type="checkbox",m.checkOn=""!==ct.value,m.optSelected=ft.selected,(ct=E.createElement("input")).value="t",ct.type="radio",m.radioValue="t"===ct.value;var xt,bt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):!(i&&"get"in i&&null!==(r=i.get(e,t)))&&null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=bt[t]||k.find.attr;bt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=bt[o],bt[o]=r,r=null!=a(e,t,n)?o:null,bt[o]=i),r}});var wt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;function Ct(e){return(e.match(M)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).addClass(t.call(this,e,Et(this)))});if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).removeClass(t.call(this,e,Et(this)))});if(!arguments.length)return this.attr("class","");if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"==o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):x(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,Et(this),t),t)}):this.each(function(){var e,t,n,r;if(a)for(t=0,n=k(this),r=kt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!=o||((e=Et(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==i&&Q.get(this,"__className__")||""))})},hasClass:function(e){for(var t,n=0,r=" "+e+" ";t=this[n++];)if(1===t.nodeType&&-1<(" "+Ct(Et(t))+" ").indexOf(r))return!0;return!1}});var St=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=x(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:Ct(k.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(((n=r[u]).selected||u===i)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=k(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},m.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in C;function Dt(e){e.stopPropagation()}var Nt=/^(?:focusinfocus|focusoutblur)$/;k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f=[n||E],p=y.call(e,"type")?e.type:e,d=y.call(e,"namespace")?e.namespace.split("."):[],h=c=o=n=n||E;if(3!==n.nodeType&&8!==n.nodeType&&!Nt.test(p+k.event.triggered)&&(-1<p.indexOf(".")&&(p=(d=p.split(".")).shift(),d.sort()),s=p.indexOf(":")<0&&"on"+p,(e=e[k.expando]?e:new k.Event(p,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=d.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),l=k.event.special[p]||{},r||!l.trigger||!1!==l.trigger.apply(n,t))){if(!r&&!l.noBubble&&!g(n)){for(a=l.delegateType||p,Nt.test(a+p)||(h=h.parentNode);h;h=h.parentNode)f.push(h),o=h;o===(n.ownerDocument||E)&&f.push(o.defaultView||o.parentWindow||C)}for(i=0;(h=f[i++])&&!e.isPropagationStopped();)c=h,e.type=1<i?a:l.bindType||p,(u=(Q.get(h,"events")||{})[e.type]&&Q.get(h,"handle"))&&u.apply(h,t),(u=s&&h[s])&&u.apply&&G(h)&&(e.result=u.apply(h,t),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||l._default&&!1!==l._default.apply(f.pop(),t)||!G(n)||s&&x(n[p])&&!g(n)&&((o=n[s])&&(n[s]=null),k.event.triggered=p,e.isPropagationStopped()&&c.addEventListener(p,Dt),n[p](),e.isPropagationStopped()&&c.removeEventListener(p,Dt),k.event.triggered=void 0,o&&(n[s]=o)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),m.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){function i(e){k.event.simulate(r,e.target,k.event.fix(e))}k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var At=C.location,jt=Date.now(),qt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Lt=/\[\]$/,Ht=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;k.param=function(e,t){function n(e,t){var n=x(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)}var r,i=[];if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)!function n(r,e,i,o){var t;if(Array.isArray(e))k.each(e,function(e,t){i||Lt.test(r)?o(r,t):n(r+"["+("object"==typeof t&&null!=t?e:"")+"]",t,i,o)});else if(i||"object"!==w(e))o(r,e);else for(t in e)n(r+"["+t+"]",e[t],i,o)}(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Pt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!le.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Ht,"\r\n")}}):{name:t.name,value:n.replace(Ht,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,$t=/^(?:GET|HEAD)$/,Bt=/^\/\//,Ft={},_t={},zt="*/".concat("*"),Xt=E.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(M)||[];if(x(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r=r||{})[n]=t[n]);return r&&k.extend(!0,e,r),e}Xt.href=At.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,k.ajaxSettings),t):Gt(k.ajaxSettings,e)},ajaxPrefilter:Ut(Ft),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n)for(n={};t=Wt.exec(p);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||At.href)+"").replace(Bt,At.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(M)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),Vt(Ft,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!$t.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(qt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(qt.test(f)?"&":"?")+"_="+jt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a=a||i}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return x(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(x(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return x(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=x(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=k.ajaxSettings.xhr();m.cors=!!Qt&&"withCredentials"in Qt,m.ajax=Qt=!!Qt,k.ajaxTransport(function(i){var o,a;if(m.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=k("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||k.expando+"_"+jt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=x(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(qt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&x(i)&&i(o[0]),o=i=void 0}),"script"}),m.createHTMLDocument=((Jt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=me([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Ct(e.slice(s)),e=e.slice(0,s)),x(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,r.left):(a=parseFloat(o)||0,parseFloat(u)||0),x(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||xe})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;return g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n?r?r[i]:e[t]:void(r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n)},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=Qe(m.pixelPosition,function(e,t){if(t)return t=Ye(e,n),ze.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return g(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),x(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=N,k.isFunction=x,k.isWindow=g,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var en=C.jQuery,tn=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=tn),e&&C.jQuery===k&&(C.jQuery=en),k},e||(C.jQuery=C.$=k),k}); })(this);
+(function (window, undefined) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";function n(e,t,n){var r,i=(t=t||qt).createElement("script");if(i.text=e,n)for(r in Xt)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function r(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Rt[It.call(e)]||"object":typeof e}function i(e){var t=!!e&&"length"in e&&e.length,n=r(e);return!_t(e)&&!zt(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return _t(t)?Vt.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?Vt.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?Vt.grep(e,(function(e){return Mt.call(t,e)>-1!==n})):Vt.filter(t,e,n)}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){return e}function l(e){throw e}function c(e,t,n,r){var i;try{e&&_t(i=e.promise)?i.call(e).done(t).fail(n):e&&_t(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){qt.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),Vt.ready()}function p(e,t){return t.toUpperCase()}function d(e){return e.replace(fe,"ms-").replace(pe,p)}function h(){this.expando=Vt.expando+h.uid++}function g(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(me,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ye.test(e)?JSON.parse(e):e)}(n)}catch(e){}ge.set(e,t,n)}else n=void 0;return n}function y(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return Vt.css(e,t,"")},u=s(),l=n&&n[3]||(Vt.cssNumber[t]?"":"px"),c=(Vt.cssNumber[t]||"px"!==l&&+u)&&xe.exec(Vt.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)Vt.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,Vt.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function m(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ce[r];return i||(t=n.body.appendChild(n.createElement(r)),i=Vt.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ce[r]=i,i)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=he.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&we(r)&&(i[o]=m(r))):"none"!==n&&(i[o]="none",he.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function x(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&o(e,t)?Vt.merge([e],n):n}function b(e,t){for(var n=0,r=e.length;n<r;n++)he.set(e[n],"globalEval",!t||he.get(t[n],"globalEval"))}function w(e,t,n,i,o){for(var a,s,u,l,c,f,p=t.createDocumentFragment(),d=[],h=0,g=e.length;h<g;h++)if((a=e[h])||0===a)if("object"===r(a))Vt.merge(d,a.nodeType?[a]:a);else if(Ne.test(a)){for(s=s||p.appendChild(t.createElement("div")),u=(ke.exec(a)||["",""])[1].toLowerCase(),l=De[u]||De._default,s.innerHTML=l[1]+Vt.htmlPrefilter(a)+l[2],f=l[0];f--;)s=s.lastChild;Vt.merge(d,s.childNodes),(s=p.firstChild).textContent=""}else d.push(t.createTextNode(a));for(p.textContent="",h=0;a=d[h++];)if(i&&Vt.inArray(a,i)>-1)o&&o.push(a);else if(c=Vt.contains(a.ownerDocument,a),s=x(p.appendChild(a),"script"),c&&b(s),n)for(f=0;a=s[f++];)Se.test(a.type||"")&&n.push(a);return p}function T(){return!0}function C(){return!1}function E(){try{return qt.activeElement}catch(e){}}function k(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)k(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=C;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return Vt().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=Vt.guid++)),e.each((function(){Vt.event.add(this,t,i,r,n)}))}function S(e,t){return o(e,"table")&&o(11!==t.nodeType?t:t.firstChild,"tr")&&Vt(e).children("tbody")[0]||e}function D(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function N(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function A(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(he.hasData(e)&&(o=he.access(e),a=he.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)Vt.event.add(t,i,l[i][n]);ge.hasData(e)&&(s=ge.access(e),u=Vt.extend({},s),ge.set(t,u))}}function j(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ee.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function q(e,t,r,i){t=Ot.apply([],t);var o,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0],g=_t(h);if(g||p>1&&"string"==typeof h&&!Ft.checkClone&&Pe.test(h))return e.each((function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),q(o,t,r,i)}));if(p&&(a=(o=w(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=a),a||i)){for(u=(s=Vt.map(x(o,"script"),D)).length;f<p;f++)l=o,f!==d&&(l=Vt.clone(l,!0,!0),u&&Vt.merge(s,x(l,"script"))),r.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,Vt.map(s,N),f=0;f<u;f++)l=s[f],Se.test(l.type||"")&&!he.access(l,"globalEval")&&Vt.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?Vt._evalUrl&&Vt._evalUrl(l.src):n(l.textContent.replace(Me,""),c,l))}return e}function L(e,t,n){for(var r,i=t?Vt.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||Vt.cleanData(x(r)),r.parentNode&&(n&&Vt.contains(r.ownerDocument,r)&&b(x(r,"script")),r.parentNode.removeChild(r));return e}function H(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||Vt.contains(e.ownerDocument,e)||(a=Vt.style(e,t)),!Ft.pixelBoxStyles()&&Re.test(a)&&We.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function O(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function P(e){var t=Vt.cssProps[e];return t||(t=Vt.cssProps[e]=function(e){if(e in Xe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ze.length;n--;)if((e=ze[n]+t)in Xe)return e}(e)||e),t}function M(e,t,n){var r=xe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function R(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=Vt.css(e,n+be[a],!0,i)),r?("content"===n&&(u-=Vt.css(e,"padding"+be[a],!0,i)),"margin"!==n&&(u-=Vt.css(e,"border"+be[a]+"Width",!0,i))):(u+=Vt.css(e,"padding"+be[a],!0,i),"padding"!==n?u+=Vt.css(e,"border"+be[a]+"Width",!0,i):s+=Vt.css(e,"border"+be[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function I(e,t,n){var r=Ie(e),i=H(e,t,r),o="border-box"===Vt.css(e,"boxSizing",!1,r),a=o;if(Re.test(i)){if(!n)return i;i="auto"}return a=a&&(Ft.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===Vt.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+R(e,t,n||(o?"border":"content"),a,r,i)+"px"}function W(e,t,n,r,i){return new W.prototype.init(e,t,n,r,i)}function $(){Ve&&(!1===qt.hidden&&e.requestAnimationFrame?e.requestAnimationFrame($):e.setTimeout($,Vt.fx.interval),Vt.fx.tick())}function B(){return e.setTimeout((function(){Ue=void 0})),Ue=Date.now()}function F(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=be[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function _(e,t,n){for(var r,i=(z.tweeners[t]||[]).concat(z.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function z(e,t,n){var r,i,o=0,a=z.prefilters.length,s=Vt.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=Ue||B(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:Vt.extend({},t),opts:Vt.extend(!0,{specialEasing:{},easing:Vt.easing._default},n),originalProperties:t,originalOptions:n,startTime:Ue||B(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Vt.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=d(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=Vt.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=z.prefilters[o].call(l,e,c,l.opts))return _t(r.stop)&&(Vt._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return Vt.map(c,_,l),_t(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),Vt.fx.timer(Vt.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function X(e){return(e.match(se)||[]).join(" ")}function U(e){return e.getAttribute&&e.getAttribute("class")||""}function V(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(se)||[]}function G(e,t,n,i){var o;if(Array.isArray(t))Vt.each(t,(function(t,r){n||at.test(e)?i(e,r):G(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==r(t))i(e,t);else for(o in t)G(e+"["+o+"]",t[o],n,i)}function Y(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(se)||[];if(_t(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Q(e,t,n,r){function i(s){var u;return o[s]=!0,Vt.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)})),u}var o={},a=e===vt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function J(e,t){var n,r,i=Vt.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Vt.extend(!0,e,r),e}var K,Z,ee,te,ne,re,ie,oe,ae,se,ue,le,ce,fe,pe,de,he,ge,ye,me,ve,xe,be,we,Te,Ce,Ee,ke,Se,De,Ne,Ae,je,qe,Le,He,Oe,Pe,Me,Re,Ie,We,$e,Be,Fe,_e,ze,Xe,Ue,Ve,Ge,Ye,Qe,Je,Ke,Ze,et,tt,nt,rt,it,ot,at,st,ut,lt,ct,ft,pt,dt,ht,gt,yt,mt,vt,xt,bt,wt,Tt,Ct,Et,kt,St,Dt,Nt,At,jt=[],qt=e.document,Lt=Object.getPrototypeOf,Ht=jt.slice,Ot=jt.concat,Pt=jt.push,Mt=jt.indexOf,Rt={},It=Rt.toString,Wt=Rt.hasOwnProperty,$t=Wt.toString,Bt=$t.call(Object),Ft={},_t=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},zt=function(e){return null!=e&&e===e.window},Xt={type:!0,src:!0,noModule:!0},Ut="3.3.1",Vt=function(e,t){return new Vt.fn.init(e,t)},Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;return Vt.fn=Vt.prototype={jquery:Ut,constructor:Vt,length:0,toArray:function(){return Ht.call(this)},get:function(e){return null==e?Ht.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=Vt.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Vt.each(this,e)},map:function(e){return this.pushStack(Vt.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(Ht.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Pt,sort:jt.sort,splice:jt.splice},Vt.extend=Vt.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||_t(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(Vt.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&Vt.isPlainObject(n)?n:{},a[t]=Vt.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},Vt.extend({expando:"jQuery"+(Ut+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==It.call(e))&&(!(t=Lt(e))||"function"==typeof(n=Wt.call(t,"constructor")&&t.constructor)&&$t.call(n)===Bt)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){n(e)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Gt,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?Vt.merge(n,"string"==typeof e?[e]:e):Pt.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:Mt.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;a<r;a++)null!=(o=t(e[a],a,n))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,n))&&s.push(o);return Ot.apply([],s)},guid:1,support:Ft}),"function"==typeof Symbol&&(Vt.fn[Symbol.iterator]=jt[Symbol.iterator]),Vt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){Rt["[object "+t+"]"]=t.toLowerCase()})),K=function(e){function t(e,t,n,r){var i,o,a,s,u,l,c,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:W)!==q&&j(t),t=t||q,H)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&R(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!O||!O.test(e))){if(1!==h)p=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=I),o=(l=E(e)).length;o--;)l[o]="#"+s+" "+d(l[o]);c=l.join(","),p=ye.test(e)&&f(t.parentNode)||t}if(c)try{return Q.apply(n,p.querySelectorAll(c)),n}catch(e){}finally{s===I&&t.removeAttribute("id")}}}return S(e.replace(oe,"$1"),t,n,r)}function n(){var e=[];return function t(n,r){return e.push(n+" ")>w.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function r(e){return e[I]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r((function(t){return t=+t,r((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function f(e){return e&&void 0!==e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=B++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[$,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[I]||(t[I]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===$&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function g(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function y(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function m(e,n,i,o,a,s){return o&&!o[I]&&(o=m(o)),a&&!a[I]&&(a=m(a,s)),r((function(r,s,u,l){var c,f,p,d=[],h=[],g=s.length,m=r||function(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}(n||"*",u.nodeType?[u]:u,[]),v=!e||!r&&n?m:y(m,d,e,u,l),x=i?a||(r?e:g||o)?[]:s:v;if(i&&i(v,x,u,l),o)for(c=y(x,h),o(c,[],u,l),f=c.length;f--;)(p=c[f])&&(x[h[f]]=!(v[h[f]]=p));if(r){if(a||e){if(a){for(c=[],f=x.length;f--;)(p=x[f])&&c.push(v[f]=p);a(null,x=[],c,l)}for(f=x.length;f--;)(p=x[f])&&(c=a?K(r,p):d[f])>-1&&(r[c]=!(s[c]=p))}}else x=y(x===s?x.splice(g,x.length):x),a?a(null,s,x,l):Q.apply(s,x)}))}function v(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=h((function(e){return e===t}),a,!0),l=h((function(e){return K(t,e)>-1}),a,!0),c=[function(e,n,r){var i=!o&&(r||n!==D)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[h(g(c),n)];else{if((n=w.filter[e[s].type].apply(null,e[s].matches))[I]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return m(s>1&&g(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&d(e))}c.push(n)}return g(c)}var x,b,w,T,C,E,k,S,D,N,A,j,q,L,H,O,P,M,R,I="sizzle"+1*new Date,W=e.document,$=0,B=0,F=n(),_=n(),z=n(),X=function(e,t){return e===t&&(A=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\[[\\x20\\t\\r\\n\\f]*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),ae=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),se=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),ue=new RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,de=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),ve=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){j()},Te=h((function(e){return!0===e.disabled&&("form"in e||"label"in e)}),{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(W.childNodes),W.childNodes),V[W.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(x in b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==q&&9===r.nodeType&&r.documentElement?(L=(q=r).documentElement,H=!C(q),W!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i((function(e){return e.className="i",!e.getAttribute("className")})),b.getElementsByTagName=i((function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length})),b.getElementsByClassName=he.test(q.getElementsByClassName),b.getById=i((function(e){return L.appendChild(e).id=I,!q.getElementsByName||!q.getElementsByName(I).length})),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ve);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ve);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},P=[],O=[],(b.qsa=he.test(q.querySelectorAll))&&(i((function(e){L.appendChild(e).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+Z+")"),e.querySelectorAll("[id~="+I+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||O.push(".#.+[+~]")})),i((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")}))),(b.matchesSelector=he.test(M=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i((function(e){b.disconnectedMatch=M.call(e,"*"),M.call(e,"[s!='']:x"),P.push("!=",re)})),O=O.length&&new RegExp(O.join("|")),P=P.length&&new RegExp(P.join("|")),t=he.test(L.compareDocumentPosition),R=t||he.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===W&&R(W,e)?-1:t===q||t.ownerDocument===W&&R(W,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===W?-1:u[r]===W?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&j(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&H&&!z[n+" "]&&(!P||!P.test(n))&&(!O||!O.test(n)))try{var r=M.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&j(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&j(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:b.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},(w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=F[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+ee+"|$)"))&&F(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(y){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&v){for(x=(d=(l=(c=(f=(p=y)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1])&&l[2],p=d&&y.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[$,d,x];break}}else if(v&&(x=d=(l=(c=(f=(p=t)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++x||(v&&((c=(f=p[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[$,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[I]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r((function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=K(e,i[a])]=!(t[r]=i[a])})):function(e){return o(e,0,i)}):o}},pseudos:{not:r((function(e){var t=[],n=[],i=k(e.replace(oe,"$1"));return i[I]?r((function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}})),has:r((function(e){return function(n){return t(e,n).length>0}})),contains:r((function(e){return e=e.replace(me,ve),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}})),lang:r((function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ve).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return de.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c((function(){return[0]})),last:c((function(e,t){return[t-1]})),eq:c((function(e,t,n){return[n<0?n+t:n]})),even:c((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:c((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:c((function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e})),gt:c((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=u(x);return p.prototype=w.filters=w.pseudos,w.setFilters=new p,E=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=_[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){for(a in r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length)),w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):_(e,u).slice(0)},k=t.compile=function(e,n){var i,o=[],a=[],s=z[e+" "];if(!s){for(n||(n=E(e)),i=n.length;i--;)(s=v(n[i]))[I]?o.push(s):a.push(s);(s=z(e,function(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,p,d=0,h="0",g=r&&[],m=[],v=D,x=r||o&&w.find.TAG("*",l),b=$+=null==v?1:Math.random()||.1,T=x.length;for(l&&(D=a===q||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===q||(j(c),s=!H);p=e[f++];)if(p(c,a||q,s)){u.push(c);break}l&&($=b)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,m,a,s);if(r){if(d>0)for(;h--;)g[h]||m[h]||(m[h]=G.call(u));m=y(m)}Q.apply(u,m),l&&!r&&m.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&($=b,D=v),g};return i?r(a):a}(a,o))).selector=e}return s},S=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&E(e=l.selector||e);if(n=n||[],1===c.length){if((o=c[0]=c[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&H&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ve),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ve),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&d(o)))return Q.apply(n,r),n;break}}return(l||k(e,c))(r,t,!H,n,!t||ye.test(e)&&f(t.parentNode)||t),n},b.sortStable=I.split("").sort(X).join("")===I,b.detectDuplicates=!!A,j(),b.sortDetached=i((function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))})),i((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||o("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),b.attributes&&i((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||o("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),i((function(e){return null==e.getAttribute("disabled")}))||o(Z,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),t}(e),Vt.find=K,Vt.expr=K.selectors,Vt.expr[":"]=Vt.expr.pseudos,Vt.uniqueSort=Vt.unique=K.uniqueSort,Vt.text=K.getText,Vt.isXMLDoc=K.isXML,Vt.contains=K.contains,Vt.escapeSelector=K.escape,Z=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Vt(e).is(n))break;r.push(e)}return r},ee=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},te=Vt.expr.match.needsContext,ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Vt.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Vt.find.matchesSelector(r,e)?[r]:[]:Vt.find.matches(e,Vt.grep(t,(function(e){return 1===e.nodeType})))},Vt.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Vt(e).filter((function(){for(t=0;t<r;t++)if(Vt.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)Vt.find(e,i[t],n);return r>1?Vt.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&te.test(e)?Vt(e):e||[],!1).length}}),ie=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,(Vt.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||re,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ie.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Vt?t[0]:t,Vt.merge(this,Vt.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:qt,!0)),ne.test(r[1])&&Vt.isPlainObject(t))for(r in t)_t(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=qt.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):_t(e)?void 0!==n.ready?n.ready(e):e(Vt):Vt.makeArray(e,this)}).prototype=Vt.fn,re=Vt(qt),oe=/^(?:parents|prev(?:Until|All))/,ae={children:!0,contents:!0,next:!0,prev:!0},Vt.fn.extend({has:function(e){var t=Vt(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(Vt.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&Vt(e);if(!te.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Vt.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Vt.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?Mt.call(Vt(e),this[0]):Mt.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Vt.uniqueSort(Vt.merge(this.get(),Vt(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Vt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z(e,"parentNode")},parentsUntil:function(e,t,n){return Z(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return Z(e,"nextSibling")},prevAll:function(e){return Z(e,"previousSibling")},nextUntil:function(e,t,n){return Z(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z(e,"previousSibling",n)},siblings:function(e){return ee((e.parentNode||{}).firstChild,e)},children:function(e){return ee(e.firstChild)},contents:function(e){return o(e,"iframe")?e.contentDocument:(o(e,"template")&&(e=e.content||e),Vt.merge([],e.childNodes))}},(function(e,t){Vt.fn[e]=function(n,r){var i=Vt.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Vt.filter(r,i)),this.length>1&&(ae[e]||Vt.uniqueSort(i),oe.test(e)&&i.reverse()),this.pushStack(i)}})),se=/[^\x20\t\r\n\f]+/g,Vt.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return Vt.each(e.match(se)||[],(function(e,n){t[n]=!0})),t}(e):Vt.extend({},e);var t,n,i,o,a=[],s=[],u=-1,l=function(){for(o=o||e.once,i=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)!1===a[u].apply(n[0],n[1])&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,o&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function t(n){Vt.each(n,(function(n,i){_t(i)?e.unique&&c.has(i)||a.push(i):i&&i.length&&"string"!==r(i)&&t(i)}))}(arguments),n&&!t&&l()),this},remove:function(){return Vt.each(arguments,(function(e,t){for(var n;(n=Vt.inArray(t,a,n))>-1;)a.splice(n,1),n<=u&&u--})),this},has:function(e){return e?Vt.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return o=s=[],n||t||(a=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},Vt.extend({Deferred:function(t){var n=[["notify","progress",Vt.Callbacks("memory"),Vt.Callbacks("memory"),2],["resolve","done",Vt.Callbacks("once memory"),Vt.Callbacks("once memory"),0,"resolved"],["reject","fail",Vt.Callbacks("once memory"),Vt.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return Vt.Deferred((function(t){Vt.each(n,(function(n,r){var i=_t(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&_t(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,c=arguments,f=function(){var e,f;if(!(t<a)){if((e=r.apply(s,c))===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,_t(f)?i?f.call(e,o(a,n,u,i),o(a,n,l,i)):(a++,f.call(e,o(a,n,u,i),o(a,n,l,i),o(a,n,u,n.notifyWith))):(r!==u&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},p=i?f:function(){try{f()}catch(e){Vt.Deferred.exceptionHook&&Vt.Deferred.exceptionHook(e,p.stackTrace),t+1>=a&&(r!==l&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?p():(Vt.Deferred.getStackHook&&(p.stackTrace=Vt.Deferred.getStackHook()),e.setTimeout(p))}}var a=0;return Vt.Deferred((function(e){n[0][3].add(o(0,e,_t(i)?i:u,e.notifyWith)),n[1][3].add(o(0,e,_t(t)?t:u)),n[2][3].add(o(0,e,_t(r)?r:l))})).promise()},promise:function(e){return null!=e?Vt.extend(e,i):i}},o={};return Vt.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=Ht.call(arguments),o=Vt.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?Ht.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(c(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||_t(i[n]&&i[n].then)))return o.then();for(;n--;)c(i[n],a(n),o.reject);return o.promise()}}),ue=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,Vt.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&ue.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},Vt.readyException=function(t){e.setTimeout((function(){throw t}))},le=Vt.Deferred(),Vt.fn.ready=function(e){return le.then(e).catch((function(e){Vt.readyException(e)})),this},Vt.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Vt.readyWait:Vt.isReady)||(Vt.isReady=!0,!0!==e&&--Vt.readyWait>0||le.resolveWith(qt,[Vt]))}}),Vt.ready.then=le.then,"complete"===qt.readyState||"loading"!==qt.readyState&&!qt.documentElement.doScroll?e.setTimeout(Vt.ready):(qt.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f)),ce=function(e,t,n,i,o,a,s){var u=0,l=e.length,c=null==n;if("object"===r(n))for(u in o=!0,n)ce(e,t,u,n[u],!0,a,s);else if(void 0!==i&&(o=!0,_t(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(Vt(e),n)})),t))for(;u<l;u++)t(e[u],n,s?i:i.call(e[u],u,t(e[u],n)));return o?e:c?t.call(e):l?t(e[0],n):a},fe=/^-ms-/,pe=/-([a-z])/g,de=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},h.uid=1,h.prototype={cache:function(e){var t=e[this.expando];return t||(t={},de(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[d(t)]=n;else for(r in t)i[d(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][d(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(d):(t=d(t))in r?[t]:t.match(se)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||Vt.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Vt.isEmptyObject(t)}},he=new h,ge=new h,ye=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,me=/[A-Z]/g,Vt.extend({hasData:function(e){return ge.hasData(e)||he.hasData(e)},data:function(e,t,n){return ge.access(e,t,n)},removeData:function(e,t){ge.remove(e,t)},_data:function(e,t,n){return he.access(e,t,n)},_removeData:function(e,t){he.remove(e,t)}}),Vt.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=ge.get(o),1===o.nodeType&&!he.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=d(r.slice(5)),g(o,r,i[r]));he.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){ge.set(this,e)})):ce(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=ge.get(o,e))||void 0!==(n=g(o,e))?n:void 0;this.each((function(){ge.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){ge.remove(this,e)}))}}),Vt.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=he.get(e,t),n&&(!r||Array.isArray(n)?r=he.access(e,t,Vt.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Vt.queue(e,t),r=n.length,i=n.shift(),o=Vt._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){Vt.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return he.get(e,n)||he.access(e,n,{empty:Vt.Callbacks("once memory").add((function(){he.remove(e,[t+"queue",n])}))})}}),Vt.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Vt.queue(this[0],e):void 0===t?this:this.each((function(){var n=Vt.queue(this,e,t);Vt._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Vt.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){Vt.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=Vt.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=he.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),ve=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,xe=new RegExp("^(?:([+-])=|)("+ve+")([a-z%]*)$","i"),be=["Top","Right","Bottom","Left"],we=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&Vt.contains(e.ownerDocument,e)&&"none"===Vt.css(e,"display")},Te=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i},Ce={},Vt.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){we(this)?Vt(this).show():Vt(this).hide()}))}}),Ee=/^(?:checkbox|radio)$/i,ke=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Se=/^$|^module$|\/(?:java|ecma)script/i,(De={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]}).optgroup=De.option,De.tbody=De.tfoot=De.colgroup=De.caption=De.thead,De.th=De.td,Ne=/<|&#?\w+;/,Dt=qt.createDocumentFragment().appendChild(qt.createElement("div")),(Nt=qt.createElement("input")).setAttribute("type","radio"),Nt.setAttribute("checked","checked"),Nt.setAttribute("name","t"),Dt.appendChild(Nt),Ft.checkClone=Dt.cloneNode(!0).cloneNode(!0).lastChild.checked,Dt.innerHTML="<textarea>x</textarea>",Ft.noCloneChecked=!!Dt.cloneNode(!0).lastChild.defaultValue,Ae=qt.documentElement,je=/^key/,qe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Le=/^([^.]*)(?:\.(.+)|)/,Vt.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=he.get(e);if(y)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&Vt.find.matchesSelector(Ae,i),n.guid||(n.guid=Vt.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return void 0!==Vt&&Vt.event.triggered!==t.type?Vt.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(se)||[""]).length;l--;)d=g=(s=Le.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=Vt.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=Vt.event.special[d]||{},c=Vt.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Vt.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),Vt.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=he.hasData(e)&&he.get(e);if(y&&(u=y.events)){for(l=(t=(t||"").match(se)||[""]).length;l--;)if(d=g=(s=Le.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=Vt.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||Vt.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)Vt.event.remove(e,d+t[l],n,r,!0);Vt.isEmptyObject(u)&&he.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Vt.event.fix(e),u=new Array(arguments.length),l=(he.get(this,"events")||{})[s.type]||[],c=Vt.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=Vt.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((Vt.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?Vt(i,this).index(l)>-1:Vt.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(Vt.Event.prototype,e,{enumerable:!0,configurable:!0,get:_t(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[Vt.expando]?e:new Vt.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==E()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===E()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&o(this,"input"))return this.click(),!1},_default:function(e){return o(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},Vt.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},Vt.Event=function(e,t){if(!(this instanceof Vt.Event))return new Vt.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?T:C,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&Vt.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[Vt.expando]=!0},Vt.Event.prototype={constructor:Vt.Event,isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=T,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=T,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=T,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},Vt.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&qe.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},Vt.event.addProp),Vt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){Vt.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||Vt.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),Vt.fn.extend({on:function(e,t,n,r){return k(this,e,t,n,r)},one:function(e,t,n,r){return k(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Vt(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=C),this.each((function(){Vt.event.remove(this,e,n,t)}))}}),He=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Vt.extend({htmlPrefilter:function(e){return e.replace(He,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=Vt.contains(e.ownerDocument,e);if(!(Ft.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Vt.isXMLDoc(e)))for(a=x(s),r=0,i=(o=x(e)).length;r<i;r++)j(o[r],a[r]);if(t)if(n)for(o=o||x(e),a=a||x(s),r=0,i=o.length;r<i;r++)A(o[r],a[r]);else A(e,s);return(a=x(s,"script")).length>0&&b(a,!u&&x(e,"script")),s},cleanData:function(e){for(var t,n,r,i=Vt.event.special,o=0;void 0!==(n=e[o]);o++)if(de(n)){if(t=n[he.expando]){if(t.events)for(r in t.events)i[r]?Vt.event.remove(n,r):Vt.removeEvent(n,r,t.handle);n[he.expando]=void 0}n[ge.expando]&&(n[ge.expando]=void 0)}}}),Vt.fn.extend({detach:function(e){return L(this,e,!0)},remove:function(e){return L(this,e)},text:function(e){return ce(this,(function(e){return void 0===e?Vt.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return q(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||S(this,e).appendChild(e)}))},prepend:function(){return q(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return q(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return q(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Vt.cleanData(x(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return Vt.clone(this,e,t)}))},html:function(e){return ce(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!De[(ke.exec(e)||["",""])[1].toLowerCase()]){e=Vt.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(Vt.cleanData(x(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return q(this,arguments,(function(t){var n=this.parentNode;Vt.inArray(this,e)<0&&(Vt.cleanData(x(this)),n&&n.replaceChild(t,this))}),e)}}),Vt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){Vt.fn[e]=function(e){for(var n,r=[],i=Vt(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),Vt(i[a])[t](n),Pt.apply(r,n.get());return this.pushStack(r)}})),Re=new RegExp("^("+ve+")(?!px)[a-z%]+$","i"),Ie=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},We=new RegExp(be.join("|"),"i"),function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ae.appendChild(u).appendChild(l);var t=e.getComputedStyle(l);r="1%"!==t.top,s=12===n(t.marginLeft),l.style.right="60%",a=36===n(t.right),i=36===n(t.width),l.style.position="absolute",o=36===l.offsetWidth||"absolute",Ae.removeChild(u),l=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u=qt.createElement("div"),l=qt.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",Ft.clearCloneStyle="content-box"===l.style.backgroundClip,Vt.extend(Ft,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),s},scrollboxSize:function(){return t(),o}}))}(),$e=/^(none|table(?!-c[ea]).+)/,Be=/^--/,Fe={position:"absolute",visibility:"hidden",display:"block"},_e={letterSpacing:"0",fontWeight:"400"},ze=["Webkit","Moz","ms"],Xe=qt.createElement("div").style,Vt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=H(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=d(t),u=Be.test(t),l=e.style;if(u||(t=P(s)),a=Vt.cssHooks[t]||Vt.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=xe.exec(n))&&i[1]&&(n=y(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(Vt.cssNumber[s]?"":"px")),Ft.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=d(t);return Be.test(t)||(t=P(s)),(a=Vt.cssHooks[t]||Vt.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=H(e,t,r)),"normal"===i&&t in _e&&(i=_e[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),Vt.each(["height","width"],(function(e,t){Vt.cssHooks[t]={get:function(e,n,r){if(n)return!$e.test(Vt.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?I(e,t,r):Te(e,Fe,(function(){return I(e,t,r)}))},set:function(e,n,r){var i,o=Ie(e),a="border-box"===Vt.css(e,"boxSizing",!1,o),s=r&&R(e,t,r,a,o);return a&&Ft.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-R(e,t,"border",!1,o)-.5)),s&&(i=xe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=Vt.css(e,t)),M(0,n,s)}}})),Vt.cssHooks.marginLeft=O(Ft.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(H(e,"marginLeft"))||e.getBoundingClientRect().left-Te(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),Vt.each({margin:"",padding:"",border:"Width"},(function(e,t){Vt.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+be[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(Vt.cssHooks[e+t].set=M)})),Vt.fn.extend({css:function(e,t){return ce(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=Vt.css(e,t[a],!1,r);return o}return void 0!==n?Vt.style(e,t,n):Vt.css(e,t)}),e,t,arguments.length>1)}}),Vt.Tween=W,W.prototype={constructor:W,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||Vt.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Vt.cssNumber[n]?"":"px")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,n=W.propHooks[this.prop];return this.options.duration?this.pos=t=Vt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Vt.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){Vt.fx.step[e.prop]?Vt.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Vt.cssProps[e.prop]]&&!Vt.cssHooks[e.prop]?e.elem[e.prop]=e.now:Vt.style(e.elem,e.prop,e.now+e.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Vt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Vt.fx=W.prototype.init,Vt.fx.step={},Ge=/^(?:toggle|show|hide)$/,Ye=/queueHooks$/,Vt.Animation=Vt.extend(z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return y(n.elem,e,xe.exec(t),n),n}]},tweener:function(e,t){_t(e)?(t=e,e=["*"]):e=e.match(se);for(var n,r=0,i=e.length;r<i;r++)n=e[r],z.tweeners[n]=z.tweeners[n]||[],z.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&we(e),y=he.get(e,"fxshow");for(r in n.queue||(null==(a=Vt._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always((function(){p.always((function(){a.unqueued--,Vt.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],Ge.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||Vt.style(e,r)}if((u=!Vt.isEmptyObject(t))||!Vt.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=he.get(e,"display")),"none"===(c=Vt.css(e,"display"))&&(l?c=l:(v([e],!0),l=e.style.display||l,c=Vt.css(e,"display"),v([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===Vt.css(e,"float")&&(u||(p.done((function(){h.display=l})),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=he.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&v([e],!0),p.done((function(){for(r in g||v([e]),he.remove(e,"fxshow"),d)Vt.style(e,r,d[r])}))),u=_(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?z.prefilters.unshift(e):z.prefilters.push(e)}}),Vt.speed=function(e,t,n){var r=e&&"object"==typeof e?Vt.extend({},e):{complete:n||!n&&t||_t(e)&&e,duration:e,easing:n&&t||t&&!_t(t)&&t};return Vt.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in Vt.fx.speeds?r.duration=Vt.fx.speeds[r.duration]:r.duration=Vt.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){_t(r.old)&&r.old.call(this),r.queue&&Vt.dequeue(this,r.queue)},r},Vt.fn.extend({fadeTo:function(e,t,n,r){return this.filter(we).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Vt.isEmptyObject(e),o=Vt.speed(t,n,r),a=function(){var t=z(this,Vt.extend({},e),o);(i||he.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=Vt.timers,a=he.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&Ye.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||Vt.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=he.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Vt.timers,a=r?r.length:0;for(n.finish=!0,Vt.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),Vt.each(["toggle","show","hide"],(function(e,t){var n=Vt.fn[t];Vt.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(F(t,!0),e,r,i)}})),Vt.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){Vt.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),Vt.timers=[],Vt.fx.tick=function(){var e,t=0,n=Vt.timers;for(Ue=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||Vt.fx.stop(),Ue=void 0},Vt.fx.timer=function(e){Vt.timers.push(e),Vt.fx.start()},Vt.fx.interval=13,Vt.fx.start=function(){Ve||(Ve=!0,$())},Vt.fx.stop=function(){Ve=null},Vt.fx.speeds={slow:600,fast:200,_default:400},Vt.fn.delay=function(t,n){return t=Vt.fx&&Vt.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},function(){var e=qt.createElement("input"),t=qt.createElement("select").appendChild(qt.createElement("option"));e.type="checkbox",Ft.checkOn=""!==e.value,Ft.optSelected=t.selected,(e=qt.createElement("input")).value="t",e.type="radio",Ft.radioValue="t"===e.value}(),Je=Vt.expr.attrHandle,Vt.fn.extend({attr:function(e,t){return ce(this,Vt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){Vt.removeAttr(this,e)}))}}),Vt.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?Vt.prop(e,t,n):(1===o&&Vt.isXMLDoc(e)||(i=Vt.attrHooks[t.toLowerCase()]||(Vt.expr.match.bool.test(t)?Qe:void 0)),void 0!==n?null===n?void Vt.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=Vt.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!Ft.radioValue&&"radio"===t&&o(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(se);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Qe={set:function(e,t,n){return!1===t?Vt.removeAttr(e,n):e.setAttribute(n,n),n}},Vt.each(Vt.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Je[t]||Vt.find.attr;Je[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Je[a],Je[a]=i,i=null!=n(e,t,r)?a:null,Je[a]=o),i}})),Ke=/^(?:input|select|textarea|button)$/i,Ze=/^(?:a|area)$/i,Vt.fn.extend({prop:function(e,t){return ce(this,Vt.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[Vt.propFix[e]||e]}))}}),Vt.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Vt.isXMLDoc(e)||(t=Vt.propFix[t]||t,i=Vt.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Vt.find.attr(e,"tabindex");return t?parseInt(t,10):Ke.test(e.nodeName)||Ze.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),Ft.optSelected||(Vt.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Vt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){Vt.propFix[this.toLowerCase()]=this})),Vt.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(_t(e))return this.each((function(t){Vt(this).addClass(e.call(this,t,U(this)))}));if((t=V(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=X(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(_t(e))return this.each((function(t){Vt(this).removeClass(e.call(this,t,U(this)))}));if(!arguments.length)return this.attr("class","");if((t=V(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=X(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):_t(e)?this.each((function(n){Vt(this).toggleClass(e.call(this,n,U(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=Vt(this),a=V(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=U(this))&&he.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":he.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+X(U(n))+" ").indexOf(t)>-1)return!0;return!1}}),et=/\r/g,Vt.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=_t(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,Vt(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=Vt.map(i,(function(e){return null==e?"":e+""}))),(t=Vt.valHooks[this.type]||Vt.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=Vt.valHooks[i.type]||Vt.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(et,""):null==n?"":n:void 0}}),Vt.extend({valHooks:{option:{get:function(e){var t=Vt.find.attr(e,"value");return null!=t?t:X(Vt.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,u=s?null:[],l=s?a+1:i.length;for(r=a<0?l:s?a:0;r<l;r++)if(((n=i[r]).selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!o(n.parentNode,"optgroup"))){if(t=Vt(n).val(),s)return t;u.push(t)}return u},set:function(e,t){for(var n,r,i=e.options,o=Vt.makeArray(t),a=i.length;a--;)((r=i[a]).selected=Vt.inArray(Vt.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Vt.each(["radio","checkbox"],(function(){Vt.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=Vt.inArray(Vt(e).val(),t)>-1}},Ft.checkOn||(Vt.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),Ft.focusin="onfocusin"in e,tt=/^(?:focusinfocus|focusoutblur)$/,nt=function(e){e.stopPropagation()},Vt.extend(Vt.event,{trigger:function(t,n,r,i){var o,a,s,u,l,c,f,p,d=[r||qt],h=Wt.call(t,"type")?t.type:t,g=Wt.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=r=r||qt,3!==r.nodeType&&8!==r.nodeType&&!tt.test(h+Vt.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),l=h.indexOf(":")<0&&"on"+h,(t=t[Vt.expando]?t:new Vt.Event(h,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Vt.makeArray(n,[t]),f=Vt.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!zt(r)){for(u=f.delegateType||h,tt.test(u+h)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||qt)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?u:f.bindType||h,(c=(he.get(a,"events")||{})[t.type]&&he.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&de(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),n)||!de(r)||l&&_t(r[h])&&!zt(r)&&((s=r[l])&&(r[l]=null),Vt.event.triggered=h,t.isPropagationStopped()&&p.addEventListener(h,nt),r[h](),t.isPropagationStopped()&&p.removeEventListener(h,nt),Vt.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=Vt.extend(new Vt.Event,n,{type:e,isSimulated:!0});Vt.event.trigger(r,null,t)}}),Vt.fn.extend({trigger:function(e,t){return this.each((function(){Vt.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return Vt.event.trigger(e,t,n,!0)}}),Ft.focusin||Vt.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){Vt.event.simulate(t,e.target,Vt.event.fix(e))};Vt.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=he.access(r,t);i||r.addEventListener(e,n,!0),he.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=he.access(r,t)-1;i?he.access(r,t,i):(r.removeEventListener(e,n,!0),he.remove(r,t))}}})),rt=e.location,it=Date.now(),ot=/\?/,Vt.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||Vt.error("Invalid XML: "+t),n},at=/\[\]$/,st=/\r?\n/g,ut=/^(?:submit|button|image|reset|file)$/i,lt=/^(?:input|select|textarea|keygen)/i,Vt.param=function(e,t){var n,r=[],i=function(e,t){var n=_t(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!Vt.isPlainObject(e))Vt.each(e,(function(){i(this.name,this.value)}));else for(n in e)G(n,e[n],t,i);return r.join("&")},Vt.fn.extend({serialize:function(){return Vt.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=Vt.prop(this,"elements");return e?Vt.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!Vt(this).is(":disabled")&<.test(this.nodeName)&&!ut.test(e)&&(this.checked||!Ee.test(e))})).map((function(e,t){var n=Vt(this).val();return null==n?null:Array.isArray(n)?Vt.map(n,(function(e){return{name:t.name,value:e.replace(st,"\r\n")}})):{name:t.name,value:n.replace(st,"\r\n")}})).get()}}),ct=/%20/g,ft=/#.*$/,pt=/([?&])_=[^&]*/,dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gt=/^(?:GET|HEAD)$/,yt=/^\/\//,mt={},vt={},xt="*/".concat("*"),(bt=qt.createElement("a")).href=rt.href,Vt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:rt.href,type:"GET",isLocal:ht.test(rt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Vt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,Vt.ajaxSettings),t):J(Vt.ajaxSettings,e)},ajaxPrefilter:Y(mt),ajaxTransport:Y(vt),ajax:function(t,n){function r(t,n,r,s){var l,p,d,b,w,T=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",C.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,C,r)),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,b,C,l),l?(h.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(Vt.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(Vt.etag[o]=w)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,l=!(d=b.error))):(d=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(n||T)+"",l?m.resolveWith(g,[p,T,C]):m.rejectWith(g,[C,T,d]),C.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[C,h,l?p:d]),v.fireWith(g,[C,T]),f&&(y.trigger("ajaxComplete",[C,h]),--Vt.active||Vt.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=Vt.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?Vt(g):Vt.event,m=Vt.Deferred(),v=Vt.Callbacks("once memory"),x=h.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=dt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(m.promise(C),h.url=((t||h.url||rt.href)+"").replace(yt,rt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(se)||[""],null==h.crossDomain){l=qt.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=bt.protocol+"//"+bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Vt.param(h.data,h.traditional)),Q(mt,h,n,C),c)return C;for(p in(f=Vt.event&&h.global)&&0==Vt.active++&&Vt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!gt.test(h.type),o=h.url.replace(ft,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(ct,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(ot.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(pt,"$1"),d=(ot.test(o)?"&":"?")+"_="+it+++d),h.url=o+d),h.ifModified&&(Vt.lastModified[o]&&C.setRequestHeader("If-Modified-Since",Vt.lastModified[o]),Vt.etag[o]&&C.setRequestHeader("If-None-Match",Vt.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+xt+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,C,h)||c))return C.abort();if(T="abort",v.add(h.complete),C.done(h.success),C.fail(h.error),i=Q(vt,h,n,C)){if(C.readyState=1,f&&y.trigger("ajaxSend",[C,h]),c)return C;h.async&&h.timeout>0&&(u=e.setTimeout((function(){C.abort("timeout")}),h.timeout));try{c=!1,i.send(b,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return Vt.get(e,t,n,"json")},getScript:function(e,t){return Vt.get(e,void 0,t,"script")}}),Vt.each(["get","post"],(function(e,t){Vt[t]=function(e,n,r,i){return _t(n)&&(i=i||r,r=n,n=void 0),Vt.ajax(Vt.extend({url:e,type:t,dataType:i,data:n,success:r},Vt.isPlainObject(e)&&e))}})),Vt._evalUrl=function(e){return Vt.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},Vt.fn.extend({wrapAll:function(e){var t;return this[0]&&(_t(e)&&(e=e.call(this[0])),t=Vt(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return _t(e)?this.each((function(t){Vt(this).wrapInner(e.call(this,t))})):this.each((function(){var t=Vt(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=_t(e);return this.each((function(n){Vt(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){Vt(this).replaceWith(this.childNodes)})),this}}),Vt.expr.pseudos.hidden=function(e){return!Vt.expr.pseudos.visible(e)},Vt.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Vt.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}},wt={0:200,1223:204},Tt=Vt.ajaxSettings.xhr(),Ft.cors=!!Tt&&"withCredentials"in Tt,Ft.ajax=Tt=!!Tt,Vt.ajaxTransport((function(t){var n,r;if(Ft.cors||Tt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),Vt.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),Vt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Vt.globalEval(e),e}}}),Vt.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),Vt.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=Vt("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),qt.head.appendChild(t[0])},abort:function(){n&&n()}}})),Ct=[],Et=/(=)\?(?=&|$)|\?\?/,Vt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ct.pop()||Vt.expando+"_"+it++;return this[e]=!0,e}}),Vt.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Et.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Et.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=_t(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Et,"$1"+i):!1!==t.jsonp&&(t.url+=(ot.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||Vt.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){void 0===o?Vt(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Ct.push(i)),a&&_t(o)&&o(a[0]),a=o=void 0})),"script"})),Ft.createHTMLDocument=((At=qt.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===At.childNodes.length),Vt.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(Ft.createHTMLDocument?((r=(t=qt.implementation.createHTMLDocument("")).createElement("base")).href=qt.location.href,t.head.appendChild(r)):t=qt),o=!n&&[],(i=ne.exec(e))?[t.createElement(i[1])]:(i=w([e],t,o),o&&o.length&&Vt(o).remove(),Vt.merge([],i.childNodes)));var r,i,o},Vt.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=X(e.slice(s)),e=e.slice(0,s)),_t(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&Vt.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?Vt("<div>").append(Vt.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},Vt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){Vt.fn[t]=function(e){return this.on(t,e)}})),Vt.expr.pseudos.animated=function(e){return Vt.grep(Vt.timers,(function(t){return e===t.elem})).length},Vt.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=Vt.css(e,"position"),c=Vt(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=Vt.css(e,"top"),u=Vt.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),_t(t)&&(t=t.call(e,n,Vt.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},Vt.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){Vt.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===Vt.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===Vt.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=Vt(e).offset()).top+=Vt.css(e,"borderTopWidth",!0),i.left+=Vt.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-Vt.css(r,"marginTop",!0),left:t.left-i.left-Vt.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===Vt.css(e,"position");)e=e.offsetParent;return e||Ae}))}}),Vt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;Vt.fn[e]=function(r){return ce(this,(function(e,r,i){var o;if(zt(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),Vt.each(["top","left"],(function(e,t){Vt.cssHooks[t]=O(Ft.pixelPosition,(function(e,n){if(n)return n=H(e,t),Re.test(n)?Vt(e).position()[t]+"px":n}))})),Vt.each({Height:"height",Width:"width"},(function(e,t){Vt.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){Vt.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return ce(this,(function(t,n,i){var o;return zt(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?Vt.css(t,n,s):Vt.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),Vt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){Vt.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),Vt.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Vt.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),Vt.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),_t(e))return r=Ht.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(Ht.call(arguments)))}).guid=e.guid=e.guid||Vt.guid++,i},Vt.holdReady=function(e){e?Vt.readyWait++:Vt.ready(!0)},Vt.isArray=Array.isArray,Vt.parseJSON=JSON.parse,Vt.nodeName=o,Vt.isFunction=_t,Vt.isWindow=zt,Vt.camelCase=d,Vt.type=r,Vt.now=Date.now,Vt.isNumeric=function(e){var t=Vt.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return Vt})),kt=e.jQuery,St=e.$,Vt.noConflict=function(t){return e.$===Vt&&(e.$=St),t&&e.jQuery===Vt&&(e.jQuery=kt),Vt},t||(e.jQuery=e.$=Vt),Vt})); })(this);
// 3rdParty/jquery-ui.js
-(function (window, undefined) { !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(P){P.ui=P.ui||{};P.ui.version="1.12.1";var o,i=0,a=Array.prototype.slice;P.cleanData=(o=P.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)try{(e=P._data(i,"events"))&&e.remove&&P(i).triggerHandler("remove")}catch(t){}o(t)}),P.widget=function(t,i,e){var s,o,n,r={},a=t.split(".")[0],h=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=P.Widget),P.isArray(e)&&(e=P.extend.apply(null,[{}].concat(e))),P.expr[":"][h.toLowerCase()]=function(t){return!!P.data(t,h)},P[a]=P[a]||{},s=P[a][t],o=P[a][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},P.extend(o,s,{version:e.version,_proto:P.extend({},e),_childConstructors:[]}),(n=new i).options=P.widget.extend({},n.options),P.each(e,function(e,s){function o(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}P.isFunction(s)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=n,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=s}),o.prototype=P.widget.extend(n,{widgetEventPrefix:s&&n.widgetEventPrefix||t},r,{constructor:o,namespace:a,widgetName:t,widgetFullName:h}),s?(P.each(s._childConstructors,function(t,e){var i=e.prototype;P.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),P.widget.bridge(t,o),o},P.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),o=0,n=s.length;o<n;o++)for(e in s[o])i=s[o][e],s[o].hasOwnProperty(e)&&void 0!==i&&(P.isPlainObject(i)?t[e]=P.isPlainObject(t[e])?P.widget.extend({},t[e],i):P.widget.extend({},i):t[e]=i);return t},P.widget.bridge=function(n,e){var r=e.prototype.widgetFullName||n;P.fn[n]=function(i){var t="string"==typeof i,s=a.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=P.data(this,r);return"instance"===i?(o=e,!1):e?P.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:P.error("no such method '"+i+"' for "+n+" widget instance"):P.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(s.length&&(i=P.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=P.data(this,r);t?(t.option(i||{}),t._init&&t._init()):P.data(this,r,new e(i,this))})),o}},P.Widget=function(){},P.Widget._childConstructors=[],P.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=P(e||this.defaultElement||this)[0],this.element=P(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=P(),this.hoverable=P(),this.focusable=P(),this.classesElementLookup={},e!==this&&(P.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=P(e.style?e.ownerDocument:e.document||e),this.window=P(this.document[0].defaultView||this.document[0].parentWindow)),this.options=P.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:P.noop,_create:P.noop,_init:P.noop,destroy:function(){var i=this;this._destroy(),P.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:P.noop,widget:function(){return this.element},option:function(t,e){var i,s,o,n=t;if(0===arguments.length)return P.widget.extend({},this.options);if("string"==typeof t)if(n={},t=(i=t.split(".")).shift(),i.length){for(s=n[t]=P.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];n[t]=e}return this._setOptions(n),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=P(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var n=[],r=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=r.classesElementLookup[t[s]]||P(),i=o.add?P(P.unique(i.get().concat(o.element.get()))):P(i.not(o.element).get()),r.classesElementLookup[t[s]]=i,n.push(t[s]),e&&o.classes[t[s]]&&n.push(o.classes[t[s]])}return o=P.extend({element:this.element,classes:this.options.classes||{}},o),this._on(o.element,{remove:"_untrackClassesElement"}),o.keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(i){var s=this;P.each(s.classesElementLookup,function(t,e){-1!==P.inArray(i.target,e)&&(s.classesElementLookup[t]=P(e.not(i.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof t||null===t,n={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:s};return n.element.toggleClass(this._classes(n),s),this},_on:function(r,a,t){var h,l=this;"boolean"!=typeof r&&(t=a,a=r,r=!1),t?(a=h=P(a),this.bindings=this.bindings.add(a)):(t=a,a=this.element,h=this.widget()),P.each(t,function(t,e){function i(){if(r||!0!==l.options.disabled&&!P(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||P.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),o=s[1]+l.eventNamespace,n=s[2];n?h.on(o,n,i):a.on(o,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=P(this.bindings.not(t).get()),this.focusable=P(this.focusable.not(t).get()),this.hoverable=P(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(P(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(P(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,o,n=this.options[t];if(i=i||{},(e=P.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(s in o)s in e||(e[s]=o[s]);return this.element.trigger(e,i),!(P.isFunction(n)&&!1===n.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},P.each({show:"fadeIn",hide:"fadeOut"},function(n,r){P.Widget.prototype["_"+n]=function(e,t,i){var s;"string"==typeof t&&(t={effect:t});var o=t?!0!==t&&"number"!=typeof t&&t.effect||r:n;"number"==typeof(t=t||{})&&(t={duration:t}),s=!P.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&P.effects&&P.effects.effect[o]?e[n](t):o!==n&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){P(this)[n](),i&&i.call(e[0]),t()})}});var n,x,C,s,r,h,l,c,z;P.widget;function H(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function I(t,e){return parseInt(P.css(t,e),10)||0}x=Math.max,C=Math.abs,s=/left|center|right/,r=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,c=/%$/,z=P.fn.position,P.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=P("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];return P("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?P.position.scrollbarWidth():0,height:s?P.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=P(t||window),i=P.isWindow(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?P(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},P.fn.position=function(p){if(!p||!p.of)return z.apply(this,arguments);p=P.extend({},p);var f,u,d,g,m,t,e,v=P(p.of),_=P.position.getWithinInfo(p.within),b=P.position.getScrollInfo(_),w=(p.collision||"flip").split(" "),y={},i=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:P.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()};return v[0].preventDefault&&(p.at="left top"),u=i.width,d=i.height,g=i.offset,m=P.extend({},g),P.each(["my","at"],function(){var t,e,i=(p[this]||"").split(" ");1===i.length&&(i=s.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]),i[0]=s.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),y[this]=[t?t[0]:0,e?e[0]:0],p[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===p.at[0]?m.left+=u:"center"===p.at[0]&&(m.left+=u/2),"bottom"===p.at[1]?m.top+=d:"center"===p.at[1]&&(m.top+=d/2),f=H(y.at,u,d),m.left+=f[0],m.top+=f[1],this.each(function(){var i,t,r=P(this),a=r.outerWidth(),h=r.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),o=a+e+I(this,"marginRight")+b.width,n=h+s+I(this,"marginBottom")+b.height,l=P.extend({},m),c=H(y.my,r.outerWidth(),r.outerHeight());"right"===p.my[0]?l.left-=a:"center"===p.my[0]&&(l.left-=a/2),"bottom"===p.my[1]?l.top-=h:"center"===p.my[1]&&(l.top-=h/2),l.left+=c[0],l.top+=c[1],i={marginLeft:e,marginTop:s},P.each(["left","top"],function(t,e){P.ui.position[w[t]]&&P.ui.position[w[t]][e](l,{targetWidth:u,targetHeight:d,elemWidth:a,elemHeight:h,collisionPosition:i,collisionWidth:o,collisionHeight:n,offset:[f[0]+c[0],f[1]+c[1]],my:p.my,at:p.at,within:_,elem:r})}),p.using&&(t=function(t){var e=g.left-l.left,i=e+u-a,s=g.top-l.top,o=s+d-h,n={target:{element:v,left:g.left,top:g.top,width:u,height:d},element:{element:r,left:l.left,top:l.top,width:a,height:h},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<s?"bottom":"middle"};u<a&&C(e+i)<u&&(n.horizontal="center"),d<h&&C(s+o)<d&&(n.vertical="middle"),x(C(e),C(i))>x(C(s),C(o))?n.important="horizontal":n.important="vertical",p.using.call(this,t,n)}),r.offset(P.extend(l,{using:t}))})},P.ui.position={fit:{left:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollLeft:s.offset.left,n=s.width,r=t.left-e.collisionPosition.marginLeft,a=o-r,h=r+e.collisionWidth-n-o;e.collisionWidth>n?0<a&&h<=0?(i=t.left+a+e.collisionWidth-n-o,t.left+=a-i):t.left=!(0<h&&a<=0)&&h<a?o+n-e.collisionWidth:o:0<a?t.left+=a:0<h?t.left-=h:t.left=x(t.left-r,t.left)},top:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollTop:s.offset.top,n=e.within.height,r=t.top-e.collisionPosition.marginTop,a=o-r,h=r+e.collisionHeight-n-o;e.collisionHeight>n?0<a&&h<=0?(i=t.top+a+e.collisionHeight-n-o,t.top+=a-i):t.top=!(0<h&&a<=0)&&h<a?o+n-e.collisionHeight:o:0<a?t.top+=a:0<h?t.top-=h:t.top=x(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,n=o.offset.left+o.scrollLeft,r=o.width,a=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,l=h-a,c=h+e.collisionWidth-r-a,p="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,u=-2*e.offset[0];l<0?((i=t.left+p+f+u+e.collisionWidth-r-n)<0||i<C(l))&&(t.left+=p+f+u):0<c&&(0<(s=t.left-e.collisionPosition.marginLeft+p+f+u-a)||C(s)<c)&&(t.left+=p+f+u)},top:function(t,e){var i,s,o=e.within,n=o.offset.top+o.scrollTop,r=o.height,a=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,l=h-a,c=h+e.collisionHeight-r-a,p="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,u=-2*e.offset[1];l<0?((s=t.top+p+f+u+e.collisionHeight-r-n)<0||s<C(l))&&(t.top+=p+f+u):0<c&&(0<(i=t.top-e.collisionPosition.marginTop+p+f+u-a)||C(i)<c)&&(t.top+=p+f+u)}},flipfit:{left:function(){P.ui.position.flip.left.apply(this,arguments),P.ui.position.fit.left.apply(this,arguments)},top:function(){P.ui.position.flip.top.apply(this,arguments),P.ui.position.fit.top.apply(this,arguments)}}};P.ui.position,P.extend(P.expr[":"],{data:P.expr.createPseudo?P.expr.createPseudo(function(e){return function(t){return!!P.data(t,e)}}):function(t,e,i){return!!P.data(t,i[3])}}),P.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),P.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):P(this[0].form)},P.ui.formResetMixin={_formResetHandler:function(){var e=P(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");P.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element.form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(P.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},P.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},P.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=P(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&o.length?o:P(this[0].ownerDocument||document)},P.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var t,p=!1;P(document).on("mouseup",function(){p=!1});P.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===P.data(t.target,e.widgetName+".preventClickEvent"))return P.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!p){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&P(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===P.data(t.target,this.widgetName+".preventClickEvent")&&P.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),p=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(P.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&P.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,p=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),P.ui.plugin={add:function(t,e,i){var s,o=P.ui[t].prototype;for(s in i)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var o,n=t.plugins[e];if(n&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<n.length;o++)t.options[n[o][0]]&&n[o][1].apply(t.element,i)}},P.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return(i=i||e.body).nodeName||(i=e.body),i},P.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&P(t).trigger("blur")};P.widget("ui.draggable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<P(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=P(this);return P("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=P.ui.safeActiveElement(this.document[0]);P(t.target).closest(e).length||P.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),P.ui.ddmanager&&(P.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===P(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),P.ui.ddmanager&&!e.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),P.ui.ddmanager&&P.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new P.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return P.ui.ddmanager&&!this.options.dropBehaviour&&(i=P.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||P.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?P(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),P.ui.ddmanager&&P.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),P.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new P.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!P(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper),s=i?P(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,o=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=P(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,P(o).width()-this.helperProportions.width-this.margins.left,(P(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[P(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,P(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,P(window).scrollLeft()+P(window).width()-this.helperProportions.width-this.margins.left,P(window).scrollTop()+(P(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,o,n,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(s=this.relativeContainer.offset(),[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=!i||o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1],n=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=!i||n-this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),P.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),P.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),P.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=P.extend({},t,{item:i.element});i.sortables=[],P(i.options.connectToSortable).each(function(){var t=P(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=P.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,P.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,o){P.each(o.sortables,function(){var t=!1,e=this;e.positionAbs=o.positionAbs,e.helperProportions=o.helperProportions,e.offset.click=o.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,P.each(o.sortables,function(){return this.positionAbs=o.positionAbs,this.helperProportions=o.helperProportions,this.offset.click=o.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&P.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,o._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=o.offset.click.top,e.offset.click.left=o.offset.click.left,e.offset.parent.left-=o.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=o.offset.parent.top-e.offset.parent.top,o._trigger("toSortable",i),o.dropped=e.element,P.each(o.sortables,function(){this.refreshPositions()}),o.currentItem=o.element,e.fromOutside=o),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(o._parent),o._refreshOffsets(i),s.position=o._generatePosition(i,!0),o._trigger("fromSortable",i),o.dropped=!1,P.each(o.sortables,function(){this.refreshPositions()}))})}}),P.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=P("body"),o=i.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(t,e,i){var s=i.options;s._cursor&&P("body").css("cursor",s._cursor)}}),P.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(t,e,i){var s=i.options;s._opacity&&P(e.helper).css("opacity",s._opacity)}}),P.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,o=!1,n=i.scrollParentNotHidden[0],r=i.document[0];n!==r&&"HTML"!==n.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+n.offsetHeight-t.pageY<s.scrollSensitivity?n.scrollTop=o=n.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(n.scrollTop=o=n.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+n.offsetWidth-t.pageX<s.scrollSensitivity?n.scrollLeft=o=n.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(n.scrollLeft=o=n.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-P(r).scrollTop()<s.scrollSensitivity?o=P(r).scrollTop(P(r).scrollTop()-s.scrollSpeed):P(window).height()-(t.pageY-P(r).scrollTop())<s.scrollSensitivity&&(o=P(r).scrollTop(P(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-P(r).scrollLeft()<s.scrollSensitivity?o=P(r).scrollLeft(P(r).scrollLeft()-s.scrollSpeed):P(window).width()-(t.pageX-P(r).scrollLeft())<s.scrollSensitivity&&(o=P(r).scrollLeft(P(r).scrollLeft()+s.scrollSpeed)))),!1!==o&&P.ui.ddmanager&&!s.dropBehaviour&&P.ui.ddmanager.prepareOffsets(i,t)}}),P.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],P(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=P(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,o,n,r,a,h,l,c,p,f=i.options,u=f.snapTolerance,d=e.offset.left,g=d+i.helperProportions.width,m=e.offset.top,v=m+i.helperProportions.height,_=i.snapElements.length-1;0<=_;_--)h=(a=i.snapElements[_].left-i.margins.left)+i.snapElements[_].width,c=(l=i.snapElements[_].top-i.margins.top)+i.snapElements[_].height,g<a-u||h+u<d||v<l-u||c+u<m||!P.contains(i.snapElements[_].item.ownerDocument,i.snapElements[_].item)?(i.snapElements[_].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(l-v)<=u,o=Math.abs(c-m)<=u,n=Math.abs(a-g)<=u,r=Math.abs(h-d)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l-i.helperProportions.height,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h}).left)),p=s||o||n||r,"outer"!==f.snapMode&&(s=Math.abs(l-m)<=u,o=Math.abs(c-v)<=u,n=Math.abs(a-d)<=u,r=Math.abs(h-g)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h-i.helperProportions.width}).left)),!i.snapElements[_].snapping&&(s||o||n||r||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=s||o||n||r||p)}}),P.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,o=i.options,n=P.makeArray(P(o.stack)).sort(function(t,e){return(parseInt(P(t).css("zIndex"),10)||0)-(parseInt(P(e).css("zIndex"),10)||0)});n.length&&(s=parseInt(P(n[0]).css("zIndex"),10)||0,P(n).each(function(t){P(this).css("zIndex",s+t)}),this.css("zIndex",s+n.length))}}),P.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(t,e,i){var s=i.options;s._zIndex&&P(e.helper).css("zIndex",s._zIndex)}});P.ui.draggable;P.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=P.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){P.ui.ddmanager.droppables[t]=P.ui.ddmanager.droppables[t]||[],P.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=P.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept=P.isFunction(e)?e:function(t){return t.is(e)}:"scope"===t&&(i=P.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=P.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=P.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||P.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=P(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&f(i,P.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var f=P.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,n=(t.positionAbs||t.position.absolute).top+t.margins.top,r=o+t.helperProportions.width,a=n+t.helperProportions.height,h=e.offset.left,l=e.offset.top,c=h+e.proportions().width,p=l+e.proportions().height;switch(i){case"fit":return h<=o&&r<=c&&l<=n&&a<=p;case"intersect":return h<o+t.helperProportions.width/2&&r-t.helperProportions.width/2<c&&l<n+t.helperProportions.height/2&&a-t.helperProportions.height/2<p;case"pointer":return u(s.pageY,l,e.proportions().height)&&u(s.pageX,h,e.proportions().width);case"touch":return(l<=n&&n<=p||l<=a&&a<=p||n<l&&p<a)&&(h<=o&&o<=c||h<=r&&r<=c||o<h&&c<r);default:return!1}};function u(t,e,i){return e<=t&&t<e+i}!(P.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,o=P.ui.ddmanager.droppables[t.options.scope]||[],n=e?e.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||t&&!o[i].accept.call(o[i].element[0],t.currentItem||t.element))){for(s=0;s<r.length;s++)if(r[s]===o[i].element[0]){o[i].proportions().height=0;continue t}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===n&&o[i]._activate.call(o[i],e),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return P.each((P.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&f(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,r){n.options.refreshPositions&&P.ui.ddmanager.prepareOffsets(n,r),P.each(P.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s,o;this.options.disabled||this.greedyChild||!this.visible||(o=!(s=f(n,this,this.options.tolerance,r))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return P(this).droppable("instance").options.scope===e})).length&&((t=P(i[0]).droppable("instance")).greedyChild="isover"===o)),t&&"isover"===o&&(t.isover=!1,t.isout=!0,t._out.call(t,r)),this[o]=!0,this["isout"===o?"isover":"isout"]=!1,this["isover"===o?"_over":"_out"].call(this,r),t&&"isout"===o&&(t.isout=!1,t.isover=!0,t._over.call(t,r)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)}})!==P.uiBackCompat&&P.widget("ui.droppable",P.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});P.ui.droppable;P.widget("ui.resizable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===P(t).css("overflow"))return!1;var i,s=e&&"left"===e?"scrollLeft":"scrollTop";return 0<t[s]||(t[s]=1,i=0<t[s],t[s]=0,i)},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),P.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(P("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&P(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();function t(t){P(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,i,s,o,n=this.options,r=this;if(this.handles=n.handles||(P(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=P(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=P.trim(i[e])),o=P("<div>"),this._addClass(o,"ui-resizable-handle "+s),o.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(o);this._renderAxis=function(t){var e,i,s,o;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=P(this.handles[e]),this._on(this.handles[e],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=P(this.handles[e],this.element),o=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=P(this.handles[e])[0])!==t.target&&!P.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,o=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(e+=P(o.containment).scrollLeft()||0,i+=P(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=P(".ui-resizable-"+this.axis).css("cursor"),P("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i,s=this.originalMousePosition,o=this.axis,n=t.pageX-s.left||0,r=t.pageY-s.top||0,a=this._change[o];return this._updatePrevProperties(),a&&(e=a.apply(this,[t,n,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),P.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,o,n,r,a,h=this.options,l=this;return this._helper&&(s=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:l.sizeDiff.height,o=i?0:l.sizeDiff.width,n={width:l.helper.width()-o,height:l.helper.height()-s},r=parseFloat(l.element.css("left"))+(l.position.left-l.originalPosition.left)||null,a=parseFloat(l.element.css("top"))+(l.position.top-l.originalPosition.top)||null,h.animate||this.element.css(P.extend(n,{top:a,left:r})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!h.animate&&this._proportionallyResize()),P("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,o,n=this.options,r={minWidth:this._isNumber(n.minWidth)?n.minWidth:0,maxWidth:this._isNumber(n.maxWidth)?n.maxWidth:1/0,minHeight:this._isNumber(n.minHeight)?n.minHeight:0,maxHeight:this._isNumber(n.maxHeight)?n.maxHeight:1/0};(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),s>r.minHeight&&(r.minHeight=s),i<r.maxWidth&&(r.maxWidth=i),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),n&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),o&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||P("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){P.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),P.ui.plugin.add("resizable","animate",{stop:function(e){var i=P(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),n=o&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,a={width:i.size.width-r,height:i.size.height-n},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,l=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(P.extend(a,l&&h?{top:l,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&P(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),P.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,o,n,r,a=P(this).resizable("instance"),h=a.options,l=a.element,c=h.containment,p=c instanceof P?c.get(0):/parent/.test(c)?l.parent().get(0):c;p&&(a.containerElement=P(p),/document/.test(c)||c===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:P(document),left:0,top:0,width:P(document).width(),height:P(document).height()||document.body.parentNode.scrollHeight}):(i=P(p),s=[],P(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=a._num(i.css("padding"+e))}),a.containerOffset=i.offset(),a.containerPosition=i.position(),a.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=a.containerOffset,e=a.containerSize.height,o=a.containerSize.width,n=a._hasScroll(p,"left")?p.scrollWidth:o,r=a._hasScroll(p)?p.scrollHeight:e,a.parentData={element:p,left:t.left,top:t.top,width:n,height:r}))},resize:function(t){var e,i,s,o,n=P(this).resizable("instance"),r=n.options,a=n.containerOffset,h=n.position,l=n._aspectRatio||t.shiftKey,c={top:0,left:0},p=n.containerElement,f=!0;p[0]!==document&&/static/.test(p.css("position"))&&(c=a),h.left<(n._helper?a.left:0)&&(n.size.width=n.size.width+(n._helper?n.position.left-a.left:n.position.left-c.left),l&&(n.size.height=n.size.width/n.aspectRatio,f=!1),n.position.left=r.helper?a.left:0),h.top<(n._helper?a.top:0)&&(n.size.height=n.size.height+(n._helper?n.position.top-a.top:n.position.top),l&&(n.size.width=n.size.height*n.aspectRatio,f=!1),n.position.top=n._helper?a.top:0),s=n.containerElement.get(0)===n.element.parent().get(0),o=/relative|absolute/.test(n.containerElement.css("position")),s&&o?(n.offset.left=n.parentData.left+n.position.left,n.offset.top=n.parentData.top+n.position.top):(n.offset.left=n.element.offset().left,n.offset.top=n.element.offset().top),e=Math.abs(n.sizeDiff.width+(n._helper?n.offset.left-c.left:n.offset.left-a.left)),i=Math.abs(n.sizeDiff.height+(n._helper?n.offset.top-c.top:n.offset.top-a.top)),e+n.size.width>=n.parentData.width&&(n.size.width=n.parentData.width-e,l&&(n.size.height=n.size.width/n.aspectRatio,f=!1)),i+n.size.height>=n.parentData.height&&(n.size.height=n.parentData.height-i,l&&(n.size.width=n.size.height*n.aspectRatio,f=!1)),f||(n.position.left=n.prevPosition.left,n.position.top=n.prevPosition.top,n.size.width=n.prevSize.width,n.size.height=n.prevSize.height)},stop:function(){var t=P(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,o=t.containerElement,n=P(t.helper),r=n.offset(),a=n.outerWidth()-t.sizeDiff.width,h=n.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h}),t._helper&&!e.animate&&/static/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h})}}),P.ui.plugin.add("resizable","alsoResize",{start:function(){var t=P(this).resizable("instance").options;P(t.alsoResize).each(function(){var t=P(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=P(this).resizable("instance"),s=e.options,o=e.originalSize,n=e.originalPosition,r={height:e.size.height-o.height||0,width:e.size.width-o.width||0,top:e.position.top-n.top||0,left:e.position.left-n.left||0};P(s.alsoResize).each(function(){var t=P(this),s=P(this).data("ui-resizable-alsoresize"),o={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];P.each(e,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&0<=i&&(o[e]=i||null)}),t.css(o)})},stop:function(){P(this).removeData("ui-resizable-alsoresize")}}),P.ui.plugin.add("resizable","ghost",{start:function(){var t=P(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==P.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=P(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=P(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),P.ui.plugin.add("resizable","grid",{resize:function(){var t,e=P(this).resizable("instance"),i=e.options,s=e.size,o=e.originalSize,n=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=a[0]||1,l=a[1]||1,c=Math.round((s.width-o.width)/h)*h,p=Math.round((s.height-o.height)/l)*l,f=o.width+c,u=o.height+p,d=i.maxWidth&&i.maxWidth<f,g=i.maxHeight&&i.maxHeight<u,m=i.minWidth&&i.minWidth>f,v=i.minHeight&&i.minHeight>u;i.grid=a,m&&(f+=h),v&&(u+=l),d&&(f-=h),g&&(u-=l),/^(se|s|e)$/.test(r)?(e.size.width=f,e.size.height=u):/^(ne)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.top=n.top-p):/^(sw)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.left=n.left-c):((u-l<=0||f-h<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<u-l?(e.size.height=u,e.position.top=n.top-p):(u=l-t.height,e.size.height=u,e.position.top=n.top+o.height-u),0<f-h?(e.size.width=f,e.position.left=n.left-c):(f=h-t.width,e.size.width=f,e.position.left=n.left+o.width-f))}});P.ui.resizable,P.widget("ui.selectable",P.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var s=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){s.elementPos=P(s.element[0]).offset(),s.selectees=P(s.options.filter,s.element[0]),s._addClass(s.selectees,"ui-selectee"),s.selectees.each(function(){var t=P(this),e=t.offset(),i={left:e.left-s.elementPos.left,top:e.top-s.elementPos.top};P.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=P("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=P(this.element[0]).offset(),this.options.disabled||(this.selectees=P(t.filter,this.element[0]),this._trigger("start",i),P(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=P.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),P(i.target).parents().addBack().each(function(){var t,e=P.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,o=this,n=this.options,r=this.opos[0],a=this.opos[1],h=s.pageX,l=s.pageY;return h<r&&(t=h,h=r,r=t),l<a&&(t=l,l=a,a=t),this.helper.css({left:r,top:a,width:h-r,height:l-a}),this.selectees.each(function(){var t=P.data(this,"selectable-item"),e=!1,i={};t&&t.element!==o.element[0]&&(i.left=t.left+o.elementPos.left,i.right=t.right+o.elementPos.left,i.top=t.top+o.elementPos.top,i.bottom=t.bottom+o.elementPos.top,"touch"===n.tolerance?e=!(i.left>h||i.right<r||i.top>l||i.bottom<a):"fit"===n.tolerance&&(e=i.left>r&&i.right<h&&i.top>a&&i.bottom<l),e?(t.selected&&(o._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(o._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(o._addClass(t.$element,"ui-selecting"),t.selecting=!0,o._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,o._addClass(t.$element,"ui-selected"),t.selected=!0):(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),o._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(o._removeClass(t.$element,"ui-selected"),t.selected=!1,o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,o._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,P(".ui-unselecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),P(".ui-selecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),P.widget("ui.sortable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),P.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),P(t.target).parents().each(function(){if(P.data(this,o.widgetName+"-item")===o)return i=P(this),!1}),P.data(t.target,o.widgetName+"-item")===o&&(i=P(t.target)),!!i&&(!(this.options.handle&&!e&&(P(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,o,n=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},P.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&"auto"!==n.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",n.cursor),this.storedStylesheet=P("<style>*{ cursor: "+n.cursor+" !important; }</style>").appendTo(o)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return P.ui.ddmanager&&(P.ui.ddmanager.current=this),P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,o,n=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-this.document.scrollTop()<n.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-n.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<n.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+n.scrollSpeed)),t.pageX-this.document.scrollLeft()<n.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-n.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<n.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+n.scrollSpeed))),!1!==r&&P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(o=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===s||P.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&P.contains(this.element[0],s))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,o,n;if(t)return P.ui.ddmanager&&!this.options.dropBehaviour&&P.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),n={},(o=this.options.axis)&&"x"!==o||(n.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(n.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,P(this.helper).animate(n,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new P.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),P.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?P(this.domPosition.prev).after(this.currentItem):P(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},P(t).each(function(){var t=(P(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(P(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,n=t.left,r=n+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||a<s+l&&s+l<h,f="y"===this.options.axis||n<e+c&&e+c<r,u=p&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:n<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,o,n=[],r=[],a=this._connectWith();if(a&&t)for(e=a.length-1;0<=e;e--)for(i=(s=P(a[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&r.push([P.isFunction(o.options.items)?o.options.items.call(o.element):P(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function h(){n.push(this)}for(r.push([P.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):P(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=r.length-1;0<=e;e--)r[e][0].each(h);return P(n)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=P.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,o,n,r,a,h,l=this.items,c=[[P.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):P(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(e=p.length-1;0<=e;e--)for(i=(s=P(p[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&(c.push([P.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):P(o.options.items,o.element),o]),this.containers.push(o));for(e=c.length-1;0<=e;e--)for(n=c[e][1],i=0,h=(r=c[e][0]).length;i<h;i++)(a=P(r[i])).data(this.widgetName+"-item",n),l.push({item:a,instance:n,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,i,s,o;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(i=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?P(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),o=s.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)o=this.containers[e].element.offset(),this.containers[e].containerCache.left=o.left,this.containers[e].containerCache.top=o.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,o.placeholder={element:function(){var t=i.currentItem[0].nodeName.toLowerCase(),e=P("<"+t+">",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),P("<tr>",i.document[0]).appendTo(e)):"tr"===t?i._createTrPlaceholder(i.currentItem,e):"img"===t&&e.attr("src",i.currentItem.attr("src")),s||e.css("visibility","hidden"),e},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=P(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){P("<td> </td>",i.document[0]).attr("colspan",P(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,o,n,r,a,h,l,c=null,p=null,f=this.containers.length-1;0<=f;f--)if(!P.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(c&&P.contains(this.containers[f].element[0],c.element[0]))continue;c=this.containers[f],p=f}else this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",t,this._uiHash(this)),this.containers[f].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,s=null,o=(h=c.floating||this._isFloating(this.currentItem))?"left":"top",n=h?"width":"height",l=h?"pageX":"pageY",e=this.items.length-1;0<=e;e--)P.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(r=this.items[e].item.offset()[o],a=!1,t[l]-r>this.items[e][n]/2&&(a=!0),Math.abs(t[l]-r)<i&&(i=Math.abs(t[l]-r),s=this.items[e],this.direction=a?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper)?P(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||P("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!e.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!e.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&P.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=P(s.containment)[0],e=P(s.containment).offset(),i="hidden"!==P(t).css("overflow"),this.containment=[e.left+(parseInt(P(t).css("borderLeftWidth"),10)||0)+(parseInt(P(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(P(t).css("borderTopWidth"),10)||0)+(parseInt(P(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(P(t).css("borderLeftWidth"),10)||0)-(parseInt(P(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(P(t).css("borderTopWidth"),10)||0)-(parseInt(P(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*i}},_generatePosition:function(t){var e,i,s=this.options,o=t.pageX,n=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(n=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(n=this.containment[3]+this.offset.click.top)),s.grid&&(e=this.originalPageY+Math.round((n-this.originalPageY)/s.grid[1])*s.grid[1],n=!this.containment||e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-s.grid[1]:e+s.grid[1],i=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=!this.containment||i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0])),{top:n-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===P.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||P([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});var d,g,m,v,e,_,b,w,y,S,W,T,k,D,E,N,O,R,L,M,A,F="ui-effects-",B="ui-effects-style",X="ui-effects-animated",Y=P;function q(t,e,i){var s=w[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:t<0?0:s.max<t?s.max:t)}function j(r){var a=_(),h=a._rgba=[];return r=r.toLowerCase(),W(e,function(t,e){var i,s=e.re.exec(r),o=s&&e.parse(s),n=e.space||"rgba";if(o)return i=a[n](o),a[b[n].cache]=i[b[n].cache],h=a._rgba=i._rgba,!1}),h.length?("0,0,0,0"===h.join()&&d.extend(h,m.transparent),a):m[r]}function $(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function U(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(o[P.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(o[e]=s[e]);return o}function K(t,e,i,s){return P.isPlainObject(t)&&(t=(e=t).effect),t={effect:t},null==e&&(e={}),P.isFunction(e)&&(s=e,i=null,e={}),"number"!=typeof e&&!P.fx.speeds[e]||(s=i,i=e,e={}),P.isFunction(i)&&(s=i,i=null),e&&P.extend(t,e),i=i||e.duration,t.duration=P.fx.off?0:"number"==typeof i?i:i in P.fx.speeds?P.fx.speeds[i]:P.fx.speeds._default,t.complete=s||e.complete,t}function V(t){return!t||"number"==typeof t||P.fx.speeds[t]||("string"==typeof t&&!P.effects.effect[t]||(P.isFunction(t)||"object"==typeof t&&!t.effect))}function Q(t,e){var i=e.outerWidth(),s=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}P.effects={effect:{}},v=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],_=(d=Y).Color=function(t,e,i,s){return new d.Color.fn.parse(t,e,i,s)},b={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},w={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},y=_.support={},S=d("<p>")[0],W=d.each,S.style.cssText="background-color:rgba(1,1,1,.5)",y.rgba=-1<S.style.backgroundColor.indexOf("rgba"),W(b,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),_.fn=d.extend(_.prototype,{parse:function(o,t,e,i){if(o===g)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=d(o).css(t),t=g);var n=this,s=d.type(o),r=this._rgba=[];return t!==g&&(o=[o,t,e,i],s="array"),"string"===s?this.parse(j(o)||m._default):"array"===s?(W(b.rgba.props,function(t,e){r[e.idx]=q(o[e.idx],e)}),this):"object"===s?(W(b,o instanceof _?function(t,e){o[e.cache]&&(n[e.cache]=o[e.cache].slice())}:function(t,i){var s=i.cache;W(i.props,function(t,e){if(!n[s]&&i.to){if("alpha"===t||null==o[t])return;n[s]=i.to(n._rgba)}n[s][e.idx]=q(o[t],e,!0)}),n[s]&&d.inArray(null,n[s].slice(0,3))<0&&(n[s][3]=1,i.from&&(n._rgba=i.from(n[s])))}),this):void 0},is:function(t){var o=_(t),n=!0,r=this;return W(b,function(t,e){var i,s=o[e.cache];return s&&(i=r[e.cache]||e.to&&e.to(r._rgba)||[],W(e.props,function(t,e){if(null!=s[e.idx])return n=s[e.idx]===i[e.idx]})),n}),n},_space:function(){var i=[],s=this;return W(b,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,r){var e=(l=_(t))._space(),i=b[e],s=0===this.alpha()?_("transparent"):this,a=s[i.cache]||i.to(s._rgba),h=a.slice(),l=l[i.cache];return W(i.props,function(t,e){var i=e.idx,s=a[i],o=l[i],n=w[e.type]||{};null!==o&&(null===s?h[i]=o:(n.mod&&(n.mod/2<o-s?s+=n.mod:n.mod/2<s-o&&(s-=n.mod)),h[i]=q((o-s)*r+s,e)))}),this[e](h)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=_(t)._rgba;return _(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=d.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+d.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),_.fn.parse.prototype=_.fn,b.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,o=t[3],n=Math.max(e,i,s),r=Math.min(e,i,s),a=n-r,h=n+r,l=.5*h,c=r===n?0:e===n?60*(i-s)/a+360:i===n?60*(s-e)/a+120:60*(e-i)/a+240,p=0==a?0:l<=.5?a/h:a/(2-h);return[Math.round(c)%360,p,l,null==o?1:o]},b.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],n=s<=.5?s*(1+i):s+i-s*i,r=2*s-n;return[Math.round(255*$(r,n,e+1/3)),Math.round(255*$(r,n,e)),Math.round(255*$(r,n,e-1/3)),o]},W(b,function(h,t){var i=t.props,r=t.cache,a=t.to,l=t.from;_.fn[h]=function(t){if(a&&!this[r]&&(this[r]=a(this._rgba)),t===g)return this[r].slice();var e,s=d.type(t),o="array"===s||"object"===s?t:arguments,n=this[r].slice();return W(i,function(t,e){var i=o["object"===s?t:e.idx];null==i&&(i=n[e.idx]),n[e.idx]=q(i,e)}),l?((e=_(l(n)))[r]=n,e):_(n)},W(i,function(r,a){_.fn[r]||(_.fn[r]=function(t){var e,i=d.type(t),s="alpha"===r?this._hsla?"hsla":"rgba":h,o=this[s](),n=o[a.idx];return"undefined"===i?n:("function"===i&&(t=t.call(this,n),i=d.type(t)),null==t&&a.empty?this:("string"===i&&(e=v.exec(t))&&(t=n+parseFloat(e[2])*("+"===e[1]?1:-1)),o[a.idx]=t,this[s](o)))})})}),_.hook=function(t){var e=t.split(" ");W(e,function(t,n){d.cssHooks[n]={set:function(t,e){var i,s,o="";if("transparent"!==e&&("string"!==d.type(e)||(i=j(e)))){if(e=_(i||e),!y.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===n?t.parentNode:t;(""===o||"transparent"===o)&&s&&s.style;)try{o=d.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(o&&"transparent"!==o?o:"_default")}e=e.toRgbaString()}try{t.style[n]=e}catch(t){}}},d.fx.step[n]=function(t){t.colorInit||(t.start=_(t.elem,n),t.end=_(t.end),t.colorInit=!0),d.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},_.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var s={};return W(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}},m=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},E=["add","remove","toggle"],N={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},P.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){P.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(Y.style(t.elem,e,t.end),t.setAttr=!0)}}),P.fn.addBack||(P.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),P.effects.animateClass=function(o,t,e,i){var n=P.speed(t,e,i);return this.queue(function(){var i=P(this),t=i.attr("class")||"",e=(e=n.children?i.find("*").addBack():i).map(function(){return{el:P(this),start:U(this)}}),s=function(){P.each(E,function(t,e){o[e]&&i[e+"Class"](o[e])})};s(),e=e.map(function(){return this.end=U(this.el[0]),this.diff=function(t,e){var i,s,o={};for(i in e)s=e[i],t[i]!==s&&(N[i]||!P.fx.step[i]&&isNaN(parseFloat(s))||(o[i]=s));return o}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=P.Deferred(),i=P.extend({},n,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),P.when.apply(P,e.get()).done(function(){s(),P.each(arguments,function(){var e=this.el;P.each(this.diff,function(t){e.css(t,"")})}),n.complete.call(i[0])})})},P.fn.extend({addClass:(D=P.fn.addClass,function(t,e,i,s){return e?P.effects.animateClass.call(this,{add:t},e,i,s):D.apply(this,arguments)}),removeClass:(k=P.fn.removeClass,function(t,e,i,s){return 1<arguments.length?P.effects.animateClass.call(this,{remove:t},e,i,s):k.apply(this,arguments)}),toggleClass:(T=P.fn.toggleClass,function(t,e,i,s,o){return"boolean"==typeof e||void 0===e?i?P.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,o):T.apply(this,arguments):P.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,o){return P.effects.animateClass.call(this,{add:e,remove:t},i,s,o)}}),P.expr&&P.expr.filters&&P.expr.filters.animated&&(P.expr.filters.animated=(O=P.expr.filters.animated,function(t){return!!P(t).data(X)||O(t)})),!1!==P.uiBackCompat&&P.extend(P.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(F+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,o=e.length;s<o;s++)null!==e[s]&&(i=t.data(F+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=P("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return i.wrap(t),i[0]!==o&&!P.contains(i[0],o)||P(o).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(P.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),P.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!P.contains(t[0],e)||P(e).trigger("focus")),t}}),P.extend(P.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),P.effects.effect[t]=i,P.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*s,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(B,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(B)||"",t.removeData(B)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=P("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(F+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=F+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){P.effects.restoreStyle(t),P.effects.removePlaceholder(t)},setTransition:function(s,t,o,n){return n=n||{},P.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(n[e]=i[0]*o+i[1])}),n}}),P.fn.extend({effect:function(){function t(t){var e=P(this),i=P.effects.mode(e,a)||n;e.data(X,!0),h.push(i),n&&("show"===i||i===n&&"hide"===i)&&e.show(),n&&"none"===i||P.effects.saveStyle(e),P.isFunction(t)&&t()}var s=K.apply(this,arguments),o=P.effects.effect[s.effect],n=o.mode,e=s.queue,i=e||"fx",r=s.complete,a=s.mode,h=[];if(P.fx.off||!o)return a?this[a](s.duration,r):this.each(function(){r&&r.call(this)});function l(t){var e=P(this);function i(){P.isFunction(r)&&r.call(e[0]),P.isFunction(t)&&t()}s.mode=h.shift(),!1===P.uiBackCompat||n?"none"===s.mode?(e[a](),i()):o.call(e[0],s,function(){e.removeData(X),P.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===a:"show"===a)?(e[a](),i()):o.call(e[0],s,i)}return!1===e?this.each(t).each(l):this.queue(i,t).queue(i,l)},show:(M=P.fn.show,function(t){if(V(t))return M.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(L=P.fn.hide,function(t){if(V(t))return L.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(R=P.fn.toggle,function(t){if(V(t)||"boolean"==typeof t)return R.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var i=this.css(t),s=[];return P.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Q(this.css("clip"),this)},transfer:function(t,e){var i=P(this),s=P(t.to),o="fixed"===s.css("position"),n=P("body"),r=o?n.scrollTop():0,a=o?n.scrollLeft():0,h=s.offset(),l={top:h.top-r,left:h.left-a,height:s.innerHeight(),width:s.innerWidth()},c=i.offset(),p=P("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:c.top-r,left:c.left-a,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){p.remove(),P.isFunction(e)&&e()})}}),P.fx.step.clip=function(t){t.clipInit||(t.start=P(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Q(t.end,t.elem)),t.clipInit=!0),P(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},A={},P.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){A[t]=function(t){return Math.pow(t,e+2)}}),P.extend(A,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),P.each(A,function(t,e){P.easing["easeIn"+t]=e,P.easing["easeOut"+t]=function(t){return 1-e(1-t)},P.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});P.effects,P.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=P(this),o=t.direction||"up",n=s.cssClip(),r={clip:P.extend({},n)},a=P.effects.createPlaceholder(s);r.clip[i[o][0]]=r.clip[i[o][1]],"show"===t.mode&&(s.cssClip(r.clip),a&&a.css(P.effects.clipToBox(r)),r.clip=n),a&&a.animate(P.effects.clipToBox(r),t.duration,t.easing),s.animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("bounce",function(t,e){var i,s,o,n=P(this),r=t.mode,a="hide"===r,h="show"===r,l=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(h||a?1:0),u=t.duration/f,d=t.easing,g="up"===l||"down"===l?"top":"left",m="up"===l||"left"===l,v=0,_=n.queue().length;for(P.effects.createPlaceholder(n),o=n.css(g),c=c||n["top"==g?"outerHeight":"outerWidth"]()/3,h&&((s={opacity:1})[g]=o,n.css("opacity",0).css(g,m?2*-c:2*c).animate(s,u,d)),a&&(c/=Math.pow(2,p-1)),(s={})[g]=o;v<p;v++)(i={})[g]=(m?"-=":"+=")+c,n.animate(i,u,d).animate(s,u,d),c=a?2*c:c/2;a&&((i={opacity:0})[g]=(m?"-=":"+=")+c,n.animate(i,u,d)),n.queue(e),P.effects.unshift(n,_,1+f)}),P.effects.define("drop","hide",function(t,e){var i,s=P(this),o="show"===t.mode,n=t.direction||"left",r="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",h="+="==a?"-=":"+=",l={opacity:0};P.effects.createPlaceholder(s),i=t.distance||s["top"==r?"outerHeight":"outerWidth"](!0)/2,l[r]=a+i,o&&(s.css(l),l[r]=h+i,l.opacity=1),s.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;P(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fold","hide",function(e,t){var i=P(this),s=e.mode,o="show"===s,n="hide"===s,r=e.size||15,a=/([0-9]+)%/.exec(r),h=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,c=P.effects.createPlaceholder(i),p=i.cssClip(),f={clip:P.extend({},p)},u={clip:P.extend({},p)},d=[p[h[0]],p[h[1]]],g=i.queue().length;a&&(r=parseInt(a[1],10)/100*d[n?0:1]),f.clip[h[0]]=r,u.clip[h[0]]=r,u.clip[h[1]]=0,o&&(i.cssClip(u.clip),c&&c.css(P.effects.clipToBox(u)),u.clip=p),i.queue(function(t){c&&c.animate(P.effects.clipToBox(f),l,e.easing).animate(P.effects.clipToBox(u),l,e.easing),t()}).animate(f,l,e.easing).animate(u,l,e.easing).queue(t),P.effects.unshift(i,g,4)}),P.effects.define("highlight","show",function(t,e){var i=P(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),P.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("size",function(o,e){var t,n,i,s=P(this),r=["fontSize"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=o.mode,c="effect"!==l,p=o.scale||"both",f=o.origin||["middle","center"],u=s.css("position"),d=s.position(),g=P.effects.scaledDimensions(s),m=o.from||g,v=o.to||P.effects.scaledDimensions(s,0);P.effects.createPlaceholder(s),"show"===l&&(i=m,m=v,v=i),n={from:{y:m.height/g.height,x:m.width/g.width},to:{y:v.height/g.height,x:v.width/g.width}},"box"!==p&&"both"!==p||(n.from.y!==n.to.y&&(m=P.effects.setTransition(s,a,n.from.y,m),v=P.effects.setTransition(s,a,n.to.y,v)),n.from.x!==n.to.x&&(m=P.effects.setTransition(s,h,n.from.x,m),v=P.effects.setTransition(s,h,n.to.x,v))),"content"!==p&&"both"!==p||n.from.y!==n.to.y&&(m=P.effects.setTransition(s,r,n.from.y,m),v=P.effects.setTransition(s,r,n.to.y,v)),f&&(t=P.effects.getBaseline(f,g),m.top=(g.outerHeight-m.outerHeight)*t.y+d.top,m.left=(g.outerWidth-m.outerWidth)*t.x+d.left,v.top=(g.outerHeight-v.outerHeight)*t.y+d.top,v.left=(g.outerWidth-v.outerWidth)*t.x+d.left),s.css(m),"content"!==p&&"both"!==p||(a=a.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var t=P(this),e=P.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},s={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=P.effects.setTransition(t,a,n.from.y,i),s=P.effects.setTransition(t,a,n.to.y,s)),n.from.x!==n.to.x&&(i=P.effects.setTransition(t,h,n.from.x,i),s=P.effects.setTransition(t,h,n.to.x,s)),c&&P.effects.saveStyle(t),t.css(i),t.animate(s,o.duration,o.easing,function(){c&&P.effects.restoreStyle(t)})})),s.animate(v,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){var t=s.offset();0===v.opacity&&s.css("opacity",m.opacity),c||(s.css("position","static"===u?"relative":u).offset(t),P.effects.saveStyle(s)),e()}})}),P.effects.define("scale",function(t,e){var i=P(this),s=t.mode,o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),n=P.extend(!0,{from:P.effects.scaledDimensions(i),to:P.effects.scaledDimensions(i,o,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(n.from.opacity=1,n.to.opacity=0),P.effects.effect.size.call(this,n,e)}),P.effects.define("puff","hide",function(t,e){var i=P.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});P.effects.effect.scale.call(this,i,e)}),P.effects.define("pulsate","show",function(t,e){var i=P(this),s=t.mode,o="show"===s,n=o||"hide"===s,r=2*(t.times||5)+(n?1:0),a=t.duration/r,h=0,l=1,c=i.queue().length;for(!o&&i.is(":visible")||(i.css("opacity",0).show(),h=1);l<r;l++)i.animate({opacity:h},a,t.easing),h=1-h;i.animate({opacity:h},a,t.easing),i.queue(e),P.effects.unshift(i,c,1+r)}),P.effects.define("shake",function(t,e){var i=1,s=P(this),o=t.direction||"left",n=t.distance||20,r=t.times||3,a=2*r+1,h=Math.round(t.duration/a),l="up"===o||"down"===o?"top":"left",c="up"===o||"left"===o,p={},f={},u={},d=s.queue().length;for(P.effects.createPlaceholder(s),p[l]=(c?"-=":"+=")+n,f[l]=(c?"+=":"-=")+2*n,u[l]=(c?"-=":"+=")+2*n,s.animate(p,h,t.easing);i<r;i++)s.animate(f,h,t.easing).animate(u,h,t.easing);s.animate(f,h,t.easing).animate(p,h/2,t.easing).queue(e),P.effects.unshift(s,d,1+a)}),P.effects.define("slide","show",function(t,e){var i,s,o=P(this),n={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=t.mode,a=t.direction||"left",h="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a,c=t.distance||o["top"==h?"outerHeight":"outerWidth"](!0),p={};P.effects.createPlaceholder(o),i=o.cssClip(),s=o.position()[h],p[h]=(l?-1:1)*c+s,p.clip=o.cssClip(),p.clip[n[a][1]]=p.clip[n[a][0]],"show"===r&&(o.cssClip(p.clip),o.css(h,p[h]),p.clip=i,p[h]=s),o.animate(p,{queue:!1,duration:t.duration,easing:t.easing,complete:e})});!1!==P.uiBackCompat&&P.effects.define("transfer",function(t,e){P(this).transfer(t,e)})}); })(this);
+(function (window, undefined) { !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){var e,i,s,o,n,r,a,h,l,c,p,f;t.ui=t.ui||{},t.ui.version="1.12.1",e=0,i=Array.prototype.slice,t.cleanData=(c=t.cleanData,function(e){var i,s,o;for(o=0;null!=(s=e[o]);o++)try{(i=t._data(s,"events"))&&i.remove&&t(s).triggerHandler("remove")}catch(t){}c(e)}),t.widget=function(e,i,s){var o,n,r,a,h={},l=e.split(".")[0];return e=e.split(".")[1],a=l+"-"+e,s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][a.toLowerCase()]=function(e){return!!t.data(e,a)},t[l]=t[l]||{},o=t[l][e],n=t[l][e]=function(t,e){if(!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},t.extend(n,o,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(s,(function(e,s){t.isFunction(s)?h[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,n=this._superApply;return this._super=t,this._superApply=o,e=s.apply(this,arguments),this._super=i,this._superApply=n,e}}():h[e]=s})),n.prototype=t.widget.extend(r,{widgetEventPrefix:o&&r.widgetEventPrefix||e},h,{constructor:n,namespace:l,widgetName:e,widgetFullName:a}),o?(t.each(o._childConstructors,(function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,n,i._proto)})),delete o._childConstructors):i._childConstructors.push(n),t.widget.bridge(e,n),n},t.widget.extend=function(e){for(var s,o,n=i.call(arguments,1),r=0,a=n.length;r<a;r++)for(s in n[r])o=n[r][s],n[r].hasOwnProperty(s)&&void 0!==o&&(t.isPlainObject(o)?e[s]=t.isPlainObject(e[s])?t.widget.extend({},e[s],o):t.widget.extend({},o):e[s]=o);return e},t.widget.bridge=function(e,s){var o=s.prototype.widgetFullName||e;t.fn[e]=function(n){var r="string"==typeof n,a=i.call(arguments,1),h=this;return r?this.length||"instance"!==n?this.each((function(){var i,s=t.data(this,o);return"instance"===n?(h=s,!1):s?t.isFunction(s[n])&&"_"!==n.charAt(0)?(i=s[n].apply(s,a))!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")})):h=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each((function(){var e=t.data(this,o);e?(e.option(n||{}),e._init&&e._init()):t.data(this,o,new s(n,this))}))),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,o,n,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},s=e.split("."),e=s.shift(),s.length){for(o=r[e]=t.widget.extend({},this.options[e]),n=0;n<s.length-1;n++)o[s[n]]=o[s[n]]||{},o=o[s[n]];if(e=s.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,o;for(i in e)o=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&o&&o.length&&(s=t(o.get()),this._removeClass(o,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,n){var r,a;for(a=0;a<i.length;a++)r=o.classesElementLookup[i[a]]||t(),r=e.add?t(t.unique(r.get().concat(e.element.get()))):t(r.not(e.element).get()),o.classesElementLookup[i[a]]=r,s.push(i[a]),n&&e.classes[i[a]]&&s.push(e.classes[i[a]])}var s=[],o=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,(function(s,o){-1!==t.inArray(e.target,o)&&(i.classesElementLookup[s]=t(o.not(e.target).get()))}))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof t||null===t,n={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:s};return n.element.toggleClass(this._classes(n),s),this},_on:function(e,i,s){var o,n=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=o=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,o=this.widget()),t.each(s,(function(s,r){function a(){if(e||!0!==n.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?n[r]:r).apply(n,arguments)}var h,l,c;"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||t.guid++),l=(h=s.match(/^([\w:-]*)\s*(.*)$/))[1]+n.eventNamespace,(c=h[2])?o.on(l,c,a):i.on(l,a)}))},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout((function(){return("string"==typeof t?i[t]:t).apply(i,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var o,n,r=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(o in n)o in i||(i[o]=n[o]);return this.element.trigger(i,s),!(t.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,i){t.Widget.prototype["_"+e]=function(s,o,n){var r,a;"string"==typeof o&&(o={effect:o}),a=o?!0===o||"number"==typeof o?i:o.effect||i:e,"number"==typeof(o=o||{})&&(o={duration:o}),r=!t.isEmptyObject(o),o.complete=n,o.delay&&s.delay(o.delay),r&&t.effects&&t.effects.effect[a]?s[e](o):a!==e&&s[a]?s[a](o.duration,o.easing,n):s.queue((function(i){t(this)[e](),n&&n.call(s[0]),i()}))}})),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var o,n=Math.max,r=Math.abs,a=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),n=s.children()[0];return t("body").append(s),e=n.offsetWidth,s.css("overflow","scroll"),e===(i=n.offsetWidth)&&(i=s[0].clientWidth),s.remove(),o=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:o,offset:!s&&!o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(o){if(!o||!o.of)return f.apply(this,arguments);o=t.extend({},o);var p,u,d,g,m,v,_=t(o.of),b=t.position.getWithinInfo(o.within),w=t.position.getScrollInfo(b),y=(o.collision||"flip").split(" "),P={};return v=s(_),_[0].preventDefault&&(o.at="left top"),u=v.width,d=v.height,g=v.offset,m=t.extend({},g),t.each(["my","at"],(function(){var t,e,i=(o[this]||"").split(" ");1===i.length&&(i=a.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=a.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),P[this]=[t?t[0]:0,e?e[0]:0],o[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]})),1===y.length&&(y[1]=y[0]),"right"===o.at[0]?m.left+=u:"center"===o.at[0]&&(m.left+=u/2),"bottom"===o.at[1]?m.top+=d:"center"===o.at[1]&&(m.top+=d/2),p=e(P.at,u,d),m.left+=p[0],m.top+=p[1],this.each((function(){var s,a,h=t(this),l=h.outerWidth(),c=h.outerHeight(),f=i(this,"marginLeft"),v=i(this,"marginTop"),x=l+f+i(this,"marginRight")+w.width,C=c+v+i(this,"marginBottom")+w.height,z=t.extend({},m),H=e(P.my,h.outerWidth(),h.outerHeight());"right"===o.my[0]?z.left-=l:"center"===o.my[0]&&(z.left-=l/2),"bottom"===o.my[1]?z.top-=c:"center"===o.my[1]&&(z.top-=c/2),z.left+=H[0],z.top+=H[1],s={marginLeft:f,marginTop:v},t.each(["left","top"],(function(e,i){t.ui.position[y[e]]&&t.ui.position[y[e]][i](z,{targetWidth:u,targetHeight:d,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[p[0]+H[0],p[1]+H[1]],my:o.my,at:o.at,within:b,elem:h})})),o.using&&(a=function(t){var e=g.left-z.left,i=e+u-l,s=g.top-z.top,a=s+d-c,p={target:{element:_,left:g.left,top:g.top,width:u,height:d},element:{element:h,left:z.left,top:z.top,width:l,height:c},horizontal:i<0?"left":e>0?"right":"center",vertical:a<0?"top":s>0?"bottom":"middle"};u<l&&r(e+i)<u&&(p.horizontal="center"),d<c&&r(s+a)<d&&(p.vertical="middle"),n(r(e),r(i))>n(r(s),r(a))?p.important="horizontal":p.important="vertical",o.using.call(this,t,p)}),h.offset(t.extend(z,{using:a}))}))},t.ui.position={fit:{left:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollLeft:s.offset.left,r=s.width,a=t.left-e.collisionPosition.marginLeft,h=o-a,l=a+e.collisionWidth-r-o;e.collisionWidth>r?h>0&&l<=0?(i=t.left+h+e.collisionWidth-r-o,t.left+=h-i):t.left=l>0&&h<=0?o:h>l?o+r-e.collisionWidth:o:h>0?t.left+=h:l>0?t.left-=l:t.left=n(t.left-a,t.left)},top:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollTop:s.offset.top,r=e.within.height,a=t.top-e.collisionPosition.marginTop,h=o-a,l=a+e.collisionHeight-r-o;e.collisionHeight>r?h>0&&l<=0?(i=t.top+h+e.collisionHeight-r-o,t.top+=h-i):t.top=l>0&&h<=0?o:h>l?o+r-e.collisionHeight:o:h>0?t.top+=h:l>0?t.top-=l:t.top=n(t.top-a,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,n=o.offset.left+o.scrollLeft,a=o.width,h=o.isWindow?o.scrollLeft:o.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,p=l+e.collisionWidth-a-h,f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,u="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,d=-2*e.offset[0];c<0?((i=t.left+f+u+d+e.collisionWidth-a-n)<0||i<r(c))&&(t.left+=f+u+d):p>0&&((s=t.left-e.collisionPosition.marginLeft+f+u+d-h)>0||r(s)<p)&&(t.left+=f+u+d)},top:function(t,e){var i,s,o=e.within,n=o.offset.top+o.scrollTop,a=o.height,h=o.isWindow?o.scrollTop:o.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,p=l+e.collisionHeight-a-h,f="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,u="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,d=-2*e.offset[1];c<0?((s=t.top+f+u+d+e.collisionHeight-a-n)<0||s<r(c))&&(t.top+=f+u+d):p>0&&((i=t.top-e.collisionPosition.marginTop+f+u+d-h)>0||r(i)<p)&&(t.top+=f+u+d)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:(p="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(p+".ui-disableSelection",(function(t){t.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout((function(){var i=e.data("ui-form-reset-instances");t.each(i,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,n=this.parents().filter((function(){var e=t(this);return(!s||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==i&&n.length?n:t(this[0].ownerDocument||document)},t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),s=!1,t(document).on("mouseup",(function(){s=!1})),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).on("click."+this.widgetName,(function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,o=1===e.which,n=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(o&&!n&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var o,n=t.ui[e].prototype;for(o in s)n.plugins[o]=n.plugins[o]||[],n.plugins[o].push([i,s[o]])},call:function(t,e,i,s){var o,n=t.plugins[e];if(n&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<n.length;o++)t.options[n[o][0]]&&n[o][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),o=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,o=this.options,n=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(s=(i=t(o.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=o.containment:this.containment=[0,0,t(n).width()-this.helperProportions.width-this.margins.left,(t(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,o,n,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1]:o,n=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=i?n-this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]:n),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var o=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))}))},stop:function(e,i,s){var o=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,(function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))}))},drag:function(e,i,s){t.each(s.sortables,(function(){var o=!1,n=this;n.positionAbs=s.positionAbs,n.helperProportions=s.helperProportions,n.offset.click=s.offset.click,n._intersectsWith(n.containerCache)&&(o=!0,t.each(s.sortables,(function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==n&&this._intersectsWith(this.containerCache)&&t.contains(n.element[0],this.element[0])&&(o=!1),o}))),o?(n.isOver||(n.isOver=1,s._parent=i.helper.parent(),n.currentItem=i.helper.appendTo(n.element).data("ui-sortable-item",!0),n.options._helper=n.options.helper,n.options.helper=function(){return i.helper[0]},e.target=n.currentItem[0],n._mouseCapture(e,!0),n._mouseStart(e,!0,!0),n.offset.click.top=s.offset.click.top,n.offset.click.left=s.offset.click.left,n.offset.parent.left-=s.offset.parent.left-n.offset.parent.left,n.offset.parent.top-=s.offset.parent.top-n.offset.parent.top,s._trigger("toSortable",e),s.dropped=n.element,t.each(s.sortables,(function(){this.refreshPositions()})),s.currentItem=s.element,n.fromOutside=s),n.currentItem&&(n._mouseDrag(e),i.position=n.position)):n.isOver&&(n.isOver=0,n.cancelHelperRemoval=!0,n.options._revert=n.options.revert,n.options.revert=!1,n._trigger("out",e,n._uiHash(n)),n._mouseStop(e,!0),n.options.revert=n.options._revert,n.options.helper=n.options._helper,n.placeholder&&n.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var o=t("body"),n=s.options;o.css("cursor")&&(n._cursor=o.css("cursor")),o.css("cursor",n.cursor)},stop:function(e,i,s){var o=s.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var o=t(i.helper),n=s.options;o.css("opacity")&&(n._opacity=o.css("opacity")),o.css("opacity",n.opacity)},stop:function(e,i,s){var o=s.options;o._opacity&&t(i.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var o=s.options,n=!1,r=s.scrollParentNotHidden[0],a=s.document[0];r!==a&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(s.overflowOffset.top+r.offsetHeight-e.pageY<o.scrollSensitivity?r.scrollTop=n=r.scrollTop+o.scrollSpeed:e.pageY-s.overflowOffset.top<o.scrollSensitivity&&(r.scrollTop=n=r.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(s.overflowOffset.left+r.offsetWidth-e.pageX<o.scrollSensitivity?r.scrollLeft=n=r.scrollLeft+o.scrollSpeed:e.pageX-s.overflowOffset.left<o.scrollSensitivity&&(r.scrollLeft=n=r.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(a).scrollTop()<o.scrollSensitivity?n=t(a).scrollTop(t(a).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<o.scrollSensitivity&&(n=t(a).scrollTop(t(a).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(a).scrollLeft()<o.scrollSensitivity?n=t(a).scrollLeft(t(a).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<o.scrollSensitivity&&(n=t(a).scrollLeft(t(a).scrollLeft()+o.scrollSpeed)))),!1!==n&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var o=s.options;s.snapElements=[],t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each((function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})}))},drag:function(e,i,s){var o,n,r,a,h,l,c,p,f,u,d=s.options,g=d.snapTolerance,m=i.offset.left,v=m+s.helperProportions.width,_=i.offset.top,b=_+s.helperProportions.height;for(f=s.snapElements.length-1;f>=0;f--)l=(h=s.snapElements[f].left-s.margins.left)+s.snapElements[f].width,p=(c=s.snapElements[f].top-s.margins.top)+s.snapElements[f].height,v<h-g||m>l+g||b<c-g||_>p+g||!t.contains(s.snapElements[f].item.ownerDocument,s.snapElements[f].item)?(s.snapElements[f].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[f].item})),s.snapElements[f].snapping=!1):("inner"!==d.snapMode&&(o=Math.abs(c-b)<=g,n=Math.abs(p-_)<=g,r=Math.abs(h-v)<=g,a=Math.abs(l-m)<=g,o&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),n&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),u=o||n||r||a,"outer"!==d.snapMode&&(o=Math.abs(c-_)<=g,n=Math.abs(p-b)<=g,r=Math.abs(h-m)<=g,a=Math.abs(l-v)<=g,o&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),n&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[f].snapping&&(o||n||r||a||u)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[f].item})),s.snapElements[f].snapping=o||n||r||a||u)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var o,n=s.options,r=t.makeArray(t(n.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));r.length&&(o=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each((function(e){t(this).css("zIndex",o+e)})),this.css("zIndex",o+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var o=t(i.helper),n=s.options;o.css("zIndex")&&(n._zIndex=o.css("zIndex")),o.css("zIndex",n.zIndex)},stop:function(e,i,s){var o=s.options;o._zIndex&&t(i.helper).css("zIndex",o._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&o(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return n=!0,!1})),!n&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),o=t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,s,o){if(!i.offset)return!1;var n=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,a=n+e.helperProportions.width,h=r+e.helperProportions.height,l=i.offset.left,c=i.offset.top,p=l+i.proportions().width,f=c+i.proportions().height;switch(s){case"fit":return l<=n&&a<=p&&c<=r&&h<=f;case"intersect":return l<n+e.helperProportions.width/2&&a-e.helperProportions.width/2<p&&c<r+e.helperProportions.height/2&&h-e.helperProportions.height/2<f;case"pointer":return t(o.pageY,c,i.proportions().height)&&t(o.pageX,l,i.proportions().width);case"touch":return(r>=c&&r<=f||h>=c&&h<=f||r<c&&h>f)&&(n>=l&&n<=p||a>=l&&a<=p||n<l&&a>p);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var s,o,n=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;s<n.length;s++)if(!(n[s].options.disabled||e&&!n[s].accept.call(n[s].element[0],e.currentItem||e.element))){for(o=0;o<a.length;o++)if(a[o]===n[s].element[0]){n[s].proportions().height=0;continue t}n[s].visible="none"!==n[s].element.css("display"),n[s].visible&&("mousedown"===r&&n[s]._activate.call(n[s],i),n[s].offset=n[s].element.offset(),n[s].proportions({width:n[s].element[0].offsetWidth,height:n[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&o(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}))},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,r,a=o(e,this,this.options.tolerance,i),h=!a&&this.isover?"isout":a&&!this.isover?"isover":null;h&&(this.options.greedy&&(n=this.options.scope,(r=this.element.parents(":data(ui-droppable)").filter((function(){return t(this).droppable("instance").options.scope===n}))).length&&((s=t(r[0]).droppable("instance")).greedyChild="isover"===h)),s&&"isover"===h&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,i),s&&"isout"===h&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}}))},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s,o=i&&"left"===i?"scrollLeft":"scrollTop";return e[o]>0||(e[o]=1,s=e[o]>0,e[o]=0,s)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",(function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())})).on("mouseleave",(function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,s,o,n,r=this.options,a=this;if(this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;i<s.length;i++)o="ui-resizable-"+(e=t.trim(s[i])),n=t("<div>"),this._addClass(n,"ui-resizable-handle "+o),n.css({zIndex:r.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(n);this._renderAxis=function(e){var i,s,o,n;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),n=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(o,n),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")})),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,o=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(e){var i,s,o,n=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),n.containment&&(i+=t(n.containment).scrollLeft()||0,s+=t(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,o=this.originalMousePosition,n=this.axis,r=e.pageX-o.left||0,a=e.pageY-o.top||0,h=this._change[n];return this._updatePrevProperties(),!!h&&(i=h.apply(this,[e,r,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,o,n,r,a,h,l=this.options,c=this;return this._helper&&(o=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,n=s?0:c.sizeDiff.width,r={width:c.helper.width()-n,height:c.helper.height()-o},a=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(r,{top:h,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,o,n,r=this.options;n={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,s=n.minWidth/this.aspectRatio,i=n.maxHeight*this.aspectRatio,o=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),s>n.minHeight&&(n.minHeight=s),i<n.maxWidth&&(n.maxWidth=i),o<n.maxHeight&&(n.maxHeight=o)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),n&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),o&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,o=i._proportionallyResizeElements,n=o.length&&/textarea/i.test(o[0].nodeName),r=n&&i._hasScroll(o[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,h={width:i.size.width-a,height:i.size.height-r},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};o&&o.length&&t(o[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,o,n,r,a,h=t(this).resizable("instance"),l=h.options,c=h.element,p=l.containment,f=p instanceof t?p.get(0):/parent/.test(p)?c.parent().get(0):p;f&&(h.containerElement=t(f),/document/.test(p)||p===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(f),i=[],t(["Top","Right","Left","Bottom"]).each((function(t,s){i[t]=h._num(e.css("padding"+s))})),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,o=h.containerSize.height,n=h.containerSize.width,r=h._hasScroll(f,"left")?f.scrollWidth:n,a=h._hasScroll(f)?f.scrollHeight:o,h.parentData={element:f,left:s.left,top:s.top,width:r,height:a}))},resize:function(e){var i,s,o,n,r=t(this).resizable("instance"),a=r.options,h=r.containerOffset,l=r.position,c=r._aspectRatio||e.shiftKey,p={top:0,left:0},f=r.containerElement,u=!0;f[0]!==document&&/static/.test(f.css("position"))&&(p=h),l.left<(r._helper?h.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-h.left:r.position.left-p.left),c&&(r.size.height=r.size.width/r.aspectRatio,u=!1),r.position.left=a.helper?h.left:0),l.top<(r._helper?h.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-h.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,u=!1),r.position.top=r._helper?h.top:0),o=r.containerElement.get(0)===r.element.parent().get(0),n=/relative|absolute/.test(r.containerElement.css("position")),o&&n?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-p.left:r.offset.left-h.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-p.top:r.offset.top-h.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio,u=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,c&&(r.size.width=r.size.height*r.aspectRatio,u=!1)),u||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,o=e.containerPosition,n=e.containerElement,r=t(e.helper),a=r.offset(),h=r.outerWidth()-e.sizeDiff.width,l=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(n.css("position"))&&t(this).css({left:a.left-o.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(n.css("position"))&&t(this).css({left:a.left-o.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each((function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})}))},resize:function(e,i){var s=t(this).resizable("instance"),o=s.options,n=s.originalSize,r=s.originalPosition,a={height:s.size.height-n.height||0,width:s.size.width-n.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};t(o.alsoResize).each((function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),o={},n=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(n,(function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)})),e.css(o)}))},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,o=i.size,n=i.originalSize,r=i.originalPosition,a=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,p=Math.round((o.width-n.width)/l)*l,f=Math.round((o.height-n.height)/c)*c,u=n.width+p,d=n.height+f,g=s.maxWidth&&s.maxWidth<u,m=s.maxHeight&&s.maxHeight<d,v=s.minWidth&&s.minWidth>u,_=s.minHeight&&s.minHeight>d;s.grid=h,v&&(u+=l),_&&(d+=c),g&&(u-=l),m&&(d-=c),/^(se|s|e)$/.test(a)?(i.size.width=u,i.size.height=d):/^(ne)$/.test(a)?(i.size.width=u,i.size.height=d,i.position.top=r.top-f):/^(sw)$/.test(a)?(i.size.width=u,i.size.height=d,i.position.left=r.left-p):((d-c<=0||u-l<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),d-c>0?(i.size.height=d,i.position.top=r.top-f):(d=c-e.height,i.size.height=d,i.position.top=r.top+n.height-d),u-l>0?(i.size.width=u,i.position.left=r.left-p):(u=l-e.width,i.size.width=u,i.position.left=r.left+n.width-u))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each((function(){var i=t(this),s=i.offset(),o={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:o.left,top:o.top,right:o.left+i.outerWidth(),bottom:o.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})}))},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))})),t(e.target).parents().addBack().each((function(){var s,o=t.data(this,"selectable-item");if(o)return s=!e.metaKey&&!e.ctrlKey||!o.$element.hasClass("ui-selected"),i._removeClass(o.$element,s?"ui-unselecting":"ui-selected")._addClass(o.$element,s?"ui-selecting":"ui-unselecting"),o.unselecting=!s,o.selecting=s,o.selected=s,s?i._trigger("selecting",e,{selecting:o.element}):i._trigger("unselecting",e,{unselecting:o.element}),!1})))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,o=this.options,n=this.opos[0],r=this.opos[1],a=e.pageX,h=e.pageY;return n>a&&(i=a,a=n,n=i),r>h&&(i=h,h=r,r=i),this.helper.css({left:n,top:r,width:a-n,height:h-r}),this.selectees.each((function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===o.tolerance?l=!(c.left>a||c.right<n||c.top>h||c.bottom<r):"fit"===o.tolerance&&(l=c.left>n&&c.right<a&&c.top>r&&c.bottom<h),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))})),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each((function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})})),t(".ui-selecting",this.element[0]).each((function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})})),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,(function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,o=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each((function(){if(t.data(this,n.widgetName+"-item")===n)return s=t(this),!1})),t.data(e.target,n.widgetName+"-item")===n&&(s=t(e.target)),!!s&&(!(this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each((function(){this===e.target&&(o=!0)})),!o))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,s){var o,n,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",r.cursor),this.storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(n)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,o,n,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),e.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(o=(s=this.items[i]).item[0],(n=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,o=this.placeholder.offset(),n=this.options.axis,r={};n&&"x"!==n||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){s._clear(e)}))}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each((function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))})),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each((function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")})),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,n=t.left,r=n+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||s+l>a&&s+l<h,f="y"===this.options.axis||e+c>n&&e+c<r,u=p&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:n<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var s,o,n,r,a=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=(n=t(l[s],this.document[0])).length-1;o>=0;o--)(r=t.data(n[o],this.widgetFullName))&&r!==this&&!r.options.disabled&&h.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0}))},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,o,n,r,a,h,l,c=this.items,p=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(i=f.length-1;i>=0;i--)for(s=(o=t(f[i],this.document[0])).length-1;s>=0;s--)(n=t.data(o[s],this.widgetFullName))&&n!==this&&!n.options.disabled&&(p.push([t.isFunction(n.options.items)?n.options.items.call(n.element[0],e,{item:this.currentItem}):t(n.options.items,n.element),n]),this.containers.push(n));for(i=p.length-1;i>=0;i--)for(r=p[i][1],s=0,l=(a=p[i][0]).length;s<l;s++)(h=t(a[s])).data(this.widgetName+"-item",r),c.push({item:h,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,s,o,n;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(s=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=o.outerWidth(),s.height=o.outerHeight()),n=o.offset(),s.left=n.left,s.top=n.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)n=this.containers[i].element.offset(),this.containers[i].containerCache.left=n.left,this.containers[i].containerCache.top=n.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,s=(e=e||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+s+">",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===s?e._createTrPlaceholder(e.currentItem,o):"img"===s&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){i&&!s.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each((function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){var i,s,o,n,r,a,h,l,c,p,f=null,u=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(f&&t.contains(this.containers[i].element[0],f.element[0]))continue;f=this.containers[i],u=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(o=1e4,n=null,r=(c=f.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",p=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[u].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[r],l=!1,e[p]-h>this.items[s][a]/2&&(l=!0),Math.abs(e[p]-h)<o&&(o=Math.abs(e[p]-h),n=this.items[s],this.direction=l?"up":"down"));if(!n&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[u])return void(this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));n?this._rearrange(e,n,null,!0):this._rearrange(e,null,this.containers[u].element,!0),this._trigger("change",e,this._uiHash()),this.containers[u]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),s[0].style.width&&!i.forceHelperSize||s.width(this.currentItem.width()),s[0].style.height&&!i.forceHelperSize||s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],i=t(o.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?0:o.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?0:o.scrollLeft())*s}},_generatePosition:function(e){var i,s,o=this.options,n=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(n=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(n=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,s=this.originalPageX+Math.round((n-this.originalPageX)/o.grid[0])*o.grid[0],n=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-o.grid[0]:s+o.grid[0]:s)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:a.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:a.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!s)}))},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)"auto"!==this._storedCSS[s]&&"static"!==this._storedCSS[s]||(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&o.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(o.push((function(t){this._trigger("remove",t,this._uiHash())})),o.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||o.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(o.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;s<o.length;s++)o[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),n="ui-effects-",r="ui-effects-style",a="ui-effects-animated",h=t,t.effects={effect:{}},function(t,e){function i(t,e,i){var s=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:s.max<t?s.max:t)}function s(e){var i=h(),s=i._rgba=[];return e=e.toLowerCase(),u(a,(function(t,o){var n,r=o.re.exec(e),a=r&&o.parse(r),h=o.space||"rgba";if(a)return n=i[h](a),i[l[h].cache]=n[l[h].cache],s=i._rgba=n._rgba,!1})),s.length?("0,0,0,0"===s.join()&&t.extend(s,n.transparent),i):n[e]}function o(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var n,r=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,o){return new t.Color.fn.parse(e,i,s,o)},l={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},p=h.support={},f=t("<p>")[0],u=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",p.rgba=f.style.backgroundColor.indexOf("rgba")>-1,u(l,(function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}})),h.fn=t.extend(h.prototype,{parse:function(o,r,a,c){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(r),r=e);var p=this,f=t.type(o),d=this._rgba=[];return r!==e&&(o=[o,r,a,c],f="array"),"string"===f?this.parse(s(o)||n._default):"array"===f?(u(l.rgba.props,(function(t,e){d[e.idx]=i(o[e.idx],e)})),this):"object"===f?(u(l,o instanceof h?function(t,e){o[e.cache]&&(p[e.cache]=o[e.cache].slice())}:function(e,s){var n=s.cache;u(s.props,(function(t,e){if(!p[n]&&s.to){if("alpha"===t||null==o[t])return;p[n]=s.to(p._rgba)}p[n][e.idx]=i(o[t],e,!0)})),p[n]&&t.inArray(null,p[n].slice(0,3))<0&&(p[n][3]=1,s.from&&(p._rgba=s.from(p[n])))}),this):void 0},is:function(t){var e=h(t),i=!0,s=this;return u(l,(function(t,o){var n,r=e[o.cache];return r&&(n=s[o.cache]||o.to&&o.to(s._rgba)||[],u(o.props,(function(t,e){if(null!=r[e.idx])return i=r[e.idx]===n[e.idx]}))),i})),i},_space:function(){var t=[],e=this;return u(l,(function(i,s){e[s.cache]&&t.push(i)})),t.pop()},transition:function(t,e){var s=h(t),o=s._space(),n=l[o],r=0===this.alpha()?h("transparent"):this,a=r[n.cache]||n.to(r._rgba),p=a.slice();return s=s[n.cache],u(n.props,(function(t,o){var n=o.idx,r=a[n],h=s[n],l=c[o.type]||{};null!==h&&(null===r?p[n]=h:(l.mod&&(h-r>l.mod/2?r+=l.mod:r-h>l.mod/2&&(r-=l.mod)),p[n]=i((h-r)*e+r,o)))})),this[o](p)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),o=h(e)._rgba;return h(t.map(i,(function(t,e){return(1-s)*o[e]+s*t})))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,(function(t,e){return null==t?e>2?1:0:t}));return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),(function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t}));return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,(function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,l.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,o=t[1]/255,n=t[2]/255,r=t[3],a=Math.max(s,o,n),h=Math.min(s,o,n),l=a-h,c=a+h,p=.5*c;return e=h===a?0:s===a?60*(o-n)/l+360:o===a?60*(n-s)/l+120:60*(s-o)/l+240,i=0===l?0:p<=.5?l/c:l/(2-c),[Math.round(e)%360,i,p,null==r?1:r]},l.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],r=s<=.5?s*(1+i):s+i-s*i,a=2*s-r;return[Math.round(255*o(a,r,e+1/3)),Math.round(255*o(a,r,e)),Math.round(255*o(a,r,e-1/3)),n]},u(l,(function(s,o){var n=o.props,a=o.cache,l=o.to,c=o.from;h.fn[s]=function(s){if(l&&!this[a]&&(this[a]=l(this._rgba)),s===e)return this[a].slice();var o,r=t.type(s),p="array"===r||"object"===r?s:arguments,f=this[a].slice();return u(n,(function(t,e){var s=p["object"===r?t:e.idx];null==s&&(s=f[e.idx]),f[e.idx]=i(s,e)})),c?((o=h(c(f)))[a]=f,o):h(f)},u(n,(function(e,i){h.fn[e]||(h.fn[e]=function(o){var n,a=t.type(o),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(o=o.call(this,c),a=t.type(o)),null==o&&i.empty?this:("string"===a&&(n=r.exec(o))&&(o=c+parseFloat(n[2])*("+"===n[1]?1:-1)),l[i.idx]=o,this[h](l)))})}))})),h.hook=function(e){var i=e.split(" ");u(i,(function(e,i){t.cssHooks[i]={set:function(e,o){var n,r,a="";if("transparent"!==o&&("string"!==t.type(o)||(n=s(o)))){if(o=h(n||o),!p.rgba&&1!==o._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&r&&r.style;)try{a=t.css(r,"backgroundColor"),r=r.parentNode}catch(t){}o=o.blend(a&&"transparent"!==a?a:"_default")}o=o.toRgbaString()}try{e.style[i]=o}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}}))},h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return u(["Top","Right","Bottom","Left"],(function(i,s){e["border"+s+"Color"]=t})),e}},n=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(h),function(){function e(e){var i,s,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,n={};if(o&&o.length&&o[0]&&o[o[0]])for(s=o.length;s--;)"string"==typeof o[i=o[s]]&&(n[t.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(n[i]=o[i]);return n}var i=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(h.style(t.elem,i,t.end),t.setAttr=!0)}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,n,r,a){var h=t.speed(n,r,a);return this.queue((function(){var n,r=t(this),a=r.attr("class")||"",l=h.children?r.find("*").addBack():r;l=l.map((function(){return{el:t(this),start:e(this)}})),(n=function(){t.each(i,(function(t,e){o[e]&&r[e+"Class"](o[e])}))})(),l=l.map((function(){return this.end=e(this.el[0]),this.diff=function(e,i){var o,n,r={};for(o in i)n=i[o],e[o]!==n&&(s[o]||!t.fx.step[o]&&isNaN(parseFloat(n))||(r[o]=n));return r}(this.start,this.end),this})),r.attr("class",a),l=l.map((function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()})),t.when.apply(t,l.get()).done((function(){n(),t.each(arguments,(function(){var e=this.el;t.each(this.diff,(function(t){e.css(t,"")}))})),h.complete.call(r[0])}))}))},t.fn.extend({addClass:function(e){return function(i,s,o,n){return s?t.effects.animateClass.call(this,{add:i},s,o,n):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,o,n){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,o,n):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,o,n,r){return"boolean"==typeof s||void 0===s?o?t.effects.animateClass.call(this,s?{add:i}:{remove:i},o,n,r):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,o,n)}}(t.fn.toggleClass),switchClass:function(e,i,s,o,n){return t.effects.animateClass.call(this,{add:i,remove:e},s,o,n)}})}(),function(){function e(e,i,s,o){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(o=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(o=s,s=i,i={}),t.isFunction(s)&&(o=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=o||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(a)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(n+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,o=e.length;s<o;s++)null!==e[s]&&(i=t.data(n+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return e.wrap(s),(e[0]===n||t.contains(e[0],n))&&t(n).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*s,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(r,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(r)||"",t.removeData(r)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),o=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(n+"placeholder",i)),e.css({position:s,left:o.left,top:o.top}),i},removePlaceholder:function(t){var e=n+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,o){return o=o||{},t.each(i,(function(t,i){var n=e.cssUnit(i);n[0]>0&&(o[i]=n[0]*s+n[1])})),o}}),t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=p.shift(),!1===t.uiBackCompat||n?"none"===s.mode?(r[c](),i()):o.call(r[0],s,(function(){r.removeData(a),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),i()})):(r.is(":hidden")?"hide"===c:"show"===c)?(r[c](),i()):o.call(r[0],s,i)}var s=e.apply(this,arguments),o=t.effects.effect[s.effect],n=o.mode,r=s.queue,h=r||"fx",l=s.complete,c=s.mode,p=[],f=function(e){var i=t(this),s=t.effects.mode(i,c)||n;i.data(a,!0),p.push(s),n&&("show"===s||s===n&&"hide"===s)&&i.show(),n&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!o?c?this[c](s.duration,l):this.each((function(){l&&l.call(this)})):!1===r?this.each(f).each(i):this.queue(h,f).queue(h,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],(function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])})),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),o=t(e.to),n="fixed"===o.css("position"),r=t("body"),a=n?r.scrollTop():0,h=n?r.scrollLeft():0,l=o.offset(),c={top:l.top-a,left:l.left-h,height:o.innerHeight(),width:o.innerWidth()},p=s.offset(),f=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:p.top-a,left:p.left-h,height:s.innerHeight(),width:s.innerWidth(),position:n?"fixed":"absolute"}).animate(c,e.duration,e.easing,(function(){f.remove(),t.isFunction(i)&&i()}))}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),f={},t.each(["Quad","Cubic","Quart","Quint","Expo"],(function(t,e){f[e]=function(e){return Math.pow(e,t+2)}})),t.extend(f,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(f,(function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}})),l=t.effects,t.effects.define("blind","hide",(function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=t(this),n=e.direction||"up",r=o.cssClip(),a={clip:t.extend({},r)},h=t.effects.createPlaceholder(o);a.clip[s[n][0]]=a.clip[s[n][1]],"show"===e.mode&&(o.cssClip(a.clip),h&&h.css(t.effects.clipToBox(a)),a.clip=r),h&&h.animate(t.effects.clipToBox(a),e.duration,e.easing),o.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("bounce",(function(e,i){var s,o,n,r=t(this),a=e.mode,h="hide"===a,l="show"===a,c=e.direction||"up",p=e.distance,f=e.times||5,u=2*f+(l||h?1:0),d=e.duration/u,g=e.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,_=0,b=r.queue().length;for(t.effects.createPlaceholder(r),n=r.css(m),p||(p=r["top"===m?"outerHeight":"outerWidth"]()/3),l&&((o={opacity:1})[m]=n,r.css("opacity",0).css(m,v?2*-p:2*p).animate(o,d,g)),h&&(p/=Math.pow(2,f-1)),(o={})[m]=n;_<f;_++)(s={})[m]=(v?"-=":"+=")+p,r.animate(s,d,g).animate(o,d,g),p=h?2*p:p/2;h&&((s={opacity:0})[m]=(v?"-=":"+=")+p,r.animate(s,d,g)),r.queue(i),t.effects.unshift(r,b,u+1)})),t.effects.define("drop","hide",(function(e,i){var s,o=t(this),n="show"===e.mode,r=e.direction||"left",a="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",l="+="===h?"-=":"+=",c={opacity:0};t.effects.createPlaceholder(o),s=e.distance||o["top"===a?"outerHeight":"outerWidth"](!0)/2,c[a]=h+s,n&&(o.css(c),c[a]=l+s,c.opacity=1),o.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fade","toggle",(function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fold","hide",(function(e,i){var s=t(this),o=e.mode,n="show"===o,r="hide"===o,a=e.size||15,h=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,p=t.effects.createPlaceholder(s),f=s.cssClip(),u={clip:t.extend({},f)},d={clip:t.extend({},f)},g=[f[l[0]],f[l[1]]],m=s.queue().length;h&&(a=parseInt(h[1],10)/100*g[r?0:1]),u.clip[l[0]]=a,d.clip[l[0]]=a,d.clip[l[1]]=0,n&&(s.cssClip(d.clip),p&&p.css(t.effects.clipToBox(d)),d.clip=f),s.queue((function(i){p&&p.animate(t.effects.clipToBox(u),c,e.easing).animate(t.effects.clipToBox(d),c,e.easing),i()})).animate(u,c,e.easing).animate(d,c,e.easing).queue(i),t.effects.unshift(s,m,4)})),t.effects.define("highlight","show",(function(e,i){var s=t(this),o={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("size",(function(e,i){var s,o,n,r=t(this),a=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,p="effect"!==c,f=e.scale||"both",u=e.origin||["middle","center"],d=r.css("position"),g=r.position(),m=t.effects.scaledDimensions(r),v=e.from||m,_=e.to||t.effects.scaledDimensions(r,0);t.effects.createPlaceholder(r),"show"===c&&(n=v,v=_,_=n),o={from:{y:v.height/m.height,x:v.width/m.width},to:{y:_.height/m.height,x:_.width/m.width}},"box"!==f&&"both"!==f||(o.from.y!==o.to.y&&(v=t.effects.setTransition(r,h,o.from.y,v),_=t.effects.setTransition(r,h,o.to.y,_)),o.from.x!==o.to.x&&(v=t.effects.setTransition(r,l,o.from.x,v),_=t.effects.setTransition(r,l,o.to.x,_))),"content"!==f&&"both"!==f||o.from.y!==o.to.y&&(v=t.effects.setTransition(r,a,o.from.y,v),_=t.effects.setTransition(r,a,o.to.y,_)),u&&(s=t.effects.getBaseline(u,m),v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left,_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left),r.css(v),"content"!==f&&"both"!==f||(h=h.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),r.find("*[width]").each((function(){var i=t(this),s=t.effects.scaledDimensions(i),n={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},r={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x};o.from.y!==o.to.y&&(n=t.effects.setTransition(i,h,o.from.y,n),r=t.effects.setTransition(i,h,o.to.y,r)),o.from.x!==o.to.x&&(n=t.effects.setTransition(i,l,o.from.x,n),r=t.effects.setTransition(i,l,o.to.x,r)),p&&t.effects.saveStyle(i),i.css(n),i.animate(r,e.duration,e.easing,(function(){p&&t.effects.restoreStyle(i)}))}))),r.animate(_,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=r.offset();0===_.opacity&&r.css("opacity",v.opacity),p||(r.css("position","static"===d?"relative":d).offset(e),t.effects.saveStyle(r)),i()}})})),t.effects.define("scale",(function(e,i){var s=t(this),o=e.mode,n=parseInt(e.percent,10)||(0===parseInt(e.percent,10)||"effect"!==o?0:100),r=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,n,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(r.from.opacity=1,r.to.opacity=0),t.effects.effect.size.call(this,r,i)})),t.effects.define("puff","hide",(function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)})),t.effects.define("pulsate","show",(function(e,i){var s=t(this),o=e.mode,n="show"===o,r=n||"hide"===o,a=2*(e.times||5)+(r?1:0),h=e.duration/a,l=0,c=1,p=s.queue().length;for(!n&&s.is(":visible")||(s.css("opacity",0).show(),l=1);c<a;c++)s.animate({opacity:l},h,e.easing),l=1-l;s.animate({opacity:l},h,e.easing),s.queue(i),t.effects.unshift(s,p,a+1)})),t.effects.define("shake",(function(e,i){var s=1,o=t(this),n=e.direction||"left",r=e.distance||20,a=e.times||3,h=2*a+1,l=Math.round(e.duration/h),c="up"===n||"down"===n?"top":"left",p="up"===n||"left"===n,f={},u={},d={},g=o.queue().length;for(t.effects.createPlaceholder(o),f[c]=(p?"-=":"+=")+r,u[c]=(p?"+=":"-=")+2*r,d[c]=(p?"-=":"+=")+2*r,o.animate(f,l,e.easing);s<a;s++)o.animate(u,l,e.easing).animate(d,l,e.easing);o.animate(u,l,e.easing).animate(f,l/2,e.easing).queue(i),t.effects.unshift(o,g,h+1)})),t.effects.define("slide","show",(function(e,i){var s,o,n=t(this),r={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,p=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),f={};t.effects.createPlaceholder(n),s=n.cssClip(),o=n.position()[l],f[l]=(c?-1:1)*p+o,f.clip=n.cssClip(),f.clip[r[h][1]]=f.clip[r[h][0]],"show"===a&&(n.cssClip(f.clip),n.css(l,f[l]),f.clip=s,f[l]=o),n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),!1!==t.uiBackCompat&&(l=t.effects.define("transfer",(function(e,i){t(this).transfer(e,i)})))})); })(this);
// 3rdParty/jquery-ui/touchPunch.js
-(function (window, undefined) { !function(t){var o,e,u,n;function c(o,t){var e,u;1<o.originalEvent.touches.length||(o.preventDefault(),e=o.originalEvent.changedTouches[0],(u=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u))}t.support.touch="ontouchend"in document,t.support.touch&&(o=t.ui.mouse.prototype,e=o._mouseInit,u=o._mouseDestroy,o._touchStart=function(o){!n&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,c(o,"mouseover"),c(o,"mousemove"),c(o,"mousedown"))},o._touchMove=function(o){n&&(this._touchMoved=!0,c(o,"mousemove"))},o._touchEnd=function(o){n&&(c(o,"mouseup"),c(o,"mouseout"),this._touchMoved||c(o,"click"),n=!1)},o._mouseInit=function(){var o=this;o.element.bind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),e.call(o)},o._mouseDestroy=function(){var o=this;o.element.unbind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),u.call(o)})}(jQuery); })(this);
+(function (window, undefined) { !function(o){function t(o,t){if(!(o.originalEvent.touches.length>1)){o.preventDefault();var e=o.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u)}}if(o.support.touch="ontouchend"in document,o.support.touch){var e,u=o.ui.mouse.prototype,n=u._mouseInit,c=u._mouseDestroy;u._touchStart=function(o){!e&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,t(o,"mouseover"),t(o,"mousemove"),t(o,"mousedown"))},u._touchMove=function(o){e&&(this._touchMoved=!0,t(o,"mousemove"))},u._touchEnd=function(o){e&&(t(o,"mouseup"),t(o,"mouseout"),this._touchMoved||t(o,"click"),e=!1)},u._mouseInit=function(){var t=this;t.element.bind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),n.call(t)},u._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),c.call(t)}}}(jQuery); })(this);
// 3rdParty/jquery-ui/nestedSortable.js
-(function (window, undefined) { !function(f){f.widget("mjs.nestedSortable",f.extend({},f.ui.sortable.prototype,{options:{tabSize:20,disableNesting:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",doNotClear:!1,listType:"ol",maxLevels:0,protectRoot:!1,rootID:null,rtl:!1,isAllowed:function(t,e){return!0}},_create:function(){if(this.element.data("sortable",this.element.data("nestedSortable")),!this.element.is(this.options.listType))throw new Error("nestedSortable: Please check the listType option is set to your actual list type");return f.ui.sortable.prototype._create.apply(this,arguments)},destroy:function(){return this.element.removeData("nestedSortable").unbind(".nestedSortable"),f.ui.sortable.prototype.destroy.apply(this,arguments)},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);var e,s=this.options;this.options.scroll&&(e=!1,this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-f(document).scrollTop()<s.scrollSensitivity?e=f(document).scrollTop(f(document).scrollTop()-s.scrollSpeed):f(window).height()-(t.pageY-f(document).scrollTop())<s.scrollSensitivity&&(e=f(document).scrollTop(f(document).scrollTop()+s.scrollSpeed)),t.pageX-f(document).scrollLeft()<s.scrollSensitivity?e=f(document).scrollLeft(f(document).scrollLeft()-s.scrollSpeed):f(window).width()-(t.pageX-f(document).scrollLeft())<s.scrollSensitivity&&(e=f(document).scrollLeft(f(document).scrollLeft()+s.scrollSpeed))),!1!==e&&f.ui.ddmanager&&!s.dropBehaviour&&f.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute");var i=this.placeholder.offset().top;this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var o=this.items.length-1;0<=o;o--){var r=this.items[o],l=r.item[0],n=this._intersectsWithPointer(r);if(n&&!(l==this.currentItem[0]||this.placeholder[1==n?"next":"prev"]()[0]==l||f.contains(this.placeholder[0],l)||"semi-dynamic"==this.options.type&&f.contains(this.element[0],l))){if(f(l).mouseenter(),this.direction=1==n?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(r))break;f(l).mouseleave(),this._rearrange(t,r),this._clearEmpty(l),this._trigger("change",t,this._uiHash());break}}var h=this.placeholder[0].parentNode.parentNode&&f(this.placeholder[0].parentNode.parentNode).closest(".ui-sortable").length?f(this.placeholder[0].parentNode.parentNode):null,a=this._getLevel(this.placeholder),p=this._getChildLevels(this.helper),c=this.placeholder[0].previousSibling?f(this.placeholder[0].previousSibling):null;if(null!=c)for(;"li"!=c[0].nodeName.toLowerCase()||c[0]==this.currentItem[0]||c[0]==this.helper[0];){if(!c[0].previousSibling){c=null;break}c=f(c[0].previousSibling)}var d=this.placeholder[0].nextSibling?f(this.placeholder[0].nextSibling):null;if(null!=d)for(;"li"!=d[0].nodeName.toLowerCase()||d[0]==this.currentItem[0]||d[0]==this.helper[0];){if(!d[0].nextSibling){d=null;break}d=f(d[0].nextSibling)}var u=document.createElement(s.listType);return this.beyondMaxLevels=0,null!=h&&null==d&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()>h.offset().left+h.outerWidth()||!s.rtl&&this.positionAbs.left<h.offset().left)?(h.after(this.placeholder[0]),this._clearEmpty(h[0]),this._trigger("change",t,this._uiHash())):null!=c&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()<c.offset().left+c.outerWidth()-s.tabSize||!s.rtl&&this.positionAbs.left>c.offset().left+s.tabSize)?(this._isAllowed(c,a,a+p+1),c.children(s.listType).length||c[0].appendChild(u),i&&i<=c.offset().top?c.children(s.listType).prepend(this.placeholder):c.children(s.listType)[0].appendChild(this.placeholder[0]),this._trigger("change",t,this._uiHash())):this._isAllowed(h,a,a+p),this._contactContainers(t),f.ui.ddmanager&&f.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){this.beyondMaxLevels&&(this.placeholder.removeClass(this.options.errorClass),this.domPosition.prev?f(this.domPosition.prev).after(this.placeholder):f(this.domPosition.parent).prepend(this.placeholder),this._trigger("revert",t,this._uiHash()));for(var s=this.items.length-1;0<=s;s--){var i=this.items[s].item[0];this._clearEmpty(i)}f.ui.sortable.prototype._mouseStop.apply(this,arguments)},serialize:function(t){var s=f.extend({},this.options,t),e=this._getItemsAsjQuery(s&&s.connected),i=[];return f(e).each(function(){var t=(f(s.item||this).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/),e=(f(s.item||this).parent(s.listType).parent(s.items).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/);t&&i.push((s.key||t[1])+"["+(s.key&&s.expression?t[1]:t[2])+"]="+(e?s.key&&s.expression?e[1]:e[2]:s.rootID))}),!i.length&&s.key&&i.push(s.key+"="),i.join("&")},toHierarchy:function(t){var o=f.extend({},this.options,t),e=(o.startDepthCount,[]);return f(this.element).children(o.items).each(function(){var t=function e(t){var s=(f(t).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/);if(s){var i={id:s[2]};return 0<f(t).children(o.listType).children(o.items).length&&(i.children=[],f(t).children(o.listType).children(o.items).each(function(){var t=e(this);i.children.push(t)})),i}}(this);e.push(t)}),e},toArray:function(t){var h=f.extend({},this.options,t),a=h.startDepthCount||0,p=[],e=2;return p.push({item_id:h.rootID,parent_id:"none",depth:a,left:"1",right:2*(f(h.items,this.element).length+1)}),f(this.element).children(h.items).each(function(){e=function t(e,s,i){var o,r,l=i+1;0<f(e).children(h.listType).children(h.items).length&&(s++,f(e).children(h.listType).children(h.items).each(function(){l=t(f(this),s,l)}),s--);o=f(e).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/);{var n;r=s===a+1?h.rootID:(n=f(e).parent(h.listType).parent(h.items).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/),n[2])}o&&p.push({item_id:o[2],parent_id:r,depth:s,left:i,right:l});i=l+1;return i}(this,a+1,e)}),p=p.sort(function(t,e){return t.left-e.left})},_clearEmpty:function(t){var e=f(t).children(this.options.listType);!e.length||e.children().length||this.options.doNotClear||e.remove()},_getLevel:function(t){var e=1;if(this.options.listType)for(var s=t.closest(this.options.listType);s&&0<s.length&&!s.is(".ui-sortable");)e++,s=s.parent().closest(this.options.listType);return e},_getChildLevels:function(t,s){var i=this,e=this.options,o=0;return s=s||0,f(t).children(e.listType).children(e.items).each(function(t,e){o=Math.max(i._getChildLevels(e,s+1),o)}),s?o+1:o},_isAllowed:function(t,e,s){var i=this.options,o=!!f(this.domPosition.parent).hasClass("ui-sortable"),r=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels");!i.isAllowed(this.currentItem,t)||t&&t.hasClass(i.disableNesting)||i.protectRoot&&(null==t&&!o||o&&1<e)?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=r<s&&0!=r?s-r:1):r<s&&0!=r?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=s-r):(this.placeholder.removeClass(i.errorClass),this.beyondMaxLevels=0)}})),f.mjs.nestedSortable.prototype.options=f.extend({},f.ui.sortable.prototype.options,f.mjs.nestedSortable.prototype.options)}(jQuery); })(this);
+(function (window, undefined) { !function(t){t.widget("mjs.nestedSortable",t.extend({},t.ui.sortable.prototype,{options:{tabSize:20,disableNesting:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",doNotClear:!1,listType:"ol",maxLevels:0,protectRoot:!1,rootID:null,rtl:!1,isAllowed:function(t,e){return!0}},_create:function(){if(this.element.data("sortable",this.element.data("nestedSortable")),!this.element.is(this.options.listType))throw new Error("nestedSortable: Please check the listType option is set to your actual list type");return t.ui.sortable.prototype._create.apply(this,arguments)},destroy:function(){return this.element.removeData("nestedSortable").unbind(".nestedSortable"),t.ui.sortable.prototype.destroy.apply(this,arguments)},_mouseDrag:function(e){var s,i,o,l,r,n,h,a,p,c,d,u,f;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),s=this.options,this.options.scroll&&(i=!1,this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-t(document).scrollTop()<s.scrollSensitivity?i=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(i=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed)),e.pageX-t(document).scrollLeft()<s.scrollSensitivity?i=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(i=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed))),!1!==i&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),o=this.placeholder.offset().top,this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),l=this.items.length-1;l>=0;l--)if(n=(r=this.items[l]).item[0],(h=this._intersectsWithPointer(r))&&!(n==this.currentItem[0]||this.placeholder[1==h?"next":"prev"]()[0]==n||t.contains(this.placeholder[0],n)||"semi-dynamic"==this.options.type&&t.contains(this.element[0],n))){if(t(n).mouseenter(),this.direction=1==h?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(r))break;t(n).mouseleave(),this._rearrange(e,r),this._clearEmpty(n),this._trigger("change",e,this._uiHash());break}if(a=this.placeholder[0].parentNode.parentNode&&t(this.placeholder[0].parentNode.parentNode).closest(".ui-sortable").length?t(this.placeholder[0].parentNode.parentNode):null,p=this._getLevel(this.placeholder),c=this._getChildLevels(this.helper),null!=(d=this.placeholder[0].previousSibling?t(this.placeholder[0].previousSibling):null))for(;"li"!=d[0].nodeName.toLowerCase()||d[0]==this.currentItem[0]||d[0]==this.helper[0];){if(!d[0].previousSibling){d=null;break}d=t(d[0].previousSibling)}if(null!=(u=this.placeholder[0].nextSibling?t(this.placeholder[0].nextSibling):null))for(;"li"!=u[0].nodeName.toLowerCase()||u[0]==this.currentItem[0]||u[0]==this.helper[0];){if(!u[0].nextSibling){u=null;break}u=t(u[0].nextSibling)}return f=document.createElement(s.listType),this.beyondMaxLevels=0,null!=a&&null==u&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()>a.offset().left+a.outerWidth()||!s.rtl&&this.positionAbs.left<a.offset().left)?(a.after(this.placeholder[0]),this._clearEmpty(a[0]),this._trigger("change",e,this._uiHash())):null!=d&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()<d.offset().left+d.outerWidth()-s.tabSize||!s.rtl&&this.positionAbs.left>d.offset().left+s.tabSize)?(this._isAllowed(d,p,p+c+1),d.children(s.listType).length||d[0].appendChild(f),o&&o<=d.offset().top?d.children(s.listType).prepend(this.placeholder):d.children(s.listType)[0].appendChild(this.placeholder[0]),this._trigger("change",e,this._uiHash())):this._isAllowed(a,p,p+c),this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,s){var i,o;for(this.beyondMaxLevels&&(this.placeholder.removeClass(this.options.errorClass),this.domPosition.prev?t(this.domPosition.prev).after(this.placeholder):t(this.domPosition.parent).prepend(this.placeholder),this._trigger("revert",e,this._uiHash())),i=this.items.length-1;i>=0;i--)o=this.items[i].item[0],this._clearEmpty(o);t.ui.sortable.prototype._mouseStop.apply(this,arguments)},serialize:function(e){var s=t.extend({},this.options,e),i=this._getItemsAsjQuery(s&&s.connected),o=[];return t(i).each((function(){var e=(t(s.item||this).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/),i=(t(s.item||this).parent(s.listType).parent(s.items).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/);e&&o.push((s.key||e[1])+"["+(s.key&&s.expression?e[1]:e[2])+"]="+(i?s.key&&s.expression?i[1]:i[2]:s.rootID))})),!o.length&&s.key&&o.push(s.key+"="),o.join("&")},toHierarchy:function(e){function s(e){var o,l=(t(e).attr(i.attribute||"id")||"").match(i.expression||/(.+)[-=_](.+)/);if(l)return o={id:l[2]},t(e).children(i.listType).children(i.items).length>0&&(o.children=[],t(e).children(i.listType).children(i.items).each((function(){var t=s(this);o.children.push(t)}))),o}var i=t.extend({},this.options,e),o=(i.startDepthCount,[]);return t(this.element).children(i.items).each((function(){var t=s(this);o.push(t)})),o},toArray:function(e){function s(e,r,n){var h,a,p=n+1;return t(e).children(i.listType).children(i.items).length>0&&(r++,t(e).children(i.listType).children(i.items).each((function(){p=s(t(this),r,p)})),r--),h=t(e).attr(i.attribute||"id").match(i.expression||/(.+)[-=_](.+)/),a=r===o+1?i.rootID:t(e).parent(i.listType).parent(i.items).attr(i.attribute||"id").match(i.expression||/(.+)[-=_](.+)/)[2],h&&l.push({item_id:h[2],parent_id:a,depth:r,left:n,right:p}),n=p+1}var i=t.extend({},this.options,e),o=i.startDepthCount||0,l=[],r=2;return l.push({item_id:i.rootID,parent_id:"none",depth:o,left:"1",right:2*(t(i.items,this.element).length+1)}),t(this.element).children(i.items).each((function(){r=s(this,o+1,r)})),l=l.sort((function(t,e){return t.left-e.left}))},_clearEmpty:function(e){var s=t(e).children(this.options.listType);!s.length||s.children().length||this.options.doNotClear||s.remove()},_getLevel:function(t){var e,s=1;if(this.options.listType)for(e=t.closest(this.options.listType);e&&e.length>0&&!e.is(".ui-sortable");)s++,e=e.parent().closest(this.options.listType);return s},_getChildLevels:function(e,s){var i=this,o=this.options,l=0;return s=s||0,t(e).children(o.listType).children(o.items).each((function(t,e){l=Math.max(i._getChildLevels(e,s+1),l)})),s?l+1:l},_isAllowed:function(e,s,i){var o=this.options,l=!!t(this.domPosition.parent).hasClass("ui-sortable"),r=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels");!o.isAllowed(this.currentItem,e)||e&&e.hasClass(o.disableNesting)||o.protectRoot&&(null==e&&!l||l&&s>1)?(this.placeholder.addClass(o.errorClass),this.beyondMaxLevels=r<i&&0!=r?i-r:1):r<i&&0!=r?(this.placeholder.addClass(o.errorClass),this.beyondMaxLevels=i-r):(this.placeholder.removeClass(o.errorClass),this.beyondMaxLevels=0)}})),t.mjs.nestedSortable.prototype.options=t.extend({},t.ui.sortable.prototype.options,t.mjs.nestedSortable.prototype.options)}(jQuery); })(this);
// 3rdParty/polyfill/focus-visible.js
-(function (window, undefined) { function applyFocusVisiblePolyfill(t){var i=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function u(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function e(e){i=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(i=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(e){e.metaKey||e.altKey||e.ctrlKey||(s(t.activeElement)&&u(t.activeElement),i=!0)},!0),document.addEventListener("mousedown",e,!0),document.addEventListener("pointerdown",e,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("visibilitychange",function(e){"hidden"==document.visibilityState&&(n&&(i=!0),a())},!0),a(),t.addEventListener("focus",function(e){var t,n,o;s(e.target)&&(i||(t=e.target,n=t.type,"INPUT"==(o=t.tagName)&&d[n]&&!t.readOnly||("TEXTAREA"==o&&!t.readOnly||!!t.isContentEditable)))&&u(e.target)},!0),t.addEventListener("blur",function(e){var t;s(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1,window.clearTimeout(o)},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}if("undefined"!=typeof window&&"undefined"!=typeof document){var event;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{event=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(event=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(event)}"undefined"!=typeof document&&applyFocusVisiblePolyfill(document); })(this);
+(function (window, undefined) { function applyFocusVisiblePolyfill(e){function t(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function n(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function o(e){s=!1}function i(){document.addEventListener("mousemove",d),document.addEventListener("mousedown",d),document.addEventListener("mouseup",d),document.addEventListener("pointermove",d),document.addEventListener("pointerdown",d),document.addEventListener("pointerup",d),document.addEventListener("touchmove",d),document.addEventListener("touchstart",d),document.addEventListener("touchend",d)}function d(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(s=!1,document.removeEventListener("mousemove",d),document.removeEventListener("mousedown",d),document.removeEventListener("mouseup",d),document.removeEventListener("pointermove",d),document.removeEventListener("pointerdown",d),document.removeEventListener("pointerup",d),document.removeEventListener("touchmove",d),document.removeEventListener("touchstart",d),document.removeEventListener("touchend",d))}var s=!0,u=!1,a=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};document.addEventListener("keydown",(function(o){o.metaKey||o.altKey||o.ctrlKey||(t(e.activeElement)&&n(e.activeElement),s=!0)}),!0),document.addEventListener("mousedown",o,!0),document.addEventListener("pointerdown",o,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("visibilitychange",(function(e){"hidden"==document.visibilityState&&(u&&(s=!0),i())}),!0),i(),e.addEventListener("focus",(function(e){var o,i,d;t(e.target)&&(s||(o=e.target,i=o.type,"INPUT"==(d=o.tagName)&&c[i]&&!o.readOnly||"TEXTAREA"==d&&!o.readOnly||o.isContentEditable))&&n(e.target)}),!0),e.addEventListener("blur",(function(e){var n;t(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(u=!0,window.clearTimeout(a),a=window.setTimeout((function(){u=!1,window.clearTimeout(a)}),100),(n=e.target).hasAttribute("data-focus-visible-added")&&(n.classList.remove("focus-visible"),n.removeAttribute("data-focus-visible-added")))}),!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}if("undefined"!=typeof window&&"undefined"!=typeof document){var event;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{event=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(event=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(event)}"undefined"!=typeof document&&applyFocusVisiblePolyfill(document); })(this);
// WCF.Assets.js
-(function (window, undefined) { !function(){var o=!1,a=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(e){function t(){!o&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;o=!0;var n=new this;for(var r in o=!1,e)n[r]="function"==typeof e[r]&&"function"==typeof i[r]&&a.test(e[r])?function(n,r){return function(){var e=this._super;this._super=i[n];var t=r.apply(this,arguments);return this._super=e,t}}(r,e[r]):e[r];return((t.prototype=n).constructor=t).extend=arguments.callee,t}}(),function(u,r){"use strict";function s(){}function o(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;n<r;n++)t.call(e,e[n],n)}}function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==r&&null!==t&&n===e}function a(e){return t("Function",e)}function l(e){return t("Array",e)}function c(e){(e=e||s)._done||(e(),e._done=1)}function i(e){var t,n,r,i,o,a={};if("object"==typeof e)for(t in e)e[t]&&(a={name:t,url:e[t]});else a={name:(r=e.split("/"),i=r[r.length-1],-1!==(o=i.indexOf("?"))?i.substring(0,o):i),url:e};return(n=y[a.name])&&n.url===a.url?n:y[a.name]=a}function p(e){for(var t in e=e||y)if(e.hasOwnProperty(t)&&e[t].state!==k)return;return 1}function d(t){t.state===r&&(t.state=A,t.onpreload=[],n({url:t.url,type:"cache"},function(){var e;(e=t).state=x,o(e.onpreload,function(e){e.call()})}))}function f(e,t){t=t||s,e.state!==k?e.state!==L?e.state!==A?(e.state=L,n(e,function(){e.state=k,t(),o(w[e.name],function(e){c(e)}),g&&p()&&o(w.ALL,function(e){c(e)})})):e.onpreload.push(function(){f(e,t)}):O.ready(e.name,t):t()}function n(r,t){function e(e){e=e||u.event,o.onload=o.onreadystatechange=o.onerror=null,t()}function i(e){("load"===(e=e||u.event).type||/loaded|complete/.test(o.readyState)&&(!v.documentMode||v.documentMode<9))&&(u.clearTimeout(r.errorTimeout),u.clearTimeout(r.cssTimeout),o.onload=o.onreadystatechange=o.onerror=null,t())}var o,n,a,l;t=t||s,a=r.url,"css"===(l=(a=a||"").split("?")[0].split("."))[l.length-1].toLowerCase()?((o=v.createElement("link")).type="text/"+(r.type||"css"),o.rel="stylesheet",o.href=r.url,r.cssRetries=0,r.cssTimeout=u.setTimeout(function e(){if(r.state!==k&&r.cssRetries<=20){for(var t=0,n=v.styleSheets.length;t<n;t++)if(v.styleSheets[t].href===o.href)return void i({type:"load"});r.cssRetries++,r.cssTimeout=u.setTimeout(e,250)}},500)):((o=v.createElement("script")).type="text/"+(r.type||"javascript"),o.src=r.url),o.onload=o.onreadystatechange=i,o.onerror=e,o.async=!1,o.defer=!1,r.errorTimeout=u.setTimeout(function(){e({type:"timeout"})},6e4),(n=v.head||v.getElementsByTagName("head")[0]).insertBefore(o,n.lastChild)}function e(){if(!v.body)return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(e,50));g||(g=!0,function(){for(var e,t=v.getElementsByTagName("script"),n=0,r=t.length;n<r;n++)if(e=t[n].getAttribute("data-headjs-load"))return O.load(e)}(),o(b,function(e){c(e)}))}function h(){v.addEventListener?(v.removeEventListener("DOMContentLoaded",h,!1),e()):"complete"===v.readyState&&(v.detachEvent("onreadystatechange",h),e())}var g,m,v=u.document,b=[],w={},y={},T="async"in v.createElement("script")||"MozAppearance"in v.documentElement.style||u.opera,E=u.head_conf&&u.head_conf.head||"head",O=u[E]=u[E]||function(){O.ready.apply(null,arguments)},A=1,x=2,L=3,k=4;if("complete"===v.readyState)e();else if(v.addEventListener)v.addEventListener("DOMContentLoaded",h,!1),u.addEventListener("load",e,!1);else{v.attachEvent("onreadystatechange",h),u.attachEvent("onload",e),m=!1;try{m=!u.frameElement&&v.documentElement}catch(e){}m&&m.doScroll&&function t(){if(!g){try{m.doScroll("left")}catch(e){return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(t,50))}e()}}()}O.load=O.js=T?function(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):(o(e,function(e){e!==t&&(e=i(e),n[e.name]=e)}),o(e,function(e){e!==t&&f(e=i(e),function(){p(n)&&c(t)})})),O}:function(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),r=n[0];return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):r?(o(n,function(e){a(e)||!e||d(i(e))}),f(i(e[0]),a(r)?r:function(){O.load.apply(null,n)})):f(i(e[0])),O},O.test=function(e,t,n,r){var i="object"==typeof e?e:{test:e,success:!!t&&(l(t)?t:[t]),failure:!!n&&(l(n)?n:[n]),callback:r||s},o=!!i.test;return o&&i.success?(i.success.push(i.callback),O.load.apply(null,i.success)):o||!i.failure?r():(i.failure.push(i.callback),O.load.apply(null,i.failure)),O},O.ready=function(e,t){var n,r,i;return e===v?(g?c(t):b.push(t),O):(a(e)&&(t=e,e="ALL"),l(e)?(n={},o(e,function(e){n[e]=y[e],O.ready(e,function(){p(n)&&c(t)})}),O):"string"==typeof e&&a(t)?((r=y[e])&&r.state===k||"ALL"===e&&p()&&g?c(t):(i=w[e])?i.push(t):i=w[e]=[t],O):O)},O.ready(v,function(){p()&&o(w.ALL,function(e){c(e)}),O.feature&&O.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(oe){var ae="left",le="right",ue="up",se="down",ce="in",pe="out",de="none",fe="auto",he="swipe",ge="pinch",me="tap",ve="doubletap",be="longtap",we="horizontal",ye="vertical",Te="all",Ee=10,Oe="start",Ae="move",xe="end",Le="cancel",ke="ontouchstart"in window,Se=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,Ce=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,Me="TouchSwipe";function r(e,v){var t=ke||Ce||!v.fallbackToMouseEvents,n=t?Ce?Se?"MSPointerDown":"pointerdown":"touchstart":"mousedown",r=t?Ce?Se?"MSPointerMove":"pointermove":"touchmove":"mousemove",i=t?Ce?Se?"MSPointerUp":"pointerup":"touchend":"mouseup",o=t?null:"mouseleave",a=Ce?Se?"MSPointerCancel":"pointercancel":"touchcancel",b=0,w=null,y=0,T=0,E=0,O=1,A=0,x=0,L=null,l=oe(e),k="start",S=0,C=null,u=0,M=0,s=0,c=0,p=0,d=null,N=null;try{l.bind(n,f),l.bind(a,m)}catch(e){oe.error("events not supported "+n+","+a+" on jQuery.swipe")}function f(e){if(!0!==l.data(Me+"_intouch")&&!(0<oe(e.target).closest(v.excludedElements,l).length)){var t,n,r=e.originalEvent?e.originalEvent:e,i=ke?r.touches[0]:r;return(k=Oe,ke?S=r.touches.length:e.preventDefault(),x=w=null,O=1,A=E=T=y=b=0,C=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),(n={})[ae]=te(ae),n[le]=te(le),n[ue]=te(ue),n[se]=te(se),L=n,Z(),!ke||S===v.fingers||v.fingers===Te||q()?($(0,i),u=ie(),2==S&&($(1,r.touches[1]),T=E=re(C[0].start,C[1].start)),(v.swipeStatus||v.pinchStatus)&&(t=F(r,k))):t=!1,!1===t)?(F(r,k=Le),t):(v.hold&&(N=setTimeout(oe.proxy(function(){l.trigger("hold",[r.target]),v.hold&&(t=v.hold.call(l,r,r.target))},this),v.longTapThreshold)),K(!0),null)}}function h(e){var t,n,r,i,o,a,l,u,s,c,p,d,f,h,g,m=e.originalEvent?e.originalEvent:e;k===xe||k===Le||G()||(n=J(ke?m.touches[0]:m),M=ie(),ke&&(S=m.touches.length),v.hold&&clearTimeout(N),k=Ae,2==S&&(0==T?($(1,m.touches[1]),T=E=re(C[0].start,C[1].start)):(J(m.touches[1]),E=re(C[0].end,C[1].end),C[0].end,C[1].end,x=O<1?pe:ce),O=(E/T*1).toFixed(2),A=Math.abs(T-E)),S===v.fingers||v.fingers===Te||!ke||q()?(f=n.start,h=n.end,g=function(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);o<0&&(o=360-Math.abs(o));return o}(f,h),function(e,t){if(v.allowPageScroll===de||q())e.preventDefault();else{var n=v.allowPageScroll===fe;switch(t){case ae:(v.swipeLeft&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case le:(v.swipeRight&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case ue:(v.swipeUp&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault();break;case se:(v.swipeDown&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault()}}}(e,w=g<=45&&0<=g||g<=360&&315<=g?ae:135<=g&&g<=225?le:45<g&&g<135?se:ue),p=n.start,d=n.end,b=Math.round(Math.sqrt(Math.pow(d.x-p.x,2)+Math.pow(d.y-p.y,2))),y=ne(),s=w,c=b,c=Math.max(c,ee(s)),L[s].distance=c,(v.swipeStatus||v.pinchStatus)&&(t=F(m,k)),v.triggerOnTouchEnd&&!v.triggerOnTouchLeave||(r=!0,v.triggerOnTouchLeave&&(i={left:(u=(l=oe(l=this)).offset()).left,right:u.left+l.outerWidth(),top:u.top,bottom:u.top+l.outerHeight()},o=n.end,a=i,r=o.x>a.left&&o.x<a.right&&o.y>a.top&&o.y<a.bottom),!v.triggerOnTouchEnd&&r?k=D(Ae):v.triggerOnTouchLeave&&!r&&(k=D(xe)),k!=Le&&k!=xe||F(m,k))):F(m,k=Le),!1===t&&F(m,k=Le))}function g(e){var t=e.originalEvent;return ke&&0<t.touches.length?(s=ie(),c=event.touches.length+1,!0):(G()&&(S=c),M=ie(),y=ne(),_()||!R()?F(t,k=Le):v.triggerOnTouchEnd||0==v.triggerOnTouchEnd&&k===Ae?(e.preventDefault(),F(t,k=xe)):!v.triggerOnTouchEnd&&Y()?z(t,k=xe,me):k===Ae&&F(t,k=Le),K(!1),null)}function m(){E=T=u=M=S=0,Z(),K(!(O=1))}function I(e){var t=e.originalEvent;v.triggerOnTouchLeave&&F(t,k=D(xe))}function P(){l.unbind(n,f),l.unbind(a,m),l.unbind(r,h),l.unbind(i,g),o&&l.unbind(o,I),K(!1)}function D(e){var t=e,n=j(),r=R(),i=_();return!n||i?t=Le:!r||e!=Ae||v.triggerOnTouchEnd&&!v.triggerOnTouchLeave?!r&&e==xe&&v.triggerOnTouchLeave&&(t=Le):t=xe,t}function F(e,t){var n=void 0;return U()&&H()||H()?n=z(e,t,he):(V()&&q()||q())&&!1!==n&&(n=z(e,t,ge)),W()&&B()&&!1!==n?n=z(e,t,ve):y>v.longTapThreshold&&b<Ee&&v.longTap&&!1!==n?n=z(e,t,be):1!==S&&ke||!(isNaN(b)||b<v.threshold)||!Y()||!1===n||(n=z(e,t,me)),t===Le&&m(),t!==xe||ke&&0!=e.touches.length||m(),n}function z(e,t,n){var r=void 0;if(n==he){if(l.trigger("swipeStatus",[t,w||null,b||0,y||0,S,C]),v.swipeStatus&&!1===(r=v.swipeStatus.call(l,e,t,w||null,b||0,y||0,S,C)))return!1;if(t==xe&&U()){if(l.trigger("swipe",[w,b,y,S,C]),v.swipe&&!1===(r=v.swipe.call(l,e,w,b,y,S,C)))return!1;switch(w){case ae:l.trigger("swipeLeft",[w,b,y,S,C]),v.swipeLeft&&(r=v.swipeLeft.call(l,e,w,b,y,S,C));break;case le:l.trigger("swipeRight",[w,b,y,S,C]),v.swipeRight&&(r=v.swipeRight.call(l,e,w,b,y,S,C));break;case ue:l.trigger("swipeUp",[w,b,y,S,C]),v.swipeUp&&(r=v.swipeUp.call(l,e,w,b,y,S,C));break;case se:l.trigger("swipeDown",[w,b,y,S,C]),v.swipeDown&&(r=v.swipeDown.call(l,e,w,b,y,S,C))}}}if(n==ge){if(l.trigger("pinchStatus",[t,x||null,A||0,y||0,S,O,C]),v.pinchStatus&&!1===(r=v.pinchStatus.call(l,e,t,x||null,A||0,y||0,S,O,C)))return!1;if(t==xe&&V())switch(x){case ce:l.trigger("pinchIn",[x||null,A||0,y||0,S,O,C]),v.pinchIn&&(r=v.pinchIn.call(l,e,x||null,A||0,y||0,S,O,C));break;case pe:l.trigger("pinchOut",[x||null,A||0,y||0,S,O,C]),v.pinchOut&&(r=v.pinchOut.call(l,e,x||null,A||0,y||0,S,O,C))}}return n==me?t!==Le&&t!==xe||(clearTimeout(d),clearTimeout(N),B()&&!W()?(p=ie(),d=setTimeout(oe.proxy(function(){p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target))},this),v.doubleTapThreshold)):(p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target)))):n==ve?t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("doubletap",[e.target]),v.doubleTap&&(r=v.doubleTap.call(l,e,e.target))):n==be&&(t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("longtap",[e.target]),v.longTap&&(r=v.longTap.call(l,e,e.target)))),r}function R(){var e=!0;return null!==v.threshold&&(e=b>=v.threshold),e}function _(){var e=!1;return null!==v.cancelThreshold&&null!==w&&(e=ee(w)-b>=v.cancelThreshold),e}function j(){var e=!v.maxTimeThreshold||!(y>=v.maxTimeThreshold);return e}function V(){var e=X(),t=Q(),n=null===v.pinchThreshold||A>=v.pinchThreshold;return e&&t&&n}function q(){return v.pinchStatus||v.pinchIn||v.pinchOut}function U(){var e=j(),t=R(),n=X(),r=Q();return!_()&&r&&n&&t&&e}function H(){return v.swipe||v.swipeStatus||v.swipeLeft||v.swipeRight||v.swipeUp||v.swipeDown}function X(){return S===v.fingers||v.fingers===Te||!ke}function Q(){return 0!==C[0].end.x}function Y(){return v.tap}function B(){return!!v.doubleTap}function W(){if(null==p)return!1;var e=ie();return B()&&e-p<=v.doubleTapThreshold}function Z(){c=s=0}function G(){var e=!1;return s&&ie()-s<=v.fingerReleaseThreshold&&(e=!0),e}function K(e){!0===e?(l.bind(r,h),l.bind(i,g),o&&l.bind(o,I)):(l.unbind(r,h,!1),l.unbind(i,g,!1),o&&l.unbind(o,I,!1)),l.data(Me+"_intouch",!0===e)}function $(e,t){var n=void 0!==t.identifier?t.identifier:0;return C[e].identifier=n,C[e].start.x=C[e].end.x=t.pageX||t.clientX,C[e].start.y=C[e].end.y=t.pageY||t.clientY,C[e]}function J(e){var t=function(e){for(var t=0;t<C.length;t++)if(C[t].identifier==e)return C[t]}(void 0!==e.identifier?e.identifier:0);return t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function ee(e){if(L[e])return L[e].distance}function te(e){return{direction:e,distance:0}}function ne(){return M-u}function re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function ie(){return(new Date).getTime()}this.enable=function(){return l.bind(n,f),l.bind(a,m),l},this.disable=function(){return P(),l},this.destroy=function(){return P(),l.data(Me,null),l},this.option=function(e,t){if(void 0!==v[e]){if(void 0===t)return v[e];v[e]=t}else oe.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}oe.fn.swipe=function(e){var t=oe(this),n=t.data(Me);if(n&&"string"==typeof e){if(n[e])return n[e].apply(this,Array.prototype.slice.call(arguments,1));oe.error("Method "+e+" does not exist on jQuery.swipe")}else if(!(n||"object"!=typeof e&&e))return function(n){!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=de);void 0!==n.click&&void 0===n.tap&&(n.tap=n.click);n=n||{};return n=oe.extend({},oe.fn.swipe.defaults,n),this.each(function(){var e=oe(this),t=e.data(Me);t||(t=new r(this,n),e.data(Me,t))})}.apply(this,arguments);return t},oe.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"},oe.fn.swipe.phases={PHASE_START:Oe,PHASE_MOVE:Ae,PHASE_END:xe,PHASE_CANCEL:Le},oe.fn.swipe.directions={LEFT:ae,RIGHT:le,UP:ue,DOWN:se,IN:ce,OUT:pe},oe.fn.swipe.pageScroll={NONE:de,HORIZONTAL:we,VERTICAL:ye,AUTO:fe},oe.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:Te}}),function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(d){var t={init:function(){var p=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each(function(){function e(){for(var e=0;e<p.length;e++)i.css(p[e],r.css(p[e]))}function t(){var e=r.val().replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/\n/g,"<br/>");i.html(e+" ").css({width:parseInt(r.width(),10)+"px"}),n()}function n(){var e=i.height(),t="hidden",n=o?e+u+a:e+u;c<n?(n=c,t="auto"):n<s&&(n=s),r.height()!==n&&r.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var r=d(this).css({resize:"none",overflow:"hidden"}),i=d("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);e();var o="border-box"==r.css("box-sizing")||"border-box"==r.css("-moz-box-sizing")||"border-box"==r.css("-webkit-box-sizing"),a=parseInt(r.css("border-top-width"))+parseInt(r.css("padding-top"))+parseInt(r.css("padding-bottom"))+parseInt(r.css("border-bottom-width")),l=parseInt(r.css("height"),10),u=parseInt(r.css("line-height"),10)||parseInt(r.css("font-size"),10),s=l<2*u?2*u:l,c=-1<parseInt(r.css("max-height"),10)?parseInt(r.css("max-height"),10):Number.MAX_VALUE;r.bind("keyup change cut paste",function(){t()}),d(window).bind("resize",function(){i.width()!==parseInt(r.width(),10)&&t()}),r.bind("blur",function(){n()}),r.bind("updateHeight",function(){e(),t()}),d(function(){t()})})}};d.fn.flexible=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void d.error("Method "+e+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery),function(e,p,n,t){"use strict";function d(e,t){for(var n=0,r=e.length;n<r;n++)o(e[n],t)}function f(t){return function(e){Y(e)&&(o(e,t),d(e.querySelectorAll(C),t))}}function h(e){var t=e.getAttribute("is"),n=e.nodeName.toUpperCase(),r=N.call(k,t?A+t.toUpperCase():O+n);return t&&-1<r&&!g(n,t)?-1:r}function g(e,t){return-1<C.indexOf(e+'[is="'+t+'"]')}function l(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;!oe||i&&i!==t||!t.attributeChangedCallback||"style"===r||t.attributeChangedCallback(r,n===e[u]?null:e.prevValue,n===e[c]?null:e.newValue)}function m(e){var t=f(e);return function(e){ee.push(t,e.target)}}function v(e){ie&&(ie=!1,e.currentTarget.removeEventListener(E,v)),d((e.target||p).querySelectorAll(C),e.detail===w?w:b),Q&&function(){for(var e,t=0,n=B.length;t<n;t++)e=B[t],M.contains(e)||(B.splice(t,1),o(e,w))}()}function r(e,t){Z.call(this,e,t),ae.call(this,{target:this})}function i(e,t){U(e,t),se?se.observe(e,$):(re&&(e.setAttribute=r,e[a]=ue(e),e.addEventListener("DOMSubtreeModified",ae)),e.addEventListener(T,l)),e.createdCallback&&oe&&(e.created=!0,e.createdCallback(),e.created=!1)}function o(e,t){var n,r=h(e);-1<r&&(ce(e,S[r]),r=0,t!==b||e[b]?t!==w||e[w]||(e[b]=!1,e[w]=!0,r=1):(e[w]=!1,e[b]=!0,r=1,Q&&N.call(B,e)<0&&B.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}var a,b,w,y,u,s,c,T,E,O,A,x,L,k,S,C,M,N,I,P,D,F,z,R,_,j,V,q,U,H,X,Q,Y,B,W,Z,G,K,$,J,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,pe,de,fe;function he(e){var t=new CustomEvent(T,{bubbles:!0});t.attrName=e,t.prevValue=this.getAttribute(e),t.newValue=null,t[c]=t.attrChange=2,G.call(this,e),this.dispatchEvent(t)}function ge(e,t){var n=this.hasAttribute(e),r=n&&this.getAttribute(e),i=new CustomEvent(T,{bubbles:!0});Z.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[s]=i.attrChange=1:i[u]=i.attrChange=0,this.dispatchEvent(i)}function me(e){var t,n=e.currentTarget,r=n[a],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(T,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[u]=t.attrChange=0:t[s]=t.attrChange=1,n.dispatchEvent(t))}t in p||(a="__"+t+(1e5*Math.random()>>0),b="attached",w="detached",y="extends",u="ADDITION",s="MODIFICATION",c="REMOVAL",T="DOMAttrModified",E="DOMContentLoaded",O="<",A="=",x=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,L=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],k=[],S=[],C="",M=p.documentElement,N=k.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},I=n.prototype,P=I.hasOwnProperty,D=I.isPrototypeOf,F=n.defineProperty,z=n.getOwnPropertyDescriptor,R=n.getOwnPropertyNames,_=n.getPrototypeOf,j=n.setPrototypeOf,V=!!n.__proto__,q=n.create||function e(t){return t?(e.prototype=t,new e):this},U=j||(V?function(e,t){return e.__proto__=t,e}:R&&z?function(e,t){for(;function(e,t){for(var n,r=R(t),i=0,o=r.length;i<o;i++)n=r[i],P.call(e,n)||F(e,n,z(t,n))}(e,t),(t=_(t))&&!D.call(t,e););return e}:function(e,t){for(var n in t)e[n]=t[n];return e}),H=e.MutationObserver||e.WebKitMutationObserver,X=(e.HTMLElement||e.Element||e.Node).prototype,Q=!D.call(X,M),Y=Q?function(e){return 1===e.nodeType}:function(e){return D.call(X,e)},B=Q&&[],W=X.cloneNode,Z=X.setAttribute,G=X.removeAttribute,K=p.createElement,$=H&&{attributes:!0,characterData:!0,attributeOldValue:!0},J=H||function(e){re=!1,M.removeEventListener(T,J)},te=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,10)},oe=ie=re=!(ne=!1),fe=j||V?(ce=function(e,t){D.call(t,e)||i(e,t)},i):ce=function(e,t){e[a]||(e[a]=n(!0),i(e,t))},Q?(re=!1,pe=z(X,"addEventListener"),de=pe.value,pe.value=function(e,t,n){e===T&&this.attributeChangedCallback&&this.setAttribute!==ge&&(this[a]={className:{name:"class",value:this.className}},this.setAttribute=ge,this.removeAttribute=he,de.call(this,"propertychange",me)),de.call(this,e,t,n)},F(X,"addEventListener",pe)):H||(M.addEventListener(T,J),M.setAttribute(a,1),M.removeAttribute(a),re&&(ae=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[a],i[a]=n=ue(i),n){if(!(r in t))return le(0,i,r,t[r],n[r],u);if(n[r]!==t[r])return le(1,i,r,t[r],n[r],s)}for(r in t)if(!(r in n))return le(2,i,r,t[r],n[r],c)}},le=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,l(a)},ue=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),p[t]=function(e,t){function o(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}var a,l,n=e.toUpperCase();if(ne||(ne=!0,H?(a=f(b),l=f(w),(se=new H(function(e){for(var t,n,r=0,i=e.length;r<i;r++)"childList"===(t=e[r]).type?(o(t.addedNodes,a),o(t.removedNodes,l)):(n=t.target,oe&&n.attributeChangedCallback&&"style"!==t.attributeName&&n.attributeChangedCallback(t.attributeName,t.oldValue,n.getAttribute(t.attributeName)))})).observe(p,{childList:!0,subtree:!0})):(ee=[],te(function e(){for(;ee.length;)ee.shift().call(null,ee.shift());te(e)}),p.addEventListener("DOMNodeInserted",m(b)),p.addEventListener("DOMNodeRemoved",m(w))),p.addEventListener(E,v),p.addEventListener("readystatechange",v),p.createElement=function(e,t){var n=K.apply(p,arguments),r=""+e,i=N.call(k,(t?A:O)+(t||r).toUpperCase()),o=-1<i;return t&&(n.setAttribute("is",t=t.toLowerCase()),o=o&&g(r.toUpperCase(),t)),oe=!p.createElement.innerHTMLHelper,o&&fe(n,S[i]),n},X.cloneNode=function(e){var t=W.call(this,!!e),n=h(t);return-1<n&&fe(t,S[n]),e&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],fe(t,S[h(t)])}(t.querySelectorAll(C)),t}),-2<N.call(k,A+n)+N.call(k,O+n))throw new Error("A "+e+" type is already registered");if(!x.test(n)||-1<N.call(L,n))throw new Error("The type "+e+" is invalid");function r(){return u?p.createElement(s,n):p.createElement(s)}var n,i=t||I,u=P.call(i,y),s=u?t[y].toUpperCase():n,c=k.push((u?A:O)+n)-1;return C=C.concat(C.length?",":"",u?s+'[is="'+e.toLowerCase()+'"]':s),r.prototype=S[c]=P.call(i,"prototype")?i.prototype:q(X),d(p.querySelectorAll(C),b),r})}(window,document,Object,"registerElement"),function(h,i,g){"use strict";function m(){return h.performance!==g&&h.performance.now!==g?h.performance.now():Date.now()}function v(e){return.5*(1-Math.cos(Math.PI*e))}function o(e){if("object"!=typeof e||e.behavior===g||"auto"===e.behavior||"instant"===e.behavior)return 1;if("smooth"!==e.behavior)throw new TypeError(e.behavior+" is not a valid value for enumeration ScrollBehavior")}function n(o,a){var l=h.scrollX||h.pageXOffset,u=h.scrollY||h.pageYOffset,s=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t=(m()-s)/w,n=v(t=1<t?1:t),r=l+(o-l)*n,i=u+(a-u)*n;return c(r,i),r===o&&i===a?(l=u=s=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}function a(u,e){if(u===i.documentElement||u===i.body)return n(e.left,e.top),g;var s=u.scrollLeft,c=u.scrollTop,p=e.left,d=e.top,f=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t,n,r,i=(m()-f)/w,o=v(i=1<i?1:i),a=s+(p-s)*o,l=c+(d-c)*o;return n=a,r=l,(t=u).scrollTop=r,t.scrollLeft=n,a===p&&l===d?(s=c=f=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}var b,w,c,r,l;"scrollBehavior"in i.documentElement.style||(w=768,c=h.scrollTo,r=h.scrollBy,l=h.Element.prototype.scrollIntoView,h.scroll=h.scrollTo=function(){return o(arguments[0])?c.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):n.call(h,~~arguments[0].left,~~arguments[0].top)},h.scrollBy=function(){if(o(arguments[0]))return r.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]);var e=h.scrollX||h.pageXOffset,t=h.scrollY||h.pageYOffset;return n(~~arguments[0].left+e,~~arguments[0].top+t)},Element.prototype.scrollIntoView=function(){var e,t,n,r;return o(arguments[0])?l.call(this,arguments[0]||!0):(r=h.getComputedStyle(i.body,null),t=parseInt(r.getPropertyValue("padding-left"),10),n=parseInt(r.getPropertyValue("padding-top"),10),e={top:this.offsetTop-2*n,left:this.offsetLeft-2*t},a(i.body,e))})}(window,document); })(this);
+(function (window, undefined) { !function(){var e=!1,t=/xyz/.test((function(){xyz}))?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function r(){!e&&this.init&&this.init.apply(this,arguments)}var i,o,a=this.prototype;for(o in e=!0,i=new this,e=!1,n)i[o]="function"==typeof n[o]&&"function"==typeof a[o]&&t.test(n[o])?function(e,t){return function(){var n,r=this._super;return this._super=a[e],n=t.apply(this,arguments),this._super=r,n}}(o,n[o]):n[o];return r.prototype=i,r.prototype.constructor=r,r.extend=arguments.callee,r}}(),function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;n<r;n++)t.call(e,e[n],n)}}function i(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function o(e){return i("Function",e)}function a(e){return i("Array",e)}function l(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function u(e){(e=e||n)._done||(e(),e._done=1)}function s(e){var t,n,r={};if("object"==typeof e)for(t in e)!e[t]||(r={name:t,url:e[t]});else r={name:l(e),url:e};return(n=T[r.name])&&n.url===r.url?n:(T[r.name]=r,r)}function c(e){for(var t in e=e||T)if(e.hasOwnProperty(t)&&e[t].state!==P)return!1;return!0}function d(e){e.state===t&&(e.state=L,e.onpreload=[],h({url:e.url,type:"cache"},(function(){!function(e){e.state=O,r(e.onpreload,(function(e){e.call()}))}(e)})))}function p(e,t){t=t||n,e.state!==P?e.state!==M?e.state!==L?(e.state=M,h(e,(function(){e.state=P,t(),r(m[e.name],(function(e){u(e)})),v&&c()&&r(m.ALL,(function(e){u(e)}))}))):e.onpreload.push((function(){p(e,t)})):S.ready(e.name,t):t()}function h(t,r){function i(t){t=t||e.event,a.onload=a.onreadystatechange=a.onerror=null,r()}function o(n){("load"===(n=n||e.event).type||/loaded|complete/.test(a.readyState)&&(!y.documentMode||y.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),a.onload=a.onreadystatechange=a.onerror=null,r())}var a,l;r=r||n,"css"===function(e){var t=(e=e||"").split("?")[0].split(".");return t[t.length-1].toLowerCase()}(t.url)?((a=y.createElement("link")).type="text/"+(t.type||"css"),a.rel="stylesheet",a.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout((function n(){if(t.state!==P&&t.cssRetries<=20){for(var r=0,i=y.styleSheets.length;r<i;r++)if(y.styleSheets[r].href===a.href)return void o({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(n,250)}}),500)):((a=y.createElement("script")).type="text/"+(t.type||"javascript"),a.src=t.url),a.onload=a.onreadystatechange=o,a.onerror=i,a.async=!1,a.defer=!1,t.errorTimeout=e.setTimeout((function(){i({type:"timeout"})}),6e4),(l=y.head||y.getElementsByTagName("head")[0]).insertBefore(a,l.lastChild)}function f(){if(!y.body)return e.clearTimeout(S.readyTimeout),void(S.readyTimeout=e.setTimeout(f,50));v||(v=!0,function(){for(var e,t=y.getElementsByTagName("script"),n=0,r=t.length;n<r;n++)if(e=t[n].getAttribute("data-headjs-load"))return void S.load(e)}(),r(b,(function(e){u(e)})))}function g(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",g,!1),f()):"complete"===y.readyState&&(y.detachEvent("onreadystatechange",g),f())}var v,w,y=e.document,b=[],m={},T={},x="async"in y.createElement("script")||"MozAppearance"in y.documentElement.style||e.opera,E=e.head_conf&&e.head_conf.head||"head",S=e[E]=e[E]||function(){S.ready.apply(null,arguments)},L=1,O=2,M=3,P=4;if("complete"===y.readyState)f();else if(y.addEventListener)y.addEventListener("DOMContentLoaded",g,!1),e.addEventListener("load",f,!1);else{y.attachEvent("onreadystatechange",g),e.attachEvent("onload",f),w=!1;try{w=!e.frameElement&&y.documentElement}catch(e){}w&&w.doScroll&&function t(){if(!v){try{w.doScroll("left")}catch(n){return e.clearTimeout(S.readyTimeout),void(S.readyTimeout=e.setTimeout(t,50))}f()}}()}S.load=S.js=x?function(){var e=arguments,t=e[e.length-1],n={};return o(t)||(t=null),a(e[0])?(e[0].push(t),S.load.apply(null,e[0]),S):(r(e,(function(e){e!==t&&(e=s(e),n[e.name]=e)})),r(e,(function(e){e!==t&&p(e=s(e),(function(){c(n)&&u(t)}))})),S)}:function(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),i=n[0];return o(t)||(t=null),a(e[0])?(e[0].push(t),S.load.apply(null,e[0]),S):(i?(r(n,(function(e){o(e)||!e||d(s(e))})),p(s(e[0]),o(i)?i:function(){S.load.apply(null,n)})):p(s(e[0])),S)},S.test=function(e,t,r,i){var o="object"==typeof e?e:{test:e,success:!!t&&(a(t)?t:[t]),failure:!!r&&(a(r)?r:[r]),callback:i||n},l=!!o.test;return l&&o.success?(o.success.push(o.callback),S.load.apply(null,o.success)):l||!o.failure?i():(o.failure.push(o.callback),S.load.apply(null,o.failure)),S},S.ready=function(e,t){var n,i,l;return e===y?(v?u(t):b.push(t),S):(o(e)&&(t=e,e="ALL"),a(e)?(n={},r(e,(function(e){n[e]=T[e],S.ready(e,(function(){c(n)&&u(t)}))})),S):"string"==typeof e&&o(t)?(i=T[e])&&i.state===P||"ALL"===e&&c()&&v?(u(t),S):((l=m[e])?l.push(t):l=m[e]=[t],S):S)},S.ready(y,(function(){c()&&r(m.ALL,(function(e){u(e)})),S.feature&&S.feature("domloaded",!0)}))}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}((function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=s),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each((function(){var r=e(this),i=r.data(M);i||(i=new n(this,t),r.data(M,i))}))}function n(t,n){function P(t){var l,u,s;if(!0!==me.data(M+"_intouch")&&!(e(t.target).closest(n.excludedElements,me).length>0))return l=t.originalEvent?t.originalEvent:t,s=S?l.touches[0]:l,Te=m,S?xe=l.touches.length:t.preventDefault(),de=0,pe=null,ye=null,he=0,fe=0,ge=0,ve=1,we=0,Ee=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),be=function(){var e={};return e[r]=te(r),e[i]=te(i),e[o]=te(o),e[a]=te(a),e}(),G(),!S||xe===n.fingers||n.fingers===y||Q()?(K(0,s),Se=ie(),2==xe&&(K(1,l.touches[1]),fe=ge=re(Ee[0].start,Ee[1].start)),(n.swipeStatus||n.pinchStatus)&&(u=z(l,Te))):u=!1,!1===u?(z(l,Te=E),u):(n.hold&&(Ie=setTimeout(e.proxy((function(){me.trigger("hold",[l.target]),n.hold&&(u=n.hold.call(me,l,l.target))}),this),n.longTapThreshold)),J(!0),null)}function A(t){var d,p,h,f,g=t.originalEvent?t.originalEvent:t;Te===x||Te===E||Z()||(p=$(S?g.touches[0]:g),Le=ie(),S&&(xe=g.touches.length),n.hold&&clearTimeout(Ie),Te=T,2==xe&&(0==fe?(K(1,g.touches[1]),fe=ge=re(Ee[0].start,Ee[1].start)):($(g.touches[1]),ge=re(Ee[0].end,Ee[1].end),Ee[0].end,Ee[1].end,ye=ve<1?u:l),ve=function(e,t){return(t/e*1).toFixed(2)}(fe,ge),we=Math.abs(fe-ge)),xe===n.fingers||n.fingers===y||!S||Q()?(function(e,t){if(n.allowPageScroll===s||Q())e.preventDefault();else{var l=n.allowPageScroll===c;switch(t){case r:(n.swipeLeft&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case i:(n.swipeRight&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case o:(n.swipeUp&&l||!l&&n.allowPageScroll!=w)&&e.preventDefault();break;case a:(n.swipeDown&&l||!l&&n.allowPageScroll!=w)&&e.preventDefault()}}}(t,pe=function(e,t){var n=function(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);o<0&&(o=360-Math.abs(o));return o}(e,t);return n<=45&&n>=0||n<=360&&n>=315?r:n>=135&&n<=225?i:n>45&&n<135?a:o}(p.start,p.end)),de=function(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}(p.start,p.end),he=ne(),function(e,t){t=Math.max(t,ee(e)),be[e].distance=t}(pe,de),(n.swipeStatus||n.pinchStatus)&&(d=z(g,Te)),n.triggerOnTouchEnd&&!n.triggerOnTouchLeave||(h=!0,n.triggerOnTouchLeave&&(f=function(t){var n=(t=e(t)).offset();return{left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()}}(this),h=function(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}(p.end,f)),!n.triggerOnTouchEnd&&h?Te=R(T):n.triggerOnTouchLeave&&!h&&(Te=R(x)),Te!=E&&Te!=x||z(g,Te))):z(g,Te=E),!1===d&&z(g,Te=E))}function I(e){var t=e.originalEvent;return S&&t.touches.length>0?(Oe=ie(),Me=event.touches.length+1,!0):(Z()&&(xe=Me),Le=ie(),he=ne(),U()||!N()?z(t,Te=E):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Te===T?(e.preventDefault(),z(t,Te=x)):!n.triggerOnTouchEnd&&Y()?_(t,Te=x,h):Te===T&&z(t,Te=E),J(!1),null)}function k(){xe=0,Le=0,Se=0,fe=0,ge=0,ve=1,G(),J(!1)}function D(e){var t=e.originalEvent;n.triggerOnTouchLeave&&z(t,Te=R(x))}function j(){me.unbind(ae,P),me.unbind(ce,k),me.unbind(le,A),me.unbind(ue,I),se&&me.unbind(se,D),J(!1)}function R(e){var t=e,r=C(),i=N(),o=U();return!r||o?t=E:!i||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==x&&n.triggerOnTouchLeave&&(t=E):t=x,t}function z(e,t){var r=void 0;return X()&&B()||B()?r=_(e,t,d):(H()&&Q()||Q())&&!1!==r&&(r=_(e,t,p)),V()&&q()&&!1!==r?r=_(e,t,f):he>n.longTapThreshold&&de<b&&n.longTap&&!1!==r?r=_(e,t,g):1!==xe&&S||!(isNaN(de)||de<n.threshold)||!Y()||!1===r||(r=_(e,t,h)),t===E&&k(),t===x&&(S?0==e.touches.length&&k():k()),r}function _(t,s,c){var v=void 0;if(c==d){if(me.trigger("swipeStatus",[s,pe||null,de||0,he||0,xe,Ee]),n.swipeStatus&&!1===(v=n.swipeStatus.call(me,t,s,pe||null,de||0,he||0,xe,Ee)))return!1;if(s==x&&X()){if(me.trigger("swipe",[pe,de,he,xe,Ee]),n.swipe&&!1===(v=n.swipe.call(me,t,pe,de,he,xe,Ee)))return!1;switch(pe){case r:me.trigger("swipeLeft",[pe,de,he,xe,Ee]),n.swipeLeft&&(v=n.swipeLeft.call(me,t,pe,de,he,xe,Ee));break;case i:me.trigger("swipeRight",[pe,de,he,xe,Ee]),n.swipeRight&&(v=n.swipeRight.call(me,t,pe,de,he,xe,Ee));break;case o:me.trigger("swipeUp",[pe,de,he,xe,Ee]),n.swipeUp&&(v=n.swipeUp.call(me,t,pe,de,he,xe,Ee));break;case a:me.trigger("swipeDown",[pe,de,he,xe,Ee]),n.swipeDown&&(v=n.swipeDown.call(me,t,pe,de,he,xe,Ee))}}}if(c==p){if(me.trigger("pinchStatus",[s,ye||null,we||0,he||0,xe,ve,Ee]),n.pinchStatus&&!1===(v=n.pinchStatus.call(me,t,s,ye||null,we||0,he||0,xe,ve,Ee)))return!1;if(s==x&&H())switch(ye){case l:me.trigger("pinchIn",[ye||null,we||0,he||0,xe,ve,Ee]),n.pinchIn&&(v=n.pinchIn.call(me,t,ye||null,we||0,he||0,xe,ve,Ee));break;case u:me.trigger("pinchOut",[ye||null,we||0,he||0,xe,ve,Ee]),n.pinchOut&&(v=n.pinchOut.call(me,t,ye||null,we||0,he||0,xe,ve,Ee))}}return c==h?s!==E&&s!==x||(clearTimeout(Ae),clearTimeout(Ie),q()&&!V()?(Pe=ie(),Ae=setTimeout(e.proxy((function(){Pe=null,me.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(me,t,t.target))}),this),n.doubleTapThreshold)):(Pe=null,me.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(me,t,t.target)))):c==f?s!==E&&s!==x||(clearTimeout(Ae),Pe=null,me.trigger("doubletap",[t.target]),n.doubleTap&&(v=n.doubleTap.call(me,t,t.target))):c==g&&(s!==E&&s!==x||(clearTimeout(Ae),Pe=null,me.trigger("longtap",[t.target]),n.longTap&&(v=n.longTap.call(me,t,t.target)))),v}function N(){var e=!0;return null!==n.threshold&&(e=de>=n.threshold),e}function U(){var e=!1;return null!==n.cancelThreshold&&null!==pe&&(e=ee(pe)-de>=n.cancelThreshold),e}function C(){return!n.maxTimeThreshold||!(he>=n.maxTimeThreshold)}function H(){var e=F(),t=W(),r=null===n.pinchThreshold||we>=n.pinchThreshold;return e&&t&&r}function Q(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function X(){var e=C(),t=N(),n=F(),r=W(),i=U(),o=!i&&r&&n&&t&&e;return o}function B(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function F(){return xe===n.fingers||n.fingers===y||!S}function W(){return 0!==Ee[0].end.x}function Y(){return!!n.tap}function q(){return!!n.doubleTap}function V(){if(null==Pe)return!1;var e=ie();return q()&&e-Pe<=n.doubleTapThreshold}function G(){Oe=0,Me=0}function Z(){var e=!1;return Oe&&ie()-Oe<=n.fingerReleaseThreshold&&(e=!0),e}function J(e){!0===e?(me.bind(le,A),me.bind(ue,I),se&&me.bind(se,D)):(me.unbind(le,A,!1),me.unbind(ue,I,!1),se&&me.unbind(se,D,!1)),me.data(M+"_intouch",!0===e)}function K(e,t){var n=void 0!==t.identifier?t.identifier:0;return Ee[e].identifier=n,Ee[e].start.x=Ee[e].end.x=t.pageX||t.clientX,Ee[e].start.y=Ee[e].end.y=t.pageY||t.clientY,Ee[e]}function $(e){var t=void 0!==e.identifier?e.identifier:0,n=function(e){for(var t=0;t<Ee.length;t++)if(Ee[t].identifier==e)return Ee[t]}(t);return n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function ee(e){if(be[e])return be[e].distance}function te(e){return{direction:e,distance:0}}function ne(){return Le-Se}function re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function ie(){return(new Date).getTime()}var oe=S||O||!n.fallbackToMouseEvents,ae=oe?O?L?"MSPointerDown":"pointerdown":"touchstart":"mousedown",le=oe?O?L?"MSPointerMove":"pointermove":"touchmove":"mousemove",ue=oe?O?L?"MSPointerUp":"pointerup":"touchend":"mouseup",se=oe?null:"mouseleave",ce=O?L?"MSPointerCancel":"pointercancel":"touchcancel",de=0,pe=null,he=0,fe=0,ge=0,ve=1,we=0,ye=0,be=null,me=e(t),Te="start",xe=0,Ee=null,Se=0,Le=0,Oe=0,Me=0,Pe=0,Ae=null,Ie=null;try{me.bind(ae,P),me.bind(ce,k)}catch(t){e.error("events not supported "+ae+","+ce+" on jQuery.swipe")}this.enable=function(){return me.bind(ae,P),me.bind(ce,k),me},this.disable=function(){return j(),me},this.destroy=function(){return j(),me.data(M,null),me},this.option=function(t,r){if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else e.error("Option "+t+" does not exist on jQuery.swipe.options");return null}}var r="left",i="right",o="up",a="down",l="in",u="out",s="none",c="auto",d="swipe",p="pinch",h="tap",f="doubletap",g="longtap",v="horizontal",w="vertical",y="all",b=10,m="start",T="move",x="end",E="cancel",S="ontouchstart"in window,L=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,O=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,M="TouchSwipe",P={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(n){var r=e(this),i=r.data(M);if(i&&"string"==typeof n){if(i[n])return i[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(i||"object"!=typeof n&&n))return t.apply(this,arguments);return r},e.fn.swipe.defaults=P,e.fn.swipe.phases={PHASE_START:m,PHASE_MOVE:T,PHASE_END:x,PHASE_CANCEL:E},e.fn.swipe.directions={LEFT:r,RIGHT:i,UP:o,DOWN:a,IN:l,OUT:u},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:v,VERTICAL:w,AUTO:c},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:y}})),function(e){var t={init:function(){var t=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each((function(){function n(){for(var e=0;e<t.length;e++)a.css(t[e],o.css(t[e]))}function r(){var e=o.val().replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/\n/g,"<br/>");a.html(e+" ").css({width:parseInt(o.width(),10)+"px"}),i()}function i(){var e=a.height(),t="hidden",n=l?e+c+u:e+c;n>p?(n=p,t="auto"):d>n&&(n=d),o.height()!==n&&o.css({overflow:t,height:n+"px"})}var o,a,l,u,s,c,d,p;if("textarea"!==this.type)return!1;o=e(this).css({resize:"none",overflow:"hidden"}),a=e("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body),n(),l="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")||"border-box"==o.css("-webkit-box-sizing"),u=parseInt(o.css("border-top-width"))+parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"))+parseInt(o.css("border-bottom-width")),s=parseInt(o.css("height"),10),c=parseInt(o.css("line-height"),10)||parseInt(o.css("font-size"),10),d=2*c>s?2*c:s,p=parseInt(o.css("max-height"),10)>-1?parseInt(o.css("max-height"),10):Number.MAX_VALUE,o.bind("keyup change cut paste",(function(){r()})),e(window).bind("resize",(function(){a.width()!==parseInt(o.width(),10)&&r()})),o.bind("blur",(function(){i()})),o.bind("updateHeight",(function(){n(),r()})),e((function(){r()}))}))}};e.fn.flexible=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery); })(this);
// WCF.js
-(function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var o=jQuery.fn.data;jQuery.fn.data=function(e,t){var i,n=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(var s in e){s.match(/ID$/)&&(i=e[s],delete e[s],e[s=s.replace(/ID$/,"-id")]=i)}n[0]=e;break;case"string":e.match(/ID$/)&&(n[0]=e.replace(/ID$/,"-id"))}var a=o.apply(this,n);if(void 0===e)for(var s in a)s.match(/Id$/)&&(a[s.replace(/Id$/,"ID")]=a[s],delete a[s]);return a},window.console||(window.console={});for(var e=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],t=0;t<e.length;t++)void 0===console[e[t]]&&(console[e[t]]=function(){});void 0===console.debug&&(console.debug=function(e){console.log(e)})}(),window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[--n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&0<window.navigator.msMaxTouchPoints,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return 0<arguments.length?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,i){return $.grep(e,function(e,t){return i!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e,t=0,i=this.get(0);return document.selection?(this.focus(),(e=document.selection.createRange()).moveStart("character",-this.val().length),t=e.text.length):!i.selectionStart&&"0"!=i.selectionStart||(t=parseInt(i.selectionStart)),t},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t,i=this.get(0);return this.focus(),document.selection?((t=document.selection.createRange()).moveStart("character",e),t.moveEnd("character",0),t.select()):!i.selectionStart&&"0"!=i.selectionStart||(i.selectionStart=e,i.selectionEnd=e),!0},wcfDropIn:function(e,t,i){return e=e||"up",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e=e||"down",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(i){var n=require("perfect-scrollbar");return this.each(function(){var e,t;return"object"==typeof i||void 0===i?(e=i,$(this).data("psID")||n.initialize(this,e)):"update"===(t=i)?n.update(this):"destroy"===t&&n.destroy(this),jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};for(var n=0,s=(i=i.split(";")).length;n<s;n++){var a=$.trim(i[n]);""!=a&&(a=a.split(":"),t[$.trim(a[0])]=$.trim(a[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,s=i.length;n<s;n++){var a=i[n];t[a]?e.css(a,t[a]):e.css(a,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),s=[],a=0;a<n.length;a+=i){for(var o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;s<a;s++){var o=i[s].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(e){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.destroy(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e,t){window.bc_wcfSimpleDropdown._toggle(null,e,null,t)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:{},_dropdownMenus:{},create:function(){},open:function(){},close:function(){},closeAll:function(){},getOpenDropdown:function(){},getDropdown:function(){}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:{},_itemList:{},_linkList:{},_options:{},_pointer:{},_triggerElement:{},init:function(){},getContainer:function(){},getItemList:function(){},getLinkList:function(){},open:function(){},close:function(){},isOpen:function(){},toggle:function(){},resetItems:function(){},render:function(){},rebuildScrollbar:function(){}}),WCF.Clipboard={init:function(){},reload:function(){}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){$.isFunction(e)?(this._callback=e,this._interval=t,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(t){this._ajaxRequest=null,"jsonp"===(t=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},t)).dataType?require(["AjaxJsonp"],function(e){e.send(t.url,t.success,t.failure,{parameterName:t.jsonp})}):require(["AjaxRequest"],function(e){this._ajaxRequest=new e({data:t.data,type:t.type,url:t.url,withCredentials:t.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===t.dataType?"application/json":"",autoAbort:t.autoAbortPrevious,ignoreError:t.suppressErrors,silent:!t.showLoadingOverlay,failure:t.failure,finalize:t.after,success:t.success}),t.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(t){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(t)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(t,i){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.setOption(t,i)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(e,t,i){},_success:function(e,t,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i,n=$(t),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(e){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(s){this._containers.forEach(function(e){var t,i=$("#"+e),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),s)&&(t=this,i.wcfBlindOut("up",function(){var e=$(this).remove();t._containers.splice(t._containers.indexOf(e.wcfIdentify()),1),t._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})}))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(){},_buttonSelector:"",_callback:{},_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_didTriggerEffect:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},setCallback:function(){}}),WCF.Action.Toggle=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},triggerEffect:function(){},_toggleButton:function(){}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){this._threshold=parseInt(e),0!==this._threshold?($.isFunction(t)&&(this._callback=t),null!==this._callback?(this._reference=$(i||window),this._target=$(n||document),this.start(),this._scroll()):console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.")):console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.")},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop();e-(this._reference.height()+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e||new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){e({key:t,value:this._variables[t]})}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(t,i){require(["Language"],function(e){e.add(t,i)})},addObject:function(t){require(["Language"],function(e){e.addObject(t)})},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){var i=(e=String(WCF.Number.round(e,t||2))).split(".");return e=this.addThousandsSeparator(i[0]),1<i.length&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(t){var i=new WCF.Dictionary,n=0;t=(t=(t=t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return i.add(t,e.replace(/\{\/?literal\}/g,"")),t},this))).replace(/\{\*.*?\*\}/g,"");function s(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,u=t.length;c<u;c++){var h=t[c];n&&"="!=h&&" "!=h?s+=h:n&&"="==h?l=o=r=n=!1:n||r||o||" "!=h?n||!r||l||"'"!=h?n||r||o||"'"!=h?n||!o||l||'"'!=h?n||r||o||'"'!=h?n||!o&&!r||l||"\\"!=h?n||(l=!1,a+=h):(l=!0,a+=h):(o=!0,a+=h):(o=!1,a+=h):(r=!0,a+=h):(r=!1,a+=h):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i}function a(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")}for(var e in t=t.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.escapeHTML("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.formatNumeric("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return"' + "+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return"';\nif ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return"';\n}\nelse if ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in implode-tag");if(void 0===i.item)throw new Error("Missing item attribute in implode-tag");return void 0===i.glue&&(i.glue="', '"),i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+n+" = false;\nfor ($implodeKey_"+n+" in "+i.from+") {\n\tv["+i.item+"] = "+i.from+"[$implodeKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $implodeKey_"+n+";\n":"")+"\tif ($implode_"+n+") $output += "+i.glue+";\n\t$implode_"+n+" = true;\n\t$output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in foreach-tag");if(void 0===i.item)throw new Error("Missing item attribute in foreach-tag");return i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+n+" = false;\nfor ($foreachKey_"+n+" in "+i.from+") {\n\t$foreach_"+n+" = true;\n\tbreak;\n}\nif ($foreach_"+n+") {\n\tfor ($foreachKey_"+n+" in "+i.from+") {\n\t\tv["+i.item+"] = "+i.from+"[$foreachKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $foreachKey_"+n+";\n":"")+"\t\t$output += '"}).replace(/\{foreachelse\}/g,"';\n\t}\n}\nelse {\n\t{\n\t\t$output += '").replace(/\{\/foreach\}/g,"';\n\t}\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n\t$output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '"),WCF.Template.callbacks)t=WCF.Template.callbacks[e](t);t=t.replace("{ldelim}","{").replace("{rdelim}","}"),i.each(function(e){t=t.replace(e.key,e.value)}),t="$output += '"+t+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+t+" return $output;")}catch(e){throw console.debug("var $output = ''; "+t+" return $output;"),e}},fetch:function(e){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;e<t;e++){var i=this._showItems[e];$("#"+i).show()}for(e=0,t=this._hideItems.length;e<t;e++){i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e);t.data("isOpen")||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer"))),i=i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),!0);return t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(e){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(e){},_getButtonContainer:function(e){},_createButton:function(e,t){var i=elBySel(".jsStaticCollapsibleButton",t[0]);return(i=null!==i&&i.parentNode===t[0]?(i.classList.remove("jsStaticCollapsibleButton"),$(i)):$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t)).data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),$("#"+t).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(e){return{}},_updateContent:function(e,t,i){this._containerData[e].target.html(t)},_success:function(e,t,i){var n,s;e.returnValues.containerID&&(n=e.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!e.returnValues.isOpen,s=e.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(e.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[t].button,"open"==s?"chevron-down":"chevron-right"),"open"==s?this._containerData[t].target.show():this._containerData[t].target.hide(),$("#"+t).toggleClass("jsCollapsed"),this._containerData[t].isOpen="open"==s}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return s-a<n&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i}),!1}}),WCF.CloseOverlayHandler={addCallback:function(t,i){require(["Ui/CloseOverlay"],function(e){e.add(t,i)})},removeCallback:function(t){require(["Ui/CloseOverlay"],function(e){e.remove(t)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){this._isListening||(window.MutationObserver?new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0}):$(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(t){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){},_initOptions:function(){},_initOption:function(){},_handleChange:function(){},_change:function(){},_execute:function(){},_enableOption:function(){},_enableOptionElement:function(){},_enableOptions:function(){}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){var e;this._isListening||(e=null,void 0!==document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(e){var t;this._isExecuting||(this._isExecuting=!0,t=document[this._hiddenFieldName],this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var e,t;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(e=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(t=e[e.length-1].match(/\d+/g),0<this._options.updatePageNumber?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)):window.location.reload():this._tableContainer.remove()},_remove:function(e){var t;$.getLength(e)?(t=$(e.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==t.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){null==t||$.isFunction(t)?(this._callback=t||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var t=this;new WCF.PeriodicalExecuter(function(e){t._list.is(":visible")&&t._clearList(!1),e.stop()},250)},_keyDown:function(e){var t;e.which===$.ui.keyCode.ENTER&&((t=this._searchInput.parents(".dropdown")).data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():!t.data("preventSubmit")&&-1===this._itemIndex||e.preventDefault())},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){if(this._lastValue===t)return;this._lastValue=t;var i,n={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};this._delay?(null!==this._timer&&this._timer.stop(),(i=this)._timer=new WCF.PeriodicalExecuter(function(){i._queryServer(n),i._timer.stop(),i._timer=null},this._delay)):this._queryServer(n)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(e){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){if((e.keyCode||e.which)==$.ui.keyCode.COMMA)return"";for(var i=t.split(","),n=i.length,s=0;s<n;s++)i[s]=$.trim(i[s]);for(s=0;s<n;s++){var a=i[s];if(!this._oldSearchString[s]){t=a;break}if(a!=this._oldSearchString[s]){t=a,this._caretAt=s;break}}this._oldSearchString=i}return t},_getParameters:function(e){return e},_success:function(e,t,i){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var n in e.returnValues){var s=e.returnValues[n];this._createListItem(s)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var a=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t,i,n=!1,s=$(e.currentTarget);this._commaSeperated?(t=s.data("label"),this._oldSearchString[this._caretAt]=t,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(t.toLowerCase())+t.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t,i,n=this._super(e),s=null;return e.icon?s=$(e.icon):this._includeUserGroups&&"group"===e.type&&(s=$('<span class="icon icon16 fa-users" />')),s&&(t=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(t))),n.data("type",e.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){$.isFunction(t)?WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){$.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),this._setupCallbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;t<i;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(t=0,i=this._callbacks[e].length;t<i;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.register(t)})},rebuild:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.rebuild(t)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(t,i){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.add(t,i),this._registeredCaptchas.push(t)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(t){var e;if(-1===this._registeredCaptchas.indexOf(t))return e;var i=require("WoltLabSuite/Core/Controller/Captcha");try{e=i.getData(t)}catch(e){console.debug('[WCF.System.Captcha] Unknow captcha id "'+t+'"')}return e},removeCallback:function(t){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.delete(t),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(e){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(t,e,i,n){require(["Ui/Notification"],function(e){e.show(i||this._message,t,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(t,i,n,s,a){var e;"object"==typeof s&&((e=$("<div />")).append(s),s=e.html()),require(["Ui/Confirmation"],function(e){e.show({legacyCallback:i,message:t,parameters:n,template:s||"",messageIsHtml:!0===a})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){var e;0===this._depth&&(e=$("meta[name=viewport]"),this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")),this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return!!(document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen)}},WCF.System.PageNavigation={init:function(s,a){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],function(e){for(var t=elBySelAll(s),i=0,n=t.length;i<n;i++)e.init(t[i],a)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:{},_className:"",_dialog:{},_proxy:{},_title:"",init:function(){},_success:function(){}}),WCF.InlineEditor=Class.extend({_callbacks:{},_dropdowns:{},_elements:{},_notification:{},_options:{},_proxy:{},_triggerElements:{},_updateData:{},init:function(){},_closeAll:function(){},_setOptions:function(){},registerCallback:function(){},_getTriggerElement:function(){},_show:function(){},_validate:function(){},_validateCallbacks:function(){},_success:function(){},_updateState:function(){},_click:function(){},_execute:function(){},_executeCallback:function(){},_hide:function(){}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var e;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),e.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",function(){this.classList.contains("focus-visible")&&e[0].classList.add("active")}),this._fileUpload[0].addEventListener("blur",function(){e[0].classList.remove("active")})):(e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),elAttr(e[0],"tabindex","0"),e.click($.proxy(this._showOverlay,this))),this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i,n){var s=null,a=[];if(void 0!==n)a=n;else if(t)a.push(t);else if(i){var o="";switch(i.type){case"image/png":o=".png";break;case"image/jpeg":o=".jpg";break;case"image/gif":o=".gif"}a.push({name:"pasted-from-clipboard"+o})}else a=this._fileUpload.prop("files");if(a.length){var r=new FormData,s=this._createUploadMatrix(a);if(!this._uploadMatrix[s].length)return null;for(var l,c=0,u=a.length;c<u;c++){this._uploadMatrix[s][c]&&(l=this._uploadMatrix[s][c].data("internalFileID"),i?r.append("__files["+l+"]",i,a[c].name):r.append("__files["+l+"]",a[c],a[c].name))}r.append("actionName",this._options.action),r.append("className",this._className);var h=this._getParameters();for(var d in h)r.append("parameters["+d+"]",h[d]);var p=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:r,contentType:!1,processData:!1,success:function(e,t,i){p._success(s,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){p._progress(s,e)},!1),e},xhrFields:{withCredentials:!0}})}return s},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;i<n;i++){var s=e[i],a=this._initFile(s);a.hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a)}return t}return null},_success:function(e,t){},_error:function(e,t,i){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;t<i;t++){var n=e[t],s=new FormData,a=this._createUploadMatrix(n);if(this._uploadMatrix[a].length){s.append("__files["+a+"]",n),s.append("actionName",this._options.action),s.append("className",this._className);var o=this._getParameters();for(var r in o)s.append("parameters["+r+"]",o[r]);this._sendRequest(a,s)}}},_sendRequest:function(n,e){var s=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:e,contentType:!1,processData:!1,success:function(e,t,i){s._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){s._progress(n,e)},!1),e}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(e,t){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:{},_notification:{},_offset:0,_options:{},_proxy:{},_structure:{},init:function(){},_tableRowHelper:function(){},_submit:function(){},_success:function(){}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(t){var i=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(i=!0)}.bind(this)),i||(this._activeElementID="",this._identifier=t,require(["WoltLabSuite/Core/Controller/Popover"],function(e){e.init({attributeName:"legacy",className:t,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){var i;this._itemList=$(e),this._searchInput=$(t),this._data={},this._itemList.length&&this._searchInput.length?(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput&&(i=this)._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)}),this._searchInput.parents(".dropdown").data("preventSubmit",!0)):console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(e){return null!==e||this._keyPress(null)},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return(e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t)?!0:(this.addItem({objectID:0,label:t}),e&&44===e.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){for(var e=$.trim(this._searchInput.val()),t=0,i=(e=e.split(",")).length;t<i;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){return(!this._data[e.objectID]||0===e.objectID&&this._allowCustomInput)&&($('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label)),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e,t){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(t,i,n,s,a,o){require(["WoltLabSuite/Core/Language/Chooser"],function(e){e.init(t,i,n,s,a,o)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1==this._container.length?this._convert():console.debug("[WCF.UserPanel] Unable to find container identified by '"+e+"', aborting.")},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(e){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e,t,i){var n=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());n.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(n),this._updateBadge(e.returnValues.totalCount),this._after(n)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(n),this._updateBadge(0))},_updateBadge:function(e){var t;(e=parseInt(e)||0)?((t=this._container.find(".badge")).length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle"))).before(" "),t.html(e)):this._container.find(".badge").remove()},_after:function(e){}}),jQuery.fn.extend({wcfDialog:function(s){var a=arguments;return require(["Dom/Util","Ui/Dialog"],function(e,t){var i,n=e.identify(this[0]);"close"===s?t.close(n):"render"===s?t.rebuild(n):"option"===s?3===a.length&&("title"===a[1]&&"string"==typeof a[2]?t.setTitle(n,a[2]):0===a[1].indexOf("on")?t.setCallback(n,a[1],a[2]):"closeConfirmMessage"===a[1]&&null===a[2]&&t.setCallback(n,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),i=1===a.length&&"object"==typeof a[0]?a[0]:{},t.openStatic(n,null,i),i.hasOwnProperty("title")&&t.setTitle(n,i.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,1<this._count&&this._initSlideshow()},_initSlideshow:function(){var i=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(e,t){$(t).show().css({height:i,left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var e=0;e<this._count;e++){var t=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",e).click($.proxy(this._click,this)).appendTo(this._buttonList);0==e&&t.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto").outerHeight();this._items.css("height",e+"px"),this.element.css("height",e+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){var e;this.options.cycle&&(null!==this._timer&&this._timer.stop(),(e=this)._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval))},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return 1<i.length?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(n){var s=this[0],a=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],function(e,t){var i=t.getTabMenu(e.identify(s));null!==i&&i[n].apply(i,a)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:e})}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){var i;return"activePage"==e&&t!=this.options[e]&&0<t&&t<=this.options.maxPage&&((i=this._trigger("shouldSwitch",void 0,{nextPage:t}))||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})),this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){},_updateSelection:function(){}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:{},_categories:{},init:function(){},_buildStructure:function(){},_updateSelection:function(){}}),WCF.Condition={},WCF.Notice={}; })(this);
+(function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var e,t,i=jQuery.fn.data;for(jQuery.fn.data=function(e,t){var n,s,a,o=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(n in e)n.match(/ID$/)&&(s=e[n],delete e[n],e[n=n.replace(/ID$/,"-id")]=s);o[0]=e;break;case"string":e.match(/ID$/)&&(o[0]=e.replace(/ID$/,"-id"))}if(a=i.apply(this,o),void 0===e)for(n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},window.console||(window.console={}),e=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],t=0;t<e.length;t++)void 0===console[e[t]]&&(console[e[t]]=function(){});void 0===console.debug&&(console.debug=function(e){console.log(e)})}(),window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[n-=1],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,(function(e,i){return t!==e}))},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&i++;return i}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){var e,t,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;return e=0,t=this.get(0),document.selection?(this.focus(),(i=document.selection.createRange()).moveStart("character",-this.val().length),e=i.text.length):(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart)),e},setCaret:function(e){var t,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;return t=this.get(0),this.focus(),document.selection?((i=document.selection.createRange()).moveStart("character",e),i.moveEnd("character",0),i.select()):(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e),!0},wcfDropIn:function(e,t,i){return e||(e="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e||(e="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(e){var t=require("perfect-scrollbar");return this.each((function(){var i,n;return"object"==typeof e||void 0===e?(i=e,$(this).data("psID")||t.initialize(this,i)):"update"===(n=e)?t.update(this):"destroy"===n&&t.destroy(this),jQuery(this)}))}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t,i,n,s={},a=e.attr("style");if(!a)return{};for(t=0,i=(a=a.split(";")).length;t<i;t++)""!=(n=$.trim(a[t]))&&(n=n.split(":"),s[$.trim(n[0])]=$.trim(n[1]));return s},revertInlineCSS:function(e,t,i){var n,s,a;for(n=0,s=i.length;n<s;n++)t[a=i[n]]?e.css(a,t[a]):e.css(a,"")},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},base64toBlob:function(e,t,i){var n,s,a,o,r,l,c;for(t=t||"",i=i||512,n=atob(e),s=[],a=0;a<n.length;a+=i){for(o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);c=new Uint8Array(r),s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,(function(e,t){var i,n,s,a=t.split(/([A-Z][a-z0-9]+)/),o="";for(i=0,n=a.length;i<n;i++)(s=a[i].trim()).length&&(o.length&&(o+="-"),o+=s.toLowerCase());return"index.php?"+o+"/&"}))}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(e){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.destroy(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e,t){window.bc_wcfSimpleDropdown._toggle(null,e,null,t)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:{},_dropdownMenus:{},create:function(){},open:function(){},close:function(){},closeAll:function(){},getOpenDropdown:function(){},getDropdown:function(){}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:{},_itemList:{},_linkList:{},_options:{},_pointer:{},_triggerElement:{},init:function(){},getContainer:function(){},getItemList:function(){},getLinkList:function(){},open:function(){},close:function(){},isOpen:function(){},toggle:function(){},resetItems:function(){},render:function(){},rebuildScrollbar:function(){}}),WCF.Clipboard={init:function(){},reload:function(){}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){$.isFunction(e)?(this._callback=e,this._interval=t,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(e){e.show()}))},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(e){e.hide()}))},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,"jsonp"===(e=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},e)).dataType?require(["AjaxJsonp"],(function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})})):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,withCredentials:e.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===e.dataType?"application/json":"",autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(t){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(i){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(e,t,i){},_success:function(e,t,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy((function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))}),this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i,n=$(t),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(e){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(e){this._containers.forEach(function(t){var i,n=$("#"+t),s=n.find(this._buttonSelector);WCF.inArray(s.data("objectID"),e)&&(i=this,n.wcfBlindOut("up",(function(){var e=$(this).remove();i._containers.splice(i._containers.indexOf(e.wcfIdentify()),1),i._didTriggerEffect(e),s.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",s.data("eventName"),{button:s,container:e})})))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(){},_buttonSelector:"",_callback:{},_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_didTriggerEffect:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},setCallback:function(){}}),WCF.Action.Toggle=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},triggerEffect:function(){},_toggleButton:function(){}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){this._threshold=parseInt(e),0!==this._threshold?($.isFunction(t)&&(this._callback=t),null!==this._callback?(this._reference=$(i||window),this._target=$(n||document),this.start(),this._scroll()):console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.")):console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.")},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e||new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy((function(e){this.add(e.key,e.value)}),this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){var t;if($.isFunction(e))for(t in this._variables)e({key:t,value:this._variables[t]})},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["Language"],(function(i){i.add(e,t)}))},addObject:function(e){require(["Language"],(function(t){t.addObject(e)}))},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){var i=(e=String(WCF.Number.round(e,t||2))).split(".");return e=this.addThousandsSeparator(i[0]),i.length>1&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],(function(e){e.setup()}))},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(e){var t,i,n,s=new WCF.Dictionary,a=0;for(n in e=(e=(e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy((function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return s.add(t,e.replace(/\{\/?literal\}/g,"")),t}),this))).replace(/\{\*.*?\*\}/g,""),t=function(e){var t,i,n,s=e.split(""),a={},o=!0,r="",l="",c=!1,u=!1,h=!1;for(t=0,i=s.length;t<i;t++)n=s[t],o&&"="!=n&&" "!=n?r+=n:o&&"="==n?(o=!1,u=!1,c=!1,h=!1):o||u||c||" "!=n?o||!u||h||"'"!=n?o||u||c||"'"!=n?o||!c||h||'"'!=n?o||u||c||'"'!=n?o||!c&&!u||h||"\\"!=n?o||(h=!1,l+=n):(h=!0,l+=n):(c=!0,l+=n):(c=!1,l+=n):(u=!0,l+=n):(u=!1,l+=n):(o=!0,a[r]=l,l=r="");if(a[r]=l,c||u||h)throw new Error('Syntax error in parameterList: "'+e+'"');return a},i=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")},e=e.replace(/\{(\$[^\}]+?)\}/g,(function(e,t){return"' + WCF.String.escapeHTML("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"})).replace(/\{#(\$[^\}]+?)\}/g,(function(e,t){return"' + WCF.String.formatNumeric("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"})).replace(/\{@(\$[^\}]+?)\}/g,(function(e,t){return"' + "+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+" + '"})).replace(/\{lang\}(.+?)\{\/lang\}/g,(function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"})).replace(/\{include (.+?)\}/g,(function(e,i){i=i.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var n=t(i);if(void 0===n.file)throw new Error("Missing file attribute in include-tag");return n.file=n.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+n.file+".fetch(v) + '"})).replace(/\{if (.+?)\}/g,(function(e,t){return"';\nif ("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"})).replace(/\{else ?if (.+?)\}/g,(function(e,t){return"';\n}\nelse if ("+(t=i(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"})).replace(/\{implode (.+?)\}/g,(function(e,i){a++,i=i.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var n=t(i);if(void 0===n.from)throw new Error("Missing from attribute in implode-tag");if(void 0===n.item)throw new Error("Missing item attribute in implode-tag");return void 0===n.glue&&(n.glue="', '"),n.from=n.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+a+" = false;\nfor ($implodeKey_"+a+" in "+n.from+") {\n\tv["+n.item+"] = "+n.from+"[$implodeKey_"+a+"];\n"+(void 0!==n.key?"\t\tv["+n.key+"] = $implodeKey_"+a+";\n":"")+"\tif ($implode_"+a+") $output += "+n.glue+";\n\t$implode_"+a+" = true;\n\t$output += '"})).replace(/\{foreach (.+?)\}/g,(function(e,i){a++,i=i.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var n=t(i);if(void 0===n.from)throw new Error("Missing from attribute in foreach-tag");if(void 0===n.item)throw new Error("Missing item attribute in foreach-tag");return n.from=n.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+a+" = false;\nfor ($foreachKey_"+a+" in "+n.from+") {\n\t$foreach_"+a+" = true;\n\tbreak;\n}\nif ($foreach_"+a+") {\n\tfor ($foreachKey_"+a+" in "+n.from+") {\n\t\tv["+n.item+"] = "+n.from+"[$foreachKey_"+a+"];\n"+(void 0!==n.key?"\t\tv["+n.key+"] = $foreachKey_"+a+";\n":"")+"\t\t$output += '"})).replace(/\{foreachelse\}/g,"';\n\t}\n}\nelse {\n\t{\n\t\t$output += '").replace(/\{\/foreach\}/g,"';\n\t}\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n\t$output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '"),WCF.Template.callbacks)e=WCF.Template.callbacks[n](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),s.each((function(t){e=e.replace(t.key,t.value)})),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(e){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){var e,t,i;if(this._element.prop("checked")){for(e=0,t=this._showItems.length;e<t;e++)i=this._showItems[e],$("#"+i).show();for(e=0,t=this._hideItems.length;e<t;e++)i=this._hideItems[e],$("#"+i).hide();null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy((function(e,t){this._initButton(t)}),this))},_initButton:function(e){var t=$(e),i=t.data("isOpen");i||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy((function(){this._toggleImage(t)}),this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy((function(){this._toggleImage(t)}),this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(e){this._getContainers().each($.proxy((function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))}),this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(e){},_getButtonContainer:function(e){},_createButton:function(e,t){var i=elBySel(".jsStaticCollapsibleButton",t[0]);return null!==i&&i.parentNode===t[0]?(i.classList.remove("jsStaticCollapsibleButton"),i=$(i)):i=$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t),i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(e){return{}},_updateContent:function(e,t,i){this._containerData[e].target.html(t)},_success:function(e,t,i){var n,s;e.returnValues.containerID&&(n=e.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!e.returnValues.isOpen,s=e.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(e.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===a?"chevron-down":"chevron-right"),"open"===a?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===a}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){var n,s,a;return!e.length||((n=e.getOffsets("offset").top)>(s=$(document).height())-(a=$(window).height())&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,(function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i})),!1)}}),WCF.CloseOverlayHandler={addCallback:function(e,t){require(["Ui/CloseOverlay"],(function(i){i.add(e,t)}))},removeCallback:function(e){require(["Ui/CloseOverlay"],(function(t){t.remove(e)}))},forceExecution:function(){require(["Ui/CloseOverlay"],(function(e){e.execute()}))}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(e){e.add("__legacy__",t)}))},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(e){e.trigger()}))},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver)new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0});else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each((function(t){t.value(e)})),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){},_initOptions:function(){},_initOption:function(){},_handleChange:function(){},_change:function(){},_execute:function(){},_enableOption:function(){},_enableOptionElement:function(){},_enableOptions:function(){}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;void 0!==document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(e){if(!this._isExecuting){this._isExecuting=!0;var t=document[this._hiddenFieldName];this._callbacks.each((function(e){e.value(t)})),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var e,t;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(e=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(t=e[e.length-1].match(/\d+/g),this._options.updatePageNumber>0?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)):window.location.reload():this._tableContainer.remove()},_remove:function(e){var t;$.getLength(e)?(t=$(e.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==t.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){null==t||$.isFunction(t)?(this._callback=t||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter((function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()}),250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():(t.data("preventSubmit")||-1!==this._itemIndex)&&e.preventDefault()}},_keyUp:function(e){var t,i,n;switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}if(""===(t=this._getSearchString(e)))this._clearList(!1);else if(t.length>=this._triggerLength){if(this._lastValue===t)return;this._lastValue=t,i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}},this._delay?(null!==this._timer&&this._timer.stop(),n=this,this._timer=new WCF.PeriodicalExecuter((function(){n._queryServer(i),n._timer.stop(),n._timer=null}),this._delay)):this._queryServer(i)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(e){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t,i,n,s,a=$.trim(this._searchInput.val());if(this._commaSeperated){if((e.keyCode||e.which)==$.ui.keyCode.COMMA)return"";for(i=(t=a.split(",")).length,n=0;n<i;n++)t[n]=$.trim(t[n]);for(n=0;n<i;n++){if(s=t[n],!this._oldSearchString[n]){a=s;break}if(s!=this._oldSearchString[n]){a=s,this._caretAt=n;break}}this._oldSearchString=t}return a},_getParameters:function(e){return e},_success:function(e,t,i){var n,s,a;if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(n in e.returnValues)s=e.returnValues[n],this._createListItem(s);else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),a=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t,i,n=!1,s=$(e.currentTarget);this._commaSeperated?(t=s.data("label"),this._oldSearchString[this._caretAt]=t,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(t.toLowerCase())+t.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t,i,n=this._super(e),s=null;return e.icon?s=$(e.icon):this._includeUserGroups&&"group"===e.type&&(s=$('<span class="icon icon16 fa-users" />')),s&&(t=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(t))),n.data("type",e.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){$.isFunction(t)?WCF.inArray(e,this._loaded)?setTimeout((function(){t()}),1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){$.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),this._setupCallbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){var t,i;if(this._setupCallbacks[e]){for(t=0,i=this._setupCallbacks[e].length;t<i;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(t=0,i=this._callbacks[e].length;t<i;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],(function(t){t.register(e)}))},rebuild:function(e){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],(function(t){t.rebuild(e)}))}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(e,t){require(["WoltLabSuite/Core/Controller/Captcha"],function(i){try{i.add(e,t),this._registeredCaptchas.push(e)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(e){var t,i;if(-1===this._registeredCaptchas.indexOf(e))return t;i=require("WoltLabSuite/Core/Controller/Captcha");try{t=i.getData(e)}catch(t){console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"')}return t},removeCallback:function(e){require(["WoltLabSuite/Core/Controller/Captcha"],function(t){try{t.delete(e),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(e){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(e,t,i,n){require(["Ui/Notification"],function(t){t.show(i||this._message,e,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(e,t,i,n,s){if("object"==typeof n){var a=$("<div />");a.append(n),n=a.html()}require(["Ui/Confirmation"],(function(a){a.show({legacyCallback:t,message:e,parameters:i,template:n||"",messageIsHtml:!0===s})}))}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var e=$("meta[name=viewport]");this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return!!(document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen)}},WCF.System.PageNavigation={init:function(e,t){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],(function(i){var n,s,a=elBySelAll(e);for(n=0,s=a.length;n<s;n++)i.init(a[n],t)}))}},WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){var t,i;for(t in e.returnValues)if(void 0!==this._callbacks[t])for(i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:{},_className:"",_dialog:{},_proxy:{},_title:"",init:function(){},_success:function(){}}),WCF.InlineEditor=Class.extend({_callbacks:{},_dropdowns:{},_elements:{},_notification:{},_options:{},_proxy:{},_triggerElements:{},_updateData:{},init:function(){},_closeAll:function(){},_setOptions:function(){},registerCallback:function(){},_getTriggerElement:function(){},_show:function(){},_validate:function(){},_validateCallbacks:function(){},_success:function(){},_updateState:function(){},_click:function(){},_execute:function(){},_executeCallback:function(){},_hide:function(){}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var e;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),e.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",(function(){this.classList.contains("focus-visible")&&e[0].classList.add("active")})),this._fileUpload[0].addEventListener("blur",(function(){e[0].classList.remove("active")}))):(e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),elAttr(e[0],"tabindex","0"),e.click($.proxy(this._showOverlay,this))),this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i,n){var s,a,o,r,l,c,u,h,d=null,p=[];if(void 0!==n)p=n;else if(t)p.push(t);else if(i){switch(s="",i.type){case"image/png":s=".png";break;case"image/jpeg":s=".jpg";break;case"image/gif":s=".gif";break;case"image/webp":s=".webp"}p.push({name:"pasted-from-clipboard"+s})}else p=this._fileUpload.prop("files");if(p.length){if(a=new FormData,d=this._createUploadMatrix(p),!this._uploadMatrix[d].length)return null;for(o=0,r=p.length;o<r;o++)this._uploadMatrix[d][o]&&(l=this._uploadMatrix[d][o].data("internalFileID"),i?a.append("__files["+l+"]",i,p[o].name):a.append("__files["+l+"]",p[o],p[o].name));for(u in a.append("actionName",this._options.action),a.append("className",this._className),c=this._getParameters())a.append("parameters["+u+"]",c[u]);h=this,$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:a,contentType:!1,processData:!1,success:function(e,t,i){h._success(d,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",(function(e){h._progress(d,e)}),!1),e},xhrFields:{withCredentials:!0}})}return d},_createUploadMatrix:function(e){var t,i,n,s,a;if(e.length){for(t=this._uploadMatrix.length,this._uploadMatrix[t]=[],i=0,n=e.length;i<n;i++)s=e[i],(a=this._initFile(s)).hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a);return t}return null},_success:function(e,t){},_error:function(e,t,i){},_progress:function(e,t){var i,n=Math.round(100*t.loaded/t.total);for(i in this._uploadMatrix[e])this._uploadMatrix[e][i].find("progress").attr("value",n)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){var e,t,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),e=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e),t=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy((function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(t)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){var e,t,i,n,s,a,o,r=this._fileUpload.prop("files");for(e=0,t=r.length;e<t;e++)if(i=r[e],n=new FormData,s=this._createUploadMatrix(i),this._uploadMatrix[s].length){for(o in n.append("__files["+s+"]",i),n.append("actionName",this._options.action),n.append("className",this._className),a=this._getParameters())n.append("parameters["+o+"]",a[o]);this._sendRequest(s,n)}},_sendRequest:function(e,t){var i=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t,n,s){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",(function(t){i._progress(e,t)}),!1),t}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(e,t){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){var e,t,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),e=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e),t=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy((function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(t)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:{},_notification:{},_offset:0,_options:{},_proxy:{},_structure:{},init:function(){},_tableRowHelper:function(){},_submit:function(){},_success:function(){}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(e){var t=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(t=!0)}.bind(this)),t||(this._activeElementID="",this._identifier=e,require(["WoltLabSuite/Core/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){if(this._itemList=$(e),this._searchInput=$(t),this._data={},this._itemList.length&&this._searchInput.length){if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",(function(){setTimeout((function(){i._onPaste()}),100)}))}this._searchInput.parents(".dropdown").data("preventSubmit",!0)}else console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(e){return null!==e||this._keyPress(null)},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t?!0:(this.addItem({objectID:0,label:t}),e&&44===e.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){var e,t,i,n=$.trim(this._searchInput.val());for(e=0,t=(n=n.split(",")).length;e<t;e++)""!==(i=$.trim(n[e]))&&this.addItem({objectID:0,label:i});this._searchInput.val("")},load:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){return!(!this._data[e.objectID]||0===e.objectID&&this._allowCustomInput)||($('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label),!0)},clearList:function(){this._itemList.children("li").each($.proxy((function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))}),this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e,t){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(e,t,i,n,s,a){require(["WoltLabSuite/Core/Language/Chooser"],(function(o){o.init(e,t,i,n,s,a)}))}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1==this._container.length?this._convert():console.debug("[WCF.UserPanel] Unable to find container identified by '"+e+"', aborting.")},_convert:function(){var e,t;this._container.addClass("dropdown"),this._link=this._container.children("a").remove(),e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container),$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy((function(){return window.location=this._link.attr("href"),!1}),this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(e){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e,t,i){var n=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());n.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(n),this._updateBadge(e.returnValues.totalCount),this._after(n)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(n),this._updateBadge(0))},_updateBadge:function(e){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle"))).before(" "),t.html(e)}else this._container.find(".badge").remove()},_after:function(e){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var s,a=i.identify(this[0]);"close"===e?n.close(a):"render"===e?n.rebuild(a):"option"===e?3===t.length&&("title"===t[1]&&"string"==typeof t[2]?n.setTitle(a,t[2]):0===t[1].indexOf("on")?n.setCallback(a,t[1],t[2]):"closeConfirmMessage"===t[1]&&null===t[2]&&n.setCallback(a,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),s=1===t.length&&"object"==typeof t[0]?t[0]:{},n.openStatic(a,null,s),s.hasOwnProperty("title")&&n.setTitle(a,s.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e,t,i=$(this._items.get(0)).outerHeight();for(this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy((function(e,t){$(t).show().css({height:i,left:(this._width+this.options.itemGap)*e,width:this._width})}),this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element),e=0;e<this._count;e++)t=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",e).click($.proxy(this._click,this)).appendTo(this._buttonList),0==e&&t.find(".icon").addClass("active");this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy((function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})}),this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;this._timer=new WCF.PeriodicalExecuter((function(){e.moveTo(null)}),1e3*this.options.cycleInterval)}},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return i.length>1?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],(function(n,s){var a=s.getTabMenu(n.identify(t));null!==a&&a[e].apply(a,i)}))}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:e})}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){if("activePage"==e&&t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){},_updateSelection:function(){}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:{},_categories:{},init:function(){},_buildStructure:function(){},_updateSelection:function(){}}),WCF.Condition={},WCF.Notice={}; })(this);
// WCF.Like.js
(function (window, undefined) { "use strict";WCF.Like=Class.extend({init:function(){throw new Error("The `WCF.Like` API is obsolete and therefore no longer supported. Please use the current API `WoltLabSuite/Core/Ui/Reaction/Handler` instead.")},_domNodeInserted:function(){},_initContainers:function(){},_getContainers:function(){},_getWidgetContainer:function(){},_getObjectID:function(){},_addWidget:function(){},_buildWidget:function(){},_createWidget:function(){},_showLikeDetails:function(){},_click:function(){},_sendRequest:function(){},_success:function(){},_updateBadge:function(){},_updateSummary:function(){},_setActiveState:function(){}}); })(this);
(function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:{},_containerElements:{},_objectID:0,_objectTypeID:{},_options:{},_proxy:{},_search:{},_values:{},init:function(){},_reset:function(){},_loadACL:function(){},addObject:function(){},_createListItem:function(){},_removeItem:function(){},_selectFirstEntry:function(){},_success:function(){},_parseData:function(){},_click:function(){},_select:function(){},_change:function(){},_changeAll:function(){},_setupPermissions:function(){},_savePermissions:function(){},submit:function(){},_save:function(){}}); })(this);
// WCF.Attachment.js
-(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_replaceOnLoad:{},_options:{},init:function(t,e,i,a,n,s,r,l,o){var d,c;this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:r}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(a),this._tmpHash=n,this._parentObjectID=parseInt(s),this._editorId=l,this._options=$.extend(!0,this._options,o||{}),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),WCF.System.Event.addListener("com.woltlab.wcf.action.delete","attachment",this._onDelete.bind(this)),this._makeSortable(),this._insertAllButton=$('<p class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</p>").hide(),this._editorId&&(this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+this._editorId,this._submitInline.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this._editorId,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId,function(t){t.tmpHashes&&Array.isArray(t.tmpHashes)||(t.tmpHashes=[]);var e=t.tmpHashes.indexOf(n);0<this._fileListSelector.children("li:not(.uploadFailed)").length?-1===e&&t.tmpHashes.push(n):-1!==e&&t.tmpHashes.splice(e)}.bind(this)),d=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,function(t){var e,i,a,n,s,r=this._getImageAttachments(),l=t.attributes[0]||0;r.hasOwnProperty(l)&&(e=~~$("#"+this._editorId).data("redactor").opts.woltlab.attachmentThumbnailWidth,i=!0===(i=t.attributes[2])||"true"===i||~~i&&~~i<=e,(a=elCreate("img")).className="woltlabAttachment",a.src=r[l][i?"thumbnailUrl":"url"],elData(a,"attachment-id",l),"left"===(n=t.attributes[1]||"none")?a.classList.add("messageFloatObjectLeft"):"right"===n&&a.classList.add("messageFloatObjectRight"),(s=t.metacode).parentNode.insertBefore(a,s),elRemove(s),t.cancel=!0)}.bind(this)),c=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,this._sync.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this._editorId,function(){WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","submit_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","reset_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,d),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,c)}.bind(this)))},_editorUpload:function(e){var i=null;this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0);var t=function(t){null===i?this._autoInsert.push(t):this._replaceOnLoad[t]=i,e.uploadID=t}.bind(this);e.file?this._upload(void 0,e.file,void 0,t):(this._upload(void 0,void 0,e.blob,t),i=e.replace||null)},_getImageAttachments:function(){var a={};return this._fileListSelector.children("li").each(function(t,e){var i=$(e);i.data("isImage")&&(a[~~i.data("objectID")]={thumbnailUrl:i.find(".jsButtonAttachmentInsertThumbnail").data("url"),url:i.find(".jsButtonAttachmentInsertFull").data("url")})}),a},_submitInline:function(t){var e;this._tmpHash&&(t.tmpHash=this._tmpHash,e={},WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","getMetaData_"+this._editorId,e),e.tmpHashes&&Array.isArray(e.tmpHashes)&&0<e.tmpHashes.length&&(t.tmpHash+=","+e.tmpHashes.join(",")))},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t=this._buttonSelector.next("small.innerError"),e=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,i=this._fileUpload?this._fileUpload.prop("files").length:0;if(e<=0||e<i){var a=e<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,e);return t.length||(t=$('<small class="innerError" />').insertAfter(this._buttonSelector)),t.html(a),!1}return t.remove(),!0},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._editorId&&t.button&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","deleteAttachment_"+this._editorId,{attachmentId:t.button.data("objectID")})},_upload:function(s,r,l,o){var m=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(t,d,e,i){i.show();var a=[];r?a.push(r):l?a.push(t.blobToFile(l,"pasted-from-clipboard")):a=this._fileUpload.prop("files");var c,h,n=Promise.resolve(a);this._options.autoScale&&this._options.autoScale.enable&&(c=this._buttonSelector.data("maxSize"),h=new e,n=Array.prototype.reduce.call(a,function(t,o){return t.then(function(e){if(-1===["image/png","image/gif","image/jpeg"].indexOf(o.type))return e.push(o),e;var l=new Promise(function(t,e){setTimeout(function(){t(o)},1e4)}),t=h.loadFile(o).then(function(t){var e,i,a=t.exif,n=this._options.autoScale.maxWidth,s=this._options.autoScale.maxHeight,r=this._options.autoScale.quality;return 2<=window.devicePixelRatio&&(e=window.screen.width*window.devicePixelRatio,i=window.screen.height*window.devicePixelRatio,e-10<t.image.width&&t.image.width<10+e&&i-10<t.image.height&&(n=Math.min(n,window.screen.width))),h.resize(t.image,n,s,r,o.size>c,l).then(function(t){if(void 0===t)return o;var e=this._options.autoScale.fileType;return"keep"!==this._options.autoScale.fileType&&!d.containsTransparentPixels(t)||(e=o.type),h.saveFile({exif:a,image:t},o.name,e,r)}.bind(this)).then(function(t){return t.size>o.size?(console.debug('[WCF.Attachment] File size of "'+o.name+'" increased, uploading untouched image.'),o):t})}.bind(this)).catch(function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+o.name+'":',t),o});return Promise.race([l,t]).then(function(t){return e.push(t),e})}.bind(this))}.bind(this),Promise.resolve([]))),n.then(function(t){var e=void 0;return this._validateLimit()&&(e=m(s,void 0,void 0,t)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof o&&o(e),e}.bind(this)).catch(function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)}).finally(i.hide)}.bind(this),function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)})},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><span class="icon icon64 fa-spinner" /><div><div><p>'+t.name+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_useThumbnail:function(){return!0},_success:function(t,e){var i,a,n,s,r,l,o,d,c,h,m;for(var u in this._uploadMatrix[t]){this._uploadMatrix[t].hasOwnProperty(u)&&((a=this._uploadMatrix[t][u]).find("progress").remove(),n=a.data("filename"),s=a.data("internalFileID"),e.returnValues&&e.returnValues.attachments[s]?(i=e.returnValues.attachments[s],elData(a[0],"object-id",i.attachmentID),i.tinyURL?(a.children(".fa-spinner").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),a.data("height",i.height),a.data("width",i.width),elData(a[0],"is-image",i.isImage)):a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-"+i.iconName),(r=$('<a href=""></a>')).text(n).attr("href",i.url),r[0].target="_blank",0!=i.isImage&&r.addClass("jsImageViewer").attr("title",n),a.find("p").empty().append(r),a.find("small").append(i.formattedFilesize),l=a.find("ul").addClass("buttonGroup"),o=$('<li><span class="button small jsDeleteButton" data-object-id="'+i.attachmentID+'" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</span></li>"),l.append(o),a.data("objectID",i.attachmentID),this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</span></li>").appendTo(l),$('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</span></li>").appendTo(l)):$('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</span></li>").appendTo(l)),this._triggerSync("new",{html:a[0].outerHTML}),this._registerEditorButtons(a[0]),this._replaceOnLoad.hasOwnProperty(t)&&(a.hasClass("uploadFailed")||(d=this._replaceOnLoad[t])&&d.parentNode&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","replaceAttachment_"+this._editorId,{attachmentId:i.attachmentID,img:d,src:i.thumbnailURL?i.thumbnailURL:i.url}),this._replaceOnLoad[t]=null)):(a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),h="",e.returnValues&&e.returnValues.errors[s]?"uploadFailed"===(h=(c=e.returnValues.errors[s]).errorType)&&c.additionalData.phpLimitExceeded&&(h="uploadPhpLimit"):h="uploadFailed",a.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+h)+"</small>")),a.addClass("uploadFailed")),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),a.hasClass("uploadFailed")||((m=a.find(".jsButtonAttachmentInsertThumbnail")).length||(m=a.find(".jsButtonAttachmentInsertFull")),m.trigger("click"))))}this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId,{attachmentId:elData(t.currentTarget,"object-id"),url:elData(t.currentTarget,"url")})},_insertAll:function(){for(var t,e,i=0,a=this._fileListSelector[0].childNodes.length;i<a;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(a){this._fileListSelector.find("li").each(function(t,e){var i=$(e);i.children(".fa-spinner").length&&(i.addClass("uploadFailed").children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),i.find("div > div").append($('<small class="innerError">'+(a.responseJSON&&a.responseJSON.message?a.responseJSON.message:WCF.Language.get("wcf.attachment.upload.error.uploadFailed"))+"</small>")))})},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var i=[];this._fileListSelector.children("li:not(.uploadFailed)").each(function(t,e){i.push($(e).data("objectID"))}),i.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:i,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){var e=elData(t.button[0],"object-id"),i=elBySel('.formAttachmentListItem[data-object-id="'+e+'"]',this._fileListSelector[0]);null!==i&&elRemove(i),this._removeLimitError(t)},_sync:function(t){if(t.source!==this)switch(t.type){case"new":this._syncNew(t.data);break;default:throw new Error("Unexpected type '"+t.type+"'")}},_syncNew:function(a){require(["Dom/Util"],function(t){var e=t.createFragmentFromHtml(a.html),i=elBySel("li",e);i.id="",this._registerEditorButtons(i),this._fileListSelector[0].appendChild(i),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,{source:this,type:t,data:e})}}); })(this);
+(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_replaceOnLoad:{},_options:{},init:function(t,e,i,a,n,s,r,l,o){var d,c;this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:r}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(a),this._tmpHash=n,this._parentObjectID=parseInt(s),this._editorId=l,this._options=$.extend(!0,this._options,o||{}),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),WCF.System.Event.addListener("com.woltlab.wcf.action.delete","attachment",this._onDelete.bind(this)),this._makeSortable(),this._insertAllButton=$('<p class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</p>").hide(),this._editorId&&(this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+this._editorId,this._submitInline.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this._editorId,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId,function(t){var e;t.tmpHashes&&Array.isArray(t.tmpHashes)||(t.tmpHashes=[]),e=t.tmpHashes.indexOf(n),this._fileListSelector.children("li:not(.uploadFailed)").length>0?-1===e&&t.tmpHashes.push(n):-1!==e&&t.tmpHashes.splice(e)}.bind(this)),d=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,function(t){var e,i,a,n,s,r=this._getImageAttachments(),l=t.attributes[0]||0;r.hasOwnProperty(l)&&(e=~~$("#"+this._editorId).data("redactor").opts.woltlab.attachmentThumbnailWidth,i=!0===(i=t.attributes[2])||"true"===i||~~i&&~~i<=e,(a=elCreate("img")).className="woltlabAttachment",a.src=r[l][i?"thumbnailUrl":"url"],elData(a,"attachment-id",l),"left"===(n=t.attributes[1]||"none")?a.classList.add("messageFloatObjectLeft"):"right"===n&&a.classList.add("messageFloatObjectRight"),(s=t.metacode).parentNode.insertBefore(a,s),elRemove(s),t.cancel=!0)}.bind(this)),c=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,this._sync.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this._editorId,function(){WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","submit_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","reset_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,d),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,c)}.bind(this)))},_editorUpload:function(t){var e,i=null;this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0),e=function(e){null===i?this._autoInsert.push(e):this._replaceOnLoad[e]=i,t.uploadID=e}.bind(this),t.file?this._upload(void 0,t.file,void 0,e):(this._upload(void 0,void 0,t.blob,e),i=t.replace||null)},_getImageAttachments:function(){var t={};return this._fileListSelector.children("li").each((function(e,i){var a=$(i);a.data("isImage")&&(t[~~a.data("objectID")]={thumbnailUrl:a.find(".jsButtonAttachmentInsertThumbnail").data("url"),url:a.find(".jsButtonAttachmentInsertFull").data("url")})})),t},_submitInline:function(t){if(this._tmpHash){t.tmpHash=this._tmpHash;var e={};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","getMetaData_"+this._editorId,e),e.tmpHashes&&Array.isArray(e.tmpHashes)&&e.tmpHashes.length>0&&(t.tmpHash+=","+e.tmpHashes.join(","))}},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t,e=this._buttonSelector.next("small.innerError"),i=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,a=this._fileUpload?this._fileUpload.prop("files").length:0;return i<=0||i<a?(t=i<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,i),e.length||(e=$('<small class="innerError" />').insertAfter(this._buttonSelector)),e.html(t),!1):(e.remove(),!0)},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._editorId&&t.button&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","deleteAttachment_"+this._editorId,{attachmentId:t.button.data("objectID")})},_upload:function(t,e,i,a){var n=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(s,r,l,o){var d,c,h,m;o.show(),d=[],e?d.push(e):i?d.push(s.blobToFile(i,"pasted-from-clipboard")):d=this._fileUpload.prop("files"),c=Promise.resolve(d),this._options.autoScale&&this._options.autoScale.enable&&(h=this._buttonSelector.data("maxSize"),m=new l,c=Array.prototype.reduce.call(d,function(t,e){return t.then(function(t){var i,a;return-1===["image/png","image/jpeg","image/webp"].indexOf(e.type)?(t.push(e),t):(i=new Promise((function(t,i){setTimeout((function(){t(e)}),1e4)})),a=m.loadFile(e).then(function(t){var a,n,s=t.exif,l=this._options.autoScale.maxWidth,o=this._options.autoScale.maxHeight,d=this._options.autoScale.quality;return window.devicePixelRatio>=2&&(a=window.screen.width*window.devicePixelRatio,n=window.screen.height*window.devicePixelRatio,a-10<t.image.width&&t.image.width<a+10&&n-10<t.image.height&&(l=Math.min(l,window.screen.width))),m.resize(t.image,l,o,d,e.size>h,i).then(function(t){if(void 0===t)return e;var i=this._options.autoScale.fileType;return("keep"===this._options.autoScale.fileType||r.containsTransparentPixels(t))&&(i=e.type),m.saveFile({exif:s,image:t},e.name,i,d)}.bind(this)).then((function(t){return t.size>e.size?(console.debug('[WCF.Attachment] File size of "'+e.name+'" increased, uploading untouched image.'),e):t}))}.bind(this)).catch((function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+e.name+'":',t),e})),Promise.race([i,a]).then((function(e){return t.push(e),t})))}.bind(this))}.bind(this),Promise.resolve([]))),c.then(function(e){var i=void 0;return this._validateLimit()&&(i=n(t,void 0,void 0,e)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof a&&a(i),i}.bind(this)).catch((function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)})).finally(o.hide)}.bind(this),(function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)}))},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><span class="icon icon64 fa-spinner" /><div><div><p>'+t.name+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_useThumbnail:function(){return!0},_success:function(t,e){var i,a,n,s,r,l,o,d,c,h,m,u;for(a in this._uploadMatrix[t])this._uploadMatrix[t].hasOwnProperty(a)&&((n=this._uploadMatrix[t][a]).find("progress").remove(),s=n.data("filename"),r=n.data("internalFileID"),e.returnValues&&e.returnValues.attachments[r]?(i=e.returnValues.attachments[r],elData(n[0],"object-id",i.attachmentID),i.tinyURL?(n.children(".fa-spinner").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),n.data("height",i.height),n.data("width",i.width),elData(n[0],"is-image",i.isImage)):n.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-"+i.iconName),(l=$('<a href=""></a>')).text(s).attr("href",i.url),l[0].target="_blank",0!=i.isImage&&l.addClass("jsImageViewer").attr("title",s),n.find("p").empty().append(l),n.find("small").append(i.formattedFilesize),o=n.find("ul").addClass("buttonGroup"),d=$('<li><span class="button small jsDeleteButton" data-object-id="'+i.attachmentID+'" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</span></li>"),o.append(d),n.data("objectID",i.attachmentID),this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</span></li>").appendTo(o),$('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</span></li>").appendTo(o)):$('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</span></li>").appendTo(o)),this._triggerSync("new",{html:n[0].outerHTML}),this._registerEditorButtons(n[0]),this._replaceOnLoad.hasOwnProperty(t)&&(n.hasClass("uploadFailed")||(c=this._replaceOnLoad[t])&&c.parentNode&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","replaceAttachment_"+this._editorId,{attachmentId:i.attachmentID,img:c,src:i.thumbnailURL?i.thumbnailURL:i.url}),this._replaceOnLoad[t]=null)):(n.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),h="",e.returnValues&&e.returnValues.errors[r]?"uploadFailed"===(h=(m=e.returnValues.errors[r]).errorType)&&m.additionalData.phpLimitExceeded&&(h="uploadPhpLimit"):h="uploadFailed",n.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+h)+"</small>")),n.addClass("uploadFailed")),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),n.hasClass("uploadFailed")||((u=n.find(".jsButtonAttachmentInsertThumbnail")).length||(u=n.find(".jsButtonAttachmentInsertFull")),u.trigger("click"))));this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId,{attachmentId:elData(t.currentTarget,"object-id"),url:elData(t.currentTarget,"url")})},_insertAll:function(){var t,e,i,a;for(i=0,a=this._fileListSelector[0].childNodes.length;i<a;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(t){this._fileListSelector.find("li").each((function(e,i){var a=$(i);a.children(".fa-spinner").length&&(a.addClass("uploadFailed").children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),a.find("div > div").append($('<small class="innerError">'+(t.responseJSON&&t.responseJSON.message?t.responseJSON.message:WCF.Language.get("wcf.attachment.upload.error.uploadFailed"))+"</small>")))}))},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var t=[];this._fileListSelector.children("li:not(.uploadFailed)").each((function(e,i){t.push($(i).data("objectID"))})),t.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:t,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){var e=elData(t.button[0],"object-id"),i=elBySel('.formAttachmentListItem[data-object-id="'+e+'"]',this._fileListSelector[0]);null!==i&&elRemove(i),this._removeLimitError(t)},_sync:function(t){if(t.source!==this)switch(t.type){case"new":this._syncNew(t.data);break;default:throw new Error("Unexpected type '"+t.type+"'")}},_syncNew:function(t){require(["Dom/Util"],function(e){var i=e.createFragmentFromHtml(t.html),a=elBySel("li",i);a.id="",this._registerEditorButtons(a),this._fileListSelector[0].appendChild(a),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,{source:this,type:t,data:e})}}); })(this);
// WCF.ColorPicker.js
(function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({_bar:{},_barActive:!1,_barSelector:{},_dialog:{},_didInit:!1,_elementID:"",_gradient:{},_gradientActive:!1,_gradientSelector:{},_hex:{},_hsv:{},_newColor:{},_oldColor:{},_rgba:{},_rgbaRegExp:{},init:function(){},_open:function(){},_parseColor:function(){},_initColorPicker:function(){},_initColorPickerForm:function(){},_keyUpRGBA:function(){},_keyUpHex:function(){},_submit:function(){},_createInputElement:function(){},_mouseDownGradient:function(){},_mouseGradient:function(){},_mouseDownBar:function(){},_mouseBar:function(){},_blurRgba:function(){},_blurHex:function(){},_updateValues:function(){},hsvToRgb:function(n,o,t){return window.__wcf_bc_colorUtil.hsvToRgb(n,o,t)},rgbToHsv:function(n,o,t){return window.__wcf_bc_colorUtil.rgbToHsv(n,o,t)},hexToRgb:function(n){return window.__wcf_bc_colorUtil.hexToRgb(n)},rgbToHex:function(n,o,t){return window.__wcf_bc_colorUtil.rgbToHex(n,o,t)}}); })(this);
// WCF.Comment.js
-(function (window, undefined) { "use strict";WCF.Comment={},WCF.Comment.Handler=Class.extend({_commentButtonList:{},_comments:{},_container:null,_containerID:"",_displayedComments:0,_loadNextComments:null,_loadNextResponses:{},_proxy:null,_responses:{},_responseCache:{},_commentData:{},_guestDialog:null,_permalinkComment:null,_permalinkResponse:null,_scrollTarget:null,init:function(e){var t,n;this._commentButtonList={},this._comments={},this._containerID=e,this._displayedComments=0,this._loadNextComments=null,this._loadNextResponses={},this._permalinkComment=null,this._permalinkResponse=null,this._responseAdd=null,this._responseCache={},this._responseRevert=null,this._responses={},this._scrollTarget=null,this._onResponsesLoaded=null,this._container=$("#"+$.wcfEscapeID(this._containerID)),this._container.length?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initComments(),this._initResponses(),this._container.data("canAdd")&&(null===elBySel(".commentListAddComment .wysiwygTextarea",this._container[0])?console.error("Missing WYSIWYG implementation, adding comments is not available."):require(["WoltLabSuite/Core/Ui/Comment/Add","WoltLabSuite/Core/Ui/Comment/Response/Add"],function(e,t){new e(elBySel(".jsCommentAdd",this._container[0])),this._responseAdd=new t(elBySel(".jsCommentResponseAdd",this._container[0]),{callbackInsert:function(){null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null)}.bind(this)})}.bind(this))),require(["WoltLabSuite/Core/Ui/Comment/Edit","WoltLabSuite/Core/Ui/Comment/Response/Edit"],function(e,t){new e(this._container[0]),new t(this._container[0])}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Comment.Handler",$.proxy(this._domNodeInserted,this)),WCF.System.ObjectStore.add("WCF.Comment.Handler",this),window.addEventListener("hashchange",function(){var t,e=window.location.hash;e&&e.match(/.+\/(comment\d+)/)&&(t=RegExp.$1,window.setTimeout(function(){var e=elById(t);e&&e.scrollIntoView({behavior:"smooth"})},100))}),window.location.hash.match(/^#(?:[^\/]+\/)?comment(\d+)(?:\/response(\d+))?/)&&((t=elById("comment"+RegExp.$1))?RegExp.$2?(n=elById("comment"+RegExp.$1+"response"+RegExp.$2))?this._scrollTo(n,!0):this._loadResponseSegment(t,RegExp.$1,RegExp.$2):this._scrollTo(t,!0):this._loadCommentSegment(RegExp.$1,RegExp.$2))):console.debug("[WCF.Comment.Handler] Unable to find container identified by '"+this._containerID+"'")},_scrollTo:function(t,n){null===this._scrollTarget&&(this._scrollTarget=elCreate("span"),this._scrollTarget.className="commentScrollTarget",document.body.appendChild(this._scrollTarget)),this._scrollTarget.style.setProperty("top",t.getBoundingClientRect().top+window.pageYOffset-49+"px",""),require(["Ui/Scroll"],function(e){e.element(this._scrollTarget,function(){n&&(t.classList.contains("commentHighlightTarget")&&(t.classList.remove("commentHighlightTarget"),t.offsetTop),t.classList.add("commentHighlightTarget"))})}.bind(this))},_loadCommentSegment:function(e,t){this._permalinkComment=elCreate("li"),this._permalinkComment.className="commentPermalinkContainer loading",this._permalinkComment.innerHTML='<span class="icon icon48 fa-spinner"></span>',this._container[0].insertBefore(this._permalinkComment,this._container[0].firstChild),this._proxy.setOption("data",{actionName:"loadComment",className:"wcf\\data\\comment\\CommentAction",objectIDs:[e],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~t}}}),this._proxy.sendRequest()},_loadResponseSegment:function(e,t,n){this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>';var s=elBySel(".commentResponseList",e);s.insertBefore(this._permalinkResponse,s.firstChild),this._proxy.setOption("data",{actionName:"loadResponse",className:"wcf\\data\\comment\\CommentAction",objectIDs:[t],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~n}}}),this._proxy.sendRequest()},_handleLoadNextComments:function(){this._displayedComments<this._container.data("comments")?(null===this._loadNextComments&&(this._loadNextComments=$('<li class="commentLoadNext showMore"><button class="small">'+WCF.Language.get("wcf.comment.more")+"</button></li>").appendTo(this._container),this._loadNextComments.children("button").click($.proxy(this._loadComments,this))),this._loadNextComments.children("button").enable()):null!==this._loadNextComments&&this._loadNextComments.remove()},_handleLoadNextResponses:function(e){var t,n=this._comments[e];n.data("displayedResponses",n.find("ul.commentResponseList > li").length),n.data("displayedResponses")<n.data("responses")?void 0===this._loadNextResponses[e]&&(t=n.data("responses")-n.data("displayedResponses"),this._loadNextResponses[e]=$('<li class="jsCommentLoadNextResponses"><a>'+WCF.Language.get("wcf.comment.response.more",{count:t})+"</a></li>").appendTo(this._commentButtonList[e]),this._loadNextResponses[e].children("a").data("commentID",e).click($.proxy(this._loadResponses,this)),this._commentButtonList[e].parent().show()):void 0!==this._loadNextResponses[e]&&this._loadNextResponses[e].remove()},_loadComments:function(){this._loadNextComments.children("button").disable(),this._proxy.setOption("data",{actionName:"loadComments",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),lastCommentTime:this._container.data("lastCommentTime")}}}),this._proxy.sendRequest()},_loadResponses:function(e){this._loadResponsesExecute($(e.currentTarget).disable().data("commentID"),!1)},_loadResponsesExecute:function(e,t){this._proxy.setOption("data",{actionName:"loadResponses",className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{commentID:e,lastResponseTime:this._comments[e].data("lastResponseTime"),loadAllResponses:t?1:0}}}),this._proxy.sendRequest()},_domNodeInserted:function(){this._initComments(),this._initResponses()},_initComments:function(){var a=(a=elBySel('link[rel="canonical"]'))?a.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");e&&(a+="#"+elData(e,"name"));var l=this,m=!1;this._container.find(".jsComment").each(function(e,t){var n=$(t).removeClass("jsComment"),s=n.data("commentID");(l._comments[s]=n)[0].id="comment"+s;var o=n.find("ul.commentResponseList");o.length||(o=n.find(".commentContent"));var i=$('<div class="commentOptionContainer" />').hide().insertAfter(o);l._commentButtonList[s]=$('<ul class="inlineList dotSeparated" />').appendTo(i),l._handleLoadNextResponses(s),l._initComment(s,n),l._initPermalink(n[0],a),l._displayedComments++,m=!0}),m&&this._handleLoadNextComments()},_initComment:function(e,t){this._container.data("canAdd")&&this._initAddResponse(e,t),t.data("canEdit")&&$('<li><a href="#" class="jsCommentEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>").data("commentID",e).appendTo(t.find("ul.buttonList:eq(0)")).click($.proxy(this._delete,this));var n=elBySel(".jsEnableComment",t[0]);n&&n.addEventListener(WCF_CLICK_EVENT,this._enableComment.bind(this))},_enableComment:function(e){e.preventDefault();var t=e.currentTarget.closest(".comment");this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\comment\\CommentAction",objectIDs:[elData(t,"object-id")]}),this._proxy.sendRequest()},_initPermalink:function(e,t){var n=elCreate("a");n.href=t+(-1===t.indexOf("#")?"#":"/")+"comment"+elData(e,"object-id");var s=elBySel(".commentContent:not(.commentResponseContent) .containerHeadline time",e);s.parentNode.insertBefore(n,s),n.appendChild(s)},_initResponses:function(){var o=(o=elBySel('link[rel="canonical"]'))?o.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");for(var i in e&&(o+="#"+elData(e,"name")),this._comments)this._comments.hasOwnProperty(i)&&elBySelAll(".jsCommentResponse",this._comments[i][0],function(e){var t=$(e).removeClass("jsCommentResponse"),n=t.data("responseID");this._responses[n]=t,e.id="comment"+i+"response"+n,this._initResponse(n,t),this._initPermalinkResponse(i,e,n,o);var s=elBySel(".jsEnableResponse",e);s&&s.addEventListener(WCF_CLICK_EVENT,this._enableCommentResponse.bind(this))}.bind(this))},_enableCommentResponse:function(e){e.preventDefault();var t=e.currentTarget.closest(".commentResponse");this._proxy.setOption("data",{actionName:"enableResponse",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{responseID:elData(t,"object-id")}}}),this._proxy.sendRequest()},_initPermalinkResponse:function(e,t,n,s){var o=elCreate("a");o.href=s+(-1===s.indexOf("#")?"#":"/")+"comment"+e+"/response"+n;var i=elBySel(".commentResponseContent .containerHeadline time",t);i.parentNode.insertBefore(o,i),o.appendChild(i)},_initResponse:function(e,t){var n,s;t.data("canEdit")&&$('<li><a href="#" class="jsCommentResponseEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&(n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>"),s=this,n.data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")).click(function(e){s._delete(e,!0)}))},_initAddResponse:function(e,t){$('<li class="jsCommentShowAddResponse"><a>'+WCF.Language.get("wcf.comment.button.response.add")+"</a></li>").data("commentID",e).click($.proxy(this._showAddResponse,this)).appendTo(this._commentButtonList[e]);this._commentButtonList[e].parent().show()},_showAddResponse:function(e){var t,n,s;e.preventDefault(),null===this._onResponsesLoaded&&(null!==this._responseAdd?null!==(t=this._responseAdd.getContainer())&&(null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null),n=$(e.currentTarget),s=n.data("commentID"),this._onResponsesLoaded=function(){n.hide(),t.parentNode&&t.parentNode.classList.contains("jsCommentResponseAddContainer")&&elRemove(t.parentNode);var e=this._commentButtonList[s][0].closest(".commentOptionContainer");e.parentNode.insertBefore(t,e.nextSibling),"string"==typeof this._responseCache[s]?this._responseAdd.setContent(this._responseCache[s]):this._responseAdd.setContent(""),this._responseRevert=function(){this._responseCache[s]=this._responseAdd.getContent(),elRemove(t),n.show()}.bind(this),this._onResponsesLoaded=null}.bind(this),n.prev().hasClass("jsCommentLoadNextResponses")?(this._loadResponsesExecute(s,!0),n.parent().children(".button").disable()):this._onResponsesLoaded()):console.error("Missing response API."))},_delete:function(n,s){n.preventDefault(),WCF.System.Confirmation.show(WCF.Language.get("wcf.comment.delete.confirmMessage"),$.proxy(function(e){var t;"confirm"===e&&(t={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")},!0!==s?t.commentID=$(n.currentTarget).data("commentID"):t.responseID=$(n.currentTarget).data("responseID"),this._proxy.setOption("data",{actionName:"remove",className:"wcf\\data\\comment\\CommentAction",parameters:{data:t}}),this._proxy.sendRequest())},this))},_success:function(e,t,n){switch(e.actionName){case"enable":this._enable(e);break;case"enableResponse":this._enableResponse(e);break;case"loadComment":this._insertComment(e);break;case"loadComments":this._insertComments(e);break;case"loadResponse":this._insertResponse(e);break;case"loadResponses":this._insertResponses(e);break;case"remove":this._remove(e)}WCF.DOMNodeInsertedHandler.execute()},_enable:function(e){var t,n,s;!e.returnValues.commentID||(t=elBySel('.comment[data-object-id="'+e.returnValues.commentID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableComment",t))&&elRemove(s.parentNode))},_enableResponse:function(e){var t,n,s;!e.returnValues.responseID||(t=elBySel('.commentResponse[data-object-id="'+e.returnValues.responseID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableResponse",t))&&elRemove(s.parentNode))},_insertComment:function(e){var t,n;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkComment),(t=this._permalinkComment.previousElementSibling).classList.add("commentPermalinkContainer"),elRemove(this._permalinkComment),this._permalinkComment=t,e.returnValues.response&&(this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>',(n=elBySel(".commentResponseList",t)).insertBefore(this._permalinkResponse,n.firstChild),this._insertResponse({returnValues:{template:e.returnValues.response}})),t.offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkComment)},_insertResponse:function(e){var t;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkResponse),(t=this._permalinkResponse.previousElementSibling).classList.add("commentResponsePermalinkContainer"),elRemove(this._permalinkResponse),(this._permalinkResponse=t).offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkResponse)},_insertComments:function(e){var t;$(e.returnValues.template).insertBefore(this._loadNextComments),this._container.data("lastCommentTime",e.returnValues.lastCommentTime),this._permalinkComment&&(t=elData(this._permalinkComment,"object-id"),null!==elBySel('.comment[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkComment),this._permalinkComment=null)),this._initComments()},_insertResponses:function(e){var t,n=this._comments[e.returnValues.commentID];$(e.returnValues.template).appendTo(n.find("ul.commentResponseList")),n.data("lastResponseTime",e.returnValues.lastResponseTime),this._handleLoadNextResponses(e.returnValues.commentID),this._permalinkResponse&&(t=elData(this._permalinkResponse,"object-id"),null!==elBySel('.commentResponse[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkResponse),this._permalinkResponse=null)),null!==this._onResponsesLoaded&&this._onResponsesLoaded()},_remove:function(e){var t,n,s;e.returnValues.commentID?(this._comments[e.returnValues.commentID].remove(),delete this._comments[e.returnValues.commentID]):(t=this._responses[e.returnValues.responseID],(n=this._comments[t.parents("li.comment:eq(0)").data("commentID")]).data("responses",parseInt(n.data("responses"))-1),s=t.parent(),t.remove(),s.children().length||s.empty(),delete this._responses[e.returnValues.responseID])},_prepareEdit:function(){console.warn("This method is no longer supported.")},_keyUp:function(){console.warn("This method is no longer supported.")},_save:function(){console.warn("This method is no longer supported.")},_failure:function(){console.warn("This method is no longer supported.")},_edit:function(){console.warn("This method is no longer supported.")},_update:function(){console.warn("This method is no longer supported.")},_createGuestDialog:function(){console.warn("This method is no longer supported.")},_keyDown:function(){console.warn("This method is no longer supported.")},_submit:function(){console.warn("This method is no longer supported.")},_keyUpEdit:function(){console.warn("This method is no longer supported.")},_saveEdit:function(){console.warn("This method is no longer supported.")},_cancelEdit:function(){console.warn("This method is no longer supported.")}}),WCF.Comment.Response={}; })(this);
+(function (window, undefined) { "use strict";WCF.Comment={},WCF.Comment.Handler=Class.extend({_commentButtonList:{},_comments:{},_container:null,_containerID:"",_displayedComments:0,_loadNextComments:null,_loadNextResponses:{},_proxy:null,_responses:{},_responseCache:{},_commentData:{},_guestDialog:null,_permalinkComment:null,_permalinkResponse:null,_scrollTarget:null,init:function(e){var t,n;this._commentButtonList={},this._comments={},this._containerID=e,this._displayedComments=0,this._loadNextComments=null,this._loadNextResponses={},this._permalinkComment=null,this._permalinkResponse=null,this._responseAdd=null,this._responseCache={},this._responseRevert=null,this._responses={},this._scrollTarget=null,this._onResponsesLoaded=null,this._container=$("#"+$.wcfEscapeID(this._containerID)),this._container.length?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initComments(),this._initResponses(),this._container.data("canAdd")&&(null===elBySel(".commentListAddComment .wysiwygTextarea",this._container[0])?console.error("Missing WYSIWYG implementation, adding comments is not available."):require(["WoltLabSuite/Core/Ui/Comment/Add","WoltLabSuite/Core/Ui/Comment/Response/Add"],function(e,t){new e(elBySel(".jsCommentAdd",this._container[0])),this._responseAdd=new t(elBySel(".jsCommentResponseAdd",this._container[0]),{callbackInsert:function(){null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null)}.bind(this)})}.bind(this))),require(["WoltLabSuite/Core/Ui/Comment/Edit","WoltLabSuite/Core/Ui/Comment/Response/Edit"],function(e,t){new e(this._container[0]),new t(this._container[0])}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Comment.Handler",$.proxy(this._domNodeInserted,this)),WCF.System.ObjectStore.add("WCF.Comment.Handler",this),window.addEventListener("hashchange",(function(){var e,t=window.location.hash;t&&t.match(/.+\/(comment\d+)/)&&(e=RegExp.$1,window.setTimeout((function(){var t=elById(e);t&&t.scrollIntoView({behavior:"smooth"})}),100))})),window.location.hash.match(/^#(?:[^\/]+\/)?comment(\d+)(?:\/response(\d+))?/)&&((t=elById("comment"+RegExp.$1))?RegExp.$2?(n=elById("comment"+RegExp.$1+"response"+RegExp.$2))?this._scrollTo(n,!0):this._loadResponseSegment(t,RegExp.$1,RegExp.$2):this._scrollTo(t,!0):this._loadCommentSegment(RegExp.$1,RegExp.$2))):console.debug("[WCF.Comment.Handler] Unable to find container identified by '"+this._containerID+"'")},_scrollTo:function(e,t){null===this._scrollTarget&&(this._scrollTarget=elCreate("span"),this._scrollTarget.className="commentScrollTarget",document.body.appendChild(this._scrollTarget)),this._scrollTarget.style.setProperty("top",e.getBoundingClientRect().top+window.pageYOffset-49+"px",""),require(["Ui/Scroll"],function(n){n.element(this._scrollTarget,(function(){t&&(e.classList.contains("commentHighlightTarget")&&(e.classList.remove("commentHighlightTarget"),e.offsetTop),e.classList.add("commentHighlightTarget"))}))}.bind(this))},_loadCommentSegment:function(e,t){this._permalinkComment=elCreate("li"),this._permalinkComment.className="commentPermalinkContainer loading",this._permalinkComment.innerHTML='<span class="icon icon48 fa-spinner"></span>',this._container[0].insertBefore(this._permalinkComment,this._container[0].firstChild),this._proxy.setOption("data",{actionName:"loadComment",className:"wcf\\data\\comment\\CommentAction",objectIDs:[e],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~t}}}),this._proxy.sendRequest()},_loadResponseSegment:function(e,t,n){this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>';var s=elBySel(".commentResponseList",e);s.insertBefore(this._permalinkResponse,s.firstChild),this._proxy.setOption("data",{actionName:"loadResponse",className:"wcf\\data\\comment\\CommentAction",objectIDs:[t],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~n}}}),this._proxy.sendRequest()},_handleLoadNextComments:function(){this._displayedComments<this._container.data("comments")?(null===this._loadNextComments&&(this._loadNextComments=$('<li class="commentLoadNext showMore"><button class="small">'+WCF.Language.get("wcf.comment.more")+"</button></li>").appendTo(this._container),this._loadNextComments.children("button").click($.proxy(this._loadComments,this))),this._loadNextComments.children("button").enable()):null!==this._loadNextComments&&this._loadNextComments.remove()},_handleLoadNextResponses:function(e){var t,n=this._comments[e];n.data("displayedResponses",n.find("ul.commentResponseList > li").length),n.data("displayedResponses")<n.data("responses")?void 0===this._loadNextResponses[e]&&(t=n.data("responses")-n.data("displayedResponses"),this._loadNextResponses[e]=$('<li class="jsCommentLoadNextResponses"><a>'+WCF.Language.get("wcf.comment.response.more",{count:t})+"</a></li>").appendTo(this._commentButtonList[e]),this._loadNextResponses[e].children("a").data("commentID",e).click($.proxy(this._loadResponses,this)),this._commentButtonList[e].parent().show()):void 0!==this._loadNextResponses[e]&&this._loadNextResponses[e].remove()},_loadComments:function(){this._loadNextComments.children("button").disable(),this._proxy.setOption("data",{actionName:"loadComments",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),lastCommentTime:this._container.data("lastCommentTime")}}}),this._proxy.sendRequest()},_loadResponses:function(e){this._loadResponsesExecute($(e.currentTarget).disable().data("commentID"),!1)},_loadResponsesExecute:function(e,t){this._proxy.setOption("data",{actionName:"loadResponses",className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{commentID:e,lastResponseTime:this._comments[e].data("lastResponseTime"),loadAllResponses:t?1:0}}}),this._proxy.sendRequest()},_domNodeInserted:function(){this._initComments(),this._initResponses()},_initComments:function(){var e,t,n,s=elBySel('link[rel="canonical"]');s=s?s.href:window.location.toString().replace(/#.+$/,""),(e=this._container[0].closest(".tabMenuContent"))&&(s+="#"+elData(e,"name")),t=this,n=!1,this._container.find(".jsComment").each((function(e,o){var i,a,l=$(o).removeClass("jsComment"),m=l.data("commentID");t._comments[m]=l,l[0].id="comment"+m,(i=l.find("ul.commentResponseList")).length||(i=l.find(".commentContent")),a=$('<div class="commentOptionContainer" />').hide().insertAfter(i),t._commentButtonList[m]=$('<ul class="inlineList dotSeparated" />').appendTo(a),t._handleLoadNextResponses(m),t._initComment(m,l),t._initPermalink(l[0],s),t._displayedComments++,n=!0})),n&&this._handleLoadNextComments()},_initComment:function(e,t){var n;this._container.data("canAdd")&&this._initAddResponse(e,t),t.data("canEdit")&&$('<li><a href="#" class="jsCommentEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>").data("commentID",e).appendTo(t.find("ul.buttonList:eq(0)")).click($.proxy(this._delete,this)),(n=elBySel(".jsEnableComment",t[0]))&&n.addEventListener("click",this._enableComment.bind(this))},_enableComment:function(e){e.preventDefault();var t=e.currentTarget.closest(".comment");this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\comment\\CommentAction",objectIDs:[elData(t,"object-id")]}),this._proxy.sendRequest()},_initPermalink:function(e,t){var n,s=elCreate("a");s.href=t+(-1===t.indexOf("#")?"#":"/")+"comment"+elData(e,"object-id"),(n=elBySel(".commentContent:not(.commentResponseContent) .containerHeadline time",e)).parentNode.insertBefore(s,n),s.appendChild(n)},_initResponses:function(){var e,t,n=elBySel('link[rel="canonical"]');for(t in n=n?n.href:window.location.toString().replace(/#.+$/,""),(e=this._container[0].closest(".tabMenuContent"))&&(n+="#"+elData(e,"name")),this._comments)this._comments.hasOwnProperty(t)&&elBySelAll(".jsCommentResponse",this._comments[t][0],function(e){var s,o=$(e).removeClass("jsCommentResponse"),i=o.data("responseID");this._responses[i]=o,e.id="comment"+t+"response"+i,this._initResponse(i,o),this._initPermalinkResponse(t,e,i,n),(s=elBySel(".jsEnableResponse",e))&&s.addEventListener("click",this._enableCommentResponse.bind(this))}.bind(this))},_enableCommentResponse:function(e){e.preventDefault();var t=e.currentTarget.closest(".commentResponse");this._proxy.setOption("data",{actionName:"enableResponse",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{responseID:elData(t,"object-id")}}}),this._proxy.sendRequest()},_initPermalinkResponse:function(e,t,n,s){var o,i=elCreate("a");i.href=s+(-1===s.indexOf("#")?"#":"/")+"comment"+e+"/response"+n,(o=elBySel(".commentResponseContent .containerHeadline time",t)).parentNode.insertBefore(i,o),i.appendChild(o)},_initResponse:function(e,t){var n,s;t.data("canEdit")&&$('<li><a href="#" class="jsCommentResponseEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&(n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>"),s=this,n.data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")).click((function(e){s._delete(e,!0)})))},_initAddResponse:function(e,t){$('<li class="jsCommentShowAddResponse"><a>'+WCF.Language.get("wcf.comment.button.response.add")+"</a></li>").data("commentID",e).click($.proxy(this._showAddResponse,this)).appendTo(this._commentButtonList[e]);this._commentButtonList[e].parent().show()},_showAddResponse:function(e){var t,n,s;e.preventDefault(),null===this._onResponsesLoaded&&(null!==this._responseAdd?null!==(t=this._responseAdd.getContainer())&&(null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null),n=$(e.currentTarget),s=n.data("commentID"),this._onResponsesLoaded=function(){n.hide(),t.parentNode&&t.parentNode.classList.contains("jsCommentResponseAddContainer")&&elRemove(t.parentNode);var e=this._commentButtonList[s][0].closest(".commentOptionContainer");e.parentNode.insertBefore(t,e.nextSibling),"string"==typeof this._responseCache[s]?this._responseAdd.setContent(this._responseCache[s]):this._responseAdd.setContent(""),this._responseRevert=function(){this._responseCache[s]=this._responseAdd.getContent(),elRemove(t),n.show()}.bind(this),this._onResponsesLoaded=null}.bind(this),n.prev().hasClass("jsCommentLoadNextResponses")?(this._loadResponsesExecute(s,!0),n.parent().children(".button").disable()):this._onResponsesLoaded()):console.error("Missing response API."))},_delete:function(e,t){e.preventDefault(),WCF.System.Confirmation.show(WCF.Language.get("wcf.comment.delete.confirmMessage"),$.proxy((function(n){if("confirm"===n){var s={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")};!0!==t?s.commentID=$(e.currentTarget).data("commentID"):s.responseID=$(e.currentTarget).data("responseID"),this._proxy.setOption("data",{actionName:"remove",className:"wcf\\data\\comment\\CommentAction",parameters:{data:s}}),this._proxy.sendRequest()}}),this))},_success:function(e,t,n){switch(e.actionName){case"enable":this._enable(e);break;case"enableResponse":this._enableResponse(e);break;case"loadComment":this._insertComment(e);break;case"loadComments":this._insertComments(e);break;case"loadResponse":this._insertResponse(e);break;case"loadResponses":this._insertResponses(e);break;case"remove":this._remove(e)}WCF.DOMNodeInsertedHandler.execute()},_enable:function(e){var t,n,s;e.returnValues.commentID&&(t=elBySel('.comment[data-object-id="'+e.returnValues.commentID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableComment",t))&&elRemove(s.parentNode))},_enableResponse:function(e){var t,n,s;e.returnValues.responseID&&(t=elBySel('.commentResponse[data-object-id="'+e.returnValues.responseID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableResponse",t))&&elRemove(s.parentNode))},_insertComment:function(e){var t,n;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkComment),(t=this._permalinkComment.previousElementSibling).classList.add("commentPermalinkContainer"),elRemove(this._permalinkComment),this._permalinkComment=t,e.returnValues.response&&(this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>',(n=elBySel(".commentResponseList",t)).insertBefore(this._permalinkResponse,n.firstChild),this._insertResponse({returnValues:{template:e.returnValues.response}})),t.offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkComment)},_insertResponse:function(e){if(""!==e.returnValues.template){$(e.returnValues.template).insertBefore(this._permalinkResponse);var t=this._permalinkResponse.previousElementSibling;t.classList.add("commentResponsePermalinkContainer"),elRemove(this._permalinkResponse),this._permalinkResponse=t,t.offsetTop,t.classList.add("commentHighlightTarget")}else elRemove(this._permalinkResponse)},_insertComments:function(e){if($(e.returnValues.template).insertBefore(this._loadNextComments),this._container.data("lastCommentTime",e.returnValues.lastCommentTime),this._permalinkComment){var t=elData(this._permalinkComment,"object-id");null!==elBySel('.comment[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkComment),this._permalinkComment=null)}this._initComments()},_insertResponses:function(e){var t,n=this._comments[e.returnValues.commentID];$(e.returnValues.template).appendTo(n.find("ul.commentResponseList")),n.data("lastResponseTime",e.returnValues.lastResponseTime),this._handleLoadNextResponses(e.returnValues.commentID),this._permalinkResponse&&(t=elData(this._permalinkResponse,"object-id"),null!==elBySel('.commentResponse[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkResponse),this._permalinkResponse=null)),null!==this._onResponsesLoaded&&this._onResponsesLoaded()},_remove:function(e){var t,n,s;e.returnValues.commentID?(this._comments[e.returnValues.commentID].remove(),delete this._comments[e.returnValues.commentID]):(t=this._responses[e.returnValues.responseID],(n=this._comments[t.parents("li.comment:eq(0)").data("commentID")]).data("responses",parseInt(n.data("responses"))-1),s=t.parent(),t.remove(),s.children().length||s.empty(),delete this._responses[e.returnValues.responseID])},_prepareEdit:function(){console.warn("This method is no longer supported.")},_keyUp:function(){console.warn("This method is no longer supported.")},_save:function(){console.warn("This method is no longer supported.")},_failure:function(){console.warn("This method is no longer supported.")},_edit:function(){console.warn("This method is no longer supported.")},_update:function(){console.warn("This method is no longer supported.")},_createGuestDialog:function(){console.warn("This method is no longer supported.")},_keyDown:function(){console.warn("This method is no longer supported.")},_submit:function(){console.warn("This method is no longer supported.")},_keyUpEdit:function(){console.warn("This method is no longer supported.")},_saveEdit:function(){console.warn("This method is no longer supported.")},_cancelEdit:function(){console.warn("This method is no longer supported.")}}),WCF.Comment.Response={}; })(this);
// WCF.ImageViewer.js
-(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var i=$("a.jsImageViewer");i.length&&i.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(i){i.ctrlKey||(i.preventDefault(),i.stopPropagation(),$(i.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(i.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy(function(i,e){e.complete&&this._checkImageSize({currentTarget:e})},this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(i){var e,t=$(i.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((e=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<e.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(i){if(null!=i.state&&"imageViewer"===i.state.name&&i.state.container===this._eventNamespace)return this.open(i),void this.showImage(i.state.image);this.close(i)}.bind(this))},open:function(i,e){return i&&i.preventDefault(),!this._isOpen&&(i&&"popstate"===i.type||window.history.pushState({name:"imageViewer"},"",""),this.options.staticViewer?(t=this._getStaticImages(),this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,e),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy(function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()},this),500)):0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),1<this._items&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable()),this._bindListener(),require(["Ui/Screen"],function(i){i.pageOverlayOpen()}),!0);var t},close:function(i){if(i&&i.preventDefault(),i&&"popstate"===i.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],function(i){i.pageOverlayClose()}),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy(function(){var i=this._active+1;i==this._items&&(i=0),this.showImage(i)},this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle.children("span").removeClass("fa-play").addClass("fa-pause"),!0)},stopSlideshow:function(i){return!!this._slideshowEnabled&&(this._timer.stop(),i&&this._ui.slideshow.toggle.children("span").removeClass("fa-pause").addClass("fa-play"),!(this._slideshowEnabled=!1))},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,$.proxy(this._renderImage,this))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(i){switch(i.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var e=this._ui.header.find("h1 > a");1==e.length?window.location=e.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(i,s,t){this._container.addClass("open");var a,e,n,h=null;i&&(h=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(h.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=h.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),1<this._items&&this.options.enableSlideshow&&!s&&!t&&this.startSlideshow()),s?this._ui.imageList.children("li").each($.proxy(function(i,e){var t=$(e);if(t.data("objectID")==s)return t.trigger("click"),this.moveToImage(t.data("index")),!1},this)):t?(a=0,$(this.options.imageSelector).each(function(i,e){if($(e).wcfIdentify()==t)return a=i,!1}),e=this._ui.imageList.children("li:eq("+a+")"),-1!==this._active&&(n=!1,this._active!=e.data("index")&&(n=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(n=!0),n&&(this._active=-1)),e.trigger("click"),this.moveToImage(e.data("index"))):null!==h&&h.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(i){this.showImage($(i.currentTarget).data("index"),!0)},showImage:function(i,e){if(this._active==i)return!1;this.stopSlideshow(e||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=i,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"","");var t=this._images[i];this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active");var s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1;null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a;var n=this._active;this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy(function(){this._imageOnLoad(n,a)},this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL);var h,o=WCF.String.escapeHTML(t.image.title);return t.image.link&&(o='<a href="'+t.image.link+'">'+o+"</a>"),this._ui.header.find("h1").html(o),this.options.staticViewer||(h=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(h='<a href="'+t.series.link+'">'+h+"</a>"),this._ui.header.find("h2").html(h)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full.data("link",t.image.fullURL?t.image.fullURL:t.image.url),this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0},_imageOnLoad:function(i,e){i==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[e].addClass("active"),this.options.staticViewer&&this._renderImage(e,null),this.startSlideshow())},_renderImage:function(i,e,t){var s=!0;e||(i=this._activeImage,e=this._images[this._active],s=!(t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()})),t.height-=22,t.width-=20;var a,n=this._ui.images[i];n.prop("src")!==e.image.url&&n.prop("src",e.image.url),s&&n[0].complete&&n.trigger("load"),this.options.staticViewer&&!e.image.height&&n[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=e.image.url,e.image.height=a.height||n[0].naturalHeight,e.image.width=a.width||n[0].naturalWidth):(n.css({height:"auto",width:"auto"}),e.image.height=n[0].height,e.image.width=n[0].width));var h=e.image.height,o=e.image.width,l=0;h>t.height&&(l=t.height/h,h=t.height,o=Math.floor(o*l)),o>t.width&&(l=t.width/o,o=t.width,h=Math.floor(h*l));var r=Math.floor((t.width-o)/2);this._ui.images[i].css({height:h+"px",left:r+10+"px",marginTop:-1*Math.round(h/2)+"px",width:o+"px"})},_initUI:function(){if(this._didInit)return!1;this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body);var e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious icon fa-angle-double-left" /><div><ul /></div><span class="wcfImageViewerButtonNext icon fa-angle-double-right" /></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><span class="icon icon48 fa-angle-left" /></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><span class="icon icon48 fa-play" /></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><span class="icon icon48 fa-angle-right" /></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><span class="icon icon48 fa-expand" /></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><span class="icon icon48 fa-external-link" /></li>').appendTo(t);return this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")}),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")})],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy(function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))},this)),o.click(function(i){window.location=$(i.currentTarget).data("link")}),$('<span class="wcfImageViewerButtonClose icon icon48 fa-times pointer jsTooltip" title="'+WCF.Language.get("wcf.global.button.close")+'" />').appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(i){i.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var t=this;this._ui.imageContainer.swipe({swipeLeft:function(i){t._container.hasClass("maximized")&&t._nextImage(i)},swipeRight:function(i){t._container.hasClass("maximized")&&t._previousImage(i)},tap:function(i,e){switch(e.tagName){case"DIV":case"IMG":t._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active").children("span").toggleClass("fa-expand").toggleClass("fa-compress"),this._renderImage(null,void 0,null)},_next:function(i,e){var t;this._ui.buttonNext.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0),this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(e||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._preload(),this._toggleButtons()},_previous:function(i,e){this._ui.buttonPrevious.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(e||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(i){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),i&&(i.preventDefault(),i.stopPropagation()))},_previousImage:function(i){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),i&&(i.preventDefault(),i.stopPropagation()))},moveToImage:function(i){var e=(i-3)*this._thumbnailWidth,t=e+5*this._thumbnailWidth,s=this._thumbnailOffset,a=this._thumbnailOffset+this._thumbnailContainerWidth;if(e<s||a<t?!0:!1){var n=0;if(e<s){for(;e<s;)n++,s-=this._thumbnailWidth;this._previous(null,n)}else{for(;a<t;)n++,a+=this._thumbnailWidth;this._next(null,n)}}},_toggleButtons:function(){0<this._thumbnailOffset?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var i=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=i?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),0<this._active?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(i){this.options.staticViewer&&(this._images=[],this._ui.imageList.empty());for(var e=0,t=i.length;e<t;e++){var s=i[e],a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList);a.data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this));var n,h=a.children("img");h.get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(h)):(n=this,h.on("load",function(){var i=$(this);i.parent().removeClass("loading"),n.options.staticViewer&&n._fixThumbnailDimensions(i)})),s.listItem=a,this._images.push(s)}},_fixThumbnailDimensions:function(i){var e=new Image;e.src=i.prop("src");var t,s=e.height,a=e.width;s==a?s=a=80:s<a?(t=80/a,a=80,s*=t):(t=80/s,s=80,a*=t),i.css({height:s+"px",width:a+"px"})},_loadNextImages:function(i){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:i&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var a=[];return $(this.options.imageSelector).each(function(i,e){var t=$(e),s=t.find("> img, .attachmentThumbnailImage > img").first();s.length||(s=t.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),a.push({image:{fullURL:s.data("source")?s.data("source").replace(/\\\//g,"/"):t.prop("href"),link:"",title:t.prop("title"),url:t.prop("href")},series:null,thumbnail:{url:s.prop("src")},user:null})}),this._items=a.length,a},_success:function(i,e,t){i.returnValues.items&&(this._items=i.returnValues.items);var s=this._initUI();this._createThumbnails(i.returnValues.images);var a=i.returnValues.targetImageID?i.returnValues.targetImageID:0;this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
+(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var i=$("a.jsImageViewer");i.length&&i.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(i){i.ctrlKey||(i.preventDefault(),i.stopPropagation(),$(i.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(i.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy((function(i,e){e.complete&&this._checkImageSize({currentTarget:e})}),this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(i){var e,t=$(i.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((e=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<e.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(i){if(null!=i.state&&"imageViewer"===i.state.name&&i.state.container===this._eventNamespace)return this.open(i),void this.showImage(i.state.image);this.close(i)}.bind(this))},open:function(i,e){if(i&&i.preventDefault(),this._isOpen)return!1;if(i&&"popstate"===i.type||window.history.pushState({name:"imageViewer"},"",""),this.options.staticViewer){var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,e),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy((function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()}),this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),require(["Ui/Screen"],(function(i){i.pageOverlayOpen()})),!0},close:function(i){if(i&&i.preventDefault(),i&&"popstate"===i.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],(function(i){i.pageOverlayClose()})),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy((function(){var i=this._active+1;i==this._items&&(i=0),this.showImage(i)}),this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle.children("span").removeClass("fa-play").addClass("fa-pause"),!0)},stopSlideshow:function(i){return!!this._slideshowEnabled&&(this._timer.stop(),i&&this._ui.slideshow.toggle.children("span").removeClass("fa-pause").addClass("fa-play"),this._slideshowEnabled=!1,!0)},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,$.proxy(this._renderImage,this))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(i){switch(i.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var e=this._ui.header.find("h1 > a");1==e.length?window.location=e.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(i,e,t){var s,a,n,h;this._container.addClass("open"),s=null,i&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!e&&!t&&this.startSlideshow()),e?this._ui.imageList.children("li").each($.proxy((function(i,t){var s=$(t);if(s.data("objectID")==e)return s.trigger("click"),this.moveToImage(s.data("index")),!1}),this)):t?(a=0,$(this.options.imageSelector).each((function(i,e){if($(e).wcfIdentify()==t)return a=i,!1})),n=this._ui.imageList.children("li:eq("+a+")"),-1!==this._active&&(h=!1,this._active!=n.data("index")&&(h=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(h=!0),h&&(this._active=-1)),n.trigger("click"),this.moveToImage(n.data("index"))):null!==s&&s.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&(this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1))},_showImage:function(i){this.showImage($(i.currentTarget).data("index"),!0)},showImage:function(i,e){var t,s,a,n,h,o;return this._active!=i&&(this.stopSlideshow(e||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=i,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"",""),t=this._images[i],this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active"),s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a,n=this._active,this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy((function(){this._imageOnLoad(n,a)}),this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL),h=WCF.String.escapeHTML(t.image.title),t.image.link&&(h='<a href="'+t.image.link+'">'+h+"</a>"),this._ui.header.find("h1").html(h),this.options.staticViewer||(o=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(o='<a href="'+t.series.link+'">'+o+"</a>"),this._ui.header.find("h2").html(o)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full.data("link",t.image.fullURL?t.image.fullURL:t.image.url),this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0)},_imageOnLoad:function(i,e){i==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[e].addClass("active"),this.options.staticViewer&&this._renderImage(e,null),this.startSlideshow())},_renderImage:function(i,e,t){var s,a,n,h,o,l,r=!0;e||(i=this._activeImage,e=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},r=!1),t.height-=22,t.width-=20,(s=this._ui.images[i]).prop("src")!==e.image.url&&s.prop("src",e.image.url),r&&s[0].complete&&s.trigger("load"),this.options.staticViewer&&!e.image.height&&s[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=e.image.url,e.image.height=a.height||s[0].naturalHeight,e.image.width=a.width||s[0].naturalWidth):(s.css({height:"auto",width:"auto"}),e.image.height=s[0].height,e.image.width=s[0].width)),n=e.image.height,h=e.image.width,o=0,n>t.height&&(o=t.height/n,n=t.height,h=Math.floor(h*o)),h>t.width&&(o=t.width/h,h=t.width,n=Math.floor(n*o)),l=Math.floor((t.width-h)/2),this._ui.images[i].css({height:n+"px",left:l+10+"px",marginTop:-1*Math.round(n/2)+"px",width:h+"px"})},_initUI:function(){var i,e,t,s,a,n,h,o;return!this._didInit&&(this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body),i=$("<div><img /><img /></div>").appendTo(this._container),e=$('<footer><span class="wcfImageViewerButtonPrevious icon fa-angle-double-left" /><div><ul /></div><span class="wcfImageViewerButtonNext icon fa-angle-double-right" /></footer>').appendTo(this._container),t=$("<ul />").appendTo(i),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><span class="icon icon48 fa-angle-left" /></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><span class="icon icon48 fa-play" /></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><span class="icon icon48 fa-angle-right" /></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><span class="icon icon48 fa-expand" /></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><span class="icon icon48 fa-external-link" /></li>').appendTo(t),this._ui={buttonNext:e.children("span.wcfImageViewerButtonNext"),buttonPrevious:e.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:i,images:[i.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")})),i.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")}))],imageList:e.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy((function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))}),this)),o.click((function(i){window.location=$(i.currentTarget).data("link")})),$('<span class="wcfImageViewerButtonClose icon icon48 fa-times pointer jsTooltip" title="'+WCF.Language.get("wcf.global.button.close")+'" />').appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||i.click(function(e){e.target===i[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(i){i.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0)},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var i=this;this._ui.imageContainer.swipe({swipeLeft:function(e){i._container.hasClass("maximized")&&i._nextImage(e)},swipeRight:function(e){i._container.hasClass("maximized")&&i._previousImage(e)},tap:function(e,t){switch(t.tagName){case"DIV":case"IMG":i._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active").children("span").toggleClass("fa-expand").toggleClass("fa-compress"),this._renderImage(null,void 0,null)},_next:function(i,e){if(this._ui.buttonNext.hasClass("pointer")){null==e&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(e||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(i,e){this._ui.buttonPrevious.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(e||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(i){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),i&&(i.preventDefault(),i.stopPropagation()))},_previousImage:function(i){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),i&&(i.preventDefault(),i.stopPropagation()))},moveToImage:function(i){var e,t=(i-3)*this._thumbnailWidth,s=t+5*this._thumbnailWidth,a=this._thumbnailOffset,n=this._thumbnailOffset+this._thumbnailContainerWidth,h=!1;if((t<a||s>n)&&(h=!0),h)if(e=0,t<a){for(;t<a;)e++,a-=this._thumbnailWidth;this._previous(null,e)}else{for(;s>n;)e++,n+=this._thumbnailWidth;this._next(null,e)}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var i=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=i?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(i){var e,t,s,a,n,h;for(this.options.staticViewer&&(this._images=[],this._ui.imageList.empty()),e=0,t=i.length;e<t;e++)s=i[e],(a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList)).data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this)),(n=a.children("img")).get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n)):(h=this,n.on("load",(function(){var i=$(this);i.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(i)}))),s.listItem=a,this._images.push(s)},_fixThumbnailDimensions:function(i){var e,t,s,a=new Image;a.src=i.prop("src"),(e=a.height)==(t=a.width)?e=t=80:e<t?(s=80/t,t=80,e*=s):(s=80/e,e=80,t*=s),i.css({height:e+"px",width:t+"px"})},_loadNextImages:function(i){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:i&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var i=[];return $(this.options.imageSelector).each((function(e,t){var s=$(t),a=s.find("> img, .attachmentThumbnailImage > img").first();a.length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),i.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:a.prop("src")},user:null})})),this._items=i.length,i},_success:function(i,e,t){var s,a;i.returnValues.items&&(this._items=i.returnValues.items),s=this._initUI(),this._createThumbnails(i.returnValues.images),a=i.returnValues.targetImageID?i.returnValues.targetImageID:0,this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
// WCF.Label.js
-(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList=Class.extend({_labelInput:{},_labelList:{},init:function(){},_keyPressed:function(){}}),WCF.Label.ACPList.Connect=Class.extend({init:function(){},_click:function(){}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(a,t,e,n){if(this._container=null,this._groups={},this._showWithoutSelection=!0===n,this._initContainers(t),$.getLength(a))for(var o in a){var i=this._groups[o];i&&WCF.Dropdown.getDropdownMenu(i.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy(function(t,e){var n=$(e),i=n.data("labelID")||0;i&&a[o]==i&&this._selectLabel(n,!0)},this))}for(var s in this._containers){var l=this._containers[s];void 0===l.data("labelID")&&l.data("labelID",0)}this._container=$(t),e?$(e).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function r(t){t.addEventListener("wheel",function(t){t.preventDefault()},{passive:!1})}$(t).find(".labelChooser").each($.proxy(function(t,e){var n,i,a,o,s=$(e),l=s.data("groupID");this._groups[l]||(n=s.wcfIdentify(),null===(i=WCF.Dropdown.getDropdownMenu(n))&&(WCF.Dropdown.initDropdown(s.find(".dropdownToggle")),i=WCF.Dropdown.getDropdownMenu(n)),"div"==(a=i).getTagName()&&i.children(".scrollableDropdownMenu").length&&(a=$("<ul />").appendTo(i),i=i.children(".scrollableDropdownMenu")),this._groups[l]=s,i.children("li").data("groupID",l).click($.proxy(this._click,this)),s.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(a),this._showWithoutSelection&&r($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",l).appendTo(a).click($.proxy(this._click,this))[0]),s.data("forceSelection")||((o=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",l).appendTo(a)).click($.proxy(this._click,this)),r(o[0])))},this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var n=this._groups[t.data("groupID")];e&&void 0!==n.data("labelID")||(t.data("labelID")?n.data("labelID",t.data("labelID")):n.data("labelID",0),t=t.find("span > span"),n.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t=this._container.find(".formSubmit");for(var e in t.find('input[type="hidden"]').each(function(t,e){var n=$(e);0===n.attr("name").indexOf("labelIDs[")&&n.remove()}),this._groups){var n=this._groups[e];n.data("labelID")&&$('<input type="hidden" name="labelIDs['+e+']" value="'+n.data("labelID")+'" />').appendTo(t)}},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:{},init:function(){},_updateLabelGroups:function(){},_submit:function(){}}); })(this);
+(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList=Class.extend({_labelInput:{},_labelList:{},init:function(){},_keyPressed:function(){}}),WCF.Label.ACPList.Connect=Class.extend({init:function(){},_click:function(){}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,n,i){var a,o,s,l;if(this._container=null,this._groups={},this._showWithoutSelection=!0===i,this._initContainers(e),$.getLength(t))for(a in t)(o=this._groups[a])&&WCF.Dropdown.getDropdownMenu(o.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy((function(e,n){var i=$(n),o=i.data("labelID")||0;o&&t[a]==o&&this._selectLabel(i,!0)}),this));for(s in this._containers)void 0===(l=this._containers[s]).data("labelID")&&l.data("labelID",0);this._container=$(e),n?$(n).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function e(t){t.addEventListener("wheel",(function(t){t.preventDefault()}),{passive:!1})}$(t).find(".labelChooser").each($.proxy((function(t,n){var i,a,o,s,l=$(n),r=l.data("groupID");this._groups[r]||(i=l.wcfIdentify(),null===(a=WCF.Dropdown.getDropdownMenu(i))&&(WCF.Dropdown.initDropdown(l.find(".dropdownToggle")),a=WCF.Dropdown.getDropdownMenu(i)),o=a,"div"==a.getTagName()&&a.children(".scrollableDropdownMenu").length&&(o=$("<ul />").appendTo(a),a=a.children(".scrollableDropdownMenu")),this._groups[r]=l,a.children("li").data("groupID",r).click($.proxy(this._click,this)),l.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(o),this._showWithoutSelection&&e($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(o).click($.proxy(this._click,this))[0]),l.data("forceSelection")||((s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(o)).click($.proxy(this._click,this)),e(s[0])))}),this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var n=this._groups[t.data("groupID")];e&&void 0!==n.data("labelID")||(t.data("labelID")?n.data("labelID",t.data("labelID")):n.data("labelID",0),t=t.find("span > span"),n.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t,e,n=this._container.find(".formSubmit");for(t in n.find('input[type="hidden"]').each((function(t,e){var n=$(e);0===n.attr("name").indexOf("labelIDs[")&&n.remove()})),this._groups)(e=this._groups[t]).data("labelID")&&$('<input type="hidden" name="labelIDs['+t+']" value="'+e.data("labelID")+'" />').appendTo(n)},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:{},init:function(){},_updateLabelGroups:function(){},_submit:function(){}}); })(this);
// WCF.Location.js
-(function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(e,t){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition(function(t){e(t.coords.latitude,t.coords.longitude)},function(){e(void 0,void 0)},{timeout:t||5e3}):e(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy(function(){e.open(this._map,t)},this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t=null,e=null,o=null,s=null;for(var i in this._markers){var a=this._markers[i],n=a.getPosition().lat(),r=a.getPosition().lng();null===t?(t=e=n,o=s=r):(n<t?t=n:e<n&&(e=n),n<o?o=n:s<r&&(s=r))}this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(t,o),new google.maps.LatLng(e,s)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy(function(t){t.infoWindow&&t.infoWindow.open(this._map,t)},this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng())&&(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t,e,o){if(t.returnValues&&t.returnValues.markers)for(var s in t.returnValues.markers){var i=t.returnValues.markers[s];this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))}},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a=$(i),n=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);a.append($("<p />").append(n));var r=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",a.get(0));return n.data("marker",r),r},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t);for(var e=[],o=0,s=this._markers.length;o<s;o++){var i=this._markers[o];i.draggable||(i.setVisible(t),t&&e.push(i))}this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null},this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){var o=0;for(var s in t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var i=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy(function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))},this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(t){null!==t&&$(this._searchInput).val(t)},this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(o,t,e,s,i){t&&(e=t.getPosition().lat(),s=t.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(e,s);this._geocoder.geocode({latLng:a},function(t,e){e==google.maps.GeocoderStatus.OK?o(i?t:t[0].formatted_address):o(null)})}}; })(this);
+(function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition((function(e){t(e.coords.latitude,e.coords.longitude)}),(function(){t(void 0,void 0)}),{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy((function(){e.open(this._map,t)}),this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t,e,o,s,i=null,a=null,n=null,r=null;for(t in this._markers)o=(e=this._markers[t]).getPosition().lat(),s=e.getPosition().lng(),null===i?(i=a=o,n=r=s):(i>o?i=o:a<o&&(a=o),n>o?n=o:r<s&&(r=s));this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(i,n),new google.maps.LatLng(a,r)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy((function(t){t.infoWindow&&t.infoWindow.open(this._map,t)}),this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng())&&(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t,e,o){var s,i;if(t.returnValues&&t.returnValues.markers)for(s in t.returnValues.markers)i=t.returnValues.markers[s],this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a,n=$(i),r=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);return n.append($("<p />").append(r)),a=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",n.get(0)),r.data("marker",a),a},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){var e,o,s,i;for(void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t),e=[],o=0,s=this._markers.length;o<s;o++)(i=this._markers[o]).draggable||(i.setVisible(t),t&&e.push(i));this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy((function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null}),this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){var o,s,i;if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){for(s in o=0,t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),i=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy((function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))}),this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy((function(t){null!==t&&$(this._searchInput).val(t)}),this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},(function(e,o){o==google.maps.GeocoderStatus.OK?t(i?e:e[0].formatted_address):t(null)}))}}; })(this);
// WCF.Message.js
-(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).on("unload",function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t,n,i=$(e.currentTarget),a=i.prop("href"),s=i.data("linkTitle")?i.data("linkTitle"):a,o=a.hashCode();void 0===this._cache[o]?(t=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),t=!0):this._dialog.empty(),n=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",a).appendTo(n),n=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+a+"']"+s+"[/url]").appendTo(n),n=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+a+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(n),""!==this._shareButtonsTemplate&&(n=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(n.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(a))),this._cache[o]=this._dialog.html(),t?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[o]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click(function(){$(this).select()});navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown(function(){return!1}).removeAttr("readonly").click(function(){this.setSelectionRange(0,9999)})}}),WCF.Message.Share.Page=Class.extend({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var n=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),e=this.element.find("> div, > fieldset");if(n.length==e.length){var i=this.element.data("preselect");e.each(function(e,t){if(null!==elBySel(".innerError",t))return i=$(n[e]).data("name"),!1}),"true"===i&&(i=!0),this._tabs=[],this._tabsByName={};for(var t=0;t<n.length;t++){var a,s=$(n[t]),o=$(e[t]),l=s.data("name");void 0===l&&(void 0!==(a=s.children("a").prop("href"))&&a.match(/#([a-zA-Z_-]+)$/)&&(l=RegExp.$1),void 0===l&&(l=s.wcfIdentify())),this._tabs.push({container:o,name:l,tab:s}),this._tabsByName[l]=t;var c=s.children("a").data("index",t).on("mousedown",this._showTab.bind(this));c.attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",o[0].id),c.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(i===l||!0===i&&0===t)&&c.trigger("mousedown")}!0===i&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click");var r=this.element.data("collapsible");void 0!==r&&(this.options.collapsible=r);var u=elData(this.element[0],"wysiwyg-container-id");u&&WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+u,function(){for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}.bind(this))}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,n){var i=null===e?t:$(e.currentTarget).data("index");n=!this.options.collapsible||!0===n;for(var a=null,s=0;s<this._tabs.length;s++){var o=this._tabs[s];if(s==i){if(!o.tab.hasClass("active")){o.tab.addClass("active"),o.container.addClass("active"),(a=o).tab.children("a").attr("aria-expanded",!0);var l,c=o.container[0];null!==elBySel(".messageTabMenuContent.active",c)||null===elBySel(".messageTabMenuContent",c)||null!==(l=elBySel("nav > ul > li[data-name] > a",c))&&$(l).trigger("mousedown");continue}if(!0===n)continue}o.tab.removeClass("active"),o.container.removeClass("active"),o.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==a&&this._trigger("show",{},{activeTab:a}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
+(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("unload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,n,i,a,s,o;e.preventDefault(),n=(t=$(e.currentTarget)).prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):n,a=n.hashCode(),void 0===this._cache[a]?(s=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),s=!0):this._dialog.empty(),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",n).appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+n+"']"+i+"[/url]").appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+n+'">'+WCF.String.escapeHTML(i)+"</a>").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(n))),this._cache[a]=this._dialog.html(),s?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[a]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),WCF.Message.Share.Page=Class.extend({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],(function(e){e.init()}))}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,n,i,a,s,o,l,c,r=this.element.find("> nav"),u=r.find("> ul > li:not(.jsFlexibleMenuDropdown)"),d=this.element.find("> div, > fieldset");if(u.length==d.length){for(e=this.element.data("preselect"),d.each((function(t,n){if(null!==elBySel(".innerError",n))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t<u.length;t++)n=$(u[t]),i=$(d[t]),void 0===(a=n.data("name"))&&(void 0!==(s=n.children("a").prop("href"))&&s.match(/#([a-zA-Z_-]+)$/)&&(a=RegExp.$1),void 0===a&&(a=n.wcfIdentify())),this._tabs.push({container:i,name:a,tab:n}),this._tabsByName[a]=t,(o=n.children("a").data("index",t).on("mousedown",this._showTab.bind(this))).attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",i[0].id),o.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(e===a||!0===e&&0===t)&&o.trigger("mousedown");!0===e&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click"),void 0!==(l=this.element.data("collapsible"))&&(this.options.collapsible=l),(c=elData(this.element[0],"wysiwyg-container-id"))&&WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+c,function(){for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}.bind(this))}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,n){var i,a,s,o,l,c=null===e?t:$(e.currentTarget).data("index");for(n=!this.options.collapsible||!0===n,i=null,a=0;a<this._tabs.length;a++){if(s=this._tabs[a],a==c){if(!s.tab.hasClass("active")){s.tab.addClass("active"),s.container.addClass("active"),i=s,s.tab.children("a").attr("aria-expanded",!0),o=s.container[0],null===elBySel(".messageTabMenuContent.active",o)&&null!==elBySel(".messageTabMenuContent",o)&&null!==(l=elBySel("nav > ul > li[data-name] > a",o))&&$(l).trigger("mousedown");continue}if(!0===n)continue}s.tab.removeClass("active"),s.container.removeClass("active"),s.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==i&&this._trigger("show",{},{activeTab:i}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
// WCF.Poll.js
-(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:{},_count:0,_editorId:"",_maxOptions:0,init:function(){},_createOptionList:function(){},_createOption:function(){},_keyDown:function(){},_addOption:function(){},_removeOption:function(){},_submit:function(){},_reset:function(){},_validate:function(){}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var s,e=$(t);e.length?(this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php?poll/&t="+SECURITY_TOKEN}),s=this,e.each(function(t,e){var o=$(e),i=o.data("pollID");void 0===s._polls[i]&&(s._cache[i]={result:"",vote:""},s._polls[i]=o,s._canViewParticipants[i]=!!o.data("canViewParticipants"),s._canViewResult[i]=!!o.data("canViewResult"),s._canVote[i]=!!o.data("canVote"),s._bindListeners(i),o.data("inVote")&&s._prepareVote(i),s._toggleButtons(i))})):console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.")},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[o]&&this._polls[o].data("inVote")&&(this._cache[o].result?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].result),this._polls[o].data("inVote",!1),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getResult",pollID:o}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canVote[o]&&(this._polls[o].data("inVote")||(this._cache[o].vote?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].vote),this._polls[o].data("inVote",!0),this._prepareVote(o),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getVote",pollID:o}),this._proxy.sendRequest())))},_success:function(t,e,o){if(t&&t.actionName){var i=t.pollID;switch(t.resultTemplate&&(this._cache[i].result=t.resultTemplate),t.voteTemplate&&(this._cache[i].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,i);break;case"getVote":this._showVote(null,i);break;case"vote":this._canViewResult[i]=!0,this._canVote[i]=!!t.canVote,this._polls[i].data("isPublic")&&(this._canViewParticipants[i]=!0);var s=elBySel(".jsPollTotalVotes",this._polls[i][0]);s.textContent=WCF.String.formatNumeric(t.totalVotes),elData(s,"tooltip",t.totalVotesTooltip),this._showResult(null,i)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),o=this;this._inputElements[t]=e.find("input").change(function(){o._handleVoteButton(t)}),this._handleVoteButton(t);var i=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){o._enforceMaxVotes(t,i)}),this._enforceMaxVotes(t,i))},_enforceMaxVotes:function(t,e){var o=this._inputElements[t];o.filter(":checked").length==e?o.filter(":not(:checked)").disable():o.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],o=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?o.enable():o.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var o=!0;this._polls[t].data("inVote")?(o=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(o=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(o=!1,e.find(".jsButtonPollShowParticipants").show())),o&&e.hide()},_vote:function(t){var i,e=$(t.currentTarget).data("pollID");this._canVote[e]&&(i=[],this._inputElements[e].each(function(t,e){var o=$(e);o.is(":checked")&&i.push(o.data("optionID"))}),i.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:i,pollID:e}),this._proxy.sendRequest()))}}); })(this);
+(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:{},_count:0,_editorId:"",_maxOptions:0,init:function(){},_createOptionList:function(){},_createOption:function(){},_keyDown:function(){},_addOption:function(){},_removeOption:function(){},_submit:function(){},_reset:function(){},_validate:function(){}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var e,o=$(t);o.length?(this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php?poll/&t="+SECURITY_TOKEN}),e=this,o.each((function(t,o){var i=$(o),s=i.data("pollID");void 0===e._polls[s]&&(e._cache[s]={result:"",vote:""},e._polls[s]=i,e._canViewParticipants[s]=!!i.data("canViewParticipants"),e._canViewResult[s]=!!i.data("canViewResult"),e._canVote[s]=!!i.data("canVote"),e._bindListeners(s),i.data("inVote")&&e._prepareVote(s),e._toggleButtons(s))}))):console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.")},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[o]&&this._polls[o].data("inVote")&&(this._cache[o].result?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].result),this._polls[o].data("inVote",!1),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getResult",pollID:o}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canVote[o]&&(this._polls[o].data("inVote")||(this._cache[o].vote?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].vote),this._polls[o].data("inVote",!0),this._prepareVote(o),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getVote",pollID:o}),this._proxy.sendRequest())))},_success:function(t,e,o){var i,s;if(t&&t.actionName)switch(i=t.pollID,t.resultTemplate&&(this._cache[i].result=t.resultTemplate),t.voteTemplate&&(this._cache[i].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,i);break;case"getVote":this._showVote(null,i);break;case"vote":this._canViewResult[i]=!0,this._canVote[i]=!!t.canVote,this._polls[i].data("isPublic")&&(this._canViewParticipants[i]=!0),(s=elBySel(".jsPollTotalVotes",this._polls[i][0])).textContent=WCF.String.formatNumeric(t.totalVotes),elData(s,"tooltip",t.totalVotesTooltip),this._showResult(null,i)}},_prepareVote:function(t){var e,o,i;this._polls[t].find(".jsButtonPollVote").disable(),e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),o=this,this._inputElements[t]=e.find("input").change((function(){o._handleVoteButton(t)})),this._handleVoteButton(t),i=e.data("maxVotes"),this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change((function(){o._enforceMaxVotes(t,i)})),this._enforceMaxVotes(t,i))},_enforceMaxVotes:function(t,e){var o=this._inputElements[t];o.filter(":checked").length==e?o.filter(":not(:checked)").disable():o.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],o=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?o.enable():o.disable()},_toggleButtons:function(t){var e,o=this._polls[t].children(".formSubmit");o.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide(),e=!0,this._polls[t].data("inVote")?(e=!1,o.find(".jsButtonPollVote").show(),this._canViewResult[t]&&o.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(e=!1,o.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(e=!1,o.find(".jsButtonPollShowParticipants").show())),e&&o.hide()},_vote:function(t){var e,o=$(t.currentTarget).data("pollID");this._canVote[o]&&(e=[],this._inputElements[o].each((function(t,o){var i=$(o);i.is(":checked")&&e.push(i.data("optionID"))})),e.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:e,pollID:o}),this._proxy.sendRequest()))}}); })(this);
// WCF.Search.Message.js
-(function (window, undefined) { "use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,s){var t,r;$.isFunction(i)?(this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this)),r=(t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify())).find("li.dropdownDivider").last(),this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(r),this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(r).children("ul"),t.find("input, label").on("click",function(e){e.stopPropagation()}),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)})):console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.")},_createListItem:function(e){this._divider.show(),this._list.parent().show(),this._super(e)},_clearList:function(e){e&&this._searchInput.val(""),this._divider.hide(),this._list.empty().parent().hide(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1}}); })(this);
+(function (window, undefined) { "use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,s){var t,r;$.isFunction(i)?(this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy((function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()}),this)),r=(t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify())).find("li.dropdownDivider").last(),this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(r),this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(r).children("ul"),t.find("input, label").on("click",(function(e){e.stopPropagation()})),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)})):console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.")},_createListItem:function(e){this._divider.show(),this._list.parent().show(),this._super(e)},_clearList:function(e){e&&this._searchInput.val(""),this._divider.hide(),this._list.empty().parent().hide(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1}}); })(this);
// WCF.User.js
-(function (window, undefined) { "use strict";WCF.User.Login=Class.extend({_loginSubmitButton:null,_password:null,_passwordContainer:null,_useCookies:null,_useCookiesContainer:null,init:function(e){this._loginSubmitButton=$("#loginSubmitButton"),this._password=$("#password"),this._passwordContainer=this._password.parents("dl"),this._useCookies=$("#useCookies"),this._useCookiesContainer=this._useCookies.parents("dl"),$("#loginForm").find("input[name=action]").change($.proxy(this._change,this)),e&&WCF.User.QuickLogin.init()},_change:function(e){"register"===$(e.currentTarget).val()?this._setState(!1,WCF.Language.get("wcf.user.button.register")):this._setState(!0,WCF.Language.get("wcf.user.button.login"))},_setState:function(e,t){e?(this._password.enable(),this._passwordContainer.removeClass("disabled"),this._useCookies.enable(),this._useCookiesContainer.removeClass("disabled")):(this._password.disable(),this._passwordContainer.addClass("disabled"),this._useCookies.disable(),this._useCookiesContainer.addClass("disabled")),this._loginSubmitButton.val(t)}}),WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},init:function(){},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:{},init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},updateBadge:function(){},updateUserNotificationCount:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.QuickLogin={init:function(){require(["EventHandler","Ui/Dialog"],function(e,s){var n=elById("loginForm"),a=elBySel(".loginFormLogin",n);a&&!a.nextElementSibling&&n.classList.add("loginFormLoginOnly");for(var o=elBySel(".loginFormRegister",n),t=function(e){if(e instanceof Event&&(e.preventDefault(),e.stopPropagation()),n.style.removeProperty("display"),s.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==a&&null!==o){var t=a.offsetTop,i=0;if(n.clientWidth>2*a.clientWidth)for(;t<o.offsetTop-50;)i+=100,a.style.setProperty("margin-bottom",i+"px","")}},i=document.getElementsByClassName("loginLink"),r=0,l=i.length;r<l;r++)i[r].addEventListener(WCF_CLICK_EVENT,t);var c=n.querySelector("#loginForm input[name=url]");null===c||c.value.match(/^https?:\/\//)||c.setAttribute("value",window.location.protocol+"//"+window.location.host+c.getAttribute("value")),e.add("com.woltlab.wcf.UserMenuMobile","more",function(e){"com.woltlab.wcf.login"===e.identifier&&(e.handler.close(!0),t())})})}},WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t=$(e.currentTarget).data("userID");void 0===this._cache[t]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[t]}),this._proxy.sendRequest()):this._show(t)},_show:function(e){null===this._dialog?(this._dialog=$("<div>"+this._cache[e]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[e]),this._dialog.wcfDialog("open"))},_success:function(e,t,i){this._cache[e.returnValues.userID]=e.returnValues.template,this._show(e.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(e){this._profileContent=$("#profileContent"),this._userID=e;var s=this._profileContent.data("active"),n=!1;this._profileContent.find("div.tabMenuContent").each($.proxy(function(e,t){var i=$(t).wcfIdentify();s===i?this._hasContent[i]=!0:(this._hasContent[i]=!1,n=!0)},this)),n&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy(function(e,t){var i=$(t);if(i.hasClass("ui-state-active"))return e&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(e){e.preventDefault(),require(["Ui/TabMenu"],function(e){e.getTabMenu("profileContent").select("likes")})}.bind(this))},_loadContent:function(e,t){var i=$(t.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(i,e,t){var s=i.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(e,t){t.insertHtml(i.returnValues.template,elById(s),"append"),e.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(e,t,i){this._element=e,this._element.blur($.proxy(this._blur,this)),this._confirmElement=t||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(e){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(e){var t=this._element.val();if(!t)return this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"));if(null!==this._confirmElement){var i=this._confirmElement.val();if(""!=i&&t!=i)return this._showError(this._confirmElement,this._errorMessages.notEqual)}this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(e){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(e)},_success:function(e,t,i){e.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+e.returnValues.error))},_showError:function(e,t){e.parent().parent().addClass("formError").removeClass("formSuccess");var i=e.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(e)),i.text(t)},_showSuccess:function(e){e.parent().parent().addClass("formSuccess").removeClass("formError"),e.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(e){this._options=$.extend(!0,{minlength:3,maxlength:25},e)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var e=this._element.val();return!(e.length<this._options.minlength||e.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.Validation.Password=WCF.User.Registration.Validation.extend({_actionName:"validatePassword",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{password:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.password.error.",notEqual:WCF.Language.get("wcf.user.confirmPassword.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(e,t){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===t,this._userID=e,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button class="small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var e={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?e.userID=this._userID:this._filteredByFollowedUsers&&(e.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:e}),this._proxy.sendRequest()},_switchContext:function(e){e.preventDefault(),$(e.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",e.returnValues.lastEventTime),this._container.data("lastEventID",e.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.LikeLoader=Class.extend({_container:null,_likeType:"received",_likeValue:1,_loadButton:null,_noMoreEntries:null,_proxy:null,_userID:0,init:function(e){var t;this._container=$("#likeList"),this._userID=e,this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),t=$('<li class="likeListMore showMore"><button class="small">'+WCF.Language.get("wcf.like.likes.more")+"</button><small>"+WCF.Language.get("wcf.like.likes.noMoreEntries")+"</small></li>").appendTo(this._container),this._loadButton=t.children("button").click($.proxy(this._click,this)),this._noMoreEntries=t.children("small").hide(),2==this._container.find("> li").length&&(this._loadButton.hide(),this._noMoreEntries.show()),$("#likeType .button").click($.proxy(this._clickLikeType,this)),$("#likeValue .button").click($.proxy(this._clickLikeValue,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_clickLikeType:function(e){var t=$(e.currentTarget);this._likeType!=t.data("likeType")&&(this._likeType=t.data("likeType"),$("#likeType .button").removeClass("active"),t.addClass("active"),this._reload())},_clickLikeValue:function(e){var t=$(e.currentTarget);this._likeValue!=t.data("likeValue")&&(this._likeValue=t.data("likeValue"),$("#likeValue .button").removeClass("active"),t.addClass("active"),$("#likeType > li:first-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesReceived")),$("#likeType > li:last-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesGiven")),this._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),this._reload())},_reload:function(){this._container.find("> li:not(:first-child):not(:last-child)").remove(),this._container.data("lastLikeTime",0),this._click()},_click:function(){this._loadButton.enable();var e={lastLikeTime:this._container.data("lastLikeTime"),userID:this._userID,likeType:this._likeType,likeValue:this._likeValue};this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\like\\LikeAction",parameters:e}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",e.returnValues.lastLikeTime),this._noMoreEntries.hide(),this._loadButton.show().enable()):(this._noMoreEntries.show(),this._loadButton.hide())}}),WCF.User.ProfilePreview=WCF.Popover.extend({_proxy:null,_userProfiles:{},init:function(){this._super(".userLink"),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1}),WCF.System.ObjectStore.add("WCF.User.ProfilePreview",this)},_loadContent:function(){var n,a,o=$("#"+this._activeElementID).data("userID");this._userProfiles[o]?this._insertContent(this._activeElementID,this._userProfiles[o],!0):(this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[o]}),n=this._activeElementID,(a=this)._proxy.setOption("success",function(e,t,i){a._userProfiles[o]=e.returnValues.template,a._insertContent(n,e.returnValues.template,!0)}),this._proxy.setOption("failure",function(e,t,i,s){return a._userProfiles[o]=e.message,a._insertContent(n,e.message,!0),!1}),this._proxy.sendRequest())},purge:function(e){delete this._userProfiles[e],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(e,t,i){this._additionalParameters=i||{},this._cache={},this._className=e,this._dialog=null,this._dialogTitle=t,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(e,t){var i;t&&t.activePage&&(this._pageNo=t.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount)?console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount):this._cache[this._pageNo]?(i=!1,null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),1<this._pageCount?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()):(this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest())},_success:function(e,t,i){e.returnValues.pageCount&&(this._pageCount=e.returnValues.pageCount),this._cache[this._pageNo]=e.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this);
+(function (window, undefined) { "use strict";WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},init:function(){},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:{},init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},updateBadge:function(){},updateUserNotificationCount:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.QuickLogin={init:function(){require(["EventHandler","Ui/Dialog"],(function(e,t){var i,s,n,a,o,r,l=elById("loginForm"),c=elBySel(".loginFormLogin",l);for(c&&!c.nextElementSibling&&l.classList.add("loginFormLoginOnly"),i=elBySel(".loginFormRegister",l),s=function(e){var s,n;if(e instanceof Event&&(e.preventDefault(),e.stopPropagation()),l.style.removeProperty("display"),t.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==c&&null!==i&&(s=c.offsetTop,n=0,l.clientWidth>2*c.clientWidth))for(;s<i.offsetTop-50;)n+=100,c.style.setProperty("margin-bottom",n+"px","")},a=0,o=(n=document.getElementsByClassName("loginLink")).length;a<o;a++)n[a].addEventListener("click",s);null===(r=l.querySelector("#loginForm input[name=url]"))||r.value.match(/^https?:\/\//)||r.setAttribute("value",window.location.protocol+"//"+window.location.host+r.getAttribute("value")),e.add("com.woltlab.wcf.UserMenuMobile","more",(function(e){"com.woltlab.wcf.login"===e.identifier&&(e.handler.close(!0),s())}))}))}},WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t=$(e.currentTarget).data("userID");void 0===this._cache[t]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[t]}),this._proxy.sendRequest()):this._show(t)},_show:function(e){null===this._dialog?(this._dialog=$("<div>"+this._cache[e]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[e]),this._dialog.wcfDialog("open"))},_success:function(e,t,i){this._cache[e.returnValues.userID]=e.returnValues.template,this._show(e.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(e){var t,i;this._profileContent=$("#profileContent"),this._userID=e,t=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(e,s){var n=$(s).wcfIdentify();t===n?this._hasContent[n]=!0:(this._hasContent[n]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(e,t){var i=$(t);if(i.hasClass("ui-state-active"))return e&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(e){e.preventDefault(),require(["Ui/TabMenu"],(function(e){e.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(e,t){var i=$(t.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(e,t,i){var s=e.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(t,i){i.insertHtml(e.returnValues.template,elById(s),"append"),t.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(e,t,i){this._element=e,this._element.blur($.proxy(this._blur,this)),this._confirmElement=t||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(e){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(e){var t,i=this._element.val();return i?null!==this._confirmElement&&""!=(t=this._confirmElement.val())&&i!=t?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(e){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(e)},_success:function(e,t,i){e.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+e.returnValues.error))},_showError:function(e,t){e.parent().parent().addClass("formError").removeClass("formSuccess");var i=e.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(e)),i.text(t)},_showSuccess:function(e){e.parent().parent().addClass("formSuccess").removeClass("formError"),e.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(e){this._options=$.extend(!0,{minlength:3,maxlength:25},e)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var e=this._element.val();return!(e.length<this._options.minlength||e.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.Validation.Password=WCF.User.Registration.Validation.extend({_actionName:"validatePassword",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{password:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.password.error.",notEqual:WCF.Language.get("wcf.user.confirmPassword.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(e,t){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===t,this._userID=e,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button class="small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var e={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?e.userID=this._userID:this._filteredByFollowedUsers&&(e.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:e}),this._proxy.sendRequest()},_switchContext:function(e){e.preventDefault(),$(e.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",e.returnValues.lastEventTime),this._container.data("lastEventID",e.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.LikeLoader=Class.extend({_container:null,_likeType:"received",_likeValue:1,_loadButton:null,_noMoreEntries:null,_proxy:null,_userID:0,init:function(e){if(this._container=$("#likeList"),this._userID=e,this._userID){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});var t=$('<li class="likeListMore showMore"><button class="small">'+WCF.Language.get("wcf.like.likes.more")+"</button><small>"+WCF.Language.get("wcf.like.likes.noMoreEntries")+"</small></li>").appendTo(this._container);this._loadButton=t.children("button").click($.proxy(this._click,this)),this._noMoreEntries=t.children("small").hide(),2==this._container.find("> li").length&&(this._loadButton.hide(),this._noMoreEntries.show()),$("#likeType .button").click($.proxy(this._clickLikeType,this)),$("#likeValue .button").click($.proxy(this._clickLikeValue,this))}else console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_clickLikeType:function(e){var t=$(e.currentTarget);this._likeType!=t.data("likeType")&&(this._likeType=t.data("likeType"),$("#likeType .button").removeClass("active"),t.addClass("active"),this._reload())},_clickLikeValue:function(e){var t=$(e.currentTarget);this._likeValue!=t.data("likeValue")&&(this._likeValue=t.data("likeValue"),$("#likeValue .button").removeClass("active"),t.addClass("active"),$("#likeType > li:first-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesReceived")),$("#likeType > li:last-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesGiven")),this._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),this._reload())},_reload:function(){this._container.find("> li:not(:first-child):not(:last-child)").remove(),this._container.data("lastLikeTime",0),this._click()},_click:function(){this._loadButton.enable();var e={lastLikeTime:this._container.data("lastLikeTime"),userID:this._userID,likeType:this._likeType,likeValue:this._likeValue};this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\like\\LikeAction",parameters:e}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",e.returnValues.lastLikeTime),this._noMoreEntries.hide(),this._loadButton.show().enable()):(this._noMoreEntries.show(),this._loadButton.hide())}}),WCF.User.ProfilePreview=WCF.Popover.extend({_proxy:null,_userProfiles:{},init:function(){this._super(".userLink"),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1}),WCF.System.ObjectStore.add("WCF.User.ProfilePreview",this)},_loadContent:function(){var e,t,i=$("#"+this._activeElementID),s=i.data("userID");this._userProfiles[s]?this._insertContent(this._activeElementID,this._userProfiles[s],!0):(this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[s]}),e=this._activeElementID,t=this,this._proxy.setOption("success",(function(i,n,a){t._userProfiles[s]=i.returnValues.template,t._insertContent(e,i.returnValues.template,!0)})),this._proxy.setOption("failure",(function(i,n,a,o){return t._userProfiles[s]=i.message,t._insertContent(e,i.message,!0),!1})),this._proxy.sendRequest())},purge:function(e){delete this._userProfiles[e],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(e,t,i){this._additionalParameters=i||{},this._cache={},this._className=e,this._dialog=null,this._dialogTitle=t,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(e,t){if(t&&t.activePage&&(this._pageNo=t.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.pageCount&&(this._pageCount=e.returnValues.pageCount),this._cache[this._pageNo]=e.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this);
// WCF.Moderation.js
-(function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",init:function(){},_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:{},init:function(){},_dblclick:function(){},_success:function(){}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:{},init:function(){},_click:function(){},_success:function(){}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(t,e){this._objectType=t,this._buttonSelector=e,this._buttons={},this._notification=null,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var o=this;$(this._buttonSelector).each(function(t,e){var i=$(e),n=i.wcfIdentify();o._buttons[n]||(o._buttons[n]=i).click($.proxy(o._click,o))})},_click:function(t){t.preventDefault(),this._objectID=$(t.currentTarget).data("objectID"),this._proxy.setOption("data",{actionName:"prepareReport",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.reported?(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.moderation.report.success"))),this._dialog.wcfDialog("close"),this._notification.show()):t.returnValues.template&&(this._showDialog(t.returnValues.template),t.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(t){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('<div id="moderationReport" />').hide().appendTo(document.body))),this._dialog.html(t).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var t=this._dialog.find(".jsReportMessage").val();if(""==$.trim(t))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:t,objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){},updateBadge:function(){}}); })(this);
+(function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",init:function(){},_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:{},init:function(){},_dblclick:function(){},_success:function(){}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:{},init:function(){},_click:function(){},_success:function(){}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(t,e){this._objectType=t,this._buttonSelector=e,this._buttons={},this._notification=null,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var t=this;$(this._buttonSelector).each((function(e,i){var n=$(i),o=n.wcfIdentify();t._buttons[o]||(t._buttons[o]=n,n.click($.proxy(t._click,t)))}))},_click:function(t){t.preventDefault(),this._objectID=$(t.currentTarget).data("objectID"),this._proxy.setOption("data",{actionName:"prepareReport",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.reported?(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.moderation.report.success"))),this._dialog.wcfDialog("close"),this._notification.show()):t.returnValues.template&&(this._showDialog(t.returnValues.template),t.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(t){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('<div id="moderationReport" />').hide().appendTo(document.body))),this._dialog.html(t).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var t=this._dialog.find(".jsReportMessage").val();if(""==$.trim(t))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:t,objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){},updateBadge:function(){}}); })(this);
-// promise.min.js
-!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(n){var t=this.constructor;return this.then(function(e){return t.resolve(n()).then(function(){return e})},function(e){return t.resolve(n()).then(function(){return t.reject(e)})})}var n=setTimeout;function o(){}function f(e){if(!(this instanceof f))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function r(o,r){for(;3===o._state;)o=o._value;0!==o._state?(o._handled=!0,f._immediateFn(function(){var e=1===o._state?r.onFulfilled:r.onRejected;if(null!==e){var n;try{n=e(o._value)}catch(t){return void u(r.promise,t)}i(r.promise,n)}else(1===o._state?i:u)(r.promise,o._value)})):o._deferreds.push(r)}function i(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if(n instanceof f)return e._state=3,e._value=n,void c(e);if("function"==typeof t)return void l((o=t,r=n,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=n,c(e)}catch(i){u(e,i)}var o,r}function u(e,n){e._state=2,e._value=n,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&f._immediateFn(function(){e._handled||f._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;n<t;n++)r(e,e._deferreds[n]);e._deferreds=null}function a(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}function l(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,u(n,e))})}catch(o){if(t)return;t=!0,u(n,o)}}f.prototype["catch"]=function(e){return this.then(null,e)},f.prototype.then=function(e,n){var t=new this.constructor(o);return r(this,new a(e,n,t)),t},f.prototype["finally"]=e,f.all=function(n){return new f(function(r,i){if(!n||"undefined"==typeof n.length)throw new TypeError("Promise.all accepts an array");var f=Array.prototype.slice.call(n);if(0===f.length)return r([]);var u=f.length;function c(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void t.call(e,function(e){c(n,e)},i)}f[n]=e,0==--u&&r(f)}catch(o){i(o)}}for(var e=0;e<f.length;e++)c(e,f[e])})},f.resolve=function(n){return n&&"object"==typeof n&&n.constructor===f?n:new f(function(e){e(n)})},f.reject=function(t){return new f(function(e,n){n(t)})},f.race=function(r){return new f(function(e,n){for(var t=0,o=r.length;t<o;t++)r[t].then(e,n)})},f._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){n(e,0)},f._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var t=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in t?t.Promise.prototype["finally"]||(t.Promise.prototype["finally"]=e):t.Promise=f});
-
-
-// WoltLabSuite.Core.min.js
-var requirejs,require,define;!function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,function(t,a){!i&&hasProp(e,a)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[a]=t:(e[a]||(e[a]={}),mixin(e[a],t,i,n)))}),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach(function(e){t=t[e]}),t}function newContext(e){function t(e){var t,i,n=e.length;for(t=0;t<n;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}function i(e,i,n){var a,r,o,s,l,c,d,u,h,f,p=i&&i.split("/"),m=p,g=k.map,v=g&&g["*"];if(e&&(e=e.split("/"),c=e.length-1,k.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&p&&(m=p.slice(0,p.length-1),e=m.concat(e)),t(e),e=e.join("/")),n&&g&&(p||v)){r=e.split("/");e:for(o=r.length;o>0;o-=1){if(l=r.slice(0,o).join("/"),p)for(s=p.length;s>0;s-=1)if((a=getOwn(g,p.slice(0,s).join("/")))&&(a=getOwn(a,l))){d=a,u=o;break e}!h&&v&&getOwn(v,l)&&(h=getOwn(v,l),f=o)}!d&&h&&(d=h,u=f),d&&(r.splice(0,u,d),e=r.join("/"))}return getOwn(k.pkgs,e)||e}function n(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t}function a(e){var t,i,n,a;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}n=queue.shift(),i=n[0],t-=1,i in x||i in T||(i in M?C.apply(undef,n):T[i]=n)}e&&(a=getOwn(k.shim,e)||{},C(e,a.deps||[],a.exportsFn))}function r(e,t){var n=function(i,r,o,s){var l,c;if(t&&a(),"string"==typeof i){if(S[i])return S[i](e);if(!((l=E(i,e,!0).id)in x))throw new Error("Not loaded: "+l);return x[l]}return i&&!Array.isArray(i)&&(c=i,i=undef,Array.isArray(r)&&(i=r,r=o,o=s),t)?n.config(c)(i,r,o):(r=r||function(){return slice.call(arguments,0)},V.then(function(){return a(),C(undef,i||[],r,o,e)}))};return n.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,n.nameToUrl=function(e,t,i){var a,r,o,s,l,c,d,u=getOwn(k.pkgs,e);if(u&&(e=u),d=getOwn(H,e))return n.nameToUrl(d,t,i);if(urlRegExp.test(e))l=e+(t||"");else{for(a=k.paths,r=e.split("/"),o=r.length;o>0;o-=1)if(s=r.slice(0,o).join("/"),c=getOwn(a,s)){Array.isArray(c)&&(c=c[0]),r.splice(0,o,c);break}l=r.join("/"),l+=t||(/^data\:|^blob\:|\?/.test(l)||i?"":".js"),l=("/"===l.charAt(0)||l.match(/^[\w\+\.\-]+:/)?"":k.baseUrl)+l}return k.urlArgs&&!/^blob\:/.test(l)?l+k.urlArgs(e,l):l},n.toUrl=function(t){var a,r=t.lastIndexOf("."),o=t.split("/")[0],s="."===o||".."===o;return-1!==r&&(!s||r>1)&&(a=t.substring(r,t.length),t=t.substring(0,r)),n.nameToUrl(i(t,e),a,!0)},n.defined=function(t){return E(t,e,!0).id in x},n.specified=function(t){return(t=E(t,e,!0).id)in x||t in M},n}function o(e,t,i){e&&(x[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(D,t.map,t.deps)),t.finished=!0,t.resolve(i)}function s(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function l(e){return function(t){return i(t,e,!0)}}function c(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=D.execCb(i,e.factory,e.values,x[i])}catch(t){return s(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=x[i])):N.splice(N.indexOf(e),1),o(i,e,t)}function d(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||c(this))}function u(e,t){var i={};return i.promise=new Promise(function(t,n){i.resolve=t,i.reject=function(t){e||N.splice(N.indexOf(i),1),n(t)}}),i.map=e?t||E(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=d,i.map.pr&&(i.deps=[E(i.map.pr)]),i}function h(e,t){var i;return e?(i=e in M&&M[e])||(i=M[e]=u(e,t)):(i=u(),N.push(i)),i}function f(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(O+=1),i.requireModules=[t]),s(e,i))}}function p(e,t,i,n){i.depMax+=1,L(e,t).then(function(e){i.depFinished(e,n)},f(i,e.id)).catch(f(i,i.map.id))}function m(e){function t(t){i||o(e,h(e),t)}var i;return t.error=function(t){h(e).reject(t)},t.fromText=function(t,n){var r=h(e),o=E(E(e).n),l=o.id;i=!0,r.factory=function(e,t){return t},n&&(t=n),hasProp(k.config,e)&&(k.config[l]=k.config[e]);try{y.exec(t)}catch(e){s(r,new Error("fromText eval for "+l+" failed: "+e))}a(l),r.deps=[o],p(o,null,r,r.deps.length)},t}function g(e,t,i){e.load(t.n,r(i),m(t.id),k)}function v(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function _(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach(function(n){var a=n.id,r=!hasProp(S,a)&&h(a,n);!r||r.finished||i[a]||(hasProp(t,a)?e.deps.forEach(function(t,i){t.id===a&&e.depFinished(x[a],i)}):_(r,t,i))}),i[n]=!0}function b(e){var t,i,n,a=[],r=1e3*k.waitSeconds,o=r&&F+r<(new Date).getTime();if(0===P&&(e?e.finished||_(e,{},{}):N.length&&N.forEach(function(e){_(e,{},{})})),o){for(i in M)n=M[i],n.finished||a.push(n.map.id);t=new Error("Timeout for modules: "+a),t.requireModules=a,y.onError(t)}else(P||N.length)&&(A||(A=!0,setTimeout(function(){A=!1,b()},70)))}function w(e){return setTimeout(function(){e.dynaId&&W[e.dynaId]||(W[e.dynaId]=!0,y.onError(e))}),e}var y,C,E,L,S,A,I,D,x=obj(),T=obj(),k={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},B=obj(),N=[],M=obj(),U=obj(),j=obj(),P=0,F=(new Date).getTime(),O=0,W=obj(),R=obj(),H=obj(),V=Promise.resolve();return I="function"==typeof importScripts?function(e){var t=e.url;R[t]||(R[t]=!0,h(e.id),importScripts(t),a(e.id))}:function(e){var t,i=e.id,n=e.url;R[n]||(R[n]=!0,t=document.createElement("script"),t.setAttribute("data-requiremodule",i),t.type=k.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,P+=1,t.addEventListener("load",function(){P-=1,a(i)},!1),t.addEventListener("error",function(){P-=1;var e,n=getOwn(k.paths,i);if(n&&Array.isArray(n)&&n.length>1){t.parentNode.removeChild(t),n.shift();var a=h(i);a.map=E(i),a.map.url=y.nameToUrl(i),I(a.map)}else e=new Error("Load failed: "+i+": "+t.src),e.requireModules=[i],h(i).reject(e)},!1),t.src=n,10===document.documentMode?asap.then(function(){document.head.appendChild(t)}):document.head.appendChild(t))},L=function(e,t){var i,n,a=e.id,r=k.shim[a];if(a in T)i=T[a],delete T[a],C.apply(undef,i);else if(!(a in M))if(e.pr){if(!(n=getOwn(H,a)))return L(E(e.pr)).then(function(i){var n=e.prn?e:E(a,t,!0),r=n.id,o=getOwn(k.shim,r);return r in j||(j[r]=!0,o&&o.deps?y(o.deps,function(){g(i,n,t)}):g(i,n,t)),h(r).promise});e.url=y.nameToUrl(n),I(e)}else r&&r.deps?y(r.deps,function(){I(e)}):I(e);return h(a).promise},E=function(e,t,n){if("string"!=typeof e)return e;var a,r,o,s,c,d,u=e+" & "+(t||"")+" & "+!!n;return o=v(e),s=o[0],e=o[1],!s&&u in B?B[u]:(s&&(s=i(s,t,n),a=s in x&&x[s]),s?a&&a.normalize?(e=a.normalize(e,l(t)),d=!0):e=-1===e.indexOf("!")?i(e,t,n):e:(e=i(e,t,n),o=v(e),s=o[0],e=o[1],r=y.nameToUrl(e)),c={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&d},s||(B[u]=c),c)},S={require:function(e){return r(e)},exports:function(e){var t=x[e];return void 0!==t?t:x[e]={}},module:function(e){return{id:e,uri:"",exports:S.exports(e),config:function(){return getOwn(k.config,e)||{}}}}},C=function(e,t,i,n,a){if(e){if(e in U)return;U[e]=!0}var r=h(e);return t&&!Array.isArray(t)&&(i=t,t=[]),t=t?slice.call(t,0):null,n||(hasProp(k,"defaultErrback")?k.defaultErrback&&(n=k.defaultErrback):n=w),n&&r.promise.catch(n),a=a||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),r.factory=i,r.deps=t,r.depending=!0,t.forEach(function(i,n){var o;t[n]=o=E(i,a,!0),i=o.id,"require"===i?r.values[n]=S.require(e):"exports"===i?(r.values[n]=S.exports(e),r.usingExports=!0):"module"===i?r.values[n]=r.cjsModule=S.module(e):void 0===i?r.values[n]=void 0:p(o,a,r,n)}),r.depending=!1,r.depCount===r.depMax&&c(r)):e&&o(e,r,i),F=(new Date).getTime(),e||b(r),r.promise},y=r(null,!0),y.config=function(t){if(t.context&&t.context!==e){var i=getOwn(contexts,t.context);return i?i.req.config(t):newContext(t.context).config(t)}if(B=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs){var a=t.urlArgs;t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+a}}var r=k.shim,o={paths:!0,bundles:!0,config:!0,map:!0};return eachProp(t,function(e,t){o[t]?(k[t]||(k[t]={}),mixin(k[t],e,!0,!0)):k[t]=e}),t.bundles&&eachProp(t.bundles,function(e,t){e.forEach(function(e){e!==t&&(H[e]=t)})}),t.shim&&(eachProp(t.shim,function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=n(e)),r[t]=e}),k.shim=r),t.packages&&t.packages.forEach(function(e){var t,i;e="string"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(k.paths[i]=e.location),k.pkgs[i]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),(t.deps||t.callback)&&y(t.deps,t.callback),y},y.onError=function(e){throw e},D={id:e,defined:x,waiting:T,config:k,deferreds:M,req:y,execCb:function(e,t,i,n){return t.apply(n,i)}},contexts[e]=D,y}if(!Promise)throw new Error("No Promise implementation available");var topReq,dataMain,src,subPath,bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice;if("function"!=typeof requirejs){var asap=Promise.resolve(void 0);requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],(dataMain=dataMain&&dataMain.getAttribute("data-main"))&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain])))}}(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",function(){}),requirejs.config({paths:{enquire:"3rdParty/enquire",favico:"3rdParty/favico","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",prism:"3rdParty/prism",zxcvbn:"3rdParty/zxcvbn"},shim:{enquire:{exports:"enquire"},favico:{exports:"Favico"},"perfect-scrollbar":{exports:"PerfectScrollbar"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],function(){return window.jQuery}),define("require.config",function(){}),function(e,t){e.elAttr=function(e,t,i){if(void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var a=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(a,n),a},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,i){if(t="data-"+t,void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,i){var n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(void 0!==t&&null!==t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}var a=e.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=elCreate("small"),a.className="innerError",n.insertBefore(a,e.nextSibling))),""===t?null!==a&&(n.removeChild(a),a=null):a[i?"innerHTML":"textContent"]=t,a},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i],i)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,i){var n;return function(){var a=this,r=arguments;clearTimeout(n),n=setTimeout(function(){n=null,i||e.apply(a,r)},t),i&&!n&&e.apply(a,r)}};"touchstart"in t.documentElement||"ontouchstart"in e||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints;Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),function(){function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}var i=0;t(),e.addEventListener("popstate",function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})}(),e.String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;i<n;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t}}(window,document),define("wcf.globalHelper",function(){}),define("WoltLabSuite/Core/Core",[],function(){"use strict";var e=function(e){return"object"==typeof e&&(Array.isArray(e)||n.isPlainObject(e))?t(e):e},t=function(t){if(!t)return null;if(Array.isArray(t))return t.slice();var i={};for(var n in t)t.hasOwnProperty(n)&&void 0!==t[n]&&(i[n]=e(t[n]));return i},i="wsc"+window.WCF_PATH.hashCode()+"-",n={clone:function(t){return e(t)},convertLegacyUrl:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){var i=t.split(/([A-Z][a-z0-9]+)/);t="";for(var n=0,a=i.length;n<a;n++){var r=i[n].trim();r.length&&(t.length&&(t+="-"),t+=r.toLowerCase())}return"index.php?"+t+"/&"})},extend:function(e){e=e||{};for(var t=this.clone(e),i=1,n=arguments.length;i<n;i++){var a=arguments[i];if(a)for(var r in a)objOwns(a,r)&&(Array.isArray(a[r])||"object"!=typeof a[r]?t[r]=a[r]:this.isPlainObject(a[r])?t[r]=this.extend(e[r],a[r]):t[r]=a[r])}return t},inherit:function(e,t,i){if(void 0===e||null===e)throw new TypeError("The constructor must not be undefined or null.");if(void 0===t||null===t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=n.extend(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),i||{})},isPlainObject:function(e){return"object"==typeof e&&null!==e&&!e.nodeType&&Object.getPrototypeOf(e)===Object.prototype},getType:function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1")},getUuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},serialize:function(e,t){var i=[];for(var n in e)if(objOwns(e,n)){var a=t?t+"["+n+"]":n,r=e[n];"object"==typeof r?i.push(this.serialize(r,a)):i.push(encodeURIComponent(a)+"="+encodeURIComponent(r))}return i.join("&")},triggerEvent:function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();var i;try{i=new Event(t,{bubbles:!0,cancelable:!0})}catch(e){i=document.createEvent("Event"),i.initEvent(t,!0,!0)}e.dispatchEvent(i)},getStoragePrefix:function(){return i}};return n}),define("WoltLabSuite/Core/Dictionary",["Core"],function(e){"use strict";function t(){this._dictionary=i?new Map:{}}var i=objOwns(window,"Map")&&"function"==typeof window.Map;return t.prototype={set:function(e,t){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new TypeError("Only strings can be used as keys, rejected '"+e+"' ("+typeof e+").");i?this._dictionary.set(e,t):this._dictionary[e]=t},delete:function(e){"number"==typeof e&&(e=e.toString()),i?this._dictionary.delete(e):this._dictionary[e]=void 0},has:function(e){return"number"==typeof e&&(e=e.toString()),i?this._dictionary.has(e):objOwns(this._dictionary,e)&&void 0!==this._dictionary[e]},get:function(e){if("number"==typeof e&&(e=e.toString()),this.has(e))return i?this._dictionary.get(e):this._dictionary[e]},forEach:function(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");if(i)this._dictionary.forEach(e);else for(var t=Object.keys(this._dictionary),n=0,a=t.length;n<a;n++)e(this._dictionary[t[n]],t[n])},merge:function(){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if(!(n instanceof t))throw new TypeError("Expected an object of type Dictionary, but argument "+e+" is not.");n.forEach(function(e,t){this.set(t,e)}.bind(this))}},toObject:function(){if(!i)return e.clone(this._dictionary);var t={};return this._dictionary.forEach(function(e,i){t[i]=e}),t}},t.fromObject=function(e){var i=new t;for(var n in e)objOwns(e,n)&&i.set(n,e[n]);return i},Object.defineProperty(t.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return i?this._dictionary.size:Object.keys(this._dictionary).length}}),t}),define("WoltLabSuite/Core/Template.grammar",["require"],function(e){var t=function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i},i=[2,44],n=[5,9,11,12,13,18,19,21,22,23,25,26,28,29,30,32,33,34,35,37,39,41],a=[1,25],r=[1,27],o=[1,33],s=[1,31],l=[1,32],c=[1,28],d=[1,29],u=[1,26],h=[1,35],f=[1,41],p=[1,40],m=[11,12,15,42,43,47,49,51,52,54,55],g=[9,11,12,13,18,19,21,23,26,28,30,32,33,34,35,37,39],v=[11,12,15,42,43,46,47,48,49,51,52,54,55],_=[1,64],b=[1,65],w=[18,37,39],y=[12,15],C={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,T_WS:12,"{if":13,COMMAND_PARAMETERS:14,"}":15,COMMAND_repetition0:16,COMMAND_option0:17,"{/if}":18,"{include":19,COMMAND_PARAMETER_LIST:20,"{implode":21,"{/implode}":22,"{foreach":23,COMMAND_option1:24,"{/foreach}":25,"{plural":26,PLURAL_PARAMETER_LIST:27,"{lang}":28,"{/lang}":29,"{":30,VARIABLE:31,"{#":32,"{@":33,"{ldelim}":34,"{rdelim}":35,ELSE:36,"{else}":37,ELSE_IF:38,"{elseif":39,FOREACH_ELSE:40,"{foreachelse}":41,T_VARIABLE:42,T_VARIABLE_NAME:43,VARIABLE_repetition0:44,VARIABLE_SUFFIX:45,"[":46,"]":47,".":48,"(":49,VARIABLE_SUFFIX_option0:50,")":51,"=":52,COMMAND_PARAMETER_VALUE:53,T_QUOTED_STRING:54,T_DIGITS:55,COMMAND_PARAMETERS_repetition_plus0:56,COMMAND_PARAMETER:57,T_PLURAL_PARAMETER_NAME:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"T_WS",13:"{if",15:"}",18:"{/if}",19:"{include",21:"{implode",22:"{/implode}",23:"{foreach",25:"{/foreach}",26:"{plural",28:"{lang}",29:"{/lang}",30:"{",32:"{#",33:"{@",34:"{ldelim}",35:"{rdelim}",37:"{else}",39:"{elseif",41:"{foreachelse}",42:"T_VARIABLE",43:"T_VARIABLE_NAME",46:"[",47:"]",48:".",49:"(",51:")",52:"=",54:"T_QUOTED_STRING",55:"T_DIGITS"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[36,2],[38,4],[40,2],[31,3],[45,3],[45,2],[45,3],[20,5],[20,3],[53,1],[53,1],[53,1],[14,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,3],[27,5],[27,3],[58,1],[58,1],[6,0],[6,2],[16,0],[16,2],[17,0],[17,1],[24,0],[24,1],[44,0],[44,2],[50,0],[50,1],[56,1],[56,2]],performAction:function(e,t,i,n,a,r,o){var s=r.length-1;switch(a){case 1:return r[s-1]+";";case 2:var l=r[s].reduce(function(e,t){return t.encode&&!e[1]?e[0]+=" + '"+t.value:t.encode&&e[1]?e[0]+=t.value:!t.encode&&e[1]?e[0]+="' + "+t.value:t.encode||e[1]||(e[0]+=" + "+t.value),e[1]=t.encode,e},["''",!1]);l[1]&&(l[0]+="'"),this.$=l[0];break;case 3:case 4:this.$={encode:!0,value:r[s].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:r[s]};break;case 8:this.$="(function() { if ("+r[s-5]+") { return "+r[s-3]+"; } "+r[s-2].join(" ")+" "+(r[s-1]||"")+" return ''; })()";break;case 9:if(!r[s-1].file)throw new Error("Missing parameter file");this.$=r[s-1].file+".fetch(v)";break;case 10:if(!r[s-3].from)throw new Error("Missing parameter from");if(!r[s-3].item)throw new Error("Missing parameter item");r[s-3].glue||(r[s-3].glue="', '"),this.$="(function() { return "+r[s-3].from+".map(function(item) { v["+r[s-3].item+"] = item; return "+r[s-1]+"; }).join("+r[s-3].glue+"); })()";break;case 11:if(!r[s-4].from)throw new Error("Missing parameter from");if(!r[s-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+r[s-4].from+" instanceof Array) {for (var i = 0; i < "+r[s-4].from+".length; i++) { looped = true;v["+r[s-4].key+"] = i;v["+r[s-4].item+"] = "+r[s-4].from+"[i];result += "+r[s-2]+";}} else {for (var key in "+r[s-4].from+") {if (!"+r[s-4].from+".hasOwnProperty(key)) continue;looped = true;v["+r[s-4].key+"] = key;v["+r[s-4].item+"] = "+r[s-4].from+"[key];result += "+r[s-2]+";}}return (looped ? result : "+(r[s-1]||"''")+"); })()";break;case 12:this.$="I18nPlural.getCategoryFromTemplateParameters({";var c=!1;for(var d in r[s-1])objOwns(r[s-1],d)&&(this.$+=(c?",":"")+d+": "+r[s-1][d],c=!0);this.$+="})";break;case 13:this.$="Language.get("+r[s-1]+", v)";break;case 14:this.$="StringUtil.escapeHTML("+r[s-1]+")";break;case 15:this.$="StringUtil.formatNumeric("+r[s-1]+")";break;case 16:this.$=r[s-1];break;case 17:this.$="'{'";break;case 18:this.$="'}'";break;case 19:this.$="else { return "+r[s]+"; }";break;case 20:this.$="else if ("+r[s-2]+") { return "+r[s]+"; }";break;case 21:this.$=r[s];break;case 22:this.$="v['"+r[s-1]+"']"+r[s].join("");break;case 23:this.$=r[s-2]+r[s-1]+r[s];break;case 24:this.$="['"+r[s]+"']";break;case 25:case 39:this.$=r[s-2]+(r[s-1]||"")+r[s];break;case 26:case 40:this.$=r[s],this.$[r[s-4]]=r[s-2];break;case 27:case 41:this.$={},this.$[r[s-2]]=r[s];break;case 31:this.$=r[s].join("");break;case 44:case 46:case 52:this.$=[];break;case 45:case 47:case 53:case 57:r[s-1].push(r[s]);break;case 56:this.$=[r[s]]}},table:[t([5,9,11,12,13,19,21,23,26,28,30,32,33,34,35],i,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,18,22,25,29,37,39,41],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],19:[1,12],21:[1,13],23:[1,14],26:[1,15],28:[1,16],30:[1,17],32:[1,18],33:[1,19],34:[1,20],35:[1,21]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),{11:a,12:r,14:22,31:30,42:o,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{20:34,43:h},{20:36,43:h},{20:37,43:h},{27:38,43:f,55:p,58:39},t([9,11,12,13,19,21,23,26,28,29,30,32,33,34,35],i,{6:3,4:42}),{31:43,42:o},{31:44,42:o},{31:45,42:o},t(n,[2,17]),t(n,[2,18]),{15:[1,46]},t([15,47,51],[2,31],{31:30,57:47,11:a,12:r,42:o,43:s,49:l,52:c,54:d,55:u}),t(m,[2,56]),t(m,[2,32]),t(m,[2,33]),t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),t(m,[2,37]),t(m,[2,38]),{11:a,12:r,14:48,31:30,42:o,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{43:[1,49]},{15:[1,50]},{52:[1,51]},{15:[1,52]},{15:[1,53]},{15:[1,54]},{52:[1,55]},{52:[2,42]},{52:[2,43]},{29:[1,56]},{15:[1,57]},{15:[1,58]},{15:[1,59]},t(g,i,{6:3,4:60}),t(m,[2,57]),{51:[1,61]},t(v,[2,52],{44:62}),t(n,[2,9]),{31:66,42:o,53:63,54:_,55:b},t([9,11,12,13,19,21,22,23,26,28,30,32,33,34,35],i,{6:3,4:67}),t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35,41],i,{6:3,4:68}),t(n,[2,12]),{31:66,42:o,53:69,54:_,55:b},t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(w,[2,46],{16:70}),t(m,[2,39]),t([11,12,15,42,43,47,51,52,54,55],[2,22],{45:71,46:[1,72],48:[1,73],49:[1,74]}),{12:[1,75],15:[2,27]},t(y,[2,28]),t(y,[2,29]),t(y,[2,30]),{22:[1,76]},{24:77,25:[2,50],40:78,41:[1,79]},{12:[1,80],15:[2,41]},{17:81,18:[2,48],36:83,37:[1,85],38:82,39:[1,84]},t(v,[2,53]),{11:a,12:r,14:86,31:30,42:o,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{43:[1,87]},{11:a,12:r,14:89,31:30,42:o,43:s,49:l,50:88,51:[2,54],52:c,54:d,55:u,56:23,57:24},{20:90,43:h},t(n,[2,10]),{25:[1,91]},{25:[2,51]},t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35],i,{6:3,4:92}),{27:93,43:f,55:p,58:39},{18:[1,94]},t(w,[2,47]),{18:[2,49]},{11:a,12:r,14:95,31:30,42:o,43:s,49:l,52:c,54:d,55:u,56:23,57:24},t([9,11,12,13,18,19,21,23,26,28,30,32,33,34,35],i,{6:3,4:96}),{47:[1,97]},t(v,[2,24]),{51:[1,98]},{51:[2,55]},{15:[2,26]},t(n,[2,11]),{25:[2,21]},{15:[2,40]},t(n,[2,8]),{15:[1,99]},{18:[2,19]},t(v,[2,23]),t(v,[2,25]),t(g,i,{6:3,4:100}),t(w,[2,20])],defaultActions:{4:[2,1],40:[2,42],41:[2,43],78:[2,51],83:[2,49],89:[2,55],90:[2,26],92:[2,21],93:[2,40],96:[2,19]},parseError:function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)},parse:function(e){var t=this,i=[0],n=[null],a=[],r=this.table,o="",s=0,l=0,c=0,d=a.slice.call(arguments,1),u=Object.create(this.lexer),h={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(h.yy[f]=this.yy[f]);u.setInput(e,h.yy),h.yy.lexer=u,h.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;a.push(p);var m=u.options&&u.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,_,b,w,y,C,E,L,S=function(){var e;return e=u.lex()||1,"number"!=typeof e&&(e=t.symbols_[e]||e),e},A={};;){if(_=i[i.length-1],this.defaultActions[_]?b=this.defaultActions[_]:(null!==g&&void 0!==g||(g=S()),b=r[_]&&r[_][g]),void 0===b||!b.length||!b[0]){var I="";L=[];for(y in r[_])this.terminals_[y]&&y>2&&L.push("'"+this.terminals_[y]+"'");I=u.showPosition?"Parse error on line "+(s+1)+":\n"+u.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(I,{text:u.match,token:this.terminals_[g]||g,line:u.yylineno,loc:p,expected:L})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+g);switch(b[0]){case 1:i.push(g),n.push(u.yytext),a.push(u.yylloc),i.push(b[1]),g=null,v?(g=v,v=null):(l=u.yyleng,o=u.yytext,s=u.yylineno,p=u.yylloc,c>0&&c--);break;case 2:if(C=this.productions_[b[1]][1],A.$=n[n.length-C],A._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(A._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(A,[o,l,s,h.yy,b[1],n,a].concat(d))))return w;C&&(i=i.slice(0,-1*C*2),n=n.slice(0,-1*C),a=a.slice(0,-1*C)),i.push(this.productions_[b[1]][0]),n.push(A.$),a.push(A._$),E=r[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0}},E=function(){return{EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,n,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,
-this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in a)this[r]=a[r];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,i,n;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),r=0;r<a.length;r++)if((i=this._input.match(this.rules[a[r]]))&&(!t||i[0].length>t[0].length)){if(t=i,n=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,a[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,a[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:case 3:return 54;case 4:return 42;case 5:return 55;case 6:return 43;case 7:return 48;case 8:return 46;case 9:return 47;case 10:return 49;case 11:return 51;case 12:return 52;case 13:return 34;case 14:return 35;case 15:return this.begin("command"),32;case 16:return this.begin("command"),33;case 17:return this.begin("command"),13;case 18:case 19:return this.begin("command"),39;case 20:return 37;case 21:return 18;case 22:return 28;case 23:return 29;case 24:return this.begin("command"),19;case 25:return this.begin("command"),21;case 26:return this.begin("command"),26;case 27:return 22;case 28:return this.begin("command"),23;case 29:return 41;case 30:return 25;case 31:return this.begin("command"),30;case 32:return this.popState(),15;case 33:return 12;case 34:return 5;case 35:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[0-9]+)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{plural )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{(?!\s))/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],inclusive:!0},INITIAL:{rules:[0,1,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35],inclusive:!0}}}}();return C.lexer=E,C}),define("WoltLabSuite/Core/NumberUtil",[],function(){"use strict";return{round:function(e,t){return void 0===t||0==+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}}}),define("WoltLabSuite/Core/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{addThousandsSeparator:function(t){return void 0===e&&(e=require("Language")),String(t).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+e.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(i,n){void 0===e&&(e=require("Language")),i=String(t.round(i,n||-2));var a=i.split(".");return i=this.addThousandsSeparator(a[0]),a.length>1&&(i+=e.get("wcf.global.decimalPoint")+a[1]),i=i.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},shortUnit:function(e){var i="";return e>=1e6?(e/=1e6,e=e>10?Math.floor(e):t.round(e,-1),i="M"):e>=1e3&&(e/=1e3,e=e>10?Math.floor(e):t.round(e,-1),i="k"),this.formatNumeric(e)+i}}}),define("WoltLabSuite/Core/I18n/Plural",["StringUtil"],function(e){"use strict";return{getCategory:function(e,t){t||(t=document.documentElement.lang),"function"!=typeof this[t]&&(t="en");var i=this[t](e);return i||"other"},getCategoryFromTemplateParameters:function(t){if(!t.value)throw new Error("Missing parameter value");if(!t.other)throw new Error("Missing parameter other");var i=t.value;Array.isArray(i)&&(i=i.length);for(var n in t)if(objOwns(t,n)&&n==~~n&&n==i)return t[n];var a=this.getCategory(i);t[a]||(a="other");var r=t[a];return-1!==r.indexOf("#")?r.replace("#",e.formatNumeric(i)):r},getF:function(e){e=e.toString();var t=e.indexOf(".");return-1===t?0:parseInt(e.substr(t+1),10)},getV:function(e){return e.toString().replace(/^[^.]*\.?/,"").length},af:function(e){if(1==e)return"one"},am:function(e){var t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},ar:function(e){if(0==e)return"zero";if(1==e)return"one";if(2==e)return"two";var t=e%100;return t>=3&&t<=10?"few":t>=11&&t<=99?"many":void 0},as:function(e){var t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},az:function(e){if(1==e)return"one"},be:function(e){var t=e%10,i=e%100;return 1==t&&11!=i?"one":t>=2&&t<=4&&!(i>=12&&i<=14)?"few":0==t||t>=5&&t<=9||i>=11&&i<=14?"many":void 0},bg:function(e){if(1==e)return"one"},bn:function(e){var t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},bo:function(e){},bs:function(e){var t=this.getV(e),i=this.getF(e),n=e%10,a=e%100,r=i%10,o=i%100;return 0==t&&1==n&&11!=a||1==r&&11!=o?"one":0==t&&n>=2&&n<=4&&a>=12&&a<=14||r>=2&&r<=4&&o>=12&&o<=14?"few":void 0},cs:function(e){var t=this.getV(e);return 1==e&&0===t?"one":e>=2&&e<=4&&0===t?"few":0===t?"many":void 0},cy:function(e){return 0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":void 0},da:function(e){if(e>0&&e<2)return"one"},el:function(e){if(1==e)return"one"},en:function(e){if(1==e&&0===this.getV(e))return"one"},es:function(e){if(1==e)return"one"},eu:function(e){if(1==e)return"one"},fa:function(e){if(e>=0&&e<=1)return"one"},fr:function(e){if(e>=0&&e<2)return"one"},ga:function(e){return 1==e?"one":2==e?"two":3==e||4==e||5==e||6==e?"few":7==e||8==e||9==e||10==e?"many":void 0},gu:function(e){if(e>=0&&e<=1)return"one"},he:function(e){var t=this.getV(e);return 1==e&&0===t?"one":2==e&&0===t?"two":e>10&&0===t&&e%10==0?"many":void 0},hi:function(e){if(e>=0&&e<=1)return"one"},hr:function(e){return this.bs(e)},hu:function(e){if(1==e)return"one"},hy:function(e){if(e>=0&&e<2)return"one"},id:function(e){},is:function(e){var t=this.getF(e);if(0===t&&e%10==1&&e%100!=11||0!==t)return"one"},ja:function(e){},jv:function(e){},ka:function(e){if(1==e)return"one"},kk:function(e){if(1==e)return"one"},km:function(e){},kn:function(e){if(e>=0&&e<=1)return"one"},ko:function(e){},ku:function(e){if(1==e)return"one"},ky:function(e){if(1==e)return"one"},lb:function(e){if(1==e)return"one"},lo:function(e){},lt:function(e){var t=e%10,i=e%100;return 1!=t||i>=11&&i<=19?t>=2&&t<=9&&!(i>=11&&i<=19)?"few":0!=this.getF(e)?"many":void 0:"one"},lv:function(e){var t=e%10,i=e%100,n=this.getV(e),a=this.getF(e),r=a%10,o=a%100;return 0==t||i>=11&&i<=19||2==n&&o>=11&&o<=19?"zero":1==t&&11!=i||2==n&&1==r&&11!=o||2!=n&&1==r?"one":void 0},mk:function(e){var t=this.getV(e),i=this.getF(e),n=e%10,a=e%100,r=i%10,o=i%100;if(0==t&&1==n&&11!=a||1==r&&11!=o)return"one"},ml:function(e){if(1==e)return"one"},mn:function(e){if(1==e)return"one"},mr:function(e){if(1==e)return"one"},ms:function(e){},mt:function(e){var t=e%100;return 1==e?"one":0==e||t>=2&&t<=10?"few":t>=11&&t<=19?"many":void 0},my:function(e){},no:function(e){if(1==e)return"one"},ne:function(e){if(1==e)return"one"},or:function(e){if(1==e)return"one"},pa:function(e){if(1==e||0==e)return"one"},pl:function(e){var t=this.getV(e),i=e%10,n=e%100;return 1==e&&0==t?"one":0==t&&i>=2&&i<=4&&!(n>=12&&n<=14)?"few":0==t&&(1!=e&&i>=0&&i<=1||i>=5&&i<=9||n>=12&&n<=14)?"many":void 0},ps:function(e){if(1==e)return"one"},pt:function(e){if(e>=0&&e<2)return"one"},ro:function(e){var t=this.getV(e),i=e%100;return 1==e&&0===t?"one":0!=t||0==e||i>=2&&i<=19?"few":void 0},ru:function(e){var t=e%10,i=e%100;if(0==this.getV(e)){if(1==t&&11!=i)return"one";if(t>=2&&t<=4&&!(i>=12&&i<=14))return"few";if(0==t||t>=5&&t<=9||i>=11&&i<=14)return"many"}},sd:function(e){if(1==e)return"one"},si:function(e){if(0==e||1==e||0==Math.floor(e)&&1==this.getF(e))return"one"},sk:function(e){return this.cs(e)},sl:function(e){var t=this.getV(e),i=e%100;return 0==t&&1==i?"one":0==t&&2==i?"two":0==t&&(3==i||4==i)||0!=t?"few":void 0},sq:function(e){if(1==e)return"one"},sr:function(e){return this.bs(e)},ta:function(e){if(1==e)return"one"},te:function(e){if(1==e)return"one"},tg:function(e){},th:function(e){},tk:function(e){if(1==e)return"one"},tr:function(e){if(1==e)return"one"},ug:function(e){if(1==e)return"one"},uk:function(e){return this.ru(e)},uz:function(e){if(1==e)return"one"},vi:function(e){},zh:function(e){}}}),define("WoltLabSuite/Core/Template",["./Template.grammar","./StringUtil","Language","WoltLabSuite/Core/I18n/Plural"],function(e,t,i,n){"use strict";function a(){this.yy={}}function r(a){void 0===i&&(i=require("Language")),void 0===t&&(t=require("StringUtil"));try{a=e.parse(a),a="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+a,this.fetch=new Function("StringUtil","Language","I18nPlural","v",a).bind(void 0,t,i,n)}catch(e){throw console.debug(e.message),e}}return a.prototype=e,e.Parser=a,e=new a,Object.defineProperty(r,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(e){throw new Error("WCF.Template.callbacks is no longer supported")}}),r.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},r}),define("WoltLabSuite/Core/Language",["Dictionary","./Template"],function(e,t){"use strict";var i=new e;return{addObject:function(t){i.merge(e.fromObject(t))},add:function(e,t){i.set(e,t)},get:function(e,n){n||(n={});var a=i.get(e);if(void 0===a)return e;if(void 0===t&&(t=require("WoltLabSuite/Core/Template")),"string"==typeof a){try{i.set(e,new t(a))}catch(n){i.set(e,new t("{literal}"+a.replace(/\{\/literal\}/g,"{/literal}{ldelim}/literal}{literal}")+"{/literal}"))}a=i.get(e)}return a instanceof t&&(a=a.fetch(n)),a}}}),define("WoltLabSuite/Core/CallbackList",["Dictionary"],function(e){"use strict";function t(){this._dictionary=new e}return t.prototype={add:function(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._dictionary.has(e)||this._dictionary.set(e,[]),this._dictionary.get(e).push(t)},remove:function(e){this._dictionary.delete(e)},forEach:function(e,t){if(null===e)this._dictionary.forEach(function(e,i){e.forEach(t)});else{var i=this._dictionary.get(e);void 0!==i&&i.forEach(t)}}},t}),define("WoltLabSuite/Core/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,i=!1;return{add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!i)try{i=!0,t.forEach(null,function(e){e()})}finally{i=!1}}}}),define("WoltLabSuite/Core/Environment",[],function(){"use strict";var e="other",t="none",i="desktop",n=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var a=window.getComputedStyle(document.documentElement),r=0,o=a.length;r<o;r++){var s=a[r];0===s.indexOf("-ms-")?e="microsoft":0===s.indexOf("-moz-")?e="firefox":"firefox"!==e&&0===s.indexOf("-webkit-")&&(e="safari")}var l=window.navigator.userAgent.toLowerCase();-1!==l.indexOf("crios")?(e="chrome",i="ios"):/(?:iphone|ipad|ipod)/.test(l)?(e="safari",i="ios"):-1!==l.indexOf("android")?i="android":-1!==l.indexOf("iemobile")&&(e="microsoft",i="windows"),"desktop"!==i||-1===l.indexOf("mobile")&&-1===l.indexOf("tablet")||(i="mobile"),t="redactor",n=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(e="safari",i="ios")},browser:function(){return e},editor:function(){return t},platform:function(){return i},touch:function(){return n}}}),define("WoltLabSuite/Core/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function i(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var n,a=i+"Sibling";null!==e&&e!==t;){if(null!==e[i+"ElementSibling"])return!1;if(e[a])for(n=e[a];n;){if(""!==n.textContent.trim())return!1;n=n[a]}e=e.parentNode}return!0}var n=0,a={createFragmentFromHtml:function(e){var t=elCreate("div");this.setInnerHtml(t,e);for(var i=document.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId:function(){var e;do{e="wcf"+n++}while(null!==elById(e));return e},identify:function(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight},outerDimensions:function(e){var t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset:function(e){var t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){var i=!1;for(var n in t)t.hasOwnProperty(n)&&(/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":""))},styleAsInt:function(e,t){var i=e.getPropertyValue(t);return null===i?0:parseInt(i)},setInnerHtml:function(e,t){e.innerHTML=t;for(var i,n,a=elBySelAll("script",e),r=0,o=a.length;r<o;r++)n=a[r],i=elCreate("script"),n.src?i.src=n.src:i.textContent=n.textContent,e.appendChild(i),elRemove(n)},insertHtml:function(e,t,i){var n=elCreate("div");if(this.setInnerHtml(n,e),n.childNodes.length){var a=n.childNodes[0];switch(i){case"append":t.appendChild(a);break;case"after":this.insertAfter(a,t);break;case"prepend":this.prepend(a,t);break;case"before":t.parentNode.insertBefore(a,t);break;default:throw new Error("Unknown insert method '"+i+"'.")}for(var r;n.childNodes.length;)r=n.childNodes[0],this.insertAfter(r,a),a=r}},contains:function(e,t){for(;null!==t;)if(t=t.parentNode,e===t)return!0;return!1},getDataAttributes:function(e,i,n,a){i=i||"",/^data-/.test(i)||(i="data-"+i),n=!0===n,a=!0===a;for(var r,o,s,l={},c=0,d=e.attributes.length;c<d;c++)if(r=e.attributes[c],0===r.name.indexOf(i)){if(o=r.name.replace(new RegExp("^"+i),""),n){s=o.split("-"),o="";for(var u=0,h=s.length;u<h;u++)o.length&&(a&&"id"===s[u]?s[u]="ID":s[u]=t.ucfirst(s[u])),o+=s[u]}l[o]=r.value}return l},unwrapChildNodes:function(e){for(var t=e.parentNode;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);elRemove(e)},replaceElement:function(e,t){for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),elRemove(e)},isAtNodeStart:function(e,t){return i(e,t,"previous")},isAtNodeEnd:function(e,t){return i(e,t,"next")},getFixedParent:function(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null}};return window.bc_wcfDomUtil=a,a}),define("WoltLabSuite/Core/ObjectMap",[],function(){"use strict";function e(){this._map=t?new WeakMap:{key:[],value:[]}}var t=objOwns(window,"WeakMap")&&"function"==typeof window.WeakMap;return e.prototype={set:function(e,i){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof i||null===i)throw new TypeError("Only objects can be used as value");t?this._map.set(e,i):(this._map.key.push(e),this._map.value.push(i))},delete:function(e){if(t)this._map.delete(e);else{var i=this._map.key.indexOf(e);this._map.key.splice(i),this._map.value.splice(i)}},has:function(e){return t?this._map.has(e):-1!==this._map.key.indexOf(e)},get:function(e){if(t)return this._map.get(e);var i=this._map.key.indexOf(e);return-1!==i?this._map.value[i]:void 0}},e}),define("WoltLabSuite/Core/Dom/Traverse",[],function(){"use strict";var e=[function(e,t){return!0},function(e,t){return e.matches(t)},function(e,t){return e.classList.contains(t)},function(e,t){return e.nodeName===t}],t=function(t,i,n){if(!(t instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(var a=[],r=0;r<t.childElementCount;r++)e[i](t.children[r],n)&&a.push(t.children[r]);return a},i=function(t,i,n,a){if(!(t instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(t=t.parentNode;t instanceof Element;){if(t===a)return null;if(e[i](t,n))return t;t=t.parentNode}return null},n=function(t,i,n,a){if(!(t instanceof Element))throw new TypeError("Expected a valid element as first argument.");return t instanceof Element&&null!==t[i]&&e[n](t[i],a)?t[i]:null};return{childBySel:function(e,i){return t(e,1,i)[0]||null},childByClass:function(e,i){return t(e,2,i)[0]||null},childByTag:function(e,i){return t(e,3,i)[0]||null},childrenBySel:function(e,i){return t(e,1,i)},childrenByClass:function(e,i){return t(e,2,i)},childrenByTag:function(e,i){return t(e,3,i)},parentBySel:function(e,t,n){return i(e,1,t,n)},parentByClass:function(e,t,n){return i(e,2,t,n)},parentByTag:function(e,t,n){return i(e,3,t,n)},next:function(e){return n(e,"nextElementSibling",0,null)},nextBySel:function(e,t){return n(e,"nextElementSibling",1,t)},nextByClass:function(e,t){return n(e,"nextElementSibling",2,t)},nextByTag:function(e,t){return n(e,"nextElementSibling",3,t)},prev:function(e){return n(e,"previousElementSibling",0,null)},prevBySel:function(e,t){return n(e,"previousElementSibling",1,t)},prevByClass:function(e,t){return n(e,"previousElementSibling",2,t)},prevByTag:function(e,t){return n(e,"previousElementSibling",3,t)}}}),define("WoltLabSuite/Core/Ui/Confirmation",["Core","Language","Ui/Dialog"],function(e,t,i){"use strict";var n=!1,a=null,r=null,o={},s=null;return{show:function(t){if(void 0===i&&(i=require("Ui/Dialog")),!n){if(o=e.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},t),o.message="string"==typeof o.message?o.message.trim():"",!o.message.length)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof o.confirm&&"function"!=typeof o.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");null===r&&this._createDialog(),r.innerHTML="string"==typeof o.template?o.template.trim():"",o.messageIsHtml?s.innerHTML=o.message:s.textContent=o.message,n=!0,i.open(this)}},_dialogSetup:function(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:t.get("wcf.global.confirmation.title")}}},getContentElement:function(){return r},_createDialog:function(){var e=elCreate("div");elAttr(e,"id","wcfSystemConfirmation"),e.classList.add("systemConfirmation"),s=elCreate("p"),e.appendChild(s),r=elCreate("div"),elAttr(r,"id","wcfSystemConfirmationContent"),e.appendChild(r);var n=elCreate("div");n.classList.add("formSubmit"),e.appendChild(n),a=elCreate("button"),a.classList.add("buttonPrimary"),a.textContent=t.get("wcf.global.confirmation.confirm"),a.addEventListener(WCF_CLICK_EVENT,this._confirm.bind(this)),n.appendChild(a);var o=elCreate("button");o.textContent=t.get("wcf.global.confirmation.cancel"),o.addEventListener(WCF_CLICK_EVENT,function(){i.close("wcfSystemConfirmation")}),n.appendChild(o),document.body.appendChild(e)},_confirm:function(){"function"==typeof o.legacyCallback?o.legacyCallback("confirm",o.parameters,r):o.confirm(o.parameters,r),n=!1,i.close("wcfSystemConfirmation")},_onClose:function(){n&&(a.blur(),n=!1,"function"==typeof o.legacyCallback?o.legacyCallback("cancel",o.parameters,r):"function"==typeof o.cancel&&o.cancel(o.parameters))},_onShow:function(){a.blur(),a.focus()}}}),define("WoltLabSuite/Core/Ui/Screen",["Core","Dictionary","Environment"],function(e,t,i){"use strict";var n=null,a=new t,r=0,o=null,s=0,l=0,c=t.fromObject({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"}),d=new t;return{on:function(t,i){var n=e.getUuid(),a=this._getQueryObject(t);return"function"==typeof i.match&&a.callbacksMatch.set(n,i.match),"function"==typeof i.unmatch&&a.callbacksUnmatch.set(n,i.unmatch),"function"==typeof i.setup&&(a.mql.matches?i.setup():a.callbacksSetup.set(n,i.setup)),n},remove:function(e,t){var i=this._getQueryObject(e);i.callbacksMatch.delete(t),i.callbacksUnmatch.delete(t),i.callbacksSetup.delete(t)},is:function(e){return this._getQueryObject(e).mql.matches},scrollDisable:function(){if(0===r){s=document.body.scrollTop,o="body",s||(s=document.documentElement.scrollTop,o="documentElement");var e=elById("pageContainer");"ios"===i.platform()?(e.style.setProperty("position","relative",""),e.style.setProperty("top","-"+s+"px","")):e.style.setProperty("margin-top","-"+s+"px",""),document.documentElement.classList.add("disableScrolling")}r++},scrollEnable:function(){if(r&&0===--r){document.documentElement.classList.remove("disableScrolling");var e=elById("pageContainer");"ios"===i.platform()?(e.style.removeProperty("position"),e.style.removeProperty("top")):e.style.removeProperty("margin-top"),s&&(document[o].scrollTop=~~s)}},pageOverlayOpen:function(){0===l&&document.documentElement.classList.add("pageOverlayActive"),l++},pageOverlayClose:function(){l&&0===--l&&document.documentElement.classList.remove("pageOverlayActive")},pageOverlayIsActive:function(){return l>0},setDialogContainer:function(e){n=e},_getQueryObject:function(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");d.has(e)&&(e=d.get(e)),c.has(e)&&(e=c.get(e));var i=a.get(e);return i||(i={callbacksMatch:new t,callbacksUnmatch:new t,callbacksSetup:new t,mql:window.matchMedia(e)},i.mql.addListener(this._mqlChange.bind(this)),a.set(e,i),e!==i.mql.media&&d.set(i.mql.media,e)),i},_mqlChange:function(e){var i=this._getQueryObject(e.media);if(e.matches)i.callbacksSetup.size?(i.callbacksSetup.forEach(function(e){e()}),i.callbacksSetup=new t):i.callbacksMatch.forEach(function(e){e()});else{if(i.callbacksSetup.size)return;i.callbacksUnmatch.forEach(function(e){e()})}}}}),define("WoltLabSuite/Core/Event/Key",[],function(){"use strict";function e(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}return{ArrowDown:function(t){return e(t,"ArrowDown",40)},ArrowLeft:function(t){return e(t,"ArrowLeft",37)},ArrowRight:function(t){return e(t,"ArrowRight",39)},ArrowUp:function(t){return e(t,"ArrowUp",38)},Comma:function(t){return e(t,",",44)},End:function(t){return e(t,"End",35)},Enter:function(t){return e(t,"Enter",13)},Escape:function(t){return e(t,"Escape",27)},Home:function(t){return e(t,"Home",36)},Space:function(t){return e(t,"Space",32)},Tab:function(t){return e(t,"Tab",9)}}}),define("WoltLabSuite/Core/Ui/Alignment",["Core","Language","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";return{set:function(a,r,o){o=e.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},o),Array.isArray(o.pointerClassNames)&&o.pointerClassNames.length===(o.pointer?1:2)||(o.pointerClassNames=[]),-1===["left","right","center"].indexOf(o.horizontal)&&(o.horizontal="left"),"bottom"!==o.vertical&&(o.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(o.allowFlip)&&(o.allowFlip="both"),n.setStyles(a,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});var s=n.outerDimensions(a),l=n.outerDimensions(o.refDimensionsElement instanceof Element?o.refDimensionsElement:r),c=n.offset(r),d=window.innerHeight,u=document.body.clientWidth,h={result:null},f=!1;if("center"===o.horizontal&&(f=!0,h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),h.result||("both"===o.allowFlip||"horizontal"===o.allowFlip?o.horizontal="left":h.result=!0)),"rtl"===t.get("wcf.global.pageDirection")&&(o.horizontal="left"===o.horizontal?"right":"left"),!h.result){var p=h;if(h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),!h.result&&("both"===o.allowFlip||"horizontal"===o.allowFlip)){var m=this._tryAlignmentHorizontal("left"===o.horizontal?"right":"left",s,l,c,u);m.result?h=m:f&&(h=p)}}var g=h.left,v=h.right,_=this._tryAlignmentVertical(o.vertical,s,l,c,d,o.verticalOffset);if(!_.result&&("both"===o.allowFlip||"vertical"===o.allowFlip)){var b=this._tryAlignmentVertical("top"===o.vertical?"bottom":"top",s,l,c,d,o.verticalOffset);b.result&&(_=b)}var w=_.bottom,y=_.top;if(o.pointer){var C=i.childrenByClass(a,"elementPointer");if(null===(C=C[0]||null))throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(C.classList.add("center"),C.classList.remove("left"),C.classList.remove("right")):(C.classList.add(h.align),C.classList.remove("center"),C.classList.remove("left"===h.align?"right":"left")),"top"===_.align?C.classList.add("flipVertical"):C.classList.remove("flipVertical")}else if(2===o.pointerClassNames.length){a.classList["auto"===y?"add":"remove"](o.pointerClassNames[0]),a.classList["auto"===g?"add":"remove"](o.pointerClassNames[1])}"auto"!==w&&(w=Math.round(w)+"px"),"auto"!==g&&(g=Math.ceil(g)+"px"),"auto"!==v&&(v=Math.floor(v)+"px"),"auto"!==y&&(y=Math.round(y)+"px"),n.setStyles(a,{bottom:w,left:g,right:v,top:y}),elShow(a),a.style.removeProperty("visibility")},_tryAlignmentHorizontal:function(e,t,i,n,a){var r="auto",o="auto",s=!0;return"left"===e?(r=n.left)+t.width>a&&(s=!1):"right"===e?n.left+i.width<t.width?s=!1:(o=a-(n.left+i.width))<0&&(s=!1):(r=n.left+i.width/2-t.width/2,((r=~~r)<0||r+t.width>a)&&(s=!1)),{align:e,left:r,right:o,result:s}},_tryAlignmentVertical:function(e,t,i,n,a,r){var o="auto",s="auto",l=!0,c=50,d=elById("pageHeaderPanel");if(null!==d){var u=window.getComputedStyle(d).position;c="fixed"===u||"static"===u?d.offsetHeight:0}if("top"===e){var h=document.body.clientHeight;o=h-n.top+r,h-(o+t.height)<(window.scrollY||window.pageYOffset)+c&&(l=!1)}else(s=n.top+i.height+r)+t.height-(window.scrollY||window.pageYOffset)>a&&(l=!1);return{align:e,bottom:o,top:s,result:l}}}}),define("WoltLabSuite/Core/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,i={setup:function(){document.body.addEventListener(WCF_CLICK_EVENT,this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return i.setup(),i}),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","EventKey","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,i,n,a,r,o,s,l){"use strict";var c=null,d=new e,u=!1,h=new i,f=new i,p=null,m=null,g="";return{setup:function(){u||(u=!0,p=elCreate("div"),p.className="dropdownMenuContainer",document.body.appendChild(p),c=elByClass("dropdownToggle"),this.initAll(),l.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.closeAll.bind(this)),r.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.initAll.bind(this)),document.addEventListener("scroll",this._onScroll.bind(this)),window.bc_wcfSimpleDropdown=this,m=this._dropdownMenuKeyDown.bind(this))},initAll:function(){for(var e=0,t=c.length;e<t;e++)this.init(c[e],!1)},init:function(e,i){if(this.setup(),elAttr(e,"role","button"),elAttr(e,"tabindex","0"),elAttr(e,"aria-haspopup",!0),elAttr(e,"aria-expanded",!1),e.classList.contains("jsDropdownEnabled")||elData(e,"target"))return!1;var n=o.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+s.identify(e)+"' does not have a parent with .dropdown.");var a=o.nextByClass(e,"dropdownMenu");if(null===a)throw new Error("Invalid dropdown passed, button '"+s.identify(e)+"' does not have a menu as next sibling.");p.appendChild(a);var r=s.identify(n);if(!h.has(r)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this)),e.addEventListener("keydown",this._handleKeyDown.bind(this)),h.set(r,n),f.set(r,a),r.match(/^wcf\d+$/)||elData(a,"source",r),a.childElementCount&&a.children[0].classList.contains("scrollableDropdownMenu"))){a=a.children[0],elData(a,"scroll-to-active",!0);var l=null,c=null;a.addEventListener("wheel",function(e){null===l&&(l=a.clientHeight),null===c&&(c=a.scrollHeight),e.deltaY<0&&0===a.scrollTop?e.preventDefault():e.deltaY>0&&a.scrollTop+l===c&&e.preventDefault()},{passive:!1})}elData(e,"target",r),i&&setTimeout(function(){elData(e,"dropdown-lazy-init",i instanceof MouseEvent),t.triggerEvent(e,WCF_CLICK_EVENT),setTimeout(function(){e.removeAttribute("data-dropdown-lazy-init")},10)},10)},initFragment:function(e,t){this.setup();var i=s.identify(e);h.has(i)||(h.set(i,e),p.appendChild(t),f.set(i,t))},registerCallback:function(e,t){d.add(e,t)},getDropdown:function(e){return h.get(e)},getDropdownMenu:function(e){return f.get(e)},toggleDropdown:function(e,t,i){this._toggle(null,e,t,i)},setAlignment:function(e,t,i){var n,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(n=r),a.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:n||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom",allowFlip:elData(t,"dropdown-allow-flip")||"both"})},setAlignmentById:function(e){var t=h.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var i=f.get(e);this.setAlignment(t,i)},isOpen:function(e){var t=f.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open:function(e,t){var i=f.get(e);void 0===i||i.classList.contains("dropdownOpen")||this.toggleDropdown(e,void 0,t)},close:function(e){var t=h.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),f.get(e).classList.remove("dropdownOpen"))},closeAll:function(){h.forEach(function(e,t){
-e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),f.get(t).classList.remove("dropdownOpen"),this._notifyCallbacks(t,"close"))}.bind(this))},destroy:function(e){if(!h.has(e))return!1;try{this.close(e),elRemove(f.get(e))}catch(e){}return f.delete(e),h.delete(e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,i=elBySelAll(".dropdown.dropdownOpen",t),n=0,a=i.length;n<a;n++){var r=i[n],o=s.identify(r),l=s.offset(r),c=s.offset(t);l.top+r.clientHeight<=c.top?this.toggleDropdown(o):l.top>=c.top+t.offsetHeight?this.toggleDropdown(o):l.left<=c.left?this.toggleDropdown(o):l.left>=c.left+t.offsetWidth?this.toggleDropdown(o):this.setAlignment(h.get(o),f.get(o))}},_onScroll:function(){h.forEach(function(e,t){if(e.classList.contains("dropdownOpen"))if(elDataBool(e,"is-overlay-dropdown-button"))this.setAlignment(e,f.get(t));else{var i=f.get(e.id);elDataBool(i,"dropdown-ignore-page-scroll")||this.close(t)}}.bind(this))},_notifyCallbacks:function(e,t){d.forEach(e,function(i){i(e,t)})},_toggle:function(e,t,i,n){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"),void 0===n&&e instanceof MouseEvent&&(n=!0));var a=h.get(t),r=!1;if(void 0!==a){var s,l;if(e&&(s=e.currentTarget,(l=s.parentNode)!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,h.set(t,l))),void 0===n&&(s=a.closest(".dropdownToggle"),s||!(s=elBySel(".dropdownToggle",a))&&a.id&&(s=elBySel('[data-target="'+a.id+'"]')),s&&elDataBool(s,"dropdown-lazy-init")&&(n=!0)),elDataBool(a,"dropdown-prevent-toggle")&&a.classList.contains("dropdownOpen")&&(r=!0),""===elData(a,"is-overlay-dropdown-button")){var c=o.parentByClass(a,"dialogContent");elData(a,"is-overlay-dropdown-button",null!==c),null!==c&&c.addEventListener("scroll",this._onDialogScroll.bind(this))}}return g="",h.forEach(function(e,a){var o=f.get(a);if(e.classList.contains("dropdownOpen"))if(!1===r){e.classList.remove("dropdownOpen"),o.classList.remove("dropdownOpen");var s=elBySel(".dropdownToggle",e);s&&elAttr(s,"aria-expanded",!1),this._notifyCallbacks(a,"close")}else g=t;else if(a===t&&o.childElementCount>0){g=t,e.classList.add("dropdownOpen"),o.classList.add("dropdownOpen");var s=elBySel(".dropdownToggle",e);if(s&&elAttr(s,"aria-expanded",!0),o.childElementCount&&elDataBool(o.children[0],"scroll-to-active")){var l=o.children[0];l.removeAttribute("data-scroll-to-active");for(var c=null,d=0,u=l.childElementCount;d<u;d++)if(l.children[d].classList.contains("active")){c=l.children[d];break}c&&(l.scrollTop=Math.max(c.offsetTop+c.clientHeight-o.clientHeight,0))}var h=elBySel(".scrollableDropdownMenu",o);null!==h&&h.classList[h.scrollHeight>h.clientHeight?"add":"remove"]("forceScrollbar"),this._notifyCallbacks(a,"open");var p=null;n||(elAttr(o,"role","menu"),elAttr(o,"tabindex",-1),o.removeEventListener("keydown",m),o.addEventListener("keydown",m),elBySelAll("li",o,function(e){e.clientHeight&&(null===p?p=e:e.classList.contains("active")&&(p=e),elAttr(e,"role","menuitem"),elAttr(e,"tabindex",-1))})),this.setAlignment(e,o,i),null!==p&&p.focus()}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e},_handleKeyDown:function(e){"INPUT"!==e.currentTarget.nodeName&&(n.Enter(e)||n.Space(e))&&(e.preventDefault(),this._toggle(e))},_dropdownMenuKeyDown:function(e){var t,i,a=document.activeElement;if("LI"===a.nodeName)if(n.ArrowDown(e)||n.ArrowUp(e)||n.End(e)||n.Home(e)){e.preventDefault();var r=Array.prototype.slice.call(elBySelAll("li",a.closest(".dropdownMenu")));(n.ArrowUp(e)||n.End(e))&&r.reverse();var o=null,s=function(e){return!e.classList.contains("dropdownDivider")&&e.clientHeight>0},l=r.indexOf(a);(n.End(e)||n.Home(e))&&(l=-1);for(var c=l+1;c<r.length;c++)if(s(r[c])){o=r[c];break}if(null===o)for(c=0;c<r.length;c++)if(s(r[c])){o=r[c];break}o.focus()}else if(n.Enter(e)||n.Space(e)){e.preventDefault();var d=a;1!==d.childElementCount||"SPAN"!==d.children[0].nodeName&&"A"!==d.children[0].nodeName||(d=d.children[0]),i=h.get(g),t=elBySel(".dropdownToggle",i),require(["Core"],function(e){var n=elData(i,"a11y-mouse-event")||"click";e.triggerEvent(d,n),t&&t.focus()})}else(n.Escape(e)||n.Tab(e))&&(e.preventDefault(),i=h.get(g),t=elBySel(".dropdownToggle",i),null!==t||i.classList.contains("dropdown")||(t=i),this._toggle(null,g),t&&t.focus())}}}),define("WoltLabSuite/Core/Devtools",[],function(){"use strict";var e={editorAutosave:!0,eventLogging:!1},t=function(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(e))},i={help:function(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline");var e=[];for(var t in i)"_internal_"!==t&&i.hasOwnProperty(t)&&e.push(t);e.sort().forEach(function(e){window.console.log("\tDevtools."+e+"()")}),window.console.log("")},toggleEditorAutosave:function(i){e.editorAutosave=!0!==i&&!e.editorAutosave,t(),window.console.log("%c\tEditor autosave "+(e.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEventLogging:function(i){e.eventLogging=!0===i||!e.eventLogging,t(),window.console.log("%c\tEvent logging "+(e.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable:function(){if(window.Devtools=i,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){var t=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==t&&(e=JSON.parse(t))}catch(e){}e.editorAutosave||i.toggleEditorAutosave(!0),e.eventLogging&&i.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:function(){return e.editorAutosave},eventLog:function(t,i){e.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+i+" @ "+t)}}};return i}),define("WoltLabSuite/Core/Event/Handler",["Core","Devtools","Dictionary"],function(e,t,i){"use strict";var n=new i;return{add:function(t,a,r){if("function"!=typeof r)throw new TypeError("[WoltLabSuite/Core/Event/Handler] Expected a valid callback for '"+a+"@"+t+"'.");var o=n.get(t);void 0===o&&(o=new i,n.set(t,o));var s=o.get(a);void 0===s&&(s=new i,o.set(a,s));var l=e.getUuid();return s.set(l,r),l},fire:function(e,i,a){t._internal_.eventLog(e,i),a=a||{};var r=n.get(e);if(void 0!==r){var o=r.get(i);void 0!==o&&o.forEach(function(e){e(a)})}},remove:function(e,t,i){var a=n.get(e);if(void 0!==a){var r=a.get(t);void 0!==r&&r.delete(i)}},removeAll:function(e,t){"string"!=typeof t&&(t=void 0);var i=n.get(e);void 0!==i&&(void 0===t?n.delete(e):i.delete(t))},removeAllBySuffix:function(e,t){var i=n.get(e);if(void 0!==i){t="_"+t;var a=-1*t.length;i.forEach(function(i,n){n.substr(a)===t&&this.removeAll(e,n)}.bind(this))}}}}),define("WoltLabSuite/Core/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=objOwns(window,"Set")&&"function"==typeof window.Set;return e.prototype={add:function(e){t?this._set.add(e):this.has(e)||this._set.push(e)},clear:function(){t?this._set.clear():this._set=[]},delete:function(e){if(t)return this._set.delete(e);var i=this._set.indexOf(e);return-1!==i&&(this._set.splice(i,1),!0)},forEach:function(e){if(t)this._set.forEach(e);else for(var i=0,n=this._set.length;i<n;i++)e(this._set[i])},has:function(e){return t?this._set.has(e):-1!==this._set.indexOf(e)}},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return t?this._set.size:this._set.length}}),e}),define("WoltLabSuite/Core/Ui/Dialog",["Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/Screen","Ui/SimpleDropdown","EventHandler","List","EventKey"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,f,p){"use strict";var m=null,g=null,v=null,_=new i,b=!1,w=new r,y=new i,C=null,E=null,L=elByClass("jsStaticDialog"),S=["onBeforeClose","onClose","onShow"],A=["number","password","search","tel","text","url"],I=['a[href]:not([tabindex^="-"]):not([inert])','area[href]:not([tabindex^="-"]):not([inert])',"input:not([disabled]):not([inert])","select:not([disabled]):not([inert])","textarea:not([disabled]):not([inert])","button:not([disabled]):not([inert])",'iframe:not([tabindex^="-"]):not([inert])','audio:not([tabindex^="-"]):not([inert])','video:not([tabindex^="-"]):not([inert])','[contenteditable]:not([tabindex^="-"]):not([inert])','[tabindex]:not([tabindex^="-"]):not([inert])'];return{setup:function(){void 0===e&&(e=require("Ajax")),v=elCreate("div"),v.classList.add("dialogOverlay"),elAttr(v,"aria-hidden","true"),v.addEventListener("mousedown",this._closeOnBackdrop.bind(this)),v.addEventListener("wheel",function(e){e.target===v&&e.preventDefault()},{passive:!1}),elById("content").appendChild(v),E=function(e){return 27!==e.keyCode||"INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName||(this.close(m),!1)}.bind(this),d.on("screen-xs",{match:function(){b=!0},unmatch:function(){b=!1},setup:function(){b=!0}}),this._initStaticDialogs(),o.add("Ui/Dialog",this._initStaticDialogs.bind(this)),d.setDialogContainer(v),window.addEventListener("resize",function(){_.forEach(function(e){elAttrBool(e.dialog,"aria-hidden")||this.rebuild(elData(e.dialog,"id"))}.bind(this))}.bind(this))},_initStaticDialogs:function(){for(var e,t,i;L.length;)e=L[0],e.classList.remove("jsStaticDialog"),(i=elData(e,"dialog-id"))&&(t=elById(i))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elData(t,"is-static-dialog",!0),elHide(t),e.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.openStatic(t.id,null,{title:elData(t,"title")})}.bind(this))}.bind(this)(e,t)},open:function(i,n){var a=w.get(i);if(t.isPlainObject(a))return this.openStatic(a.id,n);if("function"!=typeof i._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=i._dialogSetup();if(!t.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");a={id:r.id};var o=!0;if(void 0===r.source){var s=elById(r.id);if(null===s)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");r.source=document.createDocumentFragment(),r.source.appendChild(s),s.removeAttribute("id"),elShow(s)}else if(null===r.source)r.source=n;else if("function"==typeof r.source)r.source();else if(t.isPlainObject(r.source)){if("string"!=typeof n||""===n.trim())return e.api(this,r.source.data,function(e){e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(i,e.returnValues.template),"function"==typeof r.source.after&&r.source.after(_.get(r.id).content,e))}.bind(this)),{};r.source=n}else{if("string"==typeof r.source){var s=elCreate("div");elAttr(s,"id",r.id),l.setInnerHtml(s,r.source),r.source=document.createDocumentFragment(),r.source.appendChild(s)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return w.set(i,a),y.set(r.id,i),this.openStatic(r.id,r.source,r.options,o)},openStatic:function(e,i,r,o){d.pageOverlayOpen(),"desktop"!==n.platform()&&(this.isOpen(e)||d.scrollDisable()),_.has(e)?this._updateDialog(e,i):(r=t.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:a.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},r),r.closable||(r.backdropCloseOnClick=!1),r.closeConfirmMessage&&(r.onBeforeClose=function(e){c.show({confirm:this.close.bind(this,e),message:r.closeConfirmMessage})}.bind(this)),this._createDialog(e,i,r));var s=_.get(e);return"ios"===n.platform()&&window.setTimeout(function(){var e=elBySel("input, textarea",s.content);null!==e&&e.focus()}.bind(this),200),s},setTitle:function(e,t){e=this._getDialogId(e);var i=_.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var n=elByClass("dialogTitle",i.dialog);n.length&&(n[0].textContent=t)},setCallback:function(e,t,i){if("object"==typeof e){var n=w.get(e);void 0!==n&&(e=n.id)}var a=_.get(e);if(void 0===a)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if(-1===S.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof i&&null!==i)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof i+"' given).");a[t]=i},_createDialog:function(e,t,i,n){var a=null;if(null===t&&null===(a=elById(e)))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var o=elCreate("header");r.appendChild(o);var s=l.getUniqueId();elAttr(r,"aria-labelledby",s);var c=elCreate("span");if(c.classList.add("dialogTitle"),c.textContent=i.title,elAttr(c,"id",s),o.appendChild(c),i.closable){var d=elCreate("a");d.className="dialogCloseButton jsTooltip",d.href="#",elAttr(d,"role","button"),elAttr(d,"tabindex","0"),elAttr(d,"title",i.closeButtonLabel),elAttr(d,"aria-label",i.closeButtonLabel),d.addEventListener(WCF_CLICK_EVENT,this._close.bind(this)),o.appendChild(d);var u=elCreate("span");u.className="icon icon24 fa-times",d.appendChild(u)}var h=elCreate("div");h.classList.add("dialogContent"),i.disableContentPadding&&h.classList.add("dialogContentNoPadding"),r.appendChild(h),h.addEventListener("wheel",function(e){for(var t,i,n,a=!1,r=e.target;;){if(t=r.clientHeight,i=r.scrollHeight,t<i){if(n=r.scrollTop,e.deltaY<0&&n>0){a=!0;break}if(e.deltaY>0&&n+t<i){a=!0;break}}if(!r||r===h)break;r=r.parentNode}!1===a&&e.preventDefault()},{passive:!1});var p;if(null===a)if("string"==typeof t)p=elCreate("div"),p.id=e,l.setInnerHtml(p,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");for(var m,g=[],b=0,w=t.childNodes.length;b<w;b++)m=t.childNodes[b],m.nodeType===Node.ELEMENT_NODE&&g.push(m);"DIV"!==g[0].nodeName||g.length>1?(p=elCreate("div"),p.id=e,p.appendChild(t)):p=g[0]}else p=a;h.appendChild(p),"none"===p.style.getPropertyValue("display")&&elShow(p),_.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,closable:i.closable,content:p,dialog:r,header:o,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow,submitButton:null,inputFields:new f}),l.prepend(r,v),"function"==typeof i.onSetup&&i.onSetup(p),!0!==n&&this._updateDialog(e,null)},_updateDialog:function(e,t){var i=_.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&l.setInnerHtml(i.content,t),"true"===elAttr(i.dialog,"aria-hidden")){u.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===g&&(g=this._maintainFocus.bind(this),document.body.addEventListener("focus",g,{capture:!0})),i.closable&&"true"===elAttr(v,"aria-hidden")&&window.addEventListener("keyup",E),i.dialog.parentNode.insertBefore(i.dialog,i.dialog.parentNode.firstChild),elAttr(i.dialog,"aria-hidden","false"),elAttr(v,"aria-hidden","false"),elData(v,"close-on-click",i.backdropCloseOnClick?"true":"false"),m=e,C=document.activeElement;var n=elBySel(".dialogCloseButton",i.header);n&&elAttr(n,"inert",!0),this._setFocusToFirstItem(i.dialog),n&&n.removeAttribute("inert"),"function"==typeof i.onShow&&i.onShow(i.content),elDataBool(i.content,"is-static-dialog")&&h.fire("com.woltlab.wcf.dialog","openStatic",{content:i.content,id:e})}this.rebuild(e),o.trigger()},_maintainFocus:function(e){if(m){var t=_.get(m);t.dialog.contains(e.target)||e.target.closest(".dropdownMenuContainer")||e.target.closest(".datePicker")||this._setFocusToFirstItem(t.dialog,!0)}},_setFocusToFirstItem:function(e,t){var i=this._getFirstFocusableChild(e);null!==i&&(t&&("username"!==i.id&&"username"!==i.name||"safari"===n.browser()&&"ios"===n.platform()&&(i=null)),i&&setTimeout(function(){i.focus()},1))},_getFirstFocusableChild:function(e){for(var t=elBySelAll(I.join(","),e),i=0,n=t.length;i<n;i++)if(t[i].offsetWidth&&t[i].offsetHeight&&t[i].getClientRects().length)return t[i];return null},rebuild:function(e){e=this._getDialogId(e);var t=_.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("true"!==elAttr(t.dialog,"aria-hidden")){var i=t.content.parentNode,a=elBySel(".formSubmit",t.content),r=0;null!==a?(i.classList.add("dialogForm"),a.classList.add("dialogFormSubmit"),r+=l.outerHeight(a),r-=1,i.style.setProperty("margin-bottom",r+"px","")):(i.classList.remove("dialogForm"),i.style.removeProperty("margin-bottom")),r+=l.outerHeight(t.header);var o=window.innerHeight*(b?1:.8)-r;i.style.setProperty("max-height",~~o+"px",""),"chrome"===n.browser()&&(t.content.scrollHeight>o?t.content.style.setProperty("margin-right","-1px",""):t.content.style.removeProperty("margin-right")),"chrome"!==n.browser()&&"safari"!==n.browser()||t.content.parentNode.classList.add("jsWebKitFractionalPixelFix");var s=y.get(e);if(void 0!==s&&"function"==typeof s._dialogSubmit){var c=elBySelAll('input[data-dialog-submit-on-enter="true"]',t.content),d=elBySel('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]',t.content);if(null===d)return void(0===c.length&&console.warn("Broken dialog, expected a submit button.",t.content));if(t.submitButton!==d){t.submitButton=d,d.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),this._submit(e)}.bind(this));for(var u,h=null,f=0,m=c.length;f<m;f++)u=c[f],t.inputFields.has(u)||(-1!==A.indexOf(u.type)?(t.inputFields.add(u),null===h&&(h=function(t){p.Enter(t)&&(t.preventDefault(),this._submit(e))}.bind(this)),u.addEventListener("keydown",h)):console.warn("Unsupported input type.",u))}}}},_submit:function(e){var t=_.get(e),i=!0;t.inputFields.forEach(function(e){e.required&&(""===e.value.trim()?(elInnerError(e,a.get("wcf.global.form.error.empty")),i=!1):elInnerError(e,!1))}),i&&y.get(e)._dialogSubmit()},_close:function(e){e.preventDefault();var t=_.get(m);if("function"==typeof t.onBeforeClose)return t.onBeforeClose(m),!1;this.close(m)},_closeOnBackdrop:function(e){if(e.target!==v)return!0;"true"===elData(v,"close-on-click")?this._close(e):e.preventDefault()},close:function(e){e=this._getDialogId(e);var t=_.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");elAttr(t.dialog,"aria-hidden","true"),document.activeElement.closest(".dialogContainer")===t.dialog&&document.activeElement.blur(),"function"==typeof t.onClose&&t.onClose(e),m=null;for(var i=0;i<v.childElementCount;i++){var a=v.children[i];if("false"===elAttr(a,"aria-hidden")){m=elData(a,"id");break}}d.pageOverlayClose(),null===m?(elAttr(v,"aria-hidden","true"),elData(v,"close-on-click","false"),t.closable&&window.removeEventListener("keyup",E)):(t=_.get(m),elData(v,"close-on-click",t.backdropCloseOnClick?"true":"false")),"desktop"!==n.platform()&&d.scrollEnable()},getDialog:function(e){return _.get(this._getDialogId(e))},isOpen:function(e){var t=this.getDialog(e);return void 0!==t&&"false"===elAttr(t.dialog,"aria-hidden")},destroy:function(e){if("object"!=typeof e||e instanceof String)throw new TypeError("Expected the callback object as parameter.");if(w.has(e)){var t=w.get(e).id;this.isOpen(t)&&this.close(t),_.has(t)&&(elRemove(_.get(t).dialog),_.delete(t)),w.delete(e)}},_getDialogId:function(e){if("object"==typeof e){var t=w.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:function(){return{}}}}),define("WoltLabSuite/Core/Ajax/Status",["Language"],function(e){"use strict";var t=0,i=null,n=null;return{_init:function(){i=elCreate("div"),i.classList.add("spinner"),elAttr(i,"role","status");var t=elCreate("span");t.className="icon icon48 fa-spinner",i.appendChild(t);var n=elCreate("span");n.textContent=e.get("wcf.global.loading"),i.appendChild(n),document.body.appendChild(i)},show:function(){null===i&&this._init(),t++,null===n&&(n=window.setTimeout(function(){t&&i.classList.add("active"),n=null},250))},hide:function(){0===--t&&(null!==n&&window.clearTimeout(n),i.classList.remove("active"))}}}),define("WoltLabSuite/Core/Ajax/Request",["Core","Language","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ajax/Status"],function(e,t,i,n,a,r){"use strict";function o(e){this._data=null,this._options={},this._previousXhr=null,this._xhr=null,this._init(e)}var s=!1,l=!1;return o.prototype={_init:function(t){this._options=e.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},t),"object"==typeof t.callbackObject&&(this._options.callbackObject=t.callbackObject),this._options.url=e.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),0===this._options.url.indexOf(WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=e.extend({},this._options.data)),null!==this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),!1===s&&(s=!0,window.addEventListener("beforeunload",function(){l=!0}))},sendRequest:function(t){(!0===t||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||r.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.withCredentials&&(this._xhr.withCredentials=!0);var i=this,n=e.clone(this._options);if(this._xhr.onload=function(){this.readyState===XMLHttpRequest.DONE&&(this.status>=200&&this.status<300||304===this.status?n.responseType&&0!==this.getResponseHeader("Content-Type").indexOf(n.responseType)?i._failure(this,n):i._success(this,n):i._failure(this,n))},this._xhr.onerror=function(){i._failure(this,n)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){var a=this._options.data;"object"==typeof a&&"FormData"!==e.getType(a)&&(a=e.serialize(a)),this._xhr.send(a)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,e)?this._options[e]:null},setData:function(t){null!==this._data&&"FormData"!==e.getType(t)&&(t=e.extend(this._data,t)),this._options.data=t},_success:function(e,t){if(t.silent||r.hide(),"function"==typeof t.success){var i=null;if("application/json"===e.getResponseHeader("Content-Type").split(";",1)[0].trim()){try{i=JSON.parse(e.responseText)}catch(i){return void this._failure(e,t)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim()),i&&i.forceBackgroundQueuePerform&&require(["WoltLabSuite/Core/BackgroundQueue"],function(e){e.invoke()})}t.success(i,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,i){if(!l){i.silent||r.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(e){}var s=!0;if("function"==typeof i.failure&&(s=i.failure(o||{},e.responseText||"",e,i.data)),!0!==i.ignoreError&&!1!==s){var c=this.getErrorHtml(o,e);c&&(void 0===a&&(a=require("Ui/Dialog")),a.openStatic(n.getUniqueId(),c,{title:t.get("wcf.global.error.title")}))}this._finalize(i)}},getErrorHtml:function(e,t){var i="",n="";if(null!==e?(e.returnValues&&e.returnValues.description&&(i+="<br><p>Description:</p><p>"+e.returnValues.description+"</p>"),e.file&&e.line&&(i+="<br><p>File:</p><p>"+e.file+" in line "+e.line+"</p>"),e.stacktrace?i+="<br><p>Stacktrace:</p><p>"+e.stacktrace+"</p>":e.exceptionID&&(i+="<br><p>Exception ID: <code>"+e.exceptionID+"</code></p>"),n=e.message,e.previous.forEach(function(e){i+="<hr><p>"+e.message+"</p>",i+="<br><p>Stacktrace</p><p>"+e.stacktrace+"</p>"})):n=t.responseText,!n||"undefined"===n){if(!ENABLE_DEBUG_MODE)return null;n="XMLHttpRequest failed without a responseText. Check your browser console."}return'<div class="ajaxDebugMessage"><p>'+n+"</p>"+i+"</div>"},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,i.trigger();for(var t=elBySelAll('a[href*="#"]'),n=0,a=t.length;n<a;n++){var r=t[n],o=elAttr(r,"href");-1===o.indexOf("AJAXProxy")&&-1===o.indexOf("ajax-proxy")||(o=o.substr(o.indexOf("#")),elAttr(r,"href",document.location.toString().replace(/#.*/,"")+o))}}},o}),define("WoltLabSuite/Core/Ajax",["AjaxRequest","Core","ObjectMap"],function(e,t,i){"use strict";var n=new i;return{api:function(t,i,a,r){void 0===e&&(e=require("AjaxRequest")),"object"!=typeof i&&(i={});var o=n.get(t);if(void 0===o){if("function"!=typeof t._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");var s=t._ajaxSetup();s.pinData=!0,s.callbackObject=t,s.url||(s.url="index.php?ajax-proxy/&t="+SECURITY_TOKEN,s.withCredentials=!0),o=new e(s),n.set(t,o)}var l=null,c=null;return"function"==typeof a&&(l=o.getOption("success"),o.setOption("success",a)),"function"==typeof r&&(c=o.getOption("failure"),o.setOption("failure",r)),o.setData(i),o.sendRequest(),null!==l&&o.setOption("success",l),null!==c&&o.setOption("failure",c),o},apiOnce:function(t){void 0===e&&(e=require("AjaxRequest")),t.pinData=!1,t.callbackObject=null,t.url||(t.url="index.php?ajax-proxy/&t="+SECURITY_TOKEN,t.withCredentials=!0),new e(t).sendRequest(!1)},getRequestObject:function(e){if(!n.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return n.get(e)}}}),define("WoltLabSuite/Core/BackgroundQueue",["Ajax"],function(e){"use strict";var t=0,i=!1,n="";return{setUrl:function(e){n=e},invoke:function(){if(""===n)return void console.error("The background queue has not been initialized yet.");i||(i=!0,e.api(this))},_ajaxSuccess:function(e){t++,e>0&&t<5?window.setTimeout(function(){i=!1,this.invoke()}.bind(this),1e3):(i=!1,t=0)},_ajaxSetup:function(){return{url:n,ignoreError:!0,silent:!0}}}}),function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||g)return!1;try{d.clearRect(0,0,l,s),d.drawImage(e,0,0,l,s)}catch(e){}b=setTimeout(function(){t(e)},N.duration),B.setIcon(c)}function i(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,i,n){return t+t+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return!!i&&{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}}function n(e,t){var i,n={};for(i in e)n[i]=e[i];for(i in t)n[i]=t[i];return n}function a(){return w.hidden||w.msHidden||w.webkitHidden||w.mozHidden}e=e||{};var r,o,s,l,c,d,u,h,f,p,m,g,v,_,b,w,y={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,element:null,dataUrl:!1,win:window};v={},v.ff="undefined"!=typeof InstallTrigger,v.chrome=!!window.chrome,v.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var C=[];m=function(){},h=g=!1;var E={};E.ready=function(){h=!0,E.reset(),m()},E.reset=function(){h&&(C=[],f=!1,p=!1,d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),B.setIcon(c),window.clearTimeout(_),window.clearTimeout(b))},E.start=function(){if(h&&!p){var e=function(){f=C[0],p=!1,C.length>0&&(C.shift(),E.start())};if(C.length>0){p=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in C[0].options&&(r[e]=C[0].options[e])}),N.run(C[0].options,function(){e()},!1)};f?N.run(f.options,function(){t()},!0):t()}}};var L={},S=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=l*e.x,e.y=s*e.y,e.w=l*e.w,e.h=s*e.h,e.len=(""+e.n).length,e};L.circle=function(e){e=S(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.fontFamily,d.textAlign="center",t?(d.moveTo(e.x+e.w/2,e.y),d.lineTo(e.x+e.w-e.h/2,e.y),d.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),d.lineTo(e.x+e.w,e.y+e.h-e.h/2),d.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),d.lineTo(e.x+e.h/2,e.y+e.h),d.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),d.lineTo(e.x,e.y+e.h/2),d.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):d.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fill(),d.closePath(),d.beginPath(),d.stroke(),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()},L.rectangle=function(e){e=S(e);2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,d.textAlign="center",d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fillRect(e.x,e.y,e.w,e.h),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()};var A=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&N.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&L[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=i(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),C.push(n),C.length>100)throw new Error("Too many badges requests in queue.");E.start()}else E.reset()}catch(e){throw new Error("Error setting badge. Message: "+e.message)}},h&&m()},I=function(e){m=function(){try{var t=e.width,i=e.height,n=document.createElement("img"),a=t/l<i/s?t/l:i/s;n.setAttribute("crossOrigin","anonymous"),n.onload=function(){d.clearRect(0,0,l,s),d.drawImage(n,0,0,l,s),B.setIcon(c)},n.setAttribute("src",e.getAttribute("src")),n.height=i/a,n.width=t/a}catch(e){throw new Error("Error setting image. Message: "+e.message)}},h&&m()},D=function(e){m=function(){B.setIconSrc(e)},h&&m()},x=function(e){m=function(){try{
-if("stop"===e)return g=!0,E.reset(),void(g=!1);e.addEventListener("play",function(){t(this)},!1)}catch(e){throw new Error("Error setting video. Message: "+e.message)}},h&&m()},T=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),v.supported){var i=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,m=function(){try{if("stop"===e)return g=!0,E.reset(),void(g=!1);i=document.createElement("video"),i.width=l,i.height=s,navigator.getUserMedia({video:!0,audio:!1},function(e){i.src=URL.createObjectURL(e),i.play(),t(i)},function(){})}catch(e){throw new Error("Error setting webcam. Message: "+e.message)}},h&&m()}},k=function(e,t){var n=e;null==t&&"[object Object]"==Object.prototype.toString.call(e)||(n={},n[e]=t);for(var a=Object.keys(n),o=0;o<a.length;o++)"bgColor"==a[o]||"textColor"==a[o]?r[a[o]]=i(n[a[o]]):r[a[o]]=n[a[o]];C.push(f),E.start()},B={};B.getIcons=function(){var e=[];return r.element?e=[r.element]:r.elementId?(e=[w.getElementById(r.elementId)],e[0].setAttribute("href",e[0].getAttribute("src"))):(e=function(){for(var e=[],t=w.getElementsByTagName("head")[0].getElementsByTagName("link"),i=0;i<t.length;i++)/(^|\s)icon(\s|$)/i.test(t[i].getAttribute("rel"))&&e.push(t[i]);return e}(),0===e.length&&(e=[w.createElement("link")],e[0].setAttribute("rel","icon"),w.getElementsByTagName("head")[0].appendChild(e[0]))),e.forEach(function(e){e.setAttribute("type","image/png")}),e},B.setIcon=function(e){var t=e.toDataURL("image/png");B.setIconSrc(t)},B.setIconSrc=function(e){if(r.dataUrl&&r.dataUrl(e),r.element)r.element.setAttribute("href",e),r.element.setAttribute("src",e);else if(r.elementId){var t=w.getElementById(r.elementId);t.setAttribute("href",e),t.setAttribute("src",e)}else if(v.ff||v.opera){var i=o[o.length-1],n=w.createElement("link");o=[n],v.opera&&n.setAttribute("rel","icon"),n.setAttribute("rel","icon"),n.setAttribute("type","image/png"),w.getElementsByTagName("head")[0].appendChild(n),n.setAttribute("href",e),i.parentNode&&i.parentNode.removeChild(i)}else o.forEach(function(t){t.setAttribute("href",e)})};var N={};return N.duration=40,N.types={},N.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],N.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],N.run=function(e,t,i,o){var s=N.types[a()?"none":r.animation];if(o=!0===i?void 0!==o?o:s.length-1:void 0!==o?o:0,t=t||function(){},!(o<s.length&&o>=0))return void t();L[r.type](n(e,s[o])),_=setTimeout(function(){i?o-=1:o+=1,N.run(e,t,i,o)},N.duration),B.setIcon(c)},function(){r=n(y,e),r.bgColor=i(r.bgColor),r.textColor=i(r.textColor),r.position=r.position.toLowerCase(),r.animation=N.types[""+r.animation]?r.animation:y.animation,w=r.win.document;var t=r.position.indexOf("up")>-1,a=r.position.indexOf("left")>-1;if(t||a)for(var h in N.types)for(var f=0;f<N.types[h].length;f++){var p=N.types[h][f];t&&(p.y<.6?p.y=p.y-.4:p.y=p.y-2*p.y+(1-p.w)),a&&(p.x<.6?p.x=p.x-.4:p.x=p.x-2*p.x+(1-p.h)),N.types[h][f]=p}r.type=L[""+r.type]?r.type:y.type,o=B.getIcons(),c=document.createElement("canvas"),u=document.createElement("img");var m=o[o.length-1];m.hasAttribute("href")?(u.setAttribute("crossOrigin","anonymous"),u.onload=function(){s=u.height>0?u.height:32,l=u.width>0?u.width:32,c.height=s,c.width=l,d=c.getContext("2d"),E.ready()},u.setAttribute("src",m.getAttribute("href"))):(s=32,l=32,u.height=s,u.width=l,c.height=s,c.width=l,d=c.getContext("2d"),E.ready())}(),{badge:A,video:x,image:I,rawImageSrc:D,webcam:T,setOpt:k,reset:E.reset,browser:{supported:v.supported}}};void 0!==define&&define.amd?define("favico",[],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),function(e,t,i){var n=window.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=i(n):"function"==typeof define&&define.amd?define("enquire",[],function(){return t.enquire=i(n)}):t.enquire=i(n)}(0,this,function(e){"use strict";function t(e,t){var i=0,n=e.length;for(i;i<n&&!1!==t(e[i],i);i++);}function i(e){return"[object Array]"===Object.prototype.toString.apply(e)}function n(e){return"function"==typeof e}function a(e){this.options=e,!e.deferSetup&&this.setup()}function r(t,i){this.query=t,this.isUnconditional=i,this.handlers=[],this.mql=e(t);var n=this;this.listener=function(e){n.mql=e,n.assess()},this.mql.addListener(this.listener)}function o(){if(!e)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!e("only all").matches}return a.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},r.prototype={addHandler:function(e){var t=new a(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var i=this.handlers;t(i,function(t,n){if(t.equals(e))return t.destroy(),!i.splice(n,1)})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){t(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";t(this.handlers,function(t){t[e]()})}},o.prototype={register:function(e,a,o){var s=this.queries,l=o&&this.browserIsIncapable;return s[e]||(s[e]=new r(e,l)),n(a)&&(a={match:a}),i(a)||(a=[a]),t(a,function(t){n(t)&&(t={match:t}),s[e].addHandler(t)}),this},unregister:function(e,t){var i=this.queries[e];return i&&(t?i.removeHandler(t):(i.clear(),delete this.queries[e])),this}},new o}),function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i||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}({1:[function(e,t,i){"use strict";var n=e("../main");"function"==typeof define&&define.amd?define("perfect-scrollbar",n):(window.PerfectScrollbar=n,void 0===window.Ps&&(window.Ps=n))},{"../main":7}],2:[function(e,t,i){"use strict";function n(e,t){var i=e.className.split(" ");i.indexOf(t)<0&&i.push(t),e.className=i.join(" ")}function a(e,t){var i=e.className.split(" "),n=i.indexOf(t);n>=0&&i.splice(n,1),e.className=i.join(" ")}i.add=function(e,t){e.classList?e.classList.add(t):n(e,t)},i.remove=function(e,t){e.classList?e.classList.remove(t):a(e,t)},i.list=function(e){return e.classList?Array.prototype.slice.apply(e.classList):e.className.split(" ")}},{}],3:[function(e,t,i){"use strict";function n(e,t){return window.getComputedStyle(e)[t]}function a(e,t,i){return"number"==typeof i&&(i=i.toString()+"px"),e.style[t]=i,e}function r(e,t){for(var i in t){var n=t[i];"number"==typeof n&&(n=n.toString()+"px"),e.style[i]=n}return e}var o={};o.e=function(e,t){var i=document.createElement(e);return i.className=t,i},o.appendTo=function(e,t){return t.appendChild(e),e},o.css=function(e,t,i){return"object"==typeof t?r(e,t):void 0===i?n(e,t):a(e,t,i)},o.matches=function(e,t){return void 0!==e.matches?e.matches(t):void 0!==e.matchesSelector?e.matchesSelector(t):void 0!==e.webkitMatchesSelector?e.webkitMatchesSelector(t):void 0!==e.mozMatchesSelector?e.mozMatchesSelector(t):void 0!==e.msMatchesSelector?e.msMatchesSelector(t):void 0},o.remove=function(e){void 0!==e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)},o.queryChildren=function(e,t){return Array.prototype.filter.call(e.childNodes,function(e){return o.matches(e,t)})},t.exports=o},{}],4:[function(e,t,i){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){void 0===this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var i=void 0!==t;this.events[e]=this.events[e].filter(function(n){return!(!i||n===t)||(this.element.removeEventListener(e,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var a=function(){this.eventElements=[]};a.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return void 0===t&&(t=new n(e),this.eventElements.push(t)),t},a.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},a.prototype.unbind=function(e,t,i){this.eventElement(e).unbind(t,i)},a.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},a.prototype.once=function(e,t,i){var n=this.eventElement(e),a=function(e){n.unbind(t,a),i(e)};n.bind(t,a)},t.exports=a},{}],5:[function(e,t,i){"use strict";t.exports=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}()},{}],6:[function(e,t,i){"use strict";var n=e("./class"),a=e("./dom"),r=i.toInt=function(e){return parseInt(e,10)||0},o=i.clone=function(e){if(e){if(e.constructor===Array)return e.map(o);if("object"==typeof e){var t={};for(var i in e)t[i]=o(e[i]);return t}return e}return null};i.extend=function(e,t){var i=o(e);for(var n in t)i[n]=o(t[n]);return i},i.isEditable=function(e){return a.matches(e,"input,[contenteditable]")||a.matches(e,"select,[contenteditable]")||a.matches(e,"textarea,[contenteditable]")||a.matches(e,"button,[contenteditable]")},i.removePsClasses=function(e){for(var t=n.list(e),i=0;i<t.length;i++){var a=t[i];0===a.indexOf("ps-")&&n.remove(e,a)}},i.outerWidth=function(e){return r(a.css(e,"width"))+r(a.css(e,"paddingLeft"))+r(a.css(e,"paddingRight"))+r(a.css(e,"borderLeftWidth"))+r(a.css(e,"borderRightWidth"))},i.startScrolling=function(e,t){n.add(e,"ps-in-scrolling"),void 0!==t?n.add(e,"ps-"+t):(n.add(e,"ps-x"),n.add(e,"ps-y"))},i.stopScrolling=function(e,t){n.remove(e,"ps-in-scrolling"),void 0!==t?n.remove(e,"ps-"+t):(n.remove(e,"ps-x"),n.remove(e,"ps-y"))},i.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(e,t,i){"use strict";var n=e("./plugin/destroy"),a=e("./plugin/initialize"),r=e("./plugin/update");t.exports={initialize:a,update:r,destroy:n}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(e,t,i){"use strict";t.exports={handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}},{}],9:[function(e,t,i){"use strict";var n=e("../lib/helper"),a=e("../lib/dom"),r=e("./instances");t.exports=function(e){var t=r.get(e);t&&(t.event.unbindAll(),a.remove(t.scrollbarX),a.remove(t.scrollbarY),a.remove(t.scrollbarXRail),a.remove(t.scrollbarYRail),n.removePsClasses(e),r.remove(e))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(e,t,i){"use strict";function n(e,t){function i(e){return e.getBoundingClientRect()}var n=function(e){e.stopPropagation()};t.event.bind(t.scrollbarY,"click",n),t.event.bind(t.scrollbarYRail,"click",function(n){var a=n.pageY-window.pageYOffset-i(t.scrollbarYRail).top,s=a>t.scrollbarYTop?1:-1;o(e,"top",e.scrollTop+s*t.containerHeight),r(e),n.stopPropagation()}),t.event.bind(t.scrollbarX,"click",n),t.event.bind(t.scrollbarXRail,"click",function(n){var a=n.pageX-window.pageXOffset-i(t.scrollbarXRail).left,s=a>t.scrollbarXLeft?1:-1;o(e,"left",e.scrollLeft+s*t.containerWidth),r(e),n.stopPropagation()})}var a=e("../instances"),r=e("../update-geometry"),o=e("../update-scroll");t.exports=function(e){n(e,a.get(e))}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(e,t,i){"use strict";function n(e,t){function i(i){var a=n+i*t.railXRatio,o=Math.max(0,t.scrollbarXRail.getBoundingClientRect().left)+t.railXRatio*(t.railXWidth-t.scrollbarXWidth);t.scrollbarXLeft=a<0?0:a>o?o:a;var s=r.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.railXRatio*t.scrollbarXWidth))-t.negativeScrollAdjustment;c(e,"left",s)}var n=null,a=null,s=function(t){i(t.pageX-a),l(e),t.stopPropagation(),t.preventDefault()},d=function(){r.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(i){a=i.pageX,n=r.toInt(o.css(t.scrollbarX,"left"))*t.railXRatio,r.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",d),i.stopPropagation(),i.preventDefault()})}function a(e,t){function i(i){var a=n+i*t.railYRatio,o=Math.max(0,t.scrollbarYRail.getBoundingClientRect().top)+t.railYRatio*(t.railYHeight-t.scrollbarYHeight);t.scrollbarYTop=a<0?0:a>o?o:a;var s=r.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.railYRatio*t.scrollbarYHeight));c(e,"top",s)}var n=null,a=null,s=function(t){i(t.pageY-a),l(e),t.stopPropagation(),t.preventDefault()},d=function(){r.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(i){a=i.pageY,n=r.toInt(o.css(t.scrollbarY,"top"))*t.railYRatio,r.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",d),i.stopPropagation(),i.preventDefault()})}var r=e("../../lib/helper"),o=e("../../lib/dom"),s=e("../instances"),l=e("../update-geometry"),c=e("../update-scroll");t.exports=function(e){var t=s.get(e);n(e,t),a(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}var n=!1;t.event.bind(e,"mouseenter",function(){n=!0}),t.event.bind(e,"mouseleave",function(){n=!1});var o=!1;t.event.bind(t.ownerDocument,"keydown",function(c){if(!(c.isDefaultPrevented&&c.isDefaultPrevented()||c.defaultPrevented)){var d=r.matches(t.scrollbarX,":focus")||r.matches(t.scrollbarY,":focus");if(n||d){var u=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(u){if("IFRAME"===u.tagName)u=u.contentDocument.activeElement;else for(;u.shadowRoot;)u=u.shadowRoot.activeElement;if(a.isEditable(u))return}var h=0,f=0;switch(c.which){case 37:h=c.metaKey?-t.contentWidth:c.altKey?-t.containerWidth:-30;break;case 38:f=c.metaKey?t.contentHeight:c.altKey?t.containerHeight:30;break;case 39:h=c.metaKey?t.contentWidth:c.altKey?t.containerWidth:30;break;case 40:f=c.metaKey?-t.contentHeight:c.altKey?-t.containerHeight:-30;break;case 33:f=90;break;case 32:f=c.shiftKey?90:-90;break;case 34:f=-90;break;case 35:f=c.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:f=c.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}l(e,"top",e.scrollTop-f),l(e,"left",e.scrollLeft+h),s(e),o=i(h,f),o&&c.preventDefault()}}})}var a=e("../../lib/helper"),r=e("../../lib/dom"),o=e("../instances"),s=e("../update-geometry"),l=e("../update-scroll");t.exports=function(e){n(e,o.get(e))}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}function n(e){var t=e.deltaX,i=-1*e.deltaY;return void 0!==t&&void 0!==i||(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=e.wheelDelta),e.shiftKey?[-i,-t]:[t,i]}function a(t,i){var n=e.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(n){if(!window.getComputedStyle(n).overflow.match(/(scroll|auto)/))return!1;var a=n.scrollHeight-n.clientHeight;if(a>0&&!(0===n.scrollTop&&i>0||n.scrollTop===a&&i<0))return!0;var r=n.scrollLeft-n.clientWidth;if(r>0&&!(0===n.scrollLeft&&t<0||n.scrollLeft===r&&t>0))return!0}return!1}function s(s){var c=n(s),d=c[0],u=c[1];a(d,u)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(u?o(e,"top",e.scrollTop-u*t.settings.wheelSpeed):o(e,"top",e.scrollTop+d*t.settings.wheelSpeed),l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(d?o(e,"left",e.scrollLeft+d*t.settings.wheelSpeed):o(e,"left",e.scrollLeft-u*t.settings.wheelSpeed),l=!0):(o(e,"top",e.scrollTop-u*t.settings.wheelSpeed),o(e,"left",e.scrollLeft+d*t.settings.wheelSpeed)),r(e),(l=l||i(d,u))&&(s.stopPropagation(),s.preventDefault()))}var l=!1;void 0!==window.onwheel?t.event.bind(e,"wheel",s):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",s)}var a=e("../instances"),r=e("../update-geometry"),o=e("../update-scroll");t.exports=function(e){n(e,a.get(e))}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(e,t,i){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e){n(e,a.get(e))}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,i){"use strict";function n(e,t){function i(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function n(){c||(c=setInterval(function(){if(!r.get(e))return void clearInterval(c);s(e,"top",e.scrollTop+d.top),s(e,"left",e.scrollLeft+d.left),o(e)},50))}function l(){c&&(clearInterval(c),c=null),a.stopScrolling(e)}var c=null,d={top:0,left:0},u=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(i())?u=!0:(u=!1,l())}),t.event.bind(window,"mouseup",function(){u&&(u=!1,l())}),t.event.bind(window,"keyup",function(){u&&(u=!1,l())}),t.event.bind(window,"mousemove",function(t){if(u){var i={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};i.x<r.left+3?(d.left=-5,a.startScrolling(e,"x")):i.x>r.right-3?(d.left=5,a.startScrolling(e,"x")):d.left=0,i.y<r.top+3?(d.top=r.top+3-i.y<5?-5:-20,a.startScrolling(e,"y")):i.y>r.bottom-3?(d.top=i.y-r.bottom+3<5?5:20,a.startScrolling(e,"y")):d.top=0,0===d.top&&0===d.left?l():n()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry"),s=e("../update-scroll");t.exports=function(e){n(e,r.get(e))}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(e,t,i){"use strict";function n(e,t,i,n){function a(i,n){var a=e.scrollTop,r=e.scrollLeft,o=Math.abs(i),s=Math.abs(n);if(s>o){if(n<0&&a===t.contentHeight-t.containerHeight||n>0&&0===a)return!t.settings.swipePropagation}else if(o>s&&(i<0&&r===t.contentWidth-t.containerWidth||i>0&&0===r))return!t.settings.swipePropagation;return!0}function l(t,i){s(e,"top",e.scrollTop-i),s(e,"left",e.scrollLeft-t),o(e)}function c(){w=!0}function d(){w=!1}function u(e){return e.targetTouches?e.targetTouches[0]:e}function h(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function f(e){if(h(e)){y=!0;var t=u(e);g.pageX=t.pageX,g.pageY=t.pageY,v=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function p(e){if(!y&&t.settings.swipePropagation&&f(e),!w&&y&&h(e)){var i=u(e),n={pageX:i.pageX,pageY:i.pageY},r=n.pageX-g.pageX,o=n.pageY-g.pageY;l(r,o),g=n;var s=(new Date).getTime(),c=s-v;c>0&&(_.x=r/c,_.y=o/c,v=s),a(r,o)&&(e.stopPropagation(),e.preventDefault())}}function m(){!w&&y&&(y=!1,clearInterval(b),b=setInterval(function(){return r.get(e)&&(_.x||_.y)?Math.abs(_.x)<.01&&Math.abs(_.y)<.01?void clearInterval(b):(l(30*_.x,30*_.y),_.x*=.8,void(_.y*=.8)):void clearInterval(b)},10))}var g={},v=0,_={},b=null,w=!1,y=!1;i?(t.event.bind(window,"touchstart",c),t.event.bind(window,"touchend",d),t.event.bind(e,"touchstart",f),t.event.bind(e,"touchmove",p),t.event.bind(e,"touchend",m)):n&&(window.PointerEvent?(t.event.bind(window,"pointerdown",c),t.event.bind(window,"pointerup",d),t.event.bind(e,"pointerdown",f),t.event.bind(e,"pointermove",p),t.event.bind(e,"pointerup",m)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",c),t.event.bind(window,"MSPointerUp",d),t.event.bind(e,"MSPointerDown",f),t.event.bind(e,"MSPointerMove",p),t.event.bind(e,"MSPointerUp",m)))}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry"),s=e("../update-scroll");t.exports=function(e){if(a.env.supportsTouch||a.env.supportsIePointer){n(e,r.get(e),a.env.supportsTouch,a.env.supportsIePointer)}}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(e,t,i){"use strict";var n=e("../lib/helper"),a=e("../lib/class"),r=e("./instances"),o=e("./update-geometry"),s={"click-rail":e("./handler/click-rail"),"drag-scrollbar":e("./handler/drag-scrollbar"),keyboard:e("./handler/keyboard"),wheel:e("./handler/mouse-wheel"),touch:e("./handler/touch"),selection:e("./handler/selection")},l=e("./handler/native-scroll");t.exports=function(e,t){t="object"==typeof t?t:{},a.add(e,"ps-container");var i=r.add(e);i.settings=n.extend(i.settings,t),a.add(e,"ps-theme-"+i.settings.theme),i.settings.handlers.forEach(function(t){s[t](e)}),l(e),o(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,i){"use strict";function n(e){function t(){l.add(e,"ps-focus")}function i(){l.remove(e,"ps-focus")}var n=this;n.settings=s.clone(c),n.containerWidth=null,n.containerHeight=null,n.contentWidth=null,n.contentHeight=null,n.isRtl="rtl"===d.css(e,"direction"),n.isNegativeScroll=function(){var t=e.scrollLeft,i=null;return e.scrollLeft=-1,i=e.scrollLeft<0,e.scrollLeft=t,i}(),n.negativeScrollAdjustment=n.isNegativeScroll?e.scrollWidth-e.clientWidth:0,n.event=new u,n.ownerDocument=e.ownerDocument||document,n.scrollbarXRail=d.appendTo(d.e("div","ps-scrollbar-x-rail"),e),n.scrollbarX=d.appendTo(d.e("div","ps-scrollbar-x"),n.scrollbarXRail),n.scrollbarX.setAttribute("tabindex",0),n.event.bind(n.scrollbarX,"focus",t),n.event.bind(n.scrollbarX,"blur",i),n.scrollbarXActive=null,n.scrollbarXWidth=null,n.scrollbarXLeft=null,n.scrollbarXBottom=s.toInt(d.css(n.scrollbarXRail,"bottom")),n.isScrollbarXUsingBottom=n.scrollbarXBottom===n.scrollbarXBottom,n.scrollbarXTop=n.isScrollbarXUsingBottom?null:s.toInt(d.css(n.scrollbarXRail,"top")),n.railBorderXWidth=s.toInt(d.css(n.scrollbarXRail,"borderLeftWidth"))+s.toInt(d.css(n.scrollbarXRail,"borderRightWidth")),d.css(n.scrollbarXRail,"display","block"),n.railXMarginWidth=s.toInt(d.css(n.scrollbarXRail,"marginLeft"))+s.toInt(d.css(n.scrollbarXRail,"marginRight")),d.css(n.scrollbarXRail,"display",""),n.railXWidth=null,n.railXRatio=null,n.scrollbarYRail=d.appendTo(d.e("div","ps-scrollbar-y-rail"),e),n.scrollbarY=d.appendTo(d.e("div","ps-scrollbar-y"),n.scrollbarYRail),n.scrollbarY.setAttribute("tabindex",0),n.event.bind(n.scrollbarY,"focus",t),n.event.bind(n.scrollbarY,"blur",i),n.scrollbarYActive=null,n.scrollbarYHeight=null,n.scrollbarYTop=null,n.scrollbarYRight=s.toInt(d.css(n.scrollbarYRail,"right")),n.isScrollbarYUsingRight=n.scrollbarYRight===n.scrollbarYRight,n.scrollbarYLeft=n.isScrollbarYUsingRight?null:s.toInt(d.css(n.scrollbarYRail,"left")),n.scrollbarYOuterWidth=n.isRtl?s.outerWidth(n.scrollbarY):null,n.railBorderYWidth=s.toInt(d.css(n.scrollbarYRail,"borderTopWidth"))+s.toInt(d.css(n.scrollbarYRail,"borderBottomWidth")),d.css(n.scrollbarYRail,"display","block"),n.railYMarginHeight=s.toInt(d.css(n.scrollbarYRail,"marginTop"))+s.toInt(d.css(n.scrollbarYRail,"marginBottom")),d.css(n.scrollbarYRail,"display",""),n.railYHeight=null,n.railYRatio=null}function a(e){return e.getAttribute("data-ps-id")}function r(e,t){e.setAttribute("data-ps-id",t)}function o(e){e.removeAttribute("data-ps-id")}var s=e("../lib/helper"),l=e("../lib/class"),c=e("./default-setting"),d=e("../lib/dom"),u=e("../lib/event-manager"),h=e("../lib/guid"),f={};i.add=function(e){var t=h();return r(e,t),f[t]=new n(e),f[t]},i.remove=function(e){delete f[a(e)],o(e)},i.get=function(e){return f[a(e)]}},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t,i){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function a(e,t){var i={width:t.railXWidth};t.isRtl?i.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:i.left=e.scrollLeft,t.isScrollbarXUsingBottom?i.bottom=t.scrollbarXBottom-e.scrollTop:i.top=t.scrollbarXTop+e.scrollTop,s.css(t.scrollbarXRail,i);var n={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?n.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth:n.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:n.left=t.scrollbarYLeft+e.scrollLeft,s.css(t.scrollbarYRail,n),s.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),s.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/helper"),o=e("../lib/class"),s=e("../lib/dom"),l=e("./instances"),c=e("./update-scroll");t.exports=function(e){var t=l.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight;var i;e.contains(t.scrollbarXRail)||(i=s.queryChildren(e,".ps-scrollbar-x-rail"),i.length>0&&i.forEach(function(e){s.remove(e)}),s.appendTo(t.scrollbarXRail,e)),e.contains(t.scrollbarYRail)||(i=s.queryChildren(e,".ps-scrollbar-y-rail"),i.length>0&&i.forEach(function(e){s.remove(e)}),s.appendTo(t.scrollbarYRail,e)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=n(t,r.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=r.toInt((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=n(t,r.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=r.toInt(e.scrollTop*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),a(e,t),t.scrollbarXActive?o.add(e,"ps-active-x"):(o.remove(e,"ps-active-x"),t.scrollbarXWidth=0,t.scrollbarXLeft=0,c(e,"left",0)),t.scrollbarYActive?o.add(e,"ps-active-y"):(o.remove(e,"ps-active-y"),t.scrollbarYHeight=0,t.scrollbarYTop=0,c(e,"top",0))}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(e,t,i){"use strict";var n,a,r=e("./instances"),o=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t};t.exports=function(e,t,i){if(void 0===e)throw"You must provide an element to the update-scroll function";if(void 0===t)throw"You must provide an axis to the update-scroll function";if(void 0===i)throw"You must provide a value to the update-scroll function";"top"===t&&i<=0&&(e.scrollTop=i=0,e.dispatchEvent(o("ps-y-reach-start"))),"left"===t&&i<=0&&(e.scrollLeft=i=0,e.dispatchEvent(o("ps-x-reach-start")));var s=r.get(e);"top"===t&&i>=s.contentHeight-s.containerHeight&&(i=s.contentHeight-s.containerHeight,i-e.scrollTop<=1?i=e.scrollTop:e.scrollTop=i,e.dispatchEvent(o("ps-y-reach-end"))),"left"===t&&i>=s.contentWidth-s.containerWidth&&(i=s.contentWidth-s.containerWidth,i-e.scrollLeft<=1?i=e.scrollLeft:e.scrollLeft=i,e.dispatchEvent(o("ps-x-reach-end"))),n||(n=e.scrollTop),a||(a=e.scrollLeft),"top"===t&&i<n&&e.dispatchEvent(o("ps-scroll-up")),"top"===t&&i>n&&e.dispatchEvent(o("ps-scroll-down")),"left"===t&&i<a&&e.dispatchEvent(o("ps-scroll-left")),"left"===t&&i>a&&e.dispatchEvent(o("ps-scroll-right")),"top"===t&&(e.scrollTop=n=i,e.dispatchEvent(o("ps-scroll-y"))),"left"===t&&(e.scrollLeft=a=i,e.dispatchEvent(o("ps-scroll-x")))}},{"./instances":18}],21:[function(e,t,i){"use strict";var n=e("../lib/helper"),a=e("../lib/dom"),r=e("./instances"),o=e("./update-geometry"),s=e("./update-scroll");t.exports=function(e){var t=r.get(e);t&&(t.negativeScrollAdjustment=t.isNegativeScroll?e.scrollWidth-e.clientWidth:0,a.css(t.scrollbarXRail,"display","block"),a.css(t.scrollbarYRail,"display","block"),t.railXMarginWidth=n.toInt(a.css(t.scrollbarXRail,"marginLeft"))+n.toInt(a.css(t.scrollbarXRail,"marginRight")),t.railYMarginHeight=n.toInt(a.css(t.scrollbarYRail,"marginTop"))+n.toInt(a.css(t.scrollbarYRail,"marginBottom")),a.css(t.scrollbarXRail,"display","none"),a.css(t.scrollbarYRail,"display","none"),o(e),s(e,"top",e.scrollTop),s(e,"left",e.scrollLeft),a.css(t.scrollbarXRail,"display",""),a.css(t.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]),define("WoltLabSuite/Core/Date/Util",["Language"],function(e){"use strict";return{formatDate:function(t){return this.format(t,e.get("wcf.date.dateFormat"))},formatTime:function(t){return this.format(t,e.get("wcf.date.timeFormat"))},formatDateTime:function(t){return this.format(t,e.get("wcf.date.dateTimeFormat").replace(/%date%/,e.get("wcf.date.dateFormat")).replace(/%time%/,e.get("wcf.date.timeFormat")))},format:function(t,i){var n,a="";"c"===i&&(i="Y-m-dTH:i:sP");for(var r=0,o=i.length;r<o;r++){switch(i[r]){case"s":n=("0"+t.getSeconds().toString()).slice(-2);break;case"i":n=t.getMinutes(),n<10&&(n="0"+n);break;case"a":
-n=t.getHours()>11?"pm":"am";break;case"g":n=t.getHours(),0===n?n=12:n>12&&(n-=12);break;case"h":n=t.getHours(),0===n?n=12:n>12&&(n-=12),n=("0"+n.toString()).slice(-2);break;case"A":n=t.getHours()>11?"PM":"AM";break;case"G":n=t.getHours();break;case"H":n=t.getHours(),n=("0"+n.toString()).slice(-2);break;case"d":n=t.getDate(),n=("0"+n.toString()).slice(-2);break;case"j":n=t.getDate();break;case"l":n=e.get("__days")[t.getDay()];break;case"D":n=e.get("__daysShort")[t.getDay()];break;case"S":n="";break;case"m":n=t.getMonth()+1,n=("0"+n.toString()).slice(-2);break;case"n":n=t.getMonth()+1;break;case"F":n=e.get("__months")[t.getMonth()];break;case"M":n=e.get("__monthsShort")[t.getMonth()];break;case"y":n=t.getFullYear().toString().substr(2);break;case"Y":n=t.getFullYear();break;case"P":var s=t.getTimezoneOffset();n=s>0?"-":"+",s=Math.abs(s),n+=("0"+(~~(s/60)).toString()).slice(-2),n+=":",n+=("0"+(s%60).toString()).slice(-2);break;case"r":n=t.toString();break;case"U":n=Math.round(t.getTime()/1e3);break;case"\\":n="",r+1<o&&(n=i[++r]);break;default:n=i[r]}a+=n}return a},gmdate:function(e){return e instanceof Date||(e=new Date),Math.round(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDay(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())/1e3)},getTimeElement:function(t){var i=elCreate("time");i.className="datetime";var n=this.formatDate(t),a=this.formatTime(t);return elAttr(i,"datetime",this.format(t,"c")),elData(i,"timestamp",(t.getTime()-t.getMilliseconds())/1e3),elData(i,"date",n),elData(i,"time",a),elData(i,"offset",60*t.getTimezoneOffset()),t.getTime()>Date.now()&&(elData(i,"is-future-date","true"),i.textContent=e.get("wcf.date.dateTimeFormat").replace("%time%",a).replace("%date%",n)),i},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}}}),define("WoltLabSuite/Core/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError("Invalid delta "+t+". Delta must be in the interval [0, 86400000].");this._callback=e.bind(void 0,this),this._delta=t,this._timer=void 0,this.restart()}return e.prototype={restart:function(){this.stop(),this._timer=setInterval(this._callback,this._delta)},stop:function(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)},setDelta:function(e){this._delta=e,this.restart()}},e}),define("WoltLabSuite/Core/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLabSuite/Core/Date/Util","WoltLabSuite/Core/Timer/Repeating"],function(e,t,i,n){"use strict";var a=elByTag("time"),r=!0,o=!1,s=null;return{setup:function(){new n(this._refresh.bind(this),6e4),e.add("WoltLabSuite/Core/Date/Time/Relative",this._refresh.bind(this)),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this))},_onVisibilityChange:function(){document.hidden?(r=!1,o=!1):(r=!0,o&&(this._refresh(),o=!1))},_refresh:function(){if(!r)return void(o||(o=!0));var e=new Date,n=(e.getTime()-e.getMilliseconds())/1e3;null===s&&(s=n-window.TIME_NOW);for(var l=0,c=a.length;l<c;l++){var d=a[l];if(d.classList.contains("datetime")&&!elData(d,"is-future-date")){var u=~~elData(d,"timestamp")+s,h=elData(d,"date"),f=elData(d,"time"),p=elData(d,"offset");if(elAttr(d,"title")||elAttr(d,"title",t.get("wcf.date.dateTimeFormat").replace(/%date%/,h).replace(/%time%/,f)),u>=n||n<u+60)d.textContent=t.get("wcf.date.relative.now");else if(n<u+3540){var m=Math.max(Math.round((n-u)/60),1);d.textContent=t.get("wcf.date.relative.minutes",{minutes:m})}else if(n<u+86400){var g=Math.round((n-u)/3600);d.textContent=t.get("wcf.date.relative.hours",{hours:g})}else if(n<u+518400){var v=new Date(e.getFullYear(),e.getMonth(),e.getDate()),_=Math.ceil((v/1e3-u)/86400),b=i.getTimezoneDate(1e3*u,1e3*p),w=b.getDay(),y=t.get("__days")[w];d.textContent=t.get("wcf.date.relative.pastDays",{days:_,day:y,time:f})}else d.textContent=t.get("wcf.date.shortDateTimeFormat").replace(/%date%/,h).replace(/%time%/,f)}}}}}),define("WoltLabSuite/Core/Ui/Page/Menu/Abstract",["Core","Environment","EventHandler","Language","ObjectMap","Dom/Traverse","Dom/Util","Ui/Screen"],function(e,t,i,n,a,r,o,s){"use strict";function l(e,t,i){this.init(e,t,i)}var c=elById("pageContainer"),d="";return l.prototype={init:function(e,n,r){if("packageInstallationSetup"!==elData(document.body,"template")){this._activeList=[],this._depth=0,this._enabled=!0,this._eventIdentifier=e,this._items=new a,this._menu=elById(n),this._removeActiveList=!1;var s=this.open.bind(this);this._button=elBySel(r),this._button.addEventListener(WCF_CLICK_EVENT,s),this._initItems(),this._initHeader(),i.add(this._eventIdentifier,"open",s),i.add(this._eventIdentifier,"close",this.close.bind(this)),i.add(this._eventIdentifier,"updateButtonState",this._updateButtonState.bind(this));var l,c=elByClass("menuOverlayItemList",this._menu);this._menu.addEventListener("animationend",function(){if(!this._menu.classList.contains("open"))for(var e=0,t=c.length;e<t;e++)l=c[e],l.classList.remove("active"),l.classList.remove("hidden")}.bind(this)),this._menu.children[0].addEventListener("transitionend",function(){if(this._menu.classList.add("allowScroll"),this._removeActiveList){this._removeActiveList=!1;var e=this._activeList.pop();e&&e.classList.remove("activeList")}}.bind(this));var d=elCreate("div");d.className="menuOverlayMobileBackdrop",d.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),o.insertAfter(d,this._menu),this._updateButtonState(),"android"===t.platform()&&this._initializeAndroid()}},open:function(e){return!!this._enabled&&(e instanceof Event&&e.preventDefault(),this._menu.classList.add("open"),this._menu.classList.add("allowScroll"),this._menu.children[0].classList.add("activeList"),s.scrollDisable(),c.classList.add("menuOverlay-"+this._menu.id),s.pageOverlayOpen(),!0)},close:function(e){return e instanceof Event&&e.preventDefault(),!!this._menu.classList.contains("open")&&(this._menu.classList.remove("open"),s.scrollEnable(),s.pageOverlayClose(),c.classList.remove("menuOverlay-"+this._menu.id),!0)},enable:function(){this._enabled=!0},disable:function(){this._enabled=!1,this.close(!0)},_initializeAndroid:function(){var t,i,n;switch(this._menu.id){case"pageUserMenuMobile":t="right";break;case"pageMainMenuMobile":t="left";break;default:return}i=this._menu.nextElementSibling,n=null,document.addEventListener("touchstart",function(i){var a,r,o,l;if(a=i.touches,r=this._menu.classList.contains("open"),"left"===t?(o=!r&&a[0].clientX<20,l=r&&Math.abs(this._menu.offsetWidth-a[0].clientX)<20):"right"===t&&(o=r&&Math.abs(document.body.clientWidth-this._menu.offsetWidth-a[0].clientX)<20,l=!r&&document.body.clientWidth-a[0].clientX<20),a.length>1)return void(d&&e.triggerEvent(document,"touchend"));if(!d&&(o||l)){if(s.pageOverlayIsActive()){for(var u=!1,h=0;h<c.classList.length;h++)c.classList[h]==="menuOverlay-"+this._menu.id&&(u=!0);if(!u)return}document.documentElement.classList.contains("redactorActive")||(n={x:a[0].clientX,y:a[0].clientY},o&&(d="left"),l&&(d="right"))}}.bind(this)),document.addEventListener("touchend",function(e){if(d&&null!==n){if(!this._menu.classList.contains("open"))return n=null,void(d="");var a;a=e?e.changedTouches[0].clientX:n.x,this._menu.classList.add("androidMenuTouchEnd"),this._menu.style.removeProperty("transform"),i.style.removeProperty(t),this._menu.addEventListener("transitionend",function(){this._menu.classList.remove("androidMenuTouchEnd")}.bind(this),{once:!0}),"left"===t?("left"===d&&a<n.x+100&&this.close(),"right"===d&&a<n.x-100&&this.close()):"right"===t&&("left"===d&&a>n.x+100&&this.close(),"right"===d&&a>n.x-100&&this.close()),n=null,d=""}}.bind(this)),document.addEventListener("touchmove",function(e){if(d&&null!==n){var a=e.touches,r=!1,o=!1;"left"===d&&(r=a[0].clientX>n.x+5),"right"===d&&(r=a[0].clientX<n.x-5),o=Math.abs(a[0].clientY-n.y)>20;var s=this._menu.classList.contains("open");if(s||!r||o||(this.open(),s=!0),s){var l=a[0].clientX;"right"===t&&(l=document.body.clientWidth-l),l>this._menu.offsetWidth&&(l=this._menu.offsetWidth),l<0&&(l=0),this._menu.style.setProperty("transform","translateX("+("left"===t?1:-1)*(l-this._menu.offsetWidth)+"px)"),i.style.setProperty(t,Math.min(this._menu.offsetWidth,l)+"px")}}}.bind(this))},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var t=e.parentNode,n=elData(t,"more");if(n)return void e.addEventListener(WCF_CLICK_EVENT,function(a){a.preventDefault(),a.stopPropagation(),i.fire(this._eventIdentifier,"more",{handler:this,identifier:n,item:e,parent:t})}.bind(this));var a,o=e.nextElementSibling;if(null!==o)if("OL"!==o.nodeName&&o.classList.contains("menuOverlayItemLinkIcon"))for(a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);a.nextElementSibling;)a.appendChild(a.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=t.parentNode,c=elData(o,"title");this._items.set(e,{itemList:o,parentItemList:l}),""===c&&(c=r.childByClass(e,"menuOverlayItemTitle").textContent,elData(o,"title",c));var d=this._showItemList.bind(this,e);if(s){a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);var u=elCreate("a");elAttr(u,"href","#"),u.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),u.innerHTML='<span class="icon icon24 fa-angle-right"></span>',u.addEventListener(WCF_CLICK_EVENT,d),a.appendChild(u)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,d);var h=elCreate("li");h.className="menuOverlayHeader",a=elCreate("span"),a.className="menuOverlayItemWrapper";var f=elCreate("a");elAttr(f,"href","#"),f.className="menuOverlayItemLink menuOverlayBackLink",f.textContent=elData(l,"title"),f.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var p=elCreate("a");if(elAttr(p,"href","#"),p.className="menuOverlayItemLinkIcon",p.innerHTML='<span class="icon icon24 fa-times"></span>',p.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),a.appendChild(f),a.appendChild(p),h.appendChild(a),o.insertBefore(h,o.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),o.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var i=elCreate("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);var n=elCreate("span");n.className="menuOverlayLogo",n.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(n);var a=elCreate("a");elAttr(a,"href","#"),a.className="menuOverlayItemLinkIcon",a.innerHTML='<span class="icon icon24 fa-times"></span>',a.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(a);var o=r.childByClass(this._menu,"menuOverlayItemList");o.insertBefore(e,o.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0,this._items.get(e).parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,t){t instanceof Event&&t.preventDefault();var n=this._items.get(e),a=elData(n.itemList,"load");if(a&&!elDataBool(e,"loaded")){var r=t.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void i.fire(this._eventIdentifier,"load_"+a)}this._menu.classList.remove("allowScroll"),n.itemList.classList.add("activeList"),n.parentItemList.classList.add("hidden"),this._activeList.push(n.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1;var t=-100*this._depth;"rtl"===n.get("wcf.global.pageDirection")&&(t*=-1),this._menu.children[0].style.setProperty("transform","translateX("+t+"%)","")},_updateButtonState:function(){var e=!1,t=elBySel(".menuOverlayItemList",this._menu);elBySelAll(".badgeUpdate",this._menu,function(i){~~i.textContent>0&&i.closest(".menuOverlayItemList")===t&&(e=!0)}),this._button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}},l}),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["Core","Language","Dom/Traverse","./Abstract"],function(e,t,i,n){"use strict";function a(){this.init()}var r=null,o=null,s=null,l=null,c=null;return e.inherit(a,n,{init:function(){a._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),r=elById("pageMainMenuMobilePageOptionsTitle"),null!==r&&(s=i.childByClass(r,"menuOverlayItemList"),l=elBySel(".jsPageNavigationIcons"),c=function(e){this.close(),e.stopPropagation()}.bind(this)),elAttr(this._button,"aria-label",t.get("wcf.menu.page")),elAttr(this._button,"role","button")},open:function(e){if(!a._super.prototype.open.call(this,e))return!1;if(null===r)return!0;if(o=l&&l.childElementCount>0){for(var t,i;l.childElementCount;)t=l.children[0],t.classList.add("menuOverlayItem"),t.classList.add("menuOverlayItemOption"),t.addEventListener(WCF_CLICK_EVENT,c),i=t.children[0],i.classList.add("menuOverlayItemLink"),i.classList.add("box24"),i.children[1].classList.remove("invisible"),i.children[1].classList.add("menuOverlayItemTitle"),r.parentNode.insertBefore(t,r.nextSibling);elShow(r)}else elHide(r);return!0},close:function(e){if(!a._super.prototype.close.call(this,e))return!1;if(o){elHide(r);for(var t,i=r.nextElementSibling;i&&i.classList.contains("menuOverlayItemOption");)i.classList.remove("menuOverlayItem"),i.classList.remove("menuOverlayItemOption"),i.removeEventListener(WCF_CLICK_EVENT,c),t=i.children[0],t.classList.remove("menuOverlayItemLink"),t.classList.remove("box24"),t.children[1].classList.add("invisible"),t.children[1].classList.remove("menuOverlayItemTitle"),l.appendChild(i),i=i.nextElementSibling}return!0}}),a}),define("WoltLabSuite/Core/Ui/Page/Menu/User",["Core","EventHandler","Language","./Abstract"],function(e,t,i,n){"use strict";function a(){this.init()}return e.inherit(a,n,{init:function(){var e=elBySel("#pageUserMenuMobile > .menuOverlayItemList");if(1===e.childElementCount&&e.children[0].classList.contains("menuOverlayTitle"))return void elBySel("#pageHeader .userPanel").classList.add("hideUserPanel");a._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),t.add("com.woltlab.wcf.userMenu","updateBadge",function(e){elBySelAll(".menuOverlayItemBadge",this._menu,function(t){if(elData(t,"badge-identifier")===e.identifier){var i=elBySel(".badge",t);e.count?(null===i&&(i=elCreate("span"),i.className="badge badgeUpdate",t.appendChild(i)),i.textContent=e.count):null!==i&&elRemove(i),this._updateButtonState()}}.bind(this))}.bind(this)),elAttr(this._button,"aria-label",i.get("wcf.menu.user")),elAttr(this._button,"role","button")},close:function(e){if(void 0!==this._menu){var t=WCF.Dropdown.Interactive.Handler.getOpenDropdown();t?(e.preventDefault(),e.stopPropagation(),t.close()):a._super.prototype.close.call(this,e)}}}),a}),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["Dictionary","Ui/SimpleDropdown"],function(e,t){"use strict";function i(e){if(!n.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return n.get(e)}var n=new e,a=0;return{init:function(e,i){if(!n.has(e)){var r=elCreate("div");r.id="reusableDropdownGhost"+a++,t.initFragment(r,i),n.set(e,r.id)}},getDropdownMenu:function(e){return t.getDropdownMenu(i(e))},registerCallback:function(e,n){t.registerCallback(i(e),n)},toggleDropdown:function(e,n){t.toggleDropdown(i(e),n)}}}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Alignment","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User","WoltLabSuite/Core/Ui/Dropdown/Reusable"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,f){"use strict";var p=elByClass("buttonGroupNavigation"),m=null,g=null,v=null,_=!1,b=!1,w=new a,y=null,C=elByClass("message"),E=!1,L={},S=null,A=null,I=null,D=[];return{setup:function(i){L=e.extend({enableMobileMenu:!0},i),y=elById("main"),elBySelAll(".sidebar",void 0,function(e){D.push(e)}),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile");var n=elBySel(".messageGroupList");n&&(I=elByClass("messageGroup",n)),d.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)}),d.on("screen-sm-down",{match:this.enableShadow.bind(this),unmatch:this.disableShadow.bind(this),setup:this.enableShadow.bind(this)}),d.on("screen-md-down",{match:this._enableMobileSidebar.bind(this),unmatch:this._disableMobileSidebar.bind(this),setup:this._setupMobileSidebar.bind(this)}),!t.touch()||"ios"!==t.platform()&&"android"!==t.platform()||d.on("screen-lg",{match:this._enableLGTouchNavigation.bind(this),unmatch:this._disableLGTouchNavigation.bind(this),setup:this._setupLGTouchNavigation.bind(this)})},enable:function(){_=!0,L.enableMobileMenu&&(S.enable(),A.enable())},enableShadow:function(){I&&this.rebuildShadow(I,".messageGroupLink")},disable:function(){_=!1,L.enableMobileMenu&&(S.disable(),A.disable())},disableShadow:function(){I&&this.removeShadow(I),g&&m()},_init:function(){_=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),c.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),r.add("WoltLabSuite/Core/Ui/Mobile",function(){this._initButtonGroupNavigation(),this._initMessages()}.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),n=elById("pageHeaderSearchInput"),a=null;i.add("com.woltlab.wcf.MainMenuMobile","more",function(i){"com.woltlab.wcf.search"===i.identifier&&(i.handler.close(!0),"ios"===t.platform()&&(a=document.body.scrollTop,d.scrollDisable()),e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),n.focus(),"ios"===t.platform()&&(document.body.scrollTop=0))}),y.addEventListener(WCF_CLICK_EVENT,function(){e&&e.classList.remove("open"),"ios"===t.platform()&&null!==a&&(d.scrollEnable(),document.body.scrollTop=a,a=null)})},_initButtonGroupNavigation:function(){for(var e=0,t=p.length;e<t;e++){var i=p[e];if(!i.classList.contains("jsMobileButtonGroupNavigation")){i.classList.add("jsMobileButtonGroupNavigation");var n=elBySel(".buttonList",i);if(0!==n.childElementCount){i.parentNode.classList.add("hasMobileNavigation");var a=elCreate("a");a.className="dropdownLabel";var r=elCreate("span");r.className="icon icon24 fa-ellipsis-v",a.appendChild(r),function(e,t,i){t.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),e.classList.toggle("open")}),i.addEventListener(WCF_CLICK_EVENT,function(t){t.stopPropagation(),e.classList.remove("open")})}(i,a,n),i.insertBefore(a,i.firstChild)}}}},_initMessages:function(){Array.prototype.forEach.call(C,function(e){if(!w.has(e)){var t=elBySel(".jsMobileNavigation",e);if(t){t.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation(),window.setTimeout(function(){t.classList.remove("open")},10)});var i=elBySel(".messageQuickOptions",e);i&&t.childElementCount&&(i.classList.add("active"),i.addEventListener(WCF_CLICK_EVENT,function(n){_&&d.is("screen-sm-down")&&"LABEL"!==n.target.nodeName&&"INPUT"!==n.target.nodeName&&(n.preventDefault(),n.stopPropagation(),this._toggleMobileNavigation(e,i,t))}.bind(this)))}w.add(e)}}.bind(this))},_initMobileMenu:function(){L.enableMobileMenu&&(S=new u,A=new h)},_closeAllMenus:function(){elBySelAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open",null,function(e){e.classList.remove("open")}),_&&g&&m()},rebuildShadow:function(e,t){for(var i,n,a,r=0,s=e.length;r<s;r++)i=e[r],n=i.parentNode,null===(a=o.childByClass(n,"mobileLinkShadow"))&&elBySel(t,i).href&&(a=elCreate("a"),a.className="mobileLinkShadow",a.href=elBySel(t,i).href,n.appendChild(a),n.classList.add("mobileLinkShadowContainer"))},removeShadow:function(e){for(var t,i,n,a=0,r=e.length;a<r;a++)t=e[a],i=t.parentNode,i.classList.contains("mobileLinkShadowContainer")&&(n=o.childByClass(i,"mobileLinkShadow"),null!==n&&elRemove(n),i.classList.remove("mobileLinkShadowContainer"))},_enableMobileSidebar:function(){E=!0},_disableMobileSidebar:function(){E=!1,D.forEach(function(e){e.classList.remove("open")})},_setupMobileSidebar:function(){D.forEach(function(e){e.addEventListener("mousedown",function(t){E&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))})}),E=!0},_toggleMobileNavigation:function(e,t,i){if(null===g)g=elCreate("ul"),g.className="dropdownMenu",f.init("com.woltlab.wcf.jsMobileNavigation",g),m=function(){g.classList.remove("dropdownOpen")};else if(g.classList.contains("dropdownOpen")&&(m(),v===e))return;g.innerHTML="",c.execute(),this._rebuildMobileNavigation(i);var n=i.previousElementSibling;if(n&&n.classList.contains("messageFooterButtonsExtra")){var a=elCreate("li");a.className="dropdownDivider",g.appendChild(a),this._rebuildMobileNavigation(n)}l.set(g,t,{horizontal:"right",allowFlip:"vertical"}),g.classList.add("dropdownOpen"),v=e},_setupLGTouchNavigation:function(){b=!0,elBySelAll(".boxMenuHasChildren > a",null,function(e){e.addEventListener("touchstart",function(t){b&&"false"===elAttr(e,"aria-expanded")&&(t.preventDefault(),elAttr(e,"aria-expanded","true"),e.addEventListener("touchend",function(){document.body.addEventListener("touchstart",function(){document.body.addEventListener("touchend",function(t){s.contains(e.parentNode,t.target)||t.target===e.parentNode||elAttr(e,"aria-expanded","false")},{once:!0})},{once:!0})},{once:!0}))})})},_enableLGTouchNavigation:function(){b=!0},_disableLGTouchNavigation:function(){b=!1},_rebuildMobileNavigation:function(t){elBySelAll(".button",t,function(t){if(!t.classList.contains("ignoreMobileNavigation")||t.classList.contains("reactButton")){var i=elCreate("li");t.classList.contains("active")&&(i.className="active"),i.innerHTML='<a href="#">'+elBySel("span:not(.icon)",t).textContent+"</a>",i.children[0].addEventListener(WCF_CLICK_EVENT,function(i){i.preventDefault(),i.stopPropagation(),"A"===t.nodeName?t.click():e.triggerEvent(t,WCF_CLICK_EVENT),m()}),g.appendChild(i)}})}}}),define("WoltLabSuite/Core/Ui/Scroll",["Dom/Util"],function(e){"use strict";var t=null,i=null,n=null,a=null;return{element:function(a,r){if(!(a instanceof Element))throw new TypeError("Expected a valid DOM element.");if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(a))throw new Error("Element must be part of the visible DOM.");if(null!==t)throw new Error("Cannot scroll to element, a concurrent request is running.");r&&(t=r,null===i&&(i=this._onScroll.bind(this)),window.addEventListener("scroll",i));var o=e.offset(a).top;if(null===n){n=50;var s=elById("pageHeaderPanel");if(null!==s){var l=window.getComputedStyle(s).position;n="fixed"===l||"static"===l?s.offsetHeight:0}}n>0&&(o<=n?o=0:o-=n);var c=window.pageYOffset;window.scrollTo({left:0,top:o,behavior:"smooth"}),window.setTimeout(function(){c===window.pageYOffset&&this._onScroll()}.bind(this),100)},_onScroll:function(){null!==a&&window.clearTimeout(a),a=window.setTimeout(function(){null!==t&&t(),window.removeEventListener("scroll",i),t=null,a=null},100)}}}),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["Dictionary","Environment","EventHandler","Dom/Traverse","Dom/Util"],function(e,t,i,n,a){"use strict";function r(t){this._container=t,this._containers=new e,this._isLegacy=null,this._store=null,this._tabs=new e}return r.prototype={validate:function(){if(!this._container.classList.contains("tabMenuContainer"))return!1;var e=n.childByTag(this._container,"NAV");if(null===e)return!1;var t=elByTag("li",e);if(0===t.length)return!1;var i,r,o,s,l=n.childrenByTag(this._container,"DIV");for(o=0,s=l.length;o<s;o++)i=l[o],r=elData(i,"name"),r||(r=a.identify(i)),elData(i,"name",r),this._containers.set(r,i);var c,d=this._container.id;for(o=0,s=t.length;o<s;o++)if(c=t[o],r=this._getTabName(c)){if(this._tabs.has(r))throw new Error("Tab names must be unique, li[data-name='"+r+"'] (tab menu id: '"+d+"') exists more than once.");if(void 0===(i=this._containers.get(r)))throw new Error("Expected content element for li[data-name='"+r+"'] (tab menu id: '"+d+"').");if(i.parentNode!==this._container)throw new Error("Expected content element '"+r+"' (tab menu id: '"+d+"') to be a direct children.");if(1!==c.childElementCount||"A"!==c.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+r+"'] (tab menu id: '"+d+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+d+"').");return this._isLegacy&&(elData(this._container,"is-legacy",!0),this._tabs.forEach(function(e,t){elAttr(e,"aria-controls",t)})),!0},init:function(e){e=e||null,this._tabs.forEach(function(i){if((!e||e.get(elData(i,"name"))!==i)&&(i.children[0].addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this)),"ios"===t.platform())){var n=!1;i.children[0].addEventListener("touchstart",function(){n=!0}),i.children[0].addEventListener("touchmove",function(){n=!1}),i.children[0].addEventListener("touchend",function(e){n&&(n=!1,e.preventDefault(),this._onClick(e))}.bind(this))}}.bind(this));var i=null;if(!e){var n=r.getIdentifierFromHash(),a=null;if(""!==n&&(a=this._tabs.get(n))&&this._container.parentNode.classList.contains("tabMenuContainer")&&(i=this._container),!a){var o=elData(this._container,"preselect")||elData(this._container,"active");"true"!==o&&o||(o=!0),!0===o?this._tabs.forEach(function(e){a||elIsHidden(e)||e.previousElementSibling&&!elIsHidden(e.previousElementSibling)||(a=e)}):"false"!==o&&(a=this._tabs.get(o))}a&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,a,!0));var s=elData(this._container,"store");if(s){var l=elCreate("input");l.type="hidden",l.name=s,l.value=elData(this.getActiveTab(),"name"),this._container.appendChild(l),this._store=l}}return i},select:function(e,t,n){if(!(t=t||this._tabs.get(e))){if(~~e==e){e=~~e;var a=0;this._tabs.forEach(function(i){a===e&&(t=i),a++})}if(!t)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elData(t,"name");var o=this.getActiveTab(),s=null;if(o){var l=elData(o,"name");if(l===e)return;n||i.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"beforeSelect",{tab:o,tabName:l}),o.classList.remove("active"),s=this._containers.get(elData(o,"name")),s.classList.remove("active"),s.classList.add("hidden"),this._isLegacy&&(o.classList.remove("ui-state-active"),s.classList.remove("ui-state-active"))}t.classList.add("active");var c=this._containers.get(e);if(c.classList.add("active"),c.classList.remove("hidden"),this._isLegacy&&(t.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this._store&&(this._store.value=e),!n){i.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:t,activeName:e,previous:o,previousName:o?elData(o,"name"):null});var d=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;d&&d(this._container).trigger("wcftabsbeforeactivate",{newTab:d(t),oldTab:d(o),newPanel:d(c),oldPanel:d(s)});var u=window.location.href.replace(/#+[^#]*$/,"");r.getIdentifierFromHash()===e?u+=window.location.hash:u+="#"+e,window.history.replaceState(void 0,void 0,u)}require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.scrollToTab(t)})},selectFirstVisible:function(){var e;return this._tabs.forEach(function(t){e||elIsHidden(t)||(e=t)}.bind(this)),e&&this.select(void 0,e,!1),!!e},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},hasTab:function(e){return this._tabs.has(e)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"name");return t||1===e.childElementCount&&"A"===e.children[0].nodeName&&e.children[0].href.match(/#([^#]+)$/)&&(t=RegExp.$1,null===elById(t)?t=null:(this._isLegacy=!0,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},r.getIdentifierFromHash=function(){return window.location.hash.match(/^#+([^\/]+)+(?:\/.+)?/)?RegExp.$1:""},r}),define("WoltLabSuite/Core/Ui/TabMenu",["Dictionary","EventHandler","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","Ui/Screen","Ui/Scroll","./TabMenu/Simple"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=!1,d=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),i.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),a.add("WoltLabSuite/Core/Ui/TabMenu",function(){l&&(l.classList.remove("active"),l=null)}),r.on("screen-sm-down",{enable:this._scrollEnable.bind(this,!1),disable:this._scrollDisable.bind(this),setup:this._scrollEnable.bind(this,!0)}),window.addEventListener("hashchange",function(){var e=s.getIdentifierFromHash(),t=e?elById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&d.forEach(function(t){t.hasTab(e)&&t.select(e)})});var e=s.getIdentifierFromHash();e&&window.setTimeout(function(){var t=elById(e);if(t&&t.classList.contains("tabMenuContent")){var i=window.scrollY||window.pageYOffset;if(i>0){var a=t.parentNode,r=a.offsetTop-50;if(r<0&&(r=0),i>r){var o=n.offset(a).top;o<=50?o=0:o-=50,window.scrollTo(0,o)}}}},100)},_init:function(){for(var e,t,i,a,r,c=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),u=0,h=c.length;u<h;u++)if(e=c[u],t=n.identify(e),!d.has(t)&&(r=new s(e),r.validate())){a=r.init(),d.set(t,r),a instanceof Element&&(r=this.getTabMenu(a.parentNode.id),r.select(a.id,null,!0)),i=elBySel("#"+t+" > nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),l=e):(e.classList.remove("active"),l=null)})}(i),elBySelAll(".tabMenu, .menu",e,function(e){var t=this._rebuildMenuOverflow.bind(this,e),i=null;elBySel("ul",e).addEventListener("scroll",function(){null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)})}.bind(this));var f=e.closest("form");if(null!==f){var p=elBySel('input[type="submit"]',f);null!==p&&function(e,t){t.addEventListener(WCF_CLICK_EVENT,function(t){if(!t.defaultPrevented)for(var i,n=elBySelAll("input, select",e),a=0,r=n.length;a<r;a++)if(i=n[a],!i.checkValidity()){t.preventDefault();var s=this.getTabMenu(i.closest(".tabMenuContainer").id);return s.select(elData(i.closest(".tabMenuContent"),"name")),void o.element(i,function(){this.reportValidity()}.bind(i))}}.bind(this))}.bind(this)(e,p)}}},_selectErroneousTabs:function(){d.forEach(function(e){var t=!1;e.getContainers().forEach(function(i){!t&&elByClass("formError",i).length&&(t=!0,e.select(i.id))})})},getTabMenu:function(e){return d.get(e)},_scrollEnable:function(e){c=!0,d.forEach(function(t){var i=t.getActiveTab();e?this._rebuildMenuOverflow(i.closest(".menu, .tabMenu")):this.scrollToTab(i)}.bind(this))},_scrollDisable:function(){c=!1},scrollToTab:function(e){if(c){var t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,a=t.scrollWidth;if(i!==a){var r=e.offsetLeft,o=!1;r<n&&(o=!0);var s=!1;if(!o){var l=i-(r-n),d=e.clientWidth;null!==e.nextElementSibling&&(s=!0,d+=20),l<d&&(o=!0)}o&&this._scrollMenu(t,r,n,a,i,s)}}},_scrollMenu:function(e,t,i,n,a,r){r?t-=15:t>0&&(t-=15),t=t<0?0:Math.min(t,n-a),i!==t&&(e.classList.add("enableAnimation"),i<t?e.firstElementChild.style.setProperty("margin-left",i-t+"px",""):e.style.setProperty("padding-left",i-t+"px",""),setTimeout(function(){e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t},300))},_rebuildMenuOverflow:function(e){if(c){
-var t=e.clientWidth,i=elBySel("ul",e),n=i.scrollLeft,a=i.scrollWidth,r=n>0,o=elBySel(".tabMenuOverlayLeft",e);r?(null===o&&(o=elCreate("span"),o.className="tabMenuOverlayLeft icon icon24 fa-angle-left",o.addEventListener(WCF_CLICK_EVENT,function(){var e=i.clientWidth;this._scrollMenu(i,i.scrollLeft-~~(e/2),i.scrollLeft,i.scrollWidth,e,0)}.bind(this)),e.insertBefore(o,e.firstChild)),o.classList.add("active")):null!==o&&o.classList.remove("active");var s=t+n<a,l=elBySel(".tabMenuOverlayRight",e);s?(null===l&&(l=elCreate("span"),l.className="tabMenuOverlayRight icon icon24 fa-angle-right",l.addEventListener(WCF_CLICK_EVENT,function(){var e=i.clientWidth;this._scrollMenu(i,i.scrollLeft+~~(e/2),i.scrollLeft,i.scrollWidth,e,0)}.bind(this)),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}}}}),define("WoltLabSuite/Core/Ui/FlexibleMenu",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o=new t,s=new t,l=new t,c=new t;return{setup:function(){null!==elById("mainMenu")&&this.register("mainMenu");var e=elBySel(".navigationHeader");null!==e&&this.register(a.identify(e)),window.addEventListener("resize",this.rebuildAll.bind(this)),i.add("WoltLabSuite/Core/Ui/FlexibleMenu",this.registerTabMenus.bind(this))},register:function(e){var t=elById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(!o.has(e)){var i=n.childByTag(t,"UL");if(null===i)throw"Expected an <ul> element as child of container '"+e+"'.";o.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],o=n.childByTag(r,"NAV");null!==o&&(r.classList.add("jsFlexibleMenuEnabled"),this.register(a.identify(o)))}},rebuildAll:function(){o.forEach(function(e,t){this.rebuild(t)}.bind(this))},rebuild:function(t){var i=o.get(t);if(void 0===i)throw"Expected a valid element id, '"+t+"' is unknown.";var d=window.getComputedStyle(i),u=i.parentNode.clientWidth;u-=a.styleAsInt(d,"margin-left"),u-=a.styleAsInt(d,"margin-right");var h=c.get(t),f=n.childrenByTag(h,"LI"),p=s.get(t),m=0;if(void 0!==p){for(var g=0,v=f.length;g<v;g++){var _=f[g];_.classList.contains("dropdown")||elShow(_)}null!==p.parentNode&&(m=a.outerWidth(p))}var b=h.scrollWidth-m,w=[];if(b>u)for(var g=f.length-1;g>=0;g--){var _=f[g];if(!(_.classList.contains("dropdown")||_.classList.contains("active")||_.classList.contains("ui-state-active"))&&(w.push(_),elHide(_),h.scrollWidth<u))break}if(w.length){var y;if(void 0===p){p=elCreate("li"),p.className="dropdown jsFlexibleMenuDropdown";var C=elCreate("a");C.className="icon icon16 fa-list",p.appendChild(C),y=elCreate("ul"),y.classList.add("dropdownMenu"),p.appendChild(y),s.set(t,p),l.set(t,y),r.init(C)}else y=l.get(t);null===p.parentNode&&h.appendChild(p);var E=document.createDocumentFragment(),L=this;w.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)}),y.innerHTML="",y.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,a=null,r=null,o=null,s=null,l=null;return{setup:function(){"desktop"===e.platform()&&(l=elCreate("div"),elAttr(l,"id","balloonTooltip"),l.classList.add("balloonTooltip"),l.addEventListener("transitionend",function(){l.classList.contains("active")||["bottom","left","right","top"].forEach(function(e){l.style.removeProperty(e)})}),s=elCreate("span"),elAttr(s,"id","balloonTooltipText"),l.appendChild(s),o=elCreate("span"),o.classList.add("elementPointer"),o.appendChild(elCreate("span")),l.appendChild(o),document.body.appendChild(l),r=elByClass("jsTooltip"),n=this._mouseEnter.bind(this),a=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",a),e.addEventListener(WCF_CLICK_EVENT,a))})},_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"),l.style.removeProperty("top"),l.style.removeProperty("left"),!n.length)return void l.classList.remove("active");l.classList.add("active"),s.textContent=n,i.set(l,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})},_mouseLeave:function(){l.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,a,r,o,s,l){"use strict";var c=!1,d=0,u=!1,h=new r,f=null,p=0,m=0,g=[],v=null,_=null,b=null,w=null,y=null,C=null,E=null,L=null,S=null,A=null,I=null,D={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 o=t[n];o.classList.add("inputDatePicker"),o.readOnly=!0;var s="datetime"===elAttr(o,"type"),l=s&&elDataBool(o,"time-only"),c=elDataBool(o,"disable-clear"),d=s&&elDataBool(o,"ignore-timezone"),u=o.classList.contains("birthday");elData(o,"is-date-time",s),elData(o,"is-time-only",l);var f=null,p=elAttr(o,"value"),m=/^\d+-\d+-\d+$/.test(p);if(elAttr(o,"value")){if(l){f=new Date;var g=p.split(":");f.setHours(g[0],g[1])}else{if(d||u||m){var v=new Date(p).getTimezoneOffset(),_=v>0?"-":"+";v=Math.abs(v);var b=Math.floor(v/60).toString(),w=(v%60).toString();_+=2===b.length?b:"0"+b,_+=":",_+=2===w.length?w:"0"+w,u||m?p+="T00:00:00"+_:p=p.replace(/[+-][0-9]{2}:[0-9]{2}$/,_)}f=new Date(p)}var y=f.getTime();if(isNaN(y))p="";else{elData(o,"value",y);p=e[l?"formatTime":"formatDate"+(s?"Time":"")](f)}}var C=0===p.length;if(u?(elData(o,"min-date","120"),elData(o,"max-date",(new Date).getFullYear()+"-12-31")):(o.min&&elData(o,"min-date",o.min),o.max&&elData(o,"max-date",o.max)),this._initDateRange(o,i,!0),this._initDateRange(o,i,!1),elData(o,"min-date")===elData(o,"max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+o.id+"').");o.type="text",o.value=p,elData(o,"empty",C),elData(o,"placeholder")&&elAttr(o,"placeholder",elData(o,"placeholder"));var E=elCreate("input");if(E.id=o.id+"DatePicker",E.name=o.name,E.type="hidden",null!==f&&(E.value=l?e.format(f,"H:i"):d?e.format(f,"Y-m-dTH:i:s"):e.format(f,s?"c":"Y-m-d")),o.parentNode.insertBefore(E,o),o.removeAttribute("name"),o.addEventListener(WCF_CLICK_EVENT,A),!o.disabled){var L=elCreate("div");L.className="inputAddon";var S=elCreate("a");S.className="inputSuffix button jsTooltip",S.href="#",elAttr(S,"role","button"),elAttr(S,"tabindex","0"),elAttr(S,"title",a.get("wcf.date.datePicker")),elAttr(S,"aria-label",a.get("wcf.date.datePicker")),elAttr(S,"aria-haspopup",!0),elAttr(S,"aria-expanded",!1),S.addEventListener(WCF_CLICK_EVENT,A),L.appendChild(S);var I=elCreate("span");I.className="icon icon16 fa-calendar",S.appendChild(I),o.parentNode.insertBefore(L,o),L.insertBefore(o,S),c||(S=elCreate("a"),S.className="inputSuffix button",S.addEventListener(WCF_CLICK_EVENT,this.clear.bind(this,o)),C&&S.style.setProperty("visibility","hidden",""),L.appendChild(S),I=elCreate("span"),I.className="icon icon16 fa-times",S.appendChild(I))}for(var D=!1,x=["tiny","short","medium","long"],T=0;T<4;T++)o.classList.contains(x[T])&&(D=!0);D||o.classList.add("short"),h.set(o,{clearButton:S,shadow:E,disableClear:c,isDateTime:s,isEmpty:C,isTimeOnly:l,ignoreTimezone:d,onClose:null})}},_initDateRange:function(e,t,i){var n="data-"+(i?"min":"max")+"-date",a=e.hasAttribute(n)?elAttr(e,n).trim():"";if(a.match(/^(\d{4})-(\d{2})-(\d{2})$/))a=new Date(a).getTime();else if("now"===a)a=t.getTime();else if(a.match(/^\d{1,3}$/)){var r=new Date(t.getTime());r.setFullYear(r.getFullYear()+~~a*(i?-1:1)),a=r.getTime()}else if(a.match(/^datePicker-(.+)$/)){if(a=RegExp.$1,null===elById(a))throw new Error("Reference date picker identified by '"+a+"' does not exists (element id: '"+e.id+"').")}else a=/^\d{4}\-\d{2}\-\d{2}T/.test(a)?new Date(a).getTime():new Date(i?1902:2038,0,1).getTime();elAttr(e,n,a)},_setup:function(){c||(c=!0,d=~~a.get("wcf.date.firstDayOfTheWeek"),A=this._open.bind(this),o.add("WoltLabSuite/Core/Date/Picker",this.init.bind(this)),l.add("WoltLabSuite/Core/Date/Picker",this._close.bind(this)))},_open:function(e){e.preventDefault(),e.stopPropagation(),this._createPicker(),null===I&&(I=this._maintainFocus.bind(this),document.body.addEventListener("focus",I,{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 a,r=h.get(f),o=elData(f,"value");o?(a=new Date(+o),"Invalid Date"===a.toString()&&(a=new Date)):a=new Date,m=elData(f,"min-date"),m.match(/^datePicker-(.+)$/)&&(m=elData(elById(RegExp.$1),"value")),m=new Date(+m),m.getTime()>a.getTime()&&(a=m),p=elData(f,"max-date"),p.match(/^datePicker-(.+)$/)&&(p=elData(elById(RegExp.$1),"value")),p=new Date(+p),r.isDateTime?(_.value=a.getHours(),b.value=a.getMinutes(),S.classList.add("datePickerTime")):S.classList.remove("datePickerTime"),S.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),this._renderPicker(a.getDate(),a.getMonth(),a.getFullYear()),s.set(S,f),elAttr(f.nextElementSibling,"aria-expanded",!0),u=!1},_close:function(){if(null!==S&&S.classList.contains("active")){S.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,m=0,p=0}},_onDialogScroll:function(e){if(null!==f){var t=e.currentTarget,n=i.offset(f),a=i.offset(t);n.top+f.clientHeight<=a.top?this._close():n.top>=a.top+t.offsetHeight?this._close():n.left<=a.left?this._close():n.left>=a.left+t.offsetWidth?this._close():s.set(S,f)}},_renderPicker:function(e,t,i){this._renderGrid(e,t,i);for(var n="",a=m.getFullYear(),r=p.getFullYear();a<=r;a++)n+='<option value="'+a+'">'+a+"</option>";L.innerHTML=n,L.value=i,w.value=t,S.classList.add("active")},_renderGrid:function(t,i,n){var a,r,o=void 0!==t,s=void 0!==i;if(t=~~t||~~elData(v,"day"),i=~~i,n=~~n,s||n){var l=0!==n,c=document.createDocumentFragment();c.appendChild(v),s||(i=~~elData(v,"month")),n=n||~~elData(v,"year");var u=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-"+("0"+t.toString()).slice(-2));for(u<m?(n=m.getFullYear(),i=m.getMonth(),t=m.getDate(),w.value=i,L.value=n,l=!0):u>p&&(n=p.getFullYear(),i=p.getMonth(),t=p.getDate(),w.value=i,L.value=n,l=!0),u=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-01");u.getDay()!==d;)u.setDate(u.getDate()-1);elShow(g[35].parentNode);var h,f=new Date(m.getFullYear(),m.getMonth(),m.getDate());for(r=0;r<42;r++){if(35===r&&u.getMonth()!==i){elHide(g[35].parentNode);break}a=g[r],a.textContent=u.getDate(),h=u.getMonth()===i,h&&(u<f?h=!1:u>p&&(h=!1)),a.classList[h?"remove":"add"]("otherMonth"),h&&(a.href="#",elAttr(a,"role","button"),elAttr(a,"tabindex","0"),elAttr(a,"title",e.formatDate(u)),elAttr(a,"aria-label",e.formatDate(u))),u.setDate(u.getDate()+1)}if(elData(v,"month",i),elData(v,"year",n),S.insertBefore(c,E),!o&&(u=new Date(n,i,t),u.getDate()!==t)){for(;u.getMonth()!==i;)u.setDate(u.getDate()-1);t=u.getDate()}if(l){for(r=0;r<12;r++){var _=w.children[r];_.disabled=n===m.getFullYear()&&_.value<m.getMonth()||n===p.getFullYear()&&_.value>p.getMonth()}var b=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-01");b.setMonth(b.getMonth()+1),y.classList[b<p?"add":"remove"]("active");var A=new Date(n+"-"+("0"+(i+1).toString()).slice(-2)+"-01");A.setDate(A.getDate()-1),C.classList[A>m?"add":"remove"]("active")}}if(t){for(r=0;r<35;r++)a=g[r],a.classList[a.classList.contains("otherMonth")||~~a.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"),_.value,b.value):new Date(elData(v,"year"),elData(v,"month"),elData(v,"day")),this.setDate(f,e))},_createPicker:function(){if(null===S){S=elCreate("div"),S.className="datePicker",S.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var t=elCreate("header");S.appendChild(t),C=elCreate("a"),C.className="previous jsTooltip",C.href="#",elAttr(C,"role","button"),elAttr(C,"tabindex","0"),elAttr(C,"title",a.get("wcf.date.datePicker.previousMonth")),elAttr(C,"aria-label",a.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),w=elCreate("select"),w.className="month jsTooltip",elAttr(w,"title",a.get("wcf.date.datePicker.month")),elAttr(w,"aria-label",a.get("wcf.date.datePicker.month")),w.addEventListener("change",this._changeMonth.bind(this)),i.appendChild(w);var n,r="",o=a.get("__monthsShort");for(n=0;n<12;n++)r+='<option value="'+n+'">'+o[n]+"</option>";w.innerHTML=r,L=elCreate("select"),L.className="year jsTooltip",elAttr(L,"title",a.get("wcf.date.datePicker.year")),elAttr(L,"aria-label",a.get("wcf.date.datePicker.year")),L.addEventListener("change",this._changeYear.bind(this)),i.appendChild(L),y=elCreate("a"),y.className="next jsTooltip",y.href="#",elAttr(y,"role","button"),elAttr(y,"tabindex","0"),elAttr(y,"title",a.get("wcf.date.datePicker.nextMonth")),elAttr(y,"aria-label",a.get("wcf.date.datePicker.nextMonth")),y.innerHTML='<span class="icon icon16 fa-arrow-right"></span>',y.addEventListener(WCF_CLICK_EVENT,this.nextMonth.bind(this)),t.appendChild(y),v=elCreate("ul"),S.appendChild(v);var s=elCreate("li");s.className="weekdays",v.appendChild(s);var l,c=a.get("__daysShort");for(n=0;n<7;n++){var u=n+d;u>6&&(u-=7),l=elCreate("span"),l.textContent=c[u],s.appendChild(l)}var h,f,p=this._click.bind(this);for(n=0;n<6;n++){f=elCreate("li"),v.appendChild(f);for(var m=0;m<7;m++)h=elCreate("a"),h.addEventListener(WCF_CLICK_EVENT,p),g.push(h),f.appendChild(h)}E=elCreate("footer"),S.appendChild(E),_=elCreate("select"),_.className="hour",elAttr(_,"title",a.get("wcf.date.datePicker.hour")),elAttr(_,"aria-label",a.get("wcf.date.datePicker.hour")),_.addEventListener("change",this._formatValue.bind(this));var A="",I=new Date(2e3,0,1),D=a.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");for(n=0;n<24;n++)I.setHours(n),A+='<option value="'+n+'">'+e.format(I,D)+"</option>";for(_.innerHTML=A,E.appendChild(_),E.appendChild(document.createTextNode(" : ")),b=elCreate("select"),b.className="minute",elAttr(b,"title",a.get("wcf.date.datePicker.minute")),elAttr(b,"aria-label",a.get("wcf.date.datePicker.minute")),b.addEventListener("change",this._formatValue.bind(this)),A="",n=0;n<60;n++)A+='<option value="'+n+'">'+(n<10?"0"+n.toString():n)+"</option>";b.innerHTML=A,E.appendChild(b),document.body.appendChild(S)}},previousMonth:function(e){e.preventDefault(),"0"===w.value?(w.value=11,L.value=~~L.value-1):w.value=~~w.value-1,this._renderGrid(void 0,w.value,L.value)},nextMonth:function(e){e.preventDefault(),"11"===w.value?(w.value=0,L.value=1+~~L.value):w.value=1+~~w.value,this._renderGrid(void 0,w.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 a,r="";n.isDateTime?n.isTimeOnly?(a=e.formatTime(i),r="H:i"):n.ignoreTimezone?(a=e.formatDateTime(i),r="Y-m-dTH:i:s"):(a=e.formatDateTime(i),r="c"):(a=e.formatDate(i),r="Y-m-d"),t.value=a,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,A),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!==S&&S.classList.contains("active")&&(S.contains(e.target)?u=!0:u?(f.nextElementSibling.focus(),u=!1):elBySel(".previous",S).focus())}};return window.__wcf_bc_datePicker=D,D}),define("WoltLabSuite/Core/Ui/Page/Action",["Dictionary","Language"],function(e,t){"use strict";var i,n,a,r=new e,o=!1,s=-1,l=window.debounce(function(){s=-1},50,!1);return{setup:function(){if(!o){o=!0,a=elCreate("div"),a.className="pageAction",i=elCreate("div"),i.className="pageActionButtons",a.appendChild(i),n=this._buildToTopButton(),a.appendChild(n),document.body.appendChild(a);var e=window.debounce(this._onScroll.bind(this),100,!1);window.addEventListener("scroll",function(){-1===s&&(s=window.pageYOffset,window.setTimeout(function(){this._onScroll(),s=window.pageYOffset}.bind(this),60)),e()}.bind(this),{passive:!0}),window.addEventListener("touchstart",function(){-1!==s&&(s=-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(){if(!document.documentElement.classList.contains("disableScrolling")){var e=window.pageYOffset;if(e===s)return void l();e>=300?(n.classList.contains("initiallyHidden")&&n.classList.remove("initiallyHidden"),elAttr(n,"aria-hidden","false")):elAttr(n,"aria-hidden","true"),this._renderContainer(),-1!==s&&a.classList[e<s?"remove":"add"]("scrolledDown"),s=-1}},_scrollTopTop:function(e){e.preventDefault(),elById("top").scrollIntoView({behavior:"smooth"})},add:function(e,t,n){this.setup();var o=elCreate("div");o.className="pageActionButton",o.name=e,elAttr(o,"aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),o.appendChild(t);var s=null;n&&void 0!==(s=r.get(n))&&(s=s.parentNode),null===s&&i.childElementCount&&(s=i.children[0]),null===s&&(s=i.firstChild),i.insertBefore(o,s),a.classList.remove("scrolledDown"),r.set(e,t),o.offsetParent,elAttr(o,"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,a=function(){try{elAttrBool(n,"aria-hidden")&&(i.removeChild(n),r.delete(e)),n.removeEventListener("transitionend",a)}catch(e){}};n.addEventListener("transitionend",a),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"),a.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,a,r,o,s,l,c,d,u,h,f,p,m,g,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=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=f,{setup:function(e){e=p.extend({enableMobileMenu:!0},e),window.ENABLE_DEVELOPER_TOOLS&&g._internal_.enable(),u.setup(),n.setup(),h.init(),a.setup(),r.setup({enableMobileMenu:e.enableMobileMenu}),o.setup(),l.setup(),c.setup();for(var t=elBySelAll("form[method=get]"),i=0,s=t.length;i<s;i++)t[i].setAttribute("method","post");"microsoft"===u.browser()&&(window.onbeforeunload=function(){});var d=0;d=window.setInterval(function(){"function"==typeof window.jQuery&&(window.clearInterval(d),window.jQuery(function(){m.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 a=t[i];a.classList.add("pointer"),a.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,a,r){"use strict";var o=null,s=new t,l=new t,c=new t,d=null,u=!1,h=null,f=null,p=null,m=null,g=null,v=null,_=null,b=null;return{_setup:function(){if(null===p){p=elCreate("div"),p.className="popover forceHide",m=elCreate("div"),m.className="popoverContent",p.appendChild(m);var e=elCreate("span");e.className="elementPointer",e.appendChild(elCreate("span")),p.appendChild(e),document.body.appendChild(p),g=this._hide.bind(this),_=this._mouseEnter.bind(this),b=this._mouseLeave.bind(this),p.addEventListener("mouseenter",this._popoverMouseEnter.bind(this)),p.addEventListener("mouseleave",b),p.addEventListener("animationend",this._clearContent.bind(this)),window.addEventListener("beforeunload",function(){u=!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 o=i[n],c=a.identify(o);if(s.has(c))return;if(null!==o.closest(".popover"))return void s.set(c,{content:null,state:0});var d=e.legacy?c:~~o.getAttribute(e.attributeName);if(0!==d){o.addEventListener("mouseenter",_),o.addEventListener("mouseleave",b),"A"===o.nodeName&&elAttr(o,"href")&&o.addEventListener(WCF_CLICK_EVENT,g);var u=t+"-"+d;elData(o,"cache-id",u),l.set(c,{element:o,identifier:t,objectId:d}),s.has(u)||s.set(t+"-"+d,{content:null,state:0})}}},setContent:function(e,t,i){var n=e+"-"+t,r=s.get(n);if(void 0===r)throw new Error("Unable to find element for object id '"+t+"' (identifier: '"+e+"').");var c=a.createFragmentFromHtml(i);if(c.childElementCount||(c=a.createFragmentFromHtml("<p>"+i+"</p>")),r.content=c,r.state=2,o){var d=l.get(o).element;elData(d,"cache-id")===n&&this._show()}},_mouseEnter:function(e){if(!u){null!==h&&(window.clearTimeout(h),h=null);var t=a.identify(e.currentTarget);o===t&&null!==f&&(window.clearTimeout(f),f=null),d=t,h=window.setTimeout(function(){h=null,d===t&&this._show()}.bind(this),800)}},_mouseLeave:function(){d=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")?o!==d&&(this._hide(),e=!0):m.childElementCount&&(e=!0),e&&(p.classList.add("forceHide"),p.offsetTop,this._clearContent(),p.classList.remove("forceHide")),o=d;var t=l.get(o);if(void 0!==t){var i=s.get(elData(t.element,"cache-id"));if(2===i.state)m.appendChild(i.content),this._rebuild(o);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 a=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]},a,a)}}}},_hide:function(){null!==f&&(window.clearTimeout(f),f=null),p.classList.remove("active")},_clearContent:function(){if(o&&m.childElementCount&&!p.classList.contains("active"))for(var e=s.get(elData(l.get(o).element,"cache-id"));m.childNodes.length;)e.content.appendChild(m.childNodes[0])},_rebuild:function(){p.classList.contains("active")||(p.classList.remove("forceHide"),p.classList.add("active"),r.set(p,l.get(o).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=elByClass("ignoredUserMessage"),n=null,a=new e;return{init:function(){n=this._removeClass.bind(this),this._rebuild(),t.add("WoltLabSuite/Core/Ui/User/Ignore",this._rebuild.bind(this))},_rebuild:function(){for(var e,t=0,r=i.length;t<r;t++)e=i[t],a.has(e)||(e.addEventListener(WCF_CLICK_EVENT,n),a.add(e))},_removeClass:function(e){e.preventDefault();var t=e.currentTarget;t.classList.remove("ignoredUserMessage"),t.removeEventListener(WCF_CLICK_EVENT,n),a.delete(t),window.getSelection().removeAllRanges()}}}),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["Environment","Language","Ui/Screen"],function(e,t,i){"use strict";var n,a,r,o,s=!1,l=0,c=[],d=[];return{init:function(){if(o=elBySel(".mainMenu .boxMenu"),null===(r=o&&o.childElementCount?o.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(){s=!0,"safari"===e.browser()?window.setTimeout(this._rebuildVisibility.bind(this),1e3):(this._rebuildVisibility(),window.setTimeout(this._rebuildVisibility.bind(this),1e3))},_disable:function(){s=!1},_showNext:function(e){if(e.preventDefault(),d.length){var t=d.slice(0,3).pop();this._setMarginLeft(o.clientWidth-(t.offsetLeft+t.clientWidth)),o.lastElementChild===t&&n.classList.remove("active"),a.classList.add("active")}},_showPrevious:function(e){if(e.preventDefault(),c.length){var t=c.slice(-3)[0];this._setMarginLeft(-1*t.offsetLeft),o.firstElementChild===t&&a.classList.remove("active"),n.classList.add("active")}},_setMarginLeft:function(e){l=Math.min(l+e,0),r.style.setProperty("margin-left",l+"px","")},_rebuildVisibility:function(){if(s){c=[],d=[];var e=o.clientWidth;if(o.scrollWidth>e||l<0)for(var t,i=0,r=o.childElementCount;i<r;i++){t=o.children[i];var u=t.offsetLeft;u<0?c.push(t):u+t.clientWidth>e&&d.push(t)}a.classList[c.length?"add":"remove"]("active"),n.classList[d.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)),o.parentNode.appendChild(n),a=elCreate("a"),a.className="mainMenuShowPrevious",a.href="#",a.innerHTML='<span class="icon icon32 fa-angle-left"></span>',elAttr(a,"aria-hidden","true"),a.addEventListener(WCF_CLICK_EVENT,this._showPrevious.bind(this)),o.parentNode.insertBefore(a,o.parentNode.firstChild);var e=this._rebuildVisibility.bind(this);r.addEventListener("transitionend",e),window.addEventListener("resize",function(){r.style.setProperty("margin-left","0px",""),l=0,e()}),this._enable()},_setupA11y:function(){elBySelAll(".boxMenuHasChildren",o,function(e){var i=!1,n=elBySel(".boxMenuLink",e);n&&(elAttr(n,"aria-haspopup",!0),elAttr(n,"aria-expanded",i));var a=elCreate("button");a.className="visuallyHidden",a.tabindex=0,elAttr(a,"role","button"),elAttr(a,"aria-label",t.get("wcf.global.button.showMenu")),e.insertBefore(a,n.nextSibling),a.addEventListener(WCF_CLICK_EVENT,function(){i=!i,elAttr(n,"aria-expanded",i),elAttr(a,"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,a){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=a,t=!0}}}),define("WoltLabSuite/Core/Ui/Message/UserConsent",["Ajax","Core","User","Dom/ChangeListener","Dom/Util"],function(e,t,i,n,a){var r=!1,o="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){o.has(e)||(e.addEventListener("click",this._click.bind(this)),o.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"));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+_,k=A[0].slice(_),D=I+k.length,B=L.slice(0,I),N=L.slice(D),M=E+L.length;c&&M>c.reach&&(c.reach=M);var U=C.prev;B&&(U=a(n,U,B),E+=B.length),r(n,U,S);var j=new t(u,m?d.tokenize(k,m):k,b,k);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,"&").replace(/</g,"<").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,""")+'"';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";function e(e){return e===i||e===n||e===a}var t={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},i="Exif",n="http://ns.adobe.com/xap/1.0/",a="http://ns.adobe.com/xmp/extension/";return{getExifBytesFromJpeg:function(i){return new Promise(function(n,a){if(!(i instanceof Blob||i instanceof File))return a(new TypeError("The argument must be a Blob or a File"));var r=new FileReader;r.addEventListener("error",function(){r.abort(),a(r.error)}),r.addEventListener("load",function(){var i=r.result,o=new Uint8Array(i),s=new Uint8Array;if(255!==o[0]&&o[1]!==t.SOI)return a(new Error("Not a JPEG"));for(var l=2;l<o.length&&255===o[l];){var c=2+(o[l+2]<<8|o[l+3]);if(o[l+1]===t.APP1){for(var d="",u=l+4;0!==o[u]&&u<o.length;u++)d+=String.fromCharCode(o[u]);if(e(d)){var h=Array.prototype.slice.call(o,l,c+l),f=new Uint8Array(s.length+h.length);f.set(s),f.set(h,s.length),s=f}}l+=c}n(s)}),r.readAsArrayBuffer(i)})},removeExifData:function(i){return new Promise(function(n,a){if(!(i instanceof Blob||i instanceof File))return a(new TypeError("The argument must be a Blob or a File"));var r=new FileReader;r.addEventListener("error",function(){r.abort(),a(r.error)}),r.addEventListener("load",function(){var o=r.result,s=new Uint8Array(o);if(255!==s[0]&&s[1]!==t.SOI)return a(new Error("Not a JPEG"));for(var l=2;l<s.length&&255===s[l];){var c=2+(s[l+2]<<8|s[l+3]);if(s[l+1]===t.APP1){for(var d="",u=l+4;0!==s[u]&&u<s.length;u++)d+=String.fromCharCode(s[u]);if(e(d)){var h=Array.prototype.slice.call(s,0,l),f=Array.prototype.slice.call(s,l+c);s=new Uint8Array(h.length+f.length),s.set(h,0),s.set(f,h.length)}else l+=c}else l+=c}n(new Blob([s],{type:i.type}))}),r.readAsArrayBuffer(i)})},setExifData:function(e,i){return this.removeExifData(e).then(function(e){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]===t.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:e.type}))}),a.readAsArrayBuffer(e)})})}}}),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,k=!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,k)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.outerHTML=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;this._media.captionEnableHtml=l?~~l.checked:0;for(var v={allowAll:~~elById("mediaEditor_"+this._media.mediaID+"_aclAllowAll").checked,group:[],user:[]},_=elBySelAll('input[name="mediaEditor_'+this._media.mediaID+'_aclValues[group][]"]',t),b=0,w=_.length;b<w;b++)v.group.push(~~_[b].value);for(var y=elBySelAll('input[name="mediaEditor_'+this._media.mediaID+'_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")+'">…</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/Util","ObjectMap"],function(e,t,i,n,a,r){"use strict";var o=!1,s=!0,l=new n,c=new e,d=new n,u=new e,h=new r;return{_hide:function(t){elHide(t),l.add(t),t.classList.contains("tabMenuContent")&&elBySelAll("li",t.parentNode.querySelector(".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")),h.set(t,i)})},_show:function(e){elShow(e),l.delete(e),e.classList.contains("tabMenuContent")&&elBySelAll("li",e.parentNode.querySelector(".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&&h.has(t)){var n=h.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",""),h.delete(t)}})},addDependency:function(e){var t=e.getDependentNode();u.has(t.id)?u.get(t.id).push(e):u.set(t.id,[e]);for(var i=e.getFields(),n=0,r=i.length;n<r;n++){var o=i[n],s=a.identify(o);c.has(s)||(c.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=[];u.forEach(function(t,i){var n=elById(i);if(null===n)return void e.push(i);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++)u.delete(e[t]);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===o)return void(s=!0);o=!0,s=!1,i.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),o=!1,s&&this.checkContainers()},isHiddenByDependencies:function(e){if(l.has(e))return!0;var t=!1;return l.forEach(function(i){a.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),l.forEach(function(e){t.contains(e)&&l.delete(e)}),u.forEach(function(e,i){t.contains(elById(i))&&u.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];c.delete(l.id),h.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 n=t.getId();if(this.hasField(e,n))throw new Error("Form field with id '"+n+"' has already been registered for form with id '"+e+"'.");r.get(e).set(n,t),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},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(t){if(null===this._activeButton)throw new Error("Media cannot be chosen if no button is active.");var i=this._media.get(~~elData(t.currentTarget,"object-id")),n=elById(elData(this._activeButton,"store"));n.value=i.mediaID,e.triggerEvent(n,"change");var a=elData(this._activeButton,"display");if(a){var s=elById(a);if(s)if(i.isImage)s.innerHTML='<img src="'+(i.smallThumbnailLink?i.smallThumbnailLink:i.link)+'" alt="'+(i.altText&&i.altText[LANGUAGE_ID]?i.altText[LANGUAGE_ID]:"")+'" />';else{var l=o.getIconNameByFilename(i.filename);l&&(l="-"+l),s.innerHTML='<div class="box48" style="margin-bottom: 10px;"><span class="icon icon48 fa-file'+l+'-o"></span><div class="containerHeadline"><h3>'+i.filename+"</h3><p>"+i.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(t){t.preventDefault();var i=t.currentTarget;elHide(i);var n=i.previousElementSibling,a=elById(elData(n,"store"));a.value="",e.triggerEvent(a,"change");var r=elData(n,"display");if(r){var o=elById(r);o&&(o.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(){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.checked=!1,this.isPublicNoField.checked=!0,this.resultsRequireVoteYesField.checked=!1,this.resultsRequireVoteNoField.checked=!0,this.sortByVotesYesField.checked=!1,this.sortByVotesNoField.checked=!0,i.fire("com.woltlab.wcf.poll.editor","reset",{pollEditor:this})},_submit:function(e){if(this._options.isAjax)e.poll=this.getData(),i.fire("com.woltlab.wcf.poll.editor","submit",{event:e,pollEditor:this});else for(var t=this._container.closest("form"),n=this.getOptions(),a=0,r=n.length;a<r;a++){var o=elCreate("input");elAttr(o,"type","hidden"),elAttr(o,"name",this._wysiwygId+"Poll_options["+a+"]"),o.value=n[a],t.appendChild(o)}},_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})}}},getData:function(){var e={};return e[this.questionField.id]=this.questionField.value,e[this._wysiwygId+"Poll_options"]=this.getOptions(),e[this.endTimeField.id]=this.endTimeField.value,e[this.maxVotesField.id]=this.maxVotesField.value,e[this.isChangeableYesField.id]=!!this.isChangeableYesField.checked,e[this.isPublicYesField.id]=!!this.isPublicYesField.checked,e[this.resultsRequireVoteYesField.id]=!!this.resultsRequireVoteYesField.checked,e[this.sortByVotesYesField.id]=!!this.sortByVotesYesField.checked,e},getOptions:function(){for(var e=[],t=0,i=this.optionList.children.length;t<i;t++){var n=this.optionList.children[t],a=elBySel("input[type=text]",n).value.trim();""!==a&&e.push(elData(n,"option-id")+"_"+a)}return e}},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(/ /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",{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+")",""),a.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,a,r,o,s){"use strict";function l(){this.init()}return l.prototype={init:function(){this._cache=new i,this._knownElements=new s,this._options={className:"wcf\\data\\user\\trophy\\UserTrophyAction",parameters:{}},this._rebuild(),o.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=a.open(this,this._cache.get(this._currentUser).get(this._currentPageNo));if(a.setTitle("userTrophyListOverlay",this._cache.get(this._currentUser).get("title")),this._cache.get(this._currentUser).get("pageCount")>1){var o=elBySel(".jsPagination",n.content);null!==o&&new r(o,{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}}},l}),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["Core","Dom/Util","Language","Ui/SimpleDropdown"],function(e,t,i,n){"use strict";function a(e,t,i){this.init(e,t,i)}return a.prototype={init:function(a,r,o){this._formFieldContainer=elById(a+"Container"),this._labelChooser=elByClass("labelChooser",this._formFieldContainer)[0],this._options=e.extend({forceSelection:!1,showWithoutSelection:!1},o),this._input=elCreate("input"),this._input.type="hidden",this._input.id=a,this._input.name=a,this._input.value=~~r,this._formFieldContainer.appendChild(this._input);var s=t.identify(this._labelChooser),l=n.getDropdownMenu(s);null===l&&(n.init(elByClass("dropdownToggle",this._labelChooser)[0]),l=n.getDropdownMenu(s));var c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=elCreate("ul"),l.appendChild(c);var d=elCreate("li");d.className="dropdownDivider",c.appendChild(d)}if(this._options.showWithoutSelection){var u=elCreate("li");elData(u,"label-id",-1),this._blockScroll(u),c.appendChild(u);var h=elCreate("span");u.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 u=elCreate("li");elData(u,"label-id",0),this._blockScroll(u),c.appendChild(u);var h=elCreate("span");u.appendChild(h);var f=elCreate("span");f.className="badge label",f.innerHTML=i.get("wcf.label.none"),h.appendChild(f)}elBySelAll("li:not(.dropdownDivider)",l,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}},a}),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,a){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=a,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,a=this._fields.length;n<a;n++)if(t=this._fields[n],t.checked){if(i.isHiddenByDependencies(t))return!1;e.push(t.value)}for(var n=0,a=this._values.length;n<a;n++)for(var r=0,o=e.length;r<o;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/Wysiwyg/Poll",["Core","../Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){return this._pollEditor.getData()},_readField:function(){},setPollEditor:function(e){this._pollEditor=e}}),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,a=0;if("H2"===this._container.children.item(0).tagName||"HEADER"===this._container.children.item(0).tagName)var a=1;for(var r=a,o=n.length;r<o;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,a){"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,o=0,s=r.length;o<s;o++)if(!elIsHidden(r.item(o))){t=!0;break}if(e!==t){var l=elBySel("#"+i.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]",this._container.parentNode.parentNode);if(null===l)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)elShow(this._container),elShow(l);else{elHide(this._container),elHide(l);var c=a.getTabMenu(i.identify(l.closest(".tabMenuContainer")));c.getActiveTab()===l&&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,a){"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),o=0,s=r.length;o<s;o++)if(!elIsHidden(r[o])){t=!0;break}e!==t&&(t?(elShow(this._container),a.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";function a(e,t){this.init(e,t)}return e.inherit(a,n,{_getLabel:function(){return t.get("wcf.user.button."+(this._isActive?"un":"")+"follow")},_getAjaxActionName:function(){return this._isActive?"unfollow":"follow"},_ajaxSuccess:function(e){this._isActive=!!e.returnValues.following,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\follow\\UserFollowAction"}}}}),a}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["Core","Language","Ui/Notification","./Abstract"],function(e,t,i,n){"use strict";function a(e,t){this.init(e,t)}return e.inherit(a,n,{_getLabel:function(){return t.get("wcf.user.button."+(this._isActive?"un":"")+"ignore")},_getAjaxActionName:function(){return this._isActive?"unignore":"ignore"},_ajaxSuccess:function(e){this._isActive=!!e.returnValues.isIgnoredUser,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\ignore\\UserIgnoreAction"}}}}),a}),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=[],a=0;e.orgRequire=i,e.require=function(r,o,s){if(!Array.isArray(r))return i.apply(e,arguments);var l=new Promise(function(e,o){var s=a++;n.push(s),i(r,function(){var i=arguments;n[n.indexOf(s)]=function(){e(i)},t()},function(e){n[n.indexOf(s)]=function(){o(e)},t()})});return o&&(l=l.then(function(t){return o.apply(e,t)})),s&&l.catch(s),l},e.require.config=i.config}(window),define("require.linearExecution",function(){});
\ No newline at end of file
+var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__createBinding,_self,Prism;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,(function(t,o){!i&&hasProp(e,o)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,i){var n,o,a,r,s,l,c,d,u,h,p=t&&t.split("/"),m=I.map,f=m&&m["*"];if(e&&(l=(e=e.split("/")).length-1,I.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),function(e){var t,i,n=e.length;for(t=0;t<n;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&m&&(p||f)){e:for(a=(o=e.split("/")).length;a>0;a-=1){if(s=o.slice(0,a).join("/"),p)for(r=p.length;r>0;r-=1)if((n=getOwn(m,p.slice(0,r).join("/")))&&(n=getOwn(n,s))){c=n,d=a;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),h=a)}!c&&u&&(c=u,d=h),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(I.pkgs,e)||e}function i(e){var t,i,n,o;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}t-=1,(i=(n=queue.shift())[0])in L||i in A||(i in D?b.apply(undef,n):A[i]=n)}e&&(o=getOwn(I.shim,e)||{},b(e,o.deps||[],o.exportsFn))}function n(e,n){var o=function(t,a,r,s){var l,c;if(n&&i(),"string"==typeof t){if(y[t])return y[t](e);if(!((l=v(t,e,!0).id)in L))throw new Error("Not loaded: "+l);return L[l]}return t&&!Array.isArray(t)&&(c=t,t=undef,Array.isArray(a)&&(t=a,a=r,r=s),n)?o.config(c)(t,a,r):(a=a||function(){return slice.call(arguments,0)},U.then((function(){return i(),b(undef,t||[],a,r,e)})))};return o.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,o.nameToUrl=function(e,t,i){var n,a,r,s,l,c,d=getOwn(I.pkgs,e);if(d&&(e=d),c=getOwn(O,e))return o.nameToUrl(c,t,i);if(urlRegExp.test(e))s=e+(t||"");else{for(n=I.paths,r=(a=e.split("/")).length;r>0;r-=1)if(l=getOwn(n,a.slice(0,r).join("/"))){Array.isArray(l)&&(l=l[0]),a.splice(0,r,l);break}s=a.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":I.baseUrl)+s}return I.urlArgs&&!/^blob\:/.test(s)?s+I.urlArgs(e,s):s},o.toUrl=function(i){var n,a=i.lastIndexOf("."),r=i.split("/")[0];return-1!==a&&(!("."===r||".."===r)||a>1)&&(n=i.substring(a,i.length),i=i.substring(0,a)),o.nameToUrl(t(i,e),n,!0)},o.defined=function(t){return v(t,e,!0).id in L},o.specified=function(t){return(t=v(t,e,!0).id)in L||t in D},o}function o(e,t,i){e&&(L[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(C,t.map,t.deps)),t.finished=!0,t.resolve(i)}function a(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function r(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=C.execCb(i,e.factory,e.values,L[i])}catch(t){return a(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=L[i])):k.splice(k.indexOf(e),1),o(i,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||r(this))}function l(e,t){var i={};return i.promise=new Promise((function(t,n){i.resolve=t,i.reject=function(t){e||k.splice(k.indexOf(i),1),n(t)}})),i.map=e?t||v(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=s,i.map.pr&&(i.deps=[v(i.map.pr)]),i}function c(e,t){var i;return e?(i=e in D&&D[e])||(i=D[e]=l(e,t)):(i=l(),k.push(i)),i}function d(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(P+=1),i.requireModules=[t]),a(e,i))}}function u(e,t,i,n){i.depMax+=1,w(e,t).then((function(e){i.depFinished(e,n)}),d(i,e.id)).catch(d(i,i.map.id))}function h(e,t,r){e.load(t.n,n(r),function(e){function t(t){n||o(e,c(e),t)}var n;return t.error=function(t){c(e).reject(t)},t.fromText=function(t,o){var r=c(e),s=v(v(e).n),l=s.id;n=!0,r.factory=function(e,t){return t},o&&(t=o),hasProp(I.config,e)&&(I.config[l]=I.config[e]);try{_.exec(t)}catch(e){a(r,new Error("fromText eval for "+l+" failed: "+e))}i(l),r.deps=[s],u(s,null,r,r.deps.length)},t}(t.id),I)}function p(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function m(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach((function(n){var o=n.id,a=!hasProp(y,o)&&c(o,n);!a||a.finished||i[o]||(hasProp(t,o)?e.deps.forEach((function(t,i){t.id===o&&e.depFinished(L[o],i)})):m(a,t,i))})),i[n]=!0}function f(e){var t,i,n,o=[],a=1e3*I.waitSeconds,r=a&&j+a<(new Date).getTime();if(0===B&&(e?e.finished||m(e,{},{}):k.length&&k.forEach((function(e){m(e,{},{})}))),r){for(i in D)(n=D[i]).finished||o.push(n.map.id);(t=new Error("Timeout for modules: "+o)).requireModules=o,_.onError(t)}else(B||k.length)&&(E||(E=!0,setTimeout((function(){E=!1,f()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&N[e.dynaId]||(N[e.dynaId]=!0,_.onError(e))})),e}var _,b,v,w,y,E,S,C,L=obj(),A=obj(),I={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},x=obj(),k=[],D=obj(),M=obj(),T=obj(),B=0,j=(new Date).getTime(),P=0,N=obj(),q=obj(),O=obj(),U=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;q[t]||(q[t]=!0,c(e.id),importScripts(t),i(e.id))}:function(e){var t,n=e.id,o=e.url;q[o]||(q[o]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",n),t.type=I.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,B+=1,t.addEventListener("load",(function(){B-=1,i(n)}),!1),t.addEventListener("error",(function(){var e,i,o;B-=1,(i=getOwn(I.paths,n))&&Array.isArray(i)&&i.length>1?(t.parentNode.removeChild(t),i.shift(),(o=c(n)).map=v(n),o.map.url=_.nameToUrl(n),S(o.map)):((e=new Error("Load failed: "+n+": "+t.src)).requireModules=[n],c(n).reject(e))}),!1),t.src=o,10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},w=function(e,t){var i,n,o=e.id,a=I.shim[o];if(o in A)i=A[o],delete A[o],b.apply(undef,i);else if(!(o in D))if(e.pr){if(!(n=getOwn(O,o)))return w(v(e.pr)).then((function(i){var n=e.prn?e:v(o,t,!0),a=n.id,r=getOwn(I.shim,a);return a in T||(T[a]=!0,r&&r.deps?_(r.deps,(function(){h(i,n,t)})):h(i,n,t)),c(a).promise}));e.url=_.nameToUrl(n),S(e)}else a&&a.deps?_(a.deps,(function(){S(e)})):S(e);return c(o).promise},v=function(e,i,n){if("string"!=typeof e)return e;var o,a,r,s,l,c,d=e+" & "+(i||"")+" & "+!!n;return s=(r=p(e))[0],e=r[1],!s&&d in x?x[d]:(s&&(o=(s=t(s,i,n))in L&&L[s]),s?o&&o.normalize?(e=o.normalize(e,function(e){return function(i){return t(i,e,!0)}}(i)),c=!0):e=-1===e.indexOf("!")?t(e,i,n):e:(s=(r=p(e=t(e,i,n)))[0],e=r[1],a=_.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:a,prn:s&&c},s||(x[d]=l),l)},y={require:function(e){return n(e)},exports:function(e){var t=L[e];return void 0!==t?t:L[e]={}},module:function(e){return{id:e,uri:"",exports:y.exports(e),config:function(){return getOwn(I.config,e)||{}}}}},b=function(e,t,i,n,a){if(e){if(e in M)return;M[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(i=t,t=[]),t=t?slice.call(t,0):null,n||(hasProp(I,"defaultErrback")?I.defaultErrback&&(n=I.defaultErrback):n=g),n&&s.promise.catch(n),a=a||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),s.factory=i,s.deps=t,s.depending=!0,t.forEach((function(i,n){var o;t[n]=o=v(i,a,!0),"require"===(i=o.id)?s.values[n]=y.require(e):"exports"===i?(s.values[n]=y.exports(e),s.usingExports=!0):"module"===i?s.values[n]=s.cjsModule=y.module(e):void 0===i?s.values[n]=void 0:u(o,a,s,n)})),s.depending=!1,s.depCount===s.depMax&&r(s)):e&&o(e,s,i),j=(new Date).getTime(),e||f(s),s.promise},(_=n(null,!0)).config=function(t){var i,n,o,a;return t.context&&t.context!==e?(i=getOwn(contexts,t.context))?i.req.config(t):newContext(t.context).config(t):(x=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(n=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+n}),o=I.shim,a={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){a[t]?(I[t]||(I[t]={}),mixin(I[t],e,!0,!0)):I[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(O[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),o[t]=e})),I.shim=o),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(I.paths[t]=e.location),I.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&_(t.deps,t.callback),_)},_.onError=function(e){throw e},C={id:e,defined:L,waiting:A,config:I,deferreds:D,req:_,execCb:function(e,t,i,n){return t.apply(n,i)}},contexts[e]=C,_}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{favico:"3rdParty/favico","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn"},shim:{favico:{exports:"Favico"},"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){var i;e.elAttr=function(e,t,i){if(void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var o=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(o,n),o},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,i){if(t="data-"+t,void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,i){var n,o=e.parentNode;if(null===o)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return null!==(n=e.nextElementSibling)&&"SMALL"===n.nodeName&&n.classList.contains("innerError")||(""===t?n=null:((n=elCreate("small")).className="innerError",o.insertBefore(n,e.nextSibling))),""===t?null!==n&&(o.removeChild(n),n=null):n[i?"innerHTML":"textContent"]=t,n},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i],i)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,i){var n;return function(){var o=this,a=arguments;clearTimeout(n),n=setTimeout((function(){n=null,i||e.apply(o,a)}),t),i&&!n&&e.apply(o,a)}},Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),i=0,function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}(),e.addEventListener("popstate",(function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})),e.String.prototype.hashCode=function(){var e,t,i=0;if(this.length)for(e=0,t=this.length;e<t;e++)i=(i<<5)-i+this.charCodeAt(e),i&=i;return i}}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==i&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(i,n){return e[i]=t?t(i,n):n}}var i="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(n){e(t(i,t(n)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(i,t(module.exports))):e(t(i))}((function(e){var t,i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])};__extends=function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__assign=Object.assign||function(e){var t,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__rest=function(e,t){var i,n,o={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]]);return o},__decorate=function(e,t,i,n){var o,a,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},__param=function(e,t){return function(i,n){t(i,n,e)}},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,i,n){return new(i||(i=Promise))((function(o,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((n=n.apply(e,t||[])).next())}))},__generator=function(e,t){function i(i){return function(r){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(a=2&i[0]?o.return:i[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;switch(o=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],o=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,r])}}var n,o,a,r,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r},__exportStar=function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||__createBinding(t,e,i)},__createBinding=Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var i,n,o,a,r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,i,n,o,a,r,s;for(e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(n=Array(e),o=0,t=0;t<i;t++)for(r=0,s=(a=arguments[t]).length;r<s;r++,o++)n[o]=a[r];return n},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,i){function n(e){c[e]&&(l[e]=function(t){return new Promise((function(i,n){d.push([e,t,i,n])>1||o(e,t)}))})}function o(e,t){try{(i=c[e](t)).value instanceof __await?Promise.resolve(i.value.v).then(a,r):s(d[0][2],i)}catch(e){s(d[0][3],e)}var i}function a(e){o("next",e)}function r(e){o("throw",e)}function s(e,t){e(t),d.shift(),d.length&&o(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=i.apply(e,t||[]),d=[];return l={},n("next"),n("throw"),n("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,o){i[t]=e[t]?function(i){return(n=!n)?{value:__await(e[t](i)),done:"return"===t}:o?o(i):i}:o}var i,n;return i={},t("next"),t("throw",(function(e){throw e})),t("return"),i[Symbol.iterator]=function(){return this},i},__asyncValues=function(e){function t(t){i[t]=e[t]&&function(i){return new Promise((function(n,o){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,o,(i=e[t](i)).done,i.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),i={},t("next"),t("throw"),t("return"),i[Symbol.asyncIterator]=function(){return this},i)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var i,n;if(e&&e.__esModule)return e;if(i={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(i,e,n);return t(i,e),i},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet=function(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,i),i},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateObject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet)})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function i(e){return a(e)}function n(e,...t){const a=i(e=e||{});for(let i=0,r=t.length;i<r;i++){const r=t[i];r&&Object.keys(r).forEach((t=>{Array.isArray(r[t])||"object"!=typeof r[t]?a[t]=r[t]:o(r[t])?a[t]=n(e[t],r[t]):a[t]=r[t]}))}return a}function o(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.enableLegacyInheritance=t.debounce=t.stringToBool=t.getStoragePrefix=t.triggerEvent=t.serialize=t.getUuid=t.getType=t.isPlainObject=t.inherit=t.extend=t.convertLegacyUrl=t.clone=void 0;const a=function(e){return"object"==typeof e&&(Array.isArray(e)||o(e))?r(e):e},r=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((i=>t[i]=a(e[i]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=i,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const i=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,n=i.length;e<n;e++){const n=i[e].trim();n.length&&(t.length&&(t+="-"),t+=n.toLowerCase())}return`index.php?${t}/&`}))},t.extend=n,t.inherit=function(e,t,i){if(null==e)throw new TypeError("The constructor must not be undefined or null.");if(null==t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=n(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),i||{})},t.isPlainObject=o,t.getType=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1")},t.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,i){if(null===t)return"";const n=[];return Object.keys(t).forEach((o=>{const a=i?i+"["+o+"]":o,r=t[o];"object"==typeof r?n.push(e(r,a)):n.push(encodeURIComponent(a)+"="+encodeURIComponent(r))})),n.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const i=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(i)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,i={isImmediate:!1}){let n;return function(...o){const a=i.isImmediate&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout((()=>{n=void 0,i.isImmediate||e.apply(this,o)}),t),a&&e.apply(this,o)}},t.enableLegacyInheritance=function(e){e.call=function(t,...i){const n=Reflect.construct(e,i,t.constructor);Object.entries(n).forEach((([e,i])=>{t[e]=i}))}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=void 0,t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let i=e.toString().split("e"),n=i[1]?+i[1]-t:-t;return i=(e=Math.round(+`${i[0]}e${n}`)).toString().split("e"),n=i[1]?+i[1]+t:t,+`${i[0]}e${n}`}})),define("WoltLabSuite/Core/StringUtil",["require","exports","tslib","./NumberUtil"],(function(e,t,i,n){"use strict";function o(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+l)}function a(e,t){let i=n.round(e,t||-2).toString();const a=i.split(".");return i=o(+a[0]),a.length>1&&(i+=s+a[1]),i=i.replace("-","−"),i}function r(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.setupI18n=t.toCamelCase=t.shortUnit=t.unescapeHTML=t.ucfirst=t.lcfirst=t.formatNumeric=t.escapeRegExp=t.escapeHTML=t.addThousandsSeparator=void 0,n=i.__importStar(n);let s=".",l=",";t.addThousandsSeparator=o,t.escapeHTML=function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=a,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=r,t.unescapeHTML=function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},t.shortUnit=function(e){let t="";return e>=1e6?(e=(e/=1e6)>10?Math.floor(e):n.round(e,-1),t="M"):e>=1e3&&(e=(e/=1e3)>10?Math.floor(e):n.round(e,-1),t="k"),a(e)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=r(e)),e))).join(""):e},t.setupI18n=function(e){s=e.decimalPoint,l=e.thousandsSeparator}})),define("WoltLabSuite/Core/I18n/Plural",["require","exports","tslib","../StringUtil"],(function(e,t,i,n){"use strict";n=i.__importStar(n);const o={af(e){if(1==e)return"one"},am(e){const t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},ar(e){if(0==e)return"zero";if(1==e)return"one";if(2==e)return"two";const t=e%100;return t>=3&&t<=10?"few":t>=11&&t<=99?"many":void 0},as(e){const t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},az(e){if(1==e)return"one"},be(e){const t=e%10,i=e%100;return 1==t&&11!=i?"one":t>=2&&t<=4&&!(i>=12&&i<=14)?"few":0==t||t>=5&&t<=9||i>=11&&i<=14?"many":void 0},bg(e){if(1==e)return"one"},bn(e){const t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},bo(e){},bs(e){const t=a.getV(e),i=a.getF(e),n=e%10,o=e%100,r=i%10,s=i%100;return 0==t&&1==n&&11!=o||1==r&&11!=s?"one":0==t&&n>=2&&n<=4&&o>=12&&o<=14||r>=2&&r<=4&&s>=12&&s<=14?"few":void 0},cs(e){const t=a.getV(e);return 1==e&&0===t?"one":e>=2&&e<=4&&0===t?"few":0===t?"many":void 0},cy:e=>0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":void 0,da(e){if(e>0&&e<2)return"one"},el(e){if(1==e)return"one"},en(e){if(1==e&&0===a.getV(e))return"one"},es(e){if(1==e)return"one"},eu(e){if(1==e)return"one"},fa(e){if(e>=0&&e<=1)return"one"},fr(e){if(e>=0&&e<2)return"one"},ga:e=>1==e?"one":2==e?"two":3==e||4==e||5==e||6==e?"few":7==e||8==e||9==e||10==e?"many":void 0,gu(e){if(e>=0&&e<=1)return"one"},he(e){const t=a.getV(e);return 1==e&&0===t?"one":2==e&&0===t?"two":e>10&&0===t&&e%10==0?"many":void 0},hi(e){if(e>=0&&e<=1)return"one"},hr:e=>a.bs(e),hu(e){if(1==e)return"one"},hy(e){if(e>=0&&e<2)return"one"},id(e){},is(e){const t=a.getF(e);if(0===t&&e%10==1&&e%100!=11||0!==t)return"one"},ja(e){},jv(e){},ka(e){if(1==e)return"one"},kk(e){if(1==e)return"one"},km(e){},kn(e){if(e>=0&&e<=1)return"one"},ko(e){},ku(e){if(1==e)return"one"},ky(e){if(1==e)return"one"},lb(e){if(1==e)return"one"},lo(e){},lt(e){const t=e%10,i=e%100;return 1!=t||i>=11&&i<=19?t>=2&&t<=9&&!(i>=11&&i<=19)?"few":0!=a.getF(e)?"many":void 0:"one"},lv(e){const t=e%10,i=e%100,n=a.getV(e),o=a.getF(e),r=o%10,s=o%100;return 0==t||i>=11&&i<=19||2==n&&s>=11&&s<=19?"zero":1==t&&11!=i||2==n&&1==r&&11!=s||2!=n&&1==r?"one":void 0},mk:e=>a.bs(e),ml(e){if(1==e)return"one"},mn(e){if(1==e)return"one"},mr(e){if(1==e)return"one"},ms(e){},mt(e){const t=e%100;return 1==e?"one":0==e||t>=2&&t<=10?"few":t>=11&&t<=19?"many":void 0},my(e){},no(e){if(1==e)return"one"},ne(e){if(1==e)return"one"},or(e){if(1==e)return"one"},pa(e){if(1==e||0==e)return"one"},pl(e){const t=a.getV(e),i=e%10,n=e%100;return 1==e&&0==t?"one":0==t&&i>=2&&i<=4&&!(n>=12&&n<=14)?"few":0==t&&(1!=e&&i>=0&&i<=1||i>=5&&i<=9||n>=12&&n<=14)?"many":void 0},ps(e){if(1==e)return"one"},pt(e){if(e>=0&&e<2)return"one"},ro(e){const t=a.getV(e),i=e%100;return 1==e&&0===t?"one":0!=t||0==e||i>=2&&i<=19?"few":void 0},ru(e){const t=e%10,i=e%100;if(0==a.getV(e)){if(1==t&&11!=i)return"one";if(t>=2&&t<=4&&!(i>=12&&i<=14))return"few";if(0==t||t>=5&&t<=9||i>=11&&i<=14)return"many"}},sd(e){if(1==e)return"one"},si(e){if(0==e||1==e||0==Math.floor(e)&&1==a.getF(e))return"one"},sk:e=>a.cs(e),sl(e){const t=a.getV(e),i=e%100;return 0==t&&1==i?"one":0==t&&2==i?"two":0==t&&(3==i||4==i)||0!=t?"few":void 0},sq(e){if(1==e)return"one"},sr:e=>a.bs(e),ta(e){if(1==e)return"one"},te(e){if(1==e)return"one"},tg(e){},th(e){},tk(e){if(1==e)return"one"},tr(e){if(1==e)return"one"},ug(e){if(1==e)return"one"},uk:e=>a.ru(e),uz(e){if(1==e)return"one"},vi(e){},zh(e){}},a=Object.assign({getCategory(e,t){t||(t=document.documentElement.lang),"function"!=typeof a[t]&&(t="en");const i=a[t](e);return i||"other"},getCategoryFromTemplateParameters(e){if(!e.value)throw new Error("Missing parameter value");if(!e.other)throw new Error("Missing parameter other");let t=e.value;Array.isArray(t)&&(t=t.length);const i=Object.keys(e).find((e=>e.toString()===(~~e).toString()&&e.toString()===t.toString()));if(i)return i;let o=a.getCategory(t);e[o]||(o="other");const r=e[o];return-1!==r.indexOf("#")?r.replace("#",n.formatNumeric(t)):r},getF(e){const t=e.toString(),i=t.indexOf(".");return-1===i?0:parseInt(t.substr(i+1),10)},getV:e=>e.toString().replace(/^[^.]*\.?/,"").length},o);return a})),define("WoltLabSuite/Core/Language/Store",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.get=void 0;const i=new Map;t.get=function(e,t={}){const n=i.get(e);return void 0===n?e:n(t)},t.add=function(e,t){i.set(e,t)}})),define("WoltLabSuite/Core/Template.grammar",["require"],(function(e){var t=function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i},i=[2,44],n=[5,9,11,12,13,18,19,21,22,23,25,26,28,29,30,32,33,34,35,37,39,41],o=[1,25],a=[1,27],r=[1,33],s=[1,31],l=[1,32],c=[1,28],d=[1,29],u=[1,26],h=[1,35],p=[1,41],m=[1,40],f=[11,12,15,42,43,47,49,51,52,54,55],g=[9,11,12,13,18,19,21,23,26,28,30,32,33,34,35,37,39],_=[11,12,15,42,43,46,47,48,49,51,52,54,55],b=[1,64],v=[1,65],w=[18,37,39],y=[12,15],E={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,T_WS:12,"{if":13,COMMAND_PARAMETERS:14,"}":15,COMMAND_repetition0:16,COMMAND_option0:17,"{/if}":18,"{include":19,COMMAND_PARAMETER_LIST:20,"{implode":21,"{/implode}":22,"{foreach":23,COMMAND_option1:24,"{/foreach}":25,"{plural":26,PLURAL_PARAMETER_LIST:27,"{lang}":28,"{/lang}":29,"{":30,VARIABLE:31,"{#":32,"{@":33,"{ldelim}":34,"{rdelim}":35,ELSE:36,"{else}":37,ELSE_IF:38,"{elseif":39,FOREACH_ELSE:40,"{foreachelse}":41,T_VARIABLE:42,T_VARIABLE_NAME:43,VARIABLE_repetition0:44,VARIABLE_SUFFIX:45,"[":46,"]":47,".":48,"(":49,VARIABLE_SUFFIX_option0:50,")":51,"=":52,COMMAND_PARAMETER_VALUE:53,T_QUOTED_STRING:54,T_DIGITS:55,COMMAND_PARAMETERS_repetition_plus0:56,COMMAND_PARAMETER:57,T_PLURAL_PARAMETER_NAME:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"T_WS",13:"{if",15:"}",18:"{/if}",19:"{include",21:"{implode",22:"{/implode}",23:"{foreach",25:"{/foreach}",26:"{plural",28:"{lang}",29:"{/lang}",30:"{",32:"{#",33:"{@",34:"{ldelim}",35:"{rdelim}",37:"{else}",39:"{elseif",41:"{foreachelse}",42:"T_VARIABLE",43:"T_VARIABLE_NAME",46:"[",47:"]",48:".",49:"(",51:")",52:"=",54:"T_QUOTED_STRING",55:"T_DIGITS"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[36,2],[38,4],[40,2],[31,3],[45,3],[45,2],[45,3],[20,5],[20,3],[53,1],[53,1],[53,1],[14,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,3],[27,5],[27,3],[58,1],[58,1],[6,0],[6,2],[16,0],[16,2],[17,0],[17,1],[24,0],[24,1],[44,0],[44,2],[50,0],[50,1],[56,1],[56,2]],performAction:function(e,t,i,n,o,a,r){var s,l,c,d=a.length-1;switch(o){case 1:return a[d-1]+";";case 2:(s=a[d].reduce((function(e,t){return t.encode&&!e[1]?e[0]+=" + '"+t.value:t.encode&&e[1]?e[0]+=t.value:!t.encode&&e[1]?e[0]+="' + "+t.value:t.encode||e[1]||(e[0]+=" + "+t.value),e[1]=t.encode,e}),["''",!1]))[1]&&(s[0]+="'"),this.$=s[0];break;case 3:case 4:this.$={encode:!0,value:a[d].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:a[d]};break;case 8:this.$="(function() { if ("+a[d-5]+") { return "+a[d-3]+"; } "+a[d-2].join(" ")+" "+(a[d-1]||"")+" return ''; })()";break;case 9:if(!a[d-1].file)throw new Error("Missing parameter file");this.$=a[d-1].file+".fetch(v)";break;case 10:if(!a[d-3].from)throw new Error("Missing parameter from");if(!a[d-3].item)throw new Error("Missing parameter item");a[d-3].glue||(a[d-3].glue="', '"),this.$="(function() { return "+a[d-3].from+".map(function(item) { v["+a[d-3].item+"] = item; return "+a[d-1]+"; }).join("+a[d-3].glue+"); })()";break;case 11:if(!a[d-4].from)throw new Error("Missing parameter from");if(!a[d-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+a[d-4].from+" instanceof Array) {for (var i = 0; i < "+a[d-4].from+".length; i++) { looped = true;v["+a[d-4].key+"] = i;v["+a[d-4].item+"] = "+a[d-4].from+"[i];result += "+a[d-2]+";}} else {for (var key in "+a[d-4].from+") {if (!"+a[d-4].from+".hasOwnProperty(key)) continue;looped = true;v["+a[d-4].key+"] = key;v["+a[d-4].item+"] = "+a[d-4].from+"[key];result += "+a[d-2]+";}}return (looped ? result : "+(a[d-1]||"''")+"); })()";break;case 12:for(c in this.$="I18nPlural.getCategoryFromTemplateParameters({",l=!1,a[d-1])objOwns(a[d-1],c)&&(this.$+=(l?",":"")+c+": "+a[d-1][c],l=!0);this.$+="})";break;case 13:this.$="Language.get("+a[d-1]+", v)";break;case 14:this.$="StringUtil.escapeHTML("+a[d-1]+")";break;case 15:this.$="StringUtil.formatNumeric("+a[d-1]+")";break;case 16:this.$=a[d-1];break;case 17:this.$="'{'";break;case 18:this.$="'}'";break;case 19:this.$="else { return "+a[d]+"; }";break;case 20:this.$="else if ("+a[d-2]+") { return "+a[d]+"; }";break;case 21:this.$=a[d];break;case 22:this.$="v['"+a[d-1]+"']"+a[d].join("");break;case 23:this.$=a[d-2]+a[d-1]+a[d];break;case 24:this.$="['"+a[d]+"']";break;case 25:case 39:this.$=a[d-2]+(a[d-1]||"")+a[d];break;case 26:case 40:this.$=a[d],this.$[a[d-4]]=a[d-2];break;case 27:case 41:this.$={},this.$[a[d-2]]=a[d];break;case 31:this.$=a[d].join("");break;case 44:case 46:case 52:this.$=[];break;case 45:case 47:case 53:case 57:a[d-1].push(a[d]);break;case 56:this.$=[a[d]]}},table:[t([5,9,11,12,13,19,21,23,26,28,30,32,33,34,35],i,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,18,22,25,29,37,39,41],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],19:[1,12],21:[1,13],23:[1,14],26:[1,15],28:[1,16],30:[1,17],32:[1,18],33:[1,19],34:[1,20],35:[1,21]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),{11:o,12:a,14:22,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{20:34,43:h},{20:36,43:h},{20:37,43:h},{27:38,43:p,55:m,58:39},t([9,11,12,13,19,21,23,26,28,29,30,32,33,34,35],i,{6:3,4:42}),{31:43,42:r},{31:44,42:r},{31:45,42:r},t(n,[2,17]),t(n,[2,18]),{15:[1,46]},t([15,47,51],[2,31],{31:30,57:47,11:o,12:a,42:r,43:s,49:l,52:c,54:d,55:u}),t(f,[2,56]),t(f,[2,32]),t(f,[2,33]),t(f,[2,34]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{11:o,12:a,14:48,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{43:[1,49]},{15:[1,50]},{52:[1,51]},{15:[1,52]},{15:[1,53]},{15:[1,54]},{52:[1,55]},{52:[2,42]},{52:[2,43]},{29:[1,56]},{15:[1,57]},{15:[1,58]},{15:[1,59]},t(g,i,{6:3,4:60}),t(f,[2,57]),{51:[1,61]},t(_,[2,52],{44:62}),t(n,[2,9]),{31:66,42:r,53:63,54:b,55:v},t([9,11,12,13,19,21,22,23,26,28,30,32,33,34,35],i,{6:3,4:67}),t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35,41],i,{6:3,4:68}),t(n,[2,12]),{31:66,42:r,53:69,54:b,55:v},t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(w,[2,46],{16:70}),t(f,[2,39]),t([11,12,15,42,43,47,51,52,54,55],[2,22],{45:71,46:[1,72],48:[1,73],49:[1,74]}),{12:[1,75],15:[2,27]},t(y,[2,28]),t(y,[2,29]),t(y,[2,30]),{22:[1,76]},{24:77,25:[2,50],40:78,41:[1,79]},{12:[1,80],15:[2,41]},{17:81,18:[2,48],36:83,37:[1,85],38:82,39:[1,84]},t(_,[2,53]),{11:o,12:a,14:86,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{43:[1,87]},{11:o,12:a,14:89,31:30,42:r,43:s,49:l,50:88,51:[2,54],52:c,54:d,55:u,56:23,57:24},{20:90,43:h},t(n,[2,10]),{25:[1,91]},{25:[2,51]},t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35],i,{6:3,4:92}),{27:93,43:p,55:m,58:39},{18:[1,94]},t(w,[2,47]),{18:[2,49]},{11:o,12:a,14:95,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},t([9,11,12,13,18,19,21,23,26,28,30,32,33,34,35],i,{6:3,4:96}),{47:[1,97]},t(_,[2,24]),{51:[1,98]},{51:[2,55]},{15:[2,26]},t(n,[2,11]),{25:[2,21]},{15:[2,40]},t(n,[2,8]),{15:[1,99]},{18:[2,19]},t(_,[2,23]),t(_,[2,25]),t(g,i,{6:3,4:100}),t(w,[2,20])],defaultActions:{4:[2,1],40:[2,42],41:[2,43],78:[2,51],83:[2,49],89:[2,55],90:[2,26],92:[2,21],93:[2,40],96:[2,19]},parseError:function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)},parse:function(e){var t,i,n,o,a,r,s,l,c,d,u,h,p,m,f,g=this,_=[0],b=[null],v=[],w=this.table,y="",E=0,S=0,C=0,L=2,A=1,I=v.slice.call(arguments,1),x=Object.create(this.lexer),k={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(k.yy[t]=this.yy[t]);for(x.setInput(e,k.yy),k.yy.lexer=x,k.yy.parser=this,void 0===x.yylloc&&(x.yylloc={}),i=x.yylloc,v.push(i),n=x.options&&x.options.ranges,"function"==typeof k.yy.parseError?this.parseError=k.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o=function(){var e;return"number"!=typeof(e=x.lex()||A)&&(e=g.symbols_[e]||e),e},d={};;){if(s=_[_.length-1],this.defaultActions[s]?l=this.defaultActions[s]:(null==a&&(a=o()),l=w[s]&&w[s][a]),void 0===l||!l.length||!l[0]){for(u in f="",m=[],w[s])this.terminals_[u]&&u>L&&m.push("'"+this.terminals_[u]+"'");f=x.showPosition?"Parse error on line "+(E+1)+":\n"+x.showPosition()+"\nExpecting "+m.join(", ")+", got '"+(this.terminals_[a]||a)+"'":"Parse error on line "+(E+1)+": Unexpected "+(a==A?"end of input":"'"+(this.terminals_[a]||a)+"'"),this.parseError(f,{text:x.match,token:this.terminals_[a]||a,line:x.yylineno,loc:i,expected:m})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+a);switch(l[0]){case 1:_.push(a),b.push(x.yytext),v.push(x.yylloc),_.push(l[1]),a=null,r?(a=r,r=null):(S=x.yyleng,y=x.yytext,E=x.yylineno,i=x.yylloc,C>0&&C--);break;case 2:if(h=this.productions_[l[1]][1],d.$=b[b.length-h],d._$={first_line:v[v.length-(h||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(h||1)].first_column,last_column:v[v.length-1].last_column},n&&(d._$.range=[v[v.length-(h||1)].range[0],v[v.length-1].range[1]]),void 0!==(c=this.performAction.apply(d,[y,S,E,k.yy,l[1],b,v].concat(I))))return c;h&&(_=_.slice(0,-1*h*2),b=b.slice(0,-1*h),v=v.slice(0,-1*h)),_.push(this.productions_[l[1]][0]),b.push(d.$),v.push(d._$),p=w[_[_.length-2]][_[_.length-1]],_.push(p);break;case 3:return!0}}return!0}},S={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t,i,n=e.length,o=e.split(/(?:\r\n?|\n)/g);return this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n,t=this.match.split(/(?:\r\n?|\n)/g),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1),i=this.yylloc.range,this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===t.length?this.yylloc.first_column:0)+t[t.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,n,o,a;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(a in o)this[a]=o[a];return!1}return!1},next:function(){var e,t,i,n,o,a;if(this.done)return this.EOF;for(this._input||(this.done=!0),this._more||(this.yytext="",this.match=""),o=this._currentRules(),a=0;a<o.length;a++)if((i=this._input.match(this.rules[o[a]]))&&(!t||i[0].length>t[0].length)){if(t=i,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,o[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,o[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:case 3:return 54;case 4:return 42;case 5:return 55;case 6:return 43;case 7:return 48;case 8:return 46;case 9:return 47;case 10:return 49;case 11:return 51;case 12:return 52;case 13:return 34;case 14:return 35;case 15:return this.begin("command"),32;case 16:return this.begin("command"),33;case 17:return this.begin("command"),13;case 18:case 19:return this.begin("command"),39;case 20:return 37;case 21:return 18;case 22:return 28;case 23:return 29;case 24:return this.begin("command"),19;case 25:return this.begin("command"),21;case 26:return this.begin("command"),26;case 27:return 22;case 28:return this.begin("command"),23;case 29:return 41;case 30:return 25;case 31:return this.begin("command"),30;case 32:return this.popState(),15;case 33:return 12;case 34:return 5;case 35:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[0-9]+)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{plural )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{(?!\s))/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],inclusive:!0},INITIAL:{rules:[0,1,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35],inclusive:!0}}};return E.lexer=S,E})),define("WoltLabSuite/Core/Template/Compiler",["require","exports","tslib","../Template.grammar"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=void 0,n=i.__importStar(n),t.compile=function(e){return e="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+(e=n.parse(e)),new Function("StringUtil","Language","I18nPlural","v",e)}})),define("WoltLabSuite/Core/Template",["require","exports","tslib","./Core","./I18n/Plural","./Language/Store","./StringUtil","./Template/Compiler"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class l{constructor(e){try{this.compiled=s.compile(e)}catch(e){throw console.debug(e.message),e}}fetch(e){return this.compiled(r,a,o,e)}}return Object.defineProperty(l,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(e){throw new Error("WCF.Template.callbacks is no longer supported")}}),n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Language",["require","exports","tslib","./Template","./Language/Store","./Language/Store"],(function(e,t,i,n,o,a){"use strict";function r(e,t){o.add(e,function(e){try{const t=new n.default(e);return t.fetch.bind(t)}catch(t){return function(){return e}}}(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.addObject=t.get=void 0,n=i.__importDefault(n),Object.defineProperty(t,"get",{enumerable:!0,get:function(){return a.get}}),t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{r(e,t)}))},t.add=r})),define("WoltLabSuite/Core/Ajax/Status",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";function o(){return void 0===r&&(r=new a),r}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0,n=i.__importStar(n);class a{constructor(){this._activeRequests=0,this._timer=null,this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("span");e.className="icon icon48 fa-spinner",this._overlay.appendChild(e);const t=document.createElement("span");t.textContent=n.get("wcf.global.loading"),this._overlay.appendChild(t),document.body.appendChild(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&window.clearTimeout(this._timer),this._overlay.classList.remove("active"))}}let r;t.show=function(){o().show()},t.hide=function(){o().hide()}})),define("WoltLabSuite/Core/CallbackList",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._callbacks=new Map}add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){var i;null===e?this._callbacks.forEach(((e,i)=>{e.forEach(t)})):null===(i=this._callbacks.get(e))||void 0===i||i.forEach(t)}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,i,n){"use strict";const o=new((n=i.__importDefault(n)).default);let a=!1;return{add:o.add.bind(o),remove:o.remove.bind(o),trigger(){if(!a)try{a=!0,o.forEach(null,(e=>e()))}finally{a=!1}}}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,i,n){"use strict";function o(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let n,o=e;const a=i+"Sibling";for(;null!==o&&o!==t;){if(null!==o[i+"ElementSibling"])return!1;if(o[a])for(n=o[a];n;){if(""!==n.textContent.trim())return!1;n=n[a]}o=o.parentNode}return!0}n=i.__importStar(n);let a=0;const r={createFragmentFromHtml(e){const t=document.createElement("div");this.setInnerHtml(t,e);const i=document.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId(){let e;do{e="wcf"+a++}while(null!==document.getElementById(e));return e},identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=this.getUniqueId(),e.id=t),t},outerHeight(e,t){t=t||window.getComputedStyle(e);let i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom,i},outerWidth(e,t){t=t||window.getComputedStyle(e);let i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight,i},outerDimensions(e){const t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let i=!1;Object.keys(t).forEach((n=>{/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":"")}))},styleAsInt(e,t){const i=e.getPropertyValue(t);return null===i?0:parseInt(i,10)},setInnerHtml(e,t){e.innerHTML=t;const i=e.querySelectorAll("script");for(let t=0,n=i.length;t<n;t++){const n=i[t],o=document.createElement("script");n.src?o.src=n.src:o.textContent=n.textContent,e.appendChild(o),n.remove()}},insertHtml(e,t,i){const n=document.createElement("div");if(this.setInnerHtml(n,e),!n.childNodes.length)return;let o,a=n.childNodes[0];switch(i){case"append":t.appendChild(a);break;case"after":this.insertAfter(a,t);break;case"prepend":this.prepend(a,t);break;case"before":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'before'.");t.parentNode.insertBefore(a,t);break;default:throw new Error("Unknown insert method '"+i+"'.")}for(;n.childNodes.length;)o=n.childNodes[0],this.insertAfter(o,a),a=o},contains:(e,t)=>e.contains(t),getDataAttributes(e,t,i,o){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),i=!0===i,o=!0===o;const a={};for(let r=0,s=e.attributes.length;r<s;r++){const s=e.attributes[r];if(0===s.name.indexOf(t)){let e=s.name.replace(new RegExp("^"+t),"");if(i){const t=e.split("-");e="";for(let i=0,a=t.length;i<a;i++)e.length&&(o&&"id"===t[i]?t[i]="ID":t[i]=n.ucfirst(t[i])),e+=t[i]}a[e]=s.value}}return a},unwrapChildNodes(e){if(null===e.parentNode)throw new Error("The element has no parent.");const t=e.parentNode;for(;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);e.remove()},replaceElement(e,t){if(null===e.parentNode)throw new Error("The old element has no parent.");for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),e.remove()},isAtNodeStart:(e,t)=>o(e,t,"previous"),isAtNodeEnd:(e,t)=>o(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){this.isHidden(e)?this.show(e):this.hide(e)},innerError(e,t,i){const n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerError")||(""===t?o=null:(o=document.createElement("small"),o.className="innerError",n.insertBefore(o,e.nextSibling))),""===t?null!==o&&(o.remove(),o=null):o[i?"innerHTML":"textContent"]=t,o},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=r,r})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Dom/Util","../Language"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s);let l=!1,c=!1;class d{constructor(e){this._options=o.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),l||(l=!0,window.addEventListener("beforeunload",(()=>c=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||n.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=o.clone(this._options),i=this._xhr;if(i.onload=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200&&i.status<300||304===i.status?t.responseType&&0!==i.getResponseHeader("Content-Type").indexOf(t.responseType)?this._failure(i,t):this._success(i,t):this._failure(i,t))},i.onerror=()=>{this._failure(i,t)},this._options.progress&&(i.onprogress=this._options.progress),this._options.uploadProgress&&(i.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==o.getType(e)&&(e=o.serialize(e)),i.send(e)}else i.send()}abortPrevious(){this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=void 0,this._options.silent||n.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==o.getType(e)&&(e=o.extend(this._data,e)),this._options.data=e}_success(t,o){if(o.silent||n.hide(),"function"==typeof o.success){let n=null;if("application/json"===t.getResponseHeader("Content-Type").split(";",1)[0].trim()){try{n=JSON.parse(t.responseText)}catch(e){return void this._failure(t,o)}n&&n.returnValues&&void 0!==n.returnValues.template&&(n.returnValues.template=n.returnValues.template.trim()),n&&n.forceBackgroundQueuePerform&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke()))}o.success(n,t.responseText,t,o.data)}this._finalize(o)}_failure(t,o){if(c)return;o.silent||n.hide();let a=null;try{a=JSON.parse(t.responseText)}catch(e){}let l=!0;if("function"==typeof o.failure&&(l=o.failure(a||{},t.responseText||"",t,o.data)),!0!==o.ignoreError&&l){const n=this.getErrorHtml(a,t);n&&new Promise(((t,i)=>{e(["../Ui/Dialog"],t,i)})).then(i.__importStar).then((e=>{e.openStatic(r.default.getUniqueId(),n,{title:s.get("wcf.global.error.title")})}))}this._finalize(o)}getErrorHtml(e,t){let i,n="";if(null!==e&&Object.keys(e).length>0?(e.returnValues&&e.returnValues.description&&(n+=`<br><p>Description:</p><p>${e.returnValues.description}</p>`),e.file&&e.line&&(n+=`<br><p>File:</p><p>${e.file} in line ${e.line}</p>`),e.stacktrace?n+=`<br><p>Stacktrace:</p><p>${e.stacktrace}</p>`:e.exceptionID&&(n+=`<br><p>Exception ID: <code>${e.exceptionID}</code></p>`),i=e.message,e.previous.forEach((e=>{n+=`<hr><p>${e.message}</p>`,n+=`<br><p>Stacktrace</p><p>${e.stacktrace}</p>`}))):i=t.responseText,!i||"undefined"===i){if(!window.ENABLE_DEBUG_MODE)return null;i="XMLHttpRequest failed without a responseText. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${i}</p>${n}</div>`}_finalize(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=void 0,a.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}}return o.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestObject=t.apiOnce=t.api=void 0,n=i.__importDefault(n);const o=new WeakMap;t.api=function(e,t,i,a){"object"!=typeof t&&(t={});let r=o.get(e);if(void 0===r){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+window.SECURITY_TOKEN,t.withCredentials=!0),r=new n.default(t),o.set(e,r)}let s=null,l=null;return"function"==typeof i&&(s=r.getOption("success"),r.setOption("success",i)),"function"==typeof a&&(l=r.getOption("failure"),r.setOption("failure",a)),r.setData(t),r.sendRequest(),null!==s&&r.setOption("success",s),null!==l&&r.setOption("failure",l),r},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+window.SECURITY_TOKEN,e.withCredentials=!0),new n.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!o.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return o.get(e)}})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,n=i.__importStar(n);class o{constructor(e){this._invocations=0,this._isBusy=!1,this._url=e}invoke(){this._isBusy||(this._isBusy=!0,n.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let a;t.setUrl=function(e){a||(a=new o(e))},t.invoke=function(){a?a.invoke():console.error("The background queue has not been initialized yet.")}})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";function o(e){return r(e,n.get("wcf.date.dateFormat"))}function a(e){return r(e,n.get("wcf.date.timeFormat"))}function r(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let i="";for(let o=0,a=t.length;o<a;o++){let r;switch(t[o]){case"s":r=e.getSeconds().toString().padStart(2,"0");break;case"i":r=e.getMinutes().toString().padStart(2,"0");break;case"a":r=e.getHours()>11?"pm":"am";break;case"g":{const t=e.getHours();r=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();r=0===t?"12":t>12?(t-12).toString():t.toString(),r=r.padStart(2,"0");break}case"A":r=e.getHours()>11?"PM":"AM";break;case"G":r=e.getHours().toString();break;case"H":r=e.getHours().toString().padStart(2,"0");break;case"d":r=e.getDate().toString().padStart(2,"0");break;case"j":r=e.getDate().toString();break;case"l":r=n.get("__days")[e.getDay()];break;case"D":r=n.get("__daysShort")[e.getDay()];break;case"S":r="";break;case"m":r=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":r=(e.getMonth()+1).toString();break;case"F":r=n.get("__months")[e.getMonth()];break;case"M":r=n.get("__monthsShort")[e.getMonth()];break;case"y":r=e.getFullYear().toString().slice(-2);break;case"Y":r=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();r=t>0?"-":"+",t=Math.abs(t),r+=(~~(t/60)).toString().padStart(2,"0"),r+=":",r+=(t%60).toString().padStart(2,"0");break}case"r":r=e.toString();break;case"U":r=Math.round(e.getTime()/1e3).toString();break;case"\\":r="",o+1<a&&(r=t[++o]);break;default:r=t[o]}i+=r}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,n=i.__importStar(n),t.formatDate=o,t.formatTime=a,t.formatDateTime=function(e){const t=n.get("wcf.date.dateTimeFormat"),i=n.get("wcf.date.dateFormat"),o=n.get("wcf.date.timeFormat");return r(e,t.replace(/%date%/,i).replace(/%time%/,o))},t.format=r,t.gmdate=function(e){return e instanceof Date||(e=new Date),Math.round(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDay(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())/1e3)},t.getTimeElement=function(e){const t=document.createElement("time");t.className="datetime";const i=o(e),s=a(e);return t.setAttribute("datetime",r(e,"c")),t.dataset.timestamp=((e.getTime()-e.getMilliseconds())/1e3).toString(),t.dataset.date=i,t.dataset.time=s,t.dataset.offset=(60*e.getTimezoneOffset()).toString(),e.getTime()>Date.now()&&(t.dataset.isFutureDate="true",t.textContent=n.get("wcf.date.dateTimeFormat").replace("%time%",s).replace("%date%",i)),t},t.getTimezoneDate=function(e,t){const i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function i(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(n))}let n={editorAutosave:!0,eventLogging:!1};const o={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(o).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){n.editorAutosave=!e&&!n.editorAutosave,i(),window.console.log("%c\tEditor autosave "+(n.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){n.eventLogging=!!e||!n.eventLogging,i(),window.console.log("%c\tEvent logging "+(n.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=o,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(n=JSON.parse(e))}catch(e){}n.editorAutosave||o.toggleEditorAutosave(!0),n.eventLogging&&o.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>n.editorAutosave,eventLog(e,t){n.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return o})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,i,n,o){"use strict";function a(e,t){"string"!=typeof t&&(t=void 0);const i=r.get(e);void 0!==i&&(void 0===t?r.delete(e):i.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,n=i.__importStar(n),o=i.__importDefault(o);const r=new Map;t.add=function(e,t,i){if("function"!=typeof i)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let o=r.get(e);void 0===o&&(o=new Map,r.set(e,o));let a=o.get(t);void 0===a&&(a=new Map,o.set(t,a));const s=n.getUuid();return a.set(s,i),s},t.fire=function(e,t,i){var n,a;o.default._internal_.eventLog(e,t),i=i||{},null===(a=null===(n=r.get(e))||void 0===n?void 0:n.get(t))||void 0===a||a.forEach((e=>e(i)))},t.remove=function(e,t,i){var n,o;null===(o=null===(n=r.get(e))||void 0===n?void 0:n.get(t))||void 0===o||o.delete(i)},t.removeAll=a,t.removeAllBySuffix=function(e,t){const i=r.get(e);if(void 0===i)return;const n=-1*(t="_"+t).length;i.forEach(((i,o)=>{o.substr(n)===t&&a(e,o)}))}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const n=[];for(let o=0;o<e.childElementCount;o++)a.get(t)(e.children[o],i)&&n.push(e.children[o]);return n}function n(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");let o=e.parentNode;for(;o instanceof Element;){if(o===n)return null;if(a.get(t)(o,i))return o;o=o.parentNode}return null}function o(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&a.get(i)(e[t],n)?e[t]:null}Object.defineProperty(t,"__esModule",{value:!0}),t.prevByTag=t.prevByClass=t.prevBySel=t.prev=t.nextByTag=t.nextByClass=t.nextBySel=t.next=t.parentByTag=t.parentByClass=t.parentBySel=t.childrenByTag=t.childrenByClass=t.childrenBySel=t.childByTag=t.childByClass=t.childBySel=void 0;const a=new Map([[0,()=>!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]]);t.childBySel=function(e,t){return i(e,1,t)[0]||null},t.childByClass=function(e,t){return i(e,2,t)[0]||null},t.childByTag=function(e,t){return i(e,3,t)[0]||null},t.childrenBySel=function(e,t){return i(e,1,t)},t.childrenByClass=function(e,t){return i(e,2,t)},t.childrenByTag=function(e,t){return i(e,3,t)},t.parentBySel=function(e,t,i){return n(e,1,t,i)},t.parentByClass=function(e,t,i){return n(e,2,t,i)},t.parentByTag=function(e,t,i){return n(e,3,t,i)},t.next=function(e){return o(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return o(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return o(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return o(e,"nextElementSibling",3,t)},t.prev=function(e){return o(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return o(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return o(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return o(e,"previousElementSibling",3,t)}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t,i,n,o,a){let r="auto",s="auto",l=!0,c=50;const d=document.getElementById("pageHeaderPanel");if(null!==d){const e=window.getComputedStyle(d).position;c="fixed"===e||"static"===e?d.offsetHeight:0}if("top"===e){const e=document.body.clientHeight;r=e-n.top+a,e-(r+t.height)<(window.scrollY||window.pageYOffset)+c&&(l=!1)}else s=n.top+i.height+a,s+t.height-(window.scrollY||window.pageYOffset)>o&&(l=!1);return{align:e,bottom:r,top:s,result:l}}function l(e,t,i,n,o){let a="auto",r="auto",s=!0;return"left"===e?(a=n.left,a+t.width>o&&(s=!1)):"right"===e?n.left+i.width<t.width?s=!1:(r=o-(n.left+i.width),r<0&&(s=!1)):(a=n.left+i.width/2-t.width/2,a=~~a,(a<0||a+t.width>o)&&(s=!1)),{align:e,left:a,right:r,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),t.set=function(e,t,i){i=n.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},i||{}),Array.isArray(i.pointerClassNames)&&i.pointerClassNames.length===(i.pointer?1:2)||(i.pointerClassNames=[]),-1===["left","right","center"].indexOf(i.horizontal)&&(i.horizontal="left"),"bottom"!==i.vertical&&(i.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(i.allowFlip)&&(i.allowFlip="both"),a.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const c=a.default.outerDimensions(e),d=a.default.outerDimensions(i.refDimensionsElement instanceof HTMLElement?i.refDimensionsElement:t),u=a.default.offset(t),h=window.innerHeight,p=document.body.clientWidth;let m=null,f=!1;if("center"===i.horizontal&&(f=!0,m=l(i.horizontal,c,d,u,p),m.result||("both"===i.allowFlip||"horizontal"===i.allowFlip?i.horizontal="left":m.result=!0)),"rtl"===r.get("wcf.global.pageDirection")&&(i.horizontal="left"===i.horizontal?"right":"left"),null===m||!m.result){const e=m;if(m=l(i.horizontal,c,d,u,p),!m.result&&("both"===i.allowFlip||"horizontal"===i.allowFlip)){const t=l("left"===i.horizontal?"right":"left",c,d,u,p);t.result?m=t:f&&(m=e)}}const g=m.left,_=m.right;let b=s(i.vertical,c,d,u,h,i.verticalOffset);if(!b.result&&("both"===i.allowFlip||"vertical"===i.allowFlip)){const e=s("top"===i.vertical?"bottom":"top",c,d,u,h,i.verticalOffset);e.result&&(b=e)}const v=b.bottom,w=b.top;if(i.pointer){const t=o.childrenByClass(e,"elementPointer")[0]||null;if(null===t)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===m.align?(t.classList.add("center"),t.classList.remove("left","right")):(t.classList.add(m.align),t.classList.remove("center"),t.classList.remove("left"===m.align?"right":"left")),"top"===b.align?t.classList.add("flipVertical"):t.classList.remove("flipVertical")}else 2===i.pointerClassNames.length&&(e.classList["auto"===w?"add":"remove"](i.pointerClassNames[0]),e.classList["auto"===g?"add":"remove"](i.pointerClassNames[1]));a.default.setStyles(e,{bottom:"auto"===v?v:Math.round(v).toString()+"px",left:"auto"===g?g:Math.ceil(g).toString()+"px",right:"auto"===_?_:Math.floor(_).toString()+"px",top:"auto"===w?w:Math.round(w).toString()+"px"}),a.default.show(e),e.style.removeProperty("visibility")}})),define("WoltLabSuite/Core/Ui/CloseOverlay",["require","exports","tslib","../CallbackList"],(function(e,t,i,n){"use strict";const o=new((n=i.__importDefault(n)).default),a={add:o.add.bind(o),remove:o.remove.bind(o),execute(){o.forEach(null,(e=>e()))}};return document.body.addEventListener("click",(()=>a.execute())),a})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Dom/Change/Listener","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";function u(e,t,i){const n=i?"minDate":"maxDate";let o=(e.dataset[n]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(o))o=new Date(o).getTime().toString();else if("now"===o)o=t.getTime().toString();else if(/^\d{1,3}$/.exec(o)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~o*(i?-1:1)),o=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(o)){if(o=RegExp.$1,null===document.getElementById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}-\d{2}-\d{2}T/.test(o)?new Date(o).getTime().toString():new Date(i?1902:2038,0,1).getTime().toString();e.dataset[n]=o}function h(e){let t=k.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function p(e){e.preventDefault(),e.stopPropagation(),function(){if(null!==U)return;U=document.createElement("div"),U.className="datePicker",U.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");U.appendChild(e),N=document.createElement("a"),N.className="previous jsTooltip",N.href="#",N.setAttribute("role","button"),N.tabIndex=0,N.title=s.get("wcf.date.datePicker.previousMonth"),N.setAttribute("aria-label",s.get("wcf.date.datePicker.previousMonth")),N.innerHTML='<span class="icon icon16 fa-arrow-left"></span>',N.addEventListener("click",(e=>F.previousMonth(e))),e.appendChild(N);const t=document.createElement("span");e.appendChild(t),j=document.createElement("select"),j.className="month jsTooltip",j.title=s.get("wcf.date.datePicker.month"),j.setAttribute("aria-label",s.get("wcf.date.datePicker.month")),j.addEventListener("change",b),t.appendChild(j);let i="";const n=s.get("__monthsShort");for(let e=0;e<12;e++)i+=`<option value="${e}">${n[e]}</option>`;j.innerHTML=i,O=document.createElement("select"),O.className="year jsTooltip",O.title=s.get("wcf.date.datePicker.year"),O.setAttribute("aria-label",s.get("wcf.date.datePicker.year")),O.addEventListener("change",v),t.appendChild(O),P=document.createElement("a"),P.className="next jsTooltip",P.href="#",P.setAttribute("role","button"),P.tabIndex=0,P.title=s.get("wcf.date.datePicker.nextMonth"),P.setAttribute("aria-label",s.get("wcf.date.datePicker.nextMonth")),P.innerHTML='<span class="icon icon16 fa-arrow-right"></span>',P.addEventListener("click",(e=>F.nextMonth(e))),e.appendChild(P),M=document.createElement("ul"),U.appendChild(M);const a=document.createElement("li");a.className="weekdays",M.appendChild(a);const r=s.get("__daysShort");for(let e=0;e<7;e++){let t=e+C;t>6&&(t-=7);const i=document.createElement("span");i.textContent=r[t],a.appendChild(i)}for(let e=0;e<6;e++){const e=document.createElement("li");M.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",w),D.push(t),e.appendChild(t)}}q=document.createElement("footer"),U.appendChild(q),T=document.createElement("select"),T.className="hour",T.title=s.get("wcf.date.datePicker.hour"),T.setAttribute("aria-label",s.get("wcf.date.datePicker.hour")),T.addEventListener("change",_);const l=new Date(2e3,0,1),c=s.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");let d="";for(let e=0;e<24;e++)l.setHours(e),d+=`<option value="${e}">${o.format(l,c)}</option>`;T.innerHTML=d,q.appendChild(T),q.appendChild(document.createTextNode(" : ")),B=document.createElement("select"),B.className="minute",B.title=s.get("wcf.date.datePicker.minute"),B.setAttribute("aria-label",s.get("wcf.date.datePicker.minute")),B.addEventListener("change",_),d="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;d+=`<option value="${e}">${t}</option>`}B.innerHTML=d,q.appendChild(B),document.body.appendChild(U),document.body.addEventListener("focus",E,{capture:!0})}();const t=e.currentTarget,i="INPUT"===t.nodeName?t:t.previousElementSibling;if(i===k)return void m();const a=i.closest(".dialogContent");null!==a&&(n.stringToBool(a.dataset.hasDatepickerScrollListener||"")||(a.addEventListener("scroll",f),a.dataset.hasDatepickerScrollListener="1")),k=i;const r=A.get(k),c=k.dataset.value;let d;c?(d=new Date(parseInt(c,10)),"Invalid Date"===d.toString()&&(d=new Date)):d=new Date,x=h("minDate"),x.getTime()>d.getTime()&&(d=x),I=h("maxDate"),r.isDateTime?(T.value=d.getHours().toString(),B.value=d.getMinutes().toString(),U.classList.add("datePickerTime")):U.classList.remove("datePickerTime"),U.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),function(e,t,i){g(e,t,i);let n="";for(let e=x.getFullYear(),t=I.getFullYear();e<=t;e++)n+=`<option value="${e}">${e}</option>`;O.innerHTML=n,O.value=i.toString(),j.value=t.toString(),U.classList.add("active")}(d.getDate(),d.getMonth(),d.getFullYear()),l.set(U,k),k.nextElementSibling.setAttribute("aria-expanded","true"),L=!1}function m(){if(null===U||!U.classList.contains("active"))return;U.classList.remove("active");const e=A.get(k);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:k});k.nextElementSibling.setAttribute("aria-expanded","false"),k=null}function f(e){if(null===k)return;const t=e.currentTarget,i=d.default.offset(k),n=d.default.offset(t);i.top+k.clientHeight<=n.top||i.top>=n.top+t.offsetHeight||i.left<=n.left||i.left>=n.left+t.offsetWidth?m():l.set(U,k)}function g(e,t,i){const n=void 0!==e,a=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||M.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof i&&(i=parseInt(i||"0",10)),a||i){let r=0!==i;const s=document.createDocumentFragment();s.appendChild(M),a||(t=parseInt(M.dataset.month,10)),i||(i=parseInt(M.dataset.year,10));let l,c=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(c<x?(i=x.getFullYear(),t=x.getMonth(),e=x.getDate(),j.value=t.toString(),O.value=i.toString(),r=!0):c>I&&(i=I.getFullYear(),t=I.getMonth(),e=I.getDate(),j.value=t.toString(),O.value=i.toString(),r=!0),c=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");c.getDay()!==C;)c.setDate(c.getDate()-1);d.default.show(D[35].parentNode);const u=new Date(x.getFullYear(),x.getMonth(),x.getDate());for(let e=0;e<42;e++){if(35===e&&c.getMonth()!==t){d.default.hide(D[35].parentNode);break}const i=D[e];i.textContent=c.getDate().toString(),l=c.getMonth()===t,l&&(c<u||c>I)&&(l=!1),i.classList[l?"remove":"add"]("otherMonth"),l&&(i.href="#",i.setAttribute("role","button"),i.tabIndex=0,i.title=o.formatDate(c),i.setAttribute("aria-label",o.formatDate(c))),c.setDate(c.getDate()+1)}if(M.dataset.month=t.toString(),M.dataset.year=i.toString(),U.insertBefore(s,q),!n&&(c=new Date(i,t,e),c.getDate()!==e)){for(;c.getMonth()!==t;)c.setDate(c.getDate()-1);e=c.getDate()}if(r){for(let e=0;e<12;e++){const t=j.children[e];t.disabled=i===x.getFullYear()&&+t.value<x.getMonth()||i===I.getFullYear()&&+t.value>I.getMonth()}const e=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),P.classList[e<I?"add":"remove"]("active");const n=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");n.setDate(n.getDate()-1),N.classList[n>x?"add":"remove"]("active")}}if(e){for(let t=0;t<35;t++){const i=D[t];i.classList[i.classList.contains("otherMonth")||+i.textContent!==e?"remove":"add"]("active")}M.dataset.day=e.toString()}_()}function _(){const e=A.get(k);let t;n.stringToBool(k.dataset.empty||"")||(t=e.isDateTime?new Date(+M.dataset.year,+M.dataset.month,+M.dataset.day,+T.value,+B.value):new Date(+M.dataset.year,+M.dataset.month,+M.dataset.day),F.setDate(k,t))}function b(e){g(void 0,+e.currentTarget.value)}function v(e){g(void 0,void 0,+e.currentTarget.value)}function w(e){e.preventDefault();const t=e.currentTarget;if(t.classList.contains("otherMonth"))return;k.dataset.empty="false",g(+t.textContent);A.get(k).isDateTime||m()}function y(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&A.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}function E(e){if(null!==U&&U.classList.contains("active"))if(U.contains(e.target))L=!0;else if(L){k.nextElementSibling.focus(),L=!1}else U.querySelector(".previous").focus()}n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c),d=i.__importDefault(d);let S=!1,C=0,L=!1;const A=new Map;let I,x,k=null;const D=[];let M,T,B,j,P,N,q,O,U=null;const F={init(){S||(S=!0,C=parseInt(s.get("wcf.date.firstDayOfTheWeek"),10),a.default.add("WoltLabSuite/Core/Date/Picker",(()=>F.init())),c.default.add("WoltLabSuite/Core/Date/Picker",(()=>m())));const e=new Date;document.querySelectorAll('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)').forEach((t=>{t.classList.add("inputDatePicker"),t.readOnly=!0;const i="datetime"===t.getAttribute("type"),a=i&&n.stringToBool(t.dataset.timeOnly||""),r=n.stringToBool(t.dataset.disableClear||""),l=i&&n.stringToBool(t.dataset.ignoreTimezone||""),c=t.classList.contains("birthday");t.dataset.isDateTime=i?"true":"false",t.dataset.isTimeOnly=a?"true":"false";let d=null,h=t.value;h||(h=t.getAttribute("value")||"");const m=/^\d+-\d+-\d+$/.test(h);if(h){if(a){d=new Date;const e=h.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||m){let e=new Date(h).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const i=Math.floor(e/60).toString(),n=(e%60).toString();t+=2===i.length?i:"0"+i,t+=":",t+=2===n.length?n:"0"+n,c||m?h+="T00:00:00"+t:h=h.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(h)}const e=d.getTime();isNaN(e)?h="":(t.dataset.value=e.toString(),h=a?o.formatTime(d):i?o.formatDateTime(d):o.formatDate(d))}const f=0===h.length;if(c?(t.dataset.minDate="120",t.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(t.min&&(t.dataset.minDate=t.min),t.max&&(t.dataset.maxDate=t.max)),u(t,e,!0),u(t,e,!1),(t.dataset.minDate||"")===(t.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+t.id+"').");t.type="text",t.value=h,t.dataset.empty=f?"true":"false";const g=t.dataset.placeholder||"";g&&(t.placeholder=g);const _=document.createElement("input");_.id=t.id+"DatePicker",_.name=t.name,_.type="hidden",null!==d&&(_.value=a?o.format(d,"H:i"):l?o.format(d,"Y-m-dTH:i:s"):o.format(d,i?"c":"Y-m-d")),t.parentNode.insertBefore(_,t),t.removeAttribute("name"),t.addEventListener("click",p);let b=null;if(!t.disabled){const e=document.createElement("div");e.className="inputAddon",b=document.createElement("a"),b.className="inputSuffix button jsTooltip",b.href="#",b.setAttribute("role","button"),b.tabIndex=0,b.title=s.get("wcf.date.datePicker"),b.setAttribute("aria-label",s.get("wcf.date.datePicker")),b.setAttribute("aria-haspopup","true"),b.setAttribute("aria-expanded","false"),b.addEventListener("click",p),e.appendChild(b);let i=document.createElement("span");if(i.className="icon icon16 fa-calendar",b.appendChild(i),t.parentNode.insertBefore(e,t),e.insertBefore(t,b),!r){const n=document.createElement("a");n.className="inputSuffix button",n.addEventListener("click",this.clear.bind(this,t)),f&&n.style.setProperty("visibility","hidden",""),e.appendChild(n),i=document.createElement("span"),i.className="icon icon16 fa-times",n.appendChild(i)}}const v=["tiny","short","medium","long"];let w=!1;for(let e=0;e<4;e++)t.classList.contains(v[e])&&(w=!0);w||t.classList.add("short"),A.set(t,{clearButton:b,shadow:_,disableClear:r,isDateTime:i,isEmpty:f,isTimeOnly:a,ignoreTimezone:l,onClose:null})}))},previousMonth(e){e.preventDefault(),"0"===j.value?(j.value="11",O.value=(+O.value-1).toString()):j.value=(+j.value-1).toString(),g(void 0,+j.value,+O.value)},nextMonth(e){e.preventDefault(),"11"===j.value?(j.value="0",O.value=(+O.value+1).toString()):j.value=(+j.value+1).toString(),g(void 0,+j.value,+O.value)},getDate(e){const t=(e=y(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=y(e);const i=A.get(e);e.dataset.value=t.getTime().toString();let n,a="";i.isDateTime?i.isTimeOnly?(n=o.formatTime(t),a="H:i"):i.ignoreTimezone?(n=o.formatDateTime(t),a="Y-m-dTH:i:s"):(n=o.formatDateTime(t),a="c"):(n=o.formatDate(t),a="Y-m-d"),e.value=n,i.shadow.value=o.format(t,a),i.disableClear||i.clearButton.style.removeProperty("visibility")},getValue(e){e=y(e);const t=A.get(e);return t?t.shadow.value:""},clear(e){e=y(e);const t=A.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||t.clearButton.style.setProperty("visibility","hidden",""),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=y(e);const t=A.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),i.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",p),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,A.delete(e)},setCloseCallback(e,t){e=y(e),A.get(e).onClose=t}};return window.__wcf_bc_datePicker=F,F})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports","tslib","../Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError(`Invalid delta ${t}. Delta must be in the interval [0, 86400000].`);this._callback=e.bind(void 0,this),this._delta=t,this.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Date/Time/Relative",["require","exports","tslib","../../Core","../Util","../../Dom/Change/Listener","../../Language","../../Timer/Repeating"],(function(e,t,i,n,o,a,r,s){"use strict";function l(){document.hidden?(u=!1,h=!1):(u=!0,h&&(c(),h=!1))}function c(){if(!u)return void(h||(h=!0));const e=new Date,t=(e.getTime()-e.getMilliseconds())/1e3;document.querySelectorAll("time").forEach((i=>{!function(e,t,i){if(!e.classList.contains("datetime")||n.stringToBool(e.dataset.isFutureDate||""))return;const a=parseInt(e.dataset.timestamp,10)+d,s=e.dataset.date,l=e.dataset.time,c=e.dataset.offset;e.title||(e.title=r.get("wcf.date.dateTimeFormat").replace(/%date%/,s).replace(/%time%/,l));if(a>=i||i<a+60)e.textContent=r.get("wcf.date.relative.now");else if(i<a+3540){const t=Math.max(Math.round((i-a)/60),1);e.textContent=r.get("wcf.date.relative.minutes",{minutes:t})}else if(i<a+86400){const t=Math.round((i-a)/3600);e.textContent=r.get("wcf.date.relative.hours",{hours:t})}else if(i<a+518400){const i=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=Math.ceil((i.getTime()/1e3-a)/86400),s=o.getTimezoneDate(1e3*a,1e3*parseInt(c,10)).getDay(),d=r.get("__days")[s];e.textContent=r.get("wcf.date.relative.pastDays",{days:n,day:d,time:l})}else e.textContent=r.get("wcf.date.shortDateTimeFormat").replace(/%date%/,s).replace(/%time%/,l)}(i,e,t)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s);let d,u=!0,h=!1;t.setup=function(){d=Math.trunc(Date.now()/1e3-window.TIME_NOW),new s.default(c,6e4),a.default.add("WoltLabSuite/Core/Date/Time/Relative",c),document.addEventListener("visibilitychange",l)}})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.touch=t.platform=t.editor=t.browser=t.setup=void 0;let i="other",n="none",o="desktop",a=!1;t.setup=function(){if("object"==typeof window.chrome)i="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,n=e.length;t<n;t++){const n=e[t];0===n.indexOf("-ms-")?i="microsoft":0===n.indexOf("-moz-")?i="firefox":"firefox"!==i&&0===n.indexOf("-webkit-")&&(i="safari")}}const e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("crios")?(i="chrome",o="ios"):/(?:iphone|ipad|ipod)/.test(e)?(i="safari",o="ios"):-1!==e.indexOf("android")?o="android":-1!==e.indexOf("iemobile")&&(i="microsoft",o="windows"),"desktop"!==o||-1===e.indexOf("mobile")&&-1===e.indexOf("tablet")||(o="mobile"),n="redactor",a="ontouchstart"in window||"msMaxTouchPoints"in window.navigator&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(i="safari",o="ios")},t.browser=function(){return i},t.editor=function(){return n},t.platform=function(){return o},t.touch=function(){return a}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core","../Environment"],(function(e,t,i,n,o){"use strict";function a(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");p.has(e)&&(e=p.get(e)),h.has(e)&&(e=h.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(r),s.set(e,t),e!==t.mql.media&&p.set(t.mql.media,e)),t}function r(e){const t=a(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()})),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setDialogContainer=t.pageOverlayIsActive=t.pageOverlayClose=t.pageOverlayOpen=t.scrollEnable=t.scrollDisable=t.is=t.remove=t.on=void 0,n=i.__importStar(n),o=i.__importStar(o);const s=new Map;let l,c=0,d=0,u=0;const h=new Map(Object.entries({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),p=new Map;t.on=function(e,t){const i=n.getUuid(),o=a(e);return"function"==typeof t.match&&o.callbacksMatch.set(i,t.match),"function"==typeof t.unmatch&&o.callbacksUnmatch.set(i,t.unmatch),"function"==typeof t.setup&&(o.mql.matches?t.setup():o.callbacksSetup.set(i,t.setup)),i},t.remove=function(e,t){const i=a(e);i.callbacksMatch.delete(t),i.callbacksUnmatch.delete(t),i.callbacksSetup.delete(t)},t.is=function(e){return a(e).mql.matches},t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");"ios"===o.platform()?(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")):e.style.setProperty("margin-top",`-${d}px`,""),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");"ios"===o.platform()?(e.style.removeProperty("position"),e.style.removeProperty("top")):e.style.removeProperty("margin-top"),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){}})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Change/Listener","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";function d(e){const t=e.currentTarget,i=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,n=i.length;e<n;e++){const n=i[e],o=s.default.identify(n),a=s.default.offset(n),r=s.default.offset(t);a.top+n.clientHeight<=r.top||a.top>=r.top+t.offsetHeight||a.left<=r.left||a.left>=r.left+t.offsetWidth?S.toggleDropdown(o):S.setAlignment(v.get(o),w.get(o))}}function u(){v.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(o.stringToBool(e.dataset.isOverlayDropdownButton||""))S.setAlignment(e,w.get(t));else{const i=w.get(e.id);o.stringToBool(i.dataset.dropdownIgnorePageScroll||"")||S.close(t)}}))}function h(e,t){_.forEach(e,(i=>{i(e,t)}))}function p(e,t,i,n){let a=!1;if(null!==e){e.preventDefault(),e.stopPropagation();const i=e.currentTarget;t=i.dataset.target,void 0===n&&e instanceof MouseEvent&&(o.stringToBool(i.dataset.isKeyboardClick||"")?(a=!0,delete i.dataset.isKeyboardClick):n=!0)}let s=v.get(t),l=!1;if(void 0!==s){let i,a;if(e&&(i=e.currentTarget,a=i.parentNode,a!==s&&(a.classList.add("dropdown"),a.id=s.id,s.classList.remove("dropdown"),s.id="",s=a,v.set(t,a))),void 0===n&&(i=s.closest(".dropdownToggle"),i||(i=s.querySelector(".dropdownToggle"),!i&&s.id&&(i=document.querySelector('[data-target="'+s.id+'"]'))),i&&o.stringToBool(i.dataset.dropdownLazyInit||"")&&(n=!0)),o.stringToBool(s.dataset.dropdownPreventToggle||"")&&s.classList.contains("dropdownOpen")&&(l=!0),""===s.dataset.isOverlayDropdownButton){const e=r.parentByClass(s,"dialogContent");s.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",d)}}return E="",v.forEach(((e,r)=>{const s=w.get(r);let c=null;if(e.classList.contains("dropdownOpen"))if(l)E=t;else{e.classList.remove("dropdownOpen"),s.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),h(r,"close")}else if(r===t&&s.childElementCount>0){E=t,e.classList.add("dropdownOpen"),s.classList.add("dropdownOpen");const l=e.querySelector(".dropdownToggle");l&&l.setAttribute("aria-expanded","true");const d=s.childElementCount>0?s.children[0]:null;if(d&&o.stringToBool(d.dataset.scrollToActive||"")){delete d.dataset.scrollToActive;let e=null;for(let t=0,i=d.childElementCount;t<i;t++)if(d.children[t].classList.contains("active")){e=d.children[t];break}e&&(d.scrollTop=Math.max(e.offsetTop+e.clientHeight-s.clientHeight,0))}const u=s.querySelector(".scrollableDropdownMenu");null!==u&&u.classList[u.scrollHeight>u.clientHeight?"add":"remove"]("forceScrollbar"),h(r,"open"),n||(s.setAttribute("role","menu"),s.tabIndex=-1,s.removeEventListener("keydown",f),s.addEventListener("keydown",f),s.querySelectorAll("li").forEach((e=>{e.clientHeight&&((null===c||e.classList.contains("active"))&&(c=e),e.setAttribute("role","menuitem"),e.tabIndex=-1)}))),S.setAlignment(e,s,i),null!==c&&(c.focus(),a&&c.classList.add("focus-visible"))}})),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}function m(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):p(e)))}function f(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const i=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||i.reverse();let n=null;const o=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let a=i.indexOf(t);"End"!==e.key&&"Home"!==e.key||(a=-1);for(let e=a+1;e<i.length;e++)if(o(i[e])){n=i[e];break}null===n&&(n=i.find(o)||null),null!==n&&n.focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();let i=t;1!==i.childElementCount||"SPAN"!==i.children[0].nodeName&&"A"!==i.children[0].nodeName||(i=i.children[0]);const n=v.get(E),a=n.querySelector(".dropdownToggle"),r=n.dataset.a11yMouseEvent||"click";o.triggerEvent(i,r),a&&a.focus()}else if("Escape"===e.key||"Tab"===e.key){e.preventDefault();const t=v.get(E);let i=t.querySelector(".dropdownToggle");null!==i||t.classList.contains("dropdown")||(i=t),p(null,E),i&&i.focus()}}let g;n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importDefault(c);const _=new n.default;let b=!1;const v=new Map,w=new Map;let y,E="";const S={setup(){b||(b=!0,y=document.createElement("div"),y.className="dropdownMenuContainer",document.body.appendChild(y),g=document.getElementsByClassName("dropdownToggle"),S.initAll(),c.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>S.closeAll())),a.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>S.initAll())),document.addEventListener("scroll",u),window.bc_wcfSimpleDropdown=this)},initAll(){for(let e=0,t=g.length;e<t;e++)S.init(g[e],!1)},init(e,t){if(S.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const i=r.parentByClass(e,"dropdown");if(null===i)throw new Error("Invalid dropdown passed, button '"+s.default.identify(e)+"' does not have a parent with .dropdown.");const n=r.nextByClass(e,"dropdownMenu");if(null===n)throw new Error("Invalid dropdown passed, button '"+s.default.identify(e)+"' does not have a menu as next sibling.");y.appendChild(n);const a=s.default.identify(i);if(!v.has(a)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",p),e.addEventListener("keydown",m),v.set(a,i),w.set(a,n),/^wcf\d+$/.test(a)||(n.dataset.source=a),n.childElementCount&&n.children[0].classList.contains("scrollableDropdownMenu"))){const e=n.children[0];e.dataset.scrollToActive="true";let t=null,i=null;e.addEventListener("wheel",(n=>{null===t&&(t=e.clientHeight),null===i&&(i=e.scrollHeight),(n.deltaY<0&&0===e.scrollTop||n.deltaY>0&&e.scrollTop+t===i)&&n.preventDefault()}),{passive:!1})}return e.dataset.target=a,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",o.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){S.setup();const i=s.default.identify(e);v.has(i)||(v.set(i,e),y.appendChild(t),w.set(i,t))},registerCallback(e,t){_.add(e,t)},getDropdown:e=>v.get(e),getDropdownMenu:e=>w.get(e),toggleDropdown(e,t,i){p(null,e,t,i)},setAlignment(e,t,i){const n=e.querySelector(".dropdownToggle"),o=null!==n?n.parentNode:null;let a;o&&o.classList.contains("inputAddonTextarea")&&(a=n),l.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:a||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=v.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const i=w.get(e);S.setAlignment(t,i)},isOpen(e){const t=w.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t){const i=w.get(e);void 0===i||i.classList.contains("dropdownOpen")||S.toggleDropdown(e,void 0,t)},close(e){const t=v.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),w.get(e).classList.remove("dropdownOpen"))},closeAll(){v.forEach(((e,t)=>{e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),w.get(t).classList.remove("dropdownOpen"),h(t,"close"))}))},destroy(e){var t;if(!v.has(e))return!1;try{S.close(e),null===(t=w.get(e))||void 0===t||t.remove()}catch(e){}return w.delete(e),v.delete(e),!0},_toggle:(e,t,i,n)=>p(e,t,i,n)};return S})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./Dropdown/Simple"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);let u,h,p=null;const m=new Map;let f=!1;const g=new WeakMap,_=new Map;let b;const v=["onBeforeClose","onClose","onShow"],w=["number","password","search","tel","text","url"],y=['a[href]:not([tabindex^="-"]):not([inert])','area[href]:not([tabindex^="-"]):not([inert])',"input:not([disabled]):not([inert])","select:not([disabled]):not([inert])","textarea:not([disabled]):not([inert])","button:not([disabled]):not([inert])",'iframe:not([tabindex^="-"]):not([inert])','audio:not([tabindex^="-"]):not([inert])','video:not([tabindex^="-"]):not([inert])','[contenteditable]:not([tabindex^="-"]):not([inert])','[tabindex]:not([tabindex^="-"]):not([inert])'];return{setup(){h=document.createElement("div"),h.classList.add("dialogOverlay"),h.setAttribute("aria-hidden","true"),h.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),h.addEventListener("wheel",(e=>{e.target===h&&e.preventDefault()}),{passive:!1}),document.getElementById("content").appendChild(h),b=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName)return this.close(p),!1}return!0},a.on("screen-xs",{match(){f=!0},unmatch(){f=!1},setup(){f=!0}}),this._initStaticDialogs(),o.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{m.forEach((e=>{n.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const i=document.getElementById(t);null!==i&&(i.classList.remove("jsStaticDialogContent"),i.dataset.isStaticDialog="true",r.default.hide(i),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(i.id,null,{title:i.dataset.title||""})})))}}))},open(t,o){let a=g.get(t);if(a&&n.isPlainObject(a))return this.openStatic(a.id,void 0===o?null:o);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!n.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(a={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),r.default.show(c)}else if(null===s.source)s.source=o;else if("function"==typeof s.source)s.source();else if(n.isPlainObject(s.source)){if("string"!=typeof o||""===o.trim())return new Promise(((t,i)=>{e(["../Ajax"],t,i)})).then(i.__importStar).then((e=>{const i=s.source;e.api(this,i.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof i.after&&i.after(m.get(l).content,e))}))})),{};s.source=o}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,r.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return g.set(t,a),_.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,o,r){a.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||a.scrollDisable()),m.has(t)?this._updateDialog(t,o):((r=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},r||{})).closable||(r.backdropCloseOnClick=!1),r.closeConfirmMessage&&(r.onBeforeClose=t=>{new Promise(((t,i)=>{e(["./Confirmation"],t,i)})).then(i.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:r.closeConfirmMessage||""})}))}),this._createDialog(t,o,r));const c=m.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{var e;null===(e=c.content.querySelector("input, textarea"))||void 0===e||e.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const n=i.dialog.querySelector(".dialogTitle");n&&(n.textContent=t)},setCallback(e,t,i){if("object"==typeof e){const t=g.get(e);void 0!==t&&(e=t.id)}const n=m.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===v.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof i&&null!==i)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof i+"' given).");n[t]=i},removeCallback(e,t){if("object"==typeof e){const t=g.get(e);void 0!==t&&(e=t.id)}const i=m.get(e);if(void 0===i)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===v.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");i[t]=void 0},_createDialog(e,t,i){let n=null;if(null===t&&(n=document.getElementById(e),null===n))throw new Error("Expected either a HTML string or an existing element id.");const o=document.createElement("div");o.classList.add("dialogContainer"),o.setAttribute("aria-hidden","true"),o.setAttribute("role","dialog"),o.dataset.id=e;const a=document.createElement("header");o.appendChild(a);const s=r.default.getUniqueId();o.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,l.id=s,a.appendChild(l),i.closable){const e=document.createElement("a");e.className="dialogCloseButton jsTooltip",e.href="#",e.setAttribute("role","button"),e.tabIndex=0,e.title=i.closeButtonLabel,e.setAttribute("aria-label",i.closeButtonLabel),e.addEventListener("click",(e=>this._close(e))),a.appendChild(e);const t=document.createElement("span");t.className="icon icon24 fa-times",e.appendChild(t)}const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),i.disableContentPadding&&c.classList.add("dialogContentNoPadding"),o.appendChild(c),c.addEventListener("wheel",(e=>{let t,i,n,o=!1,a=e.target;for(;;){if(t=a.clientHeight,i=a.scrollHeight,t<i){if(n=a.scrollTop,e.deltaY<0&&n>0){o=!0;break}if(e.deltaY>0&&n+t<i){o=!0;break}}if(!a||a===c)break;a=a.parentNode}o||e.preventDefault()}),{passive:!1}),null===n)if("string"==typeof t)d=document.createElement("div"),d.id=e,r.default.setInnerHtml(d,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");{const i=[];let n;for(let e=0,o=t.childNodes.length;e<o;e++)n=t.childNodes[e],n.nodeType===Node.ELEMENT_NODE&&i.push(n);"DIV"!==i[0].nodeName||i.length>1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=i[0]}}else d=n;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&r.default.show(d),m.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,closable:i.closable,content:d,dialog:o,header:a,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow,submitButton:null,inputFields:new Set}),h.insertBefore(o,h.firstChild),"function"==typeof i.onSetup&&i.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&r.default.setInnerHtml(i.content,t),n.stringToBool(i.dialog.getAttribute("aria-hidden"))){d.default.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===u&&(u=this._maintainFocus.bind(this),document.body.addEventListener("focus",u,{capture:!0})),i.closable&&n.stringToBool(h.getAttribute("aria-hidden"))&&window.addEventListener("keyup",b),i.dialog.parentNode.insertBefore(i.dialog,i.dialog.parentNode.firstChild),i.dialog.setAttribute("aria-hidden","false"),h.setAttribute("aria-hidden","false"),h.setAttribute("close-on-click",i.backdropCloseOnClick?"true":"false"),p=e;const t=i.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),this._setFocusToFirstItem(i.dialog,!1),t&&t.removeAttribute("inert"),"function"==typeof i.onShow&&i.onShow(i.content),n.stringToBool(i.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:i.content,id:e})}this.rebuild(e),o.default.trigger()},_maintainFocus(e){if(p){const t=m.get(p),i=e.target;t.dialog.contains(i)||i.closest(".dropdownMenuContainer")||i.closest(".datePicker")||this._setFocusToFirstItem(t.dialog,!0)}},_setFocusToFirstItem(e,t){let i=this._getFirstFocusableChild(e);null!==i&&(t&&("username"!==i.id&&"username"!==i.name||"safari"===l.browser()&&"ios"===l.platform()&&(i=null)),i&&setTimeout((()=>{i.focus()}),1))},_getFirstFocusableChild(e){const t=e.querySelectorAll(y.join(","));for(let e=0,i=t.length;e<i;e++)if(t[e].offsetWidth&&t[e].offsetHeight&&t[e].getClientRects().length)return t[e];return null},rebuild(e){const t=this._getDialogId(e),i=m.get(t);if(void 0===i)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(n.stringToBool(i.dialog.getAttribute("aria-hidden")))return;const o=i.content.parentNode,a=i.content.querySelector(".formSubmit");let s=0;null!==a?(o.classList.add("dialogForm"),a.classList.add("dialogFormSubmit"),s+=r.default.outerHeight(a),s-=1,o.style.setProperty("margin-bottom",`${s}px`,"")):(o.classList.remove("dialogForm"),o.style.removeProperty("margin-bottom")),s+=r.default.outerHeight(i.header);const c=window.innerHeight*(f?1:.8)-s;o.style.setProperty("max-height",~~c+"px",""),"chrome"===l.browser()&&(i.content.scrollHeight>c?i.content.style.setProperty("margin-right","-1px",""):i.content.style.removeProperty("margin-right")),"chrome"!==l.browser()&&"safari"!==l.browser()||o.classList.add("jsWebKitFractionalPixelFix");const d=_.get(t);if(void 0!==d&&"function"==typeof d._dialogSubmit){const e=i.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),n=i.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===n)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",i.content));if(i.submitButton!==n){i.submitButton=n,n.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const o=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let a;for(let t=0,n=e.length;t<n;t++)a=e[t],i.inputFields.has(a)||(-1!==w.indexOf(a.type)?(i.inputFields.add(a),a.addEventListener("keydown",o)):console.warn("Unsupported input type.",a))}}},_submit(e){const t=m.get(e);let i=!0;if(t.inputFields.forEach((e=>{e.required&&(""===e.value.trim()?(r.default.innerError(e,s.get("wcf.global.form.error.empty")),i=!1):r.default.innerError(e,!1))})),i){const t=_.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(e){e.preventDefault();const t=m.get(p);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(p),!1):(this.close(p),!0)},_closeOnBackdrop(e){e.target===h&&(n.stringToBool(h.getAttribute("close-on-click"))?this._close(e):e.preventDefault())},close(e){e=this._getDialogId(e);let t=m.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");t.dialog.setAttribute("aria-hidden","true");const i=document.activeElement;i.closest(".dialogContainer")===t.dialog&&i.blur(),"function"==typeof t.onClose&&t.onClose(e),p=null;for(let e=0;e<h.childElementCount;e++){const t=h.children[e];if(!n.stringToBool(t.getAttribute("aria-hidden"))){p=t.dataset.id||"";break}}a.pageOverlayClose(),null===p?(h.setAttribute("aria-hidden","true"),h.dataset.closeOnClick="false",t.closable&&window.removeEventListener("keyup",b)):(t=m.get(p),h.dataset.closeOnClick=t.backdropCloseOnClick?"true":"false"),"desktop"!==l.platform()&&a.scrollEnable()},getDialog(e){return m.get(this._getDialogId(e))},isOpen(e){const t=this.getDialog(e);return void 0!==t&&"false"===t.dialog.getAttribute("aria-hidden")},destroy(e){if("object"!=typeof e)throw new TypeError("Expected the callback object as parameter.");if(g.has(e)){const t=g.get(e).id;this.isOpen(t)&&this.close(t),m.has(t)&&(m.get(t).dialog.remove(),m.delete(t)),g.delete(e)}},_getDialogId(e){if("object"==typeof e){const t=g.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:()=>({})}})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,i,n){"use strict";function o(e){if(!a.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return a.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleDropdown=t.registerCallback=t.getDropdownMenu=t.init=void 0,n=i.__importDefault(n);const a=new Map;let r=0;t.init=function(e,t){if(a.has(e))return;const i=document.createElement("div");i.id="reusableDropdownGhost"+r++,n.default.initFragment(i,t),a.set(e,i.id)},t.getDropdownMenu=function(e){return n.default.getDropdownMenu(o(e))},t.registerCallback=function(e,t){n.default.registerCallback(o(e),t)},t.toggleDropdown=function(e,t){n.default.toggleDropdown(o(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Abstract",["require","exports","tslib","../../../Core","../../../Environment","../../../Event/Handler","../../../Language","../../../Dom/Traverse","../../Screen"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);const c=document.getElementById("pageContainer");let d="";class u{constructor(e,t,i){if(this.activeList=[],this.depth=0,this.enabled=!0,this.items=new Map,this.removeActiveList=!1,"packageInstallationSetup"===document.body.dataset.template)return;this.eventIdentifier=e,this.menu=document.getElementById(t);const n=this.open.bind(this);this.button=document.querySelector(i),this.button.addEventListener("click",n),this.initItems(),this.initHeader(),a.add(this.eventIdentifier,"open",n),a.add(this.eventIdentifier,"close",this.close.bind(this)),a.add(this.eventIdentifier,"updateButtonState",this.updateButtonState.bind(this)),this.menu.addEventListener("animationend",(()=>{this.menu.classList.contains("open")||this.menu.querySelectorAll(".menuOverlayItemList").forEach((e=>{e.classList.remove("active","hidden")}))})),this.menu.children[0].addEventListener("transitionend",(()=>{if(this.menu.classList.add("allowScroll"),this.removeActiveList){this.removeActiveList=!1;const e=this.activeList.pop();e&&e.classList.remove("activeList")}}));const r=document.createElement("div");r.className="menuOverlayMobileBackdrop",r.addEventListener("click",this.close.bind(this)),this.menu.insertAdjacentElement("afterend",r),this.menu.parentElement.insertBefore(r,this.menu.nextSibling),this.updateButtonState(),"android"===o.platform()&&this.initializeAndroid()}open(e){return!!this.enabled&&(e instanceof Event&&e.preventDefault(),this.menu.classList.add("open"),this.menu.classList.add("allowScroll"),this.menu.children[0].classList.add("activeList"),l.scrollDisable(),c.classList.add("menuOverlay-"+this.menu.id),l.pageOverlayOpen(),!0)}close(e){return e instanceof Event&&e.preventDefault(),!!this.menu.classList.contains("open")&&(this.menu.classList.remove("open"),l.scrollEnable(),l.pageOverlayClose(),c.classList.remove("menuOverlay-"+this.menu.id),!0)}enable(){this.enabled=!0}disable(){this.enabled=!1,this.close()}initializeAndroid(){let e;switch(this.menu.id){case"pageUserMenuMobile":e="right";break;case"pageMainMenuMobile":e="left";break;default:return}const t=this.menu.nextElementSibling;let i;document.addEventListener("touchstart",(t=>{const o=t.touches;let a,r;const s=this.menu.classList.contains("open");if("left"===e?(a=!s&&o[0].clientX<20,r=s&&Math.abs(this.menu.offsetWidth-o[0].clientX)<20):(a=s&&Math.abs(document.body.clientWidth-this.menu.offsetWidth-o[0].clientX)<20,r=!s&&document.body.clientWidth-o[0].clientX<20),o.length>1)d&&n.triggerEvent(document,"touchend");else if(!d&&(a||r)){if(l.pageOverlayIsActive()){if(!c.classList.contains(`menuOverlay-${this.menu.id}`))return}document.documentElement.classList.contains("redactorActive")||(i={x:o[0].clientX,y:o[0].clientY},a&&(d="left"),r&&(d="right"))}})),document.addEventListener("touchend",(n=>{if(!d||!i)return;if(!this.menu.classList.contains("open"))return i=void 0,void(d="");let o;o=n?n.changedTouches[0].clientX:i.x,this.menu.classList.add("androidMenuTouchEnd"),this.menu.style.removeProperty("transform"),t.style.removeProperty(e),this.menu.addEventListener("transitionend",(()=>{this.menu.classList.remove("androidMenuTouchEnd")}),{once:!0}),"left"===e?("left"===d&&o<i.x+100&&this.close(),"right"===d&&o<i.x-100&&this.close()):("left"===d&&o>i.x+100&&this.close(),"right"===d&&o>i.x-100&&this.close()),i=void 0,d=""})),document.addEventListener("touchmove",(n=>{if(!d||!i)return;const o=n.touches;let a=!1;"left"===d&&(a=o[0].clientX>i.x+5),"right"===d&&(a=o[0].clientX<i.x-5);const r=Math.abs(o[0].clientY-i.y)>20;let s=this.menu.classList.contains("open");if(s||!a||r||(this.open(),s=!0),s){let i=o[0].clientX;"right"===e&&(i=document.body.clientWidth-i),i>this.menu.offsetWidth&&(i=this.menu.offsetWidth),i<0&&(i=0);const n=("left"===e?1:-1)*(i-this.menu.offsetWidth);this.menu.style.setProperty("transform",`translateX(${n}px)`),t.style.setProperty(e,Math.min(this.menu.offsetWidth,i).toString()+"px")}}))}initItems(){this.menu.querySelectorAll(".menuOverlayItemLink").forEach((e=>{this.initItem(e)}))}initItem(e){const t=e.parentElement,i=t.dataset.more;if(i)return void e.addEventListener("click",(n=>{n.preventDefault(),n.stopPropagation(),a.fire(this.eventIdentifier,"more",{handler:this,identifier:i,item:e,parent:t})}));const n=e.nextElementSibling;if(null===n)return;if("OL"!==n.nodeName&&n.classList.contains("menuOverlayItemLinkIcon")){const i=document.createElement("span");for(i.className="menuOverlayItemWrapper",t.insertBefore(i,e),i.appendChild(e);i.nextElementSibling;)i.appendChild(i.nextElementSibling);return}const o="#"!==e.href,r=t.parentElement;let l=n.dataset.title;this.items.set(e,{itemList:n,parentItemList:r}),l||(l=s.childByClass(e,"menuOverlayItemTitle").textContent,n.dataset.title=l);const c=this.showItemList.bind(this,e);if(o){const i=document.createElement("span");i.className="menuOverlayItemWrapper",t.insertBefore(i,e),i.appendChild(e);const n=document.createElement("a");n.href="#",n.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),n.innerHTML='<span class="icon icon24 fa-angle-right"></span>',n.addEventListener("click",c),i.appendChild(n)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener("click",c);const d=document.createElement("li");d.className="menuOverlayHeader";const u=document.createElement("span");u.className="menuOverlayItemWrapper";const h=document.createElement("a");h.href="#",h.className="menuOverlayItemLink menuOverlayBackLink",h.textContent=r.dataset.title||"",h.addEventListener("click",this.hideItemList.bind(this,e));const p=document.createElement("a");if(p.href="#",p.className="menuOverlayItemLinkIcon",p.innerHTML='<span class="icon icon24 fa-times"></span>',p.addEventListener("click",this.close.bind(this)),u.appendChild(h),u.appendChild(p),d.appendChild(u),n.insertBefore(d,n.firstElementChild),!d.nextElementSibling.classList.contains("menuOverlayTitle")){const e=document.createElement("li");e.className="menuOverlayTitle";const t=document.createElement("span");t.textContent=l,e.appendChild(t),n.insertBefore(e,d.nextElementSibling)}}initHeader(){const e=document.createElement("li");e.className="menuOverlayHeader";const t=document.createElement("span");t.className="menuOverlayItemWrapper",e.appendChild(t);const i=document.createElement("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);const n=document.createElement("span");n.className="menuOverlayLogo";const o=this.menu.dataset.pageLogo;n.style.setProperty("background-image",`url("${o}")`,""),i.appendChild(n);const a=document.createElement("a");a.href="#",a.className="menuOverlayItemLinkIcon",a.innerHTML='<span class="icon icon24 fa-times"></span>',a.addEventListener("click",this.close.bind(this)),t.appendChild(a);const r=s.childByClass(this.menu,"menuOverlayItemList");r.insertBefore(e,r.firstElementChild)}hideItemList(e,t){t instanceof Event&&t.preventDefault(),this.menu.classList.remove("allowScroll"),this.removeActiveList=!0;this.items.get(e).parentItemList.classList.remove("hidden"),this.updateDepth(!1)}showItemList(e,t){t.preventDefault();const i=this.items.get(e),o=i.itemList.dataset.load;if(o&&!n.stringToBool(e.dataset.loaded||"")){const e=t.currentTarget.firstElementChild;return e.classList.contains("fa-angle-right")&&(e.classList.remove("fa-angle-right"),e.classList.add("fa-spinner")),void a.fire(this.eventIdentifier,"load_"+o)}this.menu.classList.remove("allowScroll"),i.itemList.classList.add("activeList"),i.parentItemList.classList.add("hidden"),this.activeList.push(i.itemList),this.updateDepth(!0)}updateDepth(e){this.depth+=e?1:-1;let t=-100*this.depth;"rtl"===r.get("wcf.global.pageDirection")&&(t*=-1);this.menu.children[0].style.setProperty("transform",`translateX(${t}%)`,"")}updateButtonState(){let e=!1;const t=this.menu.querySelector(".menuOverlayItemList");this.menu.querySelectorAll(".badgeUpdate").forEach((i=>{~~i.textContent>0&&i.closest(".menuOverlayItemList")===t&&(e=!0)})),this.button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}}return n.enableLegacyInheritance(u),u})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","../../../Core","../../../Dom/Util","../../../Language","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(){super("com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),this.hasItems=!1,this.title=document.getElementById("pageMainMenuMobilePageOptionsTitle"),null!==this.title&&(this.navigationList=document.querySelector(".jsPageNavigationIcons")),this.button.setAttribute("aria-label",a.get("wcf.menu.page")),this.button.setAttribute("role","button")}open(e){if(!super.open(e))return!1;if(null===this.title)return!0;if(this.hasItems=this.navigationList&&this.navigationList.childElementCount>0,this.hasItems){for(;this.navigationList.childElementCount;){const e=this.navigationList.children[0];e.classList.add("menuOverlayItem","menuOverlayItemOption"),e.addEventListener("click",(e=>{e.stopPropagation(),this.close()}));const t=e.children[0];t.classList.add("menuOverlayItemLink"),t.classList.add("box24"),t.children[1].classList.remove("invisible"),t.children[1].classList.add("menuOverlayItemTitle"),this.title.insertAdjacentElement("afterend",e)}o.default.show(this.title)}else o.default.hide(this.title);return!0}close(e){if(!super.close(e))return!1;if(this.hasItems){o.default.hide(this.title);let e=this.title.nextElementSibling;for(;e&&e.classList.contains("menuOverlayItemOption");){e.classList.remove("menuOverlayItem","menuOverlayItemOption"),e.removeEventListener("click",(e=>{e.stopPropagation(),this.close()}));const t=e.children[0];t.classList.remove("menuOverlayItemLink"),t.classList.remove("box24"),t.children[1].classList.add("invisible"),t.children[1].classList.remove("menuOverlayItemTitle"),this.navigationList.appendChild(e),e=e.nextElementSibling}}return!0}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","../../../Core","../../../Event/Handler","../../../Language","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(){const e=document.querySelector("#pageUserMenuMobile > .menuOverlayItemList");if(1===e.childElementCount&&e.children[0].classList.contains("menuOverlayTitle")){document.querySelector("#pageHeader .userPanel").classList.add("hideUserPanel")}else super("com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),o.add("com.woltlab.wcf.userMenu","updateBadge",(e=>this.updateBadge(e))),this.button.setAttribute("aria-label",a.get("wcf.menu.user")),this.button.setAttribute("role","button")}close(e){if(void 0===this.menu)return!1;const t=window.WCF.Dropdown.Interactive.Handler.getOpenDropdown();return t?(e&&(e.preventDefault(),e.stopPropagation()),t.close(),!0):super.close(e)}updateBadge(e){this.menu.querySelectorAll(".menuOverlayItemBadge").forEach((t=>{if(t.dataset.badgeIdentifier===e.identifier){let i=t.querySelector(".badge");e.count?(null===i&&(i=document.createElement("span"),i.className="badge badgeUpdate",t.appendChild(i)),i.textContent=e.count.toString()):null!==i&&i.remove(),this.updateButtonState()}}))}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","../Core","../Dom/Change/Listener","../Environment","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";function p(){B=!0,function(){const e=document.getElementById("pageHeaderSearch"),t=document.getElementById("pageHeaderSearchInput");let i=null;r.add("com.woltlab.wcf.MainMenuMobile","more",(n=>{if("com.woltlab.wcf.search"===n.identifier){n.handler.close(),"ios"===a.platform()&&(i=document.body.scrollTop,h.scrollDisable());const o=document.getElementById("pageHeader");e.style.setProperty("top",`${o.offsetHeight}px`,""),e.classList.add("open"),t.focus(),"ios"===a.platform()&&(document.body.scrollTop=0)}})),document.getElementById("main").addEventListener("click",(()=>{e&&e.classList.remove("open"),"ios"===a.platform()&&i&&(h.scrollEnable(),document.body.scrollTop=i,i=null)}))}(),m(),f(),P&&(q=new d.default,O=new u.default),l.default.add("WoltLabSuite/Core/Ui/Mobile",g),o.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{m(),f()}))}function m(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const i=document.createElement("a");i.className="dropdownLabel";const n=document.createElement("span");n.className="icon icon24 fa-ellipsis-v",i.appendChild(n),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(i,e.firstChild)}))}function f(){document.querySelectorAll(".message").forEach((e=>{if(N.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const i=e.querySelector(".messageQuickOptions");i&&t.childElementCount&&(i.classList.add("active"),i.addEventListener("click",(n=>{const o=n.target;B&&h.is("screen-sm-down")&&"LABEL"!==o.nodeName&&"INPUT"!==o.nodeName&&(n.preventDefault(),n.stopPropagation(),function(e,t,i){if(null===M)M=document.createElement("ul"),M.className="dropdownMenu",c.init("com.woltlab.wcf.jsMobileNavigation",M);else if(M.classList.contains("dropdownOpen")&&(w(),T===e))return;M.innerHTML="",l.default.execute(),C(i);const n=i.previousElementSibling;if(n&&n.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",M.appendChild(e),C(n)}s.set(M,t,{horizontal:"right",allowFlip:"vertical"}),M.classList.add("dropdownOpen"),T=e}(e,i,t))})))}N.add(e)}))}function g(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),B&&M&&w()}function _(){U=!0}function b(){U=!1,H.forEach((function(e){e.classList.remove("open")}))}function v(){H.forEach((function(e){e.addEventListener("mousedown",(function(t){U&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),U=!0}function w(){M.classList.remove("dropdownOpen")}function y(){j=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(function(t){j&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const i=e.parentElement,n=t.target;i.contains(n)||n===i||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}))}))}function E(){j=!0}function S(){j=!1}function C(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const i=e.querySelector("span:not(.icon)");t.innerHTML=`<a href="#">${i.textContent}</a>`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():n.triggerEvent(e,"click"),w()})),M.appendChild(t)}))}function L(){B=!0,P&&(q.enable(),O.enable())}function A(){F&&k(F,".messageGroupLink")}function I(){B=!1,P&&(q.disable(),O.disable())}function x(){F&&D(F),M&&w()}function k(e,t){Array.from(e).forEach((e=>{const i=e.parentElement;let n=i.querySelector(".mobileLinkShadow");if(null===n){const o=e.querySelector(t);o.href&&(n=document.createElement("a"),n.className="mobileLinkShadow",n.href=o.href,i.appendChild(n),i.classList.add("mobileLinkShadowContainer"))}}))}function D(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeShadow=t.rebuildShadow=t.disableShadow=t.disable=t.enableShadow=t.enable=t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importDefault(u),h=i.__importStar(h);let M=null,T=null,B=!1,j=!1,P=!1;const N=new WeakSet;let q,O,U=!1,F=null;const H=[];t.setup=function(e){P=e,document.querySelectorAll(".sidebar").forEach((e=>{H.push(e)})),a.touch()&&document.documentElement.classList.add("touch"),"desktop"!==a.platform()&&document.documentElement.classList.add("mobile");const t=document.querySelector(".messageGroupList");t&&(F=t.getElementsByClassName("messageGroup")),h.on("screen-md-down",{match:L,unmatch:I,setup:p}),h.on("screen-sm-down",{match:A,unmatch:x,setup:A}),h.on("screen-md-down",{match:_,unmatch:b,setup:v}),!a.touch()||"ios"!==a.platform()&&"android"!==a.platform()||h.on("screen-lg",{match:E,unmatch:S,setup:y})},t.enable=L,t.enableShadow=A,t.disable=I,t.disableShadow=x,t.rebuildShadow=k,t.removeShadow=D})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language"],(function(e,t,i,n,o){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==f?(e>=300?(h.classList.contains("initiallyHidden")&&h.classList.remove("initiallyHidden"),h.setAttribute("aria-hidden","false")):h.setAttribute("aria-hidden","true"),s(),-1!==f&&p.classList[e<f?"remove":"add"]("scrolledDown"),f=-1):g()}function r(e){e.preventDefault();document.getElementById("top").scrollIntoView({behavior:"smooth"})}function s(){const e=Array.from(u.children).find((e=>"false"===e.getAttribute("aria-hidden")));u.classList[e?"add":"remove"]("active")}function l(){if(m)return;m=!0,p=document.createElement("div"),p.className="pageAction",u=document.createElement("div"),u.className="pageActionButtons",p.appendChild(u),h=function(){const e=document.createElement("a");return e.className="button buttonPrimary pageActionButtonToTop initiallyHidden jsTooltip",e.href="",e.title=o.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='<span class="icon icon32 fa-angle-up"></span>',e.addEventListener("click",r),e}(),p.appendChild(h),document.body.appendChild(p);const e=n.debounce(a,100);window.addEventListener("scroll",(()=>{-1===f&&(f=window.pageYOffset,window.setTimeout((()=>{a(),f=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==f&&(f=-1)}),{passive:!0}),a()}function c(e){const t=d.get(e);if(t){t.parentElement.setAttribute("aria-hidden","true"),s()}}Object.defineProperty(t,"__esModule",{value:!0}),t.show=t.hide=t.remove=t.get=t.has=t.add=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o);const d=new Map;let u,h,p,m=!1,f=-1;const g=n.debounce((()=>{f=-1}),50);t.setup=l,t.add=function(e,t,i){l();const n=document.createElement("div");n.className="pageActionButton",n.dataset.name=e,n.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),n.appendChild(t);let o=null;i&&(o=d.get(i)||null,o&&(o=o.parentElement)),!o&&u.childElementCount&&(o=u.children[0]),o||(o=u.firstChild),u.insertBefore(n,o),p.classList.remove("scrolledDown"),d.set(e,t),n.offsetParent,n.setAttribute("aria-hidden","false"),s()},t.has=function(e){return d.has(e)},t.get=function(e){return d.get(e)},t.remove=function(e){const t=d.get(e);if(void 0!==t){const i=t.parentElement,o=()=>{try{n.stringToBool(i.getAttribute("aria-hidden"))&&(u.removeChild(i),d.delete(e)),i.removeEventListener("transitionend",o)}catch(e){}};i.addEventListener("transitionend",o),c(e)}},t.hide=c,t.show=function(e){const t=d.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),p.classList.remove("scrolledDown"),s()}}})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e){this.containers=new Map,this.isLegacy=!1,this.store=null,this.tabs=new Map,this.container=e}validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=o.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;o.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=a.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const i=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+i+"') exists more than once.");const n=this.containers.get(t);if(void 0===n)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+i+"').");if(n.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+i+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+t+"'] (tab menu id: '"+i+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+i+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEach((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(e){this.tabs.forEach((t=>{if(!e||e.get(t.dataset.name||"")!==t){const e=t.children[0];if(e.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let t=!1;e.addEventListener("touchstart",(()=>{t=!0})),e.addEventListener("touchmove",(()=>{t=!1})),e.addEventListener("touchend",(e=>{t&&(t=!1,e.preventDefault(),this._onClick(e))}))}}}));let t=null;if(!e){const e=l.getIdentifierFromHash();let i;if(""!==e&&(i=this.tabs.get(e),i)){const e=this.container.parentNode;e.classList.contains("tabMenuContainer")&&(t=e)}if(!i){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){i||a.default.isHidden(e)||e.previousElementSibling&&!a.default.isHidden(e.previousElementSibling)||(i=e)})):"string"==typeof e&&"false"!==e&&(i=this.tabs.get(e))}i&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,i,!0));const n=this.container.dataset.store;if(n){const e=document.createElement("input");e.type="hidden",e.name=n,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}}return t}select(t,n,o){if(t=t?t.toString():"",!(n=n||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((i=>{e===t&&(n=i),e++}))}if(!n)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||n.dataset.name||"";const a=this.getActiveTab();let r=null;if(a){const e=a.dataset.name;if(e===t)return;o||s.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:a,tabName:e}),a.classList.remove("active"),r=this.containers.get(a.dataset.name||""),r.classList.remove("active"),r.classList.add("hidden"),this.isLegacy&&(a.classList.remove("ui-state-active"),r.classList.remove("ui-state-active"))}n.classList.add("active");const c=this.containers.get(t);if(c.classList.add("active"),c.classList.remove("hidden"),this.isLegacy&&(n.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this.store&&(this.store.value=t),!o){s.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:n,activeName:t,previous:a,previousName:a?a.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(n),oldTab:e(a),newPanel:e(c),oldPanel:e(r)});let i=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?i+=window.location.hash:i+="#"+t,window.history.replaceState(void 0,"",i)}new Promise(((t,i)=>{e(["../TabMenu"],t,i)})).then(i.__importStar).then((e=>{e.scrollToTab(n)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||a.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}rebuild(){const e=new Map(this.tabs);this.validate(),this.init(e)}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const i=e.children[0];/#([^#]+)$/.exec(i.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,i,n){"use strict";function o(){null!==s&&window.clearTimeout(s),s=window.setTimeout((()=>{null!==a&&a(),window.removeEventListener("scroll",o),a=null,s=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,n=i.__importDefault(n);let a=null,r=null,s=null;t.element=function(e,t){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(null!==a)throw new Error("Cannot scroll to element, a concurrent request is running.");t&&(a=t,window.addEventListener("scroll",o));let i=n.default.offset(e).top;if(null===r){r=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;r="fixed"===t||"static"===t?e.offsetHeight:0}}r>0&&(i<=r?i=0:i-=r);const s=window.pageYOffset;window.scrollTo({left:0,top:i,behavior:"smooth"}),window.setTimeout((()=>{s===window.pageYOffset&&o()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=o.default.identify(e);if(b.has(t))return;let i=new a.default(e);if(!i.validate())return;const n=i.init();if(b.set(t,i),n instanceof HTMLElement){const e=m(n.parentNode.id);e&&(i=e,i.select(n.id,void 0,!0))}const r=document.querySelector("#"+t+" > nav > ul");r.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===r?(r.classList.add("active"),g=r):(r.classList.remove("active"),g=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){i=null,p(e)}let i=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{t.defaultPrevented||e.querySelectorAll("input, select").forEach((e=>{if(!e.checkValidity()){t.preventDefault();const i=m(e.closest(".tabMenuContainer").id),n=e.closest(".tabMenuContent");return i.select(n.dataset.name||""),void l.element(e,(()=>{e.reportValidity()}))}}))}))}}))}function d(e){_=!0,b.forEach((t=>{const i=t.getActiveTab();e?p(i.closest(".menu, .tabMenu")):f(i)}))}function u(){_=!1}function h(e,t,i,n,o,a){(a||t>0)&&(t-=15),i!==(t=t<0?0:Math.min(t,n-o))&&(e.classList.add("enableAnimation"),i<t?e.firstElementChild.style.setProperty("margin-left",i-t+"px",""):e.style.setProperty("padding-left",i-t+"px",""),setTimeout((()=>{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function p(e){if(!_)return;const t=e.clientWidth,i=e.querySelector("ul"),n=i.scrollLeft,o=i.scrollWidth,a=n>0;let r=e.querySelector(".tabMenuOverlayLeft");a?(null===r&&(r=document.createElement("span"),r.className="tabMenuOverlayLeft icon icon24 fa-angle-left",r.addEventListener("click",(()=>{const e=i.clientWidth;h(i,i.scrollLeft-~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.insertBefore(r,e.firstChild)),r.classList.add("active")):null!==r&&r.classList.remove("active");const s=t+n<o;let l=e.querySelector(".tabMenuOverlayRight");s?(null===l&&(l=document.createElement("span"),l.className="tabMenuOverlayRight icon icon24 fa-angle-right",l.addEventListener("click",(()=>{const e=i.clientWidth;h(i,i.scrollLeft+~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function m(e){return b.get(e)}function f(e){if(!_)return;const t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,o=t.scrollWidth;if(i===o)return;const a=e.offsetLeft;let r=!1;a<n&&(r=!0);let s=!1;if(!r){const t=i-(a-n);let o=e.clientWidth;null!==e.nextElementSibling&&(s=!0,o+=20),t<o&&(r=!0)}r&&h(t,a,n,o,i,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToTab=t.getTabMenu=t.setup=void 0,n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l);let g=null,_=!1;const b=new Map;t.setup=function(){c(),b.forEach((e=>{let t=!1;e.getContainers().forEach((i=>{t||null===i.querySelector(".formError")||(t=!0,e.select(i.id))}))})),n.default.add("WoltLabSuite/Core/Ui/TabMenu",c),r.default.add("WoltLabSuite/Core/Ui/TabMenu",(()=>{g&&(g.classList.remove("active"),g=null)})),s.on("screen-sm-down",{match(){d(!1)},unmatch:u,setup(){d(!0)}}),window.addEventListener("hashchange",(()=>{const e=a.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&b.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=a.default.getIdentifierFromHash();e&&window.setTimeout((()=>{const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const i=t.parentNode;let n=i.offsetTop-50;if(n<0&&(n=0),e>n){let e=o.default.offset(i).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=m,t.scrollToTab=f})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Dom/Change/Listener","../Environment","./Alignment"],(function(e,t,i,n,o,a){"use strict";function r(e){const t=e.currentTarget;let i=t.title.trim();""!==i&&(t.dataset.tooltip=i,t.setAttribute("aria-label",i),t.removeAttribute("title")),i=t.dataset.tooltip||"",u.style.removeProperty("top"),u.style.removeProperty("left"),i.length?(u.classList.add("active"),d.textContent=i,a.set(u,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):u.classList.remove("active")}function s(){u.classList.remove("active")}function l(){document.querySelectorAll(".jsTooltip").forEach((e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",s),e.addEventListener("click",s))}))}let c,d,u;Object.defineProperty(t,"__esModule",{value:!0}),t.init=t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),t.setup=function(){"desktop"===o.platform()&&(u=document.createElement("div"),u.id="balloonTooltip",u.classList.add("balloonTooltip"),u.addEventListener("transitionend",(()=>{u.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{u.style.removeProperty(e)}))})),d=document.createElement("span"),d.id="balloonTooltipText",u.appendChild(d),c=document.createElement("span"),c.classList.add("elementPointer"),c.appendChild(document.createElement("span")),u.appendChild(c),document.body.appendChild(u),l(),n.default.add("WoltLabSuite/Core/Ui/Tooltip",l),window.addEventListener("scroll",s))},t.init=l})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o);class a{constructor(){this.elements=new Map}init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const i=e.dataset.link;t=i?e=>{window.location.href=i.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((i=>{i.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,o.default.open(this);const i=e.dataset.pages||"0";this.input.value=i,this.input.max=i,this.input.select(),this.description.textContent=n.get("wcf.page.jumpTo.description").replace(/#pages#/,i)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),o.default.close(this)}_dialogSetup(){const e=`<dl>\n <dt><label for="jsPaginationPageNo">${n.get("wcf.page.jumpTo")}</label></dt>\n <dd>\n <input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny">\n <small></small>\n </dd>\n </dl>\n <div class="formSubmit">\n <button class="buttonPrimary">${n.get("wcf.global.button.submit")}</button>\n </div>`;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:n.get("wcf.global.page.pagination")},source:e}}}let r=null;t.init=function(e,t){(null===r&&(r=new a),r).init(e,t)}})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,i,n,o){"use strict";function a(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.createElement("div");t.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",t),t.appendChild(e);const i=document.createElement("span");i.title=o.get("wcf.global.form.password.button.show"),i.classList.add("button","inputSuffix","jsTooltip"),i.setAttribute("role","button"),i.tabIndex=0,i.setAttribute("aria-hidden","true"),t.appendChild(i);const n=document.createElement("span");n.classList.add("icon","icon16","fa-eye-slash"),i.appendChild(n),i.addEventListener("click",(()=>{r(e,i,n)})),i.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e,i,n))}))}(e)}))}function r(e,t,i){"password"===e.type?(i.classList.add("fa-eye"),i.classList.remove("fa-eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.hide"),e.type="text"):(i.classList.remove("fa-eye"),i.classList.add("fa-eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new WeakSet;t.setup=function(){a(),n.default.add("WoltLabSuite/Core/Ui/Password",(()=>a()))}})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Date/Time/Relative","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Language","./StringUtil","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p,m,f,g,_,b,v){"use strict";function w(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importDefault(h),p=i.__importDefault(p),m=i.__importStar(m),f=i.__importStar(f),g=i.__importStar(g),_=i.__importStar(_),b=i.__importStar(b),v=i.__importStar(v),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=c,t.setup=function(e){e=n.extend({enableMobileMenu:!0},e),u.setupI18n({decimalPoint:d.get("wcf.global.decimalPoint"),thousandsSeparator:d.get("wcf.global.thousandsSeparator")}),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),l.setup(),a.setup(),o.default.init(),p.default.setup(),m.setup(e.enableMobileMenu),g.setup(),h.default.setup(),_.setup(),v.setup(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===l.browser()&&(window.onbeforeunload=()=>{});let t=0;t=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(t),window.jQuery((()=>{f.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==l.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),w(),s.default.add("WoltLabSuite/Core/Bootstrap",(()=>w))}})),define("WoltLabSuite/Core/Controller/Style/Changer",["require","exports","tslib","../../Ajax","../../Language","../../Ui/Dialog"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showDialog=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a);class r{constructor(){document.querySelectorAll(".jsButtonStyleChanger").forEach((e=>{e.addEventListener("click",(e=>this.showDialog(e)))}))}showDialog(e){e.preventDefault(),a.default.open(this)}_dialogSetup(){return{id:"styleChanger",options:{disableContentPadding:!0,title:o.get("wcf.style.changeStyle")},source:{data:{actionName:"getStyleChooser",className:"wcf\\data\\style\\StyleAction"},after:e=>{e.querySelectorAll(".styleList > li").forEach((e=>{e.classList.add("pointer"),e.addEventListener("click",(e=>this.click(e)))}))}}}}click(e){e.preventDefault();const t=e.currentTarget;n.apiOnce({data:{actionName:"changeStyle",className:"wcf\\data\\style\\StyleAction",objectIDs:[t.dataset.styleId]},success:function(){window.location.reload()}})}}let s;t.setup=function(){new r},t.showDialog=function(e){s.showDialog(e)}})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,a,r,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.ajaxApi=t.setContent=t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class c{constructor(){this.activeId="",this.cache=new Map,this.elements=new Map,this.handlers=new Map,this.hoverId="",this.suspended=!1,this.timerEnter=void 0,this.timerLeave=void 0,this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent);const e=document.createElement("span");e.className="elementPointer",e.appendChild(document.createElement("span")),this.popover.appendChild(e),document.body.appendChild(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==r.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((i=>{const n=a.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const r=`${t}-${o}`;i.dataset.cacheId=r,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(r)||this.cache.set(r,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let r=a.default.createFragmentFromHtml(i);if(r.childElementCount||(r=a.default.createFragmentFromHtml("<p>"+i+"</p>")),o.content=r,o.state=2,this.activeId){this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=a.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},i,i)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{pointer:!0,vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){for(let e=0,t=r.length;e<t;e++){const t=r[e];s.has(t)||(t.addEventListener("click",a,{once:!0}),s.add(t))}}function a(e){e.preventDefault();const t=e.currentTarget;t.classList.remove("ignoredUserMessage"),s.delete(t),window.getSelection().removeAllRanges()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importDefault(n);const r=document.getElementsByClassName("ignoredUserMessage"),s=new Set;t.init=function(){o(),n.default.add("WoltLabSuite/Core/Ui/User/Ignore",o)}})),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["require","exports","tslib","../../../Environment","../../../Language","../../Screen"],(function(e,t,i,n,o,a){"use strict";function r(){_=!0,"safari"===n.browser()||u(),window.setTimeout(u,1e3)}function s(){_=!1}function l(e){if(e.preventDefault(),w.length){const e=w.slice(0,3).pop();d(g.clientWidth-(e.offsetLeft+e.clientWidth)),g.lastElementChild===e&&p.classList.remove("active"),m.classList.add("active")}}function c(e){if(e.preventDefault(),v.length){const e=v.slice(-3)[0];d(-1*e.offsetLeft),g.firstElementChild===e&&m.classList.remove("active"),p.classList.add("active")}}function d(e){b=Math.min(b+e,0),f.style.setProperty("margin-left",`${b}px`,"")}function u(){if(!_)return;v=[],w=[];const e=g.clientWidth;(g.scrollWidth>e||b<0)&&Array.from(g.children).forEach((t=>{const i=t.offsetLeft;i<0?v.push(t):i+t.clientWidth>e&&w.push(t)})),m.classList[v.length?"add":"remove"]("active"),p.classList[w.length?"add":"remove"]("active")}function h(){!function(){const e=g.parentElement;p=document.createElement("a"),p.className="mainMenuShowNext",p.href="#",p.innerHTML='<span class="icon icon32 fa-angle-right"></span>',p.setAttribute("aria-hidden","true"),p.addEventListener("click",l),e.appendChild(p),m=document.createElement("a"),m.className="mainMenuShowPrevious",m.href="#",m.innerHTML='<span class="icon icon32 fa-angle-left"></span>',m.setAttribute("aria-hidden","true"),m.addEventListener("click",c),e.insertBefore(m,e.firstChild),f.addEventListener("transitionend",u),window.addEventListener("resize",(()=>{f.style.setProperty("margin-left","0px",""),b=0,u()})),r()}(),g.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const i=document.createElement("button");i.className="visuallyHidden",i.tabIndex=0,i.setAttribute("role","button"),i.setAttribute("aria-label",o.get("wcf.global.button.showMenu")),e.insertBefore(i,t.nextSibling);let n=!1;i.addEventListener("click",(()=>{n=!n,t.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-label",o.get(n?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a);let p,m,f,g,_=!1,b=0,v=[],w=[];t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");g=e,f=t,a.on("screen-lg",{match:r,unmatch:s,setup:h})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class i{constructor(e,t,i){this.userId=e,this.username=t,this.link=i}}let n;return{getLink:()=>n.link,init(e,t,o){if(n)throw new Error("User has already been initialized.");n=new i(e,t,o)},get userId(){return n.userId},get username(){return n.username}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(){this.enableAll=!1,this.knownButtons=new WeakSet,"all"===window.sessionStorage.getItem(`${o.getStoragePrefix()}user-consent`)&&(this.enableAll=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){this.enableAll?this.enableAllExternalMedia():document.querySelectorAll(".jsButtonMessageUserConsentEnable").forEach((e=>{this.knownButtons.has(e)||(this.knownButtons.add(e),e.addEventListener("click",(e=>this.click(e))))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),s.default.userId?n.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${o.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){const t=atob(e.dataset.payload);r.default.insertHtml(t,e,"before"),e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let c;t.init=function(){c||(c=new l)}})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Controller/Style/Changer","./Controller/Popover","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),t.setup=function(e){e.backgroundQueue.url=window.WSC_API_URL+e.backgroundQueue.url.substr(window.WCF_PATH.length),o.setup({enableMobileMenu:!0}),l.init(),e.styleChanger&&a.setup(),e.enableUserPopover&&(r.init({className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user"}),r.init({attributeName:"data-user-id",className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user.deprecated"})),n.setUrl(e.backgroundQueue.url),(Math.random()<.1||e.backgroundQueue.force)&&n.invoke(),globalThis.COMPILER_TARGET_DEFAULT&&s.init(),c.init()}})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function i(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyElementTextToClipboard=t.copyTextToClipboard=void 0,t.copyTextToClipboard=i,t.copyElementTextToClipboard=async function(e){return i(e.textContent)}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function i(e,t,i){const n={r:0,g:0,b:0},o=Math.floor(e/60),a=e/60-o,r=(i/=100)*(1-(t/=100)),s=i*(1-t*a),l=i*(1-t*(1-a));if(0==t)n.r=n.g=n.b=i;else switch(o){case 1:n.r=s,n.g=i,n.b=r;break;case 2:n.r=r,n.g=i,n.b=l;break;case 3:n.r=r,n.g=s,n.b=i;break;case 4:n.r=l,n.g=r,n.b=i;break;case 5:n.r=i,n.g=r,n.b=s;break;case 0:case 6:n.r=i,n.g=l,n.b=r}return{r:Math.round(255*n.r),g:Math.round(255*n.g),b:Math.round(255*n.b)}}function n(e,t,i){let n,o;e/=255,t/=255,i/=255;const a=Math.max(Math.max(e,t),i),r=Math.min(Math.min(e,t),i),s=a-r;if(n=0,a!==r){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,{h:Math.round(n),s:Math.round(100*o),v:Math.round(100*a)}}function o(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function a(e,t,i){const n="0123456789ABCDEF";return void 0===t&&/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString())&&(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.rgbToHex=t.hexToRgb=t.rgbToHsv=t.hsvToRgb=void 0,t.hsvToRgb=i,t.rgbToHsv=n,t.hexToRgb=o,t.rgbToHex=a,window.__wcf_bc_colorUtil={hexToRgb:o,hsvToRgb:i,rgbToHex:a,rgbToHsv:n}})),define("WoltLabSuite/Core/Dictionary",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._dictionary=new Map}set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,i=e.length;t<i;t++){e[t].forEach(((e,t)=>this.set(t,e)))}}toObject(){const e={};return this._dictionary.forEach(((t,i)=>e[i]=t)),e}static fromObject(e){const t=new o;return Object.keys(e).forEach((i=>{t.set(i,e[i])})),t}get size(){return this._dictionary.size}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,i,n){"use strict";function o(e){return r.has(e)?"."+r.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,n=i.__importStar(n);const a=new Map(Object.entries({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"})),r=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt"}));t.formatFilesize=function(e,t=2){let i="Byte";return e>=1e3&&(e/=1e3,i="kB"),e>=1e3&&(e/=1e3,i="MB"),e>=1e3&&(e/=1e3,i="GB"),e>=1e3&&(e/=1e3,i="TB"),n.formatNumeric(e,-t)+" "+i},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const i=e.substr(t+1);if(a.has(i))return a.get(i)}return""},t.getExtensionByMimeType=o,t.blobToFile=function(e,t){const i=o(e.type);return new File([e],t+i,{type:e.type})}})),define("WoltLabSuite/Core/List",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._set=new Set}add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/ObjectMap",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._map=new WeakMap}set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function i(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");n.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const n=new Map;t.add=i,t.addObject=function(e){Object.keys(e).forEach((t=>i(t,e[t])))},t.get=function(e){return!!n.has(e)&&n.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,i,n){this.type=e,this.content=t,this.alias=i,this.length=0|(n||"").length}function i(e,n,r,s,l,c){var d,h,p,m,f,g,_,b,v,w,y,E,S,C,L,A,I,x,k,D,M,T,B,j,P;for(d in r)if(r.hasOwnProperty(d)&&r[d])for(h=r[d],h=Array.isArray(h)?h:[h],p=0;p<h.length;++p){if(c&&c.cause==d+","+p)return;for(f=(m=h[p]).inside,g=!!m.lookbehind,_=!!m.greedy,b=0,v=m.alias,_&&!m.pattern.global&&(w=m.pattern.toString().match(/[imsuy]*$/)[0],m.pattern=RegExp(m.pattern.source,w+"g")),y=m.pattern||m,E=s.next,S=l;E!==n.tail&&!(c&&S>=c.reach);S+=E.value.length,E=E.next){if(C=E.value,n.length>e.length)return;if(!(C instanceof t)){if(L=1,_&&E!=n.tail.prev){if(y.lastIndex=S,!(A=y.exec(e)))break;for(I=A.index+(g&&A[1]?A[1].length:0),x=A.index+A[0].length,k=S,k+=E.value.length;I>=k;)k+=(E=E.next).value.length;if(S=k-=E.value.length,E.value instanceof t)continue;for(D=E;D!==n.tail&&(k<x||"string"==typeof D.value);D=D.next)L++,k+=D.value.length;L--,C=e.slice(S,k),A.index-=S}else y.lastIndex=0,A=y.exec(C);A&&(g&&(b=A[1]?A[1].length:0),x=(I=A.index+b)+(M=A[0].slice(b)).length,T=C.slice(0,I),B=C.slice(x),j=S+C.length,c&&j>c.reach&&(c.reach=j),P=E.prev,T&&(P=o(n,P,T),S+=T.length),a(n,P,L),E=o(n,P,new t(d,f?u.tokenize(M,f):M,v,M)),B&&o(n,E,B),L>1&&i(e,n,r,E.prev,S,{cause:d+","+p,reach:j}))}}}}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 a(e,t,i){var n,o=t.next;for(n=0;n<i&&o!==e.tail;n++)o=o.next;t.next=o,o.prev=t,e.length-=n}function r(){u.manual||u.highlightAll()}var s,l,c=/\blang(?:uage)?-([\w-]+)\b/i,d=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,"&").replace(/</g,"<").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:++d}),e.__id},clone:function e(t,i){var n,o,a;switch(i=i||{},u.util.type(t)){case"Object":if(o=u.util.objId(t),i[o])return i[o];for(a in n={},i[o]=n,t)t.hasOwnProperty(a)&&(n[a]=e(t[a],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&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){var e,t,i;if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(n){if(e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(n.stack)||[])[1])for(i in t=document.getElementsByTagName("script"))if(t[i].src==e)return t[i];return null}},isActive:function(e,t,i){for(var n,o="no-"+t;e;){if((n=e.classList).contains(t))return!0;if(n.contains(o))return!1;e=e.parentElement}return!!i}},languages:{extend:function(e,t){var i,n=u.util.clone(u.languages[e]);for(i in t)n[i]=t[i];return n},insertBefore:function(e,t,i,n){var o,a,r,s,l;for(r in o=(n=n||u.languages)[e],a={},o)if(o.hasOwnProperty(r)){if(r==t)for(s in i)i.hasOwnProperty(s)&&(a[s]=i[s]);i.hasOwnProperty(r)||(a[r]=o[r])}return l=n[e],n[e]=a,u.languages.DFS(u.languages,(function(t,i){i===l&&t!=e&&(this[t]=a)})),a},DFS:function e(t,i,n,o){var a,r,s,l;for(r in o=o||{},a=u.util.objId,t)t.hasOwnProperty(r)&&(i.call(t,r,t[r],n||r),s=t[r],"Object"!==(l=u.util.type(s))||o[a(s)]?"Array"!==l||o[a(s)]||(o[a(s)]=!0,e(s,i,r,o)):(o[a(s)]=!0,e(s,i,null,o)))}},plugins:{},highlightAll:function(e,t){u.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,i){var n,o,a={callback:i,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};for(u.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),u.hooks.run("before-all-elements-highlight",a),n=0;o=a.elements[n++];)u.highlightElement(o,!0===t,a.callback)},highlightElement:function(t,i,n){function o(e){s.highlightedCode=e,u.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,u.hooks.run("after-highlight",s),u.hooks.run("complete",s),n&&n.call(s.element)}var a,r,s,l,d=u.util.getLanguage(t),h=u.languages[d];if(t.className=t.className.replace(c,"").replace(/\s+/g," ")+" language-"+d,(a=t.parentElement)&&"pre"===a.nodeName.toLowerCase()&&(a.className=a.className.replace(c,"").replace(/\s+/g," ")+" language-"+d),r=t.textContent,s={element:t,language:d,grammar:h,code:r},u.hooks.run("before-sanity-check",s),!s.code)return u.hooks.run("complete",s),void(n&&n.call(s.element));u.hooks.run("before-highlight",s),s.grammar?i&&e.Worker?((l=new Worker(u.filename)).onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):o(u.highlight(s.code,s.grammar,s.language)):o(u.util.encode(s.code))},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 a,r,s=t.rest;if(s){for(a in s)t[a]=s[a];delete t.rest}return o(r=new n,r.head,e),i(e,r,t,r.head,0),function(e){for(var t=[],i=e.head.next;i!==e.tail;)t.push(i.value),i=i.next;return t}(r)},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,n,o=u.hooks.all[e];if(o&&o.length)for(i=0;n=o[i++];)n(t)}},Token:t};return e.Prism=u,t.stringify=function e(t,i){var n,o,a,r,s;if("string"==typeof t)return t;if(Array.isArray(t))return n="",t.forEach((function(t){n+=e(t,i)})),n;for(s in o={type:t.type,content:e(t.content,i),tag:"span",classes:["token",t.type],attributes:{},language:i},(a=t.alias)&&(Array.isArray(a)?Array.prototype.push.apply(o.classes,a):o.classes.push(a)),u.hooks.run("wrap",o),r="",o.attributes)r+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+r+">"+o.content+"</"+o.tag+">"},e.document?((s=u.util.currentScript())&&(u.filename=s.src,s.hasAttribute("data-manual")&&(u.manual=!0)),u.manual||("loading"===(l=document.readyState)||"interactive"===l&&s&&s.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)),u):e.addEventListener?(u.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var i=JSON.parse(t.data),n=i.language,o=i.code,a=i.immediateClose;e.postMessage(u.highlight(o,u.languages[n],n)),a&&e.close()}),!1),u):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",o++),n.appendChild(e),e}for(var i,n=document.createDocumentFragment(),o=1,a=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,(function(){return NodeFilter.FILTER_ACCEPT}),!1),r=t();i=a.nextNode();)i.data.split(/\r?\n/).forEach((function(n,o){var a,s,l;for(o>=1&&(r.appendChild(document.createTextNode("\n")),r=t()),a=document.createTextNode(n),s=i.parentNode;s!==e;)(l=s.cloneNode(!1)).appendChild(a),a=l,s=s.parentNode;r.appendChild(a)}));return n},Prism})),define("WoltLabSuite/Core/Upload",["require","exports","tslib","./Ajax/Request","./Core","./Dom/Change/Listener","./Language"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);class s{constructor(e,t,i){if(this._button=document.createElement("p"),this._fileElements=[],this._fileUpload=document.createElement("input"),this._internalFileId=0,this._multiFileUploadIds=[],!(i=i||{}).className)throw new Error("Missing class name.");this._options=o.extend({action:"upload",multiple:!1,acceptableFiles:null,name:"__files[]",singleFileRequests:!1,url:`index.php?ajax-upload/&t=${window.SECURITY_TOKEN}`},i),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url);const n=document.getElementById(e);if(null===n)throw new Error(`Element id '${e}' is unknown.`);this._buttonContainer=n;const a=document.getElementById(t);if(null===a)throw new Error(`Element id '${t}' is unknown.`);if(this._target=a,i.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName&&"TBODY"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._createButton()}_createButton(){this._fileUpload=document.createElement("input"),this._fileUpload.type="file",this._fileUpload.name=this._options.name,this._options.multiple&&(this._fileUpload.multiple=!0),null!==this._options.acceptableFiles&&(this._fileUpload.accept=this._options.acceptableFiles.join(",")),this._fileUpload.addEventListener("change",(e=>this._upload(e))),this._button=document.createElement("p"),this._button.className="button uploadButton",this._button.setAttribute("role","button"),this._fileUpload.addEventListener("focus",(()=>{this._fileUpload.classList.contains("focus-visible")&&this._button.classList.add("active")})),this._fileUpload.addEventListener("blur",(()=>{this._button.classList.remove("active")}));const e=document.createElement("span");e.textContent=r.get("wcf.global.button.upload"),this._button.appendChild(e),this._button.insertAdjacentElement("afterbegin",this._fileUpload),this._insertButton(),a.default.trigger()}_createFileElement(e){const t=document.createElement("progress");let i;switch(t.max=100,this._target.nodeName){case"OL":case"UL":return i=document.createElement("li"),i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i;case"TBODY":return this._createFileTableRow(e);default:return i=document.createElement("p"),i.appendChild(t),this._target.appendChild(i),i}}_createFileElements(e){if(!e.length)return null;const t=[];Array.from(e).forEach((e=>{const i=this._createFileElement(e);i.classList.contains("uploadFailed")||(i.dataset.filename=e.name,i.dataset.internalFileId=(this._internalFileId++).toString(),t.push(i))}));const i=this._fileElements.length;return this._fileElements.push(t),a.default.trigger(),i}_createFileTableRow(e){throw new Error("Has to be implemented in subclass.")}_failure(e,t,i,n,o){return!0}_getParameters(){return{}}_getFormData(){return{}}_insertButton(){this._buttonContainer.insertAdjacentElement("afterbegin",this._button)}_progress(e,t){const i=Math.round(t.loaded/t.total*100);this._fileElements[e].forEach((e=>{const t=e.querySelector("progress");t&&(t.value=i)}))}_removeButton(){this._button.remove(),a.default.trigger()}_success(e,t,i,n,o){}_upload(e,t,i){this._target.querySelectorAll(".uploadFailed").forEach((e=>e.remove()));let n=null,o=[];if(t)o.push(t);else if(i){let e="";switch(i.type){case"image/jpeg":e="jpg";break;case"image/gif":e="gif";break;case"image/png":e="png";break;case"image/webp":e="webp"}o.push({name:`pasted-from-clipboard.${e}`})}else o=Array.from(this._fileUpload.files);return o.length&&this.validateUpload(o)&&(this._options.singleFileRequests?(n=[],o.forEach((e=>{const t=this._uploadFiles([e],i);1!==o.length&&this._multiFileUploadIds.push(t),n.push(t)}))):n=this._uploadFiles(o,i)),this._removeButton(),this._createButton(),n}validateUpload(e){return!0}_uploadFiles(e,t){function i(e,t){null!==e&&(t=t||"",Object.entries(e).forEach((([e,n])=>{if("object"==typeof n){i(n,0===t.length?e:`${t}[${e}]`)}else{const i=0===t.length?e:`${t}[${e}]`;a.append(i,n)}})))}const o=this._createFileElements(e);if(!this._fileElements[o].length)return null;const a=new FormData;for(let i=0,n=e.length;i<n;i++)if(this._fileElements[o][i]){const n=this._fileElements[o][i].dataset.internalFileId;t?a.append(`__files[${n}]`,t,e[i].name):a.append(`__files[${n}]`,e[i])}a.append("actionName",this._options.action),a.append("className",this._options.className),"upload"===this._options.action&&a.append("interfaceName","wcf\\data\\IUploadAction"),i(this._getParameters(),"parameters"),i(this._getFormData());return new n.default({data:a,contentType:!1,failure:this._failure.bind(this,o),silent:!0,success:this._success.bind(this,o),uploadProgress:this._progress.bind(this,o),url:this._options.url,withCredentials:!0}).sendRequest(),o}hasPendingUploads(){return void 0!==this._fileElements.find((e=>e.find((e=>null!==e.querySelector("progress")))))}uploadBlob(e){return this._upload(null,null,e)}uploadFile(e){return this._upload(null,e)}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/prism-meta",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={markup:{title:"Markup",file:"markup"},html:{title:"HTML",file:"markup"},xml:{title:"XML",file:"markup"},svg:{title:"SVG",file:"markup"},mathml:{title:"MathML",file:"markup"},ssml:{title:"SSML",file:"markup"},atom:{title:"Atom",file:"markup"},rss:{title:"RSS",file:"markup"},css:{title:"CSS",file:"css"},clike:{title:"C-like",file:"clike"},javascript:{title:"JavaScript",file:"javascript"},abap:{title:"ABAP",file:"abap"},abnf:{title:"ABNF",file:"abnf"},actionscript:{title:"ActionScript",file:"actionscript"},ada:{title:"Ada",file:"ada"},agda:{title:"Agda",file:"agda"},al:{title:"AL",file:"al"},antlr4:{title:"ANTLR4",file:"antlr4"},apacheconf:{title:"Apache Configuration",file:"apacheconf"},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/Ajax/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ajax/Jsonp",["require","exports","tslib","../Core"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.send=void 0,n=i.__importStar(n),t.send=function(e,t,i,o){if(0===(e="string"==typeof e?e.trim():"").length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof t)throw new TypeError("Expected a valid callback function for parameter 'success'.");o=n.extend({parameterName:"callback",timeout:10},o||{});const a="wcf_jsonp_"+n.getUuid().replace(/-/g,"").substr(0,8),r=document.createElement("script"),s=window.setTimeout((()=>{"function"==typeof i&&i(),window[a]=void 0,r.remove()}),1e3*(~~o.timeout||10));window[a]=(...e)=>{window.clearTimeout(s),t(...e),window[a]=void 0,r.remove()},e+=-1===e.indexOf("?")?"?":"&",e+=o.parameterName+"="+a,r.async=!0,r.src=e,document.head.appendChild(r)}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";function o(){clearTimeout(s),r.classList.remove("active"),null!==c&&c(),l=!1}Object.defineProperty(t,"__esModule",{value:!0}),t.show=void 0,n=i.__importStar(n);let a,r,s,l=!1,c=null,d=!1;t.show=function(e,t,i){l||(l=!0,d||(d=!0,r=document.createElement("div"),r.id="systemNotification",a=document.createElement("p"),a.addEventListener("click",o),r.appendChild(a),document.body.appendChild(r)),c="function"==typeof t?t:null,a.className=i||"success",a.textContent=n.get(e||"wcf.global.success"),r.classList.add("active"),s=setTimeout(o,2e3))}})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=void 0,t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let i,n=document.createElement("span");for(;i=t.nextNode();){const t=i,o=t.data.split(/\r?\n/);for(let i=0,a=o.length;i<a;i++){const a=o[i];i>=1&&(n.appendChild(document.createTextNode("\n")),yield n,n=document.createElement("span"));let r=document.createTextNode(a),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(r),r=e,s=s.parentNode}n.appendChild(r)}}yield n}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper","../prism-meta"],(function(e,t,i,n,o,a,r,s,l){"use strict";async function c(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importDefault(l);class d{constructor(e){var t;this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=null===(t=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e))))||void 0===t?void 0:t.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new d(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("span");t.tabIndex=0,t.setAttribute("role","button"),t.className="icon icon24 fa-files-o pointer jsTooltip",t.setAttribute("title",n.get("wcf.message.bbcode.code.copy"));const i=async()=>{await o.copyElementTextToClipboard(this.codeContainer),a.show(n.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",i),t.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i())})),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");if(!l.default[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((t,i)=>{e(["prism/components/prism-"+l.default[this.language].file],t,i)})).then(i.__importStar),await c();const t=r.default.languages[this.language];if(!t)throw new Error(`Invalid language '${this.language}' given.`);const n=document.createElement("div");n.innerHTML=r.default.highlight(this.codeContainer.textContent,t,this.language),await c();const o=this.codeContainer.querySelectorAll(".codeBoxLine > span"),a=s.splitIntoLines(n);for(let e=0,t=o.length;e<t;e+=d.chunkSize){await c();const i=Math.min(e+d.chunkSize,t);for(let t=e;t<i;t++){const e=o[t],i=a.next().value;e.parentNode.replaceChild(i,e)}}this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}}return d.chunkSize=50,d})),define("WoltLabSuite/Core/Bbcode/Collapsible",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(e.classList.toggle("collapsed")){if(t.forEach((e=>{const t=e.dataset.titleExpand;e.classList.contains("icon")?(e.classList.remove("fa-compress"),e.classList.add("fa-expand"),e.title=t):e.textContent=t})),i instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse;e.classList.contains("icon")?(e.classList.add("fa-compress"),e.classList.remove("fa-expand"),e.title=t):e.textContent=t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),n=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,n){t.forEach((n=>{n.classList.add("jsToggleButtonEnabled"),n.addEventListener("click",(n=>i(e,t,n))),n.addEventListener("keydown",(n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),i(e,t))}))})),0!==n.scrollTop&&(n.scrollTop=0,i(e,t)),n.addEventListener("scroll",(()=>{n.scrollTop=0,e.classList.contains("collapsed")&&i(e,t)}))}(e,t,n),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Bbcode/Spoiler",["require","exports","tslib","../Core","../Language","../Dom/Util"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),t.observe=function(){const e="jsSpoilerBox";document.querySelectorAll(".jsSpoilerBox").forEach((t=>{t.classList.remove(e);const i=t.querySelector(".jsSpoilerToggle"),r=t.querySelector(".spoilerBoxContent");i.addEventListener("click",(e=>function(e,t,i){e.preventDefault(),i.classList.toggle("active");const r=i.classList.contains("active");r?a.default.show(t):a.default.hide(t),i.setAttribute("aria-expanded",r?"true":"false"),t.setAttribute("aria-hidden",r?"false":"true"),n.stringToBool(i.dataset.hasCustomLabel||"")||(i.textContent=o.get(i.classList.contains("active")?"wcf.bbcode.spoiler.hide":"wcf.bbcode.spoiler.show"))}(e,r,i)))}))}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map;return{add(e,t){if(i.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()}}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,i,n,o,a){"use strict";function r(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a);class s{constructor(){this._active=!1,this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.classList.add("buttonPrimary"),this.confirmButton.textContent=o.get("wcf.global.confirmation.confirm"),this.confirmButton.addEventListener("click",(e=>this._confirm())),e.appendChild(this.confirmButton);const t=document.createElement("button");t.textContent=o.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{a.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,a.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,a.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){this.confirmButton.blur(),this.confirmButton.focus()}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:o.get("wcf.global.confirmation.title")}}}}let l;t.show=function(e){if(!r().active){if((e=n.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");r().open(e)}},t.getContentElement=function(){return r().content}})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";function p(){return g||(g=new f),g}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),h=i.__importStar(h);const m='.messageCheckboxLabel > input[type="checkbox"], .message .messageClipboardCheckbox > input[type="checkbox"], .messageGroupList .columnMark > label > input[type="checkbox"]';class f{constructor(){this.containers=new Map,this.editors=new Map,this.editorDropdowns=new Map,this.itemData=new WeakMap,this.knownCheckboxes=new WeakSet,this.pageClassNames=[],this.pageObjectId=0,this.reloadPageOnSuccess=new Map}setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),a.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=r.default.identify(e);let i=this.containers.get(t);if(void 0===i){const n=e.querySelector(".jsClipboardMarkAll");if(null!==n){if(n.matches(m)){const e=n.closest("label");e.setAttribute("role","checkbox"),e.tabIndex=0,e.setAttribute("aria-checked","false"),e.setAttribute("aria-label",l.get("wcf.clipboard.item.markAll")),e.addEventListener("keyup",(e=>{"Enter"!==e.key&&"Space"!==e.key||n.click()}))}n.dataset.containerId=t,n.addEventListener("click",(e=>this.markAll(e)))}i={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:n,markedObjectIds:new Set},this.containers.set(t,i)}Array.from(i.checkboxes).forEach((e=>{if(this.knownCheckboxes.has(e))return;if(e.dataset.containerId=t,e.matches(m)){const t=e.closest("label");t.setAttribute("role","checkbox"),t.tabIndex=0,t.setAttribute("aria-checked","false"),t.setAttribute("aria-label",l.get("wcf.clipboard.item.mark")),t.addEventListener("keyup",(t=>{"Enter"!==t.key&&"Space"!==t.key||e.click()}))}null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e)}))}))}loadMarkedItems(){n.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,i="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,i);const n=[],o=t.dataset.containerId,a=this.containers.get(o),r=a.element.dataset.type;Array.from(a.checkboxes).forEach((e=>{const o=~~e.dataset.objectId;i?e.checked||(e.checked=!0,a.markedObjectIds.add(o),n.push(o)):e.checked&&(e.checked=!1,a.markedObjectIds.delete(o),n.push(o)),this.setParentAsMarked(e,i);const r=t.closest(".jsClipboardObject");null!==r&&(i?r.classList.add("jsMarked"):r.classList.remove("jsMarked"))})),this.saveState(r,n,i)}mark(e){const t=e instanceof Event?e.currentTarget:e,i=~~t.dataset.objectId,n=t.checked,o=t.dataset.containerId,a=this.containers.get(o),r=a.element.dataset.type,s=t.closest(".jsClipboardObject");n?(a.markedObjectIds.add(i),s.classList.add("jsMarked")):(a.markedObjectIds.delete(i),s.classList.remove("jsMarked")),null!==a.markAll&&(a.markAll.checked=!Array.from(a.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(a.markAll,n)),this.setParentAsMarked(t,t.checked),this.saveState(r,[i],n)}saveState(e,t,i){n.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=i.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:i,responseData:null})}const i=e.currentTarget,n=this.itemData.get(i);if(n.url)return void(window.location.href=n.url);const a="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"";let r=!0;if(o.isPlainObject(n.parameters)&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(a.length){const e="string"==typeof n.internalData.template?n.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const i=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[i]=e.value);break;case"SELECT":t[i]=e.value;break;case"TEXTAREA":t[i]=e.value.trim()}})),this.executeProxyAction(i,n,t)},message:a,template:e})}else this.executeProxyAction(i,n)}else a.length&&(r=!1,c.show({confirm:t,message:a}));r&&t()}executeProxyAction(e,t,i={}){const a="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],r={data:i};o.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{r[e]=t})),n.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:a,parameters:r},(i=>{if("unmarkAll"!==t.actionName){const n=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",n,{data:t,listItem:e,responseData:i});const o=this.reloadPageOnSuccess.get(n);if(o&&o.includes(i.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;n.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=o.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const i=e.element.dataset.type,n=Array.isArray(t[i])?t[i]:[];this.rebuildMarkings(e,n)}));const i=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{i.includes(t)&&(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let n=!1,o=this.editors.get(e),a=this.editorDropdowns.get(e);void 0===o?(n=!0,o=document.createElement("a"),o.className="dropdownToggle",o.textContent=t.label,this.editors.set(e,o),a=document.createElement("ol"),a.className="dropdownMenu",this.editorDropdowns.set(e,a)):(o.textContent=t.label,a.innerHTML=""),Object.values(t.items).forEach((t=>{const i=document.createElement("li"),n=document.createElement("span");n.textContent=t.label,i.appendChild(n),a.appendChild(i),i.dataset.type=e,i.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(i,t)}));const r=document.createElement("li");r.classList.add("dropdownDivider"),a.appendChild(r);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),a.appendChild(s),-1!==i.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):u.add(t,o)}if(n){const e=o.parentElement;e.classList.add("dropdown"),e.appendChild(a),d.default.init(o)}}))}rebuildMarkings(e,t){var i;let n=!0;if(Array.from(e.checkboxes).forEach((e=>{const i=e.closest(".jsClipboardObject"),o=t.includes(~~e.dataset.objectId);o||(n=!1),e.checked=o,o?i.classList.add("jsMarked"):i.classList.remove("jsMarked"),this.setParentAsMarked(e,o)})),null!==e.markAll){e.markAll.checked=n,this.setParentAsMarked(e.markAll,n);const t=null===(i=e.markAll.closest(".columnMark"))||void 0===i?void 0:i.parentNode;t&&(n?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const i=e.parentElement;"checkbox"===i.getAttribute("role")&&i.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),h.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),h.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let g;t.setup=function(e){p().setup(e)},t.reload=function(){p().reload()},t.hideEditor=function(e){p().hideEditor(e)},t.showEditor=function(){p().showEditor()},t.unmark=function(e,t){p().unmark(e,t)}})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(e,"Tab",9)}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return"Exif"===e||"http://ns.adobe.com/xap/1.0/"===e||"http://ns.adobe.com/xmp/extension/"===e}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),i(n.error)})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function a(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==r.SOI)throw new Error("Not a JPEG");let a=t;for(let e=2;e<a.length&&255===a[e];){const t=2+(a[e+2]<<8|a[e+3]);if(a[e+1]===r.APP1){let o="";for(let t=e+4;0!==a[t]&&t<a.length;t++)o+=String.fromCharCode(a[t]);if(i(o)){const i=a.slice(0,e),o=a.slice(e+t);a=n(i,o)}else e+=t}else e+=t}return new Blob([a],{type:e.type})}var r;Object.defineProperty(t,"__esModule",{value:!0}),t.setExifData=t.removeExifData=t.getExifBytesFromJpeg=void 0,function(e){e[e.SOI=216]="SOI",e[e.APP0=224]="APP0",e[e.APP1=225]="APP1",e[e.APP2=226]="APP2",e[e.APP3=227]="APP3",e[e.APP4=228]="APP4",e[e.APP5=229]="APP5",e[e.APP6=230]="APP6",e[e.APP7=231]="APP7",e[e.APP8=232]="APP8",e[e.APP9=233]="APP9",e[e.APP10=234]="APP10",e[e.APP11=235]="APP11",e[e.APP12=236]="APP12",e[e.APP13=237]="APP13",e[e.APP14=238]="APP14",e[e.COM=254]="COM"}(r||(r={}));t.getExifBytesFromJpeg=async function(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);let a=new Uint8Array(0);if(255!==t[0]&&t[1]!==r.SOI)throw new Error("Not a JPEG");for(let e=2;e<t.length&&255===t[e];){const o=2+(t[e+2]<<8|t[e+3]);if(t[e+1]===r.APP1){let r="";for(let i=e+4;0!==t[i]&&i<t.length;i++)r+=String.fromCharCode(t[i]);if(i(r)){a=n(a,t.slice(e,o+e))}}e+=o}return a},t.removeExifData=a,t.setExifData=async function(e,t){e=await a(e);const i=await o(e);let s=2;255===i[2]&&i[3]===r.APP0&&(s+=2+(i[4]<<8|i[5]));const l=n(i.slice(0,s),t,i.slice(s));return new Blob([l],{type:e.type})}})),define("WoltLabSuite/Core/Image/ImageUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsTransparentPixels=void 0,t.containsTransparentPixels=function(e){const t=e.getContext("2d");if(!t)throw new Error("Unable to get canvas context.");const i=t.getImageData(0,0,e.width,e.height);for(let e=3,t=i.data.length;e<t;e+=4)if(255!==i.data[e])return!0;return!1}})),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("pica",[],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pica=e()}}((function(){return function e(t,i,n){function o(r,s){var l,c,d;if(!i[r]){if(!t[r]){if(l="function"==typeof require&&require,!s&&l)return l(r,!0);if(a)return a(r,!0);throw(c=new Error("Cannot find module '"+r+"'")).code="MODULE_NOT_FOUND",c}d=i[r]={exports:{}},t[r][0].call(d.exports,(function(e){return o(t[r][1][e]||e)}),d,d.exports,e,t,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(e,t,i){"use strict";function n(e){var t=e||[],i={js:t.indexOf("js")>=0,wasm:t.indexOf("wasm")>=0};a.call(this,i),this.features={js:i.js,wasm:i.wasm&&this.has_wasm()},this.use(r),this.use(s)}var o=e("inherits"),a=e("multimath"),r=e("multimath/lib/unsharp_mask"),s=e("./mm_resize");o(n,a),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}t.exports={convolveHorizontally:function(e,t,i,o,a,r){var s,l,c,d,u,h,p,m,f,g,_,b=0,v=0;for(f=0;f<o;f++){for(u=0,g=0;g<a;g++){for(h=r[u++],p=r[u++],m=b+4*h|0,s=l=c=d=0;p>0;p--)d=d+(_=r[u++])*e[m+3]|0,c=c+_*e[m+2]|0,l=l+_*e[m+1]|0,s=s+_*e[m]|0,m=m+4|0;t[v+3]=n(d+8192>>14),t[v+2]=n(c+8192>>14),t[v+1]=n(l+8192>>14),t[v]=n(s+8192>>14),v=v+4*o|0}v=4*(f+1)|0,b=(f+1)*i*4|0}},convolveVertically:function(e,t,i,o,a,r){var s,l,c,d,u,h,p,m,f,g,_,b=0,v=0;for(f=0;f<o;f++){for(u=0,g=0;g<a;g++){for(h=r[u++],p=r[u++],m=b+4*h|0,s=l=c=d=0;p>0;p--)d=d+(_=r[u++])*e[m+3]|0,c=c+_*e[m+2]|0,l=l+_*e[m+1]|0,s=s+_*e[m]|0,m=m+4|0;t[v+3]=n(d+8192>>14),t[v+2]=n(c+8192>>14),t[v+1]=n(l+8192>>14),t[v]=n(s+8192>>14),v=v+4*o|0}v=4*(f+1)|0,b=(f+1)*i*4|0}}}},{}],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";var n=e("./resize_filter_gen"),o=e("./convolve").convolveHorizontally,a=e("./convolve").convolveVertically;t.exports=function(e){var t=e.src,i=e.width,r=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,p=e.dest||new Uint8Array(s*l*4),m=void 0===e.quality?3:e.quality,f=e.alpha||!1,g=n(m,i,s,c,u),_=n(m,r,l,d,h),b=new Uint8Array(s*r*4);return o(t,b,i,r,s,g),a(b,p,r,s,l,_),f||function(e,t,i){for(var n=3,o=t*i*4|0;n<o;)e[n]=255,n=n+4|0}(p,s,l),p}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(e,t,i){"use strict";function n(e){return Math.round(e*((1<<a)-1))}var o=e("./resize_filter_info"),a=14;t.exports=function(e,t,i,a,r){var s,l,c,d,u,h,p,m,f,g,_,b,v,w,y,E,S,C=o[e].filter,L=1/a,A=Math.min(1,a),I=o[e].win/A,x=Math.floor(2*(I+1)),k=new Int16Array((x+2)*i),D=0,M=!k.subarray||!k.set;for(s=0;s<i;s++){for(l=(s+.5)*L+r,c=Math.max(0,Math.floor(l-I)),u=(d=Math.min(t-1,Math.ceil(l+I)))-c+1,h=new Float32Array(u),p=new Int16Array(u),m=0,f=c,g=0;f<=d;f++,g++)m+=_=C((f+.5-l)*A),h[g]=_;for(b=0,g=0;g<h.length;g++)b+=v=h[g]/m,p[g]=n(v);for(p[i>>1]+=n(1-b),w=0;w<p.length&&0===p[w];)w++;if(w<p.length){for(y=p.length-1;y>0&&0===p[y];)y--;if(E=c+w,S=y-w+1,k[D++]=E,k[D++]=S,M)for(g=w;g<=y;g++)k[D++]=p[g];else k.set(p.subarray(w,y+1),D),D+=S}else k[D++]=0,k[D++]=0}return k}},{"./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){var n,o,r;if(a)t.set(function(e){return new Uint8Array(e.buffer,0,e.byteLength)}(e),i);else for(n=i,o=0;o<e.length;o++)r=e[o],t[n++]=255&r,t[n++]=r>>8&255}var o=e("./resize_filter_gen"),a=!0;try{a=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,r=e.toWidth,s=e.toHeight,l=e.scaleX||e.toWidth/e.width,c=e.scaleY||e.toHeight/e.height,d=e.offsetX||0,u=e.offsetY||0,h=e.dest||new Uint8Array(r*s*4),p=void 0===e.quality?3:e.quality,m=e.alpha||!1,f=o(p,i,r,l,d),g=o(p,a,s,c,u),_=0,b=this.__align(_+Math.max(t.byteLength,h.byteLength)),v=this.__align(b+a*r*4),w=this.__align(v+f.byteLength),y=w+g.byteLength,E=this.__instance("resize",y),S=new Uint8Array(this.__memory.buffer),C=new Uint32Array(this.__memory.buffer),L=new Uint32Array(t.buffer);return C.set(L),n(f,S,v),n(g,S,w),(E.exports.convolveHV||E.exports._convolveHV)(v,w,b,i,a,r,s),new Uint32Array(h.buffer).set(new Uint32Array(this.__memory.buffer,0,s*r)),m||function(e,t,i){for(var n=3,o=t*i*4|0;n<o;)e[n]=255,n=n+4|0}(h,r,s),h}},{"./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()).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,a){var r,s,l,c,d,u=i/e,h=n/t,p=(2*a+2+1)/o;if(p>.5)return[[i,n]];if((r=Math.ceil(Math.log(Math.min(u,h))/Math.log(p)))<=1)return[[i,n]];for(s=[],l=0;l<r;l++)c=Math.round(Math.pow(Math.pow(e,r-l-1)*Math.pow(i,l+1),1/r)),d=Math.round(Math.pow(Math.pow(t,r-l-1)*Math.pow(n,l+1),1/r)),s.push([c,d]);return s}},{}],11:[function(e,t,i){"use strict";function n(e){var t=Math.round(e);return Math.abs(e-t)<a?t:Math.floor(e)}function o(e){var t=Math.round(e);return Math.abs(e-t)<a?t:Math.ceil(e)}var a=1e-5;t.exports=function(e){var t,i,a,r,s,l,c,d,u=e.toWidth/e.width,h=e.toHeight/e.height,p=n(e.srcTileSize*u)-2*e.destTileBorder,m=n(e.srcTileSize*h)-2*e.destTileBorder;if(p<1||m<1)throw new Error("Internal error in pica: target tile width/height is too small.");for(c=[],r=0;r<e.toHeight;r+=m)for(a=0;a<e.toWidth;a+=p)(t=a-e.destTileBorder)<0&&(t=0),t+(s=a+p+e.destTileBorder-t)>=e.toWidth&&(s=e.toWidth-t),(i=r-e.destTileBorder)<0&&(i=0),i+(l=r+m+e.destTileBorder-i)>=e.toHeight&&(l=e.toHeight-i),d={toX:t,toY:i,toWidth:s,toHeight:l,toInnerX:a,toInnerY:r,toInnerWidth:p,toInnerHeight:m,offsetX:t/u-n(t/u),offsetY:i/h-n(i/h),scaleX:u,scaleY:h,x:n(t/u),y:n(i/h),width:o(s/u),height:o(l/h)},c.push(d);return c}},{}],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,a){n.push((function(){e().then((function(e){o(e),i--,t()}),(function(e){a(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,o=e.data.opts;t||(t=new i(e.data.features)),n=t.resizeAndUnsharp(o),postMessage({result:n},[n.buffer])}}},{"./mathlib":1}],14:[function(e,t,i){function n(e,t,i,n,o,a){var r,s,l,c,d,u,h,p,m,f,g,_,b,v;for(m=0;m<a;m++){for(h=m,p=0,c=d=(r=e[u=m*o])*n[6],g=n[0],_=n[1],b=n[4],v=n[5],f=0;f<o;f++)l=(s=e[u])*g+r*_+c*b+d*v,d=c,c=l,r=s,i[p]=c,p++,u++;for(p--,h+=a*(o-1),c=d=(r=e[--u])*n[7],s=r,g=n[2],_=n[3],f=o-1;f>=0;f--)l=s*g+r*_+c*b+d*v,d=c,c=l,r=s,s=e[u],t[h]=i[p]+c,u--,p--,h-=a}}var o,a,r,s,l,c;t.exports=function(e,t,i,d){var u,h,p;d&&(n(e,u=new Uint16Array(e.length),h=new Float32Array(Math.max(t,i)),p=function(e){e<.5&&(e=.5);var t=Math.exp(.527076)/e,i=Math.exp(-t),n=Math.exp(-2*t),d=(1-i)*(1-i)/(1+2*t*i-n);return o=d,a=d*(t-1)*i,r=d*(t+1)*i,s=-d*n,l=2*i,c=-n,new Float32Array([o,a,r,s,l,c,(o+a)/(1-l-c),(r+s)/(1-l-c)])}(d),t,i),n(u,e,h,p,i,t))}},{}],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({},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 o=e("object-assign"),a=e("./lib/base64decode"),r=e("./lib/wa_detect"),s={js:!0,wasm:!0};n.prototype.has_wasm=r,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=a,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){var n,a;return t&&this.__reallocate(t),this.__wasm[e]||(n=this.__modules[e],this.__wasm[e]=new WebAssembly.Module(this.__base64decode(n.wasm_src))),this.__cache[e]||(a={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(a,i||{})})),this.__cache[e]},n.prototype.__align=function(e,t){var i=e%(t=t||8);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){var t,i,n=e.replace(/[\r\n=]/g,""),o=n.length,a=new Uint8Array(3*o>>2),r=0,s=0;for(t=0;t<o;t++)t%4==0&&t&&(a[s++]=r>>16&255,a[s++]=r>>8&255,a[s++]=255&r),r=r<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(n.charAt(t));return 0===(i=o%4*6)?(a[s++]=r>>16&255,a[s++]=r>>8&255,a[s++]=255&r):18===i?(a[s++]=r>>10&255,a[s++]=r>>2&255):12===i&&(a[s++]=r>>4&255),a}},{}],18:[function(e,t,i){"use strict";t.exports=function(e,t,i){var n,o,a,r,s,l,c=t*i,d=new Uint16Array(c);for(l=0;l<c;l++)n=e[4*l],o=e[4*l+1],a=e[4*l+2],s=n>=o&&n>=a?n:o>=a&&o>=n?o:a,r=n<=o&&n<=a?n:o<=a&&o<=n?o:a,d[l]=257*(s+r)>>1;return d}},{}],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,a,r,s){var l,c,d,u,h,p,m,f,g,_,b,v,w,y,E,S,C,L,A;if(!(0===a||r<.5))for(r>2&&(r=2),y=o(e,t,i),E=new Uint16Array(y),n(E,t,i,r),S=a/100*4096+.5|0,C=257*s|0,L=t*i,A=0;A<L;A++)v=2*(y[A]-E[A]),Math.abs(v)>=C&&(l=e[w=4*A],c=e[w+1],d=e[w+2],p=257*((f=l>=c&&l>=d?l:c>=l&&c>=d?c:d)+(m=l<=c&&l<=d?l:c<=l&&c<=d?c:d))>>1,m===f?u=h=0:(h=p<=32767?4095*(f-m)/(f+m)|0:4095*(f-m)/(510-f-m)|0,u=l===f?65535*(c-d)/(6*(f-m))|0:c===f?21845+(65535*(d-l)/(6*(f-m))|0):43690+(65535*(l-c)/(6*(f-m))|0)),(p+=S*v+2048>>12)>65535?p=65535:p<0&&(p=0),0===h?l=c=d=p>>8:(g=2*p-(_=p<=32767?p*(4096+h)+2048>>12:p+((65535-p)*h+2048>>12))>>8,_>>=8,l=(b=u+21845&65535)>=43690?g:b>=32767?g+(6*(_-g)*(43690-b)+32768>>16):b>=10922?_:g+(6*(_-g)*b+32768>>16),c=(b=65535&u)>=43690?g:b>=32767?g+(6*(_-g)*(43690-b)+32768>>16):b>=10922?_:g+(6*(_-g)*b+32768>>16),d=(b=u-21845&65535)>=43690?g:b>=32767?g+(6*(_-g)*(43690-b)+32768>>16):b>=10922?_:g+(6*(_-g)*b+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,o,a){var r,s,l,c,d,u,h,p,m,f,g,_,b,v;0===n||o<.5||(o>2&&(o=2),u=32,h=0,_=(g=(f=(m=(p=s=4*(r=t*i))+(l=2*r))+(c=2*r))+c)+(d=4*Math.max(t,i)),b=this.__instance("unsharp_mask",s+l+2*c+d+u,{exp:Math.exp}),v=new Uint32Array(e.buffer),new Uint32Array(this.__memory.buffer).set(v),(b.exports.hsl_l16||b.exports._hsl_l16)(h,p,t,i),(b.exports.blurMono16||b.exports._blurMono16)(p,m,f,g,_,t,i,o),(b.exports.unsharp||b.exports._unsharp)(h,h,p,m,t,i,n,a),v.set(new Uint32Array(this.__memory.buffer,0,r)))}},{}],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(){var e,t;if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{return 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),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)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;t.exports=function(){var e,t,i,n;try{if(!Object.assign)return!1;if((e=new String("abc"))[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;return"0123456789"===Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join("")&&(n={},"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join(""))}catch(e){return!1}}()?Object.assign:function(e,t){var i,s,l,c,d,u=n(e);for(l=1;l<arguments.length;l++){for(c in i=Object(arguments[l]))a.call(i,c)&&(u[c]=i[c]);if(o)for(s=o(i),d=0;d<s.length;d++)r.call(i,s[d])&&(u[s[d]]=i[s[d]])}return u}},{}],25:[function(e,t,i){var n=arguments[3],o=arguments[4],a=arguments[5],r=JSON.stringify;t.exports=function(e,t){var i,s,l,c,d,u,h,p,m,f,g,_,b,v,w=Object.keys(a);for(s=0,l=w.length;s<l;s++)if(c=w[s],(d=a[c].exports)===e||d&&d.default===e){i=c;break}if(!i){for(i=Math.floor(Math.pow(16,8)*Math.random()).toString(16),u={},s=0,l=w.length;s<l;s++)u[c=w[s]]=c;o[i]=["function(require,module,exports){"+e+"(self); }",u]}return h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),(p={})[i]=i,o[h]=["function(require,module,exports){var f = require("+r(i)+");(f.default ? f.default : f)(self);}",p],m={},function e(t){var i,n;for(i in m[t]=!0,o[t][1])n=o[t][1][i],m[n]||e(n)}(h),f="("+n+")({"+Object.keys(m).map((function(e){return r(e)+":["+o[e][0]+","+r(o[e][1])+"]"})).join(",")+"},{},["+r(h)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([f],{type:"text/javascript"}),t&&t.bare?_:(b=g.createObjectURL(_),(v=new Worker(b)).objectURL=b,v)}},{}],"/":[function(e,t,i){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i,n,o=[],a=!0,r=!1,s=void 0;try{for(i=e[Symbol.iterator]();!(a=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){r=!0,s=e}finally{try{a||null==i.return||i.return()}finally{if(r)throw s}}return o}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(){return{value:h(g),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 a(e){if(!(this instanceof a))return new a(e);this.options=u({},s,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 r,s,l,c,d,u=e("object-assign"),h=e("webworkify"),p=e("./lib/mathlib"),m=e("./lib/pool"),f=e("./lib/utils"),g=e("./lib/worker"),_=e("./lib/stepper"),b=e("./lib/tiler"),v={},w=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(w=navigator.userAgent.indexOf("Safari")>=0)}catch(e){}r=1,"undefined"!=typeof navigator&&(r=Math.min(navigator.hardwareConcurrency||1,4)),s={tile:1024,concurrency:r,features:["js","wasm","ww"],idle:2e3},l={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},a.prototype.init=function(){var t,i,n,a,r=this;if(this.__initPromise)return this.__initPromise;if(!1!==c&&!0!==c&&(c=!1,"undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray))try{new ImageData(new Uint8ClampedArray(400),10,10),c=!0}catch(e){}if(!1!==d&&!0!==d&&(d=!1,"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?d=!0:this.debug("ImageBitmap does not support .close(), disabled"))),(t=this.options.features.slice()).indexOf("all")>=0&&(t=["cib","wasm","js","ww"]),this.__requested_features=t,this.__mathlib=new p(t),t.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{e("webworkify")((function(){})).terminate(),this.features.ww=!0,i="wp_".concat(JSON.stringify(this.options)),v[i]?this.__workersPool=v[i]:(this.__workersPool=new m(o,this.options.idle),v[i]=this.__workersPool)}catch(e){}return n=this.__mathlib.init().then((function(e){u(r.features,e.features)})),a=d?f.cib_support().then((function(e){r.features.cib&&t.indexOf("cib")<0?r.debug("createImageBitmap() resize supported, but disabled by config"):t.indexOf("cib")>=0&&(r.features.cib=e)})):Promise.resolve(!1),this.__initPromise=Promise.all([n,a]).then((function(){return r})),this.__initPromise},a.prototype.resize=function(e,t,i){var o,a,r,s,h,p=this;return this.debug("Start resize..."),o=u({},l),isNaN(i)?i&&(o=u(o,i)):o=u(o,{quality:i}),o.toWidth=t.width,o.toHeight=t.height,o.width=e.naturalWidth||e.width,o.height=e.naturalHeight||e.height,0===t.width||0===t.height?Promise.reject(new Error("Invalid output size: ".concat(t.width,"x").concat(t.height))):(o.unsharpRadius>2&&(o.unsharpRadius=2),a=!1,r=null,o.cancelToken&&(r=o.cancelToken.then((function(e){throw a=!0,e}),(function(e){throw a=!0,e}))),s=3,h=Math.ceil(Math.max(s,2.5*o.unsharpRadius|0)),this.init().then((function(){var i,s,l,m;return a?r:p.features.cib?(i=t.getContext("2d",{alpha:Boolean(o.alpha)}),p.debug("Resize via createImageBitmap()"),createImageBitmap(e,{resizeWidth:o.toWidth,resizeHeight:o.toHeight,resizeQuality:f.cib_quality_name(o.quality)}).then((function(e){var n,s,l;return a?r:o.unsharpAmount?(p.debug("Unsharp result"),(n=document.createElement("canvas")).width=o.toWidth,n.height=o.toHeight,(s=n.getContext("2d",{alpha:Boolean(o.alpha)})).drawImage(e,0,0),e.close(),l=s.getImageData(0,0,o.toWidth,o.toHeight),p.__mathlib.unsharp_mask(l.data,o.toWidth,o.toHeight,o.unsharpAmount,o.unsharpRadius,o.unsharpThreshold),i.putImageData(l,0,0),l=s=n=i=null,p.debug("Finished!"),t):(i.drawImage(e,0,0),e.close(),i=null,p.debug("Finished!"),t)}))):(s={},l=function(e){return Promise.resolve().then((function(){return p.features.ww?new Promise((function(t,i){var n=p.__workersPool.acquire();r&&r.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:p.__requested_features,preload:{wasm_nodule:p.__mathlib.__}},[e.src.buffer])})):p.__mathlib.resizeAndUnsharp(e,s)}))},m=function(e,t,i){var n,o,s,u=function(t){return p.__limit((function(){var d,u,h,m;return a?r:(f.isCanvas(e)?(p.debug("Get tile pixel data"),d=n.getImageData(t.x,t.y,t.width,t.height)):(p.debug("Draw tile imageBitmap/image to temporary canvas"),(u=document.createElement("canvas")).width=t.width,u.height=t.height,(h=u.getContext("2d",{alpha:Boolean(i.alpha)})).globalCompositeOperation="copy",h.drawImage(o||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),p.debug("Get tile pixel data"),d=h.getImageData(0,0,t.width,t.height),h=u=null),m={src:d.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},p.debug("Invoke resize math"),Promise.resolve().then((function(){return l(m)})).then((function(e){var i,n;if(a)return r;if(d=null,p.debug("Convert raw rgba tile result to ImageData"),c)i=new ImageData(new Uint8ClampedArray(e),t.toWidth,t.toHeight);else if((i=s.createImageData(t.toWidth,t.toHeight)).data.set)i.data.set(e);else for(n=i.data.length-1;n>=0;n--)i.data[n]=e[n];return p.debug("Draw tile"),w?s.putImageData(i,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):s.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(s=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 d?(p.debug("Decode image via createImageBitmap"),createImageBitmap(e).then((function(e){o=e}))):null;throw new Error('".from" should be image or canvas')})).then((function(){function e(){o&&(o.close(),o=null)}var n;return a?r:(p.debug("Calculate tiles"),n=b({width:i.width,height:i.height,srcTileSize:p.options.tile,toWidth:i.toWidth,toHeight:i.toHeight,destTileBorder:h}).map((function(e){return u(e)})),p.debug("Process tiles"),Promise.all(n).then((function(){return p.debug("Finished!"),e(),t}),(function(t){throw e(),t})))}))},function e(t,i,o,s){var l,c,d,h,p;return a?r:(l=n(t.shift(),2),c=l[0],d=l[1],h=0===t.length,s=u({},s,{toWidth:c,toHeight:d,quality:h?s.quality:Math.min(1,s.quality)}),h||((p=document.createElement("canvas")).width=c,p.height=d),m(i,h?o:p,s).then((function(){return h?o:(s.width=c,s.height=d,e(t,p,o,s))})))}(_(o.width,o.height,o.toWidth,o.toHeight,p.options.tile,h),e,t,o))})))},a.prototype.resizeBuffer=function(e){var t=this,i=u({},l,e);return this.init().then((function(){return t.__mathlib.resizeAndUnsharp(i)}))},a.prototype.toBlob=function(e,t,i){return t=t||"image/png",new Promise((function(n){var o,a,r,s;if(e.toBlob)e.toBlob((function(e){return n(e)}),t,i);else{for(a=(o=atob(e.toDataURL(t,i).split(",")[1])).length,r=new Uint8Array(a),s=0;s<a;s++)r[s]=o.charCodeAt(s);n(new Blob([r],{type:t}))}}))},a.prototype.debug=function(){},t.exports=a},{"./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",["require","exports","tslib","../Core","../FileUtil","./ExifUtil","pica"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a);const s=new((r=i.__importDefault(r)).default)({features:["js","wasm","ww"]}),l="image/jpeg";class c{constructor(){this.maxWidth=800,this.maxHeight=600,this.quality=.8,this.fileType=l}setMaxWidth(e){return null==e&&(e=800),this.maxWidth=e,this}setMaxHeight(e){return null==e&&(e=600),this.maxHeight=e,this}setQuality(e){return null==e&&(e=.8),this.quality=e,this}setFileType(e){return null==e&&(e=l),this.fileType=e,this}async saveFile(e,t,i=this.fileType,n=this.quality){const r=/(.+)(\..+?)$/.exec(t);let l=await s.toBlob(e.image,i,n);return"image/jpeg"===i&&void 0!==e.exif&&(l=await a.setExifData(l,e.exif)),o.blobToFile(l,r[1])}async loadFile(e){let t=Promise.resolve(void 0),i=e;"image/jpeg"===e.type&&(t=a.getExifBytesFromJpeg(e),i=await a.removeExifData(i));const n=new Promise(((e,t)=>{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),t(n.error)})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[o,r]=await Promise.all([t,n]);return{exif:o,image:r}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,a){const r=document.createElement("canvas");if(window.createImageBitmap){if((await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965")}const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);r.width=Math.floor(e.width*d),r.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const h={quality:u,cancelToken:a,alpha:!0};return s.resize(e,r,h)}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML,u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;h.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r);const u=new Map,h=new WeakMap;t.init=function(e,t,i,n,c,d){if(u.has(t))return;const p=document.getElementById(e);if(null===p)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let m=document.getElementById(t);null===m&&(m=document.createElement("input"),m.type="hidden",m.id=t,m.name=t,m.value=i.toString(),p.appendChild(m)),function(e,t,i,n,c,d){function p(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=_.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let m;const f=t.parentElement;"DD"===f.nodeName?(m=document.createElement("div"),m.className="dropdown",f.insertAdjacentElement("afterbegin",m)):(m=f,m.classList.add("dropdown")),a.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle dropdownIndicator boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),m.appendChild(g);const _=document.createElement("ul");if(_.className="dropdownMenu",m.appendChild(_),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",p),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),_.appendChild(n);const o=document.createElement("a");o.className="box24",n.appendChild(o);const a=document.createElement("img");a.src=t.iconPath,a.alt="",a.className="iconFlag",o.appendChild(a);const r=document.createElement("span");r.textContent=t.languageName,o.appendChild(r),+e===i&&(g.innerHTML=o.innerHTML)})),d){const e=document.createElement("li");e.className="dropdownDivider",_.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",p),_.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML),t.addEventListener("click",p)}else if(0===i){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("span");t.className="icon icon24 fa-question pointer",e.appendChild(t);const i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),e.appendChild(i)}r.default.init(g),u.set(e,{callback:c,dropdownMenu:_,dropdownToggle:g,element:t});const b=t.closest("form");if(null!==b){b.addEventListener("submit",l);let t=h.get(b);void 0===t&&(t=[],h.set(b,t)),t.push(e)}}(t,m,i,n,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t,i){const n=d.get(e),o=a.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),r=o?o.textContent:"";if(n.languageId!==t){const o=h.get(e);n.languageId&&o.set(n.languageId,n.element.value),0===t?h.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=r,n.buttonLabel.classList[t?"add":"remove"]("active"),n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=a.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),r=h.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!r.get(t)),i?e.classList.add("missingValue"):e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=h.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);const d=new Map,u=new WeakMap,h=new Map;t.init=function(e,t,i,n){if(h.has(e))return;const p=document.getElementById(e);if(null===p)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const m=new Map;Object.entries(t).forEach((([e,t])=>{m.set(+e,r.unescapeHTML(t))})),h.set(e,m),function(e,t,i,n,r){let h=t.parentElement;if(!h.classList.contains("inputAddon")){h=document.createElement("div"),h.className="inputAddon","TEXTAREA"===t.nodeName&&h.classList.add("inputAddonTextarea"),h.dataset.inputId=e;const i=document.activeElement===t;t.insertAdjacentElement("beforebegin",h),h.appendChild(t),i&&t.focus()}h.classList.add("dropdown");const p=document.createElement("span");p.className="button dropdownToggle inputPrefix";const m=document.createElement("span");m.textContent=o.get("wcf.global.button.disabledI18n"),p.appendChild(m),h.insertBefore(p,t);const f=document.createElement("ul");f.className="dropdownMenu",p.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const a=t instanceof HTMLElement;s(e,n,a)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!r){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let _;(r||i.size)&&(_=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),a.default.init(p),a.default.registerCallback(h.id,l),d.set(e,{buttonLabel:m,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:r});const b=t.closest("form");if(null!==b){b.addEventListener("submit",c);let t=u.get(b);void 0===t&&(t=[],u.set(b,t)),t.push(e)}_&&g(_)}(e,p,m,i,n)},t.registerCallback=function(e,t,i){if(!h.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},t.unregister=function(e){if(!h.has(e))throw new Error(`Unknown element id '${e}'.`);h.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const i=h.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),h.set(e,n),void s(e,0,!0);h.set(e,n),i.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const i=t.buttonLabel.parentElement;n.default.hide(i),i.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const i=t.buttonLabel.parentElement;n.default.show(i),i.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!i.isEnabled)return!0;const n=h.get(e),o=a.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let r=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(r)return!1;s=!0}else{if(s)return!1;r=!0}})),!r||t}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input"],(function(e,t,i,n){"use strict";function o(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)}function a(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),t.init=function(e,t,i,r){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected <textarea class="wysiwygTextarea" /> for id '${e}'.`);n.init(e,t,i,r),n.registerCallback(e,"select",o),n.registerCallback(e,"submit",a)}})),define("WoltLabSuite/Core/Media/Clipboard",["require","exports","tslib","../Controller/Clipboard","../Ui/Notification","../Ui/Dialog","../Event/Handler","../Language","../Ajax"],(function(e,t,i,n,o,a,r,s,l){"use strict";let c;Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);const d=new class{_ajaxSetup(){return{data:{className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(e){switch(e.actionName){case"getSetCategoryDialog":a.open(this,e.returnValues.template);break;case"setCategory":a.close(this),o.show(),n.reload()}}_dialogSetup(){return{id:"mediaSetCategoryDialog",options:{onSetup:e=>{e.querySelector("button").addEventListener("click",(t=>{t.preventDefault();const i=e.querySelector('select[name="categoryID"]');var n;n=~~i.value,l.api(d,{actionName:"setCategory",objectIDs:u,parameters:{categoryID:n}});t.currentTarget.disabled=!0}))},title:s.get("wcf.media.setCategory")},source:null}}};let u=[];t.init=function(e,t,i){n.setup({hasMarkedItems:t,pageClassName:e}),c=i,r.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",(e=>function(e){const t=e.data.parameters.objectIDs;switch(e.data.actionName){case"com.woltlab.wcf.media.delete":null!==e.responseData&&c.clipboardDeleteMedia(t);break;case"com.woltlab.wcf.media.insert":c.clipboardInsertMedia(t);break;case"com.woltlab.wcf.media.setCategory":u=t,l.api(d,{actionName:"getSetCategoryDialog"})}}(e)))}})),define("WoltLabSuite/Core/Media/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Media/Upload",["require","exports","tslib","../Upload","../Core","../Dom/Util","../Dom/Traverse","../Language","../User","../Date/Util","../FileUtil","../Dom/Change/Listener","../Event/Handler"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importStar(h);class p extends n.default{constructor(e,t,i){super(e,t,o.extend({className:"wcf\\data\\media\\MediaAction",multiple:!!i.mediaManager,singleFileRequests:!0},i||{})),this._categoryId=null,i=i||{},this._elementTagSize=144,this._options.elementTagSize&&(this._elementTagSize=this._options.elementTagSize),this._mediaManager=null,this._options.mediaManager&&(this._mediaManager=this._options.mediaManager,delete this._options.mediaManager)}_createFileElement(e){let t;if("OL"===this._target.nodeName||"UL"===this._target.nodeName)t=document.createElement("li");else{if("TBODY"===this._target.nodeName){const i=this._target.getElementsByTagName("TR")[0],n=this._target.parentNode.parentNode;return"none"===n.style.getPropertyValue("display")?(t=i,n.style.removeProperty("display"),document.getElementById(this._target.dataset.noItemsInfo).remove()):(t=i.cloneNode(!0),t.removeAttribute("id"),a.identify(t)),Array.from(t.getElementsByTagName("TD")).forEach((t=>{if(t.classList.contains("columnMark"))t.querySelectorAll("[data-object-id]").forEach((e=>a.hide(e)));else if(t.classList.contains("columnIcon"))t.querySelectorAll("[data-object-id]").forEach((e=>a.hide(e))),t.querySelector(".mediaEditButton").classList.add("jsMediaEditButton"),t.querySelector(".jsDeleteButton").dataset.confirmMessageHtml=s.get("wcf.media.delete.confirmMessage",{title:e.name});else if(t.classList.contains("columnFilename")){let i=t.querySelector("img");i||(i=t.querySelector(".icon48"));const n=document.createElement("span");n.className="icon icon48 fa-spinner mediaThumbnail",a.replaceElement(i,n);const o=t.querySelectorAll(".box48 > div > p");o[0].textContent=e.name;let r=o[1].getElementsByTagName("A")[0];r||(r=document.createElement("a"),o[1].getElementsByTagName("SMALL")[0].appendChild(r)),r.setAttribute("href",l.default.getLink()),r.textContent=l.default.username}else t.classList.contains("columnUploadTime")?(t.innerHTML="",t.appendChild(c.getTimeElement(new Date))):t.classList.contains("columnDigits")?t.textContent=d.formatFilesize(e.size):t.innerHTML=""})),a.prepend(t,this._target),t}t=document.createElement("p")}const i=document.createElement("div");i.className="mediaThumbnail",t.appendChild(i);const n=document.createElement("span");n.className="icon icon144 fa-spinner",i.appendChild(n);const o=document.createElement("div");o.className="mediaInformation",t.appendChild(o);const r=document.createElement("p");r.className="mediaTitle",r.textContent=e.name,o.appendChild(r);const h=document.createElement("progress");return h.max=100,o.appendChild(h),a.prepend(t,this._target),u.trigger(),t}_getParameters(){const e={elementTagSize:this._elementTagSize};if(this._mediaManager){e.imagesOnly=this._mediaManager.getOption("imagesOnly");const t=this._mediaManager.getCategoryId();t&&(e.categoryID=t)}return o.extend(super._getParameters(),e)}_replaceFileIcon(e,t,i){if(t.elementTag)e.outerHTML=t.elementTag;else if(t.tinyThumbnailType){const n=document.createElement("img");n.src=t.tinyThumbnailLink,n.alt="",n.style.setProperty("width",`${i}px`),n.style.setProperty("height",`${i}px`),a.replaceElement(e,n)}else{e.classList.remove("fa-spinner");let i=d.getIconNameByFilename(t.filename);i&&(i="-"+i),e.classList.add(`fa-file${i}-o`)}}_success(e,t){const i=this._fileElements[e];i.forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if("TR"===e.tagName)if(n)e.querySelectorAll("[data-object-id]").forEach((e=>{e.dataset.objectId=n.mediaID.toString(),e.style.removeProperty("display")})),e.querySelector(".columnMediaID").textContent=n.mediaID.toString(),this._replaceFileIcon(e.querySelector(".fa-spinner"),n,48);else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename});const o=e.querySelector(".fa-spinner");o.classList.remove("fa-spinner"),o.classList.add("fa-remove","pointer","jsTooltip"),o.title=s.get("wcf.global.button.delete"),o.addEventListener("click",(e=>{e.currentTarget.closest(".mediaFile").remove(),h.fire("com.woltlab.wcf.media.upload","removedErroneousUploadRow")})),e.classList.add("uploadFailed");const r=e.querySelectorAll(".columnFilename .box48 > div > p")[1];a.innerError(r,s.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})),r.remove()}else if(r.childByTag(r.childByClass(e,"mediaInformation"),"PROGRESS").remove(),n){const t=r.childByTag(r.childByClass(e,"mediaThumbnail"),"SPAN");this._replaceFileIcon(t,n,144),e.className="jsClipboardObject mediaFile",e.dataset.objectId=n.mediaID.toString(),this._mediaManager&&(this._mediaManager.setupMediaElement(n,e),this._mediaManager.addMedia(n,e))}else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename});const o=r.childByTag(r.childByClass(e,"mediaThumbnail"),"SPAN");o.classList.remove("fa-spinner"),o.classList.add("fa-remove","pointer"),e.classList.add("uploadFailed","jsTooltip"),e.title=s.get("wcf.global.button.delete"),e.addEventListener("click",(()=>e.remove()));r.childByClass(r.childByClass(e,"mediaInformation"),"mediaTitle").innerText=s.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})}u.trigger()})),h.fire("com.woltlab.wcf.media.upload","success",{files:i,isMultiFileUpload:-1!==this._multiFileUploadIds.indexOf(e),media:t.returnValues.media,upload:this,uploadId:e})}}return o.enableLegacyInheritance(p),p})),define("WoltLabSuite/Core/Media/Replace",["require","exports","tslib","../Core","./Upload","../Language","../Dom/Util","../Ui/Notification","../Dom/Change/Listener"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l);class c extends o.default{constructor(e,t,i,o){super(t,i,n.extend(o,{action:"replaceFile"})),this._mediaID=e}_createButton(){super._createButton(),this._button.classList.add("small"),this._button.querySelector("span").textContent=a.get("wcf.media.button.replaceFile")}_createFileElement(){return this._target}_getFormData(){return{objectIDs:[this._mediaID]}}_success(e,t){this._fileElements[e].forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if(n)n.isImage&&(this._target.innerHTML=n.smallThumbnailTag),document.getElementById("mediaFilename").textContent=n.filename,document.getElementById("mediaFilesize").textContent=n.formattedFilesize,n.isImage&&(document.getElementById("mediaImageDimensions").textContent=n.imageDimensions),document.getElementById("mediaUploader").innerHTML=n.userLinkElement,this._options.mediaEditor.updateData(n),r.default.innerError(this._buttonContainer,""),s.show();else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename}),r.default.innerError(this._buttonContainer,a.get("wcf.media.upload.error."+n.errorType,{filename:n.filename}))}l.trigger()}))}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Media/Editor",["require","exports","tslib","../Core","../Ui/Notification","../Ui/Dialog","../Language/Chooser","../Language/Input","../Dom/Util","../Dom/Traverse","../Dom/Change/Listener","../Language","../Ajax","./Replace"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),h=i.__importStar(h),p=i.__importDefault(p);class m{constructor(e){if(this._availableLanguageCount=1,this._categoryIds=[],this._dialogs=new Map,this._media=null,this._oldCategoryId=0,this._callbackObject=e||{},this._callbackObject._editorClose&&"function"!=typeof this._callbackObject._editorClose)throw new TypeError("Callback object has no function '_editorClose'.");if(this._callbackObject._editorSuccess&&"function"!=typeof this._callbackObject._editorSuccess)throw new TypeError("Callback object has no function '_editorSuccess'.")}_ajaxSetup(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(){o.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),a.close(`mediaEditor_${this._media.mediaID}`),this._media=null}_close(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()}_initEditor(e,t){this._availableLanguageCount=~~t.returnValues.availableLanguageCount,this._categoryIds=t.returnValues.categoryIDs.map((e=>~~e)),t.returnValues.mediaData&&(this._media=t.returnValues.mediaData);const i=this._media.mediaID;setTimeout((()=>{var t,n,o;if(this._availableLanguageCount>1&&r.setLanguageId(`mediaEditor_${i}_languageID`,this._media.languageID||window.LANGUAGE_ID),this._categoryIds.length){const t=e.querySelector("select[name=categoryID]");this._media.categoryID?t.value=this._media.categoryID.toString():t.value="0"}const a=e.querySelector("input[name=title]"),c=e.querySelector("input[name=altText]"),u=e.querySelector("textarea[name=caption]");if(this._availableLanguageCount>1&&this._media.isMultilingual?(document.getElementById(`altText_${i}`)&&s.setValues(`altText_${i}`,this._media.altText||{}),document.getElementById(`caption_${i}`)&&s.setValues(`caption_${i}`,this._media.caption||{}),s.setValues(`title_${i}`,this._media.title||{})):(a.value=(null===(t=this._media)||void 0===t?void 0:t.title[this._media.languageID||window.LANGUAGE_ID])||"",c&&(c.value=(null===(n=this._media)||void 0===n?void 0:n.altText[this._media.languageID||window.LANGUAGE_ID])||""),u&&(u.value=(null===(o=this._media)||void 0===o?void 0:o.caption[this._media.languageID||window.LANGUAGE_ID])||"")),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");t.addEventListener("change",(e=>this._updateLanguageFields(e))),this._updateLanguageFields(null,t)}c&&c.addEventListener("keypress",(e=>this._keyPress(e))),a.addEventListener("keypress",(e=>this._keyPress(e))),e.querySelector("button[data-type=submit]").addEventListener("click",(()=>this._saveData())),document.activeElement.blur(),document.getElementById(`mediaEditor_${i}`).parentNode.scrollTop=0;const h=e.querySelector(".mediaManagerMediaReplaceButton");let m=e.querySelector(".mediaThumbnail");m||(m=document.createElement("div"),e.appendChild(m)),new p.default(i,l.identify(h),l.identify(m),{mediaEditor:this}),d.default.trigger()}),200)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._saveData())}_saveData(){const e=a.getDialog(`mediaEditor_${this._media.mediaID}`).content,t=e.querySelector("select[name=categoryID]"),i=e.querySelector("input[name=altText]"),n=e.querySelector("textarea[name=caption]"),o=e.querySelector("input[name=captionEnableHtml]"),d=e.querySelector("input[name=title]");let p=!1;const m=!!i&&c.childByClass(i.parentNode,"innerError"),f=!!n&&c.childByClass(n.parentNode,"innerError"),g=c.childByClass(d.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~t.value,-1===this._categoryIds.indexOf(this._media.categoryID)&&(this._media.categoryID=0)),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");this._media.isMultilingual=~~t.checked,this._media.languageID=this._media.isMultilingual?null:r.getLanguageId(`mediaEditor_${this._media.mediaID}_languageID`)}else this._media.languageID=window.LANGUAGE_ID;this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual?(i&&!s.validate(i.id,!0)&&(p=!0,m||l.innerError(i,u.get("wcf.global.form.error.multilingual"))),n&&!s.validate(n.id,!0)&&(p=!0,f||l.innerError(n,u.get("wcf.global.form.error.multilingual"))),s.validate(d.id,!0)||(p=!0,g||l.innerError(d,u.get("wcf.global.form.error.multilingual"))),this._media.altText=i?this.mapToI18nValues(s.getValues(i.id)):"",this._media.caption=n?this.mapToI18nValues(s.getValues(n.id)):"",this._media.title=this.mapToI18nValues(s.getValues(d.id))):(this._media.altText[this._media.languageID]=i?i.value:"",this._media.caption[this._media.languageID]=n?n.value:"",this._media.title[this._media.languageID]=d.value),this._media.captionEnableHtml=o?~~o.checked:0;const _={allowAll:~~document.getElementById(`mediaEditor_${this._media.mediaID}_aclAllowAll`).checked,group:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[group][]"]`)).map((e=>~~e.value)),user:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[user][]"]`)).map((e=>~~e.value))};p||(m&&m.remove(),f&&f.remove(),g&&g.remove(),h.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{aclValues:_,altText:this._media.altText,caption:this._media.caption,data:{captionEnableHtml:this._media.captionEnableHtml,categoryID:this._media.categoryID,isMultilingual:this._media.isMultilingual,languageID:this._media.languageID},title:this._media.title}}))}mapToI18nValues(e){const t={};return e.forEach(((e,i)=>t[i]=e)),t}_updateLanguageFields(e,t){e&&(t=e.currentTarget);const i=this._media.mediaID,n=document.getElementById(`mediaEditor_${i}_languageIDContainer`).parentNode;t.checked?(s.enable(`title_${i}`),document.getElementById(`caption_${i}`)&&s.enable(`caption_${i}`),document.getElementById(`altText_${i}`)&&s.enable(`altText_${i}`),l.hide(n)):(s.disable(`title_${i}`),document.getElementById(`caption_${i}`)&&s.disable(`caption_${i}`),document.getElementById(`altText_${i}`)&&s.disable(`altText_${i}`),l.show(n))}edit(e){let t,i=0;if("object"==typeof e?(t=e,i=t.mediaID):(t={mediaID:e},i=e),null!==this._media)throw new Error(`Cannot edit media with id ${i} while editing media with id '${this._media.mediaID}'.`);this._media=t,this._dialogs.has(`mediaEditor_${i}`)||this._dialogs.set(`mediaEditor_${i}`,{_dialogSetup:()=>({id:`mediaEditor_${i}`,options:{backdropCloseOnClick:!1,onClose:()=>this._close(),title:u.get("wcf.media.edit")},source:{after:(e,t)=>this._initEditor(e,t),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[i]}}})}),a.open(this._dialogs.get(`mediaEditor_${i}`))}updateData(e){this._callbackObject._editorSuccess&&this._callbackObject._editorSuccess(e)}}return n.enableLegacyInheritance(m),m})),define("WoltLabSuite/Core/Notification/Handler",["require","exports","tslib","../Ajax","../Core","../Event/Handler","../StringUtil"],(function(e,t,i,n,o,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(e){this.inactiveSince=0,this.lastRequestTimestamp=window.TIME_NOW,this.requestTimer=void 0,e=o.extend({enableNotifications:!1,icon:""},e),this.icon=e.icon,this.prepareNextRequest(),document.addEventListener("visibilitychange",(e=>this.onVisibilityChange(e))),window.addEventListener("storage",(()=>this.onStorage())),this.onVisibilityChange(),e.enableNotifications&&this.enableNotifications()}async enableNotifications(){switch(window.Notification.permission){case"granted":this.allowNotification=!0;break;case"default":"granted"===await window.Notification.requestPermission()&&(this.allowNotification=!0);break}}onVisibilityChange(e){if(e&&!document.hidden){(Date.now()-this.inactiveSince)/6e4>4&&(this.resetTimer(),this.dispatchRequest())}this.inactiveSince=document.hidden?Date.now():0}getNextDelay(){if(0===this.inactiveSince)return 5;const e=~~((Date.now()-this.inactiveSince)/6e4);return e<15?5:e<30?10:15}resetTimer(){this.requestTimer&&(window.clearTimeout(this.requestTimer),this.requestTimer=void 0)}prepareNextRequest(){this.resetTimer(),this.requestTimer=window.setTimeout(this.dispatchRequest.bind(this),6e4*this.getNextDelay())}dispatchRequest(){const e={};a.fire("com.woltlab.wcf.notification","beforePoll",e),e.lastRequestTimestamp=this.lastRequestTimestamp,n.api(this,{parameters:e})}onStorage(){let e,t;this.prepareNextRequest();let i=!1;try{e=window.localStorage.getItem(o.getStoragePrefix()+"notification"),t=window.localStorage.getItem(o.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),t=JSON.parse(t)}catch(e){i=!0}i||a.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:t})}_ajaxSuccess(e){const t=e.returnValues.keepAliveData,i=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks({returnValues:t});let n=!1;try{window.localStorage.setItem(o.getStoragePrefix()+"notification",JSON.stringify(i)),window.localStorage.setItem(o.getStoragePrefix()+"keepAliveData",JSON.stringify(t))}catch(e){n=!0,window.console.log(e)}n||this.prepareNextRequest(),this.lastRequestTimestamp=e.returnValues.lastRequestTimestamp,a.fire("com.woltlab.wcf.notification","afterPoll",i),this.showNotification(i)}showNotification(e){if(this.allowNotification&&"object"==typeof e.notification&&"string"==typeof e.notification.message){const t=new window.Notification(e.notification.title,{body:r.unescapeHTML(e.notification.message),icon:this.icon});t.onclick=()=>{window.focus(),t.close(),window.location.href=e.notification.link}}}_ajaxSetup(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}let l;t.setup=function(e){l||(l=new s(e))}})),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["require","exports","tslib","../../Event/Handler","../../Language"],(function(e,t,i,n,o){"use strict";function a(e){if(e.preventDefault(),!e.dataTransfer||!e.dataTransfer.types)return;const t=Object.keys(e.dataTransfer).some((e=>e.startsWith("moz")));u=!1,t?"application/x-moz-file"===e.dataTransfer.types[0]&&(u=!0):u=e.dataTransfer.types.some((e=>"Files"===e)),u&&(d||(d=!0,c.forEach(((e,t)=>{const i=e.editor.$editor[0];if(!i.parentElement)return void c.delete(t);let a=e.element;null===a&&(a=document.createElement("div"),a.className="redactorDropArea",a.dataset.elementId=e.editor.$element[0].id,a.dataset.dropHere=o.get("wcf.attachment.dragAndDrop.dropHere"),a.dataset.dropNow=o.get("wcf.attachment.dragAndDrop.dropNow"),a.addEventListener("dragover",(()=>{a.classList.add("active")})),a.addEventListener("dragleave",(()=>{a.classList.remove("active")})),a.addEventListener("drop",(e=>function(e){if(!u)return;if(!e.dataTransfer||!e.dataTransfer.files.length)return;e.preventDefault();const t=e.currentTarget.dataset.elementId;Array.from(e.dataTransfer.files).forEach((e=>{const i={file:e};n.fire("com.woltlab.wcf.redactor2",`dragAndDrop_${t}`,i)})),r()}(e))),e.element=a),i.parentElement.insertBefore(a,i),a.style.setProperty("top",`${i.offsetTop}px`,"")}))))}function r(){d&&u&&(null!==h&&window.clearTimeout(h),h=window.setTimeout((()=>{d||c.forEach((e=>{e.element&&e.element.parentElement&&(e.element.classList.remove("active"),e.element.remove())})),h=null}),100),d=!1)}function s(){window.addEventListener("dragend",(e=>e.preventDefault())),window.addEventListener("dragover",(e=>a(e))),window.addEventListener("dragleave",(()=>r())),window.addEventListener("drop",(e=>function(e){if(null===e.target.closest(".redactor-layer")){const t={cancelDrop:!0,event:e};c.forEach((e=>{n.fire("com.woltlab.wcf.redactor2",`dragAndDrop_globalDrop_${e.editor.$element[0].id}`,t)})),t.cancelDrop&&e.preventDefault()}r()}(e))),l=!0}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let l=!1;const c=new Map;let d=!1,u=!1,h=null;t.init=function(e){l||s(),c.set(e.uuid,{editor:e,element:null})}})),define("WoltLabSuite/Core/Ui/DragAndDrop",["require","exports","tslib","../Core","../Event/Handler","./Redactor/DragAndDrop"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0,n=i.__importStar(n),o=i.__importStar(o),t.register=function(e){const t=n.getUuid();e=n.extend({element:null,elementId:"",onDrop:function(e){},onGlobalDrop:function(e){}}),o.add("com.woltlab.wcf.redactor2",`dragAndDrop_${e.elementId}`,e.onDrop),o.add("com.woltlab.wcf.redactor2",`dragAndDrop_globalDrop_${e.elementId}`,e.onGlobalDrop),a.init({uuid:t,$editor:[e.element],$element:[{id:e.elementId}]})}})),define("WoltLabSuite/Core/Ui/FlexibleMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","../Dom/Traverse","./Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";function s(e){const t=document.getElementById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(u.has(e))return;const i=a.childByTag(t,"UL");if(null===i)throw"Expected an <ul> element as child of container '"+e+"'.";u.set(e,t),m.set(e,i),d(e)}function l(){document.querySelectorAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)").forEach((e=>{const t=a.childByTag(e,"NAV");null!==t&&(e.classList.add("jsFlexibleMenuEnabled"),s(o.default.identify(t)))}))}function c(){u.forEach(((e,t)=>{d(t)}))}function d(e){const t=u.get(e);if(void 0===t)throw"Expected a valid element id, '"+e+"' is unknown.";const i=window.getComputedStyle(t);let n=t.parentNode.clientWidth;n-=o.default.styleAsInt(i,"margin-left"),n-=o.default.styleAsInt(i,"margin-right");const s=m.get(e),l=a.childrenByTag(s,"LI");let c=h.get(e),f=0;if(void 0!==c){for(let e=0,t=l.length;e<t;e++){const t=l[e];t.classList.contains("dropdown")||o.default.show(t)}null!==c.parentNode&&(f=o.default.outerWidth(c))}const g=[];if(s.scrollWidth-f>n)for(let e=l.length-1;e>=0;e--){const t=l[e];if(!(t.classList.contains("dropdown")||t.classList.contains("active")||t.classList.contains("ui-state-active"))&&(g.push(t),o.default.hide(t),s.scrollWidth<n))break}if(g.length){let t;if(void 0===c){c=document.createElement("li"),c.className="dropdown jsFlexibleMenuDropdown";const i=document.createElement("a");i.className="icon icon16 fa-list",c.appendChild(i),t=document.createElement("ul"),t.classList.add("dropdownMenu"),c.appendChild(t),h.set(e,c),p.set(e,t),r.default.init(i)}else t=p.get(e);null===c.parentNode&&s.appendChild(c);const i=document.createDocumentFragment();g.forEach((t=>{const n=document.createElement("li");n.innerHTML=t.innerHTML,n.addEventListener("click",(i=>{var n;i.preventDefault(),null===(n=t.querySelector("a"))||void 0===n||n.click(),setTimeout((()=>{d(e)}),59)})),i.appendChild(n)})),t.innerHTML="",t.appendChild(i)}else void 0!==c&&null!==c.parentNode&&c.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.rebuild=t.rebuildAll=t.registerTabMenus=t.register=t.setup=void 0,n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r);const u=new Map,h=new Map,p=new Map,m=new Map;t.setup=function(){null!==document.getElementById("mainMenu")&&s("mainMenu");const e=document.querySelector(".navigationHeader");null!==e&&s(o.default.identify(e)),window.addEventListener("resize",c),n.default.add("WoltLabSuite/Core/Ui/FlexibleMenu",l)},t.register=s,t.registerTabMenus=l,t.rebuildAll=c,t.rebuild=d})),define("WoltLabSuite/Core/Ui/Suggestion",["require","exports","tslib","../Ajax","../Core","./Dropdown/Simple"],(function(e,t,i,n,o,a){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a);class r{constructor(e,t){this.dropdownMenu=null,this.value="";const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id.");if(this.element=i,this.ajaxPayload=o.extend({actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},t.ajax),"function"!=typeof t.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this.callbackSelect=t.callbackSelect,this.excludedSearchValues=new Set(Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[]),this.threshold=void 0===t.threshold?3:t.threshold,this.element.addEventListener("click",(e=>e.preventDefault())),this.element.addEventListener("keydown",(e=>this.keyDown(e))),this.element.addEventListener("keyup",(e=>this.keyUp(e)))}addExcludedValue(e){this.excludedSearchValues.add(e)}removeExcludedValue(e){this.excludedSearchValues.delete(e)}isActive(){return null!==this.dropdownMenu&&a.default.isOpen(this.element.id)}keyDown(e){if(!this.isActive())return!0;if(-1===["ArrowDown","ArrowUp","Enter","Escape"].indexOf(e.key))return!0;let t,i=0;const n=this.dropdownMenu.childElementCount;for(;i<n&&(t=this.dropdownMenu.children[i],!t.classList.contains("active"));)i++;if("Enter"===e.key)a.default.close(this.element.id),this.select(void 0,t);else if("Escape"===e.key){if(!a.default.isOpen(this.element.id))return!0;a.default.close(this.element.id)}else{let o=0;"ArrowUp"===e.key?o=(0===i?n:i)-1:"ArrowDown"===e.key&&(o=i+1,o===n&&(o=0)),o!==i&&(t.classList.remove("active"),this.dropdownMenu.children[o].classList.add("active"))}return e.preventDefault(),!1}select(e,t){if(e instanceof MouseEvent){t=e.currentTarget.parentNode}const i=t.children[0];this.callbackSelect(this.element.id,{objectId:+(i.dataset.objectId||0),value:t.textContent||"",type:i.dataset.type||""}),e instanceof MouseEvent&&this.element.focus()}keyUp(e){const t=e.currentTarget.value.trim();if(this.value!==t){if(t.length<this.threshold)return null!==this.dropdownMenu&&a.default.close(this.element.id),void(this.value=t);this.value=t,n.api(this,{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:t}}})}}_ajaxSetup(){return{data:this.ajaxPayload}}_ajaxSuccess(e){null===this.dropdownMenu?(this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="dropdownMenu",a.default.initFragment(this.element,this.dropdownMenu)):this.dropdownMenu.innerHTML="",Array.isArray(e.returnValues)&&e.returnValues.length>0?(e.returnValues.forEach(((e,t)=>{const i=document.createElement("a");e.icon?(i.className="box16",i.innerHTML=`${e.icon} <span></span>`,i.children[1].textContent=e.label):i.textContent=e.label,i.dataset.objectId=e.objectID.toString(),e.type&&(i.dataset.type=e.type),i.addEventListener("click",(e=>this.select(e)));const n=document.createElement("li");0===t&&(n.className="active"),n.appendChild(i),this.dropdownMenu.appendChild(n)})),a.default.open(this.element.id,!0)):a.default.close(this.element.id)}}return o.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/ItemList",["require","exports","tslib","../Core","../Dom/Traverse","../Language","./Suggestion","./Dropdown/Simple","../Dom/Util"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(e){const t=y.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems}function d(e){const t=y.get(e);c(e)?(l.default.show(t.element),l.default.hide(t.limitReached)):(l.default.hide(t.element),l.default.show(t.limitReached))}function u(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?_(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}function h(e){if("Enter"===e.key){e.preventDefault();const t=e.currentTarget;if(y.get(t.id).options.restricted)return;const i=t.value.trim();i.length&&g(t.id,{objectId:0,value:i})}}function p(e){const t=e.currentTarget;if(y.get(t.id).options.restricted)return;let i=t.value;i.includes(",")&&(i=i.replace(/,/g,""),i.length?g(t.id,{objectId:0,value:i}):t.value=i)}function m(e){e.preventDefault();const t=e.clipboardData.getData("text/plain"),i=e.currentTarget,n=i.id,o=+i.maxLength;t.split(/,/).forEach((e=>{e=e.trim(),o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&c(n)&&g(n,{objectId:0,value:e})}))}function f(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}function g(e,t){const i=y.get(e),n=document.createElement("li");n.className="item";const o=document.createElement("span");if(o.className="content",o.dataset.objectId=t.objectId.toString(),t.type&&(o.dataset.type=t.type),o.textContent=t.value,n.appendChild(o),!i.element.disabled){const e=document.createElement("a");e.className="icon icon16 fa-times",e.addEventListener("click",_),n.appendChild(e)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||d(e);let a=b(i);"function"==typeof i.options.callbackChange&&(null===a&&(a=w(e)),i.options.callbackChange(e,a))}function _(e,t){if(e instanceof Event){e=e.currentTarget.parentElement}const i=e.parentElement.dataset.elementId||"",n=y.get(i);e.children[0].textContent&&n.suggestion.removeExcludedValue(e.children[0].textContent),e.remove(),t||n.element.focus(),d(i);let o=b(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=w(i)),n.options.callbackChange(i,o))}function b(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);const t=w(e.element.id);return e.shadow.value=w(e.element.id).map((e=>e.value)).join(","),t}function v(e){const t=e.currentTarget,i=y.get(t.id);if(i.options.restricted)return;const n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||g(t.id,{objectId:0,value:n}))}function w(e){const t=y.get(e);if(!t)throw new Error("Element id '"+e+"' is unknown.");const i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:+(e.dataset.objectId||""),value:e.textContent.trim(),type:e.dataset.type})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importDefault(l);const y=new Map;t.init=function(e,t,i){const d=document.getElementById(e);if(null===d)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(y.has(e)){const t=y.get(e);Object.keys(t).forEach((e=>{const i=t[e];i instanceof Element&&i.parentNode&&i.remove()})),s.default.destroy(e),y.delete(e)}const _=n.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},i),b=o.parentByTag(d,"FORM");if(null!==b)if(_.isCSV)b.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}}));else{if(!_.submitFieldName.length&&"function"!=typeof _.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");b.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}const t=w(e);_.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=_.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,b.appendChild(t)})):_.callbackSubmit(b,t)}))}const E=function(e,t){const i=e.parentElement,n=document.createElement("ol");n.className="inputItemList"+(e.disabled?" disabled":""),n.dataset.elementId=e.id,n.addEventListener("click",(t=>{t.target===n&&e.focus()}));const o=document.createElement("li");o.className="input",n.appendChild(o),e.addEventListener("input",p),e.addEventListener("keydown",u),e.addEventListener("keypress",h),e.addEventListener("keyup",f),e.addEventListener("paste",m);const r=e===document.activeElement;r&&e.blur(),e.addEventListener("blur",v),i.insertBefore(n,e),o.appendChild(e),r&&window.setTimeout((()=>{e.focus()}),1),-1!==t.maxLength&&(e.maxLength=t.maxLength);const s=document.createElement("span");s.className="inputItemListLimitReached",s.textContent=a.get("wcf.global.form.input.maxItems"),l.default.hide(s),o.appendChild(s);let c=null;const d=[];if(t.isCSV&&(c=document.createElement("input"),c.className="itemListInputShadow",c.type="hidden",c.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(c,n),e.value.split(",").forEach((e=>{(e=e.trim())&&d.push(e)})),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentNode.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,limitReached:s,list:n,shadow:c,values:d}}(d,_),S=new r.default(e,{ajax:_.ajax,callbackSelect:g,excludedSearchValues:_.excludedSearchValues});y.set(e,{dropdownMenu:null,element:E.element,limitReached:E.limitReached,list:E.list,listItem:E.element.parentElement,options:_,shadow:E.shadow,suggestion:S}),t=_.callbackSetupValues?_.callbackSetupValues():E.values.length?E.values:t,Array.isArray(t)&&t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),g(e,t)}))},t.getValues=w,t.setValues=function(e,t){const i=y.get(e);if(!i)throw new Error("Element id '"+e+"' is unknown.");o.childrenByClass(i.list,"item").forEach((e=>{_(e,!0)})),t.forEach((t=>{g(e,t)}))}})),define("WoltLabSuite/Core/Ui/Pagination",["require","exports","tslib","../Core","../Language","../StringUtil","./Page/JumpTo"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(e,t){this.callbackSwitch=null,this.callbackShouldSwitch=null,this.element=e,this.activePage=t.activePage,this.maxPage=t.maxPage,"function"==typeof t.callbackSwitch&&(this.callbackSwitch=t.callbackSwitch),"function"==typeof t.callbackShouldSwitch&&(this.callbackShouldSwitch=t.callbackShouldSwitch),this.element.classList.add("pagination"),this.rebuild()}rebuild(){let e=!1;this.element.innerHTML="";const t=document.createElement("ul");let i=document.createElement("li");i.className="skip",t.appendChild(i);let n="icon icon24 fa-chevron-left";if(this.activePage>1){const e=document.createElement("a");e.className=n+" jsTooltip",e.href="#",e.title=o.get("wcf.global.page.previous"),e.rel="prev",i.appendChild(e),e.addEventListener("click",(e=>this.switchPage(this.activePage-1,e)))}else i.innerHTML='<span class="'+n+'"></span>',i.classList.add("disabled");t.appendChild(this.createLink(1));let a=s.showLinks-4,l=this.activePage-2;l<0&&(l=0);let c=this.maxPage-(this.activePage+1);c<0&&(c=0),this.activePage>1&&this.activePage<this.maxPage&&a--;const d=a/2;let u=this.activePage,h=this.activePage;u<1&&(u=1),h<1&&(h=1),h>this.maxPage-1&&(h=this.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.maxPage&&(h=this.maxPage);const p='<a class="jsTooltip" title="'+o.get("wcf.page.jumpTo")+'">…</a>';u>1&&(u-1<2?t.appendChild(this.createLink(2)):(i=document.createElement("li"),i.className="jumpTo",i.innerHTML=p,t.appendChild(i),e=!0));for(let e=u+1;e<h;e++)t.appendChild(this.createLink(e));if(h<this.maxPage&&(this.maxPage-h<2?t.appendChild(this.createLink(this.maxPage-1)):(i=document.createElement("li"),i.className="jumpTo",i.innerHTML=p,t.appendChild(i),e=!0)),t.appendChild(this.createLink(this.maxPage)),i=document.createElement("li"),i.className="skip",t.appendChild(i),n="icon icon24 fa-chevron-right",this.activePage<this.maxPage){const e=document.createElement("a");e.className=n+" jsTooltip",e.href="#",e.title=o.get("wcf.global.page.next"),e.rel="next",i.appendChild(e),e.addEventListener("click",(e=>this.switchPage(this.activePage+1,e)))}else i.innerHTML='<span class="'+n+'"></span>',i.classList.add("disabled");e&&(t.dataset.pages=this.maxPage.toString(),r.init(t,this.switchPage.bind(this))),this.element.appendChild(t)}createLink(e){const t=document.createElement("li");if(e!==this.activePage){const i=document.createElement("a");i.textContent=a.addThousandsSeparator(e),i.addEventListener("click",(t=>this.switchPage(e,t))),t.appendChild(i)}else t.classList.add("active"),t.innerHTML="<span>"+a.addThousandsSeparator(e)+'</span><span class="invisible">'+o.get("wcf.page.pagePosition",{pageNo:e,pages:this.maxPage})+"</span>";return t}getActivePage(){return this.activePage}getElement(){return this.element}getMaxPage(){return this.maxPage}switchPage(e,t){if(t instanceof MouseEvent){t.preventDefault();const e=t.currentTarget;if(e&&e.dataset.tooltip){const t=document.getElementById("balloonTooltip");t&&(n.triggerEvent(e,"mouseleave"),t.style.removeProperty("top"),t.style.removeProperty("bottom"))}}if((e=~~e)>0&&this.activePage!==e&&e<=this.maxPage){if(null!==this.callbackShouldSwitch&&!this.callbackShouldSwitch(e))return;this.activePage=e,this.rebuild(),null!==this.callbackSwitch&&this.callbackSwitch(e)}}}return s.showLinks=11,n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Upload/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["require","exports","https://connect.facebook.net/en_US/sdk.js"],(function(e,t){"use strict";return FB.init({version:"v7.0"}),FB})),define("WoltLabSuite/Core/Media/List/Upload",["require","exports","tslib","../Upload","../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_createButton(){super._createButton();const e=this._button.querySelector("span"),t=document.createTextNode(" ");e.insertBefore(t,e.childNodes[0]);const i=document.createElement("span");i.className="icon icon16 fa-upload",e.insertBefore(i,e.childNodes[0])}_getParameters(){return this._options.categoryId?o.extend(super._getParameters(),{categoryID:this._options.categoryId}):super._getParameters()}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Controller/Media/List",["require","exports","tslib","../../Media/List/Upload","../../Media/Clipboard","../../Event/Handler","../../Media/Editor","../../Dom/Change/Listener","../../Controller/Clipboard"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(){Array.from(h.getElementsByClassName("jsMediaEditButton")).forEach((e=>{e.classList.remove("jsMediaEditButton"),e.addEventListener("click",(e=>{return t=e,void u.edit(~~t.currentTarget.dataset.objectId);var t}))}))}function d(e){const t=h.getElementsByTagName("tr").length;void 0===e?t||window.location.reload():e.length===t?window.location.reload():l.reload()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l);const u=new r.default({_editorSuccess:(e,t)=>{e.categoryID!=t&&window.setTimeout((()=>{window.location.reload()}),500)}}),h=document.getElementById("mediaListTableBody");let p;t.init=function(e){e=e||{},p=new n.default("uploadButton","mediaListTableBody",{categoryId:e.categoryId,multiple:!0,elementTagSize:48}),o.init("wcf\\acp\\page\\MediaListPage",e.hasMarkedItems||!1,{clipboardDeleteMedia:e=>function(e){Array.from(document.getElementsByClassName("jsMediaRow")).forEach((t=>{const i=~~t.querySelector(".jsClipboardItem").dataset.objectId;-1!==e.indexOf(i)&&t.remove()})),document.getElementsByClassName("jsMediaRow").length||window.location.reload()}(e)}),a.add("com.woltlab.wcf.media.upload","removedErroneousUploadRow",(()=>d())),new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".jsMediaRow").setCallback(d),c(),s.add("WoltLabSuite/Core/Controller/Media/List",(()=>c())),a.add("com.woltlab.wcf.media.upload","success",(e=>function(e){if(e.upload===p&&!e.isMultiFileUpload&&!p.hasPendingUploads()){const t=Object.keys(e.media);t.length&&u.edit(e.media[t[0]])}}(e)))}})),define("WoltLabSuite/Core/Controller/Notice/Dismiss",["require","exports","tslib","../../Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),t.setup=function(){document.querySelectorAll(".jsDismissNoticeButton").forEach((e=>{e.addEventListener("click",(e=>function(e){const t=e.currentTarget;n.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[t.dataset.objectId]},success:()=>{t.parentElement.remove()}})}(e)))}))}})),define("WoltLabSuite/Core/Devtools/Style/LiveReload",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notify=t.watch=void 0;const i="com.woltlab.wcf#DevTools/Style/LiveReload";t.watch=function(){if(!window.BroadcastChannel)return;new BroadcastChannel(i).onmessage=e=>{const t=document.querySelector("head link[rel=stylesheet]");if(!t)return;const i=new URL(t.href);i.searchParams.set("m",Math.trunc(Date.now()/1e3).toString());const n=document.createElement("link");n.rel="stylesheet",n.addEventListener("load",(()=>{t.remove()})),n.addEventListener("error",(()=>{n.remove()})),n.href=i.toString(),t.insertAdjacentElement("afterend",n)}},t.notify=function(){if(!window.BroadcastChannel)return;new BroadcastChannel(i).postMessage(void 0)}})),define("WoltLabSuite/Core/Form/Builder/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports","tslib","../../../Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,i,n,o){"use strict";function a(){!0!==h?(h=!0,p=!1,o.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),h=!1,p&&a()):p=!0}function r(){const e=[];d.forEach(((t,i)=>{const o=document.getElementById(i);if(null===o)return void e.push(i);let a=!0;var r;t.forEach((e=>{var t;e.checkDependency()||(t=o,n.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&n.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,i=e.getAttribute("max");i&&(t.set("max",i),e.removeAttribute("max"));const n=e.getAttribute("maxlength");n&&(t.set("maxlength",n),e.removeAttribute("maxlength"));const o=e.getAttribute("min");o&&(t.set("min",o),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),a=!1)})),a&&(r=o,n.default.show(r),s.delete(r),r.classList.contains("tabMenuContent")&&r.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===r.dataset.name&&n.default.show(e)})),r.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==r&&!n.default.isHidden(t);)t=t.parentNode;if(t===r&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),a()}Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=t.isHiddenByDependencies=t.checkDependencies=t.checkContainers=t.addDependency=t.addContainerCheckCallback=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let h=!1,p=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");o.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=n.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>r())):e.addEventListener("change",(()=>r())))}))},t.checkContainers=a,t.checkDependencies=r,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((i=>{e.contains(i)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,i)=>{t.contains(document.getElementById(i))&&d.delete(i),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))}})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterForm=t.registerForm=t.registerField=t.hasForm=t.hasField=t.getForm=t.getField=t.getData=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);const c=new Map,d=new Map;t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const i=e.getData();if(!(i instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(i)})),Promise.all(t).then((e=>e.reduce(((e,t)=>n.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof a.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const i=t.getId();if(s(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");c.get(e).set(i,t),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");o.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),r.unregister(e),o.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}})),define("WoltLabSuite/Core/Form/Builder/Dialog",["require","exports","tslib","../../Core","../../Ui/Dialog","../../Ajax","./Manager"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(e,t,i,n){this.init(e,t,i,n)}init(e,t,i,o){this._dialogId=e,this._className=t,this._actionName=i,this._options=n.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:/\w+\\data\\/.test(this._className)},o),this._options.dialog=n.extend(this._options.dialog||{},{onClose:()=>this._dialogOnClose()}),this._formId="",this._dialogContent=""}_ajaxSetup(){const e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+window.SECURITY_TOKEN,e.withCredentials=!0),e}_ajaxSuccess(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(){o.default.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()}_dialogOnClose(){this._options.destroyOnClose&&this.destroy()}_dialogSetup(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}}_dialogSubmit(){this.getData().then((e=>this._submitForm(e)))}_openDialogContent(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;const i=o.default.open(this,this._dialogContent),a=i.content.querySelector("button[data-type=cancel]");null===a||n.stringToBool(a.dataset.hasEventListener||"")||(a.addEventListener("click",(()=>this._closeDialog())),a.dataset.hasEventListener="1"),this._additionalSubmitButtons=Array.from(i.content.querySelectorAll(':not(.formSubmit) button[type="submit"]')),this._additionalSubmitButtons.forEach((e=>{e.addEventListener("click",(()=>{this._additionalSubmitButtons.forEach((t=>{t.dataset.isClicked=t===e?"1":"0"})),setTimeout((()=>o.default.submit(this._dialogId)),0)}))}))}_submitForm(e){const t=o.default.getDialog(this).content.querySelector("button[data-type=submit]");"function"==typeof this._options.onSubmit?this._options.onSubmit(e,t):"string"==typeof this._options.submitActionName&&(t.disabled=!0,this._additionalSubmitButtons.forEach((e=>e.disabled=!0)),a.api(this,{actionName:this._options.submitActionName,parameters:{data:e,formId:this._formId}}))}destroy(e=!1){""!==this._formId&&(r.hasForm(this._formId)&&r.unregisterForm(this._formId),!0!==e&&o.default.destroy(this))}getData(){if(""===this._formId)throw new Error("Form has not been requested yet.");return r.getData(this._formId)}open(){o.default.getDialog(this._dialogId)?o.default.open(this):a.api(this)}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Media/Manager/Search",["require","exports","tslib","../../Dom/Traverse","../../Language","../../Ajax","../../Core","../../Dom/Util"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(e){this._searchMode=!1,this._mediaManager=e;const t=e.getDialog();this._searchContainer=t.querySelector(".mediaManagerSearch"),this._input=t.querySelector(".mediaManagerSearchField"),this._input.addEventListener("keypress",(e=>this._keyPress(e))),this._cancelButton=t.querySelector(".mediaManagerSearchCancelButton"),this._cancelButton.addEventListener("click",(()=>this._cancelSearch()))}_ajaxSetup(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\media\\MediaAction",interfaceName:"wcf\\data\\ISearchAction"}}}_ajaxSuccess(e){this._mediaManager.setMedia(e.returnValues.media||{},e.returnValues.template||"",{pageCount:e.returnValues.pageCount||0,pageNo:e.returnValues.pageNo||0}),this._mediaManager.getDialog().querySelector(".dialogContent").scrollTop=0}_cancelSearch(){this._searchMode&&(this._searchMode=!1,this.resetSearch(),this._mediaManager.resetMedia())}_hideStringThresholdError(){const e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e&&s.default.hide(e)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._input.value.length>=this._mediaManager.getOption("minSearchLength")?(this._hideStringThresholdError(),this.search()):this._showStringThresholdError())}_showStringThresholdError(){let e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e?s.default.show(e):(e=document.createElement("p"),e.className="innerInfo",e.textContent=o.get("wcf.media.search.info.searchStringThreshold",{minSearchLength:this._mediaManager.getOption("minSearchLength")}),this._input.parentNode.insertAdjacentElement("afterend",e))}hideSearch(){s.default.hide(this._searchContainer)}resetSearch(){this._input.value=""}showSearch(){s.default.show(this._searchContainer)}search(e){"number"!=typeof e&&(e=1);let t=this._input.value;t&&this._input.value.length<this._mediaManager.getOption("minSearchLength")?(this._showStringThresholdError(),t=""):this._hideStringThresholdError(),this._searchMode=!0,a.api(this,{parameters:{categoryID:this._mediaManager.getCategoryId(),imagesOnly:this._mediaManager.getOption("imagesOnly"),mode:this._mediaManager.getMode(),pageNo:e,searchString:t}})}}return r.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Media/Manager/Base",["require","exports","tslib","../../Core","../../Language","../../Permission","../../Dom/Change/Listener","../../Event/Handler","../../Dom/Traverse","../../Dom/Util","../../Ui/Dialog","../../Controller/Clipboard","../../Ui/Pagination","../../Ui/Notification","../../StringUtil","./Search","../Upload","../Editor","../Clipboard"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p,m,f,g,_,b){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importDefault(h),p=i.__importStar(p),m=i.__importStar(m),f=i.__importDefault(f),g=i.__importDefault(g),_=i.__importDefault(_),b=i.__importStar(b);let v=0;class w{constructor(e){this._forceClipboard=!1,this._hadInitiallyMarkedItems=!1,this._listItems=new Map,this._media=new Map,this._mediaEditor=null,this._mediaManagerMediaList=null,this._pagination=null,this._search=null,this._upload=null,this._options=n.extend({dialogTitle:o.get("wcf.media.manager"),imagesOnly:!1,minSearchLength:3},e),this._id="mediaManager"+v++,a.get("admin.content.cms.canManageMedia")&&(this._mediaEditor=new _.default(this)),r.add("WoltLabSuite/Core/Media/Manager",(()=>this._addButtonEventListeners())),s.add("com.woltlab.wcf.media.upload","success",(e=>this._openEditorAfterUpload(e)))}_addButtonEventListeners(){this._mediaManagerMediaList&&a.get("admin.content.cms.canManageMedia")&&l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaEditButton");t&&(t.classList.remove("jsMediaEditButton"),t.addEventListener("click",(e=>this._editMedia(e))))}))}_categoryChange(){this._search.search()}_click(e){e.preventDefault(),d.open(this)}_dialogClose(){(a.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.hideEditor("com.woltlab.wcf.media")}_dialogInit(e,t){Object.entries(t.returnValues.media||{}).forEach((([e,t])=>{this._media.set(~~e,t)})),this._initPagination(~~t.returnValues.pageCount),this._hadInitiallyMarkedItems=t.returnValues.hasMarkedItems>0}_dialogSetup(){return{id:this._id,options:{onClose:()=>this._dialogClose(),onShow:()=>this._dialogShow(),title:this._options.dialogTitle},source:{after:(e,t)=>this._dialogInit(e,t),data:{actionName:"getManagementDialog",className:"wcf\\data\\media\\MediaAction",parameters:{mode:this.getMode(),imagesOnly:this._options.imagesOnly}}}}}_dialogShow(){if(!this._mediaManagerMediaList){const e=this.getDialog();this._mediaManagerMediaList=e.querySelector(".mediaManagerMediaList"),this._mediaCategorySelect=e.querySelector(".mediaManagerCategoryList > select"),this._mediaCategorySelect&&this._mediaCategorySelect.addEventListener("change",(()=>this._categoryChange()));const t=l.childrenByTag(this._mediaManagerMediaList,"LI");if(t.forEach((e=>{this._listItems.set(~~e.dataset.objectId,e)})),a.get("admin.content.cms.canManageMedia")){const e=d.getDialog(this).dialog.querySelector(".mediaManagerMediaUploadButton");this._upload=new g.default(c.identify(e),c.identify(this._mediaManagerMediaList),{mediaManager:this});new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".mediaFile")._didTriggerEffect=e=>this.removeMedia(e[0].dataset.objectId)}a.get("admin.content.cms.canManageMedia")||this._forceClipboard?b.init("menuManagerDialog-"+this.getMode(),!!this._hadInitiallyMarkedItems,this):this._removeClipboardCheckboxes(),this._search=new f.default(this),t.length||this._search.hideSearch()}(a.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.showEditor()}_editMedia(e){if(!a.get("admin.content.cms.canManageMedia"))throw new Error("You are not allowed to edit media files.");d.close(this);const t=e.currentTarget;this._mediaEditor.edit(this._media.get(~~t.dataset.objectId))}_editorClose(){d.open(this)}_editorSuccess(e,t){if(this._mediaCategorySelect){const i=~~this._mediaCategorySelect.value;if(i){const n=~~e.categoryID;t==n||t!=i&&n!=i||this._search.search()}}d.open(this),this._media.set(~~e.mediaID,e);const i=this._listItems.get(~~e.mediaID),n=i.querySelector(".mediaTitle");e.isMultilingual?e.title&&e.title[window.LANGUAGE_ID]?n.textContent=e.title[window.LANGUAGE_ID]:n.textContent=e.filename:e.title&&e.title[e.languageID]?n.textContent=e.title[e.languageID]:n.textContent=e.filename;const o=i.querySelector(".mediaThumbnail");o.innerHTML=e.elementTag;const a=o.querySelector("img");a&&(a.src+=`&refresh=${Date.now()}`)}_initPagination(e,t){if(void 0===t&&(t=1),e>1){const i=document.createElement("div");i.className="paginationBottom jsPagination",c.replaceElement(d.getDialog(this).content.querySelector(".jsPagination"),i),this._pagination=new h.default(i,{activePage:t,callbackSwitch:e=>this._search.search(e),maxPage:e})}else this._pagination&&c.hide(this._pagination.getElement())}_removeClipboardCheckboxes(){this._mediaManagerMediaList.querySelectorAll(".mediaCheckbox").forEach((e=>e.remove()))}_openEditorAfterUpload(e){if(e.upload===this._upload&&!e.isMultiFileUpload&&!this._upload.hasPendingUploads()){const t=Object.keys(e.media);t.length&&(d.close(this),this._mediaEditor.edit(this._media.get(~~e.media[t[0]].mediaID)))}}_setMedia(e){this._media=new Map(Object.entries(e).map((([e,t])=>[~~e,t])));let t=l.nextByClass(this._mediaManagerMediaList,"info");this._media.size?t&&c.hide(t):(null===t&&(t=document.createElement("p"),t.className="info",t.textContent=o.get("wcf.media.search.noResults")),c.show(t),c.insertAfter(t,this._mediaManagerMediaList)),l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{this._media.has(~~e.dataset.objectId)?c.show(e):c.hide(e)})),r.trigger(),a.get("admin.content.cms.canManageMedia")||this._forceClipboard?u.reload():this._removeClipboardCheckboxes()}addMedia(e,t){e.languageID||(e.isMultilingual=1),this._media.set(~~e.mediaID,e),this._listItems.set(~~e.mediaID,t),1===this._listItems.size&&this._search.showSearch()}clipboardDeleteMedia(e){e.forEach((e=>{this.removeMedia(~~e)})),p.show()}getCategoryId(){return this._mediaCategorySelect?~~this._mediaCategorySelect.value:0}getDialog(){return d.getDialog(this).dialog}getMode(){return""}getOption(e){return this._options[e]?this._options[e]:null}removeMedia(e){if(this._listItems.has(e)){try{this._listItems.get(e).remove()}catch(e){}this._listItems.delete(e),this._media.delete(e)}}resetMedia(){this._search.search()}setMedia(e,t,i){if(Object.entries(e).length>0){const e=document.createElement("ul");e.innerHTML=t,l.childrenByTag(e,"LI").forEach((e=>{this._listItems.has(~~e.dataset.objectId)||(this._listItems.set(~~e.dataset.objectId,e),this._mediaManagerMediaList.appendChild(e))}))}this._initPagination(i.pageCount,i.pageNo),this._setMedia(e)}setupMediaElement(e,t){const i=l.childByClass(t,"mediaInformation"),r=document.createElement("nav");r.className="jsMobileNavigation buttonGroupNavigation",i.parentNode.appendChild(r);const s=document.createElement("ul");s.className="buttonList iconList",r.appendChild(s);const c=document.createElement("li");c.className="mediaCheckbox",s.appendChild(c);const d=document.createElement("a");c.appendChild(d);const u=document.createElement("label");d.appendChild(u);const h=document.createElement("input");if(h.className="jsClipboardItem",h.type="checkbox",h.dataset.objectId=e.mediaID.toString(),u.appendChild(h),a.get("admin.content.cms.canManageMedia")){const t=document.createElement("li");t.className="jsMediaEditButton",t.dataset.objectId=e.mediaID.toString(),s.appendChild(t),t.innerHTML=`\n <a>\n <span class="icon icon16 fa-pencil jsTooltip" title="${o.get("wcf.global.button.edit")}"></span>\n <span class="invisible">${o.get("wcf.global.button.edit")}</span>\n </a>`;const i=document.createElement("li");i.className="jsDeleteButton",i.dataset.objectId=e.mediaID.toString();const a=n.getUuid();i.dataset.confirmMessageHtml=m.unescapeHTML(o.get("wcf.media.delete.confirmMessage",{title:a})).replace(a,m.escapeHTML(e.filename)),s.appendChild(i),i.innerHTML=`\n <a>\n <span class="icon icon16 fa-times jsTooltip" title="${o.get("wcf.global.button.delete")}"></span>\n <span class="invisible">${o.get("wcf.global.button.delete")}</span>\n </a>`}}}return n.enableLegacyInheritance(w),w})),define("WoltLabSuite/Core/Media/Manager/Editor",["require","exports","tslib","./Base","../../Core","../../Event/Handler","../../Dom/Traverse","../../Language","../../Ui/Dialog","../../Controller/Clipboard","../../Dom/Util"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);class u extends n.default{constructor(e){super(e=o.extend({callbackInsert:null},e)),this._forceClipboard=!0,this._activeButton=null;const t=this._options.editor?this._options.editor.core.toolbar()[0]:void 0;if(this._buttons=(t||window.document).getElementsByClassName(this._options.buttonClass||"jsMediaEditorButton"),Array.from(this._buttons).forEach((e=>{e.addEventListener("click",(e=>this._click(e)))})),this._mediaToInsert=new Map,this._mediaToInsertByClipboard=!1,this._uploadData=null,this._uploadId=null,this._options.editor&&!this._options.editor.opts.woltlab.attachments){const e=this._options.editor.$editor[0].dataset.elementId,t=a.add("com.woltlab.wcf.redactor2",`dragAndDrop_${e}`,(e=>this._editorUpload(e))),i=a.add("com.woltlab.wcf.redactor2",`pasteFromClipboard_${e}`,(e=>this._editorUpload(e)));a.add("com.woltlab.wcf.redactor2",`destroy_${e}`,(()=>{a.remove("com.woltlab.wcf.redactor2",`dragAndDrop_${e}`,t),a.remove("com.woltlab.wcf.redactor2",`dragAndDrop_${e}`,i)})),a.add("com.woltlab.wcf.media.upload","success",(e=>this._mediaUploaded(e)))}}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&r.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaInsertButton");t&&(t.classList.remove("jsMediaInsertButton"),t.addEventListener("click",(e=>this._openInsertDialog(e))))}))}_buildInsertDialog(){let e="";this._getThumbnailSizes().forEach((t=>{e+='<option value="'+t+'">'+s.get("wcf.media.insert.imageSize."+t)+"</option>"})),e+='<option value="original">'+s.get("wcf.media.insert.imageSize.original")+"</option>";const t=`\n <div class="section">\n <dl class="thumbnailSizeSelection">\n <dt>${s.get("wcf.media.insert.imageSize")}</dt>\n <dd>\n <select name="thumbnailSize">\n ${e}\n </select>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button class="buttonPrimary">${s.get("wcf.global.button.insert")}</button>\n </div>`;l.open({_dialogSetup:()=>({id:this._getInsertDialogId(),options:{onClose:()=>this._editorClose(),onSetup:e=>{e.querySelector(".buttonPrimary").addEventListener("click",(e=>this._insertMedia(e))),d.default.show(e.querySelector(".thumbnailSizeSelection"))},title:s.get("wcf.media.insert")},source:t})})}_click(e){this._activeButton=e.currentTarget,super._click(e)}_dialogShow(){if(super._dialogShow(),this._uploadData){const e=this._uploadData;if(e.file)this._upload.uploadFile(e.file);else{const e=this._uploadData;this._uploadId=this._upload.uploadBlob(e.blob)}this._uploadData=null}}_editorUpload(e){this._uploadData=e,l.open(this)}_getInsertDialogId(){return["mediaInsert",...this._mediaToInsert.keys()].join("-")}_getThumbnailSizes(){return["small","medium","large"].map((e=>Array.from(this._mediaToInsert.values()).every((t=>null!==t[e+"ThumbnailType"]))?e:null)).filter((e=>null!==e))}_insertMedia(e,t,i=!1){if(void 0===i&&(i=!0),e){l.close(this._getInsertDialogId());t=e.currentTarget.closest(".dialogContent").querySelector("select[name=thumbnailSize]").value}null!==this._options.callbackInsert?this._options.callbackInsert(this._mediaToInsert,"separate",t):this._options.editor.buffer.set(),this._mediaToInsertByClipboard&&c.unmark("com.woltlab.wcf.media",Array.from(this._mediaToInsert.keys())),this._mediaToInsert=new Map,this._mediaToInsertByClipboard=!1,i&&l.close(this)}_insertMediaItem(e,t){if(t.isImage){let i="";["small","medium","large","original"].some((n=>0!=t[n+"ThumbnailHeight"]&&(i=n,e==n))),(e=i)||(e="original");let n=t.link;"original"!==e&&(n=t[e+"ThumbnailLink"]),this._options.editor.insert.html(`<img src="${n}" class="woltlabSuiteMedia" data-media-id="${t.mediaID}" data-media-size="${e}">`)}else this._options.editor.insert.text(`[wsm='${t.mediaID}'][/wsm]`)}_mediaUploaded(e){null!==this._uploadId&&this._upload===e.upload&&(this._uploadId===e.uploadId||Array.isArray(this._uploadId)&&-1!==this._uploadId.indexOf(e.uploadId))&&(this._mediaToInsert=new Map(e.media.entries()),this._insertMedia(null,"medium",!1),this._uploadId=null)}_openInsertDialog(e){const t=e.currentTarget;this.insertMedia([~~t.dataset.objectId])}clipboardInsertMedia(e){this.insertMedia(e,!0)}insertMedia(e,t){this._mediaToInsert=new Map,this._mediaToInsertByClipboard=t||!1;let i=!0;if(e.forEach((e=>{const t=this._media.get(e);this._mediaToInsert.set(t.mediaID,t),t.isImage||(i=!1)})),i){if(this._getThumbnailSizes().length){l.close(this);const e=this._getInsertDialogId();l.getDialog(e)?l.openStatic(e,null):this._buildInsertDialog()}else this._insertMedia(void 0,"original")}else this._insertMedia()}getMode(){return"editor"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaInsertButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML=`\n <a>\n <span class="icon icon16 fa-plus jsTooltip" title="${s.get("wcf.global.button.insert")}"></span>\n <span class="invisible">${s.get("wcf.global.button.insert")}</span>\n </a>`}}return o.enableLegacyInheritance(u),u})),define("WoltLabSuite/Core/Media/Manager/Select",["require","exports","tslib","./Base","../../Core","../../Dom/Traverse","../../FileUtil","../../Language","../../Ui/Dialog","../../Dom/Util"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c);class d extends n.default{constructor(e){super(e),this._activeButton=null,this._storeElements=new WeakMap,this._buttons=document.getElementsByClassName(this._options.buttonClass||"jsMediaSelectButton"),Array.from(this._buttons).forEach((e=>{const t=e.dataset.store;if(t){const i=document.getElementById(t);if(i&&"INPUT"===i.tagName){e.addEventListener("click",(e=>this._click(e))),this._storeElements.set(e,i);const t=document.createElement("p");t.className="button",e.insertAdjacentElement("afterend",t);const n=document.createElement("span");n.className="icon icon16 fa-times",t.appendChild(n),i.value||c.default.hide(t),t.addEventListener("click",(e=>this._removeMedia(e)))}}}))}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&a.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaSelectButton");t&&(t.classList.remove("jsMediaSelectButton"),t.addEventListener("click",(e=>this._chooseMedia(e))))}))}_chooseMedia(e){if(null===this._activeButton)throw new Error("Media cannot be chosen if no button is active.");const t=e.currentTarget,i=this._media.get(~~t.dataset.objectId),n=document.getElementById(this._activeButton.dataset.store);n.value=i.mediaID.toString(),o.triggerEvent(n,"change");const a=this._activeButton.dataset.display;if(a){const e=document.getElementById(a);if(e)if(i.isImage){const t=i.smallThumbnailLink?i.smallThumbnailLink:i.link,n=i.altText&&i.altText[window.LANGUAGE_ID]?i.altText[window.LANGUAGE_ID]:"";e.innerHTML=`<img src="${t}" alt="${n}" />`}else{let t=r.getIconNameByFilename(i.filename);t&&(t="-"+t),e.innerHTML=`\n <div class="box48" style="margin-bottom: 10px;">\n <span class="icon icon48 fa-file${t}-o"></span>\n <div class="containerHeadline">\n <h3>${i.filename}</h3>\n <p>${i.formattedFilesize}</p>\n </div>\n </div>`}}this._activeButton.nextElementSibling.style.removeProperty("display"),l.close(this)}_click(e){if(e.preventDefault(),this._activeButton=e.currentTarget,super._click(e),!this._mediaManagerMediaList)return;const t=this._storeElements.get(this._activeButton);a.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{t.value&&t.value==e.dataset.objectId?e.classList.add("jsSelected"):e.classList.remove("jsSelected")}))}getMode(){return"select"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaSelectButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML='<a><span class="icon icon16 fa-check jsTooltip" title="'+s.get("wcf.media.button.select")+'"></span> <span class="invisible">'+s.get("wcf.media.button.select")+"</span></a>"}_removeMedia(e){e.preventDefault();const t=e.currentTarget,i=t.previousElementSibling;t.remove();const n=document.getElementById(i.dataset.store);n.value="",o.triggerEvent(n,"change");const a=i.dataset.display;if(a){const e=document.getElementById(a);e&&(e.innerHTML="")}}}return o.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ui/Search/Input",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r);class s{constructor(e,t){if(this.activeItem=void 0,this.callbackDropdownInit=void 0,this.callbackSelect=void 0,this.dropdownContainerId="",this.excludedSearchValues=new Set,this.list=void 0,this.lastValue="",this.request=void 0,this.timerDelay=void 0,this.element=e,!(this.element instanceof HTMLInputElement))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this.element.nodeName||"search"!==this.element.type&&"text"!==this.element.type)throw new Error('Expected an input[type="text"].');t=o.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:void 0,callbackSelect:void 0,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1},t),this.ajaxPayload=t.ajax,this.autoFocus=t.autoFocus,this.callbackDropdownInit=t.callbackDropdownInit,this.callbackSelect=t.callbackSelect,this.delay=t.delay,t.excludedSearchValues.forEach((e=>{this.addExcludedSearchValues(e)})),this.minLength=t.minLength,this.noResultPlaceholder=t.noResultPlaceholder,this.preventSubmit=t.preventSubmit,this.element.autocomplete="off",this.element.addEventListener("keydown",(e=>this.keydown(e))),this.element.addEventListener("keyup",(e=>this.keyup(e)))}addExcludedSearchValues(e){this.excludedSearchValues.add(e)}removeExcludedSearchValues(e){this.excludedSearchValues.delete(e)}keydown(e){(null!==this.activeItem&&r.default.isOpen(this.dropdownContainerId)||this.preventSubmit)&&"Enter"===e.key&&e.preventDefault(),["ArrowUp","ArrowDown","Escape"].includes(e.key)&&e.preventDefault()}keyup(e){if(null!==this.activeItem||!this.autoFocus)if(r.default.isOpen(this.dropdownContainerId)){if("ArrowUp"===e.key)return e.preventDefault(),this.keyboardPreviousItem();if("ArrowDown"===e.key)return e.preventDefault(),this.keyboardNextItem();if("Enter"===e.key)return e.preventDefault(),this.keyboardSelectItem()}else this.activeItem=void 0;if("Escape"===e.key)return void r.default.close(this.dropdownContainerId);const t=this.element.value.trim();this.lastValue!==t&&(this.lastValue=t,t.length<this.minLength?this.dropdownContainerId&&(r.default.close(this.dropdownContainerId),this.activeItem=void 0):this.delay?(this.timerDelay&&window.clearTimeout(this.timerDelay),this.timerDelay=window.setTimeout((()=>{this.search(t)}),this.delay)):this.search(t))}search(e){this.request&&this.request.abortPrevious(),this.request=n.api(this,this.getParameters(e))}getParameters(e){return{parameters:{data:{excludedSearchValues:this.excludedSearchValues,searchString:e}}}}keyboardNextItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.nextElementSibling&&(e=this.activeItem.nextElementSibling)),this.activeItem=e||this.list.children[0],this.activeItem.classList.add("active")}keyboardPreviousItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.previousElementSibling&&(e=this.activeItem.previousElementSibling)),this.activeItem=e||this.list.children[this.list.childElementCount-1],this.activeItem.classList.add("active")}keyboardSelectItem(){this.selectItem(this.activeItem)}clickSelectItem(e){this.selectItem(e.currentTarget)}selectItem(e){this.callbackSelect&&!this.callbackSelect(e)?this.element.value="":this.element.value=e.dataset.label||"",this.activeItem=void 0,r.default.close(this.dropdownContainerId)}_ajaxSuccess(e){let t=!1;if(this.list?this.list.innerHTML="":(this.list=document.createElement("ul"),this.list.className="dropdownMenu",t=!0,"function"==typeof this.callbackDropdownInit&&this.callbackDropdownInit(this.list)),"object"==typeof e.returnValues){const t=this.clickSelectItem.bind(this);let i;Object.keys(e.returnValues).forEach((n=>{i=this.createListItem(e.returnValues[n]),i.addEventListener("click",t),this.list.appendChild(i)}))}if(t){this.element.insertAdjacentElement("afterend",this.list);const e=this.element.parentElement;r.default.initFragment(e,this.list),this.dropdownContainerId=a.default.identify(e)}if(this.dropdownContainerId)if(this.activeItem=void 0,this.list.childElementCount||this.handleEmptyResult()){r.default.open(this.dropdownContainerId,!0);const e=this.list.childElementCount?this.list.children[0]:void 0;this.autoFocus&&e&&~~(e.dataset.objectId||"")&&(this.activeItem=e,this.activeItem.classList.add("active"))}else r.default.close(this.dropdownContainerId)}handleEmptyResult(){if(!this.noResultPlaceholder)return!1;const e=document.createElement("li");e.className="dropdownText";const t=document.createElement("span");return t.textContent=this.noResultPlaceholder,e.appendChild(t),this.list.appendChild(e),!0}createListItem(e){const t=document.createElement("li");t.dataset.objectId=e.objectID.toString(),t.dataset.label=e.label;const i=document.createElement("span");return i.textContent=e.label,t.appendChild(i),t}_ajaxSetup(){return{data:this.ajaxPayload}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class a extends o.default{constructor(e,t){const i=n.isPlainObject(t)&&!0===t.includeUserGroups;super(e,t=n.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:i?1:0}}}},t))}createListItem(e){const t=super.createListItem(e);t.dataset.type=e.type;const i=document.createElement("div");return i.className="box16",i.innerHTML="group"===e.type?'<span class="icon icon16 fa-users"></span>':e.icon,i.appendChild(t.children[0]),t.appendChild(i),t}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Acl/Simple",["require","exports","tslib","../../Core","../../Language","../../StringUtil","../../Dom/Change/Listener","../../Dom/Util","../User/Search/Input"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importDefault(l);class c{constructor(e,t){this.prefix=e||"",this.inputName=t||"aclValues";const i=document.getElementById(this.prefix+"aclInputContainer"),n=document.getElementById(this.prefix+"invertPermissionsDl");document.getElementById(this.prefix+"aclAllowAll").addEventListener("change",(()=>{s.default.hide(i),n&&s.default.hide(n)}));document.getElementById(this.prefix+"aclAllowAll_no").addEventListener("change",(()=>{s.default.show(i),n&&s.default.show(n)})),this.list=document.getElementById(this.prefix+"aclAccessList"),this.list.addEventListener("click",this.removeItem.bind(this));const o=[];this.list.querySelectorAll(".aclLabel").forEach((e=>{o.push(e.textContent)})),this.searchInput=new l.default(document.getElementById(this.prefix+"aclSearchInput"),{callbackSelect:this.select.bind(this),includeUserGroups:!0,excludedSearchValues:o,preventSubmit:!0}),this.aclListContainer=document.getElementById(this.prefix+"aclListContainer");const a=document.getElementById(this.prefix+"invertPermissions");a&&a.addEventListener("change",(()=>{this.invertPermissions(!0)}));const c=document.getElementById(this.prefix+"invertPermissions_no");c&&c.addEventListener("change",(()=>{this.invertPermissions(!1)}));const d=document.getElementById(this.prefix+"invertPermissions");d&&this.invertPermissions(!!d.value),r.default.trigger()}select(e){const t=e.dataset.type,i=e.dataset.label,n=e.dataset.objectId,l=`<span class="icon icon16 fa-${"group"===t?"users":"user"}"></span>\n <span class="aclLabel">${a.escapeHTML(i)}</span>\n <span class="icon icon16 fa-times pointer jsTooltip" title="${o.get("wcf.global.button.delete")}"></span>\n <input type="hidden" name="${this.inputName}[${t}][]" value="${n}">`,c=document.createElement("li");c.innerHTML=l;const d=this.list.querySelector(".fa-user");return null===d?this.list.appendChild(c):this.list.insertBefore(c,d.parentNode),s.default.show(this.aclListContainer),this.searchInput.addExcludedSearchValues(i),r.default.trigger(),!1}removeItem(e){const t=e.target;if(t.classList.contains("fa-times")){const e=t.parentElement,i=e.querySelector(".aclLabel");this.searchInput.removeExcludedSearchValues(i.textContent),e.remove(),0===this.list.childElementCount&&s.default.hide(this.aclListContainer)}}invertPermissions(e){const t=document.getElementById(this.prefix+"aclListContainerDt"),i=document.getElementById(this.prefix+"aclSearchInputLabel");t.textContent=o.get(e?"wcf.acl.access.denied":"wcf.acl.access.granted"),i.textContent=o.get(e?"wcf.acl.access.deny":"wcf.acl.access.grant")}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["require","exports","tslib","../../Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n);class o{constructor(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",this.click.bind(this))}))}click(e){e.preventDefault(),n.api(this)}_ajaxSuccess(){const e=document.querySelector(".mainMenu .active .badge");e&&e.remove(),document.querySelectorAll(".articleList .newMessageBadge").forEach((e=>e.remove()))}_ajaxSetup(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}t.init=function(){new o}})),define("WoltLabSuite/Core/Ui/Article/Search",["require","exports","tslib","../../Ajax","../../Dom/Util","../../Language","../../StringUtil","../Dialog"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(){this.callbackSelect=void 0,this.resultContainer=void 0,this.resultList=void 0,this.searchInput=void 0}open(e){this.callbackSelect=e,s.default.open(this)}search(e){e.preventDefault();const t=this.searchInput.parentElement,i=this.searchInput.value.trim();i.length<3?o.default.innerError(t,a.get("wcf.article.search.error.tooShort")):(o.default.innerError(t,!1),n.api(this,{parameters:{searchString:i}}))}click(e){e.preventDefault();const t=e.currentTarget;this.callbackSelect(+t.dataset.articleId),s.default.close(this)}_ajaxSuccess(e){const t=e.returnValues.map((e=>`<li>\n <div class="containerHeadline pointer" data-article-id="${e.articleID}">\n <h3>${r.escapeHTML(e.name)}</h3>\n <small>${r.escapeHTML(e.displayLink)}</small>\n </div>\n </li>`)).join("");if(this.resultList.innerHTML=t,t?o.default.show(this.resultList):o.default.hide(this.resultList),t)this.resultList.querySelectorAll(".containerHeadline").forEach((e=>{e.addEventListener("click",this.click.bind(this))}));else{const e=this.searchInput.parentElement;o.default.innerError(e,a.get("wcf.article.search.error.noResults"))}}_ajaxSetup(){return{data:{actionName:"search",className:"wcf\\data\\article\\ArticleAction"}}}_dialogSetup(){return{id:"wcfUiArticleSearch",options:{onSetup:()=>{this.searchInput=document.getElementById("wcfUiArticleSearchInput"),this.searchInput.addEventListener("keydown",(e=>{"Enter"===e.key&&this.search(e)}));this.searchInput.nextElementSibling.addEventListener("click",this.search.bind(this)),this.resultContainer=document.getElementById("wcfUiArticleSearchResultContainer"),this.resultList=document.getElementById("wcfUiArticleSearchResultList")},onShow:()=>{this.searchInput.focus()},title:a.get("wcf.article.search")},source:`<div class="section">\n <dl>\n <dt>\n <label for="wcfUiArticleSearchInput">${a.get("wcf.article.search.name")}</label>\n </dt>\n <dd>\n <div class="inputAddon">\n <input type="text" id="wcfUiArticleSearchInput" class="long">\n <a href="#" class="inputSuffix"><span class="icon icon16 fa-search"></span></a>\n </div>\n </dd>\n </dl>\n </div>\n <section id="wcfUiArticleSearchResultContainer" class="section" style="display: none;">\n <header class="sectionHeader">\n <h2 class="sectionTitle">${a.get("wcf.article.search.results")}</h2>\n </header>\n <ol id="wcfUiArticleSearchResultList" class="containerList"></ol>\n </section>`}}}let c;t.open=function(e){(c||(c=new l),c).open(e)}})),define("WoltLabSuite/Core/Ui/Color/Picker",["require","exports","tslib","../../Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);let o=(e,t)=>{if("object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker)return o=(e,t)=>{const i=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&i.setCallbackSubmit(t.callbackSubmit),i},o(e,t);0===a.length&&(window.__wcf_bc_colorPickerInit=()=>{a.forEach((e=>{o(e[0],e[1])})),window.__wcf_bc_colorPickerInit=void 0,a=[]}),a.push([e,t])},a=[];class r{constructor(e,t){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");t=n.extend({callbackSubmit:null},t||{}),o(e,t)}static fromSelector(e){document.querySelectorAll(e).forEach((e=>{new r(e)}))}}return n.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/Comment/Add",["require","exports","tslib","../../Ajax","../../Controller/Captcha","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../Language","../Dialog","../Scroll","../../User","../Notification"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),h=i.__importDefault(h),p=i.__importStar(p);class m{constructor(e){this._editor=null,this._loadingOverlay=null,this._container=e,this._content=this._container.querySelector(".jsOuterEditorContainer"),this._textarea=this._container.querySelector(".wysiwygTextarea"),this._content.addEventListener("click",(e=>{this._content.classList.contains("collapsed")&&(e.preventDefault(),this._content.classList.remove("collapsed"),this._focusEditor())}));this._container.querySelector('button[data-type="save"]').addEventListener("click",(e=>this._submit(e)))}_focusEditor(){u.element(this._container,(()=>{window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor")}))}_submitGuestDialog(e){if(e instanceof KeyboardEvent&&"Enter"!==e.key)return;const t=e.currentTarget.closest(".dialogContent").querySelector("input[name=username]");if(""===t.value)return s.default.innerError(t,c.get("wcf.global.form.error.empty")),void t.closest("dl").classList.add("formError");let i={parameters:{data:{username:t.value}}};if(o.default.has("commentAdd")){const e=o.default.getData("commentAdd");e instanceof Promise?e.then((e=>{i=a.extend(i,e),this._submit(void 0,i)})):(i=a.extend(i,e),this._submit(void 0,i))}else this._submit(void 0,i)}_submit(e,t){if(e&&e.preventDefault(),!this._validate())return;this._showLoadingOverlay();const i=this._getParameters();l.fire("com.woltlab.wcf.redactor2","submit_text",i.data),h.default.userId||t||(i.requireGuestDialog=!0),n.api(this,a.extend({parameters:i},t))}_getParameters(){const e=this._container.closest(".commentList");return{data:{message:this._getEditor().code.get(),objectID:~~e.dataset.objectId,objectTypeID:~~e.dataset.objectTypeId}}}_validate(){if(this._container.querySelectorAll(".innerError").forEach((e=>e.remove())),this._getEditor().utils.isEmpty())return this.throwError(this._textarea,c.get("wcf.global.form.error.empty")),!1;const e={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return l.fire("com.woltlab.wcf.redactor2","validate_text",e),e.valid}throwError(e,t){s.default.innerError(e,"empty"===t?c.get("wcf.global.form.error.empty"):t)}_showLoadingOverlay(){null===this._loadingOverlay&&(this._loadingOverlay=document.createElement("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(){this._content.classList.remove("loading");const e=this._content.querySelector(".commentLoadingOverlay");null!==e&&e.remove()}_reset(){this._getEditor().code.set("<p></p>"),l.fire("com.woltlab.wcf.redactor2","reset_text"),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this._content.classList.add("collapsed")}_handleError(e){this.throwError(this._textarea,e.returnValues.errorType)}_getEditor(){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(e){return s.default.insertHtml(e.returnValues.template,this._container,"after"),p.show(c.get("wcf.global.success.add")),r.default.trigger(),this._container.nextElementSibling}_ajaxSuccess(e){if(!h.default.userId&&e.returnValues.guestDialog){d.default.openStatic("jsDialogGuestComment",e.returnValues.guestDialog,{closable:!1,onClose:()=>{o.default.has("commentAdd")&&o.default.delete("commentAdd")},title:c.get("wcf.global.confirmation.title")});const t=d.default.getDialog("jsDialogGuestComment");t.content.querySelector("input[type=submit]").addEventListener("click",(e=>this._submitGuestDialog(e)));t.content.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._cancelGuestDialog()));t.content.querySelector("input[type=text]").addEventListener("keypress",(e=>this._submitGuestDialog(e)))}else{const t=this._insertMessage(e);h.default.userId||d.default.close("jsDialogGuestComment"),this._reset(),this._hideLoadingOverlay(),window.setTimeout((()=>{u.element(t)}),100)}}_ajaxFailure(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._handleError(e),!1)}_ajaxSetup(){return{data:{actionName:"addComment",className:"wcf\\data\\comment\\CommentAction"},silent:!0}}_cancelGuestDialog(){d.default.close("jsDialogGuestComment"),this._hideLoadingOverlay()}}return a.enableLegacyInheritance(m),m})),define("WoltLabSuite/Core/Ui/Comment/Edit",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Environment","../../Event/Handler","../../Language","../Scroll","../Notification"],(function(e,t,i,n,o,a,r,s,l,c,d,u){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u);class h{constructor(e){this._activeElement=null,this._comments=new WeakSet,this._editorContainer=null,this._container=e,this.rebuild(),a.default.add("Ui/Comment/Edit_"+r.default.identify(this._container),this.rebuild.bind(this))}rebuild(){this._container.querySelectorAll(".comment").forEach((e=>{if(!this._comments.has(e)){if(o.stringToBool(e.dataset.canEdit||"")){const t=e.querySelector(".jsCommentEditButton");null!==t&&t.addEventListener("click",(e=>this._click(e)))}this._comments.add(e)}}))}_click(e){if(e.preventDefault(),null===this._activeElement){const t=e.currentTarget;this._activeElement=t.closest(".comment"),this._prepare(),n.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})}else u.show("wcf.message.error.editorAlreadyInUse",null,"warning")}_prepare(){this._editorContainer=document.createElement("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='<span class="icon icon48 fa-spinner"></span>';const e=this._activeElement.querySelector(".commentContentContainer");e.insertBefore(this._editorContainer,e.firstChild)}_showEditor(e){const t=this._getEditorId(),i=this._editorContainer;i.querySelector(".icon").remove();const n=document.createElement("div");n.className="editorContainer",r.default.setInnerHtml(n,e.returnValues.template),i.appendChild(n);const o=i.querySelector(".formSubmit");o.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save()));o.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),l.add("com.woltlab.wcf.redactor",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()}));const a=document.getElementById(t);"redactor"===s.editor()?window.setTimeout((()=>{d.element(this._activeElement)}),250):a.focus()}_restoreMessage(){this._destroyEditor(),this._editorContainer.remove(),this._activeElement=null}_save(){const e={data:{message:""}},t=this._getEditorId();l.fire("com.woltlab.wcf.redactor2",`getText_${t}`,e.data),this._validate(e)&&(l.fire("com.woltlab.wcf.redactor2",`submit_${t}`,e),n.api(this,{actionName:"save",objectIDs:[this._getObjectId(this._activeElement)],parameters:e}),this._hideEditor())}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=document.getElementById(this._getEditorId());if(window.jQuery(t).data("redactor").utils.isEmpty())return this.throwError(t,c.get("wcf.global.form.error.empty")),!1;const i={api:this,parameters:e,valid:!0};return l.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),i),i.valid}throwError(e,t){r.default.innerError(e,t)}_showMessage(e){const t=this._editorContainer.parentElement.querySelector(".commentContent .userMessage");r.default.setInnerHtml(t,e.returnValues.message),this._restoreMessage(),u.show()}_hideEditor(){const e=this._editorContainer.querySelector(".editorContainer");r.default.hide(e);const t=document.createElement("span");t.className="icon icon48 fa-spinner",this._editorContainer.appendChild(t)}_restoreEditor(){this._editorContainer.querySelector(".fa-spinner").remove();const e=this._editorContainer.querySelector(".editorContainer");null!==e&&r.default.show(e)}_destroyEditor(){l.fire("com.woltlab.wcf.redactor2",`autosaveDestroy_${this._getEditorId()}`),l.fire("com.woltlab.wcf.redactor2",`destroy_${this._getEditorId()}`)}_getEditorId(){return`commentEditor${this._getObjectId(this._activeElement)}`}_getObjectId(e){return~~e.dataset.objectId}_ajaxFailure(e){const t=this._editorContainer.querySelector(".redactor-layer");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.errorType||(r.default.innerError(t,e.returnValues.errorType),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectTypeID:~~this._container.dataset.objectTypeId}}},silent:!0}}}return o.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Dialog/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["require","exports","tslib","../../Core","./Simple"],(function(e,t,i,n,o){"use strict";function a(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 r(e){const t=document.createElement("li");if("divider"===e)return t.className="dropdownDivider",t;"string"==typeof e.identifier&&(t.dataset.identifier=e.identifier);const i=document.createElement("a");if(i.href="string"==typeof e.href?e.href:"#","function"==typeof e.callback)i.addEventListener("click",(t=>{t.preventDefault(),e.callback(i)}));else if("#"===i.href)throw new Error("Expected either a `href` value or a `callback`.");if(e.attributes&&n.isPlainObject(e.attributes)&&Object.keys(e.attributes).forEach((t=>{const n=e.attributes[t];if("string"!=typeof n)throw new Error("Expected only string values.");-1!==t.indexOf("-")?i.setAttribute(`data-${t}`,n):i.dataset[t]=n})),t.appendChild(i),void 0!==e.icon&&n.isPlainObject(e.icon)){if("string"!=typeof e.icon.name)throw new TypeError("Expected a valid icon name.");let t=16;"number"==typeof e.icon.size&&-1!==c.indexOf(~~e.icon.size)&&(t=~~e.icon.size);const n=document.createElement("span");n.className=`icon icon${t} fa-${e.icon.name}`,i.appendChild(n)}const o="string"==typeof e.label?e.label.trim():"",a="string"==typeof e.labelHtml?e.labelHtml.trim():"";if(""===o&&""===a)throw new TypeError("Expected either a label or a `labelHtml`.");const r=document.createElement("span");return r[o?"textContent":"innerHTML"]=o||a,i.appendChild(document.createTextNode(" ")),i.appendChild(r),t}function s(e,t){a(e),e.appendChild(r(t))}function l(e,t){if(a(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");const i=t.length;if(0===i)throw new Error("Expected a non-empty list of items.");if(1===i)s(e,t[0]);else{const i=document.createDocumentFragment();t.forEach((e=>{i.appendChild(r(e))})),e.appendChild(i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.divider=t.attach=t.setItems=t.appendItems=t.appendItem=t.buildItem=t.create=void 0,n=i.__importStar(n),o=i.__importDefault(o);const c=[16,24,32,48,64,96,144];t.create=function(e,t){const i=document.createElement("ul");return i.className="dropdownMenu","string"==typeof t&&(i.dataset.identifier=t),Array.isArray(e)&&e.length>0&&l(i,e),i},t.buildItem=function(e){return r(e)},t.appendItem=s,t.appendItems=l,t.setItems=function(e,t){a(e),e.innerHTML="",l(e,t)},t.attach=function(e,t){a(e),o.default.initFragment(t,e),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),o.default.toggleDropdown(t.id)}))},t.divider=function(){return"divider"}})),define("WoltLabSuite/Core/Ui/Dropdown/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/File/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/File/Delete",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);class s{constructor(e,t,i,n){this.containers=new Map,this.deleteButton=void 0,this.isSingleImagePreview=i,this.uploadHandler=n;const o=document.getElementById(e);if(null===o)throw new Error(`Element id '${e}' is unknown.`);this.buttonContainer=o;const a=document.getElementById(t);if(null===a)throw new Error(`Element id '${t}' is unknown.`);this.target=a;const r=this.target.dataset.internalId;if(!r)throw new Error("InternalId is unknown.");this.internalId=r,this.rebuild()}createButtons(){let e=!1;this.target.querySelectorAll("li.uploadedFile").forEach((t=>{const i=t.dataset.uniqueFileId;if(this.containers.has(i))return;const n={uniqueFileId:i,element:t};this.containers.set(i,n),this.initDeleteButton(t,n),e=!0})),e&&a.default.trigger()}initDeleteButton(e,t){const i=e.querySelector(".buttonGroup");if(null===i)throw new Error(`Button group in '${this.target.id}' is unknown.`);const n=document.createElement("li"),o=document.createElement("span");o.className="button jsDeleteButton small",o.textContent=r.get("wcf.global.button.delete"),n.appendChild(o),i.appendChild(n),n.addEventListener("click",this.deleteElement.bind(this,t.uniqueFileId))}deleteElement(e){n.api(this,{uniqueFileId:e,internalId:this.internalId})}rebuild(){if(!this.isSingleImagePreview)return void this.createButtons();const e=this.target.querySelector("img");if(null!==e){const t=e.dataset.uniqueFileId;if(!this.containers.has(t)){const i={uniqueFileId:t,element:e};this.containers.set(t,i),this.deleteButton=document.createElement("p"),this.deleteButton.className="button deleteButton";const n=document.createElement("span");n.textContent=r.get("wcf.global.button.delete"),this.deleteButton.appendChild(n),this.buttonContainer.appendChild(this.deleteButton),this.deleteButton.addEventListener("click",this.deleteElement.bind(this,i.uniqueFileId))}}}_ajaxSuccess(e){this.containers.get(e.uniqueFileId).element.remove(),this.isSingleImagePreview&&this.deleteButton&&(this.deleteButton.remove(),this.deleteButton=void 0),this.uploadHandler.checkMaxFiles(),o.triggerEvent(this.target,"change")}_ajaxSetup(){return{url:"index.php?ajax-file-delete/&t="+window.SECURITY_TOKEN}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/File/Upload",["require","exports","tslib","../../Core","./Delete","../../Dom/Util","../../Language","../../Upload"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s);class l extends s.default{constructor(e,t,i){if(void 0===(i=i||{}).internalId)throw new Error("Missing internal id.");(i=n.extend({imagePreview:!1,maxFiles:null,className:"invalid",url:`index.php?ajax-file-upload/&t=${window.SECURITY_TOKEN}`},i)).multiple=null===i.maxFiles||i.maxFiles>1,super(e,t,i),this.checkMaxFiles(),this._deleteHandler=new o.default(e,t,this._options.imagePreview,this)}_createFileElement(e){const t=super._createFileElement(e);t.classList.add("box64","uploadedFile");const i=t.querySelector("progress"),n=document.createElement("span");n.className="icon icon64 fa-spinner";const o=t.textContent;t.textContent="",t.append(n);const a=document.createElement("div"),r=document.createElement("p");r.textContent=o;const s=document.createElement("small");s.appendChild(i),a.appendChild(r),a.appendChild(s);const l=document.createElement("div");l.appendChild(a);const c=document.createElement("ul");return c.className="buttonGroup",l.appendChild(c),t.append(l),t}_failure(e,t){throw this._fileElements[e].forEach((e=>{e.classList.add("uploadFailed");const t=e.querySelector("small");t.innerHTML="";const i=e.querySelector(".icon");i.classList.remove("fa-spinner"),i.classList.add("fa-ban");const n=document.createElement("span");n.className="innerError",n.textContent=r.get("wcf.upload.error.uploadFailed"),t.insertAdjacentElement("afterend",n)})),new Error(`Upload failed: ${t.message}`)}_upload(e,t,i){const n=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return n&&n.remove(),super._upload(e,t,i)}_success(e,t){this._fileElements[e].forEach(((i,n)=>{if(void 0!==t.files[n]){const e=t.files[n];if(this._options.imagePreview){if(null===e.image)throw new Error("Expect image for uploaded file. None given.");i.remove();const t=this._target.querySelector("img.previewImage");if(null!==t)t.src=e.image;else{const t=document.createElement("img");t.classList.add("previewImage"),t.src=e.image,t.style.setProperty("max-width","100%",""),t.dataset.uniqueFileId=e.uniqueFileId,this._target.appendChild(t)}}else{i.dataset.uniqueFileId=e.uniqueFileId,i.querySelector("small").textContent=e.filesize.toString();const t=i.querySelector(".icon");t.classList.remove("fa-spinner"),t.classList.add(`fa-${e.icon}`)}}else{if(void 0===t.error[n])throw new Error(`Unknown uploaded file for uploadId ${e}.`);{const e=t.error[n];i.classList.add("uploadFailed");const o=i.querySelector("small");o.innerHTML="";const a=i.querySelector(".icon");a.classList.remove("fa-spinner"),a.classList.add("fa-ban");let r=i.querySelector(".innerError");null===r?(r=document.createElement("span"),r.className="innerError",r.textContent=e.errorMessage,o.insertAdjacentElement("afterend",r)):r.textContent=e.errorMessage}}})),this._deleteHandler.rebuild(),this.checkMaxFiles(),n.triggerEvent(this._target,"change")}_getFormData(){return{internalId:this._options.internalId}}validateUpload(e){if(null===this._options.maxFiles||e.length+this.countFiles()<=this._options.maxFiles)return!0;{let e=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return null===e&&(e=document.createElement("small"),e.className="innerError",this._buttonContainer.insertAdjacentElement("afterend",e)),e.textContent=r.get("wcf.upload.error.reachedRemainingLimit",{maxFiles:this._options.maxFiles-this.countFiles()}),!1}}countFiles(){return this._options.imagePreview?null!==this._target.querySelector("img")?1:0:this._target.childElementCount}checkMaxFiles(){null!==this._options.maxFiles&&this.countFiles()>=this._options.maxFiles?a.default.hide(this._button):a.default.show(this._button)}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/ItemList/Filter",["require","exports","tslib","../../Core","../../Dom/Util","../../Language","../../StringUtil","../Dropdown/Simple"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(e,t){this._dropdownId="",this._dropdown=void 0,this._fragment=void 0,this._items=new Set,this._value="",this._options=n.extend({callbackPrepareItem:void 0,enableVisibilityFilter:!0,filterPosition:"bottom"},t),"top"!==this._options.filterPosition&&(this._options.filterPosition="bottom");const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id, '"+e+"' does not match anything.");if(!i.classList.contains("scrollableCheckboxList")&&"function"!=typeof this._options.callbackPrepareItem)throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");"function"!=typeof this._options.callbackPrepareItem&&(this._options.callbackPrepareItem=e=>this._prepareItem(e)),i.dataset.filter="showAll";const o=document.createElement("div");o.className="itemListFilter",i.insertAdjacentElement("beforebegin",o),o.appendChild(i);const r=document.createElement("div");r.className="inputAddon";const s=document.createElement("input");s.className="long",s.type="text",s.placeholder=a.get("wcf.global.filter.placeholder"),s.addEventListener("keydown",(e=>{"Enter"===e.key&&e.preventDefault()})),s.addEventListener("keyup",(()=>this._keyup()));const l=document.createElement("a");if(l.href="#",l.className="button inputSuffix jsTooltip",l.title=a.get("wcf.global.filter.button.clear"),l.innerHTML='<span class="icon icon16 fa-times"></span>',l.addEventListener("click",(e=>{e.preventDefault(),this.reset()})),r.appendChild(s),r.appendChild(l),this._options.enableVisibilityFilter){const e=document.createElement("a");e.href="#",e.className="button inputSuffix jsTooltip",e.title=a.get("wcf.global.filter.button.visibility"),e.innerHTML='<span class="icon icon16 fa-eye"></span>',e.addEventListener("click",(e=>this._toggleVisibility(e))),r.appendChild(e)}"bottom"===this._options.filterPosition?o.appendChild(r):o.insertBefore(r,i),this._container=o,this._element=i,this._input=s}reset(){this._input.value="",this._keyup()}_buildItems(){this._items.clear(),Array.from(this._element.children).forEach((e=>{this._items.add(this._options.callbackPrepareItem(e))}))}_prepareItem(e){const t=e.children[0],i=t.textContent.trim(),n=t.children[0];for(;n.nextSibling;)t.removeChild(n.nextSibling);t.appendChild(document.createTextNode(" "));const o=document.createElement("span");return o.textContent=i,t.appendChild(o),{item:e,span:o,text:i}}_keyup(){const e=this._input.value.trim();if(this._value===e)return;this._fragment||(this._fragment=document.createDocumentFragment(),this._element.style.setProperty("height",`${this._element.offsetHeight}px`,"")),this._fragment.appendChild(this._element),this._items.size||this._buildItems();const t=new RegExp("("+r.escapeRegExp(e)+")","i");let i=""===e;this._items.forEach((n=>{""===e?(n.span.textContent=n.text,o.default.show(n.item)):t.test(n.text)?(n.span.innerHTML=n.text.replace(t,"<u>$1</u>"),o.default.show(n.item),i=!0):o.default.hide(n.item)})),"bottom"===this._options.filterPosition?this._container.insertAdjacentElement("afterbegin",this._element):this._container.insertAdjacentElement("beforeend",this._element),this._value=e,o.default.innerError(this._container,!i&&a.get("wcf.global.filter.error.noMatches"))}_toggleVisibility(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;if(!this._dropdown){const e=document.createElement("ul");e.className="dropdownMenu",["activeOnly","highlightActive","showAll"].forEach((t=>{const i=document.createElement("a");i.dataset.type=t,i.href="#",i.textContent=a.get(`wcf.global.filter.visibility.${t}`),i.addEventListener("click",(e=>this._setVisibility(e)));const n=document.createElement("li");if(n.appendChild(i),"showAll"===t){n.className="active";const t=document.createElement("li");t.className="dropdownDivider",e.appendChild(t)}e.appendChild(n)})),s.default.initFragment(t,e),this._setupVisibilityFilter(),this._dropdown=e,this._dropdownId=t.id}s.default.toggleDropdown(t.id,t)}_setupVisibilityFilter(){const e=this._element.nextSibling,t=this._element.parentElement,i=this._element.scrollTop;document.createDocumentFragment().appendChild(this._element),this._element.querySelectorAll("li").forEach((e=>{const t=e.querySelector('input[type="checkbox"]');if(t)t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{t.checked?e.classList.add("active"):e.classList.remove("active")}));else{const t=e.querySelector('input[type="radio"]');t&&(t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{this._element.querySelectorAll("li").forEach((e=>e.classList.remove("active"))),t.checked?e.classList.add("active"):e.classList.remove("active")})))}})),t.insertBefore(this._element,e),this._element.scrollTop=i}_setVisibility(e){e.preventDefault();const t=e.currentTarget,i=t.dataset.type;if(s.default.close(this._dropdownId),this._element.dataset.filter===i)return;this._element.dataset.filter=i;this._dropdown.querySelector(".active").classList.remove("active"),t.parentElement.classList.add("active");const n=document.getElementById(this._dropdownId);"showAll"===i?n.classList.remove("active"):n.classList.add("active");const o=n.querySelector(".icon");"showAll"===i?(o.classList.add("fa-eye"),o.classList.remove("fa-eye-slash")):(o.classList.remove("fa-eye"),o.classList.add("fa-eye-slash"))}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/ItemList/Static",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Language","../Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t){const i=document.createElement("ol");i.className="inputItemList"+(e.disabled?" disabled":""),i.dataset.elementId=e.id,i.addEventListener("click",(t=>{t.target===i&&e.focus()}));const n=document.createElement("li");let o;n.className="input",i.appendChild(n),e.addEventListener("keydown",(e=>function(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?d(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}(e))),e.addEventListener("keypress",(e=>function(e){if("Enter"===e.key||"Comma"===e.key){e.preventDefault();const t=e.currentTarget,i=t.value.trim();i.length&&c(t.id,{objectId:0,value:i})}}(e))),e.addEventListener("keyup",(e=>function(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}(e))),e.addEventListener("paste",(e=>function(e){const t=e.currentTarget;e.clipboardData.getData("text/plain").split(",").map((e=>e.trim())).filter((e=>e.length>0)).forEach((e=>{c(t.id,{objectId:0,value:e})})),e.preventDefault()}(e))),e.addEventListener("blur",(e=>function(e){const t=e.currentTarget;window.setTimeout((()=>{const e=t.value.trim();e.length&&c(t.id,{objectId:0,value:e})}),100)}(e))),e.insertAdjacentElement("beforebegin",i),n.appendChild(e),-1!==t.maxLength&&(e.maxLength=t.maxLength);let a=[];if(t.isCSV&&(o=document.createElement("input"),o.className="itemListInputShadow",o.type="hidden",o.name=e.name,e.removeAttribute("name"),i.insertAdjacentElement("beforebegin",o),a=e.value.split(",").map((e=>e.trim())).filter((e=>e.length>0)),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentElement.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,list:i,shadow:o,values:a}}function l(e){const t=p.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.placeholder=a.get("wcf.global.form.input.maxItems")))}function c(e,t,i){const n=p.get(e),o=document.createElement("li");o.className="item";const a=document.createElement("span");if(a.className="content",a.dataset.objectId=t.objectId.toString(),a.textContent=t.value,o.appendChild(a),i||!n.element.disabled){const e=document.createElement("a");e.className="icon icon16 fa-times",e.addEventListener("click",(e=>d(e))),o.appendChild(e)}n.list.insertBefore(o,n.listItem),n.element.value="",n.element.disabled||l(e);let r=u(n);"function"==typeof n.options.callbackChange&&(null===r&&(r=h(e)),n.options.callbackChange(e,r))}function d(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const i=e.parentElement.dataset.elementId,n=p.get(i);e.remove(),t||n.element.focus(),l(i);let o=u(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=h(i)),n.options.callbackChange(i,o))}function u(e){if(!e.options.isCSV)return null;const t=h(e.element.id);return e.shadow.value=t.map((e=>e.value)).join(","),t}function h(e){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const t=p.get(e),i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:~~e.dataset.objectId,value:e.textContent})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);const p=new Map;t.init=function(e,t,i){const a=document.getElementById(e);if(null===a)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(p.has(e)){const t=p.get(e);Object.values(t).forEach((e=>{e instanceof HTMLElement&&e.parentElement&&e.remove()})),r.default.destroy(e),p.delete(e)}const l=n.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},i),d=o.parentByTag(a,"FORM");if(null!==d&&!l.isCSV){if(!l.submitFieldName.length&&"function"!=typeof l.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");d.addEventListener("submit",(()=>{const t=h(e);l.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=l.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,d.appendChild(t)})):l.callbackSubmit(d,t)}))}const u=s(a,l);if(p.set(e,{dropdownMenu:null,element:u.element,list:u.list,listItem:u.element.parentElement,options:l,shadow:u.shadow}),t=u.values.length?u.values:t,Array.isArray(t)){const i=!u.element.disabled;t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),c(e,t,i)}))}},t.getValues=h,t.setValues=function(e,t){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const i=p.get(e);o.childrenByClass(i.list,"item").forEach((e=>d(e,!0))),t.forEach((t=>c(e,t)))}})),define("WoltLabSuite/Core/Ui/ItemList/User",["require","exports","tslib","../ItemList"],(function(e,t,i,n){"use strict";function o(e){const t=a(e.element.id),i=[],n=[];t.forEach((e=>{e.type&&"group"===e.type?n.push(e.objectId):i.push(e.value)}));const o=e.shadow;return o.value=i.join(","),e._shadowGroups||(e._shadowGroups=document.createElement("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=`${o.name}GroupIDs`,o.insertAdjacentElement("beforebegin",e._shadowGroups)),e._shadowGroups.value=n.join(","),t}function a(e){return n.getValues(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.init=void 0,n=i.__importStar(n),t.init=function(e,t){n.init(e,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:t.includeUserGroups?~~t.includeUserGroups:0,restrictUserGroupIDs:Array.isArray(t.restrictUserGroupIDs)?t.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof t.callbackChange?t.callbackChange:null,callbackSyncShadow:t.csvPerType?o:null,callbackSetupValues:"function"==typeof t.callbackSetupValues?t.callbackSetupValues:null,excludedSearchValues:Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[],isCSV:!0,maxItems:t.maxItems?~~t.maxItems:-1,restricted:!0})},t.getValues=a})),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../StringUtil","../Dialog"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c);const d=new Map(Object.entries(window.REACTION_TYPES));class u{constructor(e,t){if(this._containers=new Map,this._currentObjectId=0,this._objects=new Map,!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=o.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},t),this.initContainers(),a.default.add(`WoltLabSuite/Core/Ui/Reaction/CountButtons-${e}`,(()=>this.initContainers()))}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=r.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,summary:null,objectId:n,element:t};this._containers.set(i,o),this._initReactionCountButtons(t,o);const a=this._objects.get(n)||[];a.push(o),this._objects.set(n,a),e=!0})),e&&a.default.trigger()}updateCountButtons(e,t){let i=!1;this._objects.get(e).forEach((e=>{let n;if(n=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.element.querySelector(this._options.summaryListSelector),null===n)return;const o=new Map(Object.entries(t)),a=new Map;n.querySelectorAll(".reactCountButton").forEach((e=>{const t=e.dataset.reactionTypeId;o.has(t)?a.set(t,e):e.remove()})),o.forEach(((e,t)=>{if(a.has(t)){a.get(t).querySelector(".reactionCount").innerHTML=l.shortUnit(e)}else if(d.has(t)){const o=document.createElement("span");o.className="reactCountButton",o.innerHTML=d.get(t).renderedIcon,o.dataset.reactionTypeId=t;const a=document.createElement("span");a.className="reactionCount",a.innerHTML=l.shortUnit(e),o.appendChild(a),n.appendChild(o),i=!0}})),n.childElementCount>0?r.default.show(n):r.default.hide(n)})),i&&a.default.trigger()}_initReactionCountButtons(e,t){let i;i=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.querySelector(this._options.summaryListSelector),null!==i&&i.addEventListener("click",(e=>this._showReactionOverlay(t.objectId,e)))}_showReactionOverlay(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()}_showOverlay(){this._options.parameters.data.containerID=`${this._objectType}-${this._currentObjectId}`,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){s.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),c.default.open(this,e.returnValues.template),c.default.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)}_ajaxSetup(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}}_dialogSetup(){return{id:`userReactionOverlay-${this._objectType}`,options:{title:""},source:null}}}return o.enableLegacyInheritance(u),u})),define("WoltLabSuite/Core/Ui/Reaction/Handler",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../Alignment","../CloseOverlay","../Screen","./CountButtons"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importDefault(d);const u=Object.values(window.REACTION_TYPES);class h{constructor(e,t){if(this.activeButton=void 0,this._cache=new Map,this._containers=new Map,this._objects=new Map,this._popoverCurrentObjectId=0,!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._popover=null,this._popoverContent=null,this._options=o.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},t),this.initReactButtons(),this.countButtons=new d.default(this._objectType,this._options),a.default.add(`WoltLabSuite/Core/Ui/Reaction/Handler-${e}`,(()=>this.initReactButtons())),l.default.add("WoltLabSuite/Core/Ui/Reaction/Handler",(()=>this._closePopover())),this.callbackFocus=e=>this.maintainFocus(e)}initReactButtons(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=r.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,objectId:n,element:t};this._containers.set(i,o),this._initReactButton(t,o);const a=this._objects.get(n)||[];a.push(o),this._objects.set(n,a),e=!0})),e&&a.default.trigger()}_initReactButton(e,t){if(this._options.isSingleItem?t.reactButton=document.querySelector(this._options.buttonSelector):t.reactButton=e.querySelector(this._options.buttonSelector),null!==t.reactButton){if(1===u.length){const e=u[0];t.reactButton.title=e.title;t.reactButton.querySelector(".invisible").textContent=e.title}t.reactButton.setAttribute("role","button"),u.length>1&&(t.reactButton.setAttribute("aria-haspopup","true"),t.reactButton.setAttribute("aria-expanded","false")),t.reactButton.addEventListener("click",(e=>{this._toggleReactPopover(t.objectId,t.reactButton,e)})),t.reactButton.addEventListener("keydown",(e=>{"Enter"===e.key&&(e.preventDefault(),this._toggleReactPopover(t.objectId,t.reactButton,null))}))}}_updateReactButton(e,t){this._objects.get(e).forEach((e=>{null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),e.reactButton.dataset.reactionTypeId=t.toString()):(e.reactButton.dataset.reactionTypeId="0",e.reactButton.classList.remove("active")))}))}_markReactionAsActive(){let e=null;if(this._objects.get(this._popoverCurrentObjectId).forEach((t=>{null!==t.reactButton&&(e=~~t.reactButton.dataset.reactionTypeId)})),null===e)throw new Error("Unable to find react button for current popover.");const t=this._getPopover();t.querySelectorAll(".reactionTypeButton.active").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-selected")}));const i=t.querySelector(".reactionPopoverContent");if(e){const n=t.querySelector(`.reactionTypeButton[data-reaction-type-id="${e}"]`);n.classList.add("active"),n.setAttribute("aria-selected","true"),0==~~n.dataset.isAssignable&&r.default.show(n),this._scrollReactionIntoView(i,n)}else c.is("screen-xs")&&(t.classList.contains("inverseOrder")?i.scrollTop=0:i.scrollTop=i.scrollHeight-i.clientHeight)}_scrollReactionIntoView(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2}_toggleReactPopover(e,t,i){if(null!==i&&(i.preventDefault(),i.stopPropagation()),1===u.length){const t=u[0];this._popoverCurrentObjectId=e,this._react(t.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover()}_openReactPopover(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,s.set(this._getPopover(),t,{pointer:!0,horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:c.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");const i=this._getPopover();"auto"===i.style.getPropertyValue("bottom")?i.classList.add("inverseOrder"):i.classList.remove("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),i.classList.remove("forceHide"),i.classList.add("active"),this.activeButton=t,u.length>1&&(this.activeButton.setAttribute("aria-expanded","true"),document.body.addEventListener("focus",this.callbackFocus,{capture:!0}))}_getPopover(){if(null==this._popover){this._popover=document.createElement("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=document.createElement("div"),this._popoverContent.className="reactionPopoverContent";const e=document.createElement("ul");e.className="reactionTypeButtonList",this._getSortedReactionTypes().forEach((t=>{const i=document.createElement("li");i.tabIndex=0,i.setAttribute("role","button"),i.className="reactionTypeButton jsTooltip",i.dataset.reactionTypeId=t.reactionTypeID.toString(),i.dataset.title=t.title,i.dataset.isAssignable=t.isAssignable.toString(),i.title=t.title;const n=document.createElement("span");n.className="reactionTypeButtonTitle",n.innerHTML=t.title,i.innerHTML=t.renderedIcon,i.appendChild(n),i.addEventListener("click",(()=>this._react(t.reactionTypeID))),i.addEventListener("keydown",(e=>this.keydown(e))),t.isAssignable||r.default.hide(i),e.appendChild(i)})),this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",(()=>this._rebuildOverflowIndicator()),{passive:!0}),this._popover.appendChild(this._popoverContent);const t=document.createElement("span");t.className="elementPointer",t.appendChild(document.createElement("span")),this._popover.appendChild(t),document.body.appendChild(this._popover),a.default.trigger()}return this._popover}keydown(e){if("Enter"===e.key||" "===e.key||"Escape"===e.key){e.preventDefault();const t=this.activeButton;if("Escape"===e.key)this._closePopover();else{const t=~~e.currentTarget.dataset.reactionTypeId;this._react(t)}t.focus()}}_rebuildOverflowIndicator(){const e=this._popoverContent;e.scrollTop>0?e.classList.add("overflowTop"):e.classList.remove("overflowTop");e.scrollTop+e.clientHeight<e.scrollHeight?e.classList.add("overflowBottom"):e.classList.remove("overflowBottom")}_getSortedReactionTypes(){return u.sort(((e,t)=>e.showOrder-t.showOrder))}_closePopover(){if(0!==this._popoverCurrentObjectId){const e=this._getPopover();e.classList.remove("active"),e.querySelectorAll('.reactionTypeButton[data-is-assignable="0"]').forEach((e=>r.default.hide(e))),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach((e=>{e.reactButton.closest("nav").style.cssText=""})),u.length>1&&(this.activeButton.setAttribute("aria-expanded","false"),document.body.removeEventListener("focus",this.callbackFocus,{capture:!0})),this.activeButton=void 0,this._popoverCurrentObjectId=0}}_react(e){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=e,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters}),this._closePopover())}_ajaxSuccess(e){this.countButtons.updateCountButtons(e.returnValues.objectID,e.returnValues.reactions),this._updateReactButton(e.returnValues.objectID,e.returnValues.reactionTypeID)}_ajaxSetup(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}maintainFocus(e){if(document.activeElement&&!document.activeElement.classList.contains("focus-visible"))return;const t=this._getPopover();if(t.contains(e.target))this.wasInsideReactions=!0;else if(this.wasInsideReactions)this.activeButton.focus(),this.wasInsideReactions=!1;else{t.querySelector(".reactionTypeButton").focus()}}}return o.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Like/Handler",["require","exports","tslib","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil","../Reaction/Handler","../../User"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importDefault(l);const c=new Map(Object.entries(window.REACTION_TYPES));class d{constructor(e,t){if(this._containers=new WeakMap,!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=n.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},t),this.initContainers(),o.default.add(`WoltLabSuite/Core/Ui/Like/Handler-${e}`,(()=>this.initContainers())),new s.default(this._objectType,{containerSelector:this._options.containerSelector})}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{if(this._containers.has(t))return;const i={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~t.dataset.likeDislikes,liked:~~t.dataset.likeLiked,likes:~~t.dataset.likeLikes,objectId:~~t.dataset.objectId,users:JSON.parse(t.dataset.likeUsers)};this._containers.set(t,i),this._buildWidget(t,i),e=!0})),e&&o.default.trigger()}_buildWidget(e,t){let i,n=!0;if(i=this._options.isSingleItem?document.querySelector(this._options.summarySelector):e.querySelector(this._options.summarySelector),null===i&&(i=this._options.isSingleItem?document.querySelector(this._options.badgeContainerSelector):e.querySelector(this._options.badgeContainerSelector),n=!1),null!==i){const e=document.createElement("ul");if(e.classList.add("reactionSummaryList"),n?e.classList.add("likesSummary"):e.classList.add("reactionSummaryListTiny"),Object.entries(t.users).forEach((([t,i])=>{const n=c.get(t);if("reactionTypeID"===t||!n)return;const o=document.createElement("li");o.className="reactCountButton",o.setAttribute("reaction-type-id",t);const a=document.createElement("span");a.className="reactionCount",a.innerHTML=r.shortUnit(~~i),o.appendChild(a),o.innerHTML=n.renderedIcon+o.innerHTML,e.appendChild(o)})),n)this._options.summaryPrepend?i.insertAdjacentElement("afterbegin",e):i.insertAdjacentElement("beforeend",e);else if("OL"===i.nodeName||"UL"===i.nodeName){const t=document.createElement("li");t.appendChild(e),i.appendChild(t)}else i.appendChild(e);t.badge=e}if(this._options.canLike&&(l.default.userId!=~~e.dataset.userId||this._options.canLikeOwnContent)){let i=null;this._options.buttonAppendToSelector&&(i=this._options.isSingleItem?document.querySelector(this._options.buttonAppendToSelector):e.querySelector(this._options.buttonAppendToSelector));let n=null;if(this._options.buttonBeforeSelector&&(n=this._options.isSingleItem?document.querySelector(this._options.buttonBeforeSelector):e.querySelector(this._options.buttonBeforeSelector)),null===n&&null===i)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,n,i)}}_createButton(e,t,i,n){const o=a.get("wcf.reactions.react"),r=document.createElement("li");r.className="wcfReactButton";const s=document.createElement("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=o;const l=document.createElement("span");l.className="icon icon16 fa-smile-o",void 0===t||0==t?l.dataset.reactionTypeId="0":(s.dataset.reactionTypeId=t.toString(),s.classList.add("active")),s.appendChild(l);const c=document.createElement("span");return c.className="invisible",c.innerHTML=o,s.appendChild(document.createTextNode(" ")),s.appendChild(c),r.appendChild(s),i?i.insertAdjacentElement("beforebegin",r):n.insertAdjacentElement("beforeend",r),s}}return n.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Environment","../../Event/Handler","../../Language","../Dropdown/Reusable","../Notification","../Scroll"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importStar(h);class p{constructor(e){this.init(e)}init(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new WeakMap,this._options=o.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),a.default.add(`Ui/Message/InlineEdit_${this._options.className}`,(()=>this.rebuild()))}rebuild(){document.querySelectorAll(this._options.messageSelector).forEach((e=>{if(this._elements.has(e))return;const t=e.querySelector(".jsMessageEditButton");if(null!==t){const i=o.stringToBool(e.dataset.canEdit||""),n=o.stringToBool(e.dataset.canEditInline||"");this._options.canEditInline||n?(t.addEventListener("click",(t=>this._clickDropdown(e,t))),t.classList.add("jsDropdownEnabled"),i&&t.addEventListener("dblclick",(t=>this._click(e,t)))):i&&t.addEventListener("click",(t=>this._click(e,t)))}const i=e.querySelector(".messageBody"),n=e.querySelector(".messageFooter"),a=n.querySelector(".messageFooterButtons"),r=e.querySelector(".messageHeader"),s=i.querySelector(".messageText");this._elements.set(e,{button:t,messageBody:i,messageBodyEditor:null,messageFooter:n,messageFooterButtons:a,messageHeader:r,messageText:s})}))}_click(e,t){null===e&&(e=this._activeDropdownElement),t&&t.preventDefault(),null===this._activeElement?(this._activeElement=e,this._prepare(),n.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(e)}})):u.show("wcf.message.error.editorAlreadyInUse",void 0,"warning")}_clickDropdown(e,t){t.preventDefault();const i=t.currentTarget;if(!i.classList.contains("dropdownToggle")){if(i.classList.add("dropdownToggle"),i.parentElement.classList.add("dropdown"),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this._activeDropdownElement=e,d.toggleDropdown(this._options.dropdownIdentifier,i)})),null===this._dropdownMenu){this._dropdownMenu=document.createElement("ul"),this._dropdownMenu.className="dropdownMenu";const e=this._dropdownGetItems();l.fire("com.woltlab.wcf.inlineEditor",`dropdownInit_${this._options.dropdownIdentifier}`,{items:e}),this._dropdownBuild(e),d.init(this._options.dropdownIdentifier,this._dropdownMenu),d.registerCallback(this._options.dropdownIdentifier,((e,t)=>this._dropdownToggle(e,t)))}setTimeout((()=>i.click()),10)}}_dropdownBuild(e){e.forEach((e=>{const t=document.createElement("li");if(t.dataset.item=e.item,"divider"===e.item)t.className="dropdownDivider";else{const i=document.createElement("span");i.textContent=c.get(e.label),t.appendChild(i),"editItem"===e.item?t.addEventListener("click",(e=>this._click(null,e))):t.addEventListener("click",(e=>this._clickDropdownItem(e)))}this._dropdownMenu.appendChild(t)}))}_dropdownToggle(e,t){const i=this._elements.get(this._activeDropdownElement),n=i.button.parentElement;if("close"===t)return n.classList.remove("dropdownOpen"),void i.messageFooterButtons.classList.remove("forceVisible");n.classList.add("dropdownOpen"),i.messageFooterButtons.classList.add("forceVisible");const o=new Map(Object.entries(this._dropdownOpen()));l.fire("com.woltlab.wcf.inlineEditor",`dropdownOpen_${this._options.dropdownIdentifier}`,{element:this._activeDropdownElement,visibility:o});const a=this._dropdownMenu;let s=!1;const c=Array.from(a.children);c.forEach(((e,t)=>{const i=e.dataset.item;if("divider"===i)s?(r.default.show(e),s=!1):r.default.hide(e);else if(!1===o.get(i)){if(r.default.hide(e),t>0&&t+1===c.length){const t=e.previousElementSibling;"divider"===t.dataset.item&&r.default.hide(t)}}else r.default.show(e),s=!0}))}_dropdownGetItems(){return[]}_dropdownOpen(){return{}}_dropdownSelect(e){}_clickDropdownItem(e){e.preventDefault();const t=e.currentTarget.dataset.item,i={cancel:!1,element:this._activeDropdownElement,item:t};l.fire("com.woltlab.wcf.inlineEditor",`dropdownItemClick_${this._options.dropdownIdentifier}`,i),i.cancel?e.preventDefault():this._dropdownSelect(t)}_prepare(){const e=this._elements.get(this._activeElement),t=document.createElement("div");t.className="messageBody editor",e.messageBodyEditor=t;const i=document.createElement("span");i.className="icon icon48 fa-spinner",t.appendChild(i),e.messageBody.insertAdjacentElement("afterend",t),r.default.hide(e.messageBody)}_showEditor(e){const t=this._getEditorId(),i=this._activeElement,n=this._elements.get(i);i.classList.add("jsInvalidQuoteTarget");n.messageBodyEditor.querySelector(".icon").remove();const o=n.messageBodyEditor,a=document.createElement("div");a.className="editorContainer",r.default.setInnerHtml(a,e.returnValues.template),o.appendChild(a);const c=a.querySelector(".formSubmit");c.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save()));if(c.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),l.add("com.woltlab.wcf.redactor",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()})),r.default.hide(n.messageHeader),r.default.hide(n.messageFooter),"redactor"===s.editor())window.setTimeout((()=>{this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(i)}),250);else{document.getElementById(t).focus()}}_restoreMessage(){const e=this._activeElement,t=this._elements.get(e);this._destroyEditor(),t.messageBodyEditor.remove(),t.messageBodyEditor=null,r.default.show(t.messageBody),r.default.show(t.messageFooter),r.default.show(t.messageHeader),e.classList.remove("jsInvalidQuoteTarget"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()}_save(){const e={containerID:this._options.containerId,data:{message:""},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},t=this._getEditorId(),i=document.getElementById(`settings_${t}`);i&&i.querySelectorAll("input, select, textarea").forEach((t=>{if("INPUT"===t.nodeName&&("checkbox"===t.type||"radio"===t.type)&&!t.checked)return;const i=t.name;if(Object.prototype.hasOwnProperty.call(e,i))throw new Error(`Variable overshadowing, key '${i}' is already present.`);e[i]=t.value.trim()})),l.fire("com.woltlab.wcf.redactor2",`getText_${t}`,e.data);let o=this._validate(e);o instanceof Promise||(o=!1===o?Promise.reject():Promise.resolve()),o.then((()=>{l.fire("com.woltlab.wcf.redactor2",`submit_${t}`,e),n.api(this,{actionName:"save",parameters:e}),this._hideEditor()}),(e=>{const t=e.message;console.log(`Validation of post edit failed: ${t}`)}))}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t={api:this,parameters:e,valid:!0,promises:[]};return l.fire("com.woltlab.wcf.redactor2",`validate_${this._getEditorId()}`,t),t.valid?t.promises.push(Promise.resolve()):t.promises.push(Promise.reject()),Promise.all(t.promises)}throwError(e,t){r.default.innerError(e,t)}_showMessage(e){const t=this._activeElement,i=this._getEditorId(),n=this._elements.get(t);if(r.default.setInnerHtml(n.messageBody.querySelector(".messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){n.messageFooter.querySelectorAll(".attachmentThumbnailList, .attachmentFileList").forEach((e=>e.remove()));const t=document.createElement("div");let i;for(r.default.setInnerHtml(t,e.returnValues.attachmentList);t.childNodes.length;)i=t.childNodes[t.childNodes.length-1],n.messageFooter.insertBefore(i,n.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){const t=n.messageBody.querySelector(".pollContainer");null!==t&&t.parentElement.remove();const i=document.createElement("div");i.className="jsInlineEditorHideContent",r.default.setInnerHtml(i,e.returnValues.poll),n.messageBody.insertAdjacentElement("afterbegin",i)}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),l.fire("com.woltlab.wcf.redactor",`autosaveDestroy_${i}`),u.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())}_hideEditor(){const e=this._elements.get(this._activeElement),t=e.messageBodyEditor.querySelector(".editorContainer");r.default.hide(t);const i=document.createElement("span");i.className="icon icon48 fa-spinner",e.messageBodyEditor.appendChild(i)}_restoreEditor(){const e=this._elements.get(this._activeElement).messageBodyEditor;e.querySelector(".fa-spinner").remove();const t=e.querySelector(".editorContainer");null!==t&&r.default.show(t)}_destroyEditor(){l.fire("com.woltlab.wcf.redactor2",`autosaveDestroy_${this._getEditorId()}`),l.fire("com.woltlab.wcf.redactor2",`destroy_${this._getEditorId()}`)}_getHash(e){return`#message${e}`}_updateHistory(e){window.location.hash=e}_getEditorId(){return this._options.editorPrefix+this._getObjectId(this._activeElement).toString()}_getObjectId(e){return e.dataset.objectId||""}_ajaxFailure(e){const t=this._elements.get(this._activeElement).messageBodyEditor.querySelector(".redactor-layer");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(r.default.innerError(t,e.returnValues.realErrorMessage),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}}legacyEdit(e){this._click(document.getElementById(e),null)}}return o.enableLegacyInheritance(p),p})),define("WoltLabSuite/Core/Ui/Message/Manager",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e){this._elements=new Map,this._options=o.extend({className:"",selector:""},e),this.rebuild(),a.default.add(`Ui/Message/Manager${this._options.className}`,this.rebuild.bind(this))}rebuild(){this._elements.clear(),document.querySelectorAll(this._options.selector).forEach((e=>{this._elements.set(e.dataset.objectId,e)}))}getPermission(e,t){t="can"+s.ucfirst(t);const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);return o.stringToBool(i.dataset[s.toCamelCase(t)]||"")}getPropertyValue(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const a=n.dataset[s.toCamelCase(t)]||"";return i?o.stringToBool(a):a}update(e,t,i){n.api(this,{actionName:t,parameters:i||{},objectIDs:[e]})}updateItems(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{const i=this._elements.get(e);void 0!==i&&Object.entries(t).forEach((([e,t])=>{this._update(i,e,t)}))}))}updateAllItems(e){const t=Array.from(this._elements.keys());this.updateItems(t,e)}setNote(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const o=n.querySelector(".messageFooterNotes");let a=o.querySelector(`.${t}`);i?(null===a&&(a=document.createElement("p"),a.className="messageFooterNote "+t,o.appendChild(a)),a.innerHTML=i):null!==a&&a.remove()}_update(e,t,i){e.dataset[t]=i.toString();const n=1==i||!0===i||"true"===i;this._updateState(e,t,i,n)}_updateState(e,t,i,n){switch(t){case"isDeleted":n?e.classList.add("messageDeleted"):e.classList.remove("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",n);break;case"isDisabled":n?e.classList.add("messageDisabled"):e.classList.remove("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",n)}}_toggleMessageStatus(e,t,i,n,o){let a=e.querySelector(".messageStatus");if(null===a){const t=e.querySelector(".messageHeaderMetaData");if(null===t)return;a=document.createElement("ul"),a.className="messageStatus",t.insertAdjacentElement("afterend",a)}let s=a.querySelector(`.${t}`);if(o){if(null!==s)return;s=document.createElement("span"),s.className=`badge label ${n} ${t}`,s.textContent=r.get(i);const e=document.createElement("li");e.appendChild(s),a.appendChild(e)}else{if(null===s)return;s.parentElement.remove()}}_getAttributeName(e){return-1!==e.indexOf("-")?e:e.split(/([A-Z][a-z]+)/).map((e=>e.trim().toLowerCase())).filter((e=>e.length>0)).join("-")}_ajaxSuccess(e){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")}_ajaxSetup(){return{data:{className:this._options.className}}}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Message/Quote",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util"],(function(e,t,i,n,o,a,r,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiMessageQuote=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importDefault(l);class c{constructor(e,t,i,n,o,a,r){this.activeMessageId="",this.containers=new Map,this.containerSelector="",this.copyQuote=document.createElement("div"),this.message="",this.objectId=0,this.objectType="",this.timerSelectionChange=void 0,this.isMouseDown=!1,this.className=t,this.objectType=i,this.containerSelector=n,this.messageBodySelector=o,this.initContainers(),r=r&&e.supportPaste(),this.quoteManager=e,this.initCopyQuote(r),document.addEventListener("mouseup",(e=>this.onMouseUp(e))),document.addEventListener("selectionchange",(()=>this.onSelectionchange())),s.default.add("UiMessageQuote",(()=>this.initContainers())),document.addEventListener("touchstart",(e=>{if(this.copyQuote.classList.contains("active")){const t=e.target;t===this.copyQuote||this.copyQuote.contains(t)||(this.copyQuote.classList.add("touchForceInaccessible"),document.addEventListener("touchend",(()=>{this.copyQuote.classList.remove("touchForceInaccessible")}),{once:!0}))}}),{passive:!0})}initContainers(){document.querySelectorAll(this.containerSelector).forEach((e=>{var t;const i=l.default.identify(e);this.containers.has(i)||(this.containers.set(i,e),e.classList.contains("jsInvalidQuoteTarget")||(e.addEventListener("mousedown",(e=>this.onMouseDown(e))),e.classList.add("jsQuoteMessageContainer"),null===(t=e.querySelector(".jsQuoteMessage"))||void 0===t||t.addEventListener("click",(e=>this.saveFullQuote(e)))))}))}onSelectionchange(){if(!this.isMouseDown){if(""===this.activeMessageId){const e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return;const t=e.getRangeAt(0),i=l.default.closest(t.startContainer,".jsQuoteMessageContainer"),n=l.default.closest(t.endContainer,".jsQuoteMessageContainer");if(i&&i===n&&!i.classList.contains("jsInvalidQuoteTarget")){let e=t.commonAncestorContainer;e.nodeType!==Node.ELEMENT_NODE&&(e=e.parentElement);const n=e.offsetParent;if(i.contains(n)&&n.scrollTop+n.clientHeight<e.offsetTop)return;this.activeMessageId=i.id}}this.timerSelectionChange&&window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=window.setTimeout((()=>this.onMouseUp()),100)}}onMouseDown(e){this.copyQuote.classList.remove("active");const t=e.currentTarget;this.activeMessageId=t.classList.contains("jsInvalidQuoteTarget")?"":t.id,this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!0}getNodeText(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>"BLOCKQUOTE"===e.nodeName||"SCRIPT"===e.nodeName?NodeFilter.FILTER_REJECT:!(e instanceof HTMLImageElement)||e.classList.contains("smiley")&&e.alt?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i="";const n=[];for(;t.nextNode();){const e=t.currentNode;if(e instanceof Text){const t=e.parentElement;if(t instanceof HTMLAnchorElement&&n.includes(t))continue;i+=e.nodeValue.replace(/\n/g," ")}else{if(e instanceof HTMLAnchorElement){const t=e.textContent;if(t.indexOf("…")>0){const o=t.split(/\u2026/);if(2===o.length){const t=e.href;0===t.indexOf(o[0])&&t.substr(-1*o[1].length)===o[1]&&(i+=t,n.push(e))}}}switch(e.nodeName){case"BR":case"LI":case"TD":case"UL":i+="\n";break;case"P":i+="\n\n";break;case"IMG":i+=` ${e.alt} `;break;case"DIV":(e.classList.contains("codeBoxHeadline")||e.classList.contains("codeBoxLine"))&&(i+="\n")}}}return i}onMouseUp(e){if(e instanceof Event&&(this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!1),""===this.activeMessageId)return void this.copyQuote.classList.remove("active");const t=window.getSelection();if(1!==t.rangeCount||t.isCollapsed)return void this.copyQuote.classList.remove("active");const i=this.containers.get(this.activeMessageId),n=~~i.dataset.objectId,o=this.messageBodySelector?i.querySelector(this.messageBodySelector):i;let a=t.anchorNode;for(;a&&a!==o;)a=a.parentNode;if(a!==o)return void this.copyQuote.classList.remove("active");const r=this.getSelectedText().trim();if(""===r)return void this.copyQuote.classList.remove("active");const s=t.getRangeAt(0),c=l.default.getClosestElement(s.startContainer),d=l.default.getClosestElement(s.endContainer);if(c.closest("blockquote")||d.closest("blockquote"))return void this.copyQuote.classList.remove("active");const u=this.getNodeText(o);if(!this.normalizeTextForComparison(u).includes(this.normalizeTextForComparison(r)))return;this.copyQuote.classList.add("active");const h=this.getElementBoundaries(t),p=(this.copyQuote.offsetHeight,this.copyQuote.offsetWidth);let m=(h.right-h.left)/2-p/2+h.left;const f=o.getBoundingClientRect();m<f.left?m=f.left:m+p>f.right&&(m=f.right-p),this.copyQuote.style.setProperty("top",`${h.bottom+7}px`),this.copyQuote.style.setProperty("left",`${m}px`),this.copyQuote.classList.remove("active"),this.timerSelectionChange?(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0):this.activeMessageId="",window.setTimeout((()=>{const e=this.getSelectedText().trim();""!==e&&(this.copyQuote.classList.add("active"),this.message=e,this.objectId=n)}),10)}normalizeTextForComparison(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")}getElementBoundaries(e){let t=null;if(e.rangeCount>0){const i=e.getRangeAt(0).getBoundingClientRect(),n=window.pageYOffset;t={bottom:i.bottom+n,left:i.left,right:i.right,top:i.top+n}}return t}initCopyQuote(e){const t=document.getElementById("quoteManagerCopy");null==t||t.remove(),this.copyQuote.id="quoteManagerCopy",this.copyQuote.classList.add("balloonTooltip","interactive");const i=document.createElement("span");if(i.classList.add("jsQuoteManagerStore"),i.textContent=r.get("wcf.message.quote.quoteSelected"),i.addEventListener("click",(e=>this.saveQuote(e))),this.copyQuote.appendChild(i),e){const e=document.createElement("span");e.classList.add("jsQuoteManagerQuoteAndInsert"),e.textContent=r.get("wcf.message.quote.quoteAndReply"),e.addEventListener("click",(e=>this.saveAndInsertQuote(e))),this.copyQuote.appendChild(e)}document.body.appendChild(this.copyQuote)}getSelectedText(){const e=window.getSelection();return e.rangeCount?this.getNodeText(e.getRangeAt(0).cloneContents()):""}saveFullQuote(e){e.preventDefault();const t=e.currentTarget;n.api(this,{actionName:"saveFullQuote",objectIDs:[t.dataset.objectId]});const i=t.querySelector("a");o.stringToBool(t.dataset.isQuoted||"")?(t.dataset.isQuoted="false",i.classList.remove("active")):(t.dataset.isQuoted="true",i.classList.add("active"));const a=t.closest(".buttonGroupNavigation");if(a.classList.contains("jsMobileButtonGroupNavigation")){a.querySelector(".dropdownLabel").click()}}saveQuote(e,t=!1){null==e||e.preventDefault(),n.api(this,{actionName:"saveQuote",objectIDs:[this.objectId],parameters:{message:this.message,renderQuote:t}});const i=window.getSelection();i.rangeCount&&(i.removeAllRanges(),this.copyQuote.classList.remove("active"))}saveAndInsertQuote(e){e.preventDefault(),this.saveQuote(void 0,!0)}_ajaxSuccess(e){if(void 0!==e.returnValues.count){void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs);const t=e.returnValues.fullQuoteObjectIDs||{};this.quoteManager.updateCount(e.returnValues.count,t)}switch(e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&a.fire("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName,quote:e.returnValues.renderedQuote})}}_ajaxSetup(){return{data:{className:this.className,interfaceName:"wcf\\data\\IMessageQuoteAction"}}}updateFullQuoteObjectIDs(e){this.containers.forEach((t=>{const i=t.querySelector(".jsQuoteMessage");i.dataset.isQuoted="false";const n=i.querySelector("a");i.classList.remove("active");const o=~~i.dataset.objectID;e.includes(o)&&(i.dataset.isQuoted="true",n.classList.add("active"))}))}}t.UiMessageQuote=c,t.default=c})),define("WoltLabSuite/Core/Ui/Message/Reply",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util","../Dialog","../Notification","../../User","../../Controller/Captcha","../Scroll"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importDefault(c),d=i.__importStar(d),u=i.__importDefault(u),h=i.__importDefault(h),p=i.__importStar(p);class m{constructor(e){this._editor=null,this._guestDialogId="",this._loadingOverlay=null,this._options=o.extend({ajax:{className:""},quoteManager:null,successMessage:"wcf.global.success.add"},e),this._container=document.getElementById("messageQuickReply"),this._content=this._container.querySelector(".messageContent"),this._textarea=document.getElementById("text"),this._container.querySelector(".message").classList.add("jsInvalidQuoteTarget");this._container.querySelector('button[data-type="save"]').addEventListener("click",(e=>this._submit(e))),document.querySelectorAll(".jsQuickReply").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this._getEditor().WoltLabReply.showEditor(),p.element(this._container,(()=>{this._getEditor().WoltLabCaret.endOfEditor()}))}))}))}_submitGuestDialog(e){if(e instanceof KeyboardEvent&&"Enter"!==e.key)return;const t=e.currentTarget,i=t.closest(".dialogContent").querySelector("input[name=username]");if(""===i.value)return l.default.innerError(i,r.get("wcf.global.form.error.empty")),void i.closest("dl").classList.add("formError");let n={parameters:{data:{username:i.value}}};const a=t.dataset.captchaId;if(h.default.has(a)){const e=h.default.getData(a);e instanceof Promise?e.then((e=>{n=o.extend(n,e),this._submit(void 0,n)})):(n=o.extend(n,e),this._submit(void 0,n))}else this._submit(void 0,n)}_submit(e,t){if(e&&e.preventDefault(),this._content.classList.contains("loading")&&(!this._guestDialogId||!c.default.isOpen(this._guestDialogId)))return;if(!this._validate())return;this._showLoadingOverlay();const i={};Object.entries(this._container.dataset).forEach((([e,t])=>{i[e.replace(/Id$/,"ID")]=t})),i.data={message:this._getEditor().code.get()},i.removeQuoteIDs=this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[];const r=document.getElementById("settings_text");r&&r.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(i,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);i[t]=e.value.trim()})),a.fire("com.woltlab.wcf.redactor2","submit_text",i.data),u.default.userId||t||(i.requireGuestDialog=!0),n.api(this,o.extend({parameters:i},t))}_validate(){if(this._container.querySelectorAll(".innerError").forEach((e=>e.remove())),this._getEditor().utils.isEmpty())return this.throwError(this._textarea,r.get("wcf.global.form.error.empty")),!1;const e={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return a.fire("com.woltlab.wcf.redactor2","validate_text",e),e.valid}throwError(e,t){l.default.innerError(e,"empty"===t?r.get("wcf.global.form.error.empty"):t)}_showLoadingOverlay(){null===this._loadingOverlay&&(this._loadingOverlay=document.createElement("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(){this._content.classList.remove("loading");const e=this._content.querySelector(".messageContentLoadingOverlay");null!==e&&e.remove()}_reset(){this._getEditor().code.set("<p></p>"),a.fire("com.woltlab.wcf.redactor2","reset_text")}_handleError(e){const t={api:this,cancel:!1,returnValues:e.returnValues};a.fire("com.woltlab.wcf.redactor2","handleError_text",t),t.cancel||this.throwError(this._textarea,e.returnValues.realErrorMessage)}_getEditor(){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(e){if(this._getEditor().WoltLabAutosave.reset(),e.returnValues.url)window.location.href==e.returnValues.url&&window.location.reload(),window.location.href=e.returnValues.url;else{if(e.returnValues.template){let t;if("DESC"===this._container.dataset.sortOrder)l.default.insertHtml(e.returnValues.template,this._container,"after"),t=l.default.identify(this._container.nextElementSibling);else{let i=this._container;i.previousElementSibling&&i.previousElementSibling.classList.contains("messageListPagination")&&(i=i.previousElementSibling),l.default.insertHtml(e.returnValues.template,i,"before"),t=l.default.identify(i.previousElementSibling)}this._container.dataset.lastPostTime=e.returnValues.lastPostTime.toString(),window.history.replaceState(void 0,"",`#${t}`),p.element(document.getElementById(t))}d.show(r.get(this._options.successMessage)),this._options.quoteManager&&this._options.quoteManager.countQuotes(),s.default.trigger()}}_ajaxSuccess(e){if(!u.default.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.default.userId&&e.returnValues.guestDialog){const t=e.returnValues.guestDialogID;c.default.openStatic(t,e.returnValues.guestDialog,{closable:!1,onClose:function(){h.default.has(t)&&h.default.delete(t)},title:r.get("wcf.global.confirmation.title")});const i=c.default.getDialog(t);i.content.querySelector("input[type=submit]").addEventListener("click",(e=>this._submitGuestDialog(e)));i.content.querySelector("input[type=text]").addEventListener("keypress",(e=>this._submitGuestDialog(e))),this._guestDialogId=t}else this._insertMessage(e),u.default.userId||c.default.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay()}_ajaxFailure(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(this._handleError(e),!1)}_ajaxSetup(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"},silent:!0}}}return o.enableLegacyInheritance(m),m})),define("WoltLabSuite/Core/Ui/Message/Share",["require","exports","tslib","../../Event/Handler","../../StringUtil"],(function(e,t,i,n,o){"use strict";function a(e,t,i,n){n||(n=s),window.open(t.replace("{pageURL}",n).replace("{text}",r+(i?`%20${n}`:"")),e,"height=600,width=600")}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let r="",s="";t.init=function(){const e=document.querySelector('meta[property="og:title"]');null!==e&&(r=encodeURIComponent(e.content));const t=document.querySelector('meta[property="og:url"]');null!==t&&(s=encodeURIComponent(t.content)),document.querySelectorAll(".jsMessageShareButtons").forEach((e=>{e.classList.remove("jsMessageShareButtons");let t=encodeURIComponent(o.unescapeHTML(e.dataset.url||""));t||(t=s);const i={facebook:{link:e.querySelector(".jsShareFacebook"),share(e){e.preventDefault(),a("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{link:e.querySelector(".jsShareReddit"),share(e){e.preventDefault(),a("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{link:e.querySelector(".jsShareTwitter"),share(e){e.preventDefault(),a("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{link:e.querySelector(".jsShareLinkedIn"),share(e){e.preventDefault(),a("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{link:e.querySelector(".jsSharePinterest"),share(e){e.preventDefault(),a("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{link:e.querySelector(".jsShareXing"),share(e){e.preventDefault(),a("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{link:e.querySelector(".jsShareWhatsApp"),share(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+r+"%20"+s}}};n.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:i,pageDescription:r,pageUrl:s}),Object.values(i).forEach((e=>{if(null!==e.link){e.link.addEventListener("click",(t=>e.share(t)))}}))}))}})),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["require","exports","https://platform.twitter.com/widgets.js"],(function(e,t){"use strict";async function i(e,t,i=!1){const o=await n,a=await o.widgets.createTweet(t,e,{dnt:!0,lang:document.documentElement.lang});if(a&&i){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.embedAll=t.embedTweet=void 0;const n=new Promise((e=>{twttr.ready(e)}));t.embedTweet=i,t.embedAll=function(){document.querySelectorAll("[data-wsc-twitter-tweet]").forEach((e=>{const t=e.dataset.wscTwitterTweet;t&&(delete e.dataset.wscTwitterTweet,i(e,t,!0))}))}})),define("WoltLabSuite/Core/Ui/Page/Search",["require","exports","tslib","../../Ajax","../../Dom/Util","../../Language","../../StringUtil","../Dialog"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(){this.callbackSelect=void 0,this.resultContainer=void 0,this.resultList=void 0,this.searchInput=void 0}open(e){this.callbackSelect=e,s.default.open(this)}search(e){e.preventDefault();const t=this.searchInput.parentNode,i=this.searchInput.value.trim();i.length<3?o.default.innerError(t,a.get("wcf.page.search.error.tooShort")):(o.default.innerError(t,!1),n.api(this,{parameters:{searchString:i}}))}click(e){e.preventDefault();const t=e.currentTarget,i=t.querySelector("h3");this.callbackSelect(t.dataset.pageId+"#"+i.textContent.replace(/['"]/g,"")),s.default.close(this)}_ajaxSuccess(e){const t=e.returnValues.map((e=>{const t=r.escapeHTML(e.name),i=r.escapeHTML(e.displayLink);return`<li>\n <div class="containerHeadline pointer" data-page-id="${e.pageID}">\n <h3>${t}</h3>\n <small>${i}</small>\n </div>\n </li>`})).join("");this.resultList.innerHTML=t,o.default[t?"show":"hide"](this.resultContainer),t?this.resultList.querySelectorAll(".containerHeadline").forEach((e=>{e.addEventListener("click",(e=>this.click(e)))})):o.default.innerError(this.searchInput.parentElement,a.get("wcf.page.search.error.noResults"))}_ajaxSetup(){return{data:{actionName:"search",className:"wcf\\data\\page\\PageAction"}}}_dialogSetup(){return{id:"wcfUiPageSearch",options:{onSetup:()=>{this.searchInput=document.getElementById("wcfUiPageSearchInput"),this.searchInput.addEventListener("keydown",(e=>{"Enter"===e.key&&this.search(e)})),this.searchInput.nextElementSibling.addEventListener("click",(e=>this.search(e))),this.resultContainer=document.getElementById("wcfUiPageSearchResultContainer"),this.resultList=document.getElementById("wcfUiPageSearchResultList")},onShow:()=>{this.searchInput.focus()},title:a.get("wcf.page.search")},source:`<div class="section">\n <dl>\n <dt><label for="wcfUiPageSearchInput">${a.get("wcf.page.search.name")}</label></dt>\n <dd>\n <div class="inputAddon">\n <input type="text" id="wcfUiPageSearchInput" class="long">\n <a href="#" class="inputSuffix"><span class="icon icon16 fa-search"></span></a>\n </div>\n </dd>\n </dl>\n </div>\n <section id="wcfUiPageSearchResultContainer" class="section" style="display: none;">\n <header class="sectionHeader">\n <h2 class="sectionTitle">${a.get("wcf.page.search.results")}</h2>\n </header>\n <ol id="wcfUiPageSearchResultList" class="containerList"></ol>\n </section>`}}}let c;t.open=function(e){(void 0===c&&(c=new l),c).open(e)}})),define("WoltLabSuite/Core/Ui/Sortable/List",["require","exports","tslib","../../Core","../Screen"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e){this._options=n.extend({containerId:"",className:"",offset:0,options:{},isSimpleSorting:!1,additionalParameters:{}},e),o.on("screen-sm-md",{match:()=>this._enable(!0),unmatch:()=>this._disable(),setup:()=>this._enable(!0)}),o.on("screen-lg",{match:()=>this._enable(!1),unmatch:()=>this._disable(),setup:()=>this._enable(!1)})}_enable(e){const t=this._options.options;e&&(t.handle=".sortableNodeHandle"),new window.WCF.Sortable.List(this._options.containerId,this._options.className,this._options.offset,t,this._options.isSimpleSorting,this._options.additionalParameters)}_disable(){window.jQuery(`#${this._options.containerId} .sortableList`)[this._options.isSimpleSorting?"sortable":"nestedSortable"]("destroy")}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Poll/Editor",["require","exports","tslib","../../Core","../../Language","../Sortable/List","../../Event/Handler","../../Date/Picker"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e,t,i,o){const s=document.getElementById(e);if(null===s)throw new Error("Unknown poll editor container with id '"+e+"'.");if(this.container=s,this.wysiwygId=i,""!==i&&null===document.getElementById(i))throw new Error("Unknown wysiwyg field with id '"+i+"'.");this.questionField=document.getElementById(this.wysiwygId+"Poll_question");const l=this.container.querySelector(".sortableList");if(null===l)throw new Error("Cannot find poll options list for container with id '"+e+"'.");if(this.optionList=l,this.endTimeField=document.getElementById(this.wysiwygId+"Poll_endTime"),this.maxVotesField=document.getElementById(this.wysiwygId+"Poll_maxVotes"),this.isChangeableYesField=document.getElementById(this.wysiwygId+"Poll_isChangeable"),this.isChangeableNoField=document.getElementById(this.wysiwygId+"Poll_isChangeable_no"),this.isPublicYesField=document.getElementById(this.wysiwygId+"Poll_isPublic"),this.isPublicNoField=document.getElementById(this.wysiwygId+"Poll_isPublic_no"),this.resultsRequireVoteYesField=document.getElementById(this.wysiwygId+"Poll_resultsRequireVote"),this.resultsRequireVoteNoField=document.getElementById(this.wysiwygId+"Poll_resultsRequireVote_no"),this.sortByVotesYesField=document.getElementById(this.wysiwygId+"Poll_sortByVotes"),this.sortByVotesNoField=document.getElementById(this.wysiwygId+"Poll_sortByVotes_no"),this.optionCount=0,this.options=n.extend({isAjax:!1,maxOptions:20},o),this.createOptionList(t||[]),new a.default({containerId:e,options:{toleranceElement:"> div"}}),this.options.isAjax)["handleError","reset","submit","validate"].forEach((e=>{r.add("com.woltlab.wcf.redactor2",e+"_"+this.wysiwygId,((...t)=>this[e](...t)))}));else{const t=this.container.closest("form");if(null===t)throw new Error("Cannot find form for container with id '"+e+"'.");t.addEventListener("submit",(e=>this.submit(e)))}}createOption(e,t,i){e=e||"",t=t||"0";const n=document.createElement("LI");n.classList.add("sortableNode"),n.dataset.optionId=t,i?i.insertAdjacentElement("afterend",n):this.optionList.appendChild(n);const a=document.createElement("div");a.classList.add("pollOptionInput"),n.appendChild(a);const r=document.createElement("span");r.classList.add("icon","icon16","fa-arrows","sortableNodeHandle"),a.appendChild(r);const s=document.createElement("a");n.setAttribute("role","button"),n.setAttribute("href","#"),s.classList.add("icon","icon16","fa-plus","jsTooltip","jsAddOption","pointer"),s.setAttribute("title",o.get("wcf.poll.button.addOption")),s.addEventListener("click",(()=>this.createOption())),a.appendChild(s);const l=document.createElement("a");l.setAttribute("role","button"),l.setAttribute("href","#"),l.classList.add("icon","icon16","fa-times","jsTooltip","jsDeleteOption","pointer"),l.setAttribute("title",o.get("wcf.poll.button.removeOption")),l.addEventListener("click",(e=>this.removeOption(e))),a.appendChild(l);const c=document.createElement("input");c.type="text",c.value=e,c.maxLength=255,c.addEventListener("keydown",(e=>this.optionInputKeyDown(e))),c.addEventListener("click",(()=>{document.activeElement!==c&&c.focus()})),a.appendChild(c),null!==i&&c.focus(),this.optionCount++,this.optionCount===this.options.maxOptions&&this.optionList.querySelectorAll(".jsAddOption").forEach((e=>{e.classList.remove("pointer"),e.classList.add("disabled")}))}createOptionList(e){e.forEach((e=>{this.createOption(e.optionValue,e.optionID)})),this.optionCount<this.options.maxOptions&&this.createOption()}handleError(e){switch(e.returnValues.fieldName){case this.wysiwygId+"Poll_endTime":case this.wysiwygId+"Poll_maxVotes":{const t=e.returnValues.fieldName.replace(this.wysiwygId+"Poll_",""),i=document.createElement("small");i.classList.add("innerError"),i.innerHTML=o.get("wcf.poll."+t+".error."+e.returnValues.errorType);document.getElementById(e.returnValues.fieldName).nextSibling.insertAdjacentElement("afterbegin",i),e.cancel=!0;break}}}optionInputKeyDown(e){if("Enter"!==e.key)return;const t=e.currentTarget.parentElement.querySelector(".jsAddOption");n.triggerEvent(t,"click"),e.preventDefault()}removeOption(e){e.preventDefault();e.currentTarget.closest("li").remove(),this.optionCount--,0===this.optionList.childElementCount?this.createOption():this.optionList.querySelectorAll(".jsAddOption").forEach((e=>{e.classList.add("pointer"),e.classList.remove("disabled")}))}reset(){this.questionField.value="",this.optionCount=0,this.optionList.innerHTML="",this.createOption(),s.clear(this.endTimeField),this.maxVotesField.value="1",this.isChangeableYesField.checked=!1,this.isChangeableNoField.checked=!0,this.isPublicYesField.checked=!1,this.isPublicNoField.checked=!0,this.resultsRequireVoteYesField.checked=!1,this.resultsRequireVoteNoField.checked=!0,this.sortByVotesYesField.checked=!1,this.sortByVotesNoField.checked=!0,r.fire("com.woltlab.wcf.poll.editor","reset",{pollEditor:this})}submit(e){if(this.options.isAjax)r.fire("com.woltlab.wcf.poll.editor","submit",{event:e,pollEditor:this});else{const e=this.container.closest("form");this.getOptions().forEach(((t,i)=>{const n=document.createElement("input");n.type="hidden",n.name=`${this.wysiwygId} + 'Poll_options[${i}}]`,n.value=t,e.appendChild(n)}))}}validate(e){if(""===this.questionField.value.trim())return;let t=0;if(Array.from(this.optionList.children).forEach((e=>{""!==e.querySelector("input[type=text]").value.trim()&&t++})),0===t)e.api.throwError(this.container,o.get("wcf.global.form.error.empty")),e.valid=!1;else{const i=~~this.maxVotesField.value;i&&i>t?(e.api.throwError(this.maxVotesField.parentElement,o.get("wcf.poll.maxVotes.error.invalid")),e.valid=!1):r.fire("com.woltlab.wcf.poll.editor","validate",{data:e,pollEditor:this})}}getData(){return{[this.questionField.id]:this.questionField.value,[this.wysiwygId+"Poll_options"]:this.getOptions(),[this.endTimeField.id]:this.endTimeField.value,[this.maxVotesField.id]:this.maxVotesField.value,[this.isChangeableYesField.id]:!!this.isChangeableYesField.checked,[this.isPublicYesField.id]:!!this.isPublicYesField.checked,[this.resultsRequireVoteYesField.id]:!!this.resultsRequireVoteYesField.checked,[this.sortByVotesYesField.id]:!!this.sortByVotesYesField.checked}}getOptions(){const e=[];return Array.from(this.optionList.children).forEach((t=>{const i=t.querySelector("input[type=text]").value.trim();""!==i&&e.push(`${t.dataset.optionId}_${i}`)})),e}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Reaction/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Redactor/Article",["require","exports","tslib","../../Core","../Article/Search"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this._editor=e,t.addEventListener("click",(e=>this._click(e)))}_click(e){e.preventDefault(),o.open((e=>this._insert(e)))}_insert(e){this._editor.buffer.set(),this._editor.insert.text(`[wsa='${e}'][/wsa]`)}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Redactor/Metacode",["require","exports","tslib","../../Event/Handler","../../Dom/Util"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromHtml=void 0,n=i.__importStar(n),o=i.__importDefault(o),t.convertFromHtml=function(e,t){const i=document.createElement("div");return i.innerHTML=t,i.querySelectorAll("woltlab-metacode").forEach((t=>{const a=t.dataset.name,r=function(e){try{e=JSON.parse(atob(e))}catch(e){}return Array.isArray(e)?e.map((e=>e.toString().replace(/^'(.*)'$/,"$1"))):[]}(t.dataset.attributes||""),s={attributes:r,cancel:!1,metacode:t};if(n.fire("com.woltlab.wcf.redactor2",`metacode_${a}_${e}`,s),s.cancel)return;const l=function(e,t){let i="["+e;return t.length&&(i+="=",i+=t.map((e=>`'${e}'`)).join(",")),document.createTextNode(i+"]")}(a,r),c=function(e){return document.createTextNode(`[/${e}]`)}(a);if(t.parentElement===i){const e=function(e){let t;if(0===e.childElementCount)t=document.createElement("p"),e.appendChild(t);else{const i=e.children[0];"P"===i.nodeName?t=i:(t=document.createElement("p"),e.insertBefore(t,i))}return t}(t);e.insertBefore(l,e.firstChild),function(e){const t=e.childElementCount;let i;if(0===t)i=document.createElement("p"),e.appendChild(i);else{const n=e.children[t-1];"P"===n.nodeName?i=n:(i=document.createElement("p"),e.appendChild(i))}return i}(t).appendChild(c)}else t.insertBefore(l,t.firstChild),t.appendChild(c);o.default.unwrapChildNodes(t)})),i.querySelectorAll("kbd").forEach((e=>{e.insertBefore(document.createTextNode("[tt]"),e.firstChild),e.appendChild(document.createTextNode("[/tt]")),o.default.unwrapChildNodes(e)})),i.innerHTML}})),define("WoltLabSuite/Core/Ui/Redactor/Autosave",["require","exports","tslib","../../Core","../../Devtools","../../Event/Handler","../../Language","./Metacode"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e){this._container=null,this._editor=null,this._isActive=!0,this._isPending=!1,this._lastMessage="",this._metaData={},this._originalMessage="",this._restored=!1,this._timer=null,this._element=e,this._key=n.getStoragePrefix()+this._element.dataset.autosave,this._cleanup(),delete this._element.dataset.autosave;const t=this._element.closest("form");null!==t&&t.addEventListener("submit",this.destroy.bind(this)),a.add("com.woltlab.wcf.redactor2",`getMetaData_${this._element.id}`,(e=>{Object.entries(this._metaData).forEach((([t,i])=>{e[t]=i}))})),a.add("com.woltlab.wcf.redactor2",`reset_${this._element.id}`,(()=>this.hideOverlay())),document.addEventListener("visibilitychange",(()=>this._onVisibilityChange()))}_onVisibilityChange(){this._isActive=!document.hidden,this._isPending=document.hidden}getInitialValue(){if(window.ENABLE_DEVELOPER_TOOLS&&!o.default._internal_.editorAutosave())return this._element.value;let e="";try{e=window.localStorage.getItem(this._key)||""}catch(e){const t=e.message;window.console.warn(`Unable to access local storage: ${t}`)}let t=null;try{t=JSON.parse(e)}catch(e){}if(null!==t&&"object"==typeof t&&t.content){if(1e3*~~this._element.dataset.autosaveLastEditTime<=t.timestamp){const e=document.createElement("div");e.innerHTML=this._element.value;const i=document.createElement("div");if(i.innerHTML=t.content,e.innerText.trim()!==i.innerText.trim())return this._originalMessage=this._element.value,this._restored=!0,this._metaData=t.meta||{},t.content}}return this._element.value}getMetaData(){return this._metaData}watch(e){if(this._editor=e,null!==this._timer)throw new Error("Autosave timer is already active.");this._timer=window.setInterval((()=>this._saveToStorage()),15e3),this._saveToStorage(),this._isPending=!1}destroy(){this.clear(),this._editor=null,this._timer&&window.clearInterval(this._timer),this._timer=null,this._isPending=!1}clear(){this._metaData={},this._lastMessage="";try{window.localStorage.removeItem(this._key)}catch(e){const t=e.message;window.console.warn(`Unable to remove from local storage: ${t}`)}}createOverlay(){if(!this._restored)return;const e=this._editor,t=document.createElement("div");t.className="redactorAutosaveRestored active";const i=document.createElement("span");i.textContent=r.get("wcf.editor.autosave.restored"),t.appendChild(i);const n=document.createElement("a");n.className="jsTooltip",n.href="#",n.title=r.get("wcf.editor.autosave.keep"),n.innerHTML='<span class="icon icon16 fa-check green"></span>',n.addEventListener("click",(e=>{e.preventDefault(),this.hideOverlay()})),t.appendChild(n);const o=document.createElement("a");o.className="jsTooltip",o.href="#",o.title=r.get("wcf.editor.autosave.discard"),o.innerHTML='<span class="icon icon16 fa-times red"></span>',o.addEventListener("click",(t=>{t.preventDefault(),this.clear();const i=s.convertFromHtml(e.core.element()[0].id,this._originalMessage);e.code.start(i),e.core.textarea().val(e.clean.onSync(e.$editor.html())),this.hideOverlay()})),t.appendChild(o),e.core.box()[0].appendChild(t),e.core.editor()[0].addEventListener("click",(()=>this.hideOverlay()),{once:!0}),this._container=t}hideOverlay(){null!==this._container&&(this._container.classList.remove("active"),window.setTimeout((()=>{null!==this._container&&this._container.remove(),this._container=null,this._originalMessage=""}),1e3))}_saveToStorage(){if(!this._isActive){if(!this._isPending)return;this._isPending=!1}if(window.ENABLE_DEVELOPER_TOOLS&&!o.default._internal_.editorAutosave())return;const e=this._editor;let t=e.code.get();if(e.utils.isEmpty(t)&&(t=""),this._lastMessage!==t){if(""===t)return this.clear();try{a.fire("com.woltlab.wcf.redactor2",`autosaveMetaData_${this._element.id}`,this._metaData),window.localStorage.setItem(this._key,JSON.stringify({content:t,meta:this._metaData,timestamp:Date.now()})),this._lastMessage=t}catch(e){const t=e.message;window.console.warn(`Unable to write to local storage: ${t}`)}}}_cleanup(){const e=Date.now()-6048e5;Object.keys(window.localStorage).filter((e=>e.startsWith(n.getStoragePrefix()))).forEach((t=>{let i="";try{i=window.localStorage.getItem(t)||""}catch(e){const t=e.message;window.console.warn(`Unable to access local storage: ${t}`)}let n=0;try{n=JSON.parse(i).timestamp}catch(e){}if(!i||n<e)try{window.localStorage.removeItem(t)}catch(e){const t=e.message;window.console.warn(`Unable to remove from local storage: ${t}`)}}))}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Redactor/PseudoHeader",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHeight=void 0,t.getHeight=function(e){let t=~~window.getComputedStyle(e).paddingTop.replace(/px$/,"");const i=window.getComputedStyle(e,"::before");t+=~~i.paddingTop.replace(/px$/,""),t+=~~i.paddingBottom.replace(/px$/,"");let n=~~i.height.replace(/px$/,"");return 0===n&&(n=e.scrollHeight,e.classList.add("redactorCalcHeight"),n-=e.scrollHeight,e.classList.remove("redactorCalcHeight")),t+=n,t}})),define("WoltLabSuite/Core/Ui/Redactor/Code",["require","exports","tslib","../../Core","../../Dom/Util","../../Event/Handler","../../Language","../../StringUtil","../Dialog","./PseudoHeader","../../prism-meta"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importDefault(d);let u=0;class h{constructor(e){this._pre=null,this._editor=e,this._elementId=this._editor.$element[0].id,a.add("com.woltlab.wcf.redactor2",`bbcode_code_${this._elementId}`,(e=>this._bbcodeCode(e))),a.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._editor.opts.activeButtonsStates.pre="code",this._callbackEdit=this._edit.bind(this),this._observeLoad()}_bbcodeCode(e){e.cancel=!0;let 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(),t&&"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("click",this._callbackEdit),this._editor.caret.end(t)))}_observeLoad(){this._editor.$editor[0].querySelectorAll("pre:not(.woltlabHtml)").forEach((e=>{e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)}))}_edit(e){const t=e.currentTarget;0===u&&(u=c.getHeight(t));const i=o.default.offset(t);e.pageY>i.top&&e.pageY<i.top+u&&(e.preventDefault(),this._editor.selection.save(),this._pre=t,l.default.open(this))}_dialogSubmit(){const e="redactor-code-"+this._elementId,t=this._pre;["file","highlighter","line"].forEach((i=>{const n=document.getElementById(`${e}-${i}`);t.dataset[i]=n.value})),this._setTitle(t),this._editor.caret.after(t),l.default.close(this)}_setTitle(e){const t=e.dataset.file;let i=e.dataset.highlighter;i=-1!==this._editor.opts.woltlab.highlighters.indexOf(i)?d.default[i].title:"";const n=r.get("wcf.editor.code.title",{file:t,highlighter:i});e.dataset.title!==n&&(e.dataset.title=n)}_delete(e){e.preventDefault();const t=this._pre;let i=t.nextElementSibling||t.previousElementSibling;null===i&&t.parentElement!==this._editor.core.editor()[0]&&(i=t.parentElement),null===i?(this._editor.code.set(""),this._editor.focus.end()):(t.remove(),this._editor.caret.end(i)),l.default.close(this)}_dialogSetup(){const e=`redactor-code-${this._elementId}`,t=`${e}-button-delete`,i=`${e}-button-save`,n=`${e}-file`,o=`${e}-highlighter`,a=`${e}-line`;return{id:e,options:{onClose:()=>{this._editor.selection.restore(),l.default.destroy(this)},onSetup:()=>{document.getElementById(t).addEventListener("click",(e=>this._delete(e)));let e=`<option value="">${r.get("wcf.editor.code.highlighter.detect")}</option>\n <option value="plain">${r.get("wcf.editor.code.highlighter.plain")}</option>`;const i=this._editor.opts.woltlab.highlighters.map((e=>[e,d.default[e].title]));i.sort(((e,t)=>e[1].localeCompare(t[1]))),e+=i.map((([e,t])=>`<option value="${e}">${s.escapeHTML(t)}</option>`)).join("\n"),document.getElementById(o).innerHTML=e},onShow:()=>{const e=this._pre;document.getElementById(o).value=e.dataset.highlighter||"";const t=~~(e.dataset.line||1);document.getElementById(a).value=t.toString();document.getElementById(n).value=e.dataset.file||""},title:r.get("wcf.editor.code.edit")},source:`<div class="section">\n <dl>\n <dt>\n <label for="${o}">${r.get("wcf.editor.code.highlighter")}</label>\n </dt>\n <dd>\n <select id="${o}"></select>\n <small>${r.get("wcf.editor.code.highlighter.description")}</small>\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="${a}">${r.get("wcf.editor.code.line")}</label>\n </dt>\n <dd>\n <input type="number" id="${a}" min="0" value="1" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.code.line.description")}</small>\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="${n}">${r.get("wcf.editor.code.file")}</label>\n </dt>\n <dd>\n <input type="text" id="${n}" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.code.file.description")}</small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button id="${i}" class="buttonPrimary" data-type="submit">${r.get("wcf.global.button.save")}</button>\n <button id="${t}">${r.get("wcf.global.button.delete")}</button>\n </div>`}}}return n.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Redactor/Editor",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Redactor/Format",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";function o(e){let t=window.getSelection().anchorNode;for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function a(e,t,i){let n=e;for(;n=n[i];)if(n.nodeType!==Node.TEXT_NODE||""!==n.textContent.replace(/\u200B/,""))return!1;return!0}function r(e,t){const i=["DEL","SUB","SUP"].find((i=>{const n=t.anchorNode;let o=n.nodeType===Node.ELEMENT_NODE?n:n.parentElement;if(!(null!==o.querySelector(i.toLowerCase())))for(;o&&o!==e;){if(o.nodeName===i)return!0;o=o.parentElement}return!1}));return"DEL"===i||void 0===i?["strike","strikethrough"]:[i.toLowerCase(),i.toLowerCase()+"script"]}function s(e,t){const i=window.getSelection();if(!i.rangeCount)return;if(!o(e))return void console.error("Invalid selection, range exists outside of the editor:",i.anchorNode);let a=i.getRangeAt(0),s=null;const l=a.collapsed;if(l){let o=a.startContainer;const r=[o];for(;;){const t=o.parentElement;if(t===e||"TD"===t.nodeName)break;o=t,r.push(o)}if(""===o.innerHTML.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/ /gi,"").replace(/<\/?br\s?\/?>/g,"").replace(/\s/g,"").replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,"").replace(/<iframe(.*?[^>])>$/i,"iframe").replace(/<source(.*?[^>])>$/i,"source").replace(/<[^/>][^>]*><\/[^>]+>/gi,"").replace(/<[^/>][^>]*><\/[^>]+>/gi,"").trim()){const e=document.createElement("woltlab-format-marker");return a.insertNode(e),r.forEach((e=>{"SPAN"===e.nodeName&&e.style.getPropertyValue(t)&&n.default.unwrapChildNodes(e)})),a=document.createRange(),a.selectNode(e),a.collapse(!0),i.removeAllRanges(),i.addRange(a),void e.remove()}s=document.createTextNode(""),a.insertNode(s)}let c=e.querySelectorAll("strike");c.forEach((e=>n.default.unwrapChildNodes(e)));const d=r(e,i);if(document.execCommand(d[1]),"strike"!==d[0]&&(c=e.querySelectorAll(d[0])),l&&null!==s&&0===c.length){document.execCommand(d[1]);const e=document.createElement(d[0]);s.parentElement.insertBefore(e,s),e.appendChild(s)}c.forEach((i=>{const o=function(e,t,i){let n=e.parentElement,o=null;for(;n!==t;)"SPAN"===n.nodeName&&""!==n.style.getPropertyValue(i)&&(o=n),n=n.parentElement;return o}(i,e,t);null!==o&&function(e,t,i){const o=t.parentElement;if(!n.default.isAtNodeStart(e,t)){const i=document.createRange();i.setStartBefore(t),i.setEndBefore(e);const n=i.extractContents();o.insertBefore(n,t)}if(!n.default.isAtNodeEnd(e,t)){const i=document.createRange();i.setStartAfter(e),i.setEndAfter(t);const n=i.extractContents();o.insertBefore(n,t.nextSibling)}t.querySelectorAll("span").forEach((e=>{e.style.getPropertyValue(i)&&n.default.unwrapChildNodes(e)})),n.default.unwrapChildNodes(t)}(i,o,t),i.querySelectorAll("span").forEach((e=>{e.style.getPropertyValue(t)&&n.default.unwrapChildNodes(e)})),n.default.unwrapChildNodes(i)})),e.querySelectorAll("span").forEach((e=>{e.parentNode&&!e.textContent.length&&""!==e.style.getPropertyValue(t)&&(1===e.childElementCount&&"MARK"===e.children[0].nodeName&&e.parentNode.insertBefore(e.children[0],e),0===e.childElementCount&&e.remove())}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeFormat=t.format=void 0,n=i.__importDefault(n),t.format=function(e,t,i){const l=window.getSelection();if(!l.rangeCount)return;if(!o(e))return void console.error("Invalid selection, range exists outside of the editor:",l.anchorNode);let c=l.getRangeAt(0),d=null,u=null,h=null;if(c.collapsed)h=document.createElement("strike"),h.textContent="",c.insertNode(h),c=document.createRange(),c.selectNodeContents(h),l.removeAllRanges(),l.addRange(c);else{d=document.createElement("mark"),u=document.createElement("mark");let i=c.cloneRange();i.collapse(!0),i.insertNode(d),i=c.cloneRange(),i.collapse(!1),i.insertNode(u),c=document.createRange(),c.setStartAfter(d),c.setEndBefore(u),l.removeAllRanges(),l.addRange(c),s(e,t),c=document.createRange(),c.setStartAfter(d),c.setEndBefore(u),l.removeAllRanges(),l.addRange(c)}let p=["strike","strikethrough"];null===h&&(p=r(e,l),document.execCommand(p[1]));const m=[];e.querySelectorAll(p[0]).forEach((e=>{const o=document.createElement("span");o.setAttribute("style",`${t}: ${i}`),n.default.replaceElement(e,o),m.push(o)}));const f=m.length;if(f){const e=m[0],i=m[f-1];if(null===h&&e.parentElement===i.parentElement){const o=e.parentElement;"SPAN"===o.nodeName&&""!==o.style.getPropertyValue(t)&&a(e,0,"previousSibling")&&a(i,0,"nextSibling")&&n.default.unwrapChildNodes(o)}c=document.createRange(),c.setStart(e,0),c.setEnd(i,i.childNodes.length),l.removeAllRanges(),l.addRange(c)}null!==d&&(d.remove(),u.remove())},t.removeFormat=s})),define("WoltLabSuite/Core/Ui/Redactor/Html",["require","exports","tslib","../../Core","../../Event/Handler","../../Language"],(function(e,t,i,n,o,a){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a);class r{constructor(e){this._pre=null,this._editor=e,this._elementId=this._editor.$element[0].id,o.add("com.woltlab.wcf.redactor2",`bbcode_woltlabHtml_${this._elementId}`,(e=>this._bbcodeCode(e))),o.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._editor.opts.activeButtonsStates["woltlab-html"]="woltlabHtml",this._observeLoad()}_bbcodeCode(e){e.cancel=!0;let 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(),t&&"PRE"===t.nodeName&&(t.classList.add("woltlabHtml"),1===t.childElementCount&&"BR"===t.children[0].nodeName&&t.removeChild(t.children[0]),this._setTitle(t),this._editor.caret.end(t)))}_observeLoad(){this._editor.$editor[0].querySelectorAll("pre.woltlabHtml").forEach((e=>{this._setTitle(e)}))}_setTitle(e){["title","description"].forEach((t=>{const i=a.get(`wcf.editor.html.${t}`);e.dataset[t]!==i&&(e.dataset[t]=i)}))}}return n.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/Redactor/Link",["require","exports","tslib","../../Dom/Util","../../Language","../Dialog"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showDialog=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a);class r{constructor(){this.boundListener=!1}open(e){a.default.open(this),a.default.setTitle(this,o.get("wcf.editor.link."+(e.insert?"add":"edit")));const t=document.getElementById("redactor-modal-button-action");t.textContent=o.get("wcf.global.button."+(e.insert?"insert":"save")),this.submitCallback=e.submitCallback,this.boundListener||(this.boundListener=!0,t.addEventListener("click",(()=>this.submit())))}submit(){if(this.submitCallback())a.default.close(this);else{const e=document.getElementById("redactor-link-url"),t=""===e.value.trim()?"wcf.global.form.error.empty":"wcf.editor.link.error.invalid";n.default.innerError(e,o.get(t))}}_dialogSetup(){return{id:"redactorDialogLink",options:{onClose:()=>{const e=document.getElementById("redactor-link-url").nextElementSibling;e&&"SMALL"===e.nodeName&&e.remove()},onSetup:e=>{const t=e.querySelector(".formSubmit > .buttonPrimary");null!==t&&e.querySelectorAll('input[type="url"], input[type="text"]').forEach((e=>{e.addEventListener("keyup",(e=>{"Enter"===e.key&&t.click()}))}))},onShow:()=>{document.getElementById("redactor-link-url").focus()}},source:`<dl>\n <dt>\n <label for="redactor-link-url">${o.get("wcf.editor.link.url")}</label>\n </dt>\n <dd>\n <input type="url" id="redactor-link-url" class="long">\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="redactor-link-url-text">${o.get("wcf.editor.link.text")}</label>\n </dt>\n <dd>\n <input type="text" id="redactor-link-url-text" class="long">\n </dd>\n </dl>\n <div class="formSubmit">\n <button id="redactor-modal-button-action" class="buttonPrimary"></button>\n </div>`}}}let s;t.showDialog=function(e){s||(s=new r),s.open(e)}})),define("WoltLabSuite/Core/Ui/Redactor/Mention",["require","exports","tslib","../../Ajax","../../Core","../../StringUtil","../CloseOverlay"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);let s=null;class l{constructor(e){this._active=!1,this._dropdownActive=!1,this._dropdownMenu=null,this._itemIndex=0,this._lineHeight=null,this._mentionStart="",this._timer=null,this._redactor=e,e.WoltLabEvent.register("keydown",(e=>this._keyDown(e))),e.WoltLabEvent.register("keyup",(e=>this._keyUp(e))),r.default.add(`UiRedactorMention-${e.core.element()[0].id}`,(()=>this._hideDropdown()))}_keyDown(e){if(!this._dropdownActive)return;const t=e.event;switch(t.key){case"Enter":this._setUsername(null,this._dropdownMenu.children[this._itemIndex].children[0]);break;case"ArrowUp":this._selectItem(-1);break;case"ArrowDown":this._selectItem(1);break;default:return void this._hideDropdown()}t.preventDefault(),e.cancel=!0}_keyUp(e){const t=e.event;if("Enter"===t.key)return void(this._active=!1);if(this._dropdownActive&&(e.cancel=!0,"ArrowDown"===t.key||"ArrowUp"===t.key))return;const i=this._getTextLineInFrontOfCaret();if(i.length>0&&i.length<25){const e=/@([^,]{3,})$/.exec(i);e?e.index&&!/\s/.test(i[e.index-1])||(this._mentionStart=e[1],null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._timer=window.setTimeout((()=>{n.api(this,{parameters:{data:{searchString:this._mentionStart}}}),this._timer=null}),500)):this._hideDropdown()}else this._hideDropdown()}_getTextLineInFrontOfCaret(){const e=this._selectMention(!1);return null!==e?e.range.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g," ").trim():""}_getDropdownMenuPosition(){const e=this._selectMention();if(null===e)return null;this._redactor.selection.save(),e.selection.removeAllRanges(),e.selection.addRange(e.range);const 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(e,t){e&&(e.preventDefault(),t=e.currentTarget);const i=this._selectMention();if(null===i)return void this._hideDropdown();this._redactor.buffer.set(),i.selection.removeAllRanges(),i.selection.addRange(i.range);let n=window.getSelection().getRangeAt(0);n.deleteContents(),n.collapse(!0);let o=t.dataset.username.trim();o.split(/\s/g).length>2&&(o="'"+o.replace(/'/g,"''")+"'");const a=document.createTextNode("@"+o+" ");n.insertNode(a),n=document.createRange(),n.selectNode(a),n.collapse(!1),i.selection.removeAllRanges(),i.selection.addRange(n),this._hideDropdown()}_selectMention(e){const t=window.getSelection();if(!t.rangeCount||!t.isCollapsed)return null;let i=t.anchorNode;if(i.nodeType===Node.TEXT_NODE&&(i=i.parentElement),-1===i.textContent.indexOf("@"))return null;const n=this._redactor.core.editor()[0];for(;i&&i!==n;){if(-1!==["PRE","WOLTLAB-QUOTE"].indexOf(i.nodeName))return null;i=i.parentElement}let o=t.getRangeAt(0),a=o.startContainer,r=o.startOffset;for(;a.nodeType===Node.ELEMENT_NODE;){if(0===r&&0===a.childNodes.length)return null;a=a.childNodes[r?r-1:0],r>0&&(r=a.nodeType===Node.TEXT_NODE?a.textContent.length:a.childNodes.length)}let s=a,l=-1;for(;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{o=document.createRange(),o.setStart(s,l),o.setEnd(a,r)}catch(e){return window.console.debug(e),null}if(!1===e){let e="";for(l&&(e=s.textContent.substr(0,l));(s=s.previousSibling)&&s.nodeType===Node.TEXT_NODE;)e=s.textContent+e;if(/\S$/.test(e.replace(/\u200B/g,"")))return null}else if(o.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g,"").trim().replace(/^@/,"")!==this._mentionStart)return null;return{range:o,selection:t}}_updateDropdownPosition(){const e=this._getDropdownMenuPosition();if(null===e)return void this._hideDropdown();e.top+=7;const t=this._dropdownMenu;if(t.style.setProperty("left",`${e.left}px`,""),t.style.setProperty("top",`${e.top}px`,""),this._selectItem(0),e.top+t.offsetHeight+10>window.innerHeight+(window.scrollY||window.pageYOffset)){const i=e.top-t.offsetHeight-2*this._lineHeight+7;t.style.setProperty("top",`${i}px`,"")}}_selectItem(e){const t=this._dropdownMenu,i=t.querySelector(".active");null!==i&&i.classList.remove("active"),this._itemIndex+=e,this._itemIndex<0?this._itemIndex=t.childElementCount-1:this._itemIndex>=t.childElementCount&&(this._itemIndex=0),t.children[this._itemIndex].classList.add("active")}_hideDropdown(){null!==this._dropdownMenu&&this._dropdownMenu.classList.remove("dropdownOpen"),this._dropdownActive=!1,this._itemIndex=0}_ajaxSetup(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\user\\UserAction",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{includeUserGroups:!0,scope:"mention"}}},silent:!0}}_ajaxSuccess(e){Array.isArray(e.returnValues)&&e.returnValues.length?(null===this._dropdownMenu&&(this._dropdownMenu=document.createElement("ol"),this._dropdownMenu.className="dropdownMenu",null===s&&(s=document.createElement("div"),s.className="dropdownMenuContainer",document.body.appendChild(s)),s.appendChild(this._dropdownMenu)),this._dropdownMenu.innerHTML="",e.returnValues.forEach((e=>{const t=document.createElement("li"),i=document.createElement("a");i.addEventListener("mousedown",(e=>this._setUsername(e))),i.className="box16",i.innerHTML=`<span>${e.icon}</span> <span>${a.escapeHTML(e.label)}</span>`,i.dataset.userId=e.objectID.toString(),i.dataset.username=e.label,t.appendChild(i),this._dropdownMenu.appendChild(t)})),this._dropdownMenu.classList.add("dropdownOpen"),this._dropdownActive=!0,this._updateDropdownPosition()):this._hideDropdown()}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Redactor/Page",["require","exports","tslib","../../Core","../Page/Search"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this._editor=e,t.addEventListener("click",(e=>this._click(e)))}_click(e){e.preventDefault(),o.open((e=>this._insert(e)))}_insert(e){this._editor.buffer.set(),this._editor.insert.text(`[wsp='${e}'][/wsp]`)}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Redactor/Quote",["require","exports","tslib","../../Core","../../Dom/Util","../../Event/Handler","../../Language","../../StringUtil","../Dialog","./Metacode","./PseudoHeader"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importStar(d);let u=0;class h{constructor(e,t){this._quote=null,this._editor=e,this._elementId=this._editor.$element[0].id,a.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._editor.button.addCallback(t,this._click.bind(this)),this._observeLoad(),a.add("com.woltlab.wcf.redactor2",`insertQuote_${this._elementId}`,(e=>this._insertQuote(e)))}_insertQuote(e){if(this._editor.WoltLabSource.isActive())return;a.fire("com.woltlab.wcf.redactor2","showEditor");const t=this._editor.core.editor()[0];this._editor.selection.restore(),this._editor.buffer.set();let i=this._editor.selection.block();for(!1===i&&(this._editor.focus.end(),i=this._editor.selection.block());i&&i.parentElement!==t;)i=i.parentElement;const n=document.createElement("woltlab-quote");n.dataset.author=e.author,n.dataset.link=e.link;let o=e.content;e.isText?(o=s.escapeHTML(o),o=`<p>${o}</p>`,o=o.replace(/\n\n/g,"</p><p>"),o=o.replace(/\n/g,"<br>")):o=c.convertFromHtml(this._editor.$element[0].id,o),n.innerHTML=o;const r=i.parentElement;r.insertBefore(n,i.nextSibling),"P"!==i.nodeName||"<br>"!==i.innerHTML&&""!==i.innerHTML.replace(/\u200B/g,"")||r.removeChild(i);let l=n.previousElementSibling;l&&"P"!==l.nodeName&&(l=document.createElement("p"),l.textContent="",n.insertAdjacentElement("beforebegin",l)),this._editor.WoltLabCaret.paragraphAfterBlock(n),this._editor.buffer.set()}_click(){this._editor.button.toggle({},"woltlab-quote","func","block.format");const e=this._editor.selection.block();e&&"WOLTLAB-QUOTE"===e.nodeName&&(this._setTitle(e),e.addEventListener("click",(e=>this._edit(e))),this._editor.caret.end(e))}_observeLoad(){document.querySelectorAll("woltlab-quote").forEach((e=>{e.addEventListener("mousedown",(e=>this._edit(e))),this._setTitle(e)}))}_edit(e){const t=e.currentTarget;0===u&&(u=d.getHeight(t));const i=o.default.offset(t);e.pageY>i.top&&e.pageY<i.top+u&&(e.preventDefault(),this._editor.selection.save(),this._quote=t,l.default.open(this))}_dialogSubmit(){const e=`redactor-quote-${this._elementId}`,t=document.getElementById(`${e}-url`),i=t.value.replace(/\u200B/g,"").trim();if(i.length&&!/^https?:\/\/[^/]+/.test(i))return void o.default.innerError(t,r.get("wcf.editor.quote.url.error.invalid"));o.default.innerError(t,!1);const n=this._quote,a=document.getElementById(e+"-author");n.dataset.author=a.value,n.dataset.link=i,this._setTitle(n),this._editor.caret.after(n),l.default.close(this)}_setTitle(e){const t=r.get("wcf.editor.quote.title",{author:e.dataset.author,url:e.dataset.url});e.dataset.title!==t&&(e.dataset.title=t)}_delete(e){e.preventDefault();const t=this._quote;let i=t.nextElementSibling||t.previousElementSibling;null===i&&t.parentElement!==this._editor.core.editor()[0]&&(i=t.parentElement),null===i?(this._editor.code.set(""),this._editor.focus.end()):(t.remove(),this._editor.caret.end(i)),l.default.close(this)}_dialogSetup(){const e=`redactor-quote-${this._elementId}`,t=`${e}-author`,i=`${e}-button-delete`,n=`${e}-button-save`,o=`${e}-url`;return{id:e,options:{onClose:()=>{this._editor.selection.restore(),l.default.destroy(this)},onSetup:()=>{document.getElementById(i).addEventListener("click",(e=>this._delete(e)))},onShow:()=>{document.getElementById(t).value=this._quote.dataset.author||"";document.getElementById(o).value=this._quote.dataset.link||""},title:r.get("wcf.editor.quote.edit")},source:`<div class="section">\n <dl>\n <dt>\n <label for="${t}">${r.get("wcf.editor.quote.author")}</label>\n </dt>\n <dd>\n <input type="text" id="${t}" class="long" data-dialog-submit-on-enter="true">\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="${o}">${r.get("wcf.editor.quote.url")}</label>\n </dt>\n <dd>\n <input type="text" id="${o}" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.quote.url.description")}</small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button id="${n}" class="buttonPrimary" data-type="submit">${r.get("wcf.global.button.save")}</button>\n <button id="${i}">${r.get("wcf.global.button.delete")}</button>\n </div>`}}}return n.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Redactor/Spoiler",["require","exports","tslib","../../Core","../../Dom/Util","../../Event/Handler","../../Language","../Dialog","./PseudoHeader"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importStar(l);let c=0;class d{constructor(e){this._spoiler=null,this._editor=e,this._elementId=this._editor.$element[0].id,a.add("com.woltlab.wcf.redactor2",`bbcode_spoiler_${this._elementId}`,(e=>this._bbcodeSpoiler(e))),a.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._observeLoad()}_bbcodeSpoiler(e){e.cancel=!0,this._editor.button.toggle({},"woltlab-spoiler","func","block.format");let t=this._editor.selection.block();t&&("P"===t.nodeName&&(t=t.parentElement),"WOLTLAB-SPOILER"===t.nodeName&&(this._setTitle(t),t.addEventListener("click",(e=>this._edit(e))),this._editor.caret.end(t)))}_observeLoad(){this._editor.$editor[0].querySelectorAll("woltlab-spoiler").forEach((e=>{e.addEventListener("mousedown",(e=>this._edit(e))),this._setTitle(e)}))}_edit(e){const t=e.currentTarget;0===c&&(c=l.getHeight(t));const i=o.default.offset(t);e.pageY>i.top&&e.pageY<i.top+c&&(e.preventDefault(),this._editor.selection.save(),this._spoiler=t,s.default.open(this))}_dialogSubmit(){const e=this._spoiler,t=document.getElementById("redactor-spoiler-"+this._elementId+"-label");e.dataset.label=t.value,this._setTitle(e),this._editor.caret.after(e),s.default.close(this)}_setTitle(e){const t=r.get("wcf.editor.spoiler.title",{label:e.dataset.label||""});e.dataset.title!==t&&(e.dataset.title=t)}_delete(e){e.preventDefault();const t=this._spoiler;let i=t.nextElementSibling||t.previousElementSibling;null===i&&t.parentElement!==this._editor.core.editor()[0]&&(i=t.parentElement),null===i?(this._editor.code.set(""),this._editor.focus.end()):(t.remove(),this._editor.caret.end(i)),s.default.close(this)}_dialogSetup(){const e=`redactor-spoiler-${this._elementId}`,t=`${e}-button-delete`,i=`${e}-button-save`,n=`${e}-label`;return{id:e,options:{onClose:()=>{this._editor.selection.restore(),s.default.destroy(this)},onSetup:()=>{document.getElementById(t).addEventListener("click",(e=>this._delete(e)))},onShow:()=>{document.getElementById(n).value=this._spoiler.dataset.label||""},title:r.get("wcf.editor.spoiler.edit")},source:`<div class="section">\n <dl>\n <dt>\n <label for="${n}">${r.get("wcf.editor.spoiler.label")}</label>\n </dt>\n <dd>\n <input type="text" id="${n}" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.spoiler.label.description")}</small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button id="${i}" class="buttonPrimary" data-type="submit">${r.get("wcf.global.button.save")}</button>\n <button id="${t}">${r.get("wcf.global.button.delete")}</button>\n </div>`}}}return n.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ui/Redactor/Table",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showDialog=void 0,n=i.__importStar(n),o=i.__importDefault(o);class a{open(e){o.default.open(this),this.callbackSubmit=e.submitCallback}_dialogSubmit(){let e=!0;["rows","cols"].forEach((t=>{const i=document.getElementById("redactor-table-"+t);(+i.value<1||+i.value>100)&&(e=!1)})),e&&(this.callbackSubmit(),o.default.close(this))}_dialogSetup(){return{id:"redactorDialogTable",options:{onShow:()=>{document.getElementById("redactor-table-rows").value="2";document.getElementById("redactor-table-cols").value="3"},title:n.get("wcf.editor.table.insertTable")},source:`<dl>\n <dt>\n <label for="redactor-table-rows">${n.get("wcf.editor.table.rows")}</label>\n </dt>\n <dd>\n <input type="number" id="redactor-table-rows" class="small" min="1" max="100" value="2" data-dialog-submit-on-enter="true">\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="redactor-table-cols">${n.get("wcf.editor.table.cols")}</label>\n </dt>\n <dd>\n <input type="number" id="redactor-table-cols" class="small" min="1" max="100" value="3" data-dialog-submit-on-enter="true">\n </dd>\n </dl>\n <div class="formSubmit">\n <button id="redactor-modal-button-action" class="buttonPrimary" data-type="submit">${n.get("wcf.global.button.insert")}</button>\n </div>`}}}let r;t.showDialog=function(e){r||(r=new a),r.open(e)}})),define("WoltLabSuite/Core/Ui/Search/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Search/Page",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Dom/Util","../Dropdown/Simple","../Screen","./Input"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(e){e.preventDefault();const t=document.getElementById("pageHeader");t.classList.add("searchBarForceOpen"),window.setTimeout((()=>{t.classList.remove("searchBarForceOpen")}),10);const i=e.currentTarget,o=i.dataset.objectType,a=document.getElementById("pageHeaderSearchParameters");a.innerHTML="";const r=i.dataset.extendedLink;if(r){document.querySelector(".pageHeaderSearchExtendedLink").href=r}const s=new Map;try{const e=JSON.parse(i.dataset.parameters||"");n.isPlainObject(e)&&Object.keys(e).forEach((t=>{s.set(t,e[t])}))}catch(e){}o&&s.set("types[]",o),s.forEach(((e,t)=>{const i=document.createElement("input");i.type="hidden",i.name=t,i.value=e,a.appendChild(i)}));document.getElementById("pageHeaderSearchInputContainer").querySelector(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").textContent=i.textContent}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importDefault(l),t.init=function(e){const t=document.getElementById("pageHeaderSearchInput");new l.default(t,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit(e){if(e.classList.add("dropdownMenuPageSearch"),s.is("screen-lg")){e.dataset.dropdownAlignmentHorizontal="right";const i=t.clientWidth;e.style.setProperty("min-width",`${i}px`,"");const n=t.parentElement,o=a.default.offset(n).left+n.clientWidth-(a.default.offset(t).left+i),r=a.default.styleAsInt(window.getComputedStyle(n),"padding-bottom");e.style.setProperty("transform",`translateX(-${Math.ceil(o)}px) translateY(-${r}px)`,"")}},callbackSelect:()=>(setTimeout((()=>{o.parentByTag(t,"FORM").submit()}),1),!0)});const i=document.querySelector(".pageHeaderSearchType"),n=r.default.getDropdownMenu(a.default.identify(i));n.querySelectorAll("a[data-object-type]").forEach((e=>{e.addEventListener("click",c)})),n.querySelector('a[data-object-type="'+e+'"]').click()}})),define("WoltLabSuite/Core/Ui/Smiley/Insert",["require","exports","tslib","../../Core","../../Event/Handler"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e){this.editorId=e;let t=document.getElementById("smilies-"+this.editorId);if(!t&&(t=document.getElementById(this.editorId+"SmiliesTabContainer"),!t))throw new Error("Unable to find the message tab menu container containing the smilies.");this.container=t,this.container.addEventListener("keydown",(e=>this.keydown(e))),this.container.addEventListener("mousedown",(e=>this.mousedown(e)))}keydown(e){const t=document.activeElement;if(t.classList.contains("jsSmiley"))if(["ArrowLeft","ArrowRight","End","Home"].includes(e.key)){e.preventDefault();const i=e.currentTarget,n=Array.from(i.querySelectorAll(".jsSmiley"));"ArrowLeft"===e.key&&n.reverse();let o=n.indexOf(t);"Home"===e.key?o=0:"End"===e.key?o=n.length-1:(o+=1,o===n.length&&(o=0)),n[o].focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();const i=t.querySelector("img");this.insert(i)}}mousedown(e){const t=e.target.closest("li");if(t&&this.container.contains(t)){e.preventDefault();const i=t.querySelector("img");i&&this.insert(i)}}insert(e){o.fire("com.woltlab.wcf.redactor2","insertSmiley_"+this.editorId,{img:e})}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["require","exports","tslib","../../Language","../Dialog","../ItemList/Filter"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a);class r{constructor(e){this.callback=void 0,this.iconList=void 0,this.itemListFilter=void 0,this.icons=e}open(e){this.callback=e,o.default.open(this)}click(e){e.preventDefault();const t=e.target.closest("li").querySelector("small").textContent.trim();o.default.close(this),this.callback(t)}_dialogSetup(){return{id:"fontAwesomeSelection",options:{onSetup:()=>{this.iconList=document.getElementById("fontAwesomeIcons"),this.iconList.innerHTML=this.icons.map((e=>`<li><span class="icon icon48 fa-${e}"></span><small>${e}</small></li>`)).join(""),this.iconList.addEventListener("click",(e=>this.click(e))),this.itemListFilter=new a.default("fontAwesomeIcons",{callbackPrepareItem:e=>{const t=e.querySelector("small"),i=t.textContent.trim();return{item:e,span:t,text:i}},enableVisibilityFilter:!1,filterPosition:"top"})},onShow:()=>{this.itemListFilter.reset()},title:n.get("wcf.global.fontAwesome.selectIcon")},source:'<ul class="fontAwesomeIcons" id="fontAwesomeIcons"></ul>'}}}let s;t.setup=function(e){s||(s=new r(e))},t.open=function(e){if(!s)throw new Error("Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`.");s.open(e)}})),define("WoltLabSuite/Core/Ui/Toggle/Input",["require","exports","tslib","../../Core","../../Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class a{constructor(e,t){const i=document.querySelector(e);if(null===i)throw new Error("Unable to find element by selector '"+e+"'.");const n="INPUT"===i.nodeName?i.type:"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this.element=i,this.hide=this.getElements("hide",Array.isArray(t.hide)?t.hide:[]),this.hide=this.getElements("show",Array.isArray(t.show)?t.show:[]),this.element.addEventListener("change",(e=>this.change(e))),this.updateVisibility(this.show,this.element.checked),this.updateVisibility(this.hide,!this.element.checked)}getElements(e,t){const i=[];return t.forEach((t=>{let n=null;if("string"==typeof t){if(n=document.querySelector(t),null===n)throw new Error(`Unable to find an element with the selector '${t}'.`)}else{if(!(t instanceof HTMLElement))throw new TypeError(`The array '${e}' may only contain string selectors or DOM elements.`);n=t}i.push(n)})),i}change(e){const t=e.currentTarget.checked;this.updateVisibility(this.show,t),this.updateVisibility(this.hide,!t)}updateVisibility(e,t){e.forEach((e=>{o.default[t?"show":"hide"](e)}))}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/User/Editor",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../../Language","../../StringUtil","../Dialog","../Notification"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c);class d{constructor(){this.actionName="",this.header=document.querySelector(".userProfileUser"),["ban","disableAvatar","disableCoverPhoto","disableSignature","enable"].forEach((e=>{const t=document.querySelector(".userProfileButtonMenu .jsButtonUser"+s.ucfirst(e));t&&(t.dataset.action=e,t.addEventListener("click",(e=>this._click(e))))}))}_click(e){e.preventDefault();const t=e.currentTarget.dataset.action||"";let i="";switch(t){case"ban":o.stringToBool(this.header.dataset.banned||"")&&(i="unban");break;case"disableAvatar":o.stringToBool(this.header.dataset.disableAvatar||"")&&(i="enableAvatar");break;case"disableCoverPhoto":o.stringToBool(this.header.dataset.disableCoverPhoto||"")&&(i="enableCoverPhoto");break;case"disableSignature":o.stringToBool(this.header.dataset.disableSignature||"")&&(i="enableSignature");break;case"enable":i=o.stringToBool(this.header.dataset.isDisabled||"")?"enable":"disable"}""===i?(this.actionName=t,l.default.open(this)):n.api(this,{actionName:i})}_submit(e){e.preventDefault();const t=document.getElementById("wcfUiUserEditorExpiresLabel");let i="",o="";if(!document.getElementById("wcfUiUserEditorNeverExpires").checked){i=document.getElementById("wcfUiUserEditorExpiresDatePicker").value,""===i&&(o=r.get("wcf.global.form.error.empty"))}a.default.innerError(t,o);const s={};s[this.actionName+"Expires"]=i;const l=document.getElementById("wcfUiUserEditorReason");s[this.actionName+"Reason"]=l.value.trim(),n.api(this,{actionName:this.actionName,parameters:s})}_ajaxSuccess(e){let t;switch(e.actionName){case"ban":case"unban":{this.header.dataset.banned="ban"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserBan"),t.textContent=r.get("wcf.user."+("ban"===e.actionName?"unban":"ban"));const i=this.header.querySelector(".contentTitle");let n=i.querySelector(".jsUserBanned");"ban"===e.actionName?(n=document.createElement("span"),n.className="icon icon24 fa-lock jsUserBanned jsTooltip",n.title=e.returnValues,i.appendChild(n)):n&&n.remove();break}case"disableAvatar":case"enableAvatar":this.header.dataset.disableAvatar="disableAvatar"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserDisableAvatar"),t.textContent=r.get("wcf.user."+("disableAvatar"===e.actionName?"enable":"disable")+"Avatar");break;case"disableCoverPhoto":case"enableCoverPhoto":this.header.dataset.disableCoverPhoto="disableCoverPhoto"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserDisableCoverPhoto"),t.textContent=r.get("wcf.user."+("disableCoverPhoto"===e.actionName?"enable":"disable")+"CoverPhoto");break;case"disableSignature":case"enableSignature":this.header.dataset.disableSignature="disableSignature"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserDisableSignature"),t.textContent=r.get("wcf.user."+("disableSignature"===e.actionName?"enable":"disable")+"Signature");break;case"enable":case"disable":this.header.dataset.isDisabled="disable"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserEnable"),t.textContent=r.get("wcf.acp.user."+("enable"===e.actionName?"disable":"enable"))}-1!==["ban","disableAvatar","disableCoverPhoto","disableSignature"].indexOf(e.actionName)&&l.default.close(this),c.show()}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\UserAction",objectIDs:[+this.header.dataset.objectId]}}}_dialogSetup(){return{id:"wcfUiUserEditor",options:{onSetup:e=>{const t=document.getElementById("wcfUiUserEditorNeverExpires");t.addEventListener("change",(()=>{const e=document.getElementById("wcfUiUserEditorExpiresSettings");a.default[t.checked?"hide":"show"](e)}));e.querySelector("button.buttonPrimary").addEventListener("click",this._submit.bind(this))},onShow:e=>{l.default.setTitle("wcfUiUserEditor",r.get("wcf.user."+this.actionName+".confirmMessage"));let t=document.getElementById("wcfUiUserEditorReason").nextElementSibling;const i="wcf.user."+this.actionName+".reason.description";t.textContent=r.get(i),t.textContent===i?a.default.hide(t):a.default.show(t),t=document.getElementById("wcfUiUserEditorNeverExpires").nextElementSibling,t.textContent=r.get("wcf.user."+this.actionName+".neverExpires"),t=e.querySelector('label[for="wcfUiUserEditorExpires"]'),t.textContent=r.get("wcf.user."+this.actionName+".expires"),t=document.getElementById("wcfUiUserEditorExpiresLabel"),t.textContent=r.get("wcf.user."+this.actionName+".expires.description")}},source:`<div class="section">\n <dl>\n <dt><label for="wcfUiUserEditorReason">${r.get("wcf.global.reason")}</label></dt>\n <dd><textarea id="wcfUiUserEditorReason" cols="40" rows="3"></textarea><small></small></dd>\n </dl>\n <dl>\n <dt></dt>\n <dd><label><input type="checkbox" id="wcfUiUserEditorNeverExpires" checked> <span></span></label></dd>\n </dl>\n <dl id="wcfUiUserEditorExpiresSettings" style="display: none">\n <dt><label for="wcfUiUserEditorExpires"></label></dt>\n <dd>\n <input type="date" name="wcfUiUserEditorExpires" id="wcfUiUserEditorExpires" class="medium" min="${new Date(1e3*window.TIME_NOW).toISOString()}" data-ignore-timezone="true">\n <small id="wcfUiUserEditorExpiresLabel"></small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button class="buttonPrimary">${r.get("wcf.global.button.submit")}</button>\n </div>`}}}t.init=function(){new d}})),define("WoltLabSuite/Core/Ui/User/List",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dialog","../Pagination"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(e){this.cache=new Map,this.pageCount=0,this.pageNo=1,this.options=o.extend({className:"",dialogTitle:"",parameters:{}},e)}open(){this.pageNo=1,this.showPage()}showPage(e){if("number"==typeof e&&(this.pageNo=+e),0!==this.pageCount&&(this.pageNo<1||this.pageNo>this.pageCount))throw new RangeError(`pageNo must be between 1 and ${this.pageCount} (${this.pageNo} given).`);if(this.cache.has(this.pageNo)){const e=r.default.open(this,this.cache.get(this.pageNo));if(this.pageCount>1){const t=e.content.querySelector(".jsPagination");null!==t&&new s.default(t,{activePage:this.pageNo,maxPage:this.pageCount,callbackSwitch:this.showPage.bind(this)});const i=e.content.parentElement;i.scrollTop>0&&(i.scrollTop=0)}}else this.options.parameters.pageNo=this.pageNo,n.api(this,{parameters:this.options.parameters})}_ajaxSuccess(e){void 0!==e.returnValues.pageCount&&(this.pageCount=~~e.returnValues.pageCount),this.cache.set(this.pageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserList",className:this.options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}}_dialogSetup(){return{id:a.default.getUniqueId(),options:{title:this.options.dialogTitle},source:null}}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/User/PasswordStrength",["require","exports","tslib","../../Language","../../Dom/Util"],(function(e,t,i,n,o){"use strict";function a(e){return[].concat(e,e.split(/\W+/))}var r;n=i.__importStar(n),o=i.__importDefault(o);const s=[],l=null===(r=document.querySelector('meta[property="og:site_name"]'))||void 0===r?void 0:r.getAttribute("content");l&&s.push(l);return class{constructor(t,o){this.input=t,this.score=document.createElement("span"),this.verdictResult=document.createElement("input"),new Promise(((t,i)=>{e(["zxcvbn"],t,i)})).then(i.__importStar).then((({default:e})=>{this.zxcvbn=e,o.relatedInputs&&(this.relatedInputs=o.relatedInputs),o.staticDictionary&&(this.staticDictionary=o.staticDictionary),this.feedbacker=function(e){const t={};return Object.entries(e.default_phrases).forEach((([e,i])=>{t[e]={},Object.entries(i).forEach((([i,o])=>{const a=`wcf.user.password.zxcvbn.${e}.${i}`,r=n.get(a);t[e][i]=r!==a?r:o}))})),new e(t)}(e.Feedback);const t=this.input.closest(".inputAddon");if(null===t)throw new Error("Expected a parent with `.inputAddon`.");this.wrapper=t,this.wrapper.classList.add("inputAddonPasswordStrength");const i=document.createElement("div");i.className="passwordStrengthRating";const a=document.createElement("small");a.textContent=n.get("wcf.user.password.strength"),i.appendChild(a),this.score.className="passwordStrengthScore",this.score.dataset.score="-1",i.appendChild(this.score),this.wrapper.appendChild(i),this.verdictResult.type="hidden",this.verdictResult.name=`${this.input.name}_passwordStrengthVerdict`,this.wrapper.parentNode.insertBefore(this.verdictResult,this.wrapper),this.input.addEventListener("input",(e=>this.evaluate(e))),this.relatedInputs.forEach((e=>e.addEventListener("input",(e=>this.evaluate(e))))),""!==this.input.value.trim()&&this.evaluate()}))}evaluate(e){const t=(i=s.concat(this.staticDictionary,this.relatedInputs.map((e=>e.value.trim()))),n=a,i.map(n).reduce(((e,t)=>e.concat(t)),[])).filter((e=>e.length>0));var i,n;const r=this.input.value.trim(),l=this.zxcvbn(r.substr(0,100),t);l.feedback=this.feedbacker.from_result(l),this.score.dataset.score=0===r.length?"-1":l.score.toString(),void 0!==e&&o.default.innerError(this.wrapper,l.feedback.warning),this.verdictResult.value=JSON.stringify(l)}}})),define("WoltLabSuite/Core/Controller/Condition/Page/Dependence",["require","exports","tslib","../../../Dom/Util","../../../Event/Handler"],(function(e,t,i,n,o){"use strict";function a(){s.forEach((e=>{const t=l.get(e),i=[];r.forEach((e=>{e.checked&&i.push(~~e.value)}));const o=i.filter((e=>t.includes(e)));!i.length||o.length?function(e){n.default.hide(e);c.get(e).forEach((e=>n.default.hide(e))),c.set(e,[])}(e):function(e){n.default.show(e);let t=e;for(;(t=t.parentElement)&&t;)n.default.isHidden(t)&&c.get(e).push(t),n.default.show(t)}(e)})),o.fire("com.woltlab.wcf.pageConditionDependence","checkVisivility")}Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0,n=i.__importDefault(n),o=i.__importStar(o);const r=Array.from(document.querySelectorAll('input[name="pageIDs[]"]')),s=[],l=new WeakMap,c=new WeakMap;let d=!1;t.register=function(e,t){s.push(e),l.set(e,t),c.set(e,[]),d||(r.forEach((e=>{e.addEventListener("change",(()=>a()))})),d=!0),e.closest("form").addEventListener("submit",(()=>{n.default.isHidden(e)&&e.remove()})),a()}})),define("WoltLabSuite/Core/Controller/Map/Route/Planner",["require","exports","tslib","../../../Ajax/Status","../../../Core","../../../Dom/Util","../../../Language","../../../Ui/Dialog"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(e,t){this.didInitDialog=!1,this.directionsRenderer=void 0,this.directionsService=void 0,this.googleLink=void 0,this.lastOrigin=void 0,this.map=void 0,this.originInput=void 0,this.travelMode=void 0;const i=document.getElementById(e);if(null===i)throw new Error(`Unknown button with id '${e}'`);this.button=i,this.button.addEventListener("click",(e=>this.openDialog(e))),this.destination=t}_calculateRoute(e){const t=s.default.getDialog(this).dialog;if(e.label&&(this.originInput.value=e.label),void 0===this.map){const e=t.querySelector(".googleMap");this.map=new google.maps.Map(e,{disableDoubleClickZoom:window.WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),draggable:window.WCF.Location.GoogleMaps.Settings.get("draggable"),mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:window.WCF.Location.GoogleMaps.Settings.get("scaleControl"),scrollwheel:window.WCF.Location.GoogleMaps.Settings.get("scrollwheel")}),this.directionsService=new google.maps.DirectionsService,this.directionsRenderer=new google.maps.DirectionsRenderer,this.directionsRenderer.setMap(this.map);const i=t.querySelector(".googleMapsDirections");this.directionsRenderer.setPanel(i),this.googleLink=t.querySelector(".googleMapsDirectionsGoogleLink")}const i={destination:this.destination,origin:e.location,provideRouteAlternatives:!0,travelMode:google.maps.TravelMode[this.travelMode.value.toUpperCase()]};n.show(),this.directionsService.route(i,((e,t)=>this.setRoute(e,t))),this.googleLink.href=this.getGoogleMapsLink(e.location,this.travelMode.value),this.lastOrigin=e.location}getGoogleMapsLink(e,t){if(e){let 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(){if(!this.didInitDialog){const e=s.default.getDialog(this).dialog;this.originInput=e.querySelector('input[name="origin"]'),new window.WCF.Location.GoogleMaps.LocationSearch(this.originInput,(e=>this._calculateRoute(e))),this.travelMode=e.querySelector('select[name="travelMode"]'),this.travelMode.addEventListener("change",this.updateRoute.bind(this)),this.didInitDialog=!0}}openDialog(e){e.preventDefault(),s.default.open(this)}setRoute(e,t){n.hide(),"OK"===t?(a.default.show(this.map.getDiv().parentElement),google.maps.event.trigger(this.map,"resize"),this.directionsRenderer.setDirections(e),a.default.show(this.travelMode.closest("dl")),a.default.show(this.googleLink),a.default.innerError(this.originInput,!1)):("OVER_QUERY_LIMIT"!==t&&"REQUEST_DENIED"!==t&&(t=google.maps.DirectionsStatus.NOT_FOUND),a.default.innerError(this.originInput,r.get(`wcf.map.route.error.${t.toLowerCase()}`)))}updateRoute(){this._calculateRoute({location:this.lastOrigin})}_dialogSetup(){return{id:this.button.id+"Dialog",options:{onShow:this.initDialog.bind(this),title:r.get("wcf.map.route.planner")},source:`\n<div class="googleMapsDirectionsContainer" style="display: none;">\n <div class="googleMap"></div>\n <div class="googleMapsDirections"></div>\n</div>\n<small class="googleMapsDirectionsGoogleLinkContainer">\n <a href="${this.getGoogleMapsLink()}" class="googleMapsDirectionsGoogleLink" target="_blank" style="display: none;">${r.get("wcf.map.route.viewOnGoogleMaps")}</a>\n</small>\n<dl>\n <dt>${r.get("wcf.map.route.origin")}</dt>\n <dd>\n <input type="text" name="origin" class="long" autofocus>\n </dd>\n</dl>\n<dl style="display: none;">\n <dt>${r.get("wcf.map.route.travelMode")}</dt>\n <dd>\n <select name="travelMode">\n <option value="driving">${r.get("wcf.map.route.travelMode.driving")}</option>\n <option value="walking">${r.get("wcf.map.route.travelMode.walking")}</option>\n <option value="bicycling">${r.get("wcf.map.route.travelMode.bicycling")}</option>\n <option value="transit">${r.get("wcf.map.route.travelMode.transit")}</option>\n </select>\n </dd>\n</dl>`}}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Controller/User/Notification/Settings",["require","exports","tslib","../../../Language","../../../Ui/Dropdown/Reusable"],(function(e,t,i,n,o){"use strict";function a(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;var i,a;l=~~t.dataset.objectId,function(){if(s)return;s=document.createElement("ul"),s.className="dropdownMenu",["instant","daily","divider","none"].forEach((e=>{const t=document.createElement("li");if("divider"===e)t.className="dropdownDivider";else{const i=document.createElement("a");i.href="#",i.textContent=n.get(`wcf.user.notification.mailNotificationType.${e}`),t.appendChild(i),t.dataset.value=e,t.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget.dataset.value;r().value=t;const i=document.querySelector(`.notificationSettingsEmailType[data-object-id="${l}"]`);i.title=n.get(`wcf.user.notification.mailNotificationType.${t}`);const o=i.querySelector(".jsIconNotificationSettingsEmailType");switch(o.classList.remove("fa-clock-o","fa-flash","fa-times","green","red"),t){case"daily":o.classList.add("fa-clock-o","green");break;case"instant":o.classList.add("fa-flash","green");break;case"none":o.classList.add("fa-times","red")}l=0}(e)))}s.appendChild(t)})),o.init("UiNotificationSettingsEmailType",s)}(),i=r().value,s.querySelectorAll("li").forEach((e=>{e.dataset.value===i?e.classList.add("active"):e.classList.remove("active")})),a=t,o.toggleDropdown("UiNotificationSettingsEmailType",a)}function r(){return document.getElementById(`settings_${l}_mailNotificationType`)}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let l=0;t.init=function(){document.querySelectorAll(".jsCheckboxNotificationSettingsState").forEach((e=>{e.addEventListener("change",(e=>function(e){const t=e.currentTarget,i=~~t.dataset.objectId,n=document.querySelector(`.notificationSettingsEmailType[data-object-id="${i}"]`);null!==n&&(t.checked?n.classList.remove("disabled"):n.classList.add("disabled"))}(e)))})),document.querySelectorAll(".notificationSettingsEmailType").forEach((e=>{e.addEventListener("click",(e=>a(e)))}))}})),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["require","exports","tslib","../../../Ui/Dropdown/Simple","../../../Event/Handler","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r{constructor(e,t){this._formId=e,this._suffixField=document.getElementById(t),this._suffixDropdownMenu=n.default.getDropdownMenu(t+"_dropdown"),this._suffixDropdownToggle=n.default.getDropdown(t+"_dropdown").getElementsByClassName("dropdownToggle")[0],Array.from(this._suffixDropdownMenu.children).forEach((e=>{e.addEventListener("click",(e=>this._changeSuffixSelection(e)))})),o.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",(e=>this._destroyDropdown(e)))}_changeSuffixSelection(e){const t=e.currentTarget;t.classList.contains("disabled")||(Array.from(this._suffixDropdownMenu.children).forEach((e=>{e===t?e.classList.add("active"):e.classList.remove("active")})),this._suffixField.value=t.dataset.value,this._suffixDropdownToggle.innerHTML=t.dataset.label+' <span class="icon icon16 fa-caret-down pointer"></span>')}_destroyDropdown(e){e.formId===this._formId&&n.default.destroy(this._suffixDropdownMenu.id)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return{[this._fieldId]:this._aclList.getData()}}_readField(){}setAclList(e){return this._aclList=e,this}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Button",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0,n=i.__importDefault(n);class o extends n.default{_getData(){const e={};return"1"===this._field.dataset.isClicked&&(e[this._fieldId]=this._field.value),e}}t.Button=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["require","exports","tslib","./Field","../../../Controller/Captcha","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importStar(a);class r extends n.default{_getData(){return o.default.has(this._fieldId)?o.default.getData(this._fieldId):{}}_readField(){}destroy(){o.default.has(this._fieldId)&&o.default.delete(this._fieldId)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){const e=this._fields.map((e=>e.checked?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e}}_readField(){this._fields=Array.from(document.querySelectorAll(`input[name="${this._fieldId}[]"]`))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return{[this._fieldId]:this._field.checked?1:0}}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Date",["require","exports","tslib","./Field","../../../Date/Picker","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importStar(a);class r extends n.default{_getData(){return{[this._fieldId]:o.default.getValue(this._field)}}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["require","exports","tslib","./Field","../../../Ui/ItemList/Static","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e=[];return o.getValues(this._fieldId).forEach((t=>{t.objectId?e[t.objectId]=t.value:e.push(t.value)})),{[this._fieldId]:e}}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){const e={};return this._fields.some((t=>!!t.checked&&(e[this._fieldId]=t.value,!0))),e}_readField(){this._fields=Array.from(document.querySelectorAll("input[name="+this._fieldId+"]"))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){const e=Array.from(document.querySelectorAll('input[name="'+this._fieldId+'[group][]"]')).map((e=>e.value)),t=Array.from(document.querySelectorAll('input[name="'+this._fieldId+'[user][]"]')).map((e=>e.value));return{[this._fieldId]:{group:e,user:t}}}_readField(){}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["require","exports","tslib","./Field","../../../Ui/ItemList","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e}}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/User",["require","exports","tslib","./Field","../../../Core","../../../Ui/ItemList"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e=a.getValues(this._fieldId).map((e=>e.objectId?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e.join(",")}}}return o.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Value",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return{[this._fieldId]:this._field.value}}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["require","exports","tslib","./Field","../../../Language/Input","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e={},t=o.getValues(this._fieldId);return t.size>1?t.forEach(((t,i)=>{e[this._fieldId+"_i18n"][i]=t})):e[this._fieldId]=t.get(0),e}destroy(){o.unregister(this._fieldId)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/Comment/Response/Add",["require","exports","tslib","../../../Core","../../../Dom/Change/Listener","../../../Dom/Util","../../../Language","../Add","../../Notification"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importStar(l);class c extends s.default{constructor(e,t){super(e),this._options=n.extend({callbackInsert:null},t)}getContainer(){return this._container}getContent(){return window.jQuery(this._textarea).redactor("code.get")}setContent(e){window.jQuery(this._textarea).redactor("code.set",e),window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor");const t=this._textarea.parentElement.querySelector(".innerError");null!==t&&t.remove(),this._content.classList.remove("collapsed"),this._focusEditor()}_getParameters(){const e=super._getParameters(),t=this._container.closest(".comment");return e.data.commentID=~~t.dataset.objectId,e}_insertMessage(e){const t=this._container.parentElement.querySelector(".commentContent");let i=t.nextElementSibling;return null!==i&&i.classList.contains("commentResponseList")||(i=document.createElement("ul"),i.className="containerList commentResponseList",i.dataset.responses="0",t.insertAdjacentElement("afterend",i)),a.default.insertHtml(e.returnValues.template,i,"append"),l.show(r.get("wcf.global.success.add")),o.default.trigger(),window.jQuery(this._textarea).redactor("code.set",""),null!==this._options.callbackInsert&&this._options.callbackInsert(),i.dataset.responses=i.children.length.toString(),i.lastElementChild}_ajaxSetup(){const e=super._ajaxSetup();return e.data.actionName="addResponse",e}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/Comment/Response/Edit",["require","exports","tslib","../../../Ajax","../../../Core","../../../Dom/Change/Listener","../../../Dom/Util","../Edit","../../Notification"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importStar(l);class c extends s.default{constructor(e){super(e),this._responses=new WeakSet,this.rebuildResponses(),a.default.add("Ui/Comment/Response/Edit_"+r.default.identify(this._container),(()=>this.rebuildResponses()))}rebuild(){}rebuildResponses(){this._container.querySelectorAll(".commentResponse").forEach((e=>{if(!this._responses.has(e)){if(o.stringToBool(e.dataset.canEdit||"")){const t=e.querySelector(".jsCommentResponseEditButton");null!==t&&t.addEventListener("click",(e=>this._click(e)))}this._responses.add(e)}}))}_click(e){if(e.preventDefault(),null===this._activeElement){const t=e.currentTarget;this._activeElement=t.closest(".commentResponse"),this._prepare(),n.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})}else l.show("wcf.message.error.editorAlreadyInUse",null,"warning")}_prepare(){this._editorContainer=document.createElement("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='<span class="icon icon48 fa-spinner"></span>';const e=this._activeElement.querySelector(".commentResponseContent");e.insertBefore(this._editorContainer,e.firstChild)}_showMessage(e){const t=this._editorContainer.parentElement;r.default.setInnerHtml(t.querySelector(".commentResponseContent .userMessage"),e.returnValues.message),this._restoreMessage(),l.show()}_getEditorId(){return`commentResponseEditor${this._getObjectId(this._activeElement)}`}_ajaxSetup(){return{data:{className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{objectTypeID:~~this._container.dataset.objectTypeId}}},silent:!0}}}return o.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/Message/InlineEditor/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Page/Header/Fixed",["require","exports","tslib","../../../Event/Handler","../../Alignment","../../CloseOverlay","../../Dropdown/Simple","../../Screen"],(function(e,t,i,n,o,a,r,s){"use strict";function l(){h=document.getElementById("pageHeaderSearch"),h.addEventListener("click",(e=>e.stopPropagation())),u=document.getElementById("pageHeaderPanel"),p=document.getElementById("pageHeaderSearchInput"),m=document.getElementById("topMenu"),f=document.getElementById("userPanelSearchButton"),f.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.classList.contains("searchBarOpen")?c():function(){window.WCF.Dropdown.Interactive.Handler.closeAll(),d.classList.add("searchBarOpen"),f.parentElement.classList.add("open"),g||o.set(h,m,{horizontal:"right"});h.style.setProperty("top",`${u.clientHeight}px`,""),p.focus(),window.setTimeout((()=>{p.selectionStart=p.selectionEnd=p.value.length}),1)}()})),a.default.add("WoltLabSuite/Core/Ui/Page/Header/Fixed",(()=>{d.classList.contains("searchBarForceOpen")||c()})),n.add("com.woltlab.wcf.MainMenuMobile","more",(e=>{"com.woltlab.wcf.search"===e.identifier&&(e.handler.close(!0),f.click())}))}function c(){d.classList.remove("searchBarOpen"),f.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{h.style.removeProperty(e)})),p.blur();const e=h.querySelector(".pageHeaderSearchType");r.default.close(e.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s);let d,u,h,p,m,f,g=!1;t.init=function(){d=document.getElementById("pageHeader"),l(),s.on("screen-md-down",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),n.add("com.woltlab.wcf.Search","close",c)}})),define("WoltLabSuite/Core/Ui/Page/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class a extends o.default{constructor(e,t){if("function"!=typeof t.callbackSuccess)throw new Error("Expected a valid callback function for 'callbackSuccess'.");super(e,t=n.extend({ajax:{className:"wcf\\data\\page\\PageAction"}},t)),this.callbackSuccess=t.callbackSuccess,this.pageId=0}setPageId(e){this.pageId=e}getParameters(e){const t=super.getParameters(e);return t.objectIDs=[this.pageId],t}_ajaxSuccess(e){this.callbackSuccess(e)}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Page/Search/Handler",["require","exports","tslib","../../../Language","../../../StringUtil","../../../Dom/Util","../../Dialog","./Input"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(){this.callbackSuccess=void 0,this.resultList=void 0,this.resultListContainer=void 0,this.searchInput=void 0,this.searchInputHandler=void 0,this.searchInputLabel=void 0}open(e,t,i,o){this.callbackSuccess=i,r.default.open(this),r.default.setTitle(this,t),this.searchInputLabel.textContent=n.get(o||"wcf.page.pageObjectID.search.terms"),this._getSearchInputHandler().setPageId(e)}buildList(e){this.resetList(),Array.isArray(e.returnValues)&&0!==e.returnValues.length?(e.returnValues.forEach((e=>{let t=e.image;/^fa-/.test(t)&&(t=`<span class="icon icon48 ${t} pointer jsTooltip" title="${n.get("wcf.global.select")}"></span>`);const i=document.createElement("li");i.dataset.objectId=e.objectID.toString();const a=e.description?`<p>${e.description}</p>`:"";i.innerHTML=`<div class="box48">\n ${t}\n <div>\n <div class="containerHeadline">\n <h3>\n <a href="${o.escapeHTML(e.link)}">${o.escapeHTML(e.title)}</a>\n </h3>\n ${a}\n </div>\n </div>\n </div>`,i.addEventListener("click",this.click.bind(this)),this.resultList.appendChild(i)})),a.default.show(this.resultListContainer)):a.default.innerError(this.searchInput,n.get("wcf.page.pageObjectID.search.noResults"))}resetList(){a.default.innerError(this.searchInput,!1),this.resultList.innerHTML="",a.default.hide(this.resultListContainer)}_getSearchInputHandler(){if(!this.searchInputHandler){const e=document.getElementById("wcfUiPageSearchInput");this.searchInputHandler=new s.default(e,{callbackSuccess:this.buildList.bind(this)})}return this.searchInputHandler}click(e){if("A"===e.target.nodeName)return;e.stopPropagation();const t=e.currentTarget;this.callbackSuccess(+t.dataset.objectId),r.default.close(this)}_dialogSetup(){return{id:"wcfUiPageSearchHandler",options:{onShow:e=>{this.searchInput||(this.searchInput=document.getElementById("wcfUiPageSearchInput"),this.searchInputLabel=e.querySelector('label[for="wcfUiPageSearchInput"]'),this.resultList=document.getElementById("wcfUiPageSearchResultList"),this.resultListContainer=document.getElementById("wcfUiPageSearchResultListContainer")),this.searchInput.value="",a.default.hide(this.resultListContainer),this.resultList.innerHTML="",this.searchInput.focus()},title:""},source:`<div class="section">\n <dl>\n <dt>\n <label for="wcfUiPageSearchInput">${n.get("wcf.page.pageObjectID.search.terms")}</label>\n </dt>\n <dd>\n <input type="text" id="wcfUiPageSearchInput" class="long">\n </dd>\n </dl>\n </div>\n <section id="wcfUiPageSearchResultListContainer" class="section sectionContainerList">\n <header class="sectionHeader">\n <h2 class="sectionTitle">${n.get("wcf.page.pageObjectID.search.results")}</h2>\n </header>\n <ul id="wcfUiPageSearchResultList" class="containerList wcfUiPageSearchResultList"></ul>\n </section>`}}}let c;t.open=function(e,t,i,n){(c||(c=new l),c).open(e,t,i,n)}})),define("WoltLabSuite/Core/Ui/Reaction/Profile/Loader",["require","exports","tslib","../../../Ajax","../../../Core","../../../Dom/Util","../../../Language"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);class s{constructor(e){if(this._reactionTypeID=null,this._targetType="received",this._container=document.getElementById("likeList"),this._userID=e,this._options={parameters:{}},!this._userID)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'userID' given.");const t=document.createElement("li");t.className="likeListMore showMore",this._noMoreEntries=document.createElement("small"),this._noMoreEntries.innerHTML=r.get("wcf.like.reaction.noMoreEntries"),this._noMoreEntries.style.display="none",t.appendChild(this._noMoreEntries),this._loadButton=document.createElement("button"),this._loadButton.className="small",this._loadButton.innerHTML=r.get("wcf.like.reaction.more"),this._loadButton.addEventListener("click",(()=>this._loadReactions())),this._loadButton.style.display="none",t.appendChild(this._loadButton),this._container.appendChild(t),2===document.querySelectorAll("#likeList > li").length?this._noMoreEntries.style.display="":this._loadButton.style.display="",this._setupReactionTypeButtons(),this._setupTargetTypeButtons()}_setupReactionTypeButtons(){document.querySelectorAll("#reactionType .button").forEach((e=>{e.addEventListener("click",(()=>this._changeReactionTypeValue(~~e.dataset.reactionTypeId)))}))}_setupTargetTypeButtons(){document.querySelectorAll("#likeType .button").forEach((e=>{e.addEventListener("click",(()=>this._changeTargetType(e.dataset.likeType)))}))}_changeTargetType(e){if("given"!==e&&"received"!==e)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'targetType' given.");e!==this._targetType&&(document.querySelector("#likeType .button.active").classList.remove("active"),document.querySelector(`#likeType .button[data-like-type="${e}"]`).classList.add("active"),this._targetType=e,this._reload())}_changeReactionTypeValue(e){const t=document.querySelector("#reactionType .button.active");t&&t.classList.remove("active"),this._reactionTypeID!==e?(document.querySelector(`#reactionType .button[data-reaction-type-id="${e}"]`).classList.add("active"),this._reactionTypeID=e):this._reactionTypeID=null,this._reload()}_reload(){document.querySelectorAll("#likeList > li:not(:first-child):not(:last-child)").forEach((e=>e.remove())),this._container.dataset.lastLikeTime="0",this._loadReactions()}_loadReactions(){this._options.parameters.userID=this._userID,this._options.parameters.lastLikeTime=~~this._container.dataset.lastLikeTime,this._options.parameters.targetType=this._targetType,this._options.parameters.reactionTypeID=~~this._reactionTypeID,n.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){e.returnValues.template?(document.querySelector("#likeList > li:nth-last-child(1)").insertAdjacentHTML("beforebegin",e.returnValues.template),this._container.dataset.lastLikeTime=e.returnValues.lastLikeTime.toString(),a.default.hide(this._noMoreEntries),a.default.show(this._loadButton)):(a.default.show(this._noMoreEntries),a.default.hide(this._loadButton))}_ajaxSetup(){return{data:{actionName:"load",className:"\\wcf\\data\\reaction\\ReactionAction"}}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["require","exports","tslib","../../../Ajax","../../../Core","../../../Language","../../../Dom/Util"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s{constructor(e){this.containerId=e;const t=document.getElementById(this.containerId);this.list=t.querySelector(".recentActivityList");const i=document.createElement("li");if(i.className="showMore",this.list.childElementCount){i.innerHTML='<button class="small">'+a.get("wcf.user.recentActivity.more")+"</button>";i.children[0].addEventListener("click",(e=>this.showMore(e)))}else i.innerHTML="<small>"+a.get("wcf.user.recentActivity.noMoreEntries")+"</small>";this.list.appendChild(i),this.showMoreItem=i,t.querySelectorAll(".jsRecentActivitySwitchContext .button").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault(),e.classList.contains("active")||this.switchContext()}))}))}showMore(e){e.preventDefault();this.showMoreItem.children[0].disabled=!0,n.api(this,{actionName:"load",parameters:{boxID:~~this.list.dataset.boxId,filteredByFollowedUsers:o.stringToBool(this.list.dataset.filteredByFollowedUsers||""),lastEventId:this.list.dataset.lastEventId,lastEventTime:this.list.dataset.lastEventTime,userID:~~this.list.dataset.userId}})}switchContext(){n.api(this,{actionName:"switchContext"},(()=>{window.location.hash=`#${this.containerId}`,window.location.reload()}))}_ajaxSuccess(e){if(e.returnValues.template){r.default.insertHtml(e.returnValues.template,this.showMoreItem,"before"),this.list.dataset.lastEventTime=e.returnValues.lastEventTime.toString(),this.list.dataset.lastEventId=e.returnValues.lastEventID.toString();this.showMoreItem.children[0].disabled=!1}else this.showMoreItem.innerHTML="<small>"+a.get("wcf.user.recentActivity.noMoreEntries")+"</small>"}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/CoverPhoto/Delete",["require","exports","tslib","../../../Ajax","../../../Dom/Util","../../../Event/Handler","../../../Language","../../Confirmation","../../Notification"],(function(e,t,i,n,o,a,r,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);class c{constructor(e){this.button=document.querySelector(".jsButtonDeleteCoverPhoto"),this.button.addEventListener("click",(e=>this._click(e))),this.userId=e,a.add("com.woltlab.wcf.user","coverPhoto",(e=>{"string"==typeof e.url&&e.url.length>0&&o.default.show(this.button.parentElement)}))}_click(e){e.preventDefault(),s.show({confirm:()=>n.api(this),message:r.get("wcf.user.coverPhoto.delete.confirmMessage")})}_ajaxSuccess(e){document.querySelector(".userProfileCoverPhoto").style.setProperty("background-image",`url(${e.returnValues.url})`,""),o.default.hide(this.button.parentElement),l.show()}_ajaxSetup(){return{data:{actionName:"deleteCoverPhoto",className:"wcf\\data\\user\\UserProfileAction",parameters:{userID:this.userId}}}}}let d;t.init=function(e){d||(d=new c(e))}})),define("WoltLabSuite/Core/Ui/User/CoverPhoto/Upload",["require","exports","tslib","../../../Core","../../../Dom/Util","../../../Event/Handler","../../Dialog","../../Notification","../../../Upload"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l);class c extends l.default{constructor(e){super("coverPhotoUploadButtonContainer","coverPhotoUploadPreview",{action:"uploadCoverPhoto",className:"wcf\\data\\user\\UserProfileAction"}),this.userId=e}_getParameters(){return{userID:this.userId}}_success(e,t){if(o.default.innerError(this._button,t.returnValues.errorMessage),this._target.innerHTML="",t.returnValues.url){document.querySelector(".userProfileCoverPhoto").style.setProperty("background-image",`url(${t.returnValues.url})`,""),r.close("userProfileCoverPhotoUpload"),s.show(),a.fire("com.woltlab.wcf.user","coverPhoto",{url:t.returnValues.url})}}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/User/Session/Delete",["require","exports","tslib","../../../Ajax","../../Notification","../../Confirmation","../../../Language"],(function(e,t,i,n,o,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiUserSessionDelete=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(){this.knownElements=new Map,document.querySelectorAll(".sessionDeleteButton").forEach((e=>{if(!e.dataset.sessionId)throw new Error("No sessionId for session delete button given.");this.knownElements.has(e.dataset.sessionId)||(e.addEventListener("click",(t=>this.delete(e,t))),this.knownElements.set(e.dataset.sessionId,e))}))}delete(e,t){t.preventDefault(),a.show({message:r.get("wcf.user.security.deleteSession.confirmMessage"),confirm:t=>{n.api(this,{sessionID:e.dataset.sessionId})}})}_ajaxSuccess(e){const t=this.knownElements.get(e.sessionID);if(void 0!==t){const e=t.closest("li");null!==e&&e.remove()}o.show()}_ajaxSetup(){return{url:"index.php?delete-session/&t="+window.SECURITY_TOKEN}}}t.UiUserSessionDelete=s,t.default=s})),define("WoltLabSuite/Core/Ui/User/Trophy/List",["require","exports","tslib","../../../Ajax","../../../Core","../../../Dom/Change/Listener","../../Dialog","../../Pagination"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(e,t){this.pageCount=e,this.title=t,this.cache=new Map}has(e){return this.cache.has(e)}get(e){return this.cache.get(e)}set(e,t){this.cache.set(e,t)}}class c{constructor(){this.cache=new Map,this.currentPageNo=0,this.currentUser=0,this.knownElements=new WeakSet,a.default.add("WoltLabSuite/Core/Ui/User/Trophy/List",(()=>this.rebuild())),this.rebuild()}rebuild(){document.querySelectorAll(".userTrophyOverlayList").forEach((e=>{this.knownElements.has(e)||(e.addEventListener("click",(t=>this.open(e,t))),this.knownElements.add(e))}))}open(e,t){t.preventDefault(),this.currentPageNo=1,this.currentUser=+e.dataset.userId,this.showPage()}showPage(e){void 0!==e&&(this.currentPageNo=e);const t=this.cache.get(this.currentUser);if(t&&0!==t.pageCount&&(this.currentPageNo<1||this.currentPageNo>t.pageCount))throw new RangeError(`pageNo must be between 1 and ${t.pageCount} (${this.currentPageNo} given).`);if(t&&t.has(this.currentPageNo)){const e=r.default.open(this,t.get(this.currentPageNo));if(r.default.setTitle("userTrophyListOverlay",t.title),t.pageCount>1){const i=e.content.querySelector(".jsPagination");null!==i&&new s.default(i,{activePage:this.currentPageNo,maxPage:t.pageCount,callbackSwitch:this.showPage.bind(this)})}}else n.api(this,{parameters:{pageNo:this.currentPageNo,userID:this.currentUser}})}_ajaxSuccess(e){let t;void 0!==e.returnValues.pageCount?(t=new l(+e.returnValues.pageCount,e.returnValues.title),this.cache.set(this.currentUser,t)):t=this.cache.get(this.currentUser),t.set(this.currentPageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserTrophyList",className:"wcf\\data\\user\\trophy\\UserTrophyAction"}}}_dialogSetup(){return{id:"userTrophyListOverlay",options:{title:""},source:null}}}return o.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["require","exports","tslib","../../../../Core","../../../../Dom/Util","../../../../Language","../../../../Ui/Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s{constructor(e,t,i){this._formFieldContainer=document.getElementById(e+"Container"),this._labelChooser=this._formFieldContainer.getElementsByClassName("labelChooser")[0],this._options=n.extend({forceSelection:!1,showWithoutSelection:!1},i),this._input=document.createElement("input"),this._input.type="hidden",this._input.id=e,this._input.name=e,this._input.value=t,this._formFieldContainer.appendChild(this._input);const s=o.identify(this._labelChooser);let l=r.default.getDropdownMenu(s);null===l&&(r.default.init(this._labelChooser.getElementsByClassName("dropdownToggle")[0]),l=r.default.getDropdownMenu(s));let c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=document.createElement("ul"),l.appendChild(c);const e=document.createElement("li");e.classList.add("dropdownDivider"),c.appendChild(e)}if(this._options.showWithoutSelection){const e=document.createElement("li");e.dataset.labelId="-1",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=a.get("wcf.label.withoutSelection"),t.appendChild(i)}if(!this._options.forceSelection){const e=document.createElement("li");e.dataset.labelId="0",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=a.get("wcf.label.none"),t.appendChild(i)}l.querySelectorAll("li:not(.dropdownDivider)").forEach((e=>{e.addEventListener("click",(e=>this._click(e))),t&&e.dataset.labelId===t&&this._selectLabel(e)}))}_blockScroll(e){e.addEventListener("wheel",(e=>e.preventDefault()),{passive:!1})}_click(e){e.preventDefault(),this._selectLabel(e.currentTarget)}_selectLabel(e){let t=e.dataset.labelId;t||(t="0");const i=e.querySelector("span > span"),n=this._labelChooser.querySelector(".dropdownToggle > span");n.className=i.className,n.textContent=i.textContent,this._input.value=t}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["require","exports","tslib","../../../../Core","../../../../Environment"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t,i,n){if(this._field=document.getElementById(e+"Container"),null===this._field)throw new Error("Unknown field with id '"+e+"'");this._input=document.createElement("input"),this._input.id=e,this._input.name=e,this._input.type="hidden",this._input.value=t,this._field.appendChild(this._input),this._activeCssClasses=i,this._defaultCssClasses=n,this._ratingElements=new Map;const o=this._field.querySelector(".ratingList");o.addEventListener("mouseleave",(()=>this._restoreRating())),o.querySelectorAll("li").forEach((e=>{e.classList.contains("ratingMetaButton")?(e.addEventListener("click",(e=>this._metaButtonClick(e))),e.addEventListener("mouseenter",(()=>this._restoreRating()))):(this._ratingElements.set(e.dataset.rating,e),e.addEventListener("click",(e=>this._listItemClick(e))),e.addEventListener("mouseenter",(e=>this._listItemMouseEnter(e))),e.addEventListener("mouseleave",(()=>this._listItemMouseLeave())))}))}_listItemClick(e){const t=e.currentTarget;this._input.value=t.dataset.rating,"desktop"!==o.platform()&&this._restoreRating()}_listItemMouseEnter(e){const t=e.currentTarget.dataset.rating;this._ratingElements.forEach(((e,i)=>{const n=e.getElementsByClassName("icon")[0];this._toggleIcon(n,~~i<=~~t)}))}_listItemMouseLeave(){this._ratingElements.forEach((e=>{const t=e.getElementsByClassName("icon")[0];this._toggleIcon(t,!1)}))}_metaButtonClick(e){"removeRating"===e.currentTarget.dataset.action&&(this._input.value="",this._listItemMouseLeave())}_restoreRating(){this._ratingElements.forEach(((e,t)=>{const i=e.getElementsByClassName("icon")[0];this._toggleIcon(i,~~t<=~~this._input.value)}))}_toggleIcon(e,t=!1){t?(e.classList.remove(...this._defaultCssClasses),e.classList.add(...this._activeCssClasses)):(e.classList.remove(...this._activeCssClasses),e.classList.add(...this._defaultCssClasses))}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["require","exports","tslib","./Manager","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this.init(e,t)}checkDependency(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")}getDependentNode(){return this._dependentElement}getField(){return this._field}getFields(){return this._fields}init(e,t){if(this._dependentElement=document.getElementById(e),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+e+"Container'.");if(this._field=document.getElementById(t),null===this._field){if(this._fields=[],document.querySelectorAll("input[type=radio][name="+t+"]").forEach((e=>{this._fields.push(e)})),!this._fields.length&&(document.querySelectorAll('input[type=checkbox][name="'+t+'[]"]').forEach((e=>{this._fields.push(e)})),!this._fields.length))throw new Error("Unknown field with id '"+t+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.tagName&&"radio"===this._field.type&&""!==this._field.dataset.noInputId){if(this._noField=document.getElementById(this._field.dataset.noInputId),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+t+"'");this._fields.push(this._noField)}n.addDependency(this)}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["require","exports","tslib","./Abstract","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return!e.checked;case"radio":return!(!this._noField||!this._noField.checked)||!e.checked;default:return 0===e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0===this._field.querySelectorAll("option:checked").length:"0"==e.value||0===e.value.length}case"TEXTAREA":return 0===this._field.value.trim().length}return this._fields.every((e=>!e.checked))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/IsNotClicked",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsNotClicked=void 0,n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{constructor(e,t){super(e,t),this._field.addEventListener("click",(()=>{this._field.dataset.isClicked="1",o.checkDependencies()}))}checkDependency(){return"1"!==this._field.dataset.isClicked}}t.IsNotClicked=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["require","exports","tslib","./Abstract","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return e.checked;case"radio":return(!this._noField||!this._noField.checked)&&e.checked;default:return 0!==e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0!==e.querySelectorAll("option:checked").length:"0"!=e.value&&0!==e.value.length}case"TEXTAREA":return 0!==this._field.value.trim().length}return this._fields.some((e=>e.checked))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["require","exports","tslib","./Abstract","./Manager","../../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{constructor(){super(...arguments),this._isNegated=!1}checkDependency(){if(!this._values)throw new Error("Values have not been set.");const e=[];if(this._field){if(o.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else{let t=!0;if(this._fields.forEach((i=>{if(i.checked){if(o.isHiddenByDependencies(i))return t=!1,!1;e.push(i.value)}})),!t)return!1}let t=!1;return this._values.forEach((i=>{e.forEach((e=>{i==e&&(t=!0)}))})),t?!this._isNegated:this._isNegated}negate(e){return this._isNegated=e,this}values(e){return this._values=e,this}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["require","exports","tslib","../Value","../../../../Language/Chooser","../../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{destroy(){o.removeChooser(this._fieldId)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["require","exports","tslib","../Value","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{constructor(e){super(e+"_tmpHash")}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Poll",["require","exports","tslib","../Field","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return this._pollEditor.getData()}_readField(){}setPollEditor(e){this._pollEditor=e}}return o.enableLegacyInheritance(a),a}));let G=null;class H{}H.render=function(e,t){G(e,t)},self.QrCreator=H,function(e){function t(t,i,n,o){var a,r,s={},l=e(n,i);return l.u(t),l.J(),o=o||0,a=l.h(),r=l.h()+2*o,s.text=t,s.level=i,s.version=n,s.O=r,s.a=function(e,t){return t-=o,!(0>(e-=o)||e>=a||0>t||t>=a)&&l.a(e,t)},s}function i(e,t,i,n,o,a,r,s,l,c){function d(t,i,n,o,r,s,l){t?(e.lineTo(i+s,n+l),e.arcTo(i,n,o,r,a)):e.lineTo(i,n)}r?e.moveTo(t+a,i):e.moveTo(t,i),d(s,n,i,n,o,-a,0),d(l,n,o,t,o,0,-a),d(c,t,o,t,i,a,0),d(r,t,i,n,i,0,a)}function n(e,t,i,n,o,a,r,s,l,c){function d(t,i,n,o){e.moveTo(t+n,i),e.lineTo(t,i),e.lineTo(t,i+o),e.arcTo(t,i,t+n,i,a)}r&&d(t,i,a,a),s&&d(n,i,-a,a),l&&d(n,o,-a,-a),c&&d(t,o,a,-a)}function o(e,o){var a,r,s,l,c,d,u,h,p,m,f,g,_,b,v,w,y,E,S,C,L,A,I;e:{for(a=o.text,r=o.v,s=o.N,l=o.K,c=o.P,s=Math.max(1,s||1),l=Math.min(40,l||40);s<=l;s+=1)try{d=t(a,r,s,c);break e}catch(e){}d=void 0}if(!d)return null;for(a=e.getContext("2d"),o.background&&(a.fillStyle=o.background,a.fillRect(o.left,o.top,o.size,o.size)),r=d.O,l=o.size/r,a.beginPath(),c=0;c<r;c+=1)for(s=0;s<r;s+=1)u=a,h=o.left+s*l,p=o.top+c*l,m=c,f=s,g=d.a,_=h+l,b=p+l,v=m-1,w=m+1,y=f-1,E=f+1,S=Math.floor(Math.min(.5,Math.max(0,o.R))*l),C=g(m,f),L=g(v,y),A=g(v,f),v=g(v,E),I=g(m,E),E=g(w,E),f=g(w,f),w=g(w,y),m=g(m,y),h=Math.round(h),p=Math.round(p),_=Math.round(_),b=Math.round(b),C?i(u,h,p,_,b,S,!A&&!m,!A&&!I,!f&&!I,!f&&!m):n(u,h,p,_,b,S,A&&m&&L,A&&I&&v,f&&I&&E,f&&m&&w);return function(e,t){var i,n,o,a=t.fill;if("string"==typeof a)e.fillStyle=a;else{if(i=a.type,n=a.colorStops,a=a.position.map((e=>Math.round(e*t.size))),"linear-gradient"===i)o=e.createLinearGradient.apply(e,a);else{if("radial-gradient"!==i)throw Error("Unsupported fill");o=e.createRadialGradient.apply(e,a)}n.forEach((([e,t])=>{o.addColorStop(e,t)})),e.fillStyle=o}}(a,o),a.fill(),e}var a={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};G=function(e,t){var i={};Object.assign(i,a,e),i.N=i.minVersion,i.K=i.maxVersion,i.v=i.ecLevel,i.left=i.left,i.top=i.top,i.size=i.size,i.fill=i.fill,i.background=i.background,i.text=i.text,i.R=i.radius,i.P=i.quiet,t instanceof HTMLCanvasElement?(t.width===i.size&&t.height===i.size||(t.width=i.size,t.height=i.size),t.getContext("2d").clearRect(0,0,t.width,t.height),o(t,i)):((e=document.createElement("canvas")).width=i.size,e.height=i.size,i=o(e,i),t.appendChild(i))}}(function(){function e(o,r){function s(e,t){var i,n;for(i=-1;7>=i;i+=1)if(!(-1>=e+i||u<=e+i))for(n=-1;7>=n;n+=1)-1>=t+n||u<=t+n||(d[e+i][t+n]=0<=i&&6>=i&&(0==n||6==n)||0<=n&&6>=n&&(0==i||6==i)||2<=i&&4>=i&&2<=n&&4>=n)}function l(e,i){var r,l,m,f,g,_,b,v,w,y;for(r=u=4*o+17,l=Array(r),m=0;m<r;m+=1)for(l[m]=Array(r),f=0;f<r;f+=1)l[m][f]=null;for(d=l,s(0,0),s(u-7,0),s(0,u-7),r=n.G(o),l=0;l<r.length;l+=1)for(m=0;m<r.length;m+=1)if(f=r[l],g=r[m],null==d[f][g])for(_=-2;2>=_;_+=1)for(b=-2;2>=b;b+=1)d[f+_][g+b]=-2==_||2==_||-2==b||2==b||0==_&&0==b;for(r=8;r<u-8;r+=1)null==d[r][6]&&(d[r][6]=0==r%2);for(r=8;r<u-8;r+=1)null==d[6][r]&&(d[6][r]=0==r%2);for(r=n.w(c<<3|i),l=0;15>l;l+=1)m=!e&&1==(r>>l&1),d[6>l?l:8>l?l+1:u-15+l][8]=m,d[8][8>l?u-l-1:9>l?15-l:14-l]=m;if(d[u-8][8]=!e,7<=o){for(r=n.A(o),l=0;18>l;l+=1)m=!e&&1==(r>>l&1),d[Math.floor(l/3)][l%3+u-8-3]=m;for(l=0;18>l;l+=1)m=!e&&1==(r>>l&1),d[l%3+u-8-3][Math.floor(l/3)]=m}if(null==h){for(e=a.I(o,c),r=function(){var e=[],t=0,i={B:function(){return e},c:function(t){return 1==(e[Math.floor(t/8)]>>>7-t%8&1)},put:function(e,t){for(var n=0;n<t;n+=1)i.m(1==(e>>>t-n-1&1))},f:function(){return t},m:function(i){var n=Math.floor(t/8);e.length<=n&&e.push(0),i&&(e[n]|=128>>>t%8),t+=1}};return i}(),l=0;l<p.length;l+=1)m=p[l],r.put(4,4),r.put(m.b(),n.f(4,o)),m.write(r);for(l=m=0;l<e.length;l+=1)m+=e[l].j;if(r.f()>8*m)throw Error("code length overflow. ("+r.f()+">"+8*m+")");for(r.f()+4<=8*m&&r.put(0,4);0!=r.f()%8;)r.m(!1);for(;!(r.f()>=8*m)&&(r.put(236,8),!(r.f()>=8*m));)r.put(17,8);for(v=0,m=l=0,f=Array(e.length),g=Array(e.length),_=0;_<e.length;_+=1){for(w=e[_].j,y=e[_].o-w,l=Math.max(l,w),m=Math.max(m,y),f[_]=Array(w),b=0;b<f[_].length;b+=1)f[_][b]=255&r.B()[b+v];for(v+=w,b=n.C(y),w=t(f[_],b.b()-1).l(b),g[_]=Array(b.b()-1),b=0;b<g[_].length;b+=1)y=b+w.b()-g[_].length,g[_][b]=0<=y?w.c(y):0}for(b=r=0;b<e.length;b+=1)r+=e[b].o;for(r=Array(r),b=v=0;b<l;b+=1)for(_=0;_<e.length;_+=1)b<f[_].length&&(r[v]=f[_][b],v+=1);for(b=0;b<m;b+=1)for(_=0;_<e.length;_+=1)b<g[_].length&&(r[v]=g[_][b],v+=1);h=r}for(e=h,r=-1,l=u-1,m=7,f=0,i=n.F(i),g=u-1;0<g;g-=2)for(6==g&&--g;;){for(_=0;2>_;_+=1)null==d[l][g-_]&&(b=!1,f<e.length&&(b=1==(e[f]>>>m&1)),i(l,g-_)&&(b=!b),d[l][g-_]=b,-1==--m&&(f+=1,m=7));if(0>(l+=r)||u<=l){l-=r,r=-r;break}}}var c=i[r],d=null,u=0,h=null,p=[],m={u:function(t){t=function(t){var i=e.s(t);return{S:function(){return 4},b:function(){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}}}(t),p.push(t),h=null},a:function(e,t){if(0>e||u<=e||0>t||u<=t)throw Error(e+","+t);return d[e][t]},h:function(){return u},J:function(){var e,t,i,o;for(e=0,t=0,i=0;8>i;i+=1)l(!0,i),o=n.D(m),(0==i||e>o)&&(e=o,t=i);l(!1,t)}};return m}function t(e,i){if(void 0===e.length)throw Error(e.length+"/"+i);var n=function(){var t,n,o;for(t=0;t<e.length&&0==e[t];)t+=1;for(n=Array(e.length-t+i),o=0;o<e.length-t;o+=1)n[o]=e[o+t];return n}(),a={c:function(e){return n[e]},b:function(){return n.length},multiply:function(e){var i,n,r;for(i=Array(a.b()+e.b()-1),n=0;n<a.b();n+=1)for(r=0;r<e.b();r+=1)i[n+r]^=o.i(o.g(a.c(n))+o.g(e.c(r)));return t(i,0)},l:function(e){if(0>a.b()-e.b())return a;for(var i=o.g(a.c(0))-o.g(e.c(0)),n=Array(a.b()),r=0;r<a.b();r+=1)n[r]=a.c(r);for(r=0;r<e.b();r+=1)n[r]^=o.i(o.g(e.c(r))+i);return t(n,0).l(e)}};return a}e.s=function(e){var t,i,n;for(t=[],i=0;i<e.length;i++)128>(n=e.charCodeAt(i))?t.push(n):2048>n?t.push(192|n>>6,128|63&n):55296>n||57344<=n?t.push(224|n>>12,128|n>>6&63,128|63&n):(i++,n=65536+((1023&n)<<10|1023&e.charCodeAt(i)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n));return t};var i={L:1,M:0,Q:3,H:2},n=function(){function e(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t}var i=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];return{w:function(t){for(var i=t<<10;0<=e(i)-e(1335);)i^=1335<<e(i)-e(1335);return 21522^(t<<10|i)},A:function(t){for(var i=t<<12;0<=e(i)-e(7973);)i^=7973<<e(i)-e(7973);return t<<12|i},G:function(e){return i[e-1]},F:function(e){switch(e){case 0:return function(e,t){return 0==(e+t)%2};case 1:return function(e){return 0==e%2};case 2:return function(e,t){return 0==t%3};case 3:return function(e,t){return 0==(e+t)%3};case 4:return function(e,t){return 0==(Math.floor(e/2)+Math.floor(t/3))%2};case 5:return function(e,t){return 0==e*t%2+e*t%3};case 6:return function(e,t){return 0==(e*t%2+e*t%3)%2};case 7:return function(e,t){return 0==(e*t%3+(e+t)%2)%2};default:throw Error("bad maskPattern:"+e)}},C:function(e){for(var i=t([1],0),n=0;n<e;n+=1)i=i.multiply(t([1,o.i(n)],0));return i},f:function(e,t){if(4!=e||1>t||40<t)throw Error("mode: "+e+"; type: "+t);return 10>t?8:16},D:function(e){var t,i,n,o,a,r,s,l;for(t=e.h(),i=0,n=0;n<t;n+=1)for(o=0;o<t;o+=1){for(a=0,r=e.a(n,o),s=-1;1>=s;s+=1)if(!(0>n+s||t<=n+s))for(l=-1;1>=l;l+=1)0>o+l||t<=o+l||(0!=s||0!=l)&&r==e.a(n+s,o+l)&&(a+=1);5<a&&(i+=3+a-5)}for(n=0;n<t-1;n+=1)for(o=0;o<t-1;o+=1)a=0,e.a(n,o)&&(a+=1),e.a(n+1,o)&&(a+=1),e.a(n,o+1)&&(a+=1),e.a(n+1,o+1)&&(a+=1),(0==a||4==a)&&(i+=3);for(n=0;n<t;n+=1)for(o=0;o<t-6;o+=1)e.a(n,o)&&!e.a(n,o+1)&&e.a(n,o+2)&&e.a(n,o+3)&&e.a(n,o+4)&&!e.a(n,o+5)&&e.a(n,o+6)&&(i+=40);for(o=0;o<t;o+=1)for(n=0;n<t-6;n+=1)e.a(n,o)&&!e.a(n+1,o)&&e.a(n+2,o)&&e.a(n+3,o)&&e.a(n+4,o)&&!e.a(n+5,o)&&e.a(n+6,o)&&(i+=40);for(o=a=0;o<t;o+=1)for(n=0;n<t;n+=1)e.a(n,o)&&(a+=1);return i+Math.abs(100*a/t/t-50)/5*10}}}(),o=function(){for(var e=Array(256),t=Array(256),i=0;8>i;i+=1)e[i]=1<<i;for(i=8;256>i;i+=1)e[i]=e[i-4]^e[i-5]^e[i-6]^e[i-8];for(i=0;255>i;i+=1)t[e[i]]=i;return{g:function(e){if(1>e)throw Error("glog("+e+")");return t[e]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),a=function(){function e(e,n){switch(n){case i.L:return t[4*(e-1)];case i.M:return t[4*(e-1)+1];case i.Q:return t[4*(e-1)+2];case i.H:return t[4*(e-1)+3]}}var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];return{I:function(t,i){var n,o,a,r,s,l,c,d=e(t,i);if(void 0===d)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+i);for(t=d.length/3,i=[],n=0;n<t;n+=1)for(o=d[3*n],a=d[3*n+1],r=d[3*n+2],s=0;s<o;s+=1)l=r,(c={}).o=a,c.j=l,i.push(c);return i}}}();return e}()),define("qr-creator",function(e){return function(){return e.QrCreator}}(this)),define("WoltLabSuite/Core/Ui/User/Multifactor/Totp/Qr",["require","exports","tslib","qr-creator"],(function(e,t,i,n){"use strict";function o(e){const t=e.querySelector(".totpSecret");if(!t)return;const i=t.dataset.accountname;if(!i)return;const o=t.dataset.issuer,a=(o?`${o}:`:"")+i,r=e.querySelector("canvas");n.default.render({text:`otpauth://totp/${encodeURIComponent(a)}?secret=${encodeURIComponent(t.textContent)}${o?`&issuer=${encodeURIComponent(o)}`:""}`,size:r&&r.clientWidth?r.clientWidth:200},r||e)}Object.defineProperty(t,"__esModule",{value:!0}),t.renderAll=t.render=void 0,n=i.__importDefault(n),t.render=o,t.default=o,t.renderAll=function(){document.querySelectorAll(".totpSecretContainer").forEach((e=>o(e)))}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["require","exports","tslib","../Manager","../../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e){this.init(e)}checkContainer(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")}init(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=document.getElementById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");n.addContainerCheckCallback((()=>this.checkContainer()))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["require","exports","tslib","./Abstract","../../../../../Core","../Manager","../../../../../Dom/Util"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends n.default{checkContainer(){if(o.stringToBool(this._container.dataset.ignoreDependencies||""))return;if(a.isHiddenByDependencies(this._container))return;const e=!r.default.isHidden(this._container),t=Array.from(this._container.children).some(((e,t)=>(0!==t||"H2"!==e.tagName&&"HEADER"!==e.tagName)&&!r.default.isHidden(e)));e!==t&&(t?r.default.show(this._container):r.default.hide(this._container),a.checkContainers())}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu","../../../../../Core"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s);class l extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!a.isHidden(this._container),t=Array.from(this._container.children).some((e=>!a.isHidden(e)));if(e!==t){const e=this._container.parentNode.parentNode.querySelector("#"+a.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]");if(null===e)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)a.show(this._container),a.show(e);else{a.hide(this._container),a.hide(e);const t=r.getTabMenu(a.identify(e.closest(".tabMenuContainer")));t.getActiveTab()===e&&t.selectFirstVisible()}o.checkContainers()}}}return s.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu","../../../../../Core"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s);class l extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!a.isHidden(this._container),t=this._container.parentNode.querySelectorAll("#"+a.identify(this._container)+" > nav > ul > li"),i=Array.from(t).some((e=>!a.isHidden(e)));e!==i&&(i?(a.show(this._container),r.getTabMenu(a.identify(this._container)).selectFirstVisible()):a.hide(this._container),o.checkContainers())}}return s.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract",["require","exports","tslib","../../../../../Ajax","../../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this._button=document.createElement("a"),this._listItem=document.createElement("li"),this._userId=e,this._isActive=t,this._initButton(),this._updateButton()}_initButton(){this._button.href="#",this._button.addEventListener("click",(e=>this._toggle(e))),this._listItem.appendChild(this._button);document.querySelector('.userProfileButtonMenu[data-menu="interaction"]').insertAdjacentElement("afterbegin",this._listItem)}_toggle(e){e.preventDefault(),n.api(this,{actionName:this._getAjaxActionName(),parameters:{data:{userID:this._userId}}})}_updateButton(){this._button.textContent=this._getLabel(),this._isActive?this._listItem.classList.add("active"):this._listItem.classList.remove("active")}_getLabel(){throw new Error("Implement me!")}_getAjaxActionName(){throw new Error("Implement me!")}_ajaxSuccess(e){throw new Error("Implement me!")}_ajaxSetup(){throw new Error("Implement me!")}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow",["require","exports","tslib","../../../../../Core","../../../../../Language","../../../../Notification","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(e,t){super(e,t)}_getLabel(){return o.get("wcf.user.button."+(this._isActive?"un":"")+"follow")}_getAjaxActionName(){return this._isActive?"unfollow":"follow"}_ajaxSuccess(e){this._isActive=!!e.returnValues.following,this._updateButton(),a.show()}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\follow\\UserFollowAction"}}}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["require","exports","tslib","../../../../../Core","../../../../../Language","../../../../Notification","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(e,t){super(e,t)}_getLabel(){return o.get("wcf.user.button."+(this._isActive?"un":"")+"ignore")}_getAjaxActionName(){return this._isActive?"unignore":"ignore"}_ajaxSuccess(e){this._isActive=!!e.returnValues.isIgnoredUser,this._updateButton(),a.show()}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\ignore\\UserIgnoreAction"}}}}return n.enableLegacyInheritance(s),s})),function(e){function t(){for(;n.length&&"function"==typeof n[0];)n.shift()()}var i=e.require,n=[],o=0;e.orgRequire=i,e.require=function(a,r,s){if(!Array.isArray(a))return i.apply(e,arguments);var l=new Promise((function(e,r){var s=o++;n.push(s),i(a,(function(){var i=arguments;n[n.indexOf(s)]=function(){e(i)},t()}),(function(e){n[n.indexOf(s)]=function(){r(e)},t()}))}));return r&&(l=l.then((function(t){return r.apply(e,t)}))),s&&l.catch(s),l},e.require.config=i.config}(window),define("require.linearExecution",(function(){}));
\ No newline at end of file
-// promise.min.js
-!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(n){var t=this.constructor;return this.then(function(e){return t.resolve(n()).then(function(){return e})},function(e){return t.resolve(n()).then(function(){return t.reject(e)})})}var n=setTimeout;function o(){}function f(e){if(!(this instanceof f))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function r(o,r){for(;3===o._state;)o=o._value;0!==o._state?(o._handled=!0,f._immediateFn(function(){var e=1===o._state?r.onFulfilled:r.onRejected;if(null!==e){var n;try{n=e(o._value)}catch(t){return void u(r.promise,t)}i(r.promise,n)}else(1===o._state?i:u)(r.promise,o._value)})):o._deferreds.push(r)}function i(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if(n instanceof f)return e._state=3,e._value=n,void c(e);if("function"==typeof t)return void l((o=t,r=n,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=n,c(e)}catch(i){u(e,i)}var o,r}function u(e,n){e._state=2,e._value=n,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&f._immediateFn(function(){e._handled||f._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;n<t;n++)r(e,e._deferreds[n]);e._deferreds=null}function a(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}function l(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,u(n,e))})}catch(o){if(t)return;t=!0,u(n,o)}}f.prototype["catch"]=function(e){return this.then(null,e)},f.prototype.then=function(e,n){var t=new this.constructor(o);return r(this,new a(e,n,t)),t},f.prototype["finally"]=e,f.all=function(n){return new f(function(r,i){if(!n||"undefined"==typeof n.length)throw new TypeError("Promise.all accepts an array");var f=Array.prototype.slice.call(n);if(0===f.length)return r([]);var u=f.length;function c(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void t.call(e,function(e){c(n,e)},i)}f[n]=e,0==--u&&r(f)}catch(o){i(o)}}for(var e=0;e<f.length;e++)c(e,f[e])})},f.resolve=function(n){return n&&"object"==typeof n&&n.constructor===f?n:new f(function(e){e(n)})},f.reject=function(t){return new f(function(e,n){n(t)})},f.race=function(r){return new f(function(e,n){for(var t=0,o=r.length;t<o;t++)r[t].then(e,n)})},f._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){n(e,0)},f._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var t=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in t?t.Promise.prototype["finally"]||(t.Promise.prototype["finally"]=e):t.Promise=f});
-
-
-// WoltLabSuite.Core.tiny.min.js
-var requirejs,require,define;!function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,function(t,o){!i&&hasProp(e,o)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))}),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach(function(e){t=t[e]}),t}function newContext(e){function t(e){var t,i,n=e.length;for(t=0;t<n;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}function i(e,i,n){var o,r,a,l,s,c,u,d,h,f,p=i&&i.split("/"),g=p,m=k.map,v=m&&m["*"];if(e&&(e=e.split("/"),c=e.length-1,k.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&p&&(g=p.slice(0,p.length-1),e=g.concat(e)),t(e),e=e.join("/")),n&&m&&(p||v)){r=e.split("/");e:for(a=r.length;a>0;a-=1){if(s=r.slice(0,a).join("/"),p)for(l=p.length;l>0;l-=1)if((o=getOwn(m,p.slice(0,l).join("/")))&&(o=getOwn(o,s))){u=o,d=a;break e}!h&&v&&getOwn(v,s)&&(h=getOwn(v,s),f=a)}!u&&h&&(u=h,d=f),u&&(r.splice(0,d,u),e=r.join("/"))}return getOwn(k.pkgs,e)||e}function n(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t}function o(e){var t,i,n,o;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}n=queue.shift(),i=n[0],t-=1,i in D||i in T||(i in N?C.apply(undef,n):T[i]=n)}e&&(o=getOwn(k.shim,e)||{},C(e,o.deps||[],o.exportsFn))}function r(e,t){var n=function(i,r,a,l){var s,c;if(t&&o(),"string"==typeof i){if(A[i])return A[i](e);if(!((s=E(i,e,!0).id)in D))throw new Error("Not loaded: "+s);return D[s]}return i&&!Array.isArray(i)&&(c=i,i=undef,Array.isArray(r)&&(i=r,r=a,a=l),t)?n.config(c)(i,r,a):(r=r||function(){return slice.call(arguments,0)},V.then(function(){return o(),C(undef,i||[],r,a,e)}))};return n.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,n.nameToUrl=function(e,t,i){var o,r,a,l,s,c,u,d=getOwn(k.pkgs,e);if(d&&(e=d),u=getOwn(H,e))return n.nameToUrl(u,t,i);if(urlRegExp.test(e))s=e+(t||"");else{for(o=k.paths,r=e.split("/"),a=r.length;a>0;a-=1)if(l=r.slice(0,a).join("/"),c=getOwn(o,l)){Array.isArray(c)&&(c=c[0]),r.splice(0,a,c);break}s=r.join("/"),s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js"),s=("/"===s.charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":k.baseUrl)+s}return k.urlArgs&&!/^blob\:/.test(s)?s+k.urlArgs(e,s):s},n.toUrl=function(t){var o,r=t.lastIndexOf("."),a=t.split("/")[0],l="."===a||".."===a;return-1!==r&&(!l||r>1)&&(o=t.substring(r,t.length),t=t.substring(0,r)),n.nameToUrl(i(t,e),o,!0)},n.defined=function(t){return E(t,e,!0).id in D},n.specified=function(t){return(t=E(t,e,!0).id)in D||t in N},n}function a(e,t,i){e&&(D[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(I,t.map,t.deps)),t.finished=!0,t.resolve(i)}function l(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function s(e){return function(t){return i(t,e,!0)}}function c(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=I.execCb(i,e.factory,e.values,D[i])}catch(t){return l(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=D[i])):M.splice(M.indexOf(e),1),a(i,e,t)}function u(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||c(this))}function d(e,t){var i={};return i.promise=new Promise(function(t,n){i.resolve=t,i.reject=function(t){e||M.splice(M.indexOf(i),1),n(t)}}),i.map=e?t||E(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=u,i.map.pr&&(i.deps=[E(i.map.pr)]),i}function h(e,t){var i;return e?(i=e in N&&N[e])||(i=N[e]=d(e,t)):(i=d(),M.push(i)),i}function f(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(F+=1),i.requireModules=[t]),l(e,i))}}function p(e,t,i,n){i.depMax+=1,L(e,t).then(function(e){i.depFinished(e,n)},f(i,e.id)).catch(f(i,i.map.id))}function g(e){function t(t){i||a(e,h(e),t)}var i;return t.error=function(t){h(e).reject(t)},t.fromText=function(t,n){var r=h(e),a=E(E(e).n),s=a.id;i=!0,r.factory=function(e,t){return t},n&&(t=n),hasProp(k.config,e)&&(k.config[s]=k.config[e]);try{w.exec(t)}catch(e){l(r,new Error("fromText eval for "+s+" failed: "+e))}o(s),r.deps=[a],p(a,null,r,r.deps.length)},t}function m(e,t,i){e.load(t.n,r(i),g(t.id),k)}function v(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function b(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach(function(n){var o=n.id,r=!hasProp(A,o)&&h(o,n);!r||r.finished||i[o]||(hasProp(t,o)?e.deps.forEach(function(t,i){t.id===o&&e.depFinished(D[o],i)}):b(r,t,i))}),i[n]=!0}function _(e){var t,i,n,o=[],r=1e3*k.waitSeconds,a=r&&W+r<(new Date).getTime();if(0===j&&(e?e.finished||b(e,{},{}):M.length&&M.forEach(function(e){b(e,{},{})})),a){for(i in N)n=N[i],n.finished||o.push(n.map.id);t=new Error("Timeout for modules: "+o),t.requireModules=o,w.onError(t)}else(j||M.length)&&(S||(S=!0,setTimeout(function(){S=!1,_()},70)))}function y(e){return setTimeout(function(){e.dynaId&&O[e.dynaId]||(O[e.dynaId]=!0,w.onError(e))}),e}var w,C,E,L,A,S,x,I,D=obj(),T=obj(),k={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},B=obj(),M=[],N=obj(),U=obj(),P=obj(),j=0,W=(new Date).getTime(),F=0,O=obj(),R=obj(),H=obj(),V=Promise.resolve();return x="function"==typeof importScripts?function(e){var t=e.url;R[t]||(R[t]=!0,h(e.id),importScripts(t),o(e.id))}:function(e){var t,i=e.id,n=e.url;R[n]||(R[n]=!0,t=document.createElement("script"),t.setAttribute("data-requiremodule",i),t.type=k.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,j+=1,t.addEventListener("load",function(){j-=1,o(i)},!1),t.addEventListener("error",function(){j-=1;var e,n=getOwn(k.paths,i);if(n&&Array.isArray(n)&&n.length>1){t.parentNode.removeChild(t),n.shift();var o=h(i);o.map=E(i),o.map.url=w.nameToUrl(i),x(o.map)}else e=new Error("Load failed: "+i+": "+t.src),e.requireModules=[i],h(i).reject(e)},!1),t.src=n,10===document.documentMode?asap.then(function(){document.head.appendChild(t)}):document.head.appendChild(t))},L=function(e,t){var i,n,o=e.id,r=k.shim[o];if(o in T)i=T[o],delete T[o],C.apply(undef,i);else if(!(o in N))if(e.pr){if(!(n=getOwn(H,o)))return L(E(e.pr)).then(function(i){var n=e.prn?e:E(o,t,!0),r=n.id,a=getOwn(k.shim,r);return r in P||(P[r]=!0,a&&a.deps?w(a.deps,function(){m(i,n,t)}):m(i,n,t)),h(r).promise});e.url=w.nameToUrl(n),x(e)}else r&&r.deps?w(r.deps,function(){x(e)}):x(e);return h(o).promise},E=function(e,t,n){if("string"!=typeof e)return e;var o,r,a,l,c,u,d=e+" & "+(t||"")+" & "+!!n;return a=v(e),l=a[0],e=a[1],!l&&d in B?B[d]:(l&&(l=i(l,t,n),o=l in D&&D[l]),l?o&&o.normalize?(e=o.normalize(e,s(t)),u=!0):e=-1===e.indexOf("!")?i(e,t,n):e:(e=i(e,t,n),a=v(e),l=a[0],e=a[1],r=w.nameToUrl(e)),c={id:l?l+"!"+e:e,n:e,pr:l,url:r,prn:l&&u},l||(B[d]=c),c)},A={require:function(e){return r(e)},exports:function(e){var t=D[e];return void 0!==t?t:D[e]={}},module:function(e){return{id:e,uri:"",exports:A.exports(e),config:function(){return getOwn(k.config,e)||{}}}}},C=function(e,t,i,n,o){if(e){if(e in U)return;U[e]=!0}var r=h(e);return t&&!Array.isArray(t)&&(i=t,t=[]),t=t?slice.call(t,0):null,n||(hasProp(k,"defaultErrback")?k.defaultErrback&&(n=k.defaultErrback):n=y),n&&r.promise.catch(n),o=o||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),r.factory=i,r.deps=t,r.depending=!0,t.forEach(function(i,n){var a;t[n]=a=E(i,o,!0),i=a.id,"require"===i?r.values[n]=A.require(e):"exports"===i?(r.values[n]=A.exports(e),r.usingExports=!0):"module"===i?r.values[n]=r.cjsModule=A.module(e):void 0===i?r.values[n]=void 0:p(a,o,r,n)}),r.depending=!1,r.depCount===r.depMax&&c(r)):e&&a(e,r,i),W=(new Date).getTime(),e||_(r),r.promise},w=r(null,!0),w.config=function(t){if(t.context&&t.context!==e){var i=getOwn(contexts,t.context);return i?i.req.config(t):newContext(t.context).config(t)}if(B=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs){var o=t.urlArgs;t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+o}}var r=k.shim,a={paths:!0,bundles:!0,config:!0,map:!0};return eachProp(t,function(e,t){a[t]?(k[t]||(k[t]={}),mixin(k[t],e,!0,!0)):k[t]=e}),t.bundles&&eachProp(t.bundles,function(e,t){e.forEach(function(e){e!==t&&(H[e]=t)})}),t.shim&&(eachProp(t.shim,function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=n(e)),r[t]=e}),k.shim=r),t.packages&&t.packages.forEach(function(e){var t,i;e="string"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(k.paths[i]=e.location),k.pkgs[i]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),(t.deps||t.callback)&&w(t.deps,t.callback),w},w.onError=function(e){throw e},I={id:e,defined:D,waiting:T,config:k,deferreds:N,req:w,execCb:function(e,t,i,n){return t.apply(n,i)}},contexts[e]=I,w}if(!Promise)throw new Error("No Promise implementation available");var topReq,dataMain,src,subPath,bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice;if("function"!=typeof requirejs){var asap=Promise.resolve(void 0);requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],(dataMain=dataMain&&dataMain.getAttribute("data-main"))&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain])))}}(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",function(){}),requirejs.config({paths:{enquire:"3rdParty/enquire",favico:"3rdParty/favico","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",prism:"3rdParty/prism",zxcvbn:"3rdParty/zxcvbn"},shim:{enquire:{exports:"enquire"},favico:{exports:"Favico"},"perfect-scrollbar":{exports:"PerfectScrollbar"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],function(){return window.jQuery}),define("require.config",function(){}),function(e,t){e.elAttr=function(e,t,i){if(void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var o=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(o,n),o},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,i){if(t="data-"+t,void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,i){var n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(void 0!==t&&null!==t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}var o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerError")||(""===t?o=null:(o=elCreate("small"),o.className="innerError",n.insertBefore(o,e.nextSibling))),""===t?null!==o&&(n.removeChild(o),o=null):o[i?"innerHTML":"textContent"]=t,o},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i],i)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,i){var n;return function(){var o=this,r=arguments;clearTimeout(n),n=setTimeout(function(){n=null,i||e.apply(o,r)},t),i&&!n&&e.apply(o,r)}};"touchstart"in t.documentElement||"ontouchstart"in e||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints;Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),function(){function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}var i=0;t(),e.addEventListener("popstate",function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})}(),e.String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;i<n;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t}}(window,document),define("wcf.globalHelper",function(){}),define("WoltLabSuite/Core/Core",[],function(){"use strict";var e=function(e){return"object"==typeof e&&(Array.isArray(e)||n.isPlainObject(e))?t(e):e},t=function(t){if(!t)return null;if(Array.isArray(t))return t.slice();var i={};for(var n in t)t.hasOwnProperty(n)&&void 0!==t[n]&&(i[n]=e(t[n]));return i},i="wsc"+window.WCF_PATH.hashCode()+"-",n={clone:function(t){return e(t)},convertLegacyUrl:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){var i=t.split(/([A-Z][a-z0-9]+)/);t="";for(var n=0,o=i.length;n<o;n++){var r=i[n].trim();r.length&&(t.length&&(t+="-"),t+=r.toLowerCase())}return"index.php?"+t+"/&"})},extend:function(e){e=e||{};for(var t=this.clone(e),i=1,n=arguments.length;i<n;i++){var o=arguments[i];if(o)for(var r in o)objOwns(o,r)&&(Array.isArray(o[r])||"object"!=typeof o[r]?t[r]=o[r]:this.isPlainObject(o[r])?t[r]=this.extend(e[r],o[r]):t[r]=o[r])}return t},inherit:function(e,t,i){if(void 0===e||null===e)throw new TypeError("The constructor must not be undefined or null.");if(void 0===t||null===t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=n.extend(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),i||{})},isPlainObject:function(e){return"object"==typeof e&&null!==e&&!e.nodeType&&Object.getPrototypeOf(e)===Object.prototype},getType:function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1")},getUuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},serialize:function(e,t){var i=[];for(var n in e)if(objOwns(e,n)){var o=t?t+"["+n+"]":n,r=e[n];"object"==typeof r?i.push(this.serialize(r,o)):i.push(encodeURIComponent(o)+"="+encodeURIComponent(r))}return i.join("&")},triggerEvent:function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();var i;try{i=new Event(t,{bubbles:!0,cancelable:!0})}catch(e){i=document.createEvent("Event"),i.initEvent(t,!0,!0)}e.dispatchEvent(i)},getStoragePrefix:function(){return i}};return n}),define("WoltLabSuite/Core/Dictionary",["Core"],function(e){"use strict";function t(){this._dictionary=i?new Map:{}}var i=objOwns(window,"Map")&&"function"==typeof window.Map;return t.prototype={set:function(e,t){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new TypeError("Only strings can be used as keys, rejected '"+e+"' ("+typeof e+").");i?this._dictionary.set(e,t):this._dictionary[e]=t},delete:function(e){"number"==typeof e&&(e=e.toString()),i?this._dictionary.delete(e):this._dictionary[e]=void 0},has:function(e){return"number"==typeof e&&(e=e.toString()),i?this._dictionary.has(e):objOwns(this._dictionary,e)&&void 0!==this._dictionary[e]},get:function(e){if("number"==typeof e&&(e=e.toString()),this.has(e))return i?this._dictionary.get(e):this._dictionary[e]},forEach:function(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");if(i)this._dictionary.forEach(e);else for(var t=Object.keys(this._dictionary),n=0,o=t.length;n<o;n++)e(this._dictionary[t[n]],t[n])},merge:function(){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if(!(n instanceof t))throw new TypeError("Expected an object of type Dictionary, but argument "+e+" is not.");n.forEach(function(e,t){this.set(t,e)}.bind(this))}},toObject:function(){if(!i)return e.clone(this._dictionary);var t={};return this._dictionary.forEach(function(e,i){t[i]=e}),t}},t.fromObject=function(e){var i=new t;for(var n in e)objOwns(e,n)&&i.set(n,e[n]);return i},Object.defineProperty(t.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return i?this._dictionary.size:Object.keys(this._dictionary).length}}),t}),define("WoltLabSuite/Core/Template.grammar",["require"],function(e){var t=function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i},i=[2,44],n=[5,9,11,12,13,18,19,21,22,23,25,26,28,29,30,32,33,34,35,37,39,41],o=[1,25],r=[1,27],a=[1,33],l=[1,31],s=[1,32],c=[1,28],u=[1,29],d=[1,26],h=[1,35],f=[1,41],p=[1,40],g=[11,12,15,42,43,47,49,51,52,54,55],m=[9,11,12,13,18,19,21,23,26,28,30,32,33,34,35,37,39],v=[11,12,15,42,43,46,47,48,49,51,52,54,55],b=[1,64],_=[1,65],y=[18,37,39],w=[12,15],C={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,T_WS:12,"{if":13,COMMAND_PARAMETERS:14,"}":15,COMMAND_repetition0:16,COMMAND_option0:17,"{/if}":18,"{include":19,COMMAND_PARAMETER_LIST:20,"{implode":21,"{/implode}":22,"{foreach":23,COMMAND_option1:24,"{/foreach}":25,"{plural":26,PLURAL_PARAMETER_LIST:27,"{lang}":28,"{/lang}":29,"{":30,VARIABLE:31,"{#":32,"{@":33,"{ldelim}":34,"{rdelim}":35,ELSE:36,"{else}":37,ELSE_IF:38,"{elseif":39,FOREACH_ELSE:40,"{foreachelse}":41,T_VARIABLE:42,T_VARIABLE_NAME:43,VARIABLE_repetition0:44,VARIABLE_SUFFIX:45,"[":46,"]":47,".":48,"(":49,VARIABLE_SUFFIX_option0:50,")":51,"=":52,COMMAND_PARAMETER_VALUE:53,T_QUOTED_STRING:54,T_DIGITS:55,COMMAND_PARAMETERS_repetition_plus0:56,COMMAND_PARAMETER:57,T_PLURAL_PARAMETER_NAME:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"T_WS",13:"{if",15:"}",18:"{/if}",19:"{include",21:"{implode",22:"{/implode}",23:"{foreach",25:"{/foreach}",26:"{plural",28:"{lang}",29:"{/lang}",30:"{",32:"{#",33:"{@",34:"{ldelim}",35:"{rdelim}",37:"{else}",39:"{elseif",41:"{foreachelse}",42:"T_VARIABLE",43:"T_VARIABLE_NAME",46:"[",47:"]",48:".",49:"(",51:")",52:"=",54:"T_QUOTED_STRING",55:"T_DIGITS"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[36,2],[38,4],[40,2],[31,3],[45,3],[45,2],[45,3],[20,5],[20,3],[53,1],[53,1],[53,1],[14,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,3],[27,5],[27,3],[58,1],[58,1],[6,0],[6,2],[16,0],[16,2],[17,0],[17,1],[24,0],[24,1],[44,0],[44,2],[50,0],[50,1],[56,1],[56,2]],performAction:function(e,t,i,n,o,r,a){var l=r.length-1;switch(o){case 1:return r[l-1]+";";case 2:var s=r[l].reduce(function(e,t){return t.encode&&!e[1]?e[0]+=" + '"+t.value:t.encode&&e[1]?e[0]+=t.value:!t.encode&&e[1]?e[0]+="' + "+t.value:t.encode||e[1]||(e[0]+=" + "+t.value),e[1]=t.encode,e},["''",!1]);s[1]&&(s[0]+="'"),this.$=s[0];break;case 3:case 4:this.$={encode:!0,value:r[l].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:r[l]};break;case 8:this.$="(function() { if ("+r[l-5]+") { return "+r[l-3]+"; } "+r[l-2].join(" ")+" "+(r[l-1]||"")+" return ''; })()";break;case 9:if(!r[l-1].file)throw new Error("Missing parameter file");this.$=r[l-1].file+".fetch(v)";break;case 10:if(!r[l-3].from)throw new Error("Missing parameter from");if(!r[l-3].item)throw new Error("Missing parameter item");r[l-3].glue||(r[l-3].glue="', '"),this.$="(function() { return "+r[l-3].from+".map(function(item) { v["+r[l-3].item+"] = item; return "+r[l-1]+"; }).join("+r[l-3].glue+"); })()";break;case 11:if(!r[l-4].from)throw new Error("Missing parameter from");if(!r[l-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+r[l-4].from+" instanceof Array) {for (var i = 0; i < "+r[l-4].from+".length; i++) { looped = true;v["+r[l-4].key+"] = i;v["+r[l-4].item+"] = "+r[l-4].from+"[i];result += "+r[l-2]+";}} else {for (var key in "+r[l-4].from+") {if (!"+r[l-4].from+".hasOwnProperty(key)) continue;looped = true;v["+r[l-4].key+"] = key;v["+r[l-4].item+"] = "+r[l-4].from+"[key];result += "+r[l-2]+";}}return (looped ? result : "+(r[l-1]||"''")+"); })()";break;case 12:this.$="I18nPlural.getCategoryFromTemplateParameters({";var c=!1;for(var u in r[l-1])objOwns(r[l-1],u)&&(this.$+=(c?",":"")+u+": "+r[l-1][u],c=!0);this.$+="})";break;case 13:this.$="Language.get("+r[l-1]+", v)";break;case 14:this.$="StringUtil.escapeHTML("+r[l-1]+")";break;case 15:this.$="StringUtil.formatNumeric("+r[l-1]+")";break;case 16:this.$=r[l-1];break;case 17:this.$="'{'";break;case 18:this.$="'}'";break;case 19:this.$="else { return "+r[l]+"; }";break;case 20:this.$="else if ("+r[l-2]+") { return "+r[l]+"; }";break;case 21:this.$=r[l];break;case 22:this.$="v['"+r[l-1]+"']"+r[l].join("");break;case 23:this.$=r[l-2]+r[l-1]+r[l];break;case 24:this.$="['"+r[l]+"']";break;case 25:case 39:this.$=r[l-2]+(r[l-1]||"")+r[l];break;case 26:case 40:this.$=r[l],this.$[r[l-4]]=r[l-2];break;case 27:case 41:this.$={},this.$[r[l-2]]=r[l];break;case 31:this.$=r[l].join("");break;case 44:case 46:case 52:this.$=[];break;case 45:case 47:case 53:case 57:r[l-1].push(r[l]);break;case 56:this.$=[r[l]]}},table:[t([5,9,11,12,13,19,21,23,26,28,30,32,33,34,35],i,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,18,22,25,29,37,39,41],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],19:[1,12],21:[1,13],23:[1,14],26:[1,15],28:[1,16],30:[1,17],32:[1,18],33:[1,19],34:[1,20],35:[1,21]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),{11:o,12:r,14:22,31:30,42:a,43:l,49:s,52:c,54:u,55:d,56:23,57:24},{20:34,43:h},{20:36,43:h},{20:37,43:h},{27:38,43:f,55:p,58:39},t([9,11,12,13,19,21,23,26,28,29,30,32,33,34,35],i,{6:3,4:42}),{31:43,42:a},{31:44,42:a},{31:45,42:a},t(n,[2,17]),t(n,[2,18]),{15:[1,46]},t([15,47,51],[2,31],{31:30,57:47,11:o,12:r,42:a,43:l,49:s,52:c,54:u,55:d}),t(g,[2,56]),t(g,[2,32]),t(g,[2,33]),t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(g,[2,38]),{11:o,12:r,14:48,31:30,42:a,43:l,49:s,52:c,54:u,55:d,56:23,57:24},{43:[1,49]},{15:[1,50]},{52:[1,51]},{15:[1,52]},{15:[1,53]},{15:[1,54]},{52:[1,55]},{52:[2,42]},{52:[2,43]},{29:[1,56]},{15:[1,57]},{15:[1,58]},{15:[1,59]},t(m,i,{6:3,4:60}),t(g,[2,57]),{51:[1,61]},t(v,[2,52],{44:62}),t(n,[2,9]),{31:66,42:a,53:63,54:b,55:_},t([9,11,12,13,19,21,22,23,26,28,30,32,33,34,35],i,{6:3,4:67}),t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35,41],i,{6:3,4:68}),t(n,[2,12]),{31:66,42:a,53:69,54:b,55:_},t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(y,[2,46],{16:70}),t(g,[2,39]),t([11,12,15,42,43,47,51,52,54,55],[2,22],{45:71,46:[1,72],48:[1,73],49:[1,74]}),{12:[1,75],15:[2,27]},t(w,[2,28]),t(w,[2,29]),t(w,[2,30]),{22:[1,76]},{24:77,25:[2,50],40:78,41:[1,79]},{12:[1,80],15:[2,41]},{17:81,18:[2,48],36:83,37:[1,85],38:82,39:[1,84]},t(v,[2,53]),{11:o,12:r,14:86,31:30,42:a,43:l,49:s,52:c,54:u,55:d,56:23,57:24},{43:[1,87]},{11:o,12:r,14:89,31:30,42:a,43:l,49:s,50:88,51:[2,54],52:c,54:u,55:d,56:23,57:24},{20:90,43:h},t(n,[2,10]),{25:[1,91]},{25:[2,51]},t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35],i,{6:3,4:92}),{27:93,43:f,55:p,58:39},{18:[1,94]},t(y,[2,47]),{18:[2,49]},{11:o,12:r,14:95,31:30,42:a,43:l,49:s,52:c,54:u,55:d,56:23,57:24},t([9,11,12,13,18,19,21,23,26,28,30,32,33,34,35],i,{6:3,4:96}),{47:[1,97]},t(v,[2,24]),{51:[1,98]},{51:[2,55]},{15:[2,26]},t(n,[2,11]),{25:[2,21]},{15:[2,40]},t(n,[2,8]),{15:[1,99]},{18:[2,19]},t(v,[2,23]),t(v,[2,25]),t(m,i,{6:3,4:100}),t(y,[2,20])],defaultActions:{4:[2,1],40:[2,42],41:[2,43],78:[2,51],83:[2,49],89:[2,55],90:[2,26],92:[2,21],93:[2,40],96:[2,19]},parseError:function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)},parse:function(e){var t=this,i=[0],n=[null],o=[],r=this.table,a="",l=0,s=0,c=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),h={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(h.yy[f]=this.yy[f]);d.setInput(e,h.yy),h.yy.lexer=d,h.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;o.push(p);var g=d.options&&d.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,v,b,_,y,w,C,E,L,A=function(){var e;return e=d.lex()||1,"number"!=typeof e&&(e=t.symbols_[e]||e),e},S={};;){if(b=i[i.length-1],this.defaultActions[b]?_=this.defaultActions[b]:(null!==m&&void 0!==m||(m=A()),_=r[b]&&r[b][m]),void 0===_||!_.length||!_[0]){var x="";L=[];for(w in r[b])this.terminals_[w]&&w>2&&L.push("'"+this.terminals_[w]+"'");x=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(x,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:p,expected:L})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+m);switch(_[0]){case 1:i.push(m),n.push(d.yytext),o.push(d.yylloc),i.push(_[1]),m=null,v?(m=v,v=null):(s=d.yyleng,a=d.yytext,l=d.yylineno,p=d.yylloc,c>0&&c--);break;case 2:if(C=this.productions_[_[1]][1],S.$=n[n.length-C],S._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},g&&(S._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(y=this.performAction.apply(S,[a,s,l,h.yy,_[1],n,o].concat(u))))return y;C&&(i=i.slice(0,-1*C*2),n=n.slice(0,-1*C),o=o.slice(0,-1*C)),i.push(this.productions_[_[1]][0]),n.push(S.$),o.push(S._$),E=r[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0}},E=function(){return{EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,n,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,
-this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in o)this[r]=o[r];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,i,n;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),r=0;r<o.length;r++)if((i=this._input.match(this.rules[o[r]]))&&(!t||i[0].length>t[0].length)){if(t=i,n=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,o[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,o[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:case 3:return 54;case 4:return 42;case 5:return 55;case 6:return 43;case 7:return 48;case 8:return 46;case 9:return 47;case 10:return 49;case 11:return 51;case 12:return 52;case 13:return 34;case 14:return 35;case 15:return this.begin("command"),32;case 16:return this.begin("command"),33;case 17:return this.begin("command"),13;case 18:case 19:return this.begin("command"),39;case 20:return 37;case 21:return 18;case 22:return 28;case 23:return 29;case 24:return this.begin("command"),19;case 25:return this.begin("command"),21;case 26:return this.begin("command"),26;case 27:return 22;case 28:return this.begin("command"),23;case 29:return 41;case 30:return 25;case 31:return this.begin("command"),30;case 32:return this.popState(),15;case 33:return 12;case 34:return 5;case 35:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[0-9]+)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{plural )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{(?!\s))/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],inclusive:!0},INITIAL:{rules:[0,1,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35],inclusive:!0}}}}();return C.lexer=E,C}),define("WoltLabSuite/Core/NumberUtil",[],function(){"use strict";return{round:function(e,t){return void 0===t||0==+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}}}),define("WoltLabSuite/Core/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{addThousandsSeparator:function(t){return void 0===e&&(e=require("Language")),String(t).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+e.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(i,n){void 0===e&&(e=require("Language")),i=String(t.round(i,n||-2));var o=i.split(".");return i=this.addThousandsSeparator(o[0]),o.length>1&&(i+=e.get("wcf.global.decimalPoint")+o[1]),i=i.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},shortUnit:function(e){var i="";return e>=1e6?(e/=1e6,e=e>10?Math.floor(e):t.round(e,-1),i="M"):e>=1e3&&(e/=1e3,e=e>10?Math.floor(e):t.round(e,-1),i="k"),this.formatNumeric(e)+i}}}),define("WoltLabSuite/Core/I18n/Plural",["StringUtil"],function(e){"use strict";return{getCategory:function(e,t){t||(t=document.documentElement.lang),"function"!=typeof this[t]&&(t="en");var i=this[t](e);return i||"other"},getCategoryFromTemplateParameters:function(t){if(!t.value)throw new Error("Missing parameter value");if(!t.other)throw new Error("Missing parameter other");var i=t.value;Array.isArray(i)&&(i=i.length);for(var n in t)if(objOwns(t,n)&&n==~~n&&n==i)return t[n];var o=this.getCategory(i);t[o]||(o="other");var r=t[o];return-1!==r.indexOf("#")?r.replace("#",e.formatNumeric(i)):r},getF:function(e){e=e.toString();var t=e.indexOf(".");return-1===t?0:parseInt(e.substr(t+1),10)},getV:function(e){return e.toString().replace(/^[^.]*\.?/,"").length},af:function(e){if(1==e)return"one"},am:function(e){var t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},ar:function(e){if(0==e)return"zero";if(1==e)return"one";if(2==e)return"two";var t=e%100;return t>=3&&t<=10?"few":t>=11&&t<=99?"many":void 0},as:function(e){var t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},az:function(e){if(1==e)return"one"},be:function(e){var t=e%10,i=e%100;return 1==t&&11!=i?"one":t>=2&&t<=4&&!(i>=12&&i<=14)?"few":0==t||t>=5&&t<=9||i>=11&&i<=14?"many":void 0},bg:function(e){if(1==e)return"one"},bn:function(e){var t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},bo:function(e){},bs:function(e){var t=this.getV(e),i=this.getF(e),n=e%10,o=e%100,r=i%10,a=i%100;return 0==t&&1==n&&11!=o||1==r&&11!=a?"one":0==t&&n>=2&&n<=4&&o>=12&&o<=14||r>=2&&r<=4&&a>=12&&a<=14?"few":void 0},cs:function(e){var t=this.getV(e);return 1==e&&0===t?"one":e>=2&&e<=4&&0===t?"few":0===t?"many":void 0},cy:function(e){return 0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":void 0},da:function(e){if(e>0&&e<2)return"one"},el:function(e){if(1==e)return"one"},en:function(e){if(1==e&&0===this.getV(e))return"one"},es:function(e){if(1==e)return"one"},eu:function(e){if(1==e)return"one"},fa:function(e){if(e>=0&&e<=1)return"one"},fr:function(e){if(e>=0&&e<2)return"one"},ga:function(e){return 1==e?"one":2==e?"two":3==e||4==e||5==e||6==e?"few":7==e||8==e||9==e||10==e?"many":void 0},gu:function(e){if(e>=0&&e<=1)return"one"},he:function(e){var t=this.getV(e);return 1==e&&0===t?"one":2==e&&0===t?"two":e>10&&0===t&&e%10==0?"many":void 0},hi:function(e){if(e>=0&&e<=1)return"one"},hr:function(e){return this.bs(e)},hu:function(e){if(1==e)return"one"},hy:function(e){if(e>=0&&e<2)return"one"},id:function(e){},is:function(e){var t=this.getF(e);if(0===t&&e%10==1&&e%100!=11||0!==t)return"one"},ja:function(e){},jv:function(e){},ka:function(e){if(1==e)return"one"},kk:function(e){if(1==e)return"one"},km:function(e){},kn:function(e){if(e>=0&&e<=1)return"one"},ko:function(e){},ku:function(e){if(1==e)return"one"},ky:function(e){if(1==e)return"one"},lb:function(e){if(1==e)return"one"},lo:function(e){},lt:function(e){var t=e%10,i=e%100;return 1!=t||i>=11&&i<=19?t>=2&&t<=9&&!(i>=11&&i<=19)?"few":0!=this.getF(e)?"many":void 0:"one"},lv:function(e){var t=e%10,i=e%100,n=this.getV(e),o=this.getF(e),r=o%10,a=o%100;return 0==t||i>=11&&i<=19||2==n&&a>=11&&a<=19?"zero":1==t&&11!=i||2==n&&1==r&&11!=a||2!=n&&1==r?"one":void 0},mk:function(e){var t=this.getV(e),i=this.getF(e),n=e%10,o=e%100,r=i%10,a=i%100;if(0==t&&1==n&&11!=o||1==r&&11!=a)return"one"},ml:function(e){if(1==e)return"one"},mn:function(e){if(1==e)return"one"},mr:function(e){if(1==e)return"one"},ms:function(e){},mt:function(e){var t=e%100;return 1==e?"one":0==e||t>=2&&t<=10?"few":t>=11&&t<=19?"many":void 0},my:function(e){},no:function(e){if(1==e)return"one"},ne:function(e){if(1==e)return"one"},or:function(e){if(1==e)return"one"},pa:function(e){if(1==e||0==e)return"one"},pl:function(e){var t=this.getV(e),i=e%10,n=e%100;return 1==e&&0==t?"one":0==t&&i>=2&&i<=4&&!(n>=12&&n<=14)?"few":0==t&&(1!=e&&i>=0&&i<=1||i>=5&&i<=9||n>=12&&n<=14)?"many":void 0},ps:function(e){if(1==e)return"one"},pt:function(e){if(e>=0&&e<2)return"one"},ro:function(e){var t=this.getV(e),i=e%100;return 1==e&&0===t?"one":0!=t||0==e||i>=2&&i<=19?"few":void 0},ru:function(e){var t=e%10,i=e%100;if(0==this.getV(e)){if(1==t&&11!=i)return"one";if(t>=2&&t<=4&&!(i>=12&&i<=14))return"few";if(0==t||t>=5&&t<=9||i>=11&&i<=14)return"many"}},sd:function(e){if(1==e)return"one"},si:function(e){if(0==e||1==e||0==Math.floor(e)&&1==this.getF(e))return"one"},sk:function(e){return this.cs(e)},sl:function(e){var t=this.getV(e),i=e%100;return 0==t&&1==i?"one":0==t&&2==i?"two":0==t&&(3==i||4==i)||0!=t?"few":void 0},sq:function(e){if(1==e)return"one"},sr:function(e){return this.bs(e)},ta:function(e){if(1==e)return"one"},te:function(e){if(1==e)return"one"},tg:function(e){},th:function(e){},tk:function(e){if(1==e)return"one"},tr:function(e){if(1==e)return"one"},ug:function(e){if(1==e)return"one"},uk:function(e){return this.ru(e)},uz:function(e){if(1==e)return"one"},vi:function(e){},zh:function(e){}}}),define("WoltLabSuite/Core/Template",["./Template.grammar","./StringUtil","Language","WoltLabSuite/Core/I18n/Plural"],function(e,t,i,n){"use strict";function o(){this.yy={}}function r(o){void 0===i&&(i=require("Language")),void 0===t&&(t=require("StringUtil"));try{o=e.parse(o),o="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+o,this.fetch=new Function("StringUtil","Language","I18nPlural","v",o).bind(void 0,t,i,n)}catch(e){throw console.debug(e.message),e}}return o.prototype=e,e.Parser=o,e=new o,Object.defineProperty(r,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(e){throw new Error("WCF.Template.callbacks is no longer supported")}}),r.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},r}),define("WoltLabSuite/Core/Language",["Dictionary","./Template"],function(e,t){"use strict";var i=new e;return{addObject:function(t){i.merge(e.fromObject(t))},add:function(e,t){i.set(e,t)},get:function(e,n){n||(n={});var o=i.get(e);if(void 0===o)return e;if(void 0===t&&(t=require("WoltLabSuite/Core/Template")),"string"==typeof o){try{i.set(e,new t(o))}catch(n){i.set(e,new t("{literal}"+o.replace(/\{\/literal\}/g,"{/literal}{ldelim}/literal}{literal}")+"{/literal}"))}o=i.get(e)}return o instanceof t&&(o=o.fetch(n)),o}}}),define("WoltLabSuite/Core/CallbackList",["Dictionary"],function(e){"use strict";function t(){this._dictionary=new e}return t.prototype={add:function(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._dictionary.has(e)||this._dictionary.set(e,[]),this._dictionary.get(e).push(t)},remove:function(e){this._dictionary.delete(e)},forEach:function(e,t){if(null===e)this._dictionary.forEach(function(e,i){e.forEach(t)});else{var i=this._dictionary.get(e);void 0!==i&&i.forEach(t)}}},t}),define("WoltLabSuite/Core/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,i=!1;return{add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!i)try{i=!0,t.forEach(null,function(e){e()})}finally{i=!1}}}}),define("WoltLabSuite/Core/Environment",[],function(){"use strict";var e="other",t="none",i="desktop",n=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var o=window.getComputedStyle(document.documentElement),r=0,a=o.length;r<a;r++){var l=o[r];0===l.indexOf("-ms-")?e="microsoft":0===l.indexOf("-moz-")?e="firefox":"firefox"!==e&&0===l.indexOf("-webkit-")&&(e="safari")}var s=window.navigator.userAgent.toLowerCase();-1!==s.indexOf("crios")?(e="chrome",i="ios"):/(?:iphone|ipad|ipod)/.test(s)?(e="safari",i="ios"):-1!==s.indexOf("android")?i="android":-1!==s.indexOf("iemobile")&&(e="microsoft",i="windows"),"desktop"!==i||-1===s.indexOf("mobile")&&-1===s.indexOf("tablet")||(i="mobile"),t="redactor",n=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(e="safari",i="ios")},browser:function(){return e},editor:function(){return t},platform:function(){return i},touch:function(){return n}}}),define("WoltLabSuite/Core/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function i(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var n,o=i+"Sibling";null!==e&&e!==t;){if(null!==e[i+"ElementSibling"])return!1;if(e[o])for(n=e[o];n;){if(""!==n.textContent.trim())return!1;n=n[o]}e=e.parentNode}return!0}var n=0,o={createFragmentFromHtml:function(e){var t=elCreate("div");this.setInnerHtml(t,e);for(var i=document.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId:function(){var e;do{e="wcf"+n++}while(null!==elById(e));return e},identify:function(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight},outerDimensions:function(e){var t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset:function(e){var t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){var i=!1;for(var n in t)t.hasOwnProperty(n)&&(/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":""))},styleAsInt:function(e,t){var i=e.getPropertyValue(t);return null===i?0:parseInt(i)},setInnerHtml:function(e,t){e.innerHTML=t;for(var i,n,o=elBySelAll("script",e),r=0,a=o.length;r<a;r++)n=o[r],i=elCreate("script"),n.src?i.src=n.src:i.textContent=n.textContent,e.appendChild(i),elRemove(n)},insertHtml:function(e,t,i){var n=elCreate("div");if(this.setInnerHtml(n,e),n.childNodes.length){var o=n.childNodes[0];switch(i){case"append":t.appendChild(o);break;case"after":this.insertAfter(o,t);break;case"prepend":this.prepend(o,t);break;case"before":t.parentNode.insertBefore(o,t);break;default:throw new Error("Unknown insert method '"+i+"'.")}for(var r;n.childNodes.length;)r=n.childNodes[0],this.insertAfter(r,o),o=r}},contains:function(e,t){for(;null!==t;)if(t=t.parentNode,e===t)return!0;return!1},getDataAttributes:function(e,i,n,o){i=i||"",/^data-/.test(i)||(i="data-"+i),n=!0===n,o=!0===o;for(var r,a,l,s={},c=0,u=e.attributes.length;c<u;c++)if(r=e.attributes[c],0===r.name.indexOf(i)){if(a=r.name.replace(new RegExp("^"+i),""),n){l=a.split("-"),a="";for(var d=0,h=l.length;d<h;d++)a.length&&(o&&"id"===l[d]?l[d]="ID":l[d]=t.ucfirst(l[d])),a+=l[d]}s[a]=r.value}return s},unwrapChildNodes:function(e){for(var t=e.parentNode;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);elRemove(e)},replaceElement:function(e,t){for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),elRemove(e)},isAtNodeStart:function(e,t){return i(e,t,"previous")},isAtNodeEnd:function(e,t){return i(e,t,"next")},getFixedParent:function(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null}};return window.bc_wcfDomUtil=o,o}),define("WoltLabSuite/Core/ObjectMap",[],function(){"use strict";function e(){this._map=t?new WeakMap:{key:[],value:[]}}var t=objOwns(window,"WeakMap")&&"function"==typeof window.WeakMap;return e.prototype={set:function(e,i){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof i||null===i)throw new TypeError("Only objects can be used as value");t?this._map.set(e,i):(this._map.key.push(e),this._map.value.push(i))},delete:function(e){if(t)this._map.delete(e);else{var i=this._map.key.indexOf(e);this._map.key.splice(i),this._map.value.splice(i)}},has:function(e){return t?this._map.has(e):-1!==this._map.key.indexOf(e)},get:function(e){if(t)return this._map.get(e);var i=this._map.key.indexOf(e);return-1!==i?this._map.value[i]:void 0}},e}),define("WoltLabSuite/Core/Dom/Traverse",[],function(){"use strict";var e=[function(e,t){return!0},function(e,t){return e.matches(t)},function(e,t){return e.classList.contains(t)},function(e,t){return e.nodeName===t}],t=function(t,i,n){if(!(t instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(var o=[],r=0;r<t.childElementCount;r++)e[i](t.children[r],n)&&o.push(t.children[r]);return o},i=function(t,i,n,o){if(!(t instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(t=t.parentNode;t instanceof Element;){if(t===o)return null;if(e[i](t,n))return t;t=t.parentNode}return null},n=function(t,i,n,o){if(!(t instanceof Element))throw new TypeError("Expected a valid element as first argument.");return t instanceof Element&&null!==t[i]&&e[n](t[i],o)?t[i]:null};return{childBySel:function(e,i){return t(e,1,i)[0]||null},childByClass:function(e,i){return t(e,2,i)[0]||null},childByTag:function(e,i){return t(e,3,i)[0]||null},childrenBySel:function(e,i){return t(e,1,i)},childrenByClass:function(e,i){return t(e,2,i)},childrenByTag:function(e,i){return t(e,3,i)},parentBySel:function(e,t,n){return i(e,1,t,n)},parentByClass:function(e,t,n){return i(e,2,t,n)},parentByTag:function(e,t,n){return i(e,3,t,n)},next:function(e){return n(e,"nextElementSibling",0,null)},nextBySel:function(e,t){return n(e,"nextElementSibling",1,t)},nextByClass:function(e,t){return n(e,"nextElementSibling",2,t)},nextByTag:function(e,t){return n(e,"nextElementSibling",3,t)},prev:function(e){return n(e,"previousElementSibling",0,null)},prevBySel:function(e,t){return n(e,"previousElementSibling",1,t)},prevByClass:function(e,t){return n(e,"previousElementSibling",2,t)},prevByTag:function(e,t){return n(e,"previousElementSibling",3,t)}}}),define("WoltLabSuite/Core/Ui/Confirmation",["Core","Language","Ui/Dialog"],function(e,t,i){"use strict";var n=!1,o=null,r=null,a={},l=null;return{show:function(t){if(void 0===i&&(i=require("Ui/Dialog")),!n){if(a=e.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},t),a.message="string"==typeof a.message?a.message.trim():"",!a.message.length)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof a.confirm&&"function"!=typeof a.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");null===r&&this._createDialog(),r.innerHTML="string"==typeof a.template?a.template.trim():"",a.messageIsHtml?l.innerHTML=a.message:l.textContent=a.message,n=!0,i.open(this)}},_dialogSetup:function(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:t.get("wcf.global.confirmation.title")}}},getContentElement:function(){return r},_createDialog:function(){var e=elCreate("div");elAttr(e,"id","wcfSystemConfirmation"),e.classList.add("systemConfirmation"),l=elCreate("p"),e.appendChild(l),r=elCreate("div"),elAttr(r,"id","wcfSystemConfirmationContent"),e.appendChild(r);var n=elCreate("div");n.classList.add("formSubmit"),e.appendChild(n),o=elCreate("button"),o.classList.add("buttonPrimary"),o.textContent=t.get("wcf.global.confirmation.confirm"),o.addEventListener(WCF_CLICK_EVENT,this._confirm.bind(this)),n.appendChild(o);var a=elCreate("button");a.textContent=t.get("wcf.global.confirmation.cancel"),a.addEventListener(WCF_CLICK_EVENT,function(){i.close("wcfSystemConfirmation")}),n.appendChild(a),document.body.appendChild(e)},_confirm:function(){"function"==typeof a.legacyCallback?a.legacyCallback("confirm",a.parameters,r):a.confirm(a.parameters,r),n=!1,i.close("wcfSystemConfirmation")},_onClose:function(){n&&(o.blur(),n=!1,"function"==typeof a.legacyCallback?a.legacyCallback("cancel",a.parameters,r):"function"==typeof a.cancel&&a.cancel(a.parameters))},_onShow:function(){o.blur(),o.focus()}}}),define("WoltLabSuite/Core/Ui/Screen",["Core","Dictionary","Environment"],function(e,t,i){"use strict";var n=null,o=new t,r=0,a=null,l=0,s=0,c=t.fromObject({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"}),u=new t;return{on:function(t,i){var n=e.getUuid(),o=this._getQueryObject(t);return"function"==typeof i.match&&o.callbacksMatch.set(n,i.match),"function"==typeof i.unmatch&&o.callbacksUnmatch.set(n,i.unmatch),"function"==typeof i.setup&&(o.mql.matches?i.setup():o.callbacksSetup.set(n,i.setup)),n},remove:function(e,t){var i=this._getQueryObject(e);i.callbacksMatch.delete(t),i.callbacksUnmatch.delete(t),i.callbacksSetup.delete(t)},is:function(e){return this._getQueryObject(e).mql.matches},scrollDisable:function(){if(0===r){l=document.body.scrollTop,a="body",l||(l=document.documentElement.scrollTop,a="documentElement");var e=elById("pageContainer");"ios"===i.platform()?(e.style.setProperty("position","relative",""),e.style.setProperty("top","-"+l+"px","")):e.style.setProperty("margin-top","-"+l+"px",""),document.documentElement.classList.add("disableScrolling")}r++},scrollEnable:function(){if(r&&0===--r){document.documentElement.classList.remove("disableScrolling");var e=elById("pageContainer");"ios"===i.platform()?(e.style.removeProperty("position"),e.style.removeProperty("top")):e.style.removeProperty("margin-top"),l&&(document[a].scrollTop=~~l)}},pageOverlayOpen:function(){0===s&&document.documentElement.classList.add("pageOverlayActive"),s++},pageOverlayClose:function(){s&&0===--s&&document.documentElement.classList.remove("pageOverlayActive")},pageOverlayIsActive:function(){return s>0},setDialogContainer:function(e){n=e},_getQueryObject:function(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");u.has(e)&&(e=u.get(e)),c.has(e)&&(e=c.get(e));var i=o.get(e);return i||(i={callbacksMatch:new t,callbacksUnmatch:new t,callbacksSetup:new t,mql:window.matchMedia(e)},i.mql.addListener(this._mqlChange.bind(this)),o.set(e,i),e!==i.mql.media&&u.set(i.mql.media,e)),i},_mqlChange:function(e){var i=this._getQueryObject(e.media);if(e.matches)i.callbacksSetup.size?(i.callbacksSetup.forEach(function(e){e()}),i.callbacksSetup=new t):i.callbacksMatch.forEach(function(e){e()});else{if(i.callbacksSetup.size)return;i.callbacksUnmatch.forEach(function(e){e()})}}}}),define("WoltLabSuite/Core/Event/Key",[],function(){"use strict";function e(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}return{ArrowDown:function(t){return e(t,"ArrowDown",40)},ArrowLeft:function(t){return e(t,"ArrowLeft",37)},ArrowRight:function(t){return e(t,"ArrowRight",39)},ArrowUp:function(t){return e(t,"ArrowUp",38)},Comma:function(t){return e(t,",",44)},End:function(t){return e(t,"End",35)},Enter:function(t){return e(t,"Enter",13)},Escape:function(t){return e(t,"Escape",27)},Home:function(t){return e(t,"Home",36)},Space:function(t){return e(t,"Space",32)},Tab:function(t){return e(t,"Tab",9)}}}),define("WoltLabSuite/Core/Ui/Alignment",["Core","Language","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";return{set:function(o,r,a){a=e.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},a),Array.isArray(a.pointerClassNames)&&a.pointerClassNames.length===(a.pointer?1:2)||(a.pointerClassNames=[]),-1===["left","right","center"].indexOf(a.horizontal)&&(a.horizontal="left"),"bottom"!==a.vertical&&(a.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(a.allowFlip)&&(a.allowFlip="both"),n.setStyles(o,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});var l=n.outerDimensions(o),s=n.outerDimensions(a.refDimensionsElement instanceof Element?a.refDimensionsElement:r),c=n.offset(r),u=window.innerHeight,d=document.body.clientWidth,h={result:null},f=!1;if("center"===a.horizontal&&(f=!0,h=this._tryAlignmentHorizontal(a.horizontal,l,s,c,d),h.result||("both"===a.allowFlip||"horizontal"===a.allowFlip?a.horizontal="left":h.result=!0)),"rtl"===t.get("wcf.global.pageDirection")&&(a.horizontal="left"===a.horizontal?"right":"left"),!h.result){var p=h;if(h=this._tryAlignmentHorizontal(a.horizontal,l,s,c,d),!h.result&&("both"===a.allowFlip||"horizontal"===a.allowFlip)){var g=this._tryAlignmentHorizontal("left"===a.horizontal?"right":"left",l,s,c,d);g.result?h=g:f&&(h=p)}}var m=h.left,v=h.right,b=this._tryAlignmentVertical(a.vertical,l,s,c,u,a.verticalOffset);if(!b.result&&("both"===a.allowFlip||"vertical"===a.allowFlip)){var _=this._tryAlignmentVertical("top"===a.vertical?"bottom":"top",l,s,c,u,a.verticalOffset);_.result&&(b=_)}var y=b.bottom,w=b.top;if(a.pointer){var C=i.childrenByClass(o,"elementPointer");if(null===(C=C[0]||null))throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(C.classList.add("center"),C.classList.remove("left"),C.classList.remove("right")):(C.classList.add(h.align),C.classList.remove("center"),C.classList.remove("left"===h.align?"right":"left")),"top"===b.align?C.classList.add("flipVertical"):C.classList.remove("flipVertical")}else if(2===a.pointerClassNames.length){o.classList["auto"===w?"add":"remove"](a.pointerClassNames[0]),o.classList["auto"===m?"add":"remove"](a.pointerClassNames[1])}"auto"!==y&&(y=Math.round(y)+"px"),"auto"!==m&&(m=Math.ceil(m)+"px"),"auto"!==v&&(v=Math.floor(v)+"px"),"auto"!==w&&(w=Math.round(w)+"px"),n.setStyles(o,{bottom:y,left:m,right:v,top:w}),elShow(o),o.style.removeProperty("visibility")},_tryAlignmentHorizontal:function(e,t,i,n,o){var r="auto",a="auto",l=!0;return"left"===e?(r=n.left)+t.width>o&&(l=!1):"right"===e?n.left+i.width<t.width?l=!1:(a=o-(n.left+i.width))<0&&(l=!1):(r=n.left+i.width/2-t.width/2,((r=~~r)<0||r+t.width>o)&&(l=!1)),{align:e,left:r,right:a,result:l}},_tryAlignmentVertical:function(e,t,i,n,o,r){var a="auto",l="auto",s=!0,c=50,u=elById("pageHeaderPanel");if(null!==u){var d=window.getComputedStyle(u).position;c="fixed"===d||"static"===d?u.offsetHeight:0}if("top"===e){var h=document.body.clientHeight;a=h-n.top+r,h-(a+t.height)<(window.scrollY||window.pageYOffset)+c&&(s=!1)}else(l=n.top+i.height+r)+t.height-(window.scrollY||window.pageYOffset)>o&&(s=!1);return{align:e,bottom:a,top:l,result:s}}}}),define("WoltLabSuite/Core/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,i={setup:function(){document.body.addEventListener(WCF_CLICK_EVENT,this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return i.setup(),i}),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","EventKey","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,i,n,o,r,a,l,s){"use strict";var c=null,u=new e,d=!1,h=new i,f=new i,p=null,g=null,m="";return{setup:function(){d||(d=!0,p=elCreate("div"),p.className="dropdownMenuContainer",document.body.appendChild(p),c=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.closeAll.bind(this)),r.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.initAll.bind(this)),document.addEventListener("scroll",this._onScroll.bind(this)),window.bc_wcfSimpleDropdown=this,g=this._dropdownMenuKeyDown.bind(this))},initAll:function(){for(var e=0,t=c.length;e<t;e++)this.init(c[e],!1)},init:function(e,i){if(this.setup(),elAttr(e,"role","button"),elAttr(e,"tabindex","0"),elAttr(e,"aria-haspopup",!0),elAttr(e,"aria-expanded",!1),e.classList.contains("jsDropdownEnabled")||elData(e,"target"))return!1;var n=a.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+l.identify(e)+"' does not have a parent with .dropdown.");var o=a.nextByClass(e,"dropdownMenu");if(null===o)throw new Error("Invalid dropdown passed, button '"+l.identify(e)+"' does not have a menu as next sibling.");p.appendChild(o);var r=l.identify(n);if(!h.has(r)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this)),e.addEventListener("keydown",this._handleKeyDown.bind(this)),h.set(r,n),f.set(r,o),r.match(/^wcf\d+$/)||elData(o,"source",r),o.childElementCount&&o.children[0].classList.contains("scrollableDropdownMenu"))){o=o.children[0],elData(o,"scroll-to-active",!0);var s=null,c=null;o.addEventListener("wheel",function(e){null===s&&(s=o.clientHeight),null===c&&(c=o.scrollHeight),e.deltaY<0&&0===o.scrollTop?e.preventDefault():e.deltaY>0&&o.scrollTop+s===c&&e.preventDefault()},{passive:!1})}elData(e,"target",r),i&&setTimeout(function(){elData(e,"dropdown-lazy-init",i instanceof MouseEvent),t.triggerEvent(e,WCF_CLICK_EVENT),setTimeout(function(){e.removeAttribute("data-dropdown-lazy-init")},10)},10)},initFragment:function(e,t){this.setup();var i=l.identify(e);h.has(i)||(h.set(i,e),p.appendChild(t),f.set(i,t))},registerCallback:function(e,t){u.add(e,t)},getDropdown:function(e){return h.get(e)},getDropdownMenu:function(e){return f.get(e)},toggleDropdown:function(e,t,i){this._toggle(null,e,t,i)},setAlignment:function(e,t,i){var n,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(n=r),o.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:n||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom",allowFlip:elData(t,"dropdown-allow-flip")||"both"})},setAlignmentById:function(e){var t=h.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var i=f.get(e);this.setAlignment(t,i)},isOpen:function(e){var t=f.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open:function(e,t){var i=f.get(e);void 0===i||i.classList.contains("dropdownOpen")||this.toggleDropdown(e,void 0,t)},close:function(e){var t=h.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),f.get(e).classList.remove("dropdownOpen"))},closeAll:function(){h.forEach(function(e,t){
-e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),f.get(t).classList.remove("dropdownOpen"),this._notifyCallbacks(t,"close"))}.bind(this))},destroy:function(e){if(!h.has(e))return!1;try{this.close(e),elRemove(f.get(e))}catch(e){}return f.delete(e),h.delete(e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,i=elBySelAll(".dropdown.dropdownOpen",t),n=0,o=i.length;n<o;n++){var r=i[n],a=l.identify(r),s=l.offset(r),c=l.offset(t);s.top+r.clientHeight<=c.top?this.toggleDropdown(a):s.top>=c.top+t.offsetHeight?this.toggleDropdown(a):s.left<=c.left?this.toggleDropdown(a):s.left>=c.left+t.offsetWidth?this.toggleDropdown(a):this.setAlignment(h.get(a),f.get(a))}},_onScroll:function(){h.forEach(function(e,t){if(e.classList.contains("dropdownOpen"))if(elDataBool(e,"is-overlay-dropdown-button"))this.setAlignment(e,f.get(t));else{var i=f.get(e.id);elDataBool(i,"dropdown-ignore-page-scroll")||this.close(t)}}.bind(this))},_notifyCallbacks:function(e,t){u.forEach(e,function(i){i(e,t)})},_toggle:function(e,t,i,n){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"),void 0===n&&e instanceof MouseEvent&&(n=!0));var o=h.get(t),r=!1;if(void 0!==o){var l,s;if(e&&(l=e.currentTarget,(s=l.parentNode)!==o&&(s.classList.add("dropdown"),s.id=o.id,o.classList.remove("dropdown"),o.id="",o=s,h.set(t,s))),void 0===n&&(l=o.closest(".dropdownToggle"),l||!(l=elBySel(".dropdownToggle",o))&&o.id&&(l=elBySel('[data-target="'+o.id+'"]')),l&&elDataBool(l,"dropdown-lazy-init")&&(n=!0)),elDataBool(o,"dropdown-prevent-toggle")&&o.classList.contains("dropdownOpen")&&(r=!0),""===elData(o,"is-overlay-dropdown-button")){var c=a.parentByClass(o,"dialogContent");elData(o,"is-overlay-dropdown-button",null!==c),null!==c&&c.addEventListener("scroll",this._onDialogScroll.bind(this))}}return m="",h.forEach(function(e,o){var a=f.get(o);if(e.classList.contains("dropdownOpen"))if(!1===r){e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen");var l=elBySel(".dropdownToggle",e);l&&elAttr(l,"aria-expanded",!1),this._notifyCallbacks(o,"close")}else m=t;else if(o===t&&a.childElementCount>0){m=t,e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen");var l=elBySel(".dropdownToggle",e);if(l&&elAttr(l,"aria-expanded",!0),a.childElementCount&&elDataBool(a.children[0],"scroll-to-active")){var s=a.children[0];s.removeAttribute("data-scroll-to-active");for(var c=null,u=0,d=s.childElementCount;u<d;u++)if(s.children[u].classList.contains("active")){c=s.children[u];break}c&&(s.scrollTop=Math.max(c.offsetTop+c.clientHeight-a.clientHeight,0))}var h=elBySel(".scrollableDropdownMenu",a);null!==h&&h.classList[h.scrollHeight>h.clientHeight?"add":"remove"]("forceScrollbar"),this._notifyCallbacks(o,"open");var p=null;n||(elAttr(a,"role","menu"),elAttr(a,"tabindex",-1),a.removeEventListener("keydown",g),a.addEventListener("keydown",g),elBySelAll("li",a,function(e){e.clientHeight&&(null===p?p=e:e.classList.contains("active")&&(p=e),elAttr(e,"role","menuitem"),elAttr(e,"tabindex",-1))})),this.setAlignment(e,a,i),null!==p&&p.focus()}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e},_handleKeyDown:function(e){"INPUT"!==e.currentTarget.nodeName&&(n.Enter(e)||n.Space(e))&&(e.preventDefault(),this._toggle(e))},_dropdownMenuKeyDown:function(e){var t,i,o=document.activeElement;if("LI"===o.nodeName)if(n.ArrowDown(e)||n.ArrowUp(e)||n.End(e)||n.Home(e)){e.preventDefault();var r=Array.prototype.slice.call(elBySelAll("li",o.closest(".dropdownMenu")));(n.ArrowUp(e)||n.End(e))&&r.reverse();var a=null,l=function(e){return!e.classList.contains("dropdownDivider")&&e.clientHeight>0},s=r.indexOf(o);(n.End(e)||n.Home(e))&&(s=-1);for(var c=s+1;c<r.length;c++)if(l(r[c])){a=r[c];break}if(null===a)for(c=0;c<r.length;c++)if(l(r[c])){a=r[c];break}a.focus()}else if(n.Enter(e)||n.Space(e)){e.preventDefault();var u=o;1!==u.childElementCount||"SPAN"!==u.children[0].nodeName&&"A"!==u.children[0].nodeName||(u=u.children[0]),i=h.get(m),t=elBySel(".dropdownToggle",i),require(["Core"],function(e){var n=elData(i,"a11y-mouse-event")||"click";e.triggerEvent(u,n),t&&t.focus()})}else(n.Escape(e)||n.Tab(e))&&(e.preventDefault(),i=h.get(m),t=elBySel(".dropdownToggle",i),null!==t||i.classList.contains("dropdown")||(t=i),this._toggle(null,m),t&&t.focus())}}}),define("WoltLabSuite/Core/Devtools",[],function(){"use strict";return{help:function(){},toggleEditorAutosave:function(){},toggleEventLogging:function(){},_internal_:{enable:function(){},editorAutosave:function(){},eventLog:function(){}}}}),define("WoltLabSuite/Core/Event/Handler",["Core","Devtools","Dictionary"],function(e,t,i){"use strict";var n=new i;return{add:function(t,o,r){if("function"!=typeof r)throw new TypeError("[WoltLabSuite/Core/Event/Handler] Expected a valid callback for '"+o+"@"+t+"'.");var a=n.get(t);void 0===a&&(a=new i,n.set(t,a));var l=a.get(o);void 0===l&&(l=new i,a.set(o,l));var s=e.getUuid();return l.set(s,r),s},fire:function(e,i,o){t._internal_.eventLog(e,i),o=o||{};var r=n.get(e);if(void 0!==r){var a=r.get(i);void 0!==a&&a.forEach(function(e){e(o)})}},remove:function(e,t,i){var o=n.get(e);if(void 0!==o){var r=o.get(t);void 0!==r&&r.delete(i)}},removeAll:function(e,t){"string"!=typeof t&&(t=void 0);var i=n.get(e);void 0!==i&&(void 0===t?n.delete(e):i.delete(t))},removeAllBySuffix:function(e,t){var i=n.get(e);if(void 0!==i){t="_"+t;var o=-1*t.length;i.forEach(function(i,n){n.substr(o)===t&&this.removeAll(e,n)}.bind(this))}}}}),define("WoltLabSuite/Core/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=objOwns(window,"Set")&&"function"==typeof window.Set;return e.prototype={add:function(e){t?this._set.add(e):this.has(e)||this._set.push(e)},clear:function(){t?this._set.clear():this._set=[]},delete:function(e){if(t)return this._set.delete(e);var i=this._set.indexOf(e);return-1!==i&&(this._set.splice(i,1),!0)},forEach:function(e){if(t)this._set.forEach(e);else for(var i=0,n=this._set.length;i<n;i++)e(this._set[i])},has:function(e){return t?this._set.has(e):-1!==this._set.indexOf(e)}},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return t?this._set.size:this._set.length}}),e}),define("WoltLabSuite/Core/Ui/Dialog",["Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/Screen","Ui/SimpleDropdown","EventHandler","List","EventKey"],function(e,t,i,n,o,r,a,l,s,c,u,d,h,f,p){"use strict";var g=null,m=null,v=null,b=new i,_=!1,y=new r,w=new i,C=null,E=null,L=elByClass("jsStaticDialog"),A=["onBeforeClose","onClose","onShow"],S=["number","password","search","tel","text","url"],x=['a[href]:not([tabindex^="-"]):not([inert])','area[href]:not([tabindex^="-"]):not([inert])',"input:not([disabled]):not([inert])","select:not([disabled]):not([inert])","textarea:not([disabled]):not([inert])","button:not([disabled]):not([inert])",'iframe:not([tabindex^="-"]):not([inert])','audio:not([tabindex^="-"]):not([inert])','video:not([tabindex^="-"]):not([inert])','[contenteditable]:not([tabindex^="-"]):not([inert])','[tabindex]:not([tabindex^="-"]):not([inert])'];return{setup:function(){void 0===e&&(e=require("Ajax")),v=elCreate("div"),v.classList.add("dialogOverlay"),elAttr(v,"aria-hidden","true"),v.addEventListener("mousedown",this._closeOnBackdrop.bind(this)),v.addEventListener("wheel",function(e){e.target===v&&e.preventDefault()},{passive:!1}),elById("content").appendChild(v),E=function(e){return 27!==e.keyCode||"INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName||(this.close(g),!1)}.bind(this),u.on("screen-xs",{match:function(){_=!0},unmatch:function(){_=!1},setup:function(){_=!0}}),this._initStaticDialogs(),a.add("Ui/Dialog",this._initStaticDialogs.bind(this)),u.setDialogContainer(v),window.addEventListener("resize",function(){b.forEach(function(e){elAttrBool(e.dialog,"aria-hidden")||this.rebuild(elData(e.dialog,"id"))}.bind(this))}.bind(this))},_initStaticDialogs:function(){for(var e,t,i;L.length;)e=L[0],e.classList.remove("jsStaticDialog"),(i=elData(e,"dialog-id"))&&(t=elById(i))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elData(t,"is-static-dialog",!0),elHide(t),e.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.openStatic(t.id,null,{title:elData(t,"title")})}.bind(this))}.bind(this)(e,t)},open:function(i,n){var o=y.get(i);if(t.isPlainObject(o))return this.openStatic(o.id,n);if("function"!=typeof i._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=i._dialogSetup();if(!t.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");o={id:r.id};var a=!0;if(void 0===r.source){var l=elById(r.id);if(null===l)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");r.source=document.createDocumentFragment(),r.source.appendChild(l),l.removeAttribute("id"),elShow(l)}else if(null===r.source)r.source=n;else if("function"==typeof r.source)r.source();else if(t.isPlainObject(r.source)){if("string"!=typeof n||""===n.trim())return e.api(this,r.source.data,function(e){e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(i,e.returnValues.template),"function"==typeof r.source.after&&r.source.after(b.get(r.id).content,e))}.bind(this)),{};r.source=n}else{if("string"==typeof r.source){var l=elCreate("div");elAttr(l,"id",r.id),s.setInnerHtml(l,r.source),r.source=document.createDocumentFragment(),r.source.appendChild(l)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");a=!1}return y.set(i,o),w.set(r.id,i),this.openStatic(r.id,r.source,r.options,a)},openStatic:function(e,i,r,a){u.pageOverlayOpen(),"desktop"!==n.platform()&&(this.isOpen(e)||u.scrollDisable()),b.has(e)?this._updateDialog(e,i):(r=t.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:o.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},r),r.closable||(r.backdropCloseOnClick=!1),r.closeConfirmMessage&&(r.onBeforeClose=function(e){c.show({confirm:this.close.bind(this,e),message:r.closeConfirmMessage})}.bind(this)),this._createDialog(e,i,r));var l=b.get(e);return"ios"===n.platform()&&window.setTimeout(function(){var e=elBySel("input, textarea",l.content);null!==e&&e.focus()}.bind(this),200),l},setTitle:function(e,t){e=this._getDialogId(e);var i=b.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var n=elByClass("dialogTitle",i.dialog);n.length&&(n[0].textContent=t)},setCallback:function(e,t,i){if("object"==typeof e){var n=y.get(e);void 0!==n&&(e=n.id)}var o=b.get(e);if(void 0===o)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if(-1===A.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof i&&null!==i)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof i+"' given).");o[t]=i},_createDialog:function(e,t,i,n){var o=null;if(null===t&&null===(o=elById(e)))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var a=elCreate("header");r.appendChild(a);var l=s.getUniqueId();elAttr(r,"aria-labelledby",l);var c=elCreate("span");if(c.classList.add("dialogTitle"),c.textContent=i.title,elAttr(c,"id",l),a.appendChild(c),i.closable){var u=elCreate("a");u.className="dialogCloseButton jsTooltip",u.href="#",elAttr(u,"role","button"),elAttr(u,"tabindex","0"),elAttr(u,"title",i.closeButtonLabel),elAttr(u,"aria-label",i.closeButtonLabel),u.addEventListener(WCF_CLICK_EVENT,this._close.bind(this)),a.appendChild(u);var d=elCreate("span");d.className="icon icon24 fa-times",u.appendChild(d)}var h=elCreate("div");h.classList.add("dialogContent"),i.disableContentPadding&&h.classList.add("dialogContentNoPadding"),r.appendChild(h),h.addEventListener("wheel",function(e){for(var t,i,n,o=!1,r=e.target;;){if(t=r.clientHeight,i=r.scrollHeight,t<i){if(n=r.scrollTop,e.deltaY<0&&n>0){o=!0;break}if(e.deltaY>0&&n+t<i){o=!0;break}}if(!r||r===h)break;r=r.parentNode}!1===o&&e.preventDefault()},{passive:!1});var p;if(null===o)if("string"==typeof t)p=elCreate("div"),p.id=e,s.setInnerHtml(p,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");for(var g,m=[],_=0,y=t.childNodes.length;_<y;_++)g=t.childNodes[_],g.nodeType===Node.ELEMENT_NODE&&m.push(g);"DIV"!==m[0].nodeName||m.length>1?(p=elCreate("div"),p.id=e,p.appendChild(t)):p=m[0]}else p=o;h.appendChild(p),"none"===p.style.getPropertyValue("display")&&elShow(p),b.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,closable:i.closable,content:p,dialog:r,header:a,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow,submitButton:null,inputFields:new f}),s.prepend(r,v),"function"==typeof i.onSetup&&i.onSetup(p),!0!==n&&this._updateDialog(e,null)},_updateDialog:function(e,t){var i=b.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&s.setInnerHtml(i.content,t),"true"===elAttr(i.dialog,"aria-hidden")){d.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===m&&(m=this._maintainFocus.bind(this),document.body.addEventListener("focus",m,{capture:!0})),i.closable&&"true"===elAttr(v,"aria-hidden")&&window.addEventListener("keyup",E),i.dialog.parentNode.insertBefore(i.dialog,i.dialog.parentNode.firstChild),elAttr(i.dialog,"aria-hidden","false"),elAttr(v,"aria-hidden","false"),elData(v,"close-on-click",i.backdropCloseOnClick?"true":"false"),g=e,C=document.activeElement;var n=elBySel(".dialogCloseButton",i.header);n&&elAttr(n,"inert",!0),this._setFocusToFirstItem(i.dialog),n&&n.removeAttribute("inert"),"function"==typeof i.onShow&&i.onShow(i.content),elDataBool(i.content,"is-static-dialog")&&h.fire("com.woltlab.wcf.dialog","openStatic",{content:i.content,id:e})}this.rebuild(e),a.trigger()},_maintainFocus:function(e){if(g){var t=b.get(g);t.dialog.contains(e.target)||e.target.closest(".dropdownMenuContainer")||e.target.closest(".datePicker")||this._setFocusToFirstItem(t.dialog,!0)}},_setFocusToFirstItem:function(e,t){var i=this._getFirstFocusableChild(e);null!==i&&(t&&("username"!==i.id&&"username"!==i.name||"safari"===n.browser()&&"ios"===n.platform()&&(i=null)),i&&setTimeout(function(){i.focus()},1))},_getFirstFocusableChild:function(e){for(var t=elBySelAll(x.join(","),e),i=0,n=t.length;i<n;i++)if(t[i].offsetWidth&&t[i].offsetHeight&&t[i].getClientRects().length)return t[i];return null},rebuild:function(e){e=this._getDialogId(e);var t=b.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("true"!==elAttr(t.dialog,"aria-hidden")){var i=t.content.parentNode,o=elBySel(".formSubmit",t.content),r=0;null!==o?(i.classList.add("dialogForm"),o.classList.add("dialogFormSubmit"),r+=s.outerHeight(o),r-=1,i.style.setProperty("margin-bottom",r+"px","")):(i.classList.remove("dialogForm"),i.style.removeProperty("margin-bottom")),r+=s.outerHeight(t.header);var a=window.innerHeight*(_?1:.8)-r;i.style.setProperty("max-height",~~a+"px",""),"chrome"===n.browser()&&(t.content.scrollHeight>a?t.content.style.setProperty("margin-right","-1px",""):t.content.style.removeProperty("margin-right")),"chrome"!==n.browser()&&"safari"!==n.browser()||t.content.parentNode.classList.add("jsWebKitFractionalPixelFix");var l=w.get(e);if(void 0!==l&&"function"==typeof l._dialogSubmit){var c=elBySelAll('input[data-dialog-submit-on-enter="true"]',t.content),u=elBySel('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]',t.content);if(null===u)return void(0===c.length&&console.warn("Broken dialog, expected a submit button.",t.content));if(t.submitButton!==u){t.submitButton=u,u.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),this._submit(e)}.bind(this));for(var d,h=null,f=0,g=c.length;f<g;f++)d=c[f],t.inputFields.has(d)||(-1!==S.indexOf(d.type)?(t.inputFields.add(d),null===h&&(h=function(t){p.Enter(t)&&(t.preventDefault(),this._submit(e))}.bind(this)),d.addEventListener("keydown",h)):console.warn("Unsupported input type.",d))}}}},_submit:function(e){var t=b.get(e),i=!0;t.inputFields.forEach(function(e){e.required&&(""===e.value.trim()?(elInnerError(e,o.get("wcf.global.form.error.empty")),i=!1):elInnerError(e,!1))}),i&&w.get(e)._dialogSubmit()},_close:function(e){e.preventDefault();var t=b.get(g);if("function"==typeof t.onBeforeClose)return t.onBeforeClose(g),!1;this.close(g)},_closeOnBackdrop:function(e){if(e.target!==v)return!0;"true"===elData(v,"close-on-click")?this._close(e):e.preventDefault()},close:function(e){e=this._getDialogId(e);var t=b.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");elAttr(t.dialog,"aria-hidden","true"),document.activeElement.closest(".dialogContainer")===t.dialog&&document.activeElement.blur(),"function"==typeof t.onClose&&t.onClose(e),g=null;for(var i=0;i<v.childElementCount;i++){var o=v.children[i];if("false"===elAttr(o,"aria-hidden")){g=elData(o,"id");break}}u.pageOverlayClose(),null===g?(elAttr(v,"aria-hidden","true"),elData(v,"close-on-click","false"),t.closable&&window.removeEventListener("keyup",E)):(t=b.get(g),elData(v,"close-on-click",t.backdropCloseOnClick?"true":"false")),"desktop"!==n.platform()&&u.scrollEnable()},getDialog:function(e){return b.get(this._getDialogId(e))},isOpen:function(e){var t=this.getDialog(e);return void 0!==t&&"false"===elAttr(t.dialog,"aria-hidden")},destroy:function(e){if("object"!=typeof e||e instanceof String)throw new TypeError("Expected the callback object as parameter.");if(y.has(e)){var t=y.get(e).id;this.isOpen(t)&&this.close(t),b.has(t)&&(elRemove(b.get(t).dialog),b.delete(t)),y.delete(e)}},_getDialogId:function(e){if("object"==typeof e){var t=y.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:function(){return{}}}}),define("WoltLabSuite/Core/Ajax/Status",["Language"],function(e){"use strict";var t=0,i=null,n=null;return{_init:function(){i=elCreate("div"),i.classList.add("spinner"),elAttr(i,"role","status");var t=elCreate("span");t.className="icon icon48 fa-spinner",i.appendChild(t);var n=elCreate("span");n.textContent=e.get("wcf.global.loading"),i.appendChild(n),document.body.appendChild(i)},show:function(){null===i&&this._init(),t++,null===n&&(n=window.setTimeout(function(){t&&i.classList.add("active"),n=null},250))},hide:function(){0===--t&&(null!==n&&window.clearTimeout(n),i.classList.remove("active"))}}}),define("WoltLabSuite/Core/Ajax/Request",["Core","Language","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ajax/Status"],function(e,t,i,n,o,r){"use strict";function a(e){this._data=null,this._options={},this._previousXhr=null,this._xhr=null,this._init(e)}var l=!1,s=!1;return a.prototype={_init:function(t){this._options=e.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},t),"object"==typeof t.callbackObject&&(this._options.callbackObject=t.callbackObject),this._options.url=e.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),0===this._options.url.indexOf(WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=e.extend({},this._options.data)),null!==this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),!1===l&&(l=!0,window.addEventListener("beforeunload",function(){s=!0}))},sendRequest:function(t){(!0===t||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||r.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.withCredentials&&(this._xhr.withCredentials=!0);var i=this,n=e.clone(this._options);if(this._xhr.onload=function(){this.readyState===XMLHttpRequest.DONE&&(this.status>=200&&this.status<300||304===this.status?n.responseType&&0!==this.getResponseHeader("Content-Type").indexOf(n.responseType)?i._failure(this,n):i._success(this,n):i._failure(this,n))},this._xhr.onerror=function(){i._failure(this,n)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){var o=this._options.data;"object"==typeof o&&"FormData"!==e.getType(o)&&(o=e.serialize(o)),this._xhr.send(o)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,e)?this._options[e]:null},setData:function(t){null!==this._data&&"FormData"!==e.getType(t)&&(t=e.extend(this._data,t)),this._options.data=t},_success:function(e,t){if(t.silent||r.hide(),"function"==typeof t.success){var i=null;if("application/json"===e.getResponseHeader("Content-Type").split(";",1)[0].trim()){try{i=JSON.parse(e.responseText)}catch(i){return void this._failure(e,t)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim()),i&&i.forceBackgroundQueuePerform&&require(["WoltLabSuite/Core/BackgroundQueue"],function(e){e.invoke()})}t.success(i,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,i){if(!s){i.silent||r.hide();var a=null;try{a=JSON.parse(e.responseText)}catch(e){}var l=!0;if("function"==typeof i.failure&&(l=i.failure(a||{},e.responseText||"",e,i.data)),!0!==i.ignoreError&&!1!==l){var c=this.getErrorHtml(a,e);c&&(void 0===o&&(o=require("Ui/Dialog")),o.openStatic(n.getUniqueId(),c,{title:t.get("wcf.global.error.title")}))}this._finalize(i)}},getErrorHtml:function(e,t){var i="",n="";if(null!==e?(e.returnValues&&e.returnValues.description&&(i+="<br><p>Description:</p><p>"+e.returnValues.description+"</p>"),e.file&&e.line&&(i+="<br><p>File:</p><p>"+e.file+" in line "+e.line+"</p>"),e.stacktrace?i+="<br><p>Stacktrace:</p><p>"+e.stacktrace+"</p>":e.exceptionID&&(i+="<br><p>Exception ID: <code>"+e.exceptionID+"</code></p>"),n=e.message,e.previous.forEach(function(e){i+="<hr><p>"+e.message+"</p>",i+="<br><p>Stacktrace</p><p>"+e.stacktrace+"</p>"})):n=t.responseText,!n||"undefined"===n){if(!ENABLE_DEBUG_MODE)return null;n="XMLHttpRequest failed without a responseText. Check your browser console."}return'<div class="ajaxDebugMessage"><p>'+n+"</p>"+i+"</div>"},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,i.trigger();for(var t=elBySelAll('a[href*="#"]'),n=0,o=t.length;n<o;n++){var r=t[n],a=elAttr(r,"href");-1===a.indexOf("AJAXProxy")&&-1===a.indexOf("ajax-proxy")||(a=a.substr(a.indexOf("#")),elAttr(r,"href",document.location.toString().replace(/#.*/,"")+a))}}},a}),define("WoltLabSuite/Core/Ajax",["AjaxRequest","Core","ObjectMap"],function(e,t,i){"use strict";var n=new i;return{api:function(t,i,o,r){void 0===e&&(e=require("AjaxRequest")),"object"!=typeof i&&(i={});var a=n.get(t);if(void 0===a){if("function"!=typeof t._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");var l=t._ajaxSetup();l.pinData=!0,l.callbackObject=t,l.url||(l.url="index.php?ajax-proxy/&t="+SECURITY_TOKEN,l.withCredentials=!0),a=new e(l),n.set(t,a)}var s=null,c=null;return"function"==typeof o&&(s=a.getOption("success"),a.setOption("success",o)),"function"==typeof r&&(c=a.getOption("failure"),a.setOption("failure",r)),a.setData(i),a.sendRequest(),null!==s&&a.setOption("success",s),null!==c&&a.setOption("failure",c),a},apiOnce:function(t){void 0===e&&(e=require("AjaxRequest")),t.pinData=!1,t.callbackObject=null,t.url||(t.url="index.php?ajax-proxy/&t="+SECURITY_TOKEN,t.withCredentials=!0),new e(t).sendRequest(!1)},getRequestObject:function(e){if(!n.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return n.get(e)}}}),define("WoltLabSuite/Core/BackgroundQueue",["Ajax"],function(e){"use strict";var t=0,i=!1,n="";return{setUrl:function(e){n=e},invoke:function(){if(""===n)return void console.error("The background queue has not been initialized yet.");i||(i=!0,e.api(this))},_ajaxSuccess:function(e){t++,e>0&&t<5?window.setTimeout(function(){i=!1,this.invoke()}.bind(this),1e3):(i=!1,t=0)},_ajaxSetup:function(){return{url:n,ignoreError:!0,silent:!0}}}}),function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||m)return!1;try{u.clearRect(0,0,s,l),u.drawImage(e,0,0,s,l)}catch(e){}_=setTimeout(function(){t(e)},M.duration),B.setIcon(c)}function i(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,i,n){return t+t+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return!!i&&{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}}function n(e,t){var i,n={};for(i in e)n[i]=e[i];for(i in t)n[i]=t[i];return n}function o(){return y.hidden||y.msHidden||y.webkitHidden||y.mozHidden}e=e||{};var r,a,l,s,c,u,d,h,f,p,g,m,v,b,_,y,w={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,element:null,dataUrl:!1,win:window};v={},v.ff="undefined"!=typeof InstallTrigger,v.chrome=!!window.chrome,v.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var C=[];g=function(){},h=m=!1;var E={};E.ready=function(){h=!0,E.reset(),g()},E.reset=function(){h&&(C=[],f=!1,p=!1,u.clearRect(0,0,s,l),u.drawImage(d,0,0,s,l),B.setIcon(c),window.clearTimeout(b),window.clearTimeout(_))},E.start=function(){if(h&&!p){var e=function(){f=C[0],p=!1,C.length>0&&(C.shift(),E.start())};if(C.length>0){p=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in C[0].options&&(r[e]=C[0].options[e])}),M.run(C[0].options,function(){e()},!1)};f?M.run(f.options,function(){t()},!0):t()}}};var L={},A=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=s*e.x,e.y=l*e.y,e.w=s*e.w,e.h=l*e.h,e.len=(""+e.n).length,e};L.circle=function(e){e=A(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),u.clearRect(0,0,s,l),u.drawImage(d,0,0,s,l),u.beginPath(),u.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.fontFamily,u.textAlign="center",t?(u.moveTo(e.x+e.w/2,e.y),u.lineTo(e.x+e.w-e.h/2,e.y),u.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),u.lineTo(e.x+e.w,e.y+e.h-e.h/2),u.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),u.lineTo(e.x+e.h/2,e.y+e.h),u.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),u.lineTo(e.x,e.y+e.h/2),u.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):u.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),u.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",u.fill(),u.closePath(),u.beginPath(),u.stroke(),u.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?u.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):u.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),u.closePath()},L.rectangle=function(e){e=A(e);2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w),u.clearRect(0,0,s,l),u.drawImage(d,0,0,s,l),u.beginPath(),u.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,u.textAlign="center",u.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",u.fillRect(e.x,e.y,e.w,e.h),u.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?u.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):u.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),u.closePath()};var S=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},g=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&M.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&L[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=i(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),C.push(n),C.length>100)throw new Error("Too many badges requests in queue.");E.start()}else E.reset()}catch(e){throw new Error("Error setting badge. Message: "+e.message)}},h&&g()},x=function(e){g=function(){try{var t=e.width,i=e.height,n=document.createElement("img"),o=t/s<i/l?t/s:i/l;n.setAttribute("crossOrigin","anonymous"),n.onload=function(){u.clearRect(0,0,s,l),u.drawImage(n,0,0,s,l),B.setIcon(c)},n.setAttribute("src",e.getAttribute("src")),n.height=i/o,n.width=t/o}catch(e){throw new Error("Error setting image. Message: "+e.message)}},h&&g()},I=function(e){g=function(){B.setIconSrc(e)},h&&g()},D=function(e){g=function(){try{if("stop"===e)return m=!0,E.reset(),void(m=!1);e.addEventListener("play",function(){t(this)},!1)}catch(e){throw new Error("Error setting video. Message: "+e.message)}},h&&g()},T=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),v.supported){var i=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,g=function(){try{if("stop"===e)return m=!0,E.reset(),void(m=!1);i=document.createElement("video"),i.width=s,i.height=l,navigator.getUserMedia({video:!0,audio:!1},function(e){i.src=URL.createObjectURL(e),i.play(),t(i)},function(){})}catch(e){throw new Error("Error setting webcam. Message: "+e.message)}},h&&g()}},k=function(e,t){var n=e;null==t&&"[object Object]"==Object.prototype.toString.call(e)||(n={},n[e]=t);for(var o=Object.keys(n),a=0;a<o.length;a++)"bgColor"==o[a]||"textColor"==o[a]?r[o[a]]=i(n[o[a]]):r[o[a]]=n[o[a]];C.push(f),E.start()},B={};B.getIcons=function(){var e=[];return r.element?e=[r.element]:r.elementId?(e=[y.getElementById(r.elementId)],e[0].setAttribute("href",e[0].getAttribute("src"))):(e=function(){
-for(var e=[],t=y.getElementsByTagName("head")[0].getElementsByTagName("link"),i=0;i<t.length;i++)/(^|\s)icon(\s|$)/i.test(t[i].getAttribute("rel"))&&e.push(t[i]);return e}(),0===e.length&&(e=[y.createElement("link")],e[0].setAttribute("rel","icon"),y.getElementsByTagName("head")[0].appendChild(e[0]))),e.forEach(function(e){e.setAttribute("type","image/png")}),e},B.setIcon=function(e){var t=e.toDataURL("image/png");B.setIconSrc(t)},B.setIconSrc=function(e){if(r.dataUrl&&r.dataUrl(e),r.element)r.element.setAttribute("href",e),r.element.setAttribute("src",e);else if(r.elementId){var t=y.getElementById(r.elementId);t.setAttribute("href",e),t.setAttribute("src",e)}else if(v.ff||v.opera){var i=a[a.length-1],n=y.createElement("link");a=[n],v.opera&&n.setAttribute("rel","icon"),n.setAttribute("rel","icon"),n.setAttribute("type","image/png"),y.getElementsByTagName("head")[0].appendChild(n),n.setAttribute("href",e),i.parentNode&&i.parentNode.removeChild(i)}else a.forEach(function(t){t.setAttribute("href",e)})};var M={};return M.duration=40,M.types={},M.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],M.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],M.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],M.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],M.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],M.run=function(e,t,i,a){var l=M.types[o()?"none":r.animation];if(a=!0===i?void 0!==a?a:l.length-1:void 0!==a?a:0,t=t||function(){},!(a<l.length&&a>=0))return void t();L[r.type](n(e,l[a])),b=setTimeout(function(){i?a-=1:a+=1,M.run(e,t,i,a)},M.duration),B.setIcon(c)},function(){r=n(w,e),r.bgColor=i(r.bgColor),r.textColor=i(r.textColor),r.position=r.position.toLowerCase(),r.animation=M.types[""+r.animation]?r.animation:w.animation,y=r.win.document;var t=r.position.indexOf("up")>-1,o=r.position.indexOf("left")>-1;if(t||o)for(var h in M.types)for(var f=0;f<M.types[h].length;f++){var p=M.types[h][f];t&&(p.y<.6?p.y=p.y-.4:p.y=p.y-2*p.y+(1-p.w)),o&&(p.x<.6?p.x=p.x-.4:p.x=p.x-2*p.x+(1-p.h)),M.types[h][f]=p}r.type=L[""+r.type]?r.type:w.type,a=B.getIcons(),c=document.createElement("canvas"),d=document.createElement("img");var g=a[a.length-1];g.hasAttribute("href")?(d.setAttribute("crossOrigin","anonymous"),d.onload=function(){l=d.height>0?d.height:32,s=d.width>0?d.width:32,c.height=l,c.width=s,u=c.getContext("2d"),E.ready()},d.setAttribute("src",g.getAttribute("href"))):(l=32,s=32,d.height=l,d.width=s,c.height=l,c.width=s,u=c.getContext("2d"),E.ready())}(),{badge:S,video:D,image:x,rawImageSrc:I,webcam:T,setOpt:k,reset:E.reset,browser:{supported:v.supported}}};void 0!==define&&define.amd?define("favico",[],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),function(e,t,i){var n=window.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=i(n):"function"==typeof define&&define.amd?define("enquire",[],function(){return t.enquire=i(n)}):t.enquire=i(n)}(0,this,function(e){"use strict";function t(e,t){var i=0,n=e.length;for(i;i<n&&!1!==t(e[i],i);i++);}function i(e){return"[object Array]"===Object.prototype.toString.apply(e)}function n(e){return"function"==typeof e}function o(e){this.options=e,!e.deferSetup&&this.setup()}function r(t,i){this.query=t,this.isUnconditional=i,this.handlers=[],this.mql=e(t);var n=this;this.listener=function(e){n.mql=e,n.assess()},this.mql.addListener(this.listener)}function a(){if(!e)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!e("only all").matches}return o.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},r.prototype={addHandler:function(e){var t=new o(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var i=this.handlers;t(i,function(t,n){if(t.equals(e))return t.destroy(),!i.splice(n,1)})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){t(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";t(this.handlers,function(t){t[e]()})}},a.prototype={register:function(e,o,a){var l=this.queries,s=a&&this.browserIsIncapable;return l[e]||(l[e]=new r(e,s)),n(o)&&(o={match:o}),i(o)||(o=[o]),t(o,function(t){n(t)&&(t={match:t}),l[e].addHandler(t)}),this},unregister:function(e,t){var i=this.queries[e];return i&&(t?i.removeHandler(t):(i.clear(),delete this.queries[e])),this}},new a}),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){var i=t[a][1][e];return o(i||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}({1:[function(e,t,i){"use strict";var n=e("../main");"function"==typeof define&&define.amd?define("perfect-scrollbar",n):(window.PerfectScrollbar=n,void 0===window.Ps&&(window.Ps=n))},{"../main":7}],2:[function(e,t,i){"use strict";function n(e,t){var i=e.className.split(" ");i.indexOf(t)<0&&i.push(t),e.className=i.join(" ")}function o(e,t){var i=e.className.split(" "),n=i.indexOf(t);n>=0&&i.splice(n,1),e.className=i.join(" ")}i.add=function(e,t){e.classList?e.classList.add(t):n(e,t)},i.remove=function(e,t){e.classList?e.classList.remove(t):o(e,t)},i.list=function(e){return e.classList?Array.prototype.slice.apply(e.classList):e.className.split(" ")}},{}],3:[function(e,t,i){"use strict";function n(e,t){return window.getComputedStyle(e)[t]}function o(e,t,i){return"number"==typeof i&&(i=i.toString()+"px"),e.style[t]=i,e}function r(e,t){for(var i in t){var n=t[i];"number"==typeof n&&(n=n.toString()+"px"),e.style[i]=n}return e}var a={};a.e=function(e,t){var i=document.createElement(e);return i.className=t,i},a.appendTo=function(e,t){return t.appendChild(e),e},a.css=function(e,t,i){return"object"==typeof t?r(e,t):void 0===i?n(e,t):o(e,t,i)},a.matches=function(e,t){return void 0!==e.matches?e.matches(t):void 0!==e.matchesSelector?e.matchesSelector(t):void 0!==e.webkitMatchesSelector?e.webkitMatchesSelector(t):void 0!==e.mozMatchesSelector?e.mozMatchesSelector(t):void 0!==e.msMatchesSelector?e.msMatchesSelector(t):void 0},a.remove=function(e){void 0!==e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)},a.queryChildren=function(e,t){return Array.prototype.filter.call(e.childNodes,function(e){return a.matches(e,t)})},t.exports=a},{}],4:[function(e,t,i){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){void 0===this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var i=void 0!==t;this.events[e]=this.events[e].filter(function(n){return!(!i||n===t)||(this.element.removeEventListener(e,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var o=function(){this.eventElements=[]};o.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return void 0===t&&(t=new n(e),this.eventElements.push(t)),t},o.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},o.prototype.unbind=function(e,t,i){this.eventElement(e).unbind(t,i)},o.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},o.prototype.once=function(e,t,i){var n=this.eventElement(e),o=function(e){n.unbind(t,o),i(e)};n.bind(t,o)},t.exports=o},{}],5:[function(e,t,i){"use strict";t.exports=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}()},{}],6:[function(e,t,i){"use strict";var n=e("./class"),o=e("./dom"),r=i.toInt=function(e){return parseInt(e,10)||0},a=i.clone=function(e){if(e){if(e.constructor===Array)return e.map(a);if("object"==typeof e){var t={};for(var i in e)t[i]=a(e[i]);return t}return e}return null};i.extend=function(e,t){var i=a(e);for(var n in t)i[n]=a(t[n]);return i},i.isEditable=function(e){return o.matches(e,"input,[contenteditable]")||o.matches(e,"select,[contenteditable]")||o.matches(e,"textarea,[contenteditable]")||o.matches(e,"button,[contenteditable]")},i.removePsClasses=function(e){for(var t=n.list(e),i=0;i<t.length;i++){var o=t[i];0===o.indexOf("ps-")&&n.remove(e,o)}},i.outerWidth=function(e){return r(o.css(e,"width"))+r(o.css(e,"paddingLeft"))+r(o.css(e,"paddingRight"))+r(o.css(e,"borderLeftWidth"))+r(o.css(e,"borderRightWidth"))},i.startScrolling=function(e,t){n.add(e,"ps-in-scrolling"),void 0!==t?n.add(e,"ps-"+t):(n.add(e,"ps-x"),n.add(e,"ps-y"))},i.stopScrolling=function(e,t){n.remove(e,"ps-in-scrolling"),void 0!==t?n.remove(e,"ps-"+t):(n.remove(e,"ps-x"),n.remove(e,"ps-y"))},i.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(e,t,i){"use strict";var n=e("./plugin/destroy"),o=e("./plugin/initialize"),r=e("./plugin/update");t.exports={initialize:o,update:r,destroy:n}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(e,t,i){"use strict";t.exports={handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}},{}],9:[function(e,t,i){"use strict";var n=e("../lib/helper"),o=e("../lib/dom"),r=e("./instances");t.exports=function(e){var t=r.get(e);t&&(t.event.unbindAll(),o.remove(t.scrollbarX),o.remove(t.scrollbarY),o.remove(t.scrollbarXRail),o.remove(t.scrollbarYRail),n.removePsClasses(e),r.remove(e))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(e,t,i){"use strict";function n(e,t){function i(e){return e.getBoundingClientRect()}var n=function(e){e.stopPropagation()};t.event.bind(t.scrollbarY,"click",n),t.event.bind(t.scrollbarYRail,"click",function(n){var o=n.pageY-window.pageYOffset-i(t.scrollbarYRail).top,l=o>t.scrollbarYTop?1:-1;a(e,"top",e.scrollTop+l*t.containerHeight),r(e),n.stopPropagation()}),t.event.bind(t.scrollbarX,"click",n),t.event.bind(t.scrollbarXRail,"click",function(n){var o=n.pageX-window.pageXOffset-i(t.scrollbarXRail).left,l=o>t.scrollbarXLeft?1:-1;a(e,"left",e.scrollLeft+l*t.containerWidth),r(e),n.stopPropagation()})}var o=e("../instances"),r=e("../update-geometry"),a=e("../update-scroll");t.exports=function(e){n(e,o.get(e))}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(e,t,i){"use strict";function n(e,t){function i(i){var o=n+i*t.railXRatio,a=Math.max(0,t.scrollbarXRail.getBoundingClientRect().left)+t.railXRatio*(t.railXWidth-t.scrollbarXWidth);t.scrollbarXLeft=o<0?0:o>a?a:o;var l=r.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.railXRatio*t.scrollbarXWidth))-t.negativeScrollAdjustment;c(e,"left",l)}var n=null,o=null,l=function(t){i(t.pageX-o),s(e),t.stopPropagation(),t.preventDefault()},u=function(){r.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",l)};t.event.bind(t.scrollbarX,"mousedown",function(i){o=i.pageX,n=r.toInt(a.css(t.scrollbarX,"left"))*t.railXRatio,r.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",l),t.event.once(t.ownerDocument,"mouseup",u),i.stopPropagation(),i.preventDefault()})}function o(e,t){function i(i){var o=n+i*t.railYRatio,a=Math.max(0,t.scrollbarYRail.getBoundingClientRect().top)+t.railYRatio*(t.railYHeight-t.scrollbarYHeight);t.scrollbarYTop=o<0?0:o>a?a:o;var l=r.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.railYRatio*t.scrollbarYHeight));c(e,"top",l)}var n=null,o=null,l=function(t){i(t.pageY-o),s(e),t.stopPropagation(),t.preventDefault()},u=function(){r.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",l)};t.event.bind(t.scrollbarY,"mousedown",function(i){o=i.pageY,n=r.toInt(a.css(t.scrollbarY,"top"))*t.railYRatio,r.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",l),t.event.once(t.ownerDocument,"mouseup",u),i.stopPropagation(),i.preventDefault()})}var r=e("../../lib/helper"),a=e("../../lib/dom"),l=e("../instances"),s=e("../update-geometry"),c=e("../update-scroll");t.exports=function(e){var t=l.get(e);n(e,t),o(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var o=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===o&&n>0||o>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}var n=!1;t.event.bind(e,"mouseenter",function(){n=!0}),t.event.bind(e,"mouseleave",function(){n=!1});var a=!1;t.event.bind(t.ownerDocument,"keydown",function(c){if(!(c.isDefaultPrevented&&c.isDefaultPrevented()||c.defaultPrevented)){var u=r.matches(t.scrollbarX,":focus")||r.matches(t.scrollbarY,":focus");if(n||u){var d=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(d){if("IFRAME"===d.tagName)d=d.contentDocument.activeElement;else for(;d.shadowRoot;)d=d.shadowRoot.activeElement;if(o.isEditable(d))return}var h=0,f=0;switch(c.which){case 37:h=c.metaKey?-t.contentWidth:c.altKey?-t.containerWidth:-30;break;case 38:f=c.metaKey?t.contentHeight:c.altKey?t.containerHeight:30;break;case 39:h=c.metaKey?t.contentWidth:c.altKey?t.containerWidth:30;break;case 40:f=c.metaKey?-t.contentHeight:c.altKey?-t.containerHeight:-30;break;case 33:f=90;break;case 32:f=c.shiftKey?90:-90;break;case 34:f=-90;break;case 35:f=c.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:f=c.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}s(e,"top",e.scrollTop-f),s(e,"left",e.scrollLeft+h),l(e),a=i(h,f),a&&c.preventDefault()}}})}var o=e("../../lib/helper"),r=e("../../lib/dom"),a=e("../instances"),l=e("../update-geometry"),s=e("../update-scroll");t.exports=function(e){n(e,a.get(e))}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var o=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===o&&n>0||o>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}function n(e){var t=e.deltaX,i=-1*e.deltaY;return void 0!==t&&void 0!==i||(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=e.wheelDelta),e.shiftKey?[-i,-t]:[t,i]}function o(t,i){var n=e.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(n){if(!window.getComputedStyle(n).overflow.match(/(scroll|auto)/))return!1;var o=n.scrollHeight-n.clientHeight;if(o>0&&!(0===n.scrollTop&&i>0||n.scrollTop===o&&i<0))return!0;var r=n.scrollLeft-n.clientWidth;if(r>0&&!(0===n.scrollLeft&&t<0||n.scrollLeft===r&&t>0))return!0}return!1}function l(l){var c=n(l),u=c[0],d=c[1];o(u,d)||(s=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(d?a(e,"top",e.scrollTop-d*t.settings.wheelSpeed):a(e,"top",e.scrollTop+u*t.settings.wheelSpeed),s=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(u?a(e,"left",e.scrollLeft+u*t.settings.wheelSpeed):a(e,"left",e.scrollLeft-d*t.settings.wheelSpeed),s=!0):(a(e,"top",e.scrollTop-d*t.settings.wheelSpeed),a(e,"left",e.scrollLeft+u*t.settings.wheelSpeed)),r(e),(s=s||i(u,d))&&(l.stopPropagation(),l.preventDefault()))}var s=!1;void 0!==window.onwheel?t.event.bind(e,"wheel",l):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",l)}var o=e("../instances"),r=e("../update-geometry"),a=e("../update-scroll");t.exports=function(e){n(e,o.get(e))}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(e,t,i){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var o=e("../instances"),r=e("../update-geometry");t.exports=function(e){n(e,o.get(e))}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,i){"use strict";function n(e,t){function i(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function n(){c||(c=setInterval(function(){if(!r.get(e))return void clearInterval(c);l(e,"top",e.scrollTop+u.top),l(e,"left",e.scrollLeft+u.left),a(e)},50))}function s(){c&&(clearInterval(c),c=null),o.stopScrolling(e)}var c=null,u={top:0,left:0},d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(i())?d=!0:(d=!1,s())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,s())}),t.event.bind(window,"keyup",function(){d&&(d=!1,s())}),t.event.bind(window,"mousemove",function(t){if(d){var i={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};i.x<r.left+3?(u.left=-5,o.startScrolling(e,"x")):i.x>r.right-3?(u.left=5,o.startScrolling(e,"x")):u.left=0,i.y<r.top+3?(u.top=r.top+3-i.y<5?-5:-20,o.startScrolling(e,"y")):i.y>r.bottom-3?(u.top=i.y-r.bottom+3<5?5:20,o.startScrolling(e,"y")):u.top=0,0===u.top&&0===u.left?s():n()}})}var o=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry"),l=e("../update-scroll");t.exports=function(e){n(e,r.get(e))}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(e,t,i){"use strict";function n(e,t,i,n){function o(i,n){var o=e.scrollTop,r=e.scrollLeft,a=Math.abs(i),l=Math.abs(n);if(l>a){if(n<0&&o===t.contentHeight-t.containerHeight||n>0&&0===o)return!t.settings.swipePropagation}else if(a>l&&(i<0&&r===t.contentWidth-t.containerWidth||i>0&&0===r))return!t.settings.swipePropagation;return!0}function s(t,i){l(e,"top",e.scrollTop-i),l(e,"left",e.scrollLeft-t),a(e)}function c(){y=!0}function u(){y=!1}function d(e){return e.targetTouches?e.targetTouches[0]:e}function h(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function f(e){if(h(e)){w=!0;var t=d(e);m.pageX=t.pageX,m.pageY=t.pageY,v=(new Date).getTime(),null!==_&&clearInterval(_),e.stopPropagation()}}function p(e){if(!w&&t.settings.swipePropagation&&f(e),!y&&w&&h(e)){var i=d(e),n={pageX:i.pageX,pageY:i.pageY},r=n.pageX-m.pageX,a=n.pageY-m.pageY;s(r,a),m=n;var l=(new Date).getTime(),c=l-v;c>0&&(b.x=r/c,b.y=a/c,v=l),o(r,a)&&(e.stopPropagation(),e.preventDefault())}}function g(){!y&&w&&(w=!1,clearInterval(_),_=setInterval(function(){return r.get(e)&&(b.x||b.y)?Math.abs(b.x)<.01&&Math.abs(b.y)<.01?void clearInterval(_):(s(30*b.x,30*b.y),b.x*=.8,void(b.y*=.8)):void clearInterval(_)},10))}var m={},v=0,b={},_=null,y=!1,w=!1;i?(t.event.bind(window,"touchstart",c),t.event.bind(window,"touchend",u),t.event.bind(e,"touchstart",f),t.event.bind(e,"touchmove",p),t.event.bind(e,"touchend",g)):n&&(window.PointerEvent?(t.event.bind(window,"pointerdown",c),t.event.bind(window,"pointerup",u),t.event.bind(e,"pointerdown",f),t.event.bind(e,"pointermove",p),t.event.bind(e,"pointerup",g)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",c),t.event.bind(window,"MSPointerUp",u),t.event.bind(e,"MSPointerDown",f),t.event.bind(e,"MSPointerMove",p),t.event.bind(e,"MSPointerUp",g)))}var o=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry"),l=e("../update-scroll");t.exports=function(e){if(o.env.supportsTouch||o.env.supportsIePointer){n(e,r.get(e),o.env.supportsTouch,o.env.supportsIePointer)}}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(e,t,i){"use strict";var n=e("../lib/helper"),o=e("../lib/class"),r=e("./instances"),a=e("./update-geometry"),l={"click-rail":e("./handler/click-rail"),"drag-scrollbar":e("./handler/drag-scrollbar"),keyboard:e("./handler/keyboard"),wheel:e("./handler/mouse-wheel"),touch:e("./handler/touch"),selection:e("./handler/selection")},s=e("./handler/native-scroll");t.exports=function(e,t){t="object"==typeof t?t:{},o.add(e,"ps-container");var i=r.add(e);i.settings=n.extend(i.settings,t),o.add(e,"ps-theme-"+i.settings.theme),i.settings.handlers.forEach(function(t){l[t](e)}),s(e),a(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,i){"use strict";function n(e){function t(){s.add(e,"ps-focus")}function i(){s.remove(e,"ps-focus")}var n=this;n.settings=l.clone(c),n.containerWidth=null,n.containerHeight=null,n.contentWidth=null,n.contentHeight=null,n.isRtl="rtl"===u.css(e,"direction"),n.isNegativeScroll=function(){var t=e.scrollLeft,i=null;return e.scrollLeft=-1,i=e.scrollLeft<0,e.scrollLeft=t,i}(),n.negativeScrollAdjustment=n.isNegativeScroll?e.scrollWidth-e.clientWidth:0,n.event=new d,n.ownerDocument=e.ownerDocument||document,n.scrollbarXRail=u.appendTo(u.e("div","ps-scrollbar-x-rail"),e),n.scrollbarX=u.appendTo(u.e("div","ps-scrollbar-x"),n.scrollbarXRail),n.scrollbarX.setAttribute("tabindex",0),n.event.bind(n.scrollbarX,"focus",t),n.event.bind(n.scrollbarX,"blur",i),n.scrollbarXActive=null,n.scrollbarXWidth=null,n.scrollbarXLeft=null,n.scrollbarXBottom=l.toInt(u.css(n.scrollbarXRail,"bottom")),n.isScrollbarXUsingBottom=n.scrollbarXBottom===n.scrollbarXBottom,n.scrollbarXTop=n.isScrollbarXUsingBottom?null:l.toInt(u.css(n.scrollbarXRail,"top")),n.railBorderXWidth=l.toInt(u.css(n.scrollbarXRail,"borderLeftWidth"))+l.toInt(u.css(n.scrollbarXRail,"borderRightWidth")),u.css(n.scrollbarXRail,"display","block"),n.railXMarginWidth=l.toInt(u.css(n.scrollbarXRail,"marginLeft"))+l.toInt(u.css(n.scrollbarXRail,"marginRight")),u.css(n.scrollbarXRail,"display",""),n.railXWidth=null,n.railXRatio=null,n.scrollbarYRail=u.appendTo(u.e("div","ps-scrollbar-y-rail"),e),n.scrollbarY=u.appendTo(u.e("div","ps-scrollbar-y"),n.scrollbarYRail),n.scrollbarY.setAttribute("tabindex",0),n.event.bind(n.scrollbarY,"focus",t),n.event.bind(n.scrollbarY,"blur",i),n.scrollbarYActive=null,n.scrollbarYHeight=null,n.scrollbarYTop=null,n.scrollbarYRight=l.toInt(u.css(n.scrollbarYRail,"right")),n.isScrollbarYUsingRight=n.scrollbarYRight===n.scrollbarYRight,n.scrollbarYLeft=n.isScrollbarYUsingRight?null:l.toInt(u.css(n.scrollbarYRail,"left")),n.scrollbarYOuterWidth=n.isRtl?l.outerWidth(n.scrollbarY):null,n.railBorderYWidth=l.toInt(u.css(n.scrollbarYRail,"borderTopWidth"))+l.toInt(u.css(n.scrollbarYRail,"borderBottomWidth")),u.css(n.scrollbarYRail,"display","block"),n.railYMarginHeight=l.toInt(u.css(n.scrollbarYRail,"marginTop"))+l.toInt(u.css(n.scrollbarYRail,"marginBottom")),u.css(n.scrollbarYRail,"display",""),n.railYHeight=null,n.railYRatio=null}function o(e){return e.getAttribute("data-ps-id")}function r(e,t){e.setAttribute("data-ps-id",t)}function a(e){e.removeAttribute("data-ps-id")}var l=e("../lib/helper"),s=e("../lib/class"),c=e("./default-setting"),u=e("../lib/dom"),d=e("../lib/event-manager"),h=e("../lib/guid"),f={};i.add=function(e){var t=h();return r(e,t),f[t]=new n(e),f[t]},i.remove=function(e){delete f[o(e)],a(e)},i.get=function(e){return f[o(e)]}},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t,i){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function o(e,t){var i={width:t.railXWidth};t.isRtl?i.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:i.left=e.scrollLeft,t.isScrollbarXUsingBottom?i.bottom=t.scrollbarXBottom-e.scrollTop:i.top=t.scrollbarXTop+e.scrollTop,l.css(t.scrollbarXRail,i);var n={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?n.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth:n.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:n.left=t.scrollbarYLeft+e.scrollLeft,l.css(t.scrollbarYRail,n),l.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),l.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/helper"),a=e("../lib/class"),l=e("../lib/dom"),s=e("./instances"),c=e("./update-scroll");t.exports=function(e){var t=s.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight;var i;e.contains(t.scrollbarXRail)||(i=l.queryChildren(e,".ps-scrollbar-x-rail"),i.length>0&&i.forEach(function(e){l.remove(e)}),l.appendTo(t.scrollbarXRail,e)),e.contains(t.scrollbarYRail)||(i=l.queryChildren(e,".ps-scrollbar-y-rail"),i.length>0&&i.forEach(function(e){l.remove(e)}),l.appendTo(t.scrollbarYRail,e)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=n(t,r.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=r.toInt((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=n(t,r.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=r.toInt(e.scrollTop*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),o(e,t),t.scrollbarXActive?a.add(e,"ps-active-x"):(a.remove(e,"ps-active-x"),t.scrollbarXWidth=0,t.scrollbarXLeft=0,c(e,"left",0)),t.scrollbarYActive?a.add(e,"ps-active-y"):(a.remove(e,"ps-active-y"),t.scrollbarYHeight=0,t.scrollbarYTop=0,c(e,"top",0))}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(e,t,i){"use strict";var n,o,r=e("./instances"),a=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t};t.exports=function(e,t,i){if(void 0===e)throw"You must provide an element to the update-scroll function";if(void 0===t)throw"You must provide an axis to the update-scroll function";if(void 0===i)throw"You must provide a value to the update-scroll function";"top"===t&&i<=0&&(e.scrollTop=i=0,e.dispatchEvent(a("ps-y-reach-start"))),"left"===t&&i<=0&&(e.scrollLeft=i=0,e.dispatchEvent(a("ps-x-reach-start")));var l=r.get(e);"top"===t&&i>=l.contentHeight-l.containerHeight&&(i=l.contentHeight-l.containerHeight,i-e.scrollTop<=1?i=e.scrollTop:e.scrollTop=i,e.dispatchEvent(a("ps-y-reach-end"))),"left"===t&&i>=l.contentWidth-l.containerWidth&&(i=l.contentWidth-l.containerWidth,i-e.scrollLeft<=1?i=e.scrollLeft:e.scrollLeft=i,e.dispatchEvent(a("ps-x-reach-end"))),n||(n=e.scrollTop),o||(o=e.scrollLeft),"top"===t&&i<n&&e.dispatchEvent(a("ps-scroll-up")),"top"===t&&i>n&&e.dispatchEvent(a("ps-scroll-down")),"left"===t&&i<o&&e.dispatchEvent(a("ps-scroll-left")),"left"===t&&i>o&&e.dispatchEvent(a("ps-scroll-right")),"top"===t&&(e.scrollTop=n=i,e.dispatchEvent(a("ps-scroll-y"))),"left"===t&&(e.scrollLeft=o=i,e.dispatchEvent(a("ps-scroll-x")))}},{"./instances":18}],21:[function(e,t,i){"use strict";var n=e("../lib/helper"),o=e("../lib/dom"),r=e("./instances"),a=e("./update-geometry"),l=e("./update-scroll");t.exports=function(e){var t=r.get(e);t&&(t.negativeScrollAdjustment=t.isNegativeScroll?e.scrollWidth-e.clientWidth:0,o.css(t.scrollbarXRail,"display","block"),o.css(t.scrollbarYRail,"display","block"),t.railXMarginWidth=n.toInt(o.css(t.scrollbarXRail,"marginLeft"))+n.toInt(o.css(t.scrollbarXRail,"marginRight")),t.railYMarginHeight=n.toInt(o.css(t.scrollbarYRail,"marginTop"))+n.toInt(o.css(t.scrollbarYRail,"marginBottom")),o.css(t.scrollbarXRail,"display","none"),o.css(t.scrollbarYRail,"display","none"),a(e),l(e,"top",e.scrollTop),l(e,"left",e.scrollLeft),o.css(t.scrollbarXRail,"display",""),o.css(t.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]),define("WoltLabSuite/Core/Date/Util",["Language"],function(e){"use strict";return{formatDate:function(t){return this.format(t,e.get("wcf.date.dateFormat"))},formatTime:function(t){return this.format(t,e.get("wcf.date.timeFormat"))},formatDateTime:function(t){return this.format(t,e.get("wcf.date.dateTimeFormat").replace(/%date%/,e.get("wcf.date.dateFormat")).replace(/%time%/,e.get("wcf.date.timeFormat")))},format:function(t,i){var n,o="";"c"===i&&(i="Y-m-dTH:i:sP");for(var r=0,a=i.length;r<a;r++){switch(i[r]){case"s":n=("0"+t.getSeconds().toString()).slice(-2);break;case"i":n=t.getMinutes(),n<10&&(n="0"+n);break;case"a":n=t.getHours()>11?"pm":"am";break;case"g":n=t.getHours(),0===n?n=12:n>12&&(n-=12);break;case"h":n=t.getHours(),0===n?n=12:n>12&&(n-=12),n=("0"+n.toString()).slice(-2);break;case"A":n=t.getHours()>11?"PM":"AM";break;case"G":n=t.getHours();break;case"H":n=t.getHours(),n=("0"+n.toString()).slice(-2);break;case"d":n=t.getDate(),n=("0"+n.toString()).slice(-2);break;case"j":n=t.getDate();break;case"l":n=e.get("__days")[t.getDay()];break;case"D":n=e.get("__daysShort")[t.getDay()];break;case"S":n="";break;case"m":n=t.getMonth()+1,n=("0"+n.toString()).slice(-2);break;case"n":n=t.getMonth()+1;break;case"F":n=e.get("__months")[t.getMonth()];break;case"M":n=e.get("__monthsShort")[t.getMonth()];break;case"y":n=t.getFullYear().toString().substr(2);break;case"Y":n=t.getFullYear();break;case"P":var l=t.getTimezoneOffset();n=l>0?"-":"+",l=Math.abs(l),n+=("0"+(~~(l/60)).toString()).slice(-2),n+=":",n+=("0"+(l%60).toString()).slice(-2);break;case"r":n=t.toString();break;case"U":n=Math.round(t.getTime()/1e3);break;case"\\":n="",r+1<a&&(n=i[++r]);break;default:n=i[r]}o+=n}return o},gmdate:function(e){return e instanceof Date||(e=new Date),
-Math.round(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDay(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())/1e3)},getTimeElement:function(t){var i=elCreate("time");i.className="datetime";var n=this.formatDate(t),o=this.formatTime(t);return elAttr(i,"datetime",this.format(t,"c")),elData(i,"timestamp",(t.getTime()-t.getMilliseconds())/1e3),elData(i,"date",n),elData(i,"time",o),elData(i,"offset",60*t.getTimezoneOffset()),t.getTime()>Date.now()&&(elData(i,"is-future-date","true"),i.textContent=e.get("wcf.date.dateTimeFormat").replace("%time%",o).replace("%date%",n)),i},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}}}),define("WoltLabSuite/Core/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError("Invalid delta "+t+". Delta must be in the interval [0, 86400000].");this._callback=e.bind(void 0,this),this._delta=t,this._timer=void 0,this.restart()}return e.prototype={restart:function(){this.stop(),this._timer=setInterval(this._callback,this._delta)},stop:function(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)},setDelta:function(e){this._delta=e,this.restart()}},e}),define("WoltLabSuite/Core/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLabSuite/Core/Date/Util","WoltLabSuite/Core/Timer/Repeating"],function(e,t,i,n){"use strict";var o=elByTag("time"),r=!0,a=!1,l=null;return{setup:function(){new n(this._refresh.bind(this),6e4),e.add("WoltLabSuite/Core/Date/Time/Relative",this._refresh.bind(this)),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this))},_onVisibilityChange:function(){document.hidden?(r=!1,a=!1):(r=!0,a&&(this._refresh(),a=!1))},_refresh:function(){if(!r)return void(a||(a=!0));var e=new Date,n=(e.getTime()-e.getMilliseconds())/1e3;null===l&&(l=n-window.TIME_NOW);for(var s=0,c=o.length;s<c;s++){var u=o[s];if(u.classList.contains("datetime")&&!elData(u,"is-future-date")){var d=~~elData(u,"timestamp")+l,h=elData(u,"date"),f=elData(u,"time"),p=elData(u,"offset");if(elAttr(u,"title")||elAttr(u,"title",t.get("wcf.date.dateTimeFormat").replace(/%date%/,h).replace(/%time%/,f)),d>=n||n<d+60)u.textContent=t.get("wcf.date.relative.now");else if(n<d+3540){var g=Math.max(Math.round((n-d)/60),1);u.textContent=t.get("wcf.date.relative.minutes",{minutes:g})}else if(n<d+86400){var m=Math.round((n-d)/3600);u.textContent=t.get("wcf.date.relative.hours",{hours:m})}else if(n<d+518400){var v=new Date(e.getFullYear(),e.getMonth(),e.getDate()),b=Math.ceil((v/1e3-d)/86400),_=i.getTimezoneDate(1e3*d,1e3*p),y=_.getDay(),w=t.get("__days")[y];u.textContent=t.get("wcf.date.relative.pastDays",{days:b,day:w,time:f})}else u.textContent=t.get("wcf.date.shortDateTimeFormat").replace(/%date%/,h).replace(/%time%/,f)}}}}}),define("WoltLabSuite/Core/Ui/Page/Menu/Abstract",["Core","Environment","EventHandler","Language","ObjectMap","Dom/Traverse","Dom/Util","Ui/Screen"],function(e,t,i,n,o,r,a,l){"use strict";function s(e,t,i){this.init(e,t,i)}var c=elById("pageContainer"),u="";return s.prototype={init:function(e,n,r){if("packageInstallationSetup"!==elData(document.body,"template")){this._activeList=[],this._depth=0,this._enabled=!0,this._eventIdentifier=e,this._items=new o,this._menu=elById(n),this._removeActiveList=!1;var l=this.open.bind(this);this._button=elBySel(r),this._button.addEventListener(WCF_CLICK_EVENT,l),this._initItems(),this._initHeader(),i.add(this._eventIdentifier,"open",l),i.add(this._eventIdentifier,"close",this.close.bind(this)),i.add(this._eventIdentifier,"updateButtonState",this._updateButtonState.bind(this));var s,c=elByClass("menuOverlayItemList",this._menu);this._menu.addEventListener("animationend",function(){if(!this._menu.classList.contains("open"))for(var e=0,t=c.length;e<t;e++)s=c[e],s.classList.remove("active"),s.classList.remove("hidden")}.bind(this)),this._menu.children[0].addEventListener("transitionend",function(){if(this._menu.classList.add("allowScroll"),this._removeActiveList){this._removeActiveList=!1;var e=this._activeList.pop();e&&e.classList.remove("activeList")}}.bind(this));var u=elCreate("div");u.className="menuOverlayMobileBackdrop",u.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),a.insertAfter(u,this._menu),this._updateButtonState(),"android"===t.platform()&&this._initializeAndroid()}},open:function(e){return!!this._enabled&&(e instanceof Event&&e.preventDefault(),this._menu.classList.add("open"),this._menu.classList.add("allowScroll"),this._menu.children[0].classList.add("activeList"),l.scrollDisable(),c.classList.add("menuOverlay-"+this._menu.id),l.pageOverlayOpen(),!0)},close:function(e){return e instanceof Event&&e.preventDefault(),!!this._menu.classList.contains("open")&&(this._menu.classList.remove("open"),l.scrollEnable(),l.pageOverlayClose(),c.classList.remove("menuOverlay-"+this._menu.id),!0)},enable:function(){this._enabled=!0},disable:function(){this._enabled=!1,this.close(!0)},_initializeAndroid:function(){var t,i,n;switch(this._menu.id){case"pageUserMenuMobile":t="right";break;case"pageMainMenuMobile":t="left";break;default:return}i=this._menu.nextElementSibling,n=null,document.addEventListener("touchstart",function(i){var o,r,a,s;if(o=i.touches,r=this._menu.classList.contains("open"),"left"===t?(a=!r&&o[0].clientX<20,s=r&&Math.abs(this._menu.offsetWidth-o[0].clientX)<20):"right"===t&&(a=r&&Math.abs(document.body.clientWidth-this._menu.offsetWidth-o[0].clientX)<20,s=!r&&document.body.clientWidth-o[0].clientX<20),o.length>1)return void(u&&e.triggerEvent(document,"touchend"));if(!u&&(a||s)){if(l.pageOverlayIsActive()){for(var d=!1,h=0;h<c.classList.length;h++)c.classList[h]==="menuOverlay-"+this._menu.id&&(d=!0);if(!d)return}document.documentElement.classList.contains("redactorActive")||(n={x:o[0].clientX,y:o[0].clientY},a&&(u="left"),s&&(u="right"))}}.bind(this)),document.addEventListener("touchend",function(e){if(u&&null!==n){if(!this._menu.classList.contains("open"))return n=null,void(u="");var o;o=e?e.changedTouches[0].clientX:n.x,this._menu.classList.add("androidMenuTouchEnd"),this._menu.style.removeProperty("transform"),i.style.removeProperty(t),this._menu.addEventListener("transitionend",function(){this._menu.classList.remove("androidMenuTouchEnd")}.bind(this),{once:!0}),"left"===t?("left"===u&&o<n.x+100&&this.close(),"right"===u&&o<n.x-100&&this.close()):"right"===t&&("left"===u&&o>n.x+100&&this.close(),"right"===u&&o>n.x-100&&this.close()),n=null,u=""}}.bind(this)),document.addEventListener("touchmove",function(e){if(u&&null!==n){var o=e.touches,r=!1,a=!1;"left"===u&&(r=o[0].clientX>n.x+5),"right"===u&&(r=o[0].clientX<n.x-5),a=Math.abs(o[0].clientY-n.y)>20;var l=this._menu.classList.contains("open");if(l||!r||a||(this.open(),l=!0),l){var s=o[0].clientX;"right"===t&&(s=document.body.clientWidth-s),s>this._menu.offsetWidth&&(s=this._menu.offsetWidth),s<0&&(s=0),this._menu.style.setProperty("transform","translateX("+("left"===t?1:-1)*(s-this._menu.offsetWidth)+"px)"),i.style.setProperty(t,Math.min(this._menu.offsetWidth,s)+"px")}}}.bind(this))},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var t=e.parentNode,n=elData(t,"more");if(n)return void e.addEventListener(WCF_CLICK_EVENT,function(o){o.preventDefault(),o.stopPropagation(),i.fire(this._eventIdentifier,"more",{handler:this,identifier:n,item:e,parent:t})}.bind(this));var o,a=e.nextElementSibling;if(null!==a)if("OL"!==a.nodeName&&a.classList.contains("menuOverlayItemLinkIcon"))for(o=elCreate("span"),o.className="menuOverlayItemWrapper",t.insertBefore(o,e),o.appendChild(e);o.nextElementSibling;)o.appendChild(o.nextElementSibling);else{var l="#"!==elAttr(e,"href"),s=t.parentNode,c=elData(a,"title");this._items.set(e,{itemList:a,parentItemList:s}),""===c&&(c=r.childByClass(e,"menuOverlayItemTitle").textContent,elData(a,"title",c));var u=this._showItemList.bind(this,e);if(l){o=elCreate("span"),o.className="menuOverlayItemWrapper",t.insertBefore(o,e),o.appendChild(e);var d=elCreate("a");elAttr(d,"href","#"),d.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),d.innerHTML='<span class="icon icon24 fa-angle-right"></span>',d.addEventListener(WCF_CLICK_EVENT,u),o.appendChild(d)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,u);var h=elCreate("li");h.className="menuOverlayHeader",o=elCreate("span"),o.className="menuOverlayItemWrapper";var f=elCreate("a");elAttr(f,"href","#"),f.className="menuOverlayItemLink menuOverlayBackLink",f.textContent=elData(s,"title"),f.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var p=elCreate("a");if(elAttr(p,"href","#"),p.className="menuOverlayItemLinkIcon",p.innerHTML='<span class="icon icon24 fa-times"></span>',p.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),o.appendChild(f),o.appendChild(p),h.appendChild(o),a.insertBefore(h,a.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var g=elCreate("li");g.className="menuOverlayTitle";var m=elCreate("span");m.textContent=c,g.appendChild(m),a.insertBefore(g,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var i=elCreate("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);var n=elCreate("span");n.className="menuOverlayLogo",n.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(n);var o=elCreate("a");elAttr(o,"href","#"),o.className="menuOverlayItemLinkIcon",o.innerHTML='<span class="icon icon24 fa-times"></span>',o.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(o);var a=r.childByClass(this._menu,"menuOverlayItemList");a.insertBefore(e,a.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0,this._items.get(e).parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,t){t instanceof Event&&t.preventDefault();var n=this._items.get(e),o=elData(n.itemList,"load");if(o&&!elDataBool(e,"loaded")){var r=t.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void i.fire(this._eventIdentifier,"load_"+o)}this._menu.classList.remove("allowScroll"),n.itemList.classList.add("activeList"),n.parentItemList.classList.add("hidden"),this._activeList.push(n.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1;var t=-100*this._depth;"rtl"===n.get("wcf.global.pageDirection")&&(t*=-1),this._menu.children[0].style.setProperty("transform","translateX("+t+"%)","")},_updateButtonState:function(){var e=!1,t=elBySel(".menuOverlayItemList",this._menu);elBySelAll(".badgeUpdate",this._menu,function(i){~~i.textContent>0&&i.closest(".menuOverlayItemList")===t&&(e=!0)}),this._button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}},s}),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["Core","Language","Dom/Traverse","./Abstract"],function(e,t,i,n){"use strict";function o(){this.init()}var r=null,a=null,l=null,s=null,c=null;return e.inherit(o,n,{init:function(){o._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),r=elById("pageMainMenuMobilePageOptionsTitle"),null!==r&&(l=i.childByClass(r,"menuOverlayItemList"),s=elBySel(".jsPageNavigationIcons"),c=function(e){this.close(),e.stopPropagation()}.bind(this)),elAttr(this._button,"aria-label",t.get("wcf.menu.page")),elAttr(this._button,"role","button")},open:function(e){if(!o._super.prototype.open.call(this,e))return!1;if(null===r)return!0;if(a=s&&s.childElementCount>0){for(var t,i;s.childElementCount;)t=s.children[0],t.classList.add("menuOverlayItem"),t.classList.add("menuOverlayItemOption"),t.addEventListener(WCF_CLICK_EVENT,c),i=t.children[0],i.classList.add("menuOverlayItemLink"),i.classList.add("box24"),i.children[1].classList.remove("invisible"),i.children[1].classList.add("menuOverlayItemTitle"),r.parentNode.insertBefore(t,r.nextSibling);elShow(r)}else elHide(r);return!0},close:function(e){if(!o._super.prototype.close.call(this,e))return!1;if(a){elHide(r);for(var t,i=r.nextElementSibling;i&&i.classList.contains("menuOverlayItemOption");)i.classList.remove("menuOverlayItem"),i.classList.remove("menuOverlayItemOption"),i.removeEventListener(WCF_CLICK_EVENT,c),t=i.children[0],t.classList.remove("menuOverlayItemLink"),t.classList.remove("box24"),t.children[1].classList.add("invisible"),t.children[1].classList.remove("menuOverlayItemTitle"),s.appendChild(i),i=i.nextElementSibling}return!0}}),o}),define("WoltLabSuite/Core/Ui/Page/Menu/User",["Core","EventHandler","Language","./Abstract"],function(e,t,i,n){"use strict";function o(){this.init()}return e.inherit(o,n,{init:function(){var e=elBySel("#pageUserMenuMobile > .menuOverlayItemList");if(1===e.childElementCount&&e.children[0].classList.contains("menuOverlayTitle"))return void elBySel("#pageHeader .userPanel").classList.add("hideUserPanel");o._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),t.add("com.woltlab.wcf.userMenu","updateBadge",function(e){elBySelAll(".menuOverlayItemBadge",this._menu,function(t){if(elData(t,"badge-identifier")===e.identifier){var i=elBySel(".badge",t);e.count?(null===i&&(i=elCreate("span"),i.className="badge badgeUpdate",t.appendChild(i)),i.textContent=e.count):null!==i&&elRemove(i),this._updateButtonState()}}.bind(this))}.bind(this)),elAttr(this._button,"aria-label",i.get("wcf.menu.user")),elAttr(this._button,"role","button")},close:function(e){if(void 0!==this._menu){var t=WCF.Dropdown.Interactive.Handler.getOpenDropdown();t?(e.preventDefault(),e.stopPropagation(),t.close()):o._super.prototype.close.call(this,e)}}}),o}),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["Dictionary","Ui/SimpleDropdown"],function(e,t){"use strict";function i(e){if(!n.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return n.get(e)}var n=new e,o=0;return{init:function(e,i){if(!n.has(e)){var r=elCreate("div");r.id="reusableDropdownGhost"+o++,t.initFragment(r,i),n.set(e,r.id)}},getDropdownMenu:function(e){return t.getDropdownMenu(i(e))},registerCallback:function(e,n){t.registerCallback(i(e),n)},toggleDropdown:function(e,n){t.toggleDropdown(i(e),n)}}}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Alignment","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User","WoltLabSuite/Core/Ui/Dropdown/Reusable"],function(e,t,i,n,o,r,a,l,s,c,u,d,h,f){"use strict";var p=elByClass("buttonGroupNavigation"),g=null,m=null,v=null,b=!1,_=!1,y=new o,w=null,C=elByClass("message"),E=!1,L={},A=null,S=null,x=null,I=[];return{setup:function(i){L=e.extend({enableMobileMenu:!0},i),w=elById("main"),elBySelAll(".sidebar",void 0,function(e){I.push(e)}),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile");var n=elBySel(".messageGroupList");n&&(x=elByClass("messageGroup",n)),u.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)}),u.on("screen-sm-down",{match:this.enableShadow.bind(this),unmatch:this.disableShadow.bind(this),setup:this.enableShadow.bind(this)}),u.on("screen-md-down",{match:this._enableMobileSidebar.bind(this),unmatch:this._disableMobileSidebar.bind(this),setup:this._setupMobileSidebar.bind(this)}),!t.touch()||"ios"!==t.platform()&&"android"!==t.platform()||u.on("screen-lg",{match:this._enableLGTouchNavigation.bind(this),unmatch:this._disableLGTouchNavigation.bind(this),setup:this._setupLGTouchNavigation.bind(this)})},enable:function(){b=!0,L.enableMobileMenu&&(A.enable(),S.enable())},enableShadow:function(){x&&this.rebuildShadow(x,".messageGroupLink")},disable:function(){b=!1,L.enableMobileMenu&&(A.disable(),S.disable())},disableShadow:function(){x&&this.removeShadow(x),m&&g()},_init:function(){b=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),c.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),r.add("WoltLabSuite/Core/Ui/Mobile",function(){this._initButtonGroupNavigation(),this._initMessages()}.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),n=elById("pageHeaderSearchInput"),o=null;i.add("com.woltlab.wcf.MainMenuMobile","more",function(i){"com.woltlab.wcf.search"===i.identifier&&(i.handler.close(!0),"ios"===t.platform()&&(o=document.body.scrollTop,u.scrollDisable()),e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),n.focus(),"ios"===t.platform()&&(document.body.scrollTop=0))}),w.addEventListener(WCF_CLICK_EVENT,function(){e&&e.classList.remove("open"),"ios"===t.platform()&&null!==o&&(u.scrollEnable(),document.body.scrollTop=o,o=null)})},_initButtonGroupNavigation:function(){for(var e=0,t=p.length;e<t;e++){var i=p[e];if(!i.classList.contains("jsMobileButtonGroupNavigation")){i.classList.add("jsMobileButtonGroupNavigation");var n=elBySel(".buttonList",i);if(0!==n.childElementCount){i.parentNode.classList.add("hasMobileNavigation");var o=elCreate("a");o.className="dropdownLabel";var r=elCreate("span");r.className="icon icon24 fa-ellipsis-v",o.appendChild(r),function(e,t,i){t.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),e.classList.toggle("open")}),i.addEventListener(WCF_CLICK_EVENT,function(t){t.stopPropagation(),e.classList.remove("open")})}(i,o,n),i.insertBefore(o,i.firstChild)}}}},_initMessages:function(){Array.prototype.forEach.call(C,function(e){if(!y.has(e)){var t=elBySel(".jsMobileNavigation",e);if(t){t.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation(),window.setTimeout(function(){t.classList.remove("open")},10)});var i=elBySel(".messageQuickOptions",e);i&&t.childElementCount&&(i.classList.add("active"),i.addEventListener(WCF_CLICK_EVENT,function(n){b&&u.is("screen-sm-down")&&"LABEL"!==n.target.nodeName&&"INPUT"!==n.target.nodeName&&(n.preventDefault(),n.stopPropagation(),this._toggleMobileNavigation(e,i,t))}.bind(this)))}y.add(e)}}.bind(this))},_initMobileMenu:function(){L.enableMobileMenu&&(A=new d,S=new h)},_closeAllMenus:function(){elBySelAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open",null,function(e){e.classList.remove("open")}),b&&m&&g()},rebuildShadow:function(e,t){for(var i,n,o,r=0,l=e.length;r<l;r++)i=e[r],n=i.parentNode,null===(o=a.childByClass(n,"mobileLinkShadow"))&&elBySel(t,i).href&&(o=elCreate("a"),o.className="mobileLinkShadow",o.href=elBySel(t,i).href,n.appendChild(o),n.classList.add("mobileLinkShadowContainer"))},removeShadow:function(e){for(var t,i,n,o=0,r=e.length;o<r;o++)t=e[o],i=t.parentNode,i.classList.contains("mobileLinkShadowContainer")&&(n=a.childByClass(i,"mobileLinkShadow"),null!==n&&elRemove(n),i.classList.remove("mobileLinkShadowContainer"))},_enableMobileSidebar:function(){E=!0},_disableMobileSidebar:function(){E=!1,I.forEach(function(e){e.classList.remove("open")})},_setupMobileSidebar:function(){I.forEach(function(e){e.addEventListener("mousedown",function(t){E&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))})}),E=!0},_toggleMobileNavigation:function(e,t,i){if(null===m)m=elCreate("ul"),m.className="dropdownMenu",f.init("com.woltlab.wcf.jsMobileNavigation",m),g=function(){m.classList.remove("dropdownOpen")};else if(m.classList.contains("dropdownOpen")&&(g(),v===e))return;m.innerHTML="",c.execute(),this._rebuildMobileNavigation(i);var n=i.previousElementSibling;if(n&&n.classList.contains("messageFooterButtonsExtra")){var o=elCreate("li");o.className="dropdownDivider",m.appendChild(o),this._rebuildMobileNavigation(n)}s.set(m,t,{horizontal:"right",allowFlip:"vertical"}),m.classList.add("dropdownOpen"),v=e},_setupLGTouchNavigation:function(){_=!0,elBySelAll(".boxMenuHasChildren > a",null,function(e){e.addEventListener("touchstart",function(t){_&&"false"===elAttr(e,"aria-expanded")&&(t.preventDefault(),elAttr(e,"aria-expanded","true"),e.addEventListener("touchend",function(){document.body.addEventListener("touchstart",function(){document.body.addEventListener("touchend",function(t){l.contains(e.parentNode,t.target)||t.target===e.parentNode||elAttr(e,"aria-expanded","false")},{once:!0})},{once:!0})},{once:!0}))})})},_enableLGTouchNavigation:function(){_=!0},_disableLGTouchNavigation:function(){_=!1},_rebuildMobileNavigation:function(t){elBySelAll(".button",t,function(t){if(!t.classList.contains("ignoreMobileNavigation")||t.classList.contains("reactButton")){var i=elCreate("li");t.classList.contains("active")&&(i.className="active"),i.innerHTML='<a href="#">'+elBySel("span:not(.icon)",t).textContent+"</a>",i.children[0].addEventListener(WCF_CLICK_EVENT,function(i){i.preventDefault(),i.stopPropagation(),"A"===t.nodeName?t.click():e.triggerEvent(t,WCF_CLICK_EVENT),g()}),m.appendChild(i)}})}}}),define("WoltLabSuite/Core/Ui/Scroll",["Dom/Util"],function(e){"use strict";var t=null,i=null,n=null,o=null;return{element:function(o,r){if(!(o instanceof Element))throw new TypeError("Expected a valid DOM element.");if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(o))throw new Error("Element must be part of the visible DOM.");if(null!==t)throw new Error("Cannot scroll to element, a concurrent request is running.");r&&(t=r,null===i&&(i=this._onScroll.bind(this)),window.addEventListener("scroll",i));var a=e.offset(o).top;if(null===n){n=50;var l=elById("pageHeaderPanel");if(null!==l){var s=window.getComputedStyle(l).position;n="fixed"===s||"static"===s?l.offsetHeight:0}}n>0&&(a<=n?a=0:a-=n);var c=window.pageYOffset;window.scrollTo({left:0,top:a,behavior:"smooth"}),window.setTimeout(function(){c===window.pageYOffset&&this._onScroll()}.bind(this),100)},_onScroll:function(){null!==o&&window.clearTimeout(o),o=window.setTimeout(function(){null!==t&&t(),window.removeEventListener("scroll",i),t=null,o=null},100)}}}),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["Dictionary","Environment","EventHandler","Dom/Traverse","Dom/Util"],function(e,t,i,n,o){"use strict";function r(t){this._container=t,this._containers=new e,this._isLegacy=null,this._store=null,this._tabs=new e}return r.prototype={validate:function(){if(!this._container.classList.contains("tabMenuContainer"))return!1;var e=n.childByTag(this._container,"NAV");if(null===e)return!1;var t=elByTag("li",e);if(0===t.length)return!1;var i,r,a,l,s=n.childrenByTag(this._container,"DIV");for(a=0,l=s.length;a<l;a++)i=s[a],r=elData(i,"name"),r||(r=o.identify(i)),elData(i,"name",r),this._containers.set(r,i);var c,u=this._container.id;for(a=0,l=t.length;a<l;a++)if(c=t[a],r=this._getTabName(c)){if(this._tabs.has(r))throw new Error("Tab names must be unique, li[data-name='"+r+"'] (tab menu id: '"+u+"') exists more than once.");if(void 0===(i=this._containers.get(r)))throw new Error("Expected content element for li[data-name='"+r+"'] (tab menu id: '"+u+"').");if(i.parentNode!==this._container)throw new Error("Expected content element '"+r+"' (tab menu id: '"+u+"') to be a direct children.");if(1!==c.childElementCount||"A"!==c.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+r+"'] (tab menu id: '"+u+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+u+"').");return this._isLegacy&&(elData(this._container,"is-legacy",!0),this._tabs.forEach(function(e,t){elAttr(e,"aria-controls",t)})),!0},init:function(e){e=e||null,this._tabs.forEach(function(i){if((!e||e.get(elData(i,"name"))!==i)&&(i.children[0].addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this)),"ios"===t.platform())){var n=!1;i.children[0].addEventListener("touchstart",function(){n=!0}),i.children[0].addEventListener("touchmove",function(){n=!1}),i.children[0].addEventListener("touchend",function(e){n&&(n=!1,e.preventDefault(),this._onClick(e))}.bind(this))}}.bind(this));var i=null;if(!e){var n=r.getIdentifierFromHash(),o=null;if(""!==n&&(o=this._tabs.get(n))&&this._container.parentNode.classList.contains("tabMenuContainer")&&(i=this._container),!o){var a=elData(this._container,"preselect")||elData(this._container,"active");"true"!==a&&a||(a=!0),!0===a?this._tabs.forEach(function(e){o||elIsHidden(e)||e.previousElementSibling&&!elIsHidden(e.previousElementSibling)||(o=e)}):"false"!==a&&(o=this._tabs.get(a))}o&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,o,!0));var l=elData(this._container,"store");if(l){var s=elCreate("input");s.type="hidden",s.name=l,s.value=elData(this.getActiveTab(),"name"),this._container.appendChild(s),this._store=s}}return i},select:function(e,t,n){if(!(t=t||this._tabs.get(e))){if(~~e==e){e=~~e;var o=0;this._tabs.forEach(function(i){o===e&&(t=i),o++})}if(!t)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elData(t,"name");var a=this.getActiveTab(),l=null;if(a){var s=elData(a,"name");if(s===e)return;n||i.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"beforeSelect",{tab:a,tabName:s}),a.classList.remove("active"),l=this._containers.get(elData(a,"name")),l.classList.remove("active"),l.classList.add("hidden"),this._isLegacy&&(a.classList.remove("ui-state-active"),l.classList.remove("ui-state-active"))}t.classList.add("active");var c=this._containers.get(e);if(c.classList.add("active"),c.classList.remove("hidden"),this._isLegacy&&(t.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this._store&&(this._store.value=e),!n){i.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:t,activeName:e,previous:a,previousName:a?elData(a,"name"):null});var u=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;u&&u(this._container).trigger("wcftabsbeforeactivate",{newTab:u(t),oldTab:u(a),newPanel:u(c),oldPanel:u(l)});var d=window.location.href.replace(/#+[^#]*$/,"");r.getIdentifierFromHash()===e?d+=window.location.hash:d+="#"+e,window.history.replaceState(void 0,void 0,d)}require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.scrollToTab(t)})},selectFirstVisible:function(){var e;return this._tabs.forEach(function(t){e||elIsHidden(t)||(e=t)}.bind(this)),e&&this.select(void 0,e,!1),!!e},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},hasTab:function(e){return this._tabs.has(e)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"name");return t||1===e.childElementCount&&"A"===e.children[0].nodeName&&e.children[0].href.match(/#([^#]+)$/)&&(t=RegExp.$1,null===elById(t)?t=null:(this._isLegacy=!0,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},r.getIdentifierFromHash=function(){return window.location.hash.match(/^#+([^\/]+)+(?:\/.+)?/)?RegExp.$1:""},r}),define("WoltLabSuite/Core/Ui/TabMenu",["Dictionary","EventHandler","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","Ui/Screen","Ui/Scroll","./TabMenu/Simple"],function(e,t,i,n,o,r,a,l){"use strict";var s=null,c=!1,u=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),i.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),o.add("WoltLabSuite/Core/Ui/TabMenu",function(){s&&(s.classList.remove("active"),s=null)}),r.on("screen-sm-down",{enable:this._scrollEnable.bind(this,!1),disable:this._scrollDisable.bind(this),setup:this._scrollEnable.bind(this,!0)}),window.addEventListener("hashchange",function(){var e=l.getIdentifierFromHash(),t=e?elById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&u.forEach(function(t){t.hasTab(e)&&t.select(e)})});var e=l.getIdentifierFromHash();e&&window.setTimeout(function(){var t=elById(e);if(t&&t.classList.contains("tabMenuContent")){var i=window.scrollY||window.pageYOffset;if(i>0){var o=t.parentNode,r=o.offsetTop-50;if(r<0&&(r=0),i>r){var a=n.offset(o).top;a<=50?a=0:a-=50,window.scrollTo(0,a)}}}},100)},_init:function(){for(var e,t,i,o,r,c=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),d=0,h=c.length;d<h;d++)if(e=c[d],t=n.identify(e),!u.has(t)&&(r=new l(e),r.validate())){o=r.init(),u.set(t,r),o instanceof Element&&(r=this.getTabMenu(o.parentNode.id),r.select(o.id,null,!0)),i=elBySel("#"+t+" > nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),s=e):(e.classList.remove("active"),s=null)})}(i),elBySelAll(".tabMenu, .menu",e,function(e){var t=this._rebuildMenuOverflow.bind(this,e),i=null;elBySel("ul",e).addEventListener("scroll",function(){null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)})}.bind(this));var f=e.closest("form");if(null!==f){var p=elBySel('input[type="submit"]',f);null!==p&&function(e,t){t.addEventListener(WCF_CLICK_EVENT,function(t){if(!t.defaultPrevented)for(var i,n=elBySelAll("input, select",e),o=0,r=n.length;o<r;o++)if(i=n[o],!i.checkValidity()){t.preventDefault();var l=this.getTabMenu(i.closest(".tabMenuContainer").id);return l.select(elData(i.closest(".tabMenuContent"),"name")),void a.element(i,function(){this.reportValidity()}.bind(i))}}.bind(this))}.bind(this)(e,p)}}},_selectErroneousTabs:function(){u.forEach(function(e){var t=!1;e.getContainers().forEach(function(i){!t&&elByClass("formError",i).length&&(t=!0,e.select(i.id))})})},getTabMenu:function(e){return u.get(e)},_scrollEnable:function(e){c=!0,u.forEach(function(t){var i=t.getActiveTab();e?this._rebuildMenuOverflow(i.closest(".menu, .tabMenu")):this.scrollToTab(i)}.bind(this))},_scrollDisable:function(){c=!1},scrollToTab:function(e){if(c){var t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,o=t.scrollWidth;if(i!==o){var r=e.offsetLeft,a=!1;r<n&&(a=!0);var l=!1;if(!a){var s=i-(r-n),u=e.clientWidth;null!==e.nextElementSibling&&(l=!0,u+=20),s<u&&(a=!0)}a&&this._scrollMenu(t,r,n,o,i,l)}}},_scrollMenu:function(e,t,i,n,o,r){r?t-=15:t>0&&(t-=15),t=t<0?0:Math.min(t,n-o),i!==t&&(e.classList.add("enableAnimation"),i<t?e.firstElementChild.style.setProperty("margin-left",i-t+"px",""):e.style.setProperty("padding-left",i-t+"px",""),setTimeout(function(){e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t},300))},_rebuildMenuOverflow:function(e){if(c){var t=e.clientWidth,i=elBySel("ul",e),n=i.scrollLeft,o=i.scrollWidth,r=n>0,a=elBySel(".tabMenuOverlayLeft",e);r?(null===a&&(a=elCreate("span"),a.className="tabMenuOverlayLeft icon icon24 fa-angle-left",a.addEventListener(WCF_CLICK_EVENT,function(){var e=i.clientWidth;this._scrollMenu(i,i.scrollLeft-~~(e/2),i.scrollLeft,i.scrollWidth,e,0)}.bind(this)),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");var l=t+n<o,s=elBySel(".tabMenuOverlayRight",e);l?(null===s&&(s=elCreate("span"),s.className="tabMenuOverlayRight icon icon24 fa-angle-right",s.addEventListener(WCF_CLICK_EVENT,function(){var e=i.clientWidth;this._scrollMenu(i,i.scrollLeft+~~(e/2),i.scrollLeft,i.scrollWidth,e,0)}.bind(this)),e.appendChild(s)),s.classList.add("active")):null!==s&&s.classList.remove("active")}}}}),define("WoltLabSuite/Core/Ui/FlexibleMenu",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,o,r){"use strict";var a=new t,l=new t,s=new t,c=new t;return{setup:function(){null!==elById("mainMenu")&&this.register("mainMenu");var e=elBySel(".navigationHeader")
-;null!==e&&this.register(o.identify(e)),window.addEventListener("resize",this.rebuildAll.bind(this)),i.add("WoltLabSuite/Core/Ui/FlexibleMenu",this.registerTabMenus.bind(this))},register:function(e){var t=elById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(!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,s=window.debounce(function(){l=-1},50,!1);return{setup:function(){if(!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);var e=window.debounce(this._onScroll.bind(this),100,!1);window.addEventListener("scroll",function(){-1===l&&(l=window.pageYOffset,window.setTimeout(function(){this._onScroll(),l=window.pageYOffset}.bind(this),60)),e()}.bind(this),{passive:!0}),window.addEventListener("touchstart",function(){-1!==l&&(l=-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(){if(!document.documentElement.classList.contains("disableScrolling")){var e=window.pageYOffset;if(e===l)return void s();e>=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[e<l?"remove":"add"]("scrolledDown"),l=-1}},_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,"&").replace(/</g,"<").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,""")+'"';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";function e(e){return e===i||e===n||e===o}var t={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},i="Exif",n="http://ns.adobe.com/xap/1.0/",o="http://ns.adobe.com/xmp/extension/";return{getExifBytesFromJpeg:function(i){return new Promise(function(n,o){if(!(i instanceof Blob||i instanceof File))return o(new TypeError("The argument must be a Blob or a File"));var r=new FileReader;r.addEventListener("error",function(){r.abort(),o(r.error)}),r.addEventListener("load",function(){var i=r.result,a=new Uint8Array(i),l=new Uint8Array;if(255!==a[0]&&a[1]!==t.SOI)return o(new Error("Not a JPEG"));for(var s=2;s<a.length&&255===a[s];){var c=2+(a[s+2]<<8|a[s+3]);if(a[s+1]===t.APP1){for(var u="",d=s+4;0!==a[d]&&d<a.length;d++)u+=String.fromCharCode(a[d]);if(e(u)){var h=Array.prototype.slice.call(a,s,c+s),f=new Uint8Array(l.length+h.length);f.set(l),f.set(h,l.length),l=f}}s+=c}n(l)}),r.readAsArrayBuffer(i)})},removeExifData:function(i){return new Promise(function(n,o){if(!(i instanceof Blob||i instanceof File))return o(new TypeError("The argument must be a Blob or a File"));var r=new FileReader;r.addEventListener("error",function(){r.abort(),o(r.error)}),r.addEventListener("load",function(){var a=r.result,l=new Uint8Array(a);if(255!==l[0]&&l[1]!==t.SOI)return o(new Error("Not a JPEG"));for(var s=2;s<l.length&&255===l[s];){var c=2+(l[s+2]<<8|l[s+3]);if(l[s+1]===t.APP1){for(var u="",d=s+4;0!==l[d]&&d<l.length;d++)u+=String.fromCharCode(l[d]);if(e(u)){var h=Array.prototype.slice.call(l,0,s),f=Array.prototype.slice.call(l,s+c);l=new Uint8Array(h.length+f.length),l.set(h,0),l.set(f,h.length)}else s+=c}else s+=c}n(new Blob([l],{type:i.type}))}),r.readAsArrayBuffer(i)})},setExifData:function(e,i){
-return this.removeExifData(e).then(function(e){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]===t.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:e.type}))}),o.readAsArrayBuffer(e)})})}}}),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")+'">…</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/Util","ObjectMap"],function(e,t,i,n,o,r){"use strict";var a=!1,l=!0,s=new n,c=new e,u=new n,d=new e,h=new r;return{_hide:function(t){elHide(t),s.add(t),
-t.classList.contains("tabMenuContent")&&elBySelAll("li",t.parentNode.querySelector(".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")),h.set(t,i)})},_show:function(e){elShow(e),s.delete(e),e.classList.contains("tabMenuContent")&&elBySelAll("li",e.parentNode.querySelector(".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&&h.has(t)){var n=h.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",""),h.delete(t)}})},addDependency:function(e){var t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]);for(var i=e.getFields(),n=0,r=i.length;n<r;n++){var a=i[n],l=o.identify(a);c.has(l)||(c.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=[];d.forEach(function(t,i){var n=elById(i);if(null===n)return void e.push(i);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++)d.delete(e[t]);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===a)return void(l=!0);a=!0,l=!1,i.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),a=!1,l&&this.checkContainers()},isHiddenByDependencies:function(e){if(s.has(e))return!0;var t=!1;return s.forEach(function(i){o.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),s.forEach(function(e){t.contains(e)&&s.delete(e)}),d.forEach(function(e,i){t.contains(elById(i))&&d.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];c.delete(s.id),h.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 n=t.getId();if(this.hasField(e,n))throw new Error("Form field with id '"+n+"' has already been registered for form with id '"+e+"'.");r.get(e).set(n,t),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},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.checked=!1,this.isPublicNoField.checked=!0,this.resultsRequireVoteYesField.checked=!1,this.resultsRequireVoteNoField.checked=!0,this.sortByVotesYesField.checked=!1,this.sortByVotesNoField.checked=!0,i.fire("com.woltlab.wcf.poll.editor","reset",{pollEditor:this})},_submit:function(e){if(this._options.isAjax)e.poll=this.getData(),i.fire("com.woltlab.wcf.poll.editor","submit",{event:e,pollEditor:this});else for(var t=this._container.closest("form"),n=this.getOptions(),o=0,r=n.length;o<r;o++){var a=elCreate("input");elAttr(a,"type","hidden"),elAttr(a,"name",this._wysiwygId+"Poll_options["+o+"]"),a.value=n[o],t.appendChild(a)}},_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})}}},getData:function(){var e={};return e[this.questionField.id]=this.questionField.value,e[this._wysiwygId+"Poll_options"]=this.getOptions(),e[this.endTimeField.id]=this.endTimeField.value,e[this.maxVotesField.id]=this.maxVotesField.value,e[this.isChangeableYesField.id]=!!this.isChangeableYesField.checked,e[this.isPublicYesField.id]=!!this.isPublicYesField.checked,e[this.resultsRequireVoteYesField.id]=!!this.resultsRequireVoteYesField.checked,e[this.sortByVotesYesField.id]=!!this.sortByVotesYesField.checked,e},getOptions:function(){for(var e=[],t=0,i=this.optionList.children.length;t<i;t++){
-var n=this.optionList.children[t],o=elBySel("input[type=text]",n).value.trim();""!==o&&e.push(elData(n,"option-id")+"_"+o)}return e}},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/Wysiwyg/Poll",["Core","../Field"],function(e,t){"use strict";function i(e){this.init(e)}return e.inherit(i,t,{_getData:function(){return this._pollEditor.getData()},_readField:function(){},setPollEditor:function(e){this._pollEditor=e}}),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
+var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__createBinding,_self,Prism;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,(function(t,o){!i&&hasProp(e,o)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,i){var n,o,a,r,s,l,c,d,u,h,p=t&&t.split("/"),m=I.map,f=m&&m["*"];if(e&&(l=(e=e.split("/")).length-1,I.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),function(e){var t,i,n=e.length;for(t=0;t<n;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&m&&(p||f)){e:for(a=(o=e.split("/")).length;a>0;a-=1){if(s=o.slice(0,a).join("/"),p)for(r=p.length;r>0;r-=1)if((n=getOwn(m,p.slice(0,r).join("/")))&&(n=getOwn(n,s))){c=n,d=a;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),h=a)}!c&&u&&(c=u,d=h),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(I.pkgs,e)||e}function i(e){var t,i,n,o;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}t-=1,(i=(n=queue.shift())[0])in L||i in A||(i in D?b.apply(undef,n):A[i]=n)}e&&(o=getOwn(I.shim,e)||{},b(e,o.deps||[],o.exportsFn))}function n(e,n){var o=function(t,a,r,s){var l,c;if(n&&i(),"string"==typeof t){if(y[t])return y[t](e);if(!((l=v(t,e,!0).id)in L))throw new Error("Not loaded: "+l);return L[l]}return t&&!Array.isArray(t)&&(c=t,t=undef,Array.isArray(a)&&(t=a,a=r,r=s),n)?o.config(c)(t,a,r):(a=a||function(){return slice.call(arguments,0)},U.then((function(){return i(),b(undef,t||[],a,r,e)})))};return o.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,o.nameToUrl=function(e,t,i){var n,a,r,s,l,c,d=getOwn(I.pkgs,e);if(d&&(e=d),c=getOwn(O,e))return o.nameToUrl(c,t,i);if(urlRegExp.test(e))s=e+(t||"");else{for(n=I.paths,r=(a=e.split("/")).length;r>0;r-=1)if(l=getOwn(n,a.slice(0,r).join("/"))){Array.isArray(l)&&(l=l[0]),a.splice(0,r,l);break}s=a.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":I.baseUrl)+s}return I.urlArgs&&!/^blob\:/.test(s)?s+I.urlArgs(e,s):s},o.toUrl=function(i){var n,a=i.lastIndexOf("."),r=i.split("/")[0];return-1!==a&&(!("."===r||".."===r)||a>1)&&(n=i.substring(a,i.length),i=i.substring(0,a)),o.nameToUrl(t(i,e),n,!0)},o.defined=function(t){return v(t,e,!0).id in L},o.specified=function(t){return(t=v(t,e,!0).id)in L||t in D},o}function o(e,t,i){e&&(L[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(C,t.map,t.deps)),t.finished=!0,t.resolve(i)}function a(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function r(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=C.execCb(i,e.factory,e.values,L[i])}catch(t){return a(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=L[i])):k.splice(k.indexOf(e),1),o(i,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||r(this))}function l(e,t){var i={};return i.promise=new Promise((function(t,n){i.resolve=t,i.reject=function(t){e||k.splice(k.indexOf(i),1),n(t)}})),i.map=e?t||v(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=s,i.map.pr&&(i.deps=[v(i.map.pr)]),i}function c(e,t){var i;return e?(i=e in D&&D[e])||(i=D[e]=l(e,t)):(i=l(),k.push(i)),i}function d(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(P+=1),i.requireModules=[t]),a(e,i))}}function u(e,t,i,n){i.depMax+=1,w(e,t).then((function(e){i.depFinished(e,n)}),d(i,e.id)).catch(d(i,i.map.id))}function h(e,t,r){e.load(t.n,n(r),function(e){function t(t){n||o(e,c(e),t)}var n;return t.error=function(t){c(e).reject(t)},t.fromText=function(t,o){var r=c(e),s=v(v(e).n),l=s.id;n=!0,r.factory=function(e,t){return t},o&&(t=o),hasProp(I.config,e)&&(I.config[l]=I.config[e]);try{_.exec(t)}catch(e){a(r,new Error("fromText eval for "+l+" failed: "+e))}i(l),r.deps=[s],u(s,null,r,r.deps.length)},t}(t.id),I)}function p(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function m(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach((function(n){var o=n.id,a=!hasProp(y,o)&&c(o,n);!a||a.finished||i[o]||(hasProp(t,o)?e.deps.forEach((function(t,i){t.id===o&&e.depFinished(L[o],i)})):m(a,t,i))})),i[n]=!0}function f(e){var t,i,n,o=[],a=1e3*I.waitSeconds,r=a&&j+a<(new Date).getTime();if(0===B&&(e?e.finished||m(e,{},{}):k.length&&k.forEach((function(e){m(e,{},{})}))),r){for(i in D)(n=D[i]).finished||o.push(n.map.id);(t=new Error("Timeout for modules: "+o)).requireModules=o,_.onError(t)}else(B||k.length)&&(E||(E=!0,setTimeout((function(){E=!1,f()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&N[e.dynaId]||(N[e.dynaId]=!0,_.onError(e))})),e}var _,b,v,w,y,E,S,C,L=obj(),A=obj(),I={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},x=obj(),k=[],D=obj(),M=obj(),T=obj(),B=0,j=(new Date).getTime(),P=0,N=obj(),q=obj(),O=obj(),U=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;q[t]||(q[t]=!0,c(e.id),importScripts(t),i(e.id))}:function(e){var t,n=e.id,o=e.url;q[o]||(q[o]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",n),t.type=I.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,B+=1,t.addEventListener("load",(function(){B-=1,i(n)}),!1),t.addEventListener("error",(function(){var e,i,o;B-=1,(i=getOwn(I.paths,n))&&Array.isArray(i)&&i.length>1?(t.parentNode.removeChild(t),i.shift(),(o=c(n)).map=v(n),o.map.url=_.nameToUrl(n),S(o.map)):((e=new Error("Load failed: "+n+": "+t.src)).requireModules=[n],c(n).reject(e))}),!1),t.src=o,10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},w=function(e,t){var i,n,o=e.id,a=I.shim[o];if(o in A)i=A[o],delete A[o],b.apply(undef,i);else if(!(o in D))if(e.pr){if(!(n=getOwn(O,o)))return w(v(e.pr)).then((function(i){var n=e.prn?e:v(o,t,!0),a=n.id,r=getOwn(I.shim,a);return a in T||(T[a]=!0,r&&r.deps?_(r.deps,(function(){h(i,n,t)})):h(i,n,t)),c(a).promise}));e.url=_.nameToUrl(n),S(e)}else a&&a.deps?_(a.deps,(function(){S(e)})):S(e);return c(o).promise},v=function(e,i,n){if("string"!=typeof e)return e;var o,a,r,s,l,c,d=e+" & "+(i||"")+" & "+!!n;return s=(r=p(e))[0],e=r[1],!s&&d in x?x[d]:(s&&(o=(s=t(s,i,n))in L&&L[s]),s?o&&o.normalize?(e=o.normalize(e,function(e){return function(i){return t(i,e,!0)}}(i)),c=!0):e=-1===e.indexOf("!")?t(e,i,n):e:(s=(r=p(e=t(e,i,n)))[0],e=r[1],a=_.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:a,prn:s&&c},s||(x[d]=l),l)},y={require:function(e){return n(e)},exports:function(e){var t=L[e];return void 0!==t?t:L[e]={}},module:function(e){return{id:e,uri:"",exports:y.exports(e),config:function(){return getOwn(I.config,e)||{}}}}},b=function(e,t,i,n,a){if(e){if(e in M)return;M[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(i=t,t=[]),t=t?slice.call(t,0):null,n||(hasProp(I,"defaultErrback")?I.defaultErrback&&(n=I.defaultErrback):n=g),n&&s.promise.catch(n),a=a||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),s.factory=i,s.deps=t,s.depending=!0,t.forEach((function(i,n){var o;t[n]=o=v(i,a,!0),"require"===(i=o.id)?s.values[n]=y.require(e):"exports"===i?(s.values[n]=y.exports(e),s.usingExports=!0):"module"===i?s.values[n]=s.cjsModule=y.module(e):void 0===i?s.values[n]=void 0:u(o,a,s,n)})),s.depending=!1,s.depCount===s.depMax&&r(s)):e&&o(e,s,i),j=(new Date).getTime(),e||f(s),s.promise},(_=n(null,!0)).config=function(t){var i,n,o,a;return t.context&&t.context!==e?(i=getOwn(contexts,t.context))?i.req.config(t):newContext(t.context).config(t):(x=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(n=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+n}),o=I.shim,a={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){a[t]?(I[t]||(I[t]={}),mixin(I[t],e,!0,!0)):I[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(O[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),o[t]=e})),I.shim=o),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(I.paths[t]=e.location),I.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&_(t.deps,t.callback),_)},_.onError=function(e){throw e},C={id:e,defined:L,waiting:A,config:I,deferreds:D,req:_,execCb:function(e,t,i,n){return t.apply(n,i)}},contexts[e]=C,_}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{favico:"3rdParty/favico","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn"},shim:{favico:{exports:"Favico"},"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){var i;e.elAttr=function(e,t,i){if(void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var o=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(o,n),o},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,i){if(t="data-"+t,void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,i){var n,o=e.parentNode;if(null===o)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return null!==(n=e.nextElementSibling)&&"SMALL"===n.nodeName&&n.classList.contains("innerError")||(""===t?n=null:((n=elCreate("small")).className="innerError",o.insertBefore(n,e.nextSibling))),""===t?null!==n&&(o.removeChild(n),n=null):n[i?"innerHTML":"textContent"]=t,n},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i],i)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,i){var n;return function(){var o=this,a=arguments;clearTimeout(n),n=setTimeout((function(){n=null,i||e.apply(o,a)}),t),i&&!n&&e.apply(o,a)}},Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),i=0,function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}(),e.addEventListener("popstate",(function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})),e.String.prototype.hashCode=function(){var e,t,i=0;if(this.length)for(e=0,t=this.length;e<t;e++)i=(i<<5)-i+this.charCodeAt(e),i&=i;return i}}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==i&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(i,n){return e[i]=t?t(i,n):n}}var i="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(n){e(t(i,t(n)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(i,t(module.exports))):e(t(i))}((function(e){var t,i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])};__extends=function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__assign=Object.assign||function(e){var t,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__rest=function(e,t){var i,n,o={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]]);return o},__decorate=function(e,t,i,n){var o,a,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},__param=function(e,t){return function(i,n){t(i,n,e)}},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,i,n){return new(i||(i=Promise))((function(o,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((n=n.apply(e,t||[])).next())}))},__generator=function(e,t){function i(i){return function(r){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(a=2&i[0]?o.return:i[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;switch(o=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],o=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,r])}}var n,o,a,r,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r},__exportStar=function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||__createBinding(t,e,i)},__createBinding=Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var i,n,o,a,r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,i,n,o,a,r,s;for(e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(n=Array(e),o=0,t=0;t<i;t++)for(r=0,s=(a=arguments[t]).length;r<s;r++,o++)n[o]=a[r];return n},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,i){function n(e){c[e]&&(l[e]=function(t){return new Promise((function(i,n){d.push([e,t,i,n])>1||o(e,t)}))})}function o(e,t){try{(i=c[e](t)).value instanceof __await?Promise.resolve(i.value.v).then(a,r):s(d[0][2],i)}catch(e){s(d[0][3],e)}var i}function a(e){o("next",e)}function r(e){o("throw",e)}function s(e,t){e(t),d.shift(),d.length&&o(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=i.apply(e,t||[]),d=[];return l={},n("next"),n("throw"),n("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,o){i[t]=e[t]?function(i){return(n=!n)?{value:__await(e[t](i)),done:"return"===t}:o?o(i):i}:o}var i,n;return i={},t("next"),t("throw",(function(e){throw e})),t("return"),i[Symbol.iterator]=function(){return this},i},__asyncValues=function(e){function t(t){i[t]=e[t]&&function(i){return new Promise((function(n,o){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,o,(i=e[t](i)).done,i.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),i={},t("next"),t("throw"),t("return"),i[Symbol.asyncIterator]=function(){return this},i)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var i,n;if(e&&e.__esModule)return e;if(i={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(i,e,n);return t(i,e),i},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet=function(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,i),i},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateObject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet)})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function i(e){return a(e)}function n(e,...t){const a=i(e=e||{});for(let i=0,r=t.length;i<r;i++){const r=t[i];r&&Object.keys(r).forEach((t=>{Array.isArray(r[t])||"object"!=typeof r[t]?a[t]=r[t]:o(r[t])?a[t]=n(e[t],r[t]):a[t]=r[t]}))}return a}function o(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.enableLegacyInheritance=t.debounce=t.stringToBool=t.getStoragePrefix=t.triggerEvent=t.serialize=t.getUuid=t.getType=t.isPlainObject=t.inherit=t.extend=t.convertLegacyUrl=t.clone=void 0;const a=function(e){return"object"==typeof e&&(Array.isArray(e)||o(e))?r(e):e},r=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((i=>t[i]=a(e[i]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=i,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const i=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,n=i.length;e<n;e++){const n=i[e].trim();n.length&&(t.length&&(t+="-"),t+=n.toLowerCase())}return`index.php?${t}/&`}))},t.extend=n,t.inherit=function(e,t,i){if(null==e)throw new TypeError("The constructor must not be undefined or null.");if(null==t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=n(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),i||{})},t.isPlainObject=o,t.getType=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1")},t.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,i){if(null===t)return"";const n=[];return Object.keys(t).forEach((o=>{const a=i?i+"["+o+"]":o,r=t[o];"object"==typeof r?n.push(e(r,a)):n.push(encodeURIComponent(a)+"="+encodeURIComponent(r))})),n.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const i=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(i)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,i={isImmediate:!1}){let n;return function(...o){const a=i.isImmediate&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout((()=>{n=void 0,i.isImmediate||e.apply(this,o)}),t),a&&e.apply(this,o)}},t.enableLegacyInheritance=function(e){e.call=function(t,...i){const n=Reflect.construct(e,i,t.constructor);Object.entries(n).forEach((([e,i])=>{t[e]=i}))}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=void 0,t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let i=e.toString().split("e"),n=i[1]?+i[1]-t:-t;return i=(e=Math.round(+`${i[0]}e${n}`)).toString().split("e"),n=i[1]?+i[1]+t:t,+`${i[0]}e${n}`}})),define("WoltLabSuite/Core/StringUtil",["require","exports","tslib","./NumberUtil"],(function(e,t,i,n){"use strict";function o(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+l)}function a(e,t){let i=n.round(e,t||-2).toString();const a=i.split(".");return i=o(+a[0]),a.length>1&&(i+=s+a[1]),i=i.replace("-","−"),i}function r(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.setupI18n=t.toCamelCase=t.shortUnit=t.unescapeHTML=t.ucfirst=t.lcfirst=t.formatNumeric=t.escapeRegExp=t.escapeHTML=t.addThousandsSeparator=void 0,n=i.__importStar(n);let s=".",l=",";t.addThousandsSeparator=o,t.escapeHTML=function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=a,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=r,t.unescapeHTML=function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},t.shortUnit=function(e){let t="";return e>=1e6?(e=(e/=1e6)>10?Math.floor(e):n.round(e,-1),t="M"):e>=1e3&&(e=(e/=1e3)>10?Math.floor(e):n.round(e,-1),t="k"),a(e)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=r(e)),e))).join(""):e},t.setupI18n=function(e){s=e.decimalPoint,l=e.thousandsSeparator}})),define("WoltLabSuite/Core/I18n/Plural",["require","exports","tslib","../StringUtil"],(function(e,t,i,n){"use strict";n=i.__importStar(n);const o={af(e){if(1==e)return"one"},am(e){const t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},ar(e){if(0==e)return"zero";if(1==e)return"one";if(2==e)return"two";const t=e%100;return t>=3&&t<=10?"few":t>=11&&t<=99?"many":void 0},as(e){const t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},az(e){if(1==e)return"one"},be(e){const t=e%10,i=e%100;return 1==t&&11!=i?"one":t>=2&&t<=4&&!(i>=12&&i<=14)?"few":0==t||t>=5&&t<=9||i>=11&&i<=14?"many":void 0},bg(e){if(1==e)return"one"},bn(e){const t=Math.floor(Math.abs(e));if(1==e||0===t)return"one"},bo(e){},bs(e){const t=a.getV(e),i=a.getF(e),n=e%10,o=e%100,r=i%10,s=i%100;return 0==t&&1==n&&11!=o||1==r&&11!=s?"one":0==t&&n>=2&&n<=4&&o>=12&&o<=14||r>=2&&r<=4&&s>=12&&s<=14?"few":void 0},cs(e){const t=a.getV(e);return 1==e&&0===t?"one":e>=2&&e<=4&&0===t?"few":0===t?"many":void 0},cy:e=>0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":void 0,da(e){if(e>0&&e<2)return"one"},el(e){if(1==e)return"one"},en(e){if(1==e&&0===a.getV(e))return"one"},es(e){if(1==e)return"one"},eu(e){if(1==e)return"one"},fa(e){if(e>=0&&e<=1)return"one"},fr(e){if(e>=0&&e<2)return"one"},ga:e=>1==e?"one":2==e?"two":3==e||4==e||5==e||6==e?"few":7==e||8==e||9==e||10==e?"many":void 0,gu(e){if(e>=0&&e<=1)return"one"},he(e){const t=a.getV(e);return 1==e&&0===t?"one":2==e&&0===t?"two":e>10&&0===t&&e%10==0?"many":void 0},hi(e){if(e>=0&&e<=1)return"one"},hr:e=>a.bs(e),hu(e){if(1==e)return"one"},hy(e){if(e>=0&&e<2)return"one"},id(e){},is(e){const t=a.getF(e);if(0===t&&e%10==1&&e%100!=11||0!==t)return"one"},ja(e){},jv(e){},ka(e){if(1==e)return"one"},kk(e){if(1==e)return"one"},km(e){},kn(e){if(e>=0&&e<=1)return"one"},ko(e){},ku(e){if(1==e)return"one"},ky(e){if(1==e)return"one"},lb(e){if(1==e)return"one"},lo(e){},lt(e){const t=e%10,i=e%100;return 1!=t||i>=11&&i<=19?t>=2&&t<=9&&!(i>=11&&i<=19)?"few":0!=a.getF(e)?"many":void 0:"one"},lv(e){const t=e%10,i=e%100,n=a.getV(e),o=a.getF(e),r=o%10,s=o%100;return 0==t||i>=11&&i<=19||2==n&&s>=11&&s<=19?"zero":1==t&&11!=i||2==n&&1==r&&11!=s||2!=n&&1==r?"one":void 0},mk:e=>a.bs(e),ml(e){if(1==e)return"one"},mn(e){if(1==e)return"one"},mr(e){if(1==e)return"one"},ms(e){},mt(e){const t=e%100;return 1==e?"one":0==e||t>=2&&t<=10?"few":t>=11&&t<=19?"many":void 0},my(e){},no(e){if(1==e)return"one"},ne(e){if(1==e)return"one"},or(e){if(1==e)return"one"},pa(e){if(1==e||0==e)return"one"},pl(e){const t=a.getV(e),i=e%10,n=e%100;return 1==e&&0==t?"one":0==t&&i>=2&&i<=4&&!(n>=12&&n<=14)?"few":0==t&&(1!=e&&i>=0&&i<=1||i>=5&&i<=9||n>=12&&n<=14)?"many":void 0},ps(e){if(1==e)return"one"},pt(e){if(e>=0&&e<2)return"one"},ro(e){const t=a.getV(e),i=e%100;return 1==e&&0===t?"one":0!=t||0==e||i>=2&&i<=19?"few":void 0},ru(e){const t=e%10,i=e%100;if(0==a.getV(e)){if(1==t&&11!=i)return"one";if(t>=2&&t<=4&&!(i>=12&&i<=14))return"few";if(0==t||t>=5&&t<=9||i>=11&&i<=14)return"many"}},sd(e){if(1==e)return"one"},si(e){if(0==e||1==e||0==Math.floor(e)&&1==a.getF(e))return"one"},sk:e=>a.cs(e),sl(e){const t=a.getV(e),i=e%100;return 0==t&&1==i?"one":0==t&&2==i?"two":0==t&&(3==i||4==i)||0!=t?"few":void 0},sq(e){if(1==e)return"one"},sr:e=>a.bs(e),ta(e){if(1==e)return"one"},te(e){if(1==e)return"one"},tg(e){},th(e){},tk(e){if(1==e)return"one"},tr(e){if(1==e)return"one"},ug(e){if(1==e)return"one"},uk:e=>a.ru(e),uz(e){if(1==e)return"one"},vi(e){},zh(e){}},a=Object.assign({getCategory(e,t){t||(t=document.documentElement.lang),"function"!=typeof a[t]&&(t="en");const i=a[t](e);return i||"other"},getCategoryFromTemplateParameters(e){if(!e.value)throw new Error("Missing parameter value");if(!e.other)throw new Error("Missing parameter other");let t=e.value;Array.isArray(t)&&(t=t.length);const i=Object.keys(e).find((e=>e.toString()===(~~e).toString()&&e.toString()===t.toString()));if(i)return i;let o=a.getCategory(t);e[o]||(o="other");const r=e[o];return-1!==r.indexOf("#")?r.replace("#",n.formatNumeric(t)):r},getF(e){const t=e.toString(),i=t.indexOf(".");return-1===i?0:parseInt(t.substr(i+1),10)},getV:e=>e.toString().replace(/^[^.]*\.?/,"").length},o);return a})),define("WoltLabSuite/Core/Language/Store",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.get=void 0;const i=new Map;t.get=function(e,t={}){const n=i.get(e);return void 0===n?e:n(t)},t.add=function(e,t){i.set(e,t)}})),define("WoltLabSuite/Core/Template.grammar",["require"],(function(e){var t=function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i},i=[2,44],n=[5,9,11,12,13,18,19,21,22,23,25,26,28,29,30,32,33,34,35,37,39,41],o=[1,25],a=[1,27],r=[1,33],s=[1,31],l=[1,32],c=[1,28],d=[1,29],u=[1,26],h=[1,35],p=[1,41],m=[1,40],f=[11,12,15,42,43,47,49,51,52,54,55],g=[9,11,12,13,18,19,21,23,26,28,30,32,33,34,35,37,39],_=[11,12,15,42,43,46,47,48,49,51,52,54,55],b=[1,64],v=[1,65],w=[18,37,39],y=[12,15],E={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,T_WS:12,"{if":13,COMMAND_PARAMETERS:14,"}":15,COMMAND_repetition0:16,COMMAND_option0:17,"{/if}":18,"{include":19,COMMAND_PARAMETER_LIST:20,"{implode":21,"{/implode}":22,"{foreach":23,COMMAND_option1:24,"{/foreach}":25,"{plural":26,PLURAL_PARAMETER_LIST:27,"{lang}":28,"{/lang}":29,"{":30,VARIABLE:31,"{#":32,"{@":33,"{ldelim}":34,"{rdelim}":35,ELSE:36,"{else}":37,ELSE_IF:38,"{elseif":39,FOREACH_ELSE:40,"{foreachelse}":41,T_VARIABLE:42,T_VARIABLE_NAME:43,VARIABLE_repetition0:44,VARIABLE_SUFFIX:45,"[":46,"]":47,".":48,"(":49,VARIABLE_SUFFIX_option0:50,")":51,"=":52,COMMAND_PARAMETER_VALUE:53,T_QUOTED_STRING:54,T_DIGITS:55,COMMAND_PARAMETERS_repetition_plus0:56,COMMAND_PARAMETER:57,T_PLURAL_PARAMETER_NAME:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"T_WS",13:"{if",15:"}",18:"{/if}",19:"{include",21:"{implode",22:"{/implode}",23:"{foreach",25:"{/foreach}",26:"{plural",28:"{lang}",29:"{/lang}",30:"{",32:"{#",33:"{@",34:"{ldelim}",35:"{rdelim}",37:"{else}",39:"{elseif",41:"{foreachelse}",42:"T_VARIABLE",43:"T_VARIABLE_NAME",46:"[",47:"]",48:".",49:"(",51:")",52:"=",54:"T_QUOTED_STRING",55:"T_DIGITS"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[36,2],[38,4],[40,2],[31,3],[45,3],[45,2],[45,3],[20,5],[20,3],[53,1],[53,1],[53,1],[14,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,3],[27,5],[27,3],[58,1],[58,1],[6,0],[6,2],[16,0],[16,2],[17,0],[17,1],[24,0],[24,1],[44,0],[44,2],[50,0],[50,1],[56,1],[56,2]],performAction:function(e,t,i,n,o,a,r){var s,l,c,d=a.length-1;switch(o){case 1:return a[d-1]+";";case 2:(s=a[d].reduce((function(e,t){return t.encode&&!e[1]?e[0]+=" + '"+t.value:t.encode&&e[1]?e[0]+=t.value:!t.encode&&e[1]?e[0]+="' + "+t.value:t.encode||e[1]||(e[0]+=" + "+t.value),e[1]=t.encode,e}),["''",!1]))[1]&&(s[0]+="'"),this.$=s[0];break;case 3:case 4:this.$={encode:!0,value:a[d].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:a[d]};break;case 8:this.$="(function() { if ("+a[d-5]+") { return "+a[d-3]+"; } "+a[d-2].join(" ")+" "+(a[d-1]||"")+" return ''; })()";break;case 9:if(!a[d-1].file)throw new Error("Missing parameter file");this.$=a[d-1].file+".fetch(v)";break;case 10:if(!a[d-3].from)throw new Error("Missing parameter from");if(!a[d-3].item)throw new Error("Missing parameter item");a[d-3].glue||(a[d-3].glue="', '"),this.$="(function() { return "+a[d-3].from+".map(function(item) { v["+a[d-3].item+"] = item; return "+a[d-1]+"; }).join("+a[d-3].glue+"); })()";break;case 11:if(!a[d-4].from)throw new Error("Missing parameter from");if(!a[d-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+a[d-4].from+" instanceof Array) {for (var i = 0; i < "+a[d-4].from+".length; i++) { looped = true;v["+a[d-4].key+"] = i;v["+a[d-4].item+"] = "+a[d-4].from+"[i];result += "+a[d-2]+";}} else {for (var key in "+a[d-4].from+") {if (!"+a[d-4].from+".hasOwnProperty(key)) continue;looped = true;v["+a[d-4].key+"] = key;v["+a[d-4].item+"] = "+a[d-4].from+"[key];result += "+a[d-2]+";}}return (looped ? result : "+(a[d-1]||"''")+"); })()";break;case 12:for(c in this.$="I18nPlural.getCategoryFromTemplateParameters({",l=!1,a[d-1])objOwns(a[d-1],c)&&(this.$+=(l?",":"")+c+": "+a[d-1][c],l=!0);this.$+="})";break;case 13:this.$="Language.get("+a[d-1]+", v)";break;case 14:this.$="StringUtil.escapeHTML("+a[d-1]+")";break;case 15:this.$="StringUtil.formatNumeric("+a[d-1]+")";break;case 16:this.$=a[d-1];break;case 17:this.$="'{'";break;case 18:this.$="'}'";break;case 19:this.$="else { return "+a[d]+"; }";break;case 20:this.$="else if ("+a[d-2]+") { return "+a[d]+"; }";break;case 21:this.$=a[d];break;case 22:this.$="v['"+a[d-1]+"']"+a[d].join("");break;case 23:this.$=a[d-2]+a[d-1]+a[d];break;case 24:this.$="['"+a[d]+"']";break;case 25:case 39:this.$=a[d-2]+(a[d-1]||"")+a[d];break;case 26:case 40:this.$=a[d],this.$[a[d-4]]=a[d-2];break;case 27:case 41:this.$={},this.$[a[d-2]]=a[d];break;case 31:this.$=a[d].join("");break;case 44:case 46:case 52:this.$=[];break;case 45:case 47:case 53:case 57:a[d-1].push(a[d]);break;case 56:this.$=[a[d]]}},table:[t([5,9,11,12,13,19,21,23,26,28,30,32,33,34,35],i,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,18,22,25,29,37,39,41],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],19:[1,12],21:[1,13],23:[1,14],26:[1,15],28:[1,16],30:[1,17],32:[1,18],33:[1,19],34:[1,20],35:[1,21]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),{11:o,12:a,14:22,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{20:34,43:h},{20:36,43:h},{20:37,43:h},{27:38,43:p,55:m,58:39},t([9,11,12,13,19,21,23,26,28,29,30,32,33,34,35],i,{6:3,4:42}),{31:43,42:r},{31:44,42:r},{31:45,42:r},t(n,[2,17]),t(n,[2,18]),{15:[1,46]},t([15,47,51],[2,31],{31:30,57:47,11:o,12:a,42:r,43:s,49:l,52:c,54:d,55:u}),t(f,[2,56]),t(f,[2,32]),t(f,[2,33]),t(f,[2,34]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{11:o,12:a,14:48,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{43:[1,49]},{15:[1,50]},{52:[1,51]},{15:[1,52]},{15:[1,53]},{15:[1,54]},{52:[1,55]},{52:[2,42]},{52:[2,43]},{29:[1,56]},{15:[1,57]},{15:[1,58]},{15:[1,59]},t(g,i,{6:3,4:60}),t(f,[2,57]),{51:[1,61]},t(_,[2,52],{44:62}),t(n,[2,9]),{31:66,42:r,53:63,54:b,55:v},t([9,11,12,13,19,21,22,23,26,28,30,32,33,34,35],i,{6:3,4:67}),t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35,41],i,{6:3,4:68}),t(n,[2,12]),{31:66,42:r,53:69,54:b,55:v},t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(w,[2,46],{16:70}),t(f,[2,39]),t([11,12,15,42,43,47,51,52,54,55],[2,22],{45:71,46:[1,72],48:[1,73],49:[1,74]}),{12:[1,75],15:[2,27]},t(y,[2,28]),t(y,[2,29]),t(y,[2,30]),{22:[1,76]},{24:77,25:[2,50],40:78,41:[1,79]},{12:[1,80],15:[2,41]},{17:81,18:[2,48],36:83,37:[1,85],38:82,39:[1,84]},t(_,[2,53]),{11:o,12:a,14:86,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},{43:[1,87]},{11:o,12:a,14:89,31:30,42:r,43:s,49:l,50:88,51:[2,54],52:c,54:d,55:u,56:23,57:24},{20:90,43:h},t(n,[2,10]),{25:[1,91]},{25:[2,51]},t([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35],i,{6:3,4:92}),{27:93,43:p,55:m,58:39},{18:[1,94]},t(w,[2,47]),{18:[2,49]},{11:o,12:a,14:95,31:30,42:r,43:s,49:l,52:c,54:d,55:u,56:23,57:24},t([9,11,12,13,18,19,21,23,26,28,30,32,33,34,35],i,{6:3,4:96}),{47:[1,97]},t(_,[2,24]),{51:[1,98]},{51:[2,55]},{15:[2,26]},t(n,[2,11]),{25:[2,21]},{15:[2,40]},t(n,[2,8]),{15:[1,99]},{18:[2,19]},t(_,[2,23]),t(_,[2,25]),t(g,i,{6:3,4:100}),t(w,[2,20])],defaultActions:{4:[2,1],40:[2,42],41:[2,43],78:[2,51],83:[2,49],89:[2,55],90:[2,26],92:[2,21],93:[2,40],96:[2,19]},parseError:function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)},parse:function(e){var t,i,n,o,a,r,s,l,c,d,u,h,p,m,f,g=this,_=[0],b=[null],v=[],w=this.table,y="",E=0,S=0,C=0,L=2,A=1,I=v.slice.call(arguments,1),x=Object.create(this.lexer),k={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(k.yy[t]=this.yy[t]);for(x.setInput(e,k.yy),k.yy.lexer=x,k.yy.parser=this,void 0===x.yylloc&&(x.yylloc={}),i=x.yylloc,v.push(i),n=x.options&&x.options.ranges,"function"==typeof k.yy.parseError?this.parseError=k.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o=function(){var e;return"number"!=typeof(e=x.lex()||A)&&(e=g.symbols_[e]||e),e},d={};;){if(s=_[_.length-1],this.defaultActions[s]?l=this.defaultActions[s]:(null==a&&(a=o()),l=w[s]&&w[s][a]),void 0===l||!l.length||!l[0]){for(u in f="",m=[],w[s])this.terminals_[u]&&u>L&&m.push("'"+this.terminals_[u]+"'");f=x.showPosition?"Parse error on line "+(E+1)+":\n"+x.showPosition()+"\nExpecting "+m.join(", ")+", got '"+(this.terminals_[a]||a)+"'":"Parse error on line "+(E+1)+": Unexpected "+(a==A?"end of input":"'"+(this.terminals_[a]||a)+"'"),this.parseError(f,{text:x.match,token:this.terminals_[a]||a,line:x.yylineno,loc:i,expected:m})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+a);switch(l[0]){case 1:_.push(a),b.push(x.yytext),v.push(x.yylloc),_.push(l[1]),a=null,r?(a=r,r=null):(S=x.yyleng,y=x.yytext,E=x.yylineno,i=x.yylloc,C>0&&C--);break;case 2:if(h=this.productions_[l[1]][1],d.$=b[b.length-h],d._$={first_line:v[v.length-(h||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(h||1)].first_column,last_column:v[v.length-1].last_column},n&&(d._$.range=[v[v.length-(h||1)].range[0],v[v.length-1].range[1]]),void 0!==(c=this.performAction.apply(d,[y,S,E,k.yy,l[1],b,v].concat(I))))return c;h&&(_=_.slice(0,-1*h*2),b=b.slice(0,-1*h),v=v.slice(0,-1*h)),_.push(this.productions_[l[1]][0]),b.push(d.$),v.push(d._$),p=w[_[_.length-2]][_[_.length-1]],_.push(p);break;case 3:return!0}}return!0}},S={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t,i,n=e.length,o=e.split(/(?:\r\n?|\n)/g);return this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n,t=this.match.split(/(?:\r\n?|\n)/g),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1),i=this.yylloc.range,this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===t.length?this.yylloc.first_column:0)+t[t.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,n,o,a;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(a in o)this[a]=o[a];return!1}return!1},next:function(){var e,t,i,n,o,a;if(this.done)return this.EOF;for(this._input||(this.done=!0),this._more||(this.yytext="",this.match=""),o=this._currentRules(),a=0;a<o.length;a++)if((i=this._input.match(this.rules[o[a]]))&&(!t||i[0].length>t[0].length)){if(t=i,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,o[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,o[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:case 3:return 54;case 4:return 42;case 5:return 55;case 6:return 43;case 7:return 48;case 8:return 46;case 9:return 47;case 10:return 49;case 11:return 51;case 12:return 52;case 13:return 34;case 14:return 35;case 15:return this.begin("command"),32;case 16:return this.begin("command"),33;case 17:return this.begin("command"),13;case 18:case 19:return this.begin("command"),39;case 20:return 37;case 21:return 18;case 22:return 28;case 23:return 29;case 24:return this.begin("command"),19;case 25:return this.begin("command"),21;case 26:return this.begin("command"),26;case 27:return 22;case 28:return this.begin("command"),23;case 29:return 41;case 30:return 25;case 31:return this.begin("command"),30;case 32:return this.popState(),15;case 33:return 12;case 34:return 5;case 35:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[0-9]+)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{plural )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{(?!\s))/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],inclusive:!0},INITIAL:{rules:[0,1,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35],inclusive:!0}}};return E.lexer=S,E})),define("WoltLabSuite/Core/Template/Compiler",["require","exports","tslib","../Template.grammar"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=void 0,n=i.__importStar(n),t.compile=function(e){return e="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+(e=n.parse(e)),new Function("StringUtil","Language","I18nPlural","v",e)}})),define("WoltLabSuite/Core/Template",["require","exports","tslib","./Core","./I18n/Plural","./Language/Store","./StringUtil","./Template/Compiler"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class l{constructor(e){try{this.compiled=s.compile(e)}catch(e){throw console.debug(e.message),e}}fetch(e){return this.compiled(r,a,o,e)}}return Object.defineProperty(l,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(e){throw new Error("WCF.Template.callbacks is no longer supported")}}),n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Language",["require","exports","tslib","./Template","./Language/Store","./Language/Store"],(function(e,t,i,n,o,a){"use strict";function r(e,t){o.add(e,function(e){try{const t=new n.default(e);return t.fetch.bind(t)}catch(t){return function(){return e}}}(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.addObject=t.get=void 0,n=i.__importDefault(n),Object.defineProperty(t,"get",{enumerable:!0,get:function(){return a.get}}),t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{r(e,t)}))},t.add=r})),define("WoltLabSuite/Core/Ajax/Status",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";function o(){return void 0===r&&(r=new a),r}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0,n=i.__importStar(n);class a{constructor(){this._activeRequests=0,this._timer=null,this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("span");e.className="icon icon48 fa-spinner",this._overlay.appendChild(e);const t=document.createElement("span");t.textContent=n.get("wcf.global.loading"),this._overlay.appendChild(t),document.body.appendChild(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&window.clearTimeout(this._timer),this._overlay.classList.remove("active"))}}let r;t.show=function(){o().show()},t.hide=function(){o().hide()}})),define("WoltLabSuite/Core/CallbackList",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._callbacks=new Map}add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){var i;null===e?this._callbacks.forEach(((e,i)=>{e.forEach(t)})):null===(i=this._callbacks.get(e))||void 0===i||i.forEach(t)}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,i,n){"use strict";const o=new((n=i.__importDefault(n)).default);let a=!1;return{add:o.add.bind(o),remove:o.remove.bind(o),trigger(){if(!a)try{a=!0,o.forEach(null,(e=>e()))}finally{a=!1}}}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,i,n){"use strict";function o(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let n,o=e;const a=i+"Sibling";for(;null!==o&&o!==t;){if(null!==o[i+"ElementSibling"])return!1;if(o[a])for(n=o[a];n;){if(""!==n.textContent.trim())return!1;n=n[a]}o=o.parentNode}return!0}n=i.__importStar(n);let a=0;const r={createFragmentFromHtml(e){const t=document.createElement("div");this.setInnerHtml(t,e);const i=document.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId(){let e;do{e="wcf"+a++}while(null!==document.getElementById(e));return e},identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=this.getUniqueId(),e.id=t),t},outerHeight(e,t){t=t||window.getComputedStyle(e);let i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom,i},outerWidth(e,t){t=t||window.getComputedStyle(e);let i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight,i},outerDimensions(e){const t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let i=!1;Object.keys(t).forEach((n=>{/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":"")}))},styleAsInt(e,t){const i=e.getPropertyValue(t);return null===i?0:parseInt(i,10)},setInnerHtml(e,t){e.innerHTML=t;const i=e.querySelectorAll("script");for(let t=0,n=i.length;t<n;t++){const n=i[t],o=document.createElement("script");n.src?o.src=n.src:o.textContent=n.textContent,e.appendChild(o),n.remove()}},insertHtml(e,t,i){const n=document.createElement("div");if(this.setInnerHtml(n,e),!n.childNodes.length)return;let o,a=n.childNodes[0];switch(i){case"append":t.appendChild(a);break;case"after":this.insertAfter(a,t);break;case"prepend":this.prepend(a,t);break;case"before":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'before'.");t.parentNode.insertBefore(a,t);break;default:throw new Error("Unknown insert method '"+i+"'.")}for(;n.childNodes.length;)o=n.childNodes[0],this.insertAfter(o,a),a=o},contains:(e,t)=>e.contains(t),getDataAttributes(e,t,i,o){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),i=!0===i,o=!0===o;const a={};for(let r=0,s=e.attributes.length;r<s;r++){const s=e.attributes[r];if(0===s.name.indexOf(t)){let e=s.name.replace(new RegExp("^"+t),"");if(i){const t=e.split("-");e="";for(let i=0,a=t.length;i<a;i++)e.length&&(o&&"id"===t[i]?t[i]="ID":t[i]=n.ucfirst(t[i])),e+=t[i]}a[e]=s.value}}return a},unwrapChildNodes(e){if(null===e.parentNode)throw new Error("The element has no parent.");const t=e.parentNode;for(;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);e.remove()},replaceElement(e,t){if(null===e.parentNode)throw new Error("The old element has no parent.");for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),e.remove()},isAtNodeStart:(e,t)=>o(e,t,"previous"),isAtNodeEnd:(e,t)=>o(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){this.isHidden(e)?this.show(e):this.hide(e)},innerError(e,t,i){const n=e.parentNode;if(null===n)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerError")||(""===t?o=null:(o=document.createElement("small"),o.className="innerError",n.insertBefore(o,e.nextSibling))),""===t?null!==o&&(o.remove(),o=null):o[i?"innerHTML":"textContent"]=t,o},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=r,r})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Dom/Util","../Language"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s);let l=!1,c=!1;class d{constructor(e){this._options=o.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),l||(l=!0,window.addEventListener("beforeunload",(()=>c=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||n.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=o.clone(this._options),i=this._xhr;if(i.onload=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200&&i.status<300||304===i.status?t.responseType&&0!==i.getResponseHeader("Content-Type").indexOf(t.responseType)?this._failure(i,t):this._success(i,t):this._failure(i,t))},i.onerror=()=>{this._failure(i,t)},this._options.progress&&(i.onprogress=this._options.progress),this._options.uploadProgress&&(i.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==o.getType(e)&&(e=o.serialize(e)),i.send(e)}else i.send()}abortPrevious(){this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=void 0,this._options.silent||n.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==o.getType(e)&&(e=o.extend(this._data,e)),this._options.data=e}_success(t,o){if(o.silent||n.hide(),"function"==typeof o.success){let n=null;if("application/json"===t.getResponseHeader("Content-Type").split(";",1)[0].trim()){try{n=JSON.parse(t.responseText)}catch(e){return void this._failure(t,o)}n&&n.returnValues&&void 0!==n.returnValues.template&&(n.returnValues.template=n.returnValues.template.trim()),n&&n.forceBackgroundQueuePerform&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke()))}o.success(n,t.responseText,t,o.data)}this._finalize(o)}_failure(t,o){if(c)return;o.silent||n.hide();let a=null;try{a=JSON.parse(t.responseText)}catch(e){}let l=!0;if("function"==typeof o.failure&&(l=o.failure(a||{},t.responseText||"",t,o.data)),!0!==o.ignoreError&&l){const n=this.getErrorHtml(a,t);n&&new Promise(((t,i)=>{e(["../Ui/Dialog"],t,i)})).then(i.__importStar).then((e=>{e.openStatic(r.default.getUniqueId(),n,{title:s.get("wcf.global.error.title")})}))}this._finalize(o)}getErrorHtml(e,t){let i,n="";if(null!==e&&Object.keys(e).length>0?(e.returnValues&&e.returnValues.description&&(n+=`<br><p>Description:</p><p>${e.returnValues.description}</p>`),e.file&&e.line&&(n+=`<br><p>File:</p><p>${e.file} in line ${e.line}</p>`),e.stacktrace?n+=`<br><p>Stacktrace:</p><p>${e.stacktrace}</p>`:e.exceptionID&&(n+=`<br><p>Exception ID: <code>${e.exceptionID}</code></p>`),i=e.message,e.previous.forEach((e=>{n+=`<hr><p>${e.message}</p>`,n+=`<br><p>Stacktrace</p><p>${e.stacktrace}</p>`}))):i=t.responseText,!i||"undefined"===i){if(!window.ENABLE_DEBUG_MODE)return null;i="XMLHttpRequest failed without a responseText. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${i}</p>${n}</div>`}_finalize(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=void 0,a.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}}return o.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestObject=t.apiOnce=t.api=void 0,n=i.__importDefault(n);const o=new WeakMap;t.api=function(e,t,i,a){"object"!=typeof t&&(t={});let r=o.get(e);if(void 0===r){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+window.SECURITY_TOKEN,t.withCredentials=!0),r=new n.default(t),o.set(e,r)}let s=null,l=null;return"function"==typeof i&&(s=r.getOption("success"),r.setOption("success",i)),"function"==typeof a&&(l=r.getOption("failure"),r.setOption("failure",a)),r.setData(t),r.sendRequest(),null!==s&&r.setOption("success",s),null!==l&&r.setOption("failure",l),r},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+window.SECURITY_TOKEN,e.withCredentials=!0),new n.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!o.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return o.get(e)}})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,n=i.__importStar(n);class o{constructor(e){this._invocations=0,this._isBusy=!1,this._url=e}invoke(){this._isBusy||(this._isBusy=!0,n.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let a;t.setUrl=function(e){a||(a=new o(e))},t.invoke=function(){a?a.invoke():console.error("The background queue has not been initialized yet.")}})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";function o(e){return r(e,n.get("wcf.date.dateFormat"))}function a(e){return r(e,n.get("wcf.date.timeFormat"))}function r(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let i="";for(let o=0,a=t.length;o<a;o++){let r;switch(t[o]){case"s":r=e.getSeconds().toString().padStart(2,"0");break;case"i":r=e.getMinutes().toString().padStart(2,"0");break;case"a":r=e.getHours()>11?"pm":"am";break;case"g":{const t=e.getHours();r=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();r=0===t?"12":t>12?(t-12).toString():t.toString(),r=r.padStart(2,"0");break}case"A":r=e.getHours()>11?"PM":"AM";break;case"G":r=e.getHours().toString();break;case"H":r=e.getHours().toString().padStart(2,"0");break;case"d":r=e.getDate().toString().padStart(2,"0");break;case"j":r=e.getDate().toString();break;case"l":r=n.get("__days")[e.getDay()];break;case"D":r=n.get("__daysShort")[e.getDay()];break;case"S":r="";break;case"m":r=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":r=(e.getMonth()+1).toString();break;case"F":r=n.get("__months")[e.getMonth()];break;case"M":r=n.get("__monthsShort")[e.getMonth()];break;case"y":r=e.getFullYear().toString().slice(-2);break;case"Y":r=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();r=t>0?"-":"+",t=Math.abs(t),r+=(~~(t/60)).toString().padStart(2,"0"),r+=":",r+=(t%60).toString().padStart(2,"0");break}case"r":r=e.toString();break;case"U":r=Math.round(e.getTime()/1e3).toString();break;case"\\":r="",o+1<a&&(r=t[++o]);break;default:r=t[o]}i+=r}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,n=i.__importStar(n),t.formatDate=o,t.formatTime=a,t.formatDateTime=function(e){const t=n.get("wcf.date.dateTimeFormat"),i=n.get("wcf.date.dateFormat"),o=n.get("wcf.date.timeFormat");return r(e,t.replace(/%date%/,i).replace(/%time%/,o))},t.format=r,t.gmdate=function(e){return e instanceof Date||(e=new Date),Math.round(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDay(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())/1e3)},t.getTimeElement=function(e){const t=document.createElement("time");t.className="datetime";const i=o(e),s=a(e);return t.setAttribute("datetime",r(e,"c")),t.dataset.timestamp=((e.getTime()-e.getMilliseconds())/1e3).toString(),t.dataset.date=i,t.dataset.time=s,t.dataset.offset=(60*e.getTimezoneOffset()).toString(),e.getTime()>Date.now()&&(t.dataset.isFutureDate="true",t.textContent=n.get("wcf.date.dateTimeFormat").replace("%time%",s).replace("%date%",i)),t},t.getTimezoneDate=function(e,t){const i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function i(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(n))}let n={editorAutosave:!0,eventLogging:!1};const o={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(o).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){n.editorAutosave=!e&&!n.editorAutosave,i(),window.console.log("%c\tEditor autosave "+(n.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){n.eventLogging=!!e||!n.eventLogging,i(),window.console.log("%c\tEvent logging "+(n.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=o,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(n=JSON.parse(e))}catch(e){}n.editorAutosave||o.toggleEditorAutosave(!0),n.eventLogging&&o.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>n.editorAutosave,eventLog(e,t){n.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return o})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,i,n,o){"use strict";function a(e,t){"string"!=typeof t&&(t=void 0);const i=r.get(e);void 0!==i&&(void 0===t?r.delete(e):i.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,n=i.__importStar(n),o=i.__importDefault(o);const r=new Map;t.add=function(e,t,i){if("function"!=typeof i)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let o=r.get(e);void 0===o&&(o=new Map,r.set(e,o));let a=o.get(t);void 0===a&&(a=new Map,o.set(t,a));const s=n.getUuid();return a.set(s,i),s},t.fire=function(e,t,i){var n,a;o.default._internal_.eventLog(e,t),i=i||{},null===(a=null===(n=r.get(e))||void 0===n?void 0:n.get(t))||void 0===a||a.forEach((e=>e(i)))},t.remove=function(e,t,i){var n,o;null===(o=null===(n=r.get(e))||void 0===n?void 0:n.get(t))||void 0===o||o.delete(i)},t.removeAll=a,t.removeAllBySuffix=function(e,t){const i=r.get(e);if(void 0===i)return;const n=-1*(t="_"+t).length;i.forEach(((i,o)=>{o.substr(n)===t&&a(e,o)}))}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const n=[];for(let o=0;o<e.childElementCount;o++)a.get(t)(e.children[o],i)&&n.push(e.children[o]);return n}function n(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");let o=e.parentNode;for(;o instanceof Element;){if(o===n)return null;if(a.get(t)(o,i))return o;o=o.parentNode}return null}function o(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&a.get(i)(e[t],n)?e[t]:null}Object.defineProperty(t,"__esModule",{value:!0}),t.prevByTag=t.prevByClass=t.prevBySel=t.prev=t.nextByTag=t.nextByClass=t.nextBySel=t.next=t.parentByTag=t.parentByClass=t.parentBySel=t.childrenByTag=t.childrenByClass=t.childrenBySel=t.childByTag=t.childByClass=t.childBySel=void 0;const a=new Map([[0,()=>!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]]);t.childBySel=function(e,t){return i(e,1,t)[0]||null},t.childByClass=function(e,t){return i(e,2,t)[0]||null},t.childByTag=function(e,t){return i(e,3,t)[0]||null},t.childrenBySel=function(e,t){return i(e,1,t)},t.childrenByClass=function(e,t){return i(e,2,t)},t.childrenByTag=function(e,t){return i(e,3,t)},t.parentBySel=function(e,t,i){return n(e,1,t,i)},t.parentByClass=function(e,t,i){return n(e,2,t,i)},t.parentByTag=function(e,t,i){return n(e,3,t,i)},t.next=function(e){return o(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return o(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return o(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return o(e,"nextElementSibling",3,t)},t.prev=function(e){return o(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return o(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return o(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return o(e,"previousElementSibling",3,t)}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t,i,n,o,a){let r="auto",s="auto",l=!0,c=50;const d=document.getElementById("pageHeaderPanel");if(null!==d){const e=window.getComputedStyle(d).position;c="fixed"===e||"static"===e?d.offsetHeight:0}if("top"===e){const e=document.body.clientHeight;r=e-n.top+a,e-(r+t.height)<(window.scrollY||window.pageYOffset)+c&&(l=!1)}else s=n.top+i.height+a,s+t.height-(window.scrollY||window.pageYOffset)>o&&(l=!1);return{align:e,bottom:r,top:s,result:l}}function l(e,t,i,n,o){let a="auto",r="auto",s=!0;return"left"===e?(a=n.left,a+t.width>o&&(s=!1)):"right"===e?n.left+i.width<t.width?s=!1:(r=o-(n.left+i.width),r<0&&(s=!1)):(a=n.left+i.width/2-t.width/2,a=~~a,(a<0||a+t.width>o)&&(s=!1)),{align:e,left:a,right:r,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),t.set=function(e,t,i){i=n.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},i||{}),Array.isArray(i.pointerClassNames)&&i.pointerClassNames.length===(i.pointer?1:2)||(i.pointerClassNames=[]),-1===["left","right","center"].indexOf(i.horizontal)&&(i.horizontal="left"),"bottom"!==i.vertical&&(i.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(i.allowFlip)&&(i.allowFlip="both"),a.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const c=a.default.outerDimensions(e),d=a.default.outerDimensions(i.refDimensionsElement instanceof HTMLElement?i.refDimensionsElement:t),u=a.default.offset(t),h=window.innerHeight,p=document.body.clientWidth;let m=null,f=!1;if("center"===i.horizontal&&(f=!0,m=l(i.horizontal,c,d,u,p),m.result||("both"===i.allowFlip||"horizontal"===i.allowFlip?i.horizontal="left":m.result=!0)),"rtl"===r.get("wcf.global.pageDirection")&&(i.horizontal="left"===i.horizontal?"right":"left"),null===m||!m.result){const e=m;if(m=l(i.horizontal,c,d,u,p),!m.result&&("both"===i.allowFlip||"horizontal"===i.allowFlip)){const t=l("left"===i.horizontal?"right":"left",c,d,u,p);t.result?m=t:f&&(m=e)}}const g=m.left,_=m.right;let b=s(i.vertical,c,d,u,h,i.verticalOffset);if(!b.result&&("both"===i.allowFlip||"vertical"===i.allowFlip)){const e=s("top"===i.vertical?"bottom":"top",c,d,u,h,i.verticalOffset);e.result&&(b=e)}const v=b.bottom,w=b.top;if(i.pointer){const t=o.childrenByClass(e,"elementPointer")[0]||null;if(null===t)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===m.align?(t.classList.add("center"),t.classList.remove("left","right")):(t.classList.add(m.align),t.classList.remove("center"),t.classList.remove("left"===m.align?"right":"left")),"top"===b.align?t.classList.add("flipVertical"):t.classList.remove("flipVertical")}else 2===i.pointerClassNames.length&&(e.classList["auto"===w?"add":"remove"](i.pointerClassNames[0]),e.classList["auto"===g?"add":"remove"](i.pointerClassNames[1]));a.default.setStyles(e,{bottom:"auto"===v?v:Math.round(v).toString()+"px",left:"auto"===g?g:Math.ceil(g).toString()+"px",right:"auto"===_?_:Math.floor(_).toString()+"px",top:"auto"===w?w:Math.round(w).toString()+"px"}),a.default.show(e),e.style.removeProperty("visibility")}})),define("WoltLabSuite/Core/Ui/CloseOverlay",["require","exports","tslib","../CallbackList"],(function(e,t,i,n){"use strict";const o=new((n=i.__importDefault(n)).default),a={add:o.add.bind(o),remove:o.remove.bind(o),execute(){o.forEach(null,(e=>e()))}};return document.body.addEventListener("click",(()=>a.execute())),a})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Dom/Change/Listener","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";function u(e,t,i){const n=i?"minDate":"maxDate";let o=(e.dataset[n]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(o))o=new Date(o).getTime().toString();else if("now"===o)o=t.getTime().toString();else if(/^\d{1,3}$/.exec(o)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~o*(i?-1:1)),o=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(o)){if(o=RegExp.$1,null===document.getElementById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}-\d{2}-\d{2}T/.test(o)?new Date(o).getTime().toString():new Date(i?1902:2038,0,1).getTime().toString();e.dataset[n]=o}function h(e){let t=k.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function p(e){e.preventDefault(),e.stopPropagation(),function(){if(null!==U)return;U=document.createElement("div"),U.className="datePicker",U.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");U.appendChild(e),N=document.createElement("a"),N.className="previous jsTooltip",N.href="#",N.setAttribute("role","button"),N.tabIndex=0,N.title=s.get("wcf.date.datePicker.previousMonth"),N.setAttribute("aria-label",s.get("wcf.date.datePicker.previousMonth")),N.innerHTML='<span class="icon icon16 fa-arrow-left"></span>',N.addEventListener("click",(e=>F.previousMonth(e))),e.appendChild(N);const t=document.createElement("span");e.appendChild(t),j=document.createElement("select"),j.className="month jsTooltip",j.title=s.get("wcf.date.datePicker.month"),j.setAttribute("aria-label",s.get("wcf.date.datePicker.month")),j.addEventListener("change",b),t.appendChild(j);let i="";const n=s.get("__monthsShort");for(let e=0;e<12;e++)i+=`<option value="${e}">${n[e]}</option>`;j.innerHTML=i,O=document.createElement("select"),O.className="year jsTooltip",O.title=s.get("wcf.date.datePicker.year"),O.setAttribute("aria-label",s.get("wcf.date.datePicker.year")),O.addEventListener("change",v),t.appendChild(O),P=document.createElement("a"),P.className="next jsTooltip",P.href="#",P.setAttribute("role","button"),P.tabIndex=0,P.title=s.get("wcf.date.datePicker.nextMonth"),P.setAttribute("aria-label",s.get("wcf.date.datePicker.nextMonth")),P.innerHTML='<span class="icon icon16 fa-arrow-right"></span>',P.addEventListener("click",(e=>F.nextMonth(e))),e.appendChild(P),M=document.createElement("ul"),U.appendChild(M);const a=document.createElement("li");a.className="weekdays",M.appendChild(a);const r=s.get("__daysShort");for(let e=0;e<7;e++){let t=e+C;t>6&&(t-=7);const i=document.createElement("span");i.textContent=r[t],a.appendChild(i)}for(let e=0;e<6;e++){const e=document.createElement("li");M.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",w),D.push(t),e.appendChild(t)}}q=document.createElement("footer"),U.appendChild(q),T=document.createElement("select"),T.className="hour",T.title=s.get("wcf.date.datePicker.hour"),T.setAttribute("aria-label",s.get("wcf.date.datePicker.hour")),T.addEventListener("change",_);const l=new Date(2e3,0,1),c=s.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");let d="";for(let e=0;e<24;e++)l.setHours(e),d+=`<option value="${e}">${o.format(l,c)}</option>`;T.innerHTML=d,q.appendChild(T),q.appendChild(document.createTextNode(" : ")),B=document.createElement("select"),B.className="minute",B.title=s.get("wcf.date.datePicker.minute"),B.setAttribute("aria-label",s.get("wcf.date.datePicker.minute")),B.addEventListener("change",_),d="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;d+=`<option value="${e}">${t}</option>`}B.innerHTML=d,q.appendChild(B),document.body.appendChild(U),document.body.addEventListener("focus",E,{capture:!0})}();const t=e.currentTarget,i="INPUT"===t.nodeName?t:t.previousElementSibling;if(i===k)return void m();const a=i.closest(".dialogContent");null!==a&&(n.stringToBool(a.dataset.hasDatepickerScrollListener||"")||(a.addEventListener("scroll",f),a.dataset.hasDatepickerScrollListener="1")),k=i;const r=A.get(k),c=k.dataset.value;let d;c?(d=new Date(parseInt(c,10)),"Invalid Date"===d.toString()&&(d=new Date)):d=new Date,x=h("minDate"),x.getTime()>d.getTime()&&(d=x),I=h("maxDate"),r.isDateTime?(T.value=d.getHours().toString(),B.value=d.getMinutes().toString(),U.classList.add("datePickerTime")):U.classList.remove("datePickerTime"),U.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),function(e,t,i){g(e,t,i);let n="";for(let e=x.getFullYear(),t=I.getFullYear();e<=t;e++)n+=`<option value="${e}">${e}</option>`;O.innerHTML=n,O.value=i.toString(),j.value=t.toString(),U.classList.add("active")}(d.getDate(),d.getMonth(),d.getFullYear()),l.set(U,k),k.nextElementSibling.setAttribute("aria-expanded","true"),L=!1}function m(){if(null===U||!U.classList.contains("active"))return;U.classList.remove("active");const e=A.get(k);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:k});k.nextElementSibling.setAttribute("aria-expanded","false"),k=null}function f(e){if(null===k)return;const t=e.currentTarget,i=d.default.offset(k),n=d.default.offset(t);i.top+k.clientHeight<=n.top||i.top>=n.top+t.offsetHeight||i.left<=n.left||i.left>=n.left+t.offsetWidth?m():l.set(U,k)}function g(e,t,i){const n=void 0!==e,a=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||M.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof i&&(i=parseInt(i||"0",10)),a||i){let r=0!==i;const s=document.createDocumentFragment();s.appendChild(M),a||(t=parseInt(M.dataset.month,10)),i||(i=parseInt(M.dataset.year,10));let l,c=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(c<x?(i=x.getFullYear(),t=x.getMonth(),e=x.getDate(),j.value=t.toString(),O.value=i.toString(),r=!0):c>I&&(i=I.getFullYear(),t=I.getMonth(),e=I.getDate(),j.value=t.toString(),O.value=i.toString(),r=!0),c=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");c.getDay()!==C;)c.setDate(c.getDate()-1);d.default.show(D[35].parentNode);const u=new Date(x.getFullYear(),x.getMonth(),x.getDate());for(let e=0;e<42;e++){if(35===e&&c.getMonth()!==t){d.default.hide(D[35].parentNode);break}const i=D[e];i.textContent=c.getDate().toString(),l=c.getMonth()===t,l&&(c<u||c>I)&&(l=!1),i.classList[l?"remove":"add"]("otherMonth"),l&&(i.href="#",i.setAttribute("role","button"),i.tabIndex=0,i.title=o.formatDate(c),i.setAttribute("aria-label",o.formatDate(c))),c.setDate(c.getDate()+1)}if(M.dataset.month=t.toString(),M.dataset.year=i.toString(),U.insertBefore(s,q),!n&&(c=new Date(i,t,e),c.getDate()!==e)){for(;c.getMonth()!==t;)c.setDate(c.getDate()-1);e=c.getDate()}if(r){for(let e=0;e<12;e++){const t=j.children[e];t.disabled=i===x.getFullYear()&&+t.value<x.getMonth()||i===I.getFullYear()&&+t.value>I.getMonth()}const e=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),P.classList[e<I?"add":"remove"]("active");const n=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");n.setDate(n.getDate()-1),N.classList[n>x?"add":"remove"]("active")}}if(e){for(let t=0;t<35;t++){const i=D[t];i.classList[i.classList.contains("otherMonth")||+i.textContent!==e?"remove":"add"]("active")}M.dataset.day=e.toString()}_()}function _(){const e=A.get(k);let t;n.stringToBool(k.dataset.empty||"")||(t=e.isDateTime?new Date(+M.dataset.year,+M.dataset.month,+M.dataset.day,+T.value,+B.value):new Date(+M.dataset.year,+M.dataset.month,+M.dataset.day),F.setDate(k,t))}function b(e){g(void 0,+e.currentTarget.value)}function v(e){g(void 0,void 0,+e.currentTarget.value)}function w(e){e.preventDefault();const t=e.currentTarget;if(t.classList.contains("otherMonth"))return;k.dataset.empty="false",g(+t.textContent);A.get(k).isDateTime||m()}function y(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&A.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}function E(e){if(null!==U&&U.classList.contains("active"))if(U.contains(e.target))L=!0;else if(L){k.nextElementSibling.focus(),L=!1}else U.querySelector(".previous").focus()}n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c),d=i.__importDefault(d);let S=!1,C=0,L=!1;const A=new Map;let I,x,k=null;const D=[];let M,T,B,j,P,N,q,O,U=null;const F={init(){S||(S=!0,C=parseInt(s.get("wcf.date.firstDayOfTheWeek"),10),a.default.add("WoltLabSuite/Core/Date/Picker",(()=>F.init())),c.default.add("WoltLabSuite/Core/Date/Picker",(()=>m())));const e=new Date;document.querySelectorAll('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)').forEach((t=>{t.classList.add("inputDatePicker"),t.readOnly=!0;const i="datetime"===t.getAttribute("type"),a=i&&n.stringToBool(t.dataset.timeOnly||""),r=n.stringToBool(t.dataset.disableClear||""),l=i&&n.stringToBool(t.dataset.ignoreTimezone||""),c=t.classList.contains("birthday");t.dataset.isDateTime=i?"true":"false",t.dataset.isTimeOnly=a?"true":"false";let d=null,h=t.value;h||(h=t.getAttribute("value")||"");const m=/^\d+-\d+-\d+$/.test(h);if(h){if(a){d=new Date;const e=h.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||m){let e=new Date(h).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const i=Math.floor(e/60).toString(),n=(e%60).toString();t+=2===i.length?i:"0"+i,t+=":",t+=2===n.length?n:"0"+n,c||m?h+="T00:00:00"+t:h=h.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(h)}const e=d.getTime();isNaN(e)?h="":(t.dataset.value=e.toString(),h=a?o.formatTime(d):i?o.formatDateTime(d):o.formatDate(d))}const f=0===h.length;if(c?(t.dataset.minDate="120",t.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(t.min&&(t.dataset.minDate=t.min),t.max&&(t.dataset.maxDate=t.max)),u(t,e,!0),u(t,e,!1),(t.dataset.minDate||"")===(t.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+t.id+"').");t.type="text",t.value=h,t.dataset.empty=f?"true":"false";const g=t.dataset.placeholder||"";g&&(t.placeholder=g);const _=document.createElement("input");_.id=t.id+"DatePicker",_.name=t.name,_.type="hidden",null!==d&&(_.value=a?o.format(d,"H:i"):l?o.format(d,"Y-m-dTH:i:s"):o.format(d,i?"c":"Y-m-d")),t.parentNode.insertBefore(_,t),t.removeAttribute("name"),t.addEventListener("click",p);let b=null;if(!t.disabled){const e=document.createElement("div");e.className="inputAddon",b=document.createElement("a"),b.className="inputSuffix button jsTooltip",b.href="#",b.setAttribute("role","button"),b.tabIndex=0,b.title=s.get("wcf.date.datePicker"),b.setAttribute("aria-label",s.get("wcf.date.datePicker")),b.setAttribute("aria-haspopup","true"),b.setAttribute("aria-expanded","false"),b.addEventListener("click",p),e.appendChild(b);let i=document.createElement("span");if(i.className="icon icon16 fa-calendar",b.appendChild(i),t.parentNode.insertBefore(e,t),e.insertBefore(t,b),!r){const n=document.createElement("a");n.className="inputSuffix button",n.addEventListener("click",this.clear.bind(this,t)),f&&n.style.setProperty("visibility","hidden",""),e.appendChild(n),i=document.createElement("span"),i.className="icon icon16 fa-times",n.appendChild(i)}}const v=["tiny","short","medium","long"];let w=!1;for(let e=0;e<4;e++)t.classList.contains(v[e])&&(w=!0);w||t.classList.add("short"),A.set(t,{clearButton:b,shadow:_,disableClear:r,isDateTime:i,isEmpty:f,isTimeOnly:a,ignoreTimezone:l,onClose:null})}))},previousMonth(e){e.preventDefault(),"0"===j.value?(j.value="11",O.value=(+O.value-1).toString()):j.value=(+j.value-1).toString(),g(void 0,+j.value,+O.value)},nextMonth(e){e.preventDefault(),"11"===j.value?(j.value="0",O.value=(+O.value+1).toString()):j.value=(+j.value+1).toString(),g(void 0,+j.value,+O.value)},getDate(e){const t=(e=y(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=y(e);const i=A.get(e);e.dataset.value=t.getTime().toString();let n,a="";i.isDateTime?i.isTimeOnly?(n=o.formatTime(t),a="H:i"):i.ignoreTimezone?(n=o.formatDateTime(t),a="Y-m-dTH:i:s"):(n=o.formatDateTime(t),a="c"):(n=o.formatDate(t),a="Y-m-d"),e.value=n,i.shadow.value=o.format(t,a),i.disableClear||i.clearButton.style.removeProperty("visibility")},getValue(e){e=y(e);const t=A.get(e);return t?t.shadow.value:""},clear(e){e=y(e);const t=A.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||t.clearButton.style.setProperty("visibility","hidden",""),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=y(e);const t=A.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),i.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",p),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,A.delete(e)},setCloseCallback(e,t){e=y(e),A.get(e).onClose=t}};return window.__wcf_bc_datePicker=F,F})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports","tslib","../Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError(`Invalid delta ${t}. Delta must be in the interval [0, 86400000].`);this._callback=e.bind(void 0,this),this._delta=t,this.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Date/Time/Relative",["require","exports","tslib","../../Core","../Util","../../Dom/Change/Listener","../../Language","../../Timer/Repeating"],(function(e,t,i,n,o,a,r,s){"use strict";function l(){document.hidden?(u=!1,h=!1):(u=!0,h&&(c(),h=!1))}function c(){if(!u)return void(h||(h=!0));const e=new Date,t=(e.getTime()-e.getMilliseconds())/1e3;document.querySelectorAll("time").forEach((i=>{!function(e,t,i){if(!e.classList.contains("datetime")||n.stringToBool(e.dataset.isFutureDate||""))return;const a=parseInt(e.dataset.timestamp,10)+d,s=e.dataset.date,l=e.dataset.time,c=e.dataset.offset;e.title||(e.title=r.get("wcf.date.dateTimeFormat").replace(/%date%/,s).replace(/%time%/,l));if(a>=i||i<a+60)e.textContent=r.get("wcf.date.relative.now");else if(i<a+3540){const t=Math.max(Math.round((i-a)/60),1);e.textContent=r.get("wcf.date.relative.minutes",{minutes:t})}else if(i<a+86400){const t=Math.round((i-a)/3600);e.textContent=r.get("wcf.date.relative.hours",{hours:t})}else if(i<a+518400){const i=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=Math.ceil((i.getTime()/1e3-a)/86400),s=o.getTimezoneDate(1e3*a,1e3*parseInt(c,10)).getDay(),d=r.get("__days")[s];e.textContent=r.get("wcf.date.relative.pastDays",{days:n,day:d,time:l})}else e.textContent=r.get("wcf.date.shortDateTimeFormat").replace(/%date%/,s).replace(/%time%/,l)}(i,e,t)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s);let d,u=!0,h=!1;t.setup=function(){d=Math.trunc(Date.now()/1e3-window.TIME_NOW),new s.default(c,6e4),a.default.add("WoltLabSuite/Core/Date/Time/Relative",c),document.addEventListener("visibilitychange",l)}})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.touch=t.platform=t.editor=t.browser=t.setup=void 0;let i="other",n="none",o="desktop",a=!1;t.setup=function(){if("object"==typeof window.chrome)i="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,n=e.length;t<n;t++){const n=e[t];0===n.indexOf("-ms-")?i="microsoft":0===n.indexOf("-moz-")?i="firefox":"firefox"!==i&&0===n.indexOf("-webkit-")&&(i="safari")}}const e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("crios")?(i="chrome",o="ios"):/(?:iphone|ipad|ipod)/.test(e)?(i="safari",o="ios"):-1!==e.indexOf("android")?o="android":-1!==e.indexOf("iemobile")&&(i="microsoft",o="windows"),"desktop"!==o||-1===e.indexOf("mobile")&&-1===e.indexOf("tablet")||(o="mobile"),n="redactor",a="ontouchstart"in window||"msMaxTouchPoints"in window.navigator&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(i="safari",o="ios")},t.browser=function(){return i},t.editor=function(){return n},t.platform=function(){return o},t.touch=function(){return a}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core","../Environment"],(function(e,t,i,n,o){"use strict";function a(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");p.has(e)&&(e=p.get(e)),h.has(e)&&(e=h.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(r),s.set(e,t),e!==t.mql.media&&p.set(t.mql.media,e)),t}function r(e){const t=a(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()})),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setDialogContainer=t.pageOverlayIsActive=t.pageOverlayClose=t.pageOverlayOpen=t.scrollEnable=t.scrollDisable=t.is=t.remove=t.on=void 0,n=i.__importStar(n),o=i.__importStar(o);const s=new Map;let l,c=0,d=0,u=0;const h=new Map(Object.entries({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),p=new Map;t.on=function(e,t){const i=n.getUuid(),o=a(e);return"function"==typeof t.match&&o.callbacksMatch.set(i,t.match),"function"==typeof t.unmatch&&o.callbacksUnmatch.set(i,t.unmatch),"function"==typeof t.setup&&(o.mql.matches?t.setup():o.callbacksSetup.set(i,t.setup)),i},t.remove=function(e,t){const i=a(e);i.callbacksMatch.delete(t),i.callbacksUnmatch.delete(t),i.callbacksSetup.delete(t)},t.is=function(e){return a(e).mql.matches},t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");"ios"===o.platform()?(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")):e.style.setProperty("margin-top",`-${d}px`,""),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");"ios"===o.platform()?(e.style.removeProperty("position"),e.style.removeProperty("top")):e.style.removeProperty("margin-top"),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){}})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Change/Listener","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";function d(e){const t=e.currentTarget,i=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,n=i.length;e<n;e++){const n=i[e],o=s.default.identify(n),a=s.default.offset(n),r=s.default.offset(t);a.top+n.clientHeight<=r.top||a.top>=r.top+t.offsetHeight||a.left<=r.left||a.left>=r.left+t.offsetWidth?S.toggleDropdown(o):S.setAlignment(v.get(o),w.get(o))}}function u(){v.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(o.stringToBool(e.dataset.isOverlayDropdownButton||""))S.setAlignment(e,w.get(t));else{const i=w.get(e.id);o.stringToBool(i.dataset.dropdownIgnorePageScroll||"")||S.close(t)}}))}function h(e,t){_.forEach(e,(i=>{i(e,t)}))}function p(e,t,i,n){let a=!1;if(null!==e){e.preventDefault(),e.stopPropagation();const i=e.currentTarget;t=i.dataset.target,void 0===n&&e instanceof MouseEvent&&(o.stringToBool(i.dataset.isKeyboardClick||"")?(a=!0,delete i.dataset.isKeyboardClick):n=!0)}let s=v.get(t),l=!1;if(void 0!==s){let i,a;if(e&&(i=e.currentTarget,a=i.parentNode,a!==s&&(a.classList.add("dropdown"),a.id=s.id,s.classList.remove("dropdown"),s.id="",s=a,v.set(t,a))),void 0===n&&(i=s.closest(".dropdownToggle"),i||(i=s.querySelector(".dropdownToggle"),!i&&s.id&&(i=document.querySelector('[data-target="'+s.id+'"]'))),i&&o.stringToBool(i.dataset.dropdownLazyInit||"")&&(n=!0)),o.stringToBool(s.dataset.dropdownPreventToggle||"")&&s.classList.contains("dropdownOpen")&&(l=!0),""===s.dataset.isOverlayDropdownButton){const e=r.parentByClass(s,"dialogContent");s.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",d)}}return E="",v.forEach(((e,r)=>{const s=w.get(r);let c=null;if(e.classList.contains("dropdownOpen"))if(l)E=t;else{e.classList.remove("dropdownOpen"),s.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),h(r,"close")}else if(r===t&&s.childElementCount>0){E=t,e.classList.add("dropdownOpen"),s.classList.add("dropdownOpen");const l=e.querySelector(".dropdownToggle");l&&l.setAttribute("aria-expanded","true");const d=s.childElementCount>0?s.children[0]:null;if(d&&o.stringToBool(d.dataset.scrollToActive||"")){delete d.dataset.scrollToActive;let e=null;for(let t=0,i=d.childElementCount;t<i;t++)if(d.children[t].classList.contains("active")){e=d.children[t];break}e&&(d.scrollTop=Math.max(e.offsetTop+e.clientHeight-s.clientHeight,0))}const u=s.querySelector(".scrollableDropdownMenu");null!==u&&u.classList[u.scrollHeight>u.clientHeight?"add":"remove"]("forceScrollbar"),h(r,"open"),n||(s.setAttribute("role","menu"),s.tabIndex=-1,s.removeEventListener("keydown",f),s.addEventListener("keydown",f),s.querySelectorAll("li").forEach((e=>{e.clientHeight&&((null===c||e.classList.contains("active"))&&(c=e),e.setAttribute("role","menuitem"),e.tabIndex=-1)}))),S.setAlignment(e,s,i),null!==c&&(c.focus(),a&&c.classList.add("focus-visible"))}})),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}function m(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):p(e)))}function f(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const i=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||i.reverse();let n=null;const o=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let a=i.indexOf(t);"End"!==e.key&&"Home"!==e.key||(a=-1);for(let e=a+1;e<i.length;e++)if(o(i[e])){n=i[e];break}null===n&&(n=i.find(o)||null),null!==n&&n.focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();let i=t;1!==i.childElementCount||"SPAN"!==i.children[0].nodeName&&"A"!==i.children[0].nodeName||(i=i.children[0]);const n=v.get(E),a=n.querySelector(".dropdownToggle"),r=n.dataset.a11yMouseEvent||"click";o.triggerEvent(i,r),a&&a.focus()}else if("Escape"===e.key||"Tab"===e.key){e.preventDefault();const t=v.get(E);let i=t.querySelector(".dropdownToggle");null!==i||t.classList.contains("dropdown")||(i=t),p(null,E),i&&i.focus()}}let g;n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importDefault(c);const _=new n.default;let b=!1;const v=new Map,w=new Map;let y,E="";const S={setup(){b||(b=!0,y=document.createElement("div"),y.className="dropdownMenuContainer",document.body.appendChild(y),g=document.getElementsByClassName("dropdownToggle"),S.initAll(),c.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>S.closeAll())),a.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>S.initAll())),document.addEventListener("scroll",u),window.bc_wcfSimpleDropdown=this)},initAll(){for(let e=0,t=g.length;e<t;e++)S.init(g[e],!1)},init(e,t){if(S.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const i=r.parentByClass(e,"dropdown");if(null===i)throw new Error("Invalid dropdown passed, button '"+s.default.identify(e)+"' does not have a parent with .dropdown.");const n=r.nextByClass(e,"dropdownMenu");if(null===n)throw new Error("Invalid dropdown passed, button '"+s.default.identify(e)+"' does not have a menu as next sibling.");y.appendChild(n);const a=s.default.identify(i);if(!v.has(a)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",p),e.addEventListener("keydown",m),v.set(a,i),w.set(a,n),/^wcf\d+$/.test(a)||(n.dataset.source=a),n.childElementCount&&n.children[0].classList.contains("scrollableDropdownMenu"))){const e=n.children[0];e.dataset.scrollToActive="true";let t=null,i=null;e.addEventListener("wheel",(n=>{null===t&&(t=e.clientHeight),null===i&&(i=e.scrollHeight),(n.deltaY<0&&0===e.scrollTop||n.deltaY>0&&e.scrollTop+t===i)&&n.preventDefault()}),{passive:!1})}return e.dataset.target=a,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",o.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){S.setup();const i=s.default.identify(e);v.has(i)||(v.set(i,e),y.appendChild(t),w.set(i,t))},registerCallback(e,t){_.add(e,t)},getDropdown:e=>v.get(e),getDropdownMenu:e=>w.get(e),toggleDropdown(e,t,i){p(null,e,t,i)},setAlignment(e,t,i){const n=e.querySelector(".dropdownToggle"),o=null!==n?n.parentNode:null;let a;o&&o.classList.contains("inputAddonTextarea")&&(a=n),l.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:a||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=v.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const i=w.get(e);S.setAlignment(t,i)},isOpen(e){const t=w.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t){const i=w.get(e);void 0===i||i.classList.contains("dropdownOpen")||S.toggleDropdown(e,void 0,t)},close(e){const t=v.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),w.get(e).classList.remove("dropdownOpen"))},closeAll(){v.forEach(((e,t)=>{e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),w.get(t).classList.remove("dropdownOpen"),h(t,"close"))}))},destroy(e){var t;if(!v.has(e))return!1;try{S.close(e),null===(t=w.get(e))||void 0===t||t.remove()}catch(e){}return w.delete(e),v.delete(e),!0},_toggle:(e,t,i,n)=>p(e,t,i,n)};return S})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./Dropdown/Simple"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);let u,h,p=null;const m=new Map;let f=!1;const g=new WeakMap,_=new Map;let b;const v=["onBeforeClose","onClose","onShow"],w=["number","password","search","tel","text","url"],y=['a[href]:not([tabindex^="-"]):not([inert])','area[href]:not([tabindex^="-"]):not([inert])',"input:not([disabled]):not([inert])","select:not([disabled]):not([inert])","textarea:not([disabled]):not([inert])","button:not([disabled]):not([inert])",'iframe:not([tabindex^="-"]):not([inert])','audio:not([tabindex^="-"]):not([inert])','video:not([tabindex^="-"]):not([inert])','[contenteditable]:not([tabindex^="-"]):not([inert])','[tabindex]:not([tabindex^="-"]):not([inert])'];return{setup(){h=document.createElement("div"),h.classList.add("dialogOverlay"),h.setAttribute("aria-hidden","true"),h.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),h.addEventListener("wheel",(e=>{e.target===h&&e.preventDefault()}),{passive:!1}),document.getElementById("content").appendChild(h),b=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName)return this.close(p),!1}return!0},a.on("screen-xs",{match(){f=!0},unmatch(){f=!1},setup(){f=!0}}),this._initStaticDialogs(),o.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{m.forEach((e=>{n.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const i=document.getElementById(t);null!==i&&(i.classList.remove("jsStaticDialogContent"),i.dataset.isStaticDialog="true",r.default.hide(i),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(i.id,null,{title:i.dataset.title||""})})))}}))},open(t,o){let a=g.get(t);if(a&&n.isPlainObject(a))return this.openStatic(a.id,void 0===o?null:o);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!n.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(a={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),r.default.show(c)}else if(null===s.source)s.source=o;else if("function"==typeof s.source)s.source();else if(n.isPlainObject(s.source)){if("string"!=typeof o||""===o.trim())return new Promise(((t,i)=>{e(["../Ajax"],t,i)})).then(i.__importStar).then((e=>{const i=s.source;e.api(this,i.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof i.after&&i.after(m.get(l).content,e))}))})),{};s.source=o}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,r.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return g.set(t,a),_.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,o,r){a.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||a.scrollDisable()),m.has(t)?this._updateDialog(t,o):((r=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},r||{})).closable||(r.backdropCloseOnClick=!1),r.closeConfirmMessage&&(r.onBeforeClose=t=>{new Promise(((t,i)=>{e(["./Confirmation"],t,i)})).then(i.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:r.closeConfirmMessage||""})}))}),this._createDialog(t,o,r));const c=m.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{var e;null===(e=c.content.querySelector("input, textarea"))||void 0===e||e.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const n=i.dialog.querySelector(".dialogTitle");n&&(n.textContent=t)},setCallback(e,t,i){if("object"==typeof e){const t=g.get(e);void 0!==t&&(e=t.id)}const n=m.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===v.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof i&&null!==i)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof i+"' given).");n[t]=i},removeCallback(e,t){if("object"==typeof e){const t=g.get(e);void 0!==t&&(e=t.id)}const i=m.get(e);if(void 0===i)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===v.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");i[t]=void 0},_createDialog(e,t,i){let n=null;if(null===t&&(n=document.getElementById(e),null===n))throw new Error("Expected either a HTML string or an existing element id.");const o=document.createElement("div");o.classList.add("dialogContainer"),o.setAttribute("aria-hidden","true"),o.setAttribute("role","dialog"),o.dataset.id=e;const a=document.createElement("header");o.appendChild(a);const s=r.default.getUniqueId();o.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,l.id=s,a.appendChild(l),i.closable){const e=document.createElement("a");e.className="dialogCloseButton jsTooltip",e.href="#",e.setAttribute("role","button"),e.tabIndex=0,e.title=i.closeButtonLabel,e.setAttribute("aria-label",i.closeButtonLabel),e.addEventListener("click",(e=>this._close(e))),a.appendChild(e);const t=document.createElement("span");t.className="icon icon24 fa-times",e.appendChild(t)}const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),i.disableContentPadding&&c.classList.add("dialogContentNoPadding"),o.appendChild(c),c.addEventListener("wheel",(e=>{let t,i,n,o=!1,a=e.target;for(;;){if(t=a.clientHeight,i=a.scrollHeight,t<i){if(n=a.scrollTop,e.deltaY<0&&n>0){o=!0;break}if(e.deltaY>0&&n+t<i){o=!0;break}}if(!a||a===c)break;a=a.parentNode}o||e.preventDefault()}),{passive:!1}),null===n)if("string"==typeof t)d=document.createElement("div"),d.id=e,r.default.setInnerHtml(d,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");{const i=[];let n;for(let e=0,o=t.childNodes.length;e<o;e++)n=t.childNodes[e],n.nodeType===Node.ELEMENT_NODE&&i.push(n);"DIV"!==i[0].nodeName||i.length>1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=i[0]}}else d=n;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&r.default.show(d),m.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,closable:i.closable,content:d,dialog:o,header:a,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow,submitButton:null,inputFields:new Set}),h.insertBefore(o,h.firstChild),"function"==typeof i.onSetup&&i.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&r.default.setInnerHtml(i.content,t),n.stringToBool(i.dialog.getAttribute("aria-hidden"))){d.default.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===u&&(u=this._maintainFocus.bind(this),document.body.addEventListener("focus",u,{capture:!0})),i.closable&&n.stringToBool(h.getAttribute("aria-hidden"))&&window.addEventListener("keyup",b),i.dialog.parentNode.insertBefore(i.dialog,i.dialog.parentNode.firstChild),i.dialog.setAttribute("aria-hidden","false"),h.setAttribute("aria-hidden","false"),h.setAttribute("close-on-click",i.backdropCloseOnClick?"true":"false"),p=e;const t=i.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),this._setFocusToFirstItem(i.dialog,!1),t&&t.removeAttribute("inert"),"function"==typeof i.onShow&&i.onShow(i.content),n.stringToBool(i.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:i.content,id:e})}this.rebuild(e),o.default.trigger()},_maintainFocus(e){if(p){const t=m.get(p),i=e.target;t.dialog.contains(i)||i.closest(".dropdownMenuContainer")||i.closest(".datePicker")||this._setFocusToFirstItem(t.dialog,!0)}},_setFocusToFirstItem(e,t){let i=this._getFirstFocusableChild(e);null!==i&&(t&&("username"!==i.id&&"username"!==i.name||"safari"===l.browser()&&"ios"===l.platform()&&(i=null)),i&&setTimeout((()=>{i.focus()}),1))},_getFirstFocusableChild(e){const t=e.querySelectorAll(y.join(","));for(let e=0,i=t.length;e<i;e++)if(t[e].offsetWidth&&t[e].offsetHeight&&t[e].getClientRects().length)return t[e];return null},rebuild(e){const t=this._getDialogId(e),i=m.get(t);if(void 0===i)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(n.stringToBool(i.dialog.getAttribute("aria-hidden")))return;const o=i.content.parentNode,a=i.content.querySelector(".formSubmit");let s=0;null!==a?(o.classList.add("dialogForm"),a.classList.add("dialogFormSubmit"),s+=r.default.outerHeight(a),s-=1,o.style.setProperty("margin-bottom",`${s}px`,"")):(o.classList.remove("dialogForm"),o.style.removeProperty("margin-bottom")),s+=r.default.outerHeight(i.header);const c=window.innerHeight*(f?1:.8)-s;o.style.setProperty("max-height",~~c+"px",""),"chrome"===l.browser()&&(i.content.scrollHeight>c?i.content.style.setProperty("margin-right","-1px",""):i.content.style.removeProperty("margin-right")),"chrome"!==l.browser()&&"safari"!==l.browser()||o.classList.add("jsWebKitFractionalPixelFix");const d=_.get(t);if(void 0!==d&&"function"==typeof d._dialogSubmit){const e=i.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),n=i.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===n)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",i.content));if(i.submitButton!==n){i.submitButton=n,n.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const o=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let a;for(let t=0,n=e.length;t<n;t++)a=e[t],i.inputFields.has(a)||(-1!==w.indexOf(a.type)?(i.inputFields.add(a),a.addEventListener("keydown",o)):console.warn("Unsupported input type.",a))}}},_submit(e){const t=m.get(e);let i=!0;if(t.inputFields.forEach((e=>{e.required&&(""===e.value.trim()?(r.default.innerError(e,s.get("wcf.global.form.error.empty")),i=!1):r.default.innerError(e,!1))})),i){const t=_.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(e){e.preventDefault();const t=m.get(p);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(p),!1):(this.close(p),!0)},_closeOnBackdrop(e){e.target===h&&(n.stringToBool(h.getAttribute("close-on-click"))?this._close(e):e.preventDefault())},close(e){e=this._getDialogId(e);let t=m.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");t.dialog.setAttribute("aria-hidden","true");const i=document.activeElement;i.closest(".dialogContainer")===t.dialog&&i.blur(),"function"==typeof t.onClose&&t.onClose(e),p=null;for(let e=0;e<h.childElementCount;e++){const t=h.children[e];if(!n.stringToBool(t.getAttribute("aria-hidden"))){p=t.dataset.id||"";break}}a.pageOverlayClose(),null===p?(h.setAttribute("aria-hidden","true"),h.dataset.closeOnClick="false",t.closable&&window.removeEventListener("keyup",b)):(t=m.get(p),h.dataset.closeOnClick=t.backdropCloseOnClick?"true":"false"),"desktop"!==l.platform()&&a.scrollEnable()},getDialog(e){return m.get(this._getDialogId(e))},isOpen(e){const t=this.getDialog(e);return void 0!==t&&"false"===t.dialog.getAttribute("aria-hidden")},destroy(e){if("object"!=typeof e)throw new TypeError("Expected the callback object as parameter.");if(g.has(e)){const t=g.get(e).id;this.isOpen(t)&&this.close(t),m.has(t)&&(m.get(t).dialog.remove(),m.delete(t)),g.delete(e)}},_getDialogId(e){if("object"==typeof e){const t=g.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:()=>({})}})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,i,n){"use strict";function o(e){if(!a.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return a.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleDropdown=t.registerCallback=t.getDropdownMenu=t.init=void 0,n=i.__importDefault(n);const a=new Map;let r=0;t.init=function(e,t){if(a.has(e))return;const i=document.createElement("div");i.id="reusableDropdownGhost"+r++,n.default.initFragment(i,t),a.set(e,i.id)},t.getDropdownMenu=function(e){return n.default.getDropdownMenu(o(e))},t.registerCallback=function(e,t){n.default.registerCallback(o(e),t)},t.toggleDropdown=function(e,t){n.default.toggleDropdown(o(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Abstract",["require","exports","tslib","../../../Core","../../../Environment","../../../Event/Handler","../../../Language","../../../Dom/Traverse","../../Screen"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);const c=document.getElementById("pageContainer");let d="";class u{constructor(e,t,i){if(this.activeList=[],this.depth=0,this.enabled=!0,this.items=new Map,this.removeActiveList=!1,"packageInstallationSetup"===document.body.dataset.template)return;this.eventIdentifier=e,this.menu=document.getElementById(t);const n=this.open.bind(this);this.button=document.querySelector(i),this.button.addEventListener("click",n),this.initItems(),this.initHeader(),a.add(this.eventIdentifier,"open",n),a.add(this.eventIdentifier,"close",this.close.bind(this)),a.add(this.eventIdentifier,"updateButtonState",this.updateButtonState.bind(this)),this.menu.addEventListener("animationend",(()=>{this.menu.classList.contains("open")||this.menu.querySelectorAll(".menuOverlayItemList").forEach((e=>{e.classList.remove("active","hidden")}))})),this.menu.children[0].addEventListener("transitionend",(()=>{if(this.menu.classList.add("allowScroll"),this.removeActiveList){this.removeActiveList=!1;const e=this.activeList.pop();e&&e.classList.remove("activeList")}}));const r=document.createElement("div");r.className="menuOverlayMobileBackdrop",r.addEventListener("click",this.close.bind(this)),this.menu.insertAdjacentElement("afterend",r),this.menu.parentElement.insertBefore(r,this.menu.nextSibling),this.updateButtonState(),"android"===o.platform()&&this.initializeAndroid()}open(e){return!!this.enabled&&(e instanceof Event&&e.preventDefault(),this.menu.classList.add("open"),this.menu.classList.add("allowScroll"),this.menu.children[0].classList.add("activeList"),l.scrollDisable(),c.classList.add("menuOverlay-"+this.menu.id),l.pageOverlayOpen(),!0)}close(e){return e instanceof Event&&e.preventDefault(),!!this.menu.classList.contains("open")&&(this.menu.classList.remove("open"),l.scrollEnable(),l.pageOverlayClose(),c.classList.remove("menuOverlay-"+this.menu.id),!0)}enable(){this.enabled=!0}disable(){this.enabled=!1,this.close()}initializeAndroid(){let e;switch(this.menu.id){case"pageUserMenuMobile":e="right";break;case"pageMainMenuMobile":e="left";break;default:return}const t=this.menu.nextElementSibling;let i;document.addEventListener("touchstart",(t=>{const o=t.touches;let a,r;const s=this.menu.classList.contains("open");if("left"===e?(a=!s&&o[0].clientX<20,r=s&&Math.abs(this.menu.offsetWidth-o[0].clientX)<20):(a=s&&Math.abs(document.body.clientWidth-this.menu.offsetWidth-o[0].clientX)<20,r=!s&&document.body.clientWidth-o[0].clientX<20),o.length>1)d&&n.triggerEvent(document,"touchend");else if(!d&&(a||r)){if(l.pageOverlayIsActive()){if(!c.classList.contains(`menuOverlay-${this.menu.id}`))return}document.documentElement.classList.contains("redactorActive")||(i={x:o[0].clientX,y:o[0].clientY},a&&(d="left"),r&&(d="right"))}})),document.addEventListener("touchend",(n=>{if(!d||!i)return;if(!this.menu.classList.contains("open"))return i=void 0,void(d="");let o;o=n?n.changedTouches[0].clientX:i.x,this.menu.classList.add("androidMenuTouchEnd"),this.menu.style.removeProperty("transform"),t.style.removeProperty(e),this.menu.addEventListener("transitionend",(()=>{this.menu.classList.remove("androidMenuTouchEnd")}),{once:!0}),"left"===e?("left"===d&&o<i.x+100&&this.close(),"right"===d&&o<i.x-100&&this.close()):("left"===d&&o>i.x+100&&this.close(),"right"===d&&o>i.x-100&&this.close()),i=void 0,d=""})),document.addEventListener("touchmove",(n=>{if(!d||!i)return;const o=n.touches;let a=!1;"left"===d&&(a=o[0].clientX>i.x+5),"right"===d&&(a=o[0].clientX<i.x-5);const r=Math.abs(o[0].clientY-i.y)>20;let s=this.menu.classList.contains("open");if(s||!a||r||(this.open(),s=!0),s){let i=o[0].clientX;"right"===e&&(i=document.body.clientWidth-i),i>this.menu.offsetWidth&&(i=this.menu.offsetWidth),i<0&&(i=0);const n=("left"===e?1:-1)*(i-this.menu.offsetWidth);this.menu.style.setProperty("transform",`translateX(${n}px)`),t.style.setProperty(e,Math.min(this.menu.offsetWidth,i).toString()+"px")}}))}initItems(){this.menu.querySelectorAll(".menuOverlayItemLink").forEach((e=>{this.initItem(e)}))}initItem(e){const t=e.parentElement,i=t.dataset.more;if(i)return void e.addEventListener("click",(n=>{n.preventDefault(),n.stopPropagation(),a.fire(this.eventIdentifier,"more",{handler:this,identifier:i,item:e,parent:t})}));const n=e.nextElementSibling;if(null===n)return;if("OL"!==n.nodeName&&n.classList.contains("menuOverlayItemLinkIcon")){const i=document.createElement("span");for(i.className="menuOverlayItemWrapper",t.insertBefore(i,e),i.appendChild(e);i.nextElementSibling;)i.appendChild(i.nextElementSibling);return}const o="#"!==e.href,r=t.parentElement;let l=n.dataset.title;this.items.set(e,{itemList:n,parentItemList:r}),l||(l=s.childByClass(e,"menuOverlayItemTitle").textContent,n.dataset.title=l);const c=this.showItemList.bind(this,e);if(o){const i=document.createElement("span");i.className="menuOverlayItemWrapper",t.insertBefore(i,e),i.appendChild(e);const n=document.createElement("a");n.href="#",n.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),n.innerHTML='<span class="icon icon24 fa-angle-right"></span>',n.addEventListener("click",c),i.appendChild(n)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener("click",c);const d=document.createElement("li");d.className="menuOverlayHeader";const u=document.createElement("span");u.className="menuOverlayItemWrapper";const h=document.createElement("a");h.href="#",h.className="menuOverlayItemLink menuOverlayBackLink",h.textContent=r.dataset.title||"",h.addEventListener("click",this.hideItemList.bind(this,e));const p=document.createElement("a");if(p.href="#",p.className="menuOverlayItemLinkIcon",p.innerHTML='<span class="icon icon24 fa-times"></span>',p.addEventListener("click",this.close.bind(this)),u.appendChild(h),u.appendChild(p),d.appendChild(u),n.insertBefore(d,n.firstElementChild),!d.nextElementSibling.classList.contains("menuOverlayTitle")){const e=document.createElement("li");e.className="menuOverlayTitle";const t=document.createElement("span");t.textContent=l,e.appendChild(t),n.insertBefore(e,d.nextElementSibling)}}initHeader(){const e=document.createElement("li");e.className="menuOverlayHeader";const t=document.createElement("span");t.className="menuOverlayItemWrapper",e.appendChild(t);const i=document.createElement("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);const n=document.createElement("span");n.className="menuOverlayLogo";const o=this.menu.dataset.pageLogo;n.style.setProperty("background-image",`url("${o}")`,""),i.appendChild(n);const a=document.createElement("a");a.href="#",a.className="menuOverlayItemLinkIcon",a.innerHTML='<span class="icon icon24 fa-times"></span>',a.addEventListener("click",this.close.bind(this)),t.appendChild(a);const r=s.childByClass(this.menu,"menuOverlayItemList");r.insertBefore(e,r.firstElementChild)}hideItemList(e,t){t instanceof Event&&t.preventDefault(),this.menu.classList.remove("allowScroll"),this.removeActiveList=!0;this.items.get(e).parentItemList.classList.remove("hidden"),this.updateDepth(!1)}showItemList(e,t){t.preventDefault();const i=this.items.get(e),o=i.itemList.dataset.load;if(o&&!n.stringToBool(e.dataset.loaded||"")){const e=t.currentTarget.firstElementChild;return e.classList.contains("fa-angle-right")&&(e.classList.remove("fa-angle-right"),e.classList.add("fa-spinner")),void a.fire(this.eventIdentifier,"load_"+o)}this.menu.classList.remove("allowScroll"),i.itemList.classList.add("activeList"),i.parentItemList.classList.add("hidden"),this.activeList.push(i.itemList),this.updateDepth(!0)}updateDepth(e){this.depth+=e?1:-1;let t=-100*this.depth;"rtl"===r.get("wcf.global.pageDirection")&&(t*=-1);this.menu.children[0].style.setProperty("transform",`translateX(${t}%)`,"")}updateButtonState(){let e=!1;const t=this.menu.querySelector(".menuOverlayItemList");this.menu.querySelectorAll(".badgeUpdate").forEach((i=>{~~i.textContent>0&&i.closest(".menuOverlayItemList")===t&&(e=!0)})),this.button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}}return n.enableLegacyInheritance(u),u})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","../../../Core","../../../Dom/Util","../../../Language","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(){super("com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),this.hasItems=!1,this.title=document.getElementById("pageMainMenuMobilePageOptionsTitle"),null!==this.title&&(this.navigationList=document.querySelector(".jsPageNavigationIcons")),this.button.setAttribute("aria-label",a.get("wcf.menu.page")),this.button.setAttribute("role","button")}open(e){if(!super.open(e))return!1;if(null===this.title)return!0;if(this.hasItems=this.navigationList&&this.navigationList.childElementCount>0,this.hasItems){for(;this.navigationList.childElementCount;){const e=this.navigationList.children[0];e.classList.add("menuOverlayItem","menuOverlayItemOption"),e.addEventListener("click",(e=>{e.stopPropagation(),this.close()}));const t=e.children[0];t.classList.add("menuOverlayItemLink"),t.classList.add("box24"),t.children[1].classList.remove("invisible"),t.children[1].classList.add("menuOverlayItemTitle"),this.title.insertAdjacentElement("afterend",e)}o.default.show(this.title)}else o.default.hide(this.title);return!0}close(e){if(!super.close(e))return!1;if(this.hasItems){o.default.hide(this.title);let e=this.title.nextElementSibling;for(;e&&e.classList.contains("menuOverlayItemOption");){e.classList.remove("menuOverlayItem","menuOverlayItemOption"),e.removeEventListener("click",(e=>{e.stopPropagation(),this.close()}));const t=e.children[0];t.classList.remove("menuOverlayItemLink"),t.classList.remove("box24"),t.children[1].classList.add("invisible"),t.children[1].classList.remove("menuOverlayItemTitle"),this.navigationList.appendChild(e),e=e.nextElementSibling}}return!0}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","../../../Core","../../../Event/Handler","../../../Language","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(){const e=document.querySelector("#pageUserMenuMobile > .menuOverlayItemList");if(1===e.childElementCount&&e.children[0].classList.contains("menuOverlayTitle")){document.querySelector("#pageHeader .userPanel").classList.add("hideUserPanel")}else super("com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),o.add("com.woltlab.wcf.userMenu","updateBadge",(e=>this.updateBadge(e))),this.button.setAttribute("aria-label",a.get("wcf.menu.user")),this.button.setAttribute("role","button")}close(e){if(void 0===this.menu)return!1;const t=window.WCF.Dropdown.Interactive.Handler.getOpenDropdown();return t?(e&&(e.preventDefault(),e.stopPropagation()),t.close(),!0):super.close(e)}updateBadge(e){this.menu.querySelectorAll(".menuOverlayItemBadge").forEach((t=>{if(t.dataset.badgeIdentifier===e.identifier){let i=t.querySelector(".badge");e.count?(null===i&&(i=document.createElement("span"),i.className="badge badgeUpdate",t.appendChild(i)),i.textContent=e.count.toString()):null!==i&&i.remove(),this.updateButtonState()}}))}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","../Core","../Dom/Change/Listener","../Environment","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";function p(){B=!0,function(){const e=document.getElementById("pageHeaderSearch"),t=document.getElementById("pageHeaderSearchInput");let i=null;r.add("com.woltlab.wcf.MainMenuMobile","more",(n=>{if("com.woltlab.wcf.search"===n.identifier){n.handler.close(),"ios"===a.platform()&&(i=document.body.scrollTop,h.scrollDisable());const o=document.getElementById("pageHeader");e.style.setProperty("top",`${o.offsetHeight}px`,""),e.classList.add("open"),t.focus(),"ios"===a.platform()&&(document.body.scrollTop=0)}})),document.getElementById("main").addEventListener("click",(()=>{e&&e.classList.remove("open"),"ios"===a.platform()&&i&&(h.scrollEnable(),document.body.scrollTop=i,i=null)}))}(),m(),f(),P&&(q=new d.default,O=new u.default),l.default.add("WoltLabSuite/Core/Ui/Mobile",g),o.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{m(),f()}))}function m(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const i=document.createElement("a");i.className="dropdownLabel";const n=document.createElement("span");n.className="icon icon24 fa-ellipsis-v",i.appendChild(n),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(i,e.firstChild)}))}function f(){document.querySelectorAll(".message").forEach((e=>{if(N.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const i=e.querySelector(".messageQuickOptions");i&&t.childElementCount&&(i.classList.add("active"),i.addEventListener("click",(n=>{const o=n.target;B&&h.is("screen-sm-down")&&"LABEL"!==o.nodeName&&"INPUT"!==o.nodeName&&(n.preventDefault(),n.stopPropagation(),function(e,t,i){if(null===M)M=document.createElement("ul"),M.className="dropdownMenu",c.init("com.woltlab.wcf.jsMobileNavigation",M);else if(M.classList.contains("dropdownOpen")&&(w(),T===e))return;M.innerHTML="",l.default.execute(),C(i);const n=i.previousElementSibling;if(n&&n.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",M.appendChild(e),C(n)}s.set(M,t,{horizontal:"right",allowFlip:"vertical"}),M.classList.add("dropdownOpen"),T=e}(e,i,t))})))}N.add(e)}))}function g(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),B&&M&&w()}function _(){U=!0}function b(){U=!1,H.forEach((function(e){e.classList.remove("open")}))}function v(){H.forEach((function(e){e.addEventListener("mousedown",(function(t){U&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),U=!0}function w(){M.classList.remove("dropdownOpen")}function y(){j=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(function(t){j&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const i=e.parentElement,n=t.target;i.contains(n)||n===i||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}))}))}function E(){j=!0}function S(){j=!1}function C(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const i=e.querySelector("span:not(.icon)");t.innerHTML=`<a href="#">${i.textContent}</a>`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():n.triggerEvent(e,"click"),w()})),M.appendChild(t)}))}function L(){B=!0,P&&(q.enable(),O.enable())}function A(){F&&k(F,".messageGroupLink")}function I(){B=!1,P&&(q.disable(),O.disable())}function x(){F&&D(F),M&&w()}function k(e,t){Array.from(e).forEach((e=>{const i=e.parentElement;let n=i.querySelector(".mobileLinkShadow");if(null===n){const o=e.querySelector(t);o.href&&(n=document.createElement("a"),n.className="mobileLinkShadow",n.href=o.href,i.appendChild(n),i.classList.add("mobileLinkShadowContainer"))}}))}function D(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeShadow=t.rebuildShadow=t.disableShadow=t.disable=t.enableShadow=t.enable=t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importDefault(u),h=i.__importStar(h);let M=null,T=null,B=!1,j=!1,P=!1;const N=new WeakSet;let q,O,U=!1,F=null;const H=[];t.setup=function(e){P=e,document.querySelectorAll(".sidebar").forEach((e=>{H.push(e)})),a.touch()&&document.documentElement.classList.add("touch"),"desktop"!==a.platform()&&document.documentElement.classList.add("mobile");const t=document.querySelector(".messageGroupList");t&&(F=t.getElementsByClassName("messageGroup")),h.on("screen-md-down",{match:L,unmatch:I,setup:p}),h.on("screen-sm-down",{match:A,unmatch:x,setup:A}),h.on("screen-md-down",{match:_,unmatch:b,setup:v}),!a.touch()||"ios"!==a.platform()&&"android"!==a.platform()||h.on("screen-lg",{match:E,unmatch:S,setup:y})},t.enable=L,t.enableShadow=A,t.disable=I,t.disableShadow=x,t.rebuildShadow=k,t.removeShadow=D})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language"],(function(e,t,i,n,o){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==f?(e>=300?(h.classList.contains("initiallyHidden")&&h.classList.remove("initiallyHidden"),h.setAttribute("aria-hidden","false")):h.setAttribute("aria-hidden","true"),s(),-1!==f&&p.classList[e<f?"remove":"add"]("scrolledDown"),f=-1):g()}function r(e){e.preventDefault();document.getElementById("top").scrollIntoView({behavior:"smooth"})}function s(){const e=Array.from(u.children).find((e=>"false"===e.getAttribute("aria-hidden")));u.classList[e?"add":"remove"]("active")}function l(){if(m)return;m=!0,p=document.createElement("div"),p.className="pageAction",u=document.createElement("div"),u.className="pageActionButtons",p.appendChild(u),h=function(){const e=document.createElement("a");return e.className="button buttonPrimary pageActionButtonToTop initiallyHidden jsTooltip",e.href="",e.title=o.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='<span class="icon icon32 fa-angle-up"></span>',e.addEventListener("click",r),e}(),p.appendChild(h),document.body.appendChild(p);const e=n.debounce(a,100);window.addEventListener("scroll",(()=>{-1===f&&(f=window.pageYOffset,window.setTimeout((()=>{a(),f=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==f&&(f=-1)}),{passive:!0}),a()}function c(e){const t=d.get(e);if(t){t.parentElement.setAttribute("aria-hidden","true"),s()}}Object.defineProperty(t,"__esModule",{value:!0}),t.show=t.hide=t.remove=t.get=t.has=t.add=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o);const d=new Map;let u,h,p,m=!1,f=-1;const g=n.debounce((()=>{f=-1}),50);t.setup=l,t.add=function(e,t,i){l();const n=document.createElement("div");n.className="pageActionButton",n.dataset.name=e,n.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),n.appendChild(t);let o=null;i&&(o=d.get(i)||null,o&&(o=o.parentElement)),!o&&u.childElementCount&&(o=u.children[0]),o||(o=u.firstChild),u.insertBefore(n,o),p.classList.remove("scrolledDown"),d.set(e,t),n.offsetParent,n.setAttribute("aria-hidden","false"),s()},t.has=function(e){return d.has(e)},t.get=function(e){return d.get(e)},t.remove=function(e){const t=d.get(e);if(void 0!==t){const i=t.parentElement,o=()=>{try{n.stringToBool(i.getAttribute("aria-hidden"))&&(u.removeChild(i),d.delete(e)),i.removeEventListener("transitionend",o)}catch(e){}};i.addEventListener("transitionend",o),c(e)}},t.hide=c,t.show=function(e){const t=d.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),p.classList.remove("scrolledDown"),s()}}})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e){this.containers=new Map,this.isLegacy=!1,this.store=null,this.tabs=new Map,this.container=e}validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=o.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;o.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=a.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const i=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+i+"') exists more than once.");const n=this.containers.get(t);if(void 0===n)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+i+"').");if(n.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+i+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+t+"'] (tab menu id: '"+i+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+i+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEach((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(e){this.tabs.forEach((t=>{if(!e||e.get(t.dataset.name||"")!==t){const e=t.children[0];if(e.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let t=!1;e.addEventListener("touchstart",(()=>{t=!0})),e.addEventListener("touchmove",(()=>{t=!1})),e.addEventListener("touchend",(e=>{t&&(t=!1,e.preventDefault(),this._onClick(e))}))}}}));let t=null;if(!e){const e=l.getIdentifierFromHash();let i;if(""!==e&&(i=this.tabs.get(e),i)){const e=this.container.parentNode;e.classList.contains("tabMenuContainer")&&(t=e)}if(!i){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){i||a.default.isHidden(e)||e.previousElementSibling&&!a.default.isHidden(e.previousElementSibling)||(i=e)})):"string"==typeof e&&"false"!==e&&(i=this.tabs.get(e))}i&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,i,!0));const n=this.container.dataset.store;if(n){const e=document.createElement("input");e.type="hidden",e.name=n,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}}return t}select(t,n,o){if(t=t?t.toString():"",!(n=n||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((i=>{e===t&&(n=i),e++}))}if(!n)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||n.dataset.name||"";const a=this.getActiveTab();let r=null;if(a){const e=a.dataset.name;if(e===t)return;o||s.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:a,tabName:e}),a.classList.remove("active"),r=this.containers.get(a.dataset.name||""),r.classList.remove("active"),r.classList.add("hidden"),this.isLegacy&&(a.classList.remove("ui-state-active"),r.classList.remove("ui-state-active"))}n.classList.add("active");const c=this.containers.get(t);if(c.classList.add("active"),c.classList.remove("hidden"),this.isLegacy&&(n.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this.store&&(this.store.value=t),!o){s.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:n,activeName:t,previous:a,previousName:a?a.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(n),oldTab:e(a),newPanel:e(c),oldPanel:e(r)});let i=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?i+=window.location.hash:i+="#"+t,window.history.replaceState(void 0,"",i)}new Promise(((t,i)=>{e(["../TabMenu"],t,i)})).then(i.__importStar).then((e=>{e.scrollToTab(n)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||a.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}rebuild(){const e=new Map(this.tabs);this.validate(),this.init(e)}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const i=e.children[0];/#([^#]+)$/.exec(i.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,i,n){"use strict";function o(){null!==s&&window.clearTimeout(s),s=window.setTimeout((()=>{null!==a&&a(),window.removeEventListener("scroll",o),a=null,s=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,n=i.__importDefault(n);let a=null,r=null,s=null;t.element=function(e,t){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(null!==a)throw new Error("Cannot scroll to element, a concurrent request is running.");t&&(a=t,window.addEventListener("scroll",o));let i=n.default.offset(e).top;if(null===r){r=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;r="fixed"===t||"static"===t?e.offsetHeight:0}}r>0&&(i<=r?i=0:i-=r);const s=window.pageYOffset;window.scrollTo({left:0,top:i,behavior:"smooth"}),window.setTimeout((()=>{s===window.pageYOffset&&o()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=o.default.identify(e);if(b.has(t))return;let i=new a.default(e);if(!i.validate())return;const n=i.init();if(b.set(t,i),n instanceof HTMLElement){const e=m(n.parentNode.id);e&&(i=e,i.select(n.id,void 0,!0))}const r=document.querySelector("#"+t+" > nav > ul");r.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===r?(r.classList.add("active"),g=r):(r.classList.remove("active"),g=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){i=null,p(e)}let i=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{t.defaultPrevented||e.querySelectorAll("input, select").forEach((e=>{if(!e.checkValidity()){t.preventDefault();const i=m(e.closest(".tabMenuContainer").id),n=e.closest(".tabMenuContent");return i.select(n.dataset.name||""),void l.element(e,(()=>{e.reportValidity()}))}}))}))}}))}function d(e){_=!0,b.forEach((t=>{const i=t.getActiveTab();e?p(i.closest(".menu, .tabMenu")):f(i)}))}function u(){_=!1}function h(e,t,i,n,o,a){(a||t>0)&&(t-=15),i!==(t=t<0?0:Math.min(t,n-o))&&(e.classList.add("enableAnimation"),i<t?e.firstElementChild.style.setProperty("margin-left",i-t+"px",""):e.style.setProperty("padding-left",i-t+"px",""),setTimeout((()=>{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function p(e){if(!_)return;const t=e.clientWidth,i=e.querySelector("ul"),n=i.scrollLeft,o=i.scrollWidth,a=n>0;let r=e.querySelector(".tabMenuOverlayLeft");a?(null===r&&(r=document.createElement("span"),r.className="tabMenuOverlayLeft icon icon24 fa-angle-left",r.addEventListener("click",(()=>{const e=i.clientWidth;h(i,i.scrollLeft-~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.insertBefore(r,e.firstChild)),r.classList.add("active")):null!==r&&r.classList.remove("active");const s=t+n<o;let l=e.querySelector(".tabMenuOverlayRight");s?(null===l&&(l=document.createElement("span"),l.className="tabMenuOverlayRight icon icon24 fa-angle-right",l.addEventListener("click",(()=>{const e=i.clientWidth;h(i,i.scrollLeft+~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function m(e){return b.get(e)}function f(e){if(!_)return;const t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,o=t.scrollWidth;if(i===o)return;const a=e.offsetLeft;let r=!1;a<n&&(r=!0);let s=!1;if(!r){const t=i-(a-n);let o=e.clientWidth;null!==e.nextElementSibling&&(s=!0,o+=20),t<o&&(r=!0)}r&&h(t,a,n,o,i,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToTab=t.getTabMenu=t.setup=void 0,n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l);let g=null,_=!1;const b=new Map;t.setup=function(){c(),b.forEach((e=>{let t=!1;e.getContainers().forEach((i=>{t||null===i.querySelector(".formError")||(t=!0,e.select(i.id))}))})),n.default.add("WoltLabSuite/Core/Ui/TabMenu",c),r.default.add("WoltLabSuite/Core/Ui/TabMenu",(()=>{g&&(g.classList.remove("active"),g=null)})),s.on("screen-sm-down",{match(){d(!1)},unmatch:u,setup(){d(!0)}}),window.addEventListener("hashchange",(()=>{const e=a.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&b.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=a.default.getIdentifierFromHash();e&&window.setTimeout((()=>{const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const i=t.parentNode;let n=i.offsetTop-50;if(n<0&&(n=0),e>n){let e=o.default.offset(i).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=m,t.scrollToTab=f})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Dom/Change/Listener","../Environment","./Alignment"],(function(e,t,i,n,o,a){"use strict";function r(e){const t=e.currentTarget;let i=t.title.trim();""!==i&&(t.dataset.tooltip=i,t.setAttribute("aria-label",i),t.removeAttribute("title")),i=t.dataset.tooltip||"",u.style.removeProperty("top"),u.style.removeProperty("left"),i.length?(u.classList.add("active"),d.textContent=i,a.set(u,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):u.classList.remove("active")}function s(){u.classList.remove("active")}function l(){document.querySelectorAll(".jsTooltip").forEach((e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",s),e.addEventListener("click",s))}))}let c,d,u;Object.defineProperty(t,"__esModule",{value:!0}),t.init=t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),t.setup=function(){"desktop"===o.platform()&&(u=document.createElement("div"),u.id="balloonTooltip",u.classList.add("balloonTooltip"),u.addEventListener("transitionend",(()=>{u.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{u.style.removeProperty(e)}))})),d=document.createElement("span"),d.id="balloonTooltipText",u.appendChild(d),c=document.createElement("span"),c.classList.add("elementPointer"),c.appendChild(document.createElement("span")),u.appendChild(c),document.body.appendChild(u),l(),n.default.add("WoltLabSuite/Core/Ui/Tooltip",l),window.addEventListener("scroll",s))},t.init=l})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o);class a{constructor(){this.elements=new Map}init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const i=e.dataset.link;t=i?e=>{window.location.href=i.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((i=>{i.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,o.default.open(this);const i=e.dataset.pages||"0";this.input.value=i,this.input.max=i,this.input.select(),this.description.textContent=n.get("wcf.page.jumpTo.description").replace(/#pages#/,i)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),o.default.close(this)}_dialogSetup(){const e=`<dl>\n <dt><label for="jsPaginationPageNo">${n.get("wcf.page.jumpTo")}</label></dt>\n <dd>\n <input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny">\n <small></small>\n </dd>\n </dl>\n <div class="formSubmit">\n <button class="buttonPrimary">${n.get("wcf.global.button.submit")}</button>\n </div>`;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:n.get("wcf.global.page.pagination")},source:e}}}let r=null;t.init=function(e,t){(null===r&&(r=new a),r).init(e,t)}})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,i,n,o){"use strict";function a(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.createElement("div");t.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",t),t.appendChild(e);const i=document.createElement("span");i.title=o.get("wcf.global.form.password.button.show"),i.classList.add("button","inputSuffix","jsTooltip"),i.setAttribute("role","button"),i.tabIndex=0,i.setAttribute("aria-hidden","true"),t.appendChild(i);const n=document.createElement("span");n.classList.add("icon","icon16","fa-eye-slash"),i.appendChild(n),i.addEventListener("click",(()=>{r(e,i,n)})),i.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e,i,n))}))}(e)}))}function r(e,t,i){"password"===e.type?(i.classList.add("fa-eye"),i.classList.remove("fa-eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.hide"),e.type="text"):(i.classList.remove("fa-eye"),i.classList.add("fa-eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new WeakSet;t.setup=function(){a(),n.default.add("WoltLabSuite/Core/Ui/Password",(()=>a()))}})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Date/Time/Relative","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Language","./StringUtil","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p,m,f,g,_,b,v){"use strict";function w(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importDefault(h),p=i.__importDefault(p),m=i.__importStar(m),f=i.__importStar(f),g=i.__importStar(g),_=i.__importStar(_),b=i.__importStar(b),v=i.__importStar(v),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=c,t.setup=function(e){e=n.extend({enableMobileMenu:!0},e),u.setupI18n({decimalPoint:d.get("wcf.global.decimalPoint"),thousandsSeparator:d.get("wcf.global.thousandsSeparator")}),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),l.setup(),a.setup(),o.default.init(),p.default.setup(),m.setup(e.enableMobileMenu),g.setup(),h.default.setup(),_.setup(),v.setup(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===l.browser()&&(window.onbeforeunload=()=>{});let t=0;t=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(t),window.jQuery((()=>{f.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==l.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),w(),s.default.add("WoltLabSuite/Core/Bootstrap",(()=>w))}})),define("WoltLabSuite/Core/Controller/Style/Changer",["require","exports","tslib","../../Ajax","../../Language","../../Ui/Dialog"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showDialog=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a);class r{constructor(){document.querySelectorAll(".jsButtonStyleChanger").forEach((e=>{e.addEventListener("click",(e=>this.showDialog(e)))}))}showDialog(e){e.preventDefault(),a.default.open(this)}_dialogSetup(){return{id:"styleChanger",options:{disableContentPadding:!0,title:o.get("wcf.style.changeStyle")},source:{data:{actionName:"getStyleChooser",className:"wcf\\data\\style\\StyleAction"},after:e=>{e.querySelectorAll(".styleList > li").forEach((e=>{e.classList.add("pointer"),e.addEventListener("click",(e=>this.click(e)))}))}}}}click(e){e.preventDefault();const t=e.currentTarget;n.apiOnce({data:{actionName:"changeStyle",className:"wcf\\data\\style\\StyleAction",objectIDs:[t.dataset.styleId]},success:function(){window.location.reload()}})}}let s;t.setup=function(){new r},t.showDialog=function(e){s.showDialog(e)}})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,a,r,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.ajaxApi=t.setContent=t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class c{constructor(){this.activeId="",this.cache=new Map,this.elements=new Map,this.handlers=new Map,this.hoverId="",this.suspended=!1,this.timerEnter=void 0,this.timerLeave=void 0,this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent);const e=document.createElement("span");e.className="elementPointer",e.appendChild(document.createElement("span")),this.popover.appendChild(e),document.body.appendChild(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==r.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((i=>{const n=a.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const r=`${t}-${o}`;i.dataset.cacheId=r,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(r)||this.cache.set(r,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let r=a.default.createFragmentFromHtml(i);if(r.childElementCount||(r=a.default.createFragmentFromHtml("<p>"+i+"</p>")),o.content=r,o.state=2,this.activeId){this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=a.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},i,i)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{pointer:!0,vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){for(let e=0,t=r.length;e<t;e++){const t=r[e];s.has(t)||(t.addEventListener("click",a,{once:!0}),s.add(t))}}function a(e){e.preventDefault();const t=e.currentTarget;t.classList.remove("ignoredUserMessage"),s.delete(t),window.getSelection().removeAllRanges()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importDefault(n);const r=document.getElementsByClassName("ignoredUserMessage"),s=new Set;t.init=function(){o(),n.default.add("WoltLabSuite/Core/Ui/User/Ignore",o)}})),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["require","exports","tslib","../../../Environment","../../../Language","../../Screen"],(function(e,t,i,n,o,a){"use strict";function r(){_=!0,"safari"===n.browser()||u(),window.setTimeout(u,1e3)}function s(){_=!1}function l(e){if(e.preventDefault(),w.length){const e=w.slice(0,3).pop();d(g.clientWidth-(e.offsetLeft+e.clientWidth)),g.lastElementChild===e&&p.classList.remove("active"),m.classList.add("active")}}function c(e){if(e.preventDefault(),v.length){const e=v.slice(-3)[0];d(-1*e.offsetLeft),g.firstElementChild===e&&m.classList.remove("active"),p.classList.add("active")}}function d(e){b=Math.min(b+e,0),f.style.setProperty("margin-left",`${b}px`,"")}function u(){if(!_)return;v=[],w=[];const e=g.clientWidth;(g.scrollWidth>e||b<0)&&Array.from(g.children).forEach((t=>{const i=t.offsetLeft;i<0?v.push(t):i+t.clientWidth>e&&w.push(t)})),m.classList[v.length?"add":"remove"]("active"),p.classList[w.length?"add":"remove"]("active")}function h(){!function(){const e=g.parentElement;p=document.createElement("a"),p.className="mainMenuShowNext",p.href="#",p.innerHTML='<span class="icon icon32 fa-angle-right"></span>',p.setAttribute("aria-hidden","true"),p.addEventListener("click",l),e.appendChild(p),m=document.createElement("a"),m.className="mainMenuShowPrevious",m.href="#",m.innerHTML='<span class="icon icon32 fa-angle-left"></span>',m.setAttribute("aria-hidden","true"),m.addEventListener("click",c),e.insertBefore(m,e.firstChild),f.addEventListener("transitionend",u),window.addEventListener("resize",(()=>{f.style.setProperty("margin-left","0px",""),b=0,u()})),r()}(),g.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const i=document.createElement("button");i.className="visuallyHidden",i.tabIndex=0,i.setAttribute("role","button"),i.setAttribute("aria-label",o.get("wcf.global.button.showMenu")),e.insertBefore(i,t.nextSibling);let n=!1;i.addEventListener("click",(()=>{n=!n,t.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-label",o.get(n?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a);let p,m,f,g,_=!1,b=0,v=[],w=[];t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");g=e,f=t,a.on("screen-lg",{match:r,unmatch:s,setup:h})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class i{constructor(e,t,i){this.userId=e,this.username=t,this.link=i}}let n;return{getLink:()=>n.link,init(e,t,o){if(n)throw new Error("User has already been initialized.");n=new i(e,t,o)},get userId(){return n.userId},get username(){return n.username}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(){this.enableAll=!1,this.knownButtons=new WeakSet,"all"===window.sessionStorage.getItem(`${o.getStoragePrefix()}user-consent`)&&(this.enableAll=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){this.enableAll?this.enableAllExternalMedia():document.querySelectorAll(".jsButtonMessageUserConsentEnable").forEach((e=>{this.knownButtons.has(e)||(this.knownButtons.add(e),e.addEventListener("click",(e=>this.click(e))))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),s.default.userId?n.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${o.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){const t=atob(e.dataset.payload);r.default.insertHtml(t,e,"before"),e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let c;t.init=function(){c||(c=new l)}})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Controller/Style/Changer","./Controller/Popover","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),t.setup=function(e){e.backgroundQueue.url=window.WSC_API_URL+e.backgroundQueue.url.substr(window.WCF_PATH.length),o.setup({enableMobileMenu:!0}),l.init(),e.styleChanger&&a.setup(),e.enableUserPopover&&(r.init({className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user"}),r.init({attributeName:"data-user-id",className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user.deprecated"})),n.setUrl(e.backgroundQueue.url),(Math.random()<.1||e.backgroundQueue.force)&&n.invoke(),globalThis.COMPILER_TARGET_DEFAULT&&s.init(),c.init()}})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function i(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyElementTextToClipboard=t.copyTextToClipboard=void 0,t.copyTextToClipboard=i,t.copyElementTextToClipboard=async function(e){return i(e.textContent)}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function i(e,t,i){const n={r:0,g:0,b:0},o=Math.floor(e/60),a=e/60-o,r=(i/=100)*(1-(t/=100)),s=i*(1-t*a),l=i*(1-t*(1-a));if(0==t)n.r=n.g=n.b=i;else switch(o){case 1:n.r=s,n.g=i,n.b=r;break;case 2:n.r=r,n.g=i,n.b=l;break;case 3:n.r=r,n.g=s,n.b=i;break;case 4:n.r=l,n.g=r,n.b=i;break;case 5:n.r=i,n.g=r,n.b=s;break;case 0:case 6:n.r=i,n.g=l,n.b=r}return{r:Math.round(255*n.r),g:Math.round(255*n.g),b:Math.round(255*n.b)}}function n(e,t,i){let n,o;e/=255,t/=255,i/=255;const a=Math.max(Math.max(e,t),i),r=Math.min(Math.min(e,t),i),s=a-r;if(n=0,a!==r){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,{h:Math.round(n),s:Math.round(100*o),v:Math.round(100*a)}}function o(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function a(e,t,i){const n="0123456789ABCDEF";return void 0===t&&/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString())&&(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.rgbToHex=t.hexToRgb=t.rgbToHsv=t.hsvToRgb=void 0,t.hsvToRgb=i,t.rgbToHsv=n,t.hexToRgb=o,t.rgbToHex=a,window.__wcf_bc_colorUtil={hexToRgb:o,hsvToRgb:i,rgbToHex:a,rgbToHsv:n}})),define("WoltLabSuite/Core/Dictionary",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._dictionary=new Map}set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,i=e.length;t<i;t++){e[t].forEach(((e,t)=>this.set(t,e)))}}toObject(){const e={};return this._dictionary.forEach(((t,i)=>e[i]=t)),e}static fromObject(e){const t=new o;return Object.keys(e).forEach((i=>{t.set(i,e[i])})),t}get size(){return this._dictionary.size}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,i,n){"use strict";function o(e){return r.has(e)?"."+r.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,n=i.__importStar(n);const a=new Map(Object.entries({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"})),r=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt"}));t.formatFilesize=function(e,t=2){let i="Byte";return e>=1e3&&(e/=1e3,i="kB"),e>=1e3&&(e/=1e3,i="MB"),e>=1e3&&(e/=1e3,i="GB"),e>=1e3&&(e/=1e3,i="TB"),n.formatNumeric(e,-t)+" "+i},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const i=e.substr(t+1);if(a.has(i))return a.get(i)}return""},t.getExtensionByMimeType=o,t.blobToFile=function(e,t){const i=o(e.type);return new File([e],t+i,{type:e.type})}})),define("WoltLabSuite/Core/List",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._set=new Set}add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/ObjectMap",["require","exports","tslib","./Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(){this._map=new WeakMap}set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function i(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");n.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const n=new Map;t.add=i,t.addObject=function(e){Object.keys(e).forEach((t=>i(t,e[t])))},t.get=function(e){return!!n.has(e)&&n.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,i,n){this.type=e,this.content=t,this.alias=i,this.length=0|(n||"").length}function i(e,n,r,s,l,c){var d,h,p,m,f,g,_,b,v,w,y,E,S,C,L,A,I,x,k,D,M,T,B,j,P;for(d in r)if(r.hasOwnProperty(d)&&r[d])for(h=r[d],h=Array.isArray(h)?h:[h],p=0;p<h.length;++p){if(c&&c.cause==d+","+p)return;for(f=(m=h[p]).inside,g=!!m.lookbehind,_=!!m.greedy,b=0,v=m.alias,_&&!m.pattern.global&&(w=m.pattern.toString().match(/[imsuy]*$/)[0],m.pattern=RegExp(m.pattern.source,w+"g")),y=m.pattern||m,E=s.next,S=l;E!==n.tail&&!(c&&S>=c.reach);S+=E.value.length,E=E.next){if(C=E.value,n.length>e.length)return;if(!(C instanceof t)){if(L=1,_&&E!=n.tail.prev){if(y.lastIndex=S,!(A=y.exec(e)))break;for(I=A.index+(g&&A[1]?A[1].length:0),x=A.index+A[0].length,k=S,k+=E.value.length;I>=k;)k+=(E=E.next).value.length;if(S=k-=E.value.length,E.value instanceof t)continue;for(D=E;D!==n.tail&&(k<x||"string"==typeof D.value);D=D.next)L++,k+=D.value.length;L--,C=e.slice(S,k),A.index-=S}else y.lastIndex=0,A=y.exec(C);A&&(g&&(b=A[1]?A[1].length:0),x=(I=A.index+b)+(M=A[0].slice(b)).length,T=C.slice(0,I),B=C.slice(x),j=S+C.length,c&&j>c.reach&&(c.reach=j),P=E.prev,T&&(P=o(n,P,T),S+=T.length),a(n,P,L),E=o(n,P,new t(d,f?u.tokenize(M,f):M,v,M)),B&&o(n,E,B),L>1&&i(e,n,r,E.prev,S,{cause:d+","+p,reach:j}))}}}}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 a(e,t,i){var n,o=t.next;for(n=0;n<i&&o!==e.tail;n++)o=o.next;t.next=o,o.prev=t,e.length-=n}function r(){u.manual||u.highlightAll()}var s,l,c=/\blang(?:uage)?-([\w-]+)\b/i,d=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,"&").replace(/</g,"<").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:++d}),e.__id},clone:function e(t,i){var n,o,a;switch(i=i||{},u.util.type(t)){case"Object":if(o=u.util.objId(t),i[o])return i[o];for(a in n={},i[o]=n,t)t.hasOwnProperty(a)&&(n[a]=e(t[a],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&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){var e,t,i;if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(n){if(e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(n.stack)||[])[1])for(i in t=document.getElementsByTagName("script"))if(t[i].src==e)return t[i];return null}},isActive:function(e,t,i){for(var n,o="no-"+t;e;){if((n=e.classList).contains(t))return!0;if(n.contains(o))return!1;e=e.parentElement}return!!i}},languages:{extend:function(e,t){var i,n=u.util.clone(u.languages[e]);for(i in t)n[i]=t[i];return n},insertBefore:function(e,t,i,n){var o,a,r,s,l;for(r in o=(n=n||u.languages)[e],a={},o)if(o.hasOwnProperty(r)){if(r==t)for(s in i)i.hasOwnProperty(s)&&(a[s]=i[s]);i.hasOwnProperty(r)||(a[r]=o[r])}return l=n[e],n[e]=a,u.languages.DFS(u.languages,(function(t,i){i===l&&t!=e&&(this[t]=a)})),a},DFS:function e(t,i,n,o){var a,r,s,l;for(r in o=o||{},a=u.util.objId,t)t.hasOwnProperty(r)&&(i.call(t,r,t[r],n||r),s=t[r],"Object"!==(l=u.util.type(s))||o[a(s)]?"Array"!==l||o[a(s)]||(o[a(s)]=!0,e(s,i,r,o)):(o[a(s)]=!0,e(s,i,null,o)))}},plugins:{},highlightAll:function(e,t){u.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,i){var n,o,a={callback:i,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};for(u.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),u.hooks.run("before-all-elements-highlight",a),n=0;o=a.elements[n++];)u.highlightElement(o,!0===t,a.callback)},highlightElement:function(t,i,n){function o(e){s.highlightedCode=e,u.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,u.hooks.run("after-highlight",s),u.hooks.run("complete",s),n&&n.call(s.element)}var a,r,s,l,d=u.util.getLanguage(t),h=u.languages[d];if(t.className=t.className.replace(c,"").replace(/\s+/g," ")+" language-"+d,(a=t.parentElement)&&"pre"===a.nodeName.toLowerCase()&&(a.className=a.className.replace(c,"").replace(/\s+/g," ")+" language-"+d),r=t.textContent,s={element:t,language:d,grammar:h,code:r},u.hooks.run("before-sanity-check",s),!s.code)return u.hooks.run("complete",s),void(n&&n.call(s.element));u.hooks.run("before-highlight",s),s.grammar?i&&e.Worker?((l=new Worker(u.filename)).onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):o(u.highlight(s.code,s.grammar,s.language)):o(u.util.encode(s.code))},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 a,r,s=t.rest;if(s){for(a in s)t[a]=s[a];delete t.rest}return o(r=new n,r.head,e),i(e,r,t,r.head,0),function(e){for(var t=[],i=e.head.next;i!==e.tail;)t.push(i.value),i=i.next;return t}(r)},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,n,o=u.hooks.all[e];if(o&&o.length)for(i=0;n=o[i++];)n(t)}},Token:t};return e.Prism=u,t.stringify=function e(t,i){var n,o,a,r,s;if("string"==typeof t)return t;if(Array.isArray(t))return n="",t.forEach((function(t){n+=e(t,i)})),n;for(s in o={type:t.type,content:e(t.content,i),tag:"span",classes:["token",t.type],attributes:{},language:i},(a=t.alias)&&(Array.isArray(a)?Array.prototype.push.apply(o.classes,a):o.classes.push(a)),u.hooks.run("wrap",o),r="",o.attributes)r+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+r+">"+o.content+"</"+o.tag+">"},e.document?((s=u.util.currentScript())&&(u.filename=s.src,s.hasAttribute("data-manual")&&(u.manual=!0)),u.manual||("loading"===(l=document.readyState)||"interactive"===l&&s&&s.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)),u):e.addEventListener?(u.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var i=JSON.parse(t.data),n=i.language,o=i.code,a=i.immediateClose;e.postMessage(u.highlight(o,u.languages[n],n)),a&&e.close()}),!1),u):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",o++),n.appendChild(e),e}for(var i,n=document.createDocumentFragment(),o=1,a=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,(function(){return NodeFilter.FILTER_ACCEPT}),!1),r=t();i=a.nextNode();)i.data.split(/\r?\n/).forEach((function(n,o){var a,s,l;for(o>=1&&(r.appendChild(document.createTextNode("\n")),r=t()),a=document.createTextNode(n),s=i.parentNode;s!==e;)(l=s.cloneNode(!1)).appendChild(a),a=l,s=s.parentNode;r.appendChild(a)}));return n},Prism})),define("WoltLabSuite/Core/Upload",["require","exports","tslib","./Ajax/Request","./Core","./Dom/Change/Listener","./Language"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);class s{constructor(e,t,i){if(this._button=document.createElement("p"),this._fileElements=[],this._fileUpload=document.createElement("input"),this._internalFileId=0,this._multiFileUploadIds=[],!(i=i||{}).className)throw new Error("Missing class name.");this._options=o.extend({action:"upload",multiple:!1,acceptableFiles:null,name:"__files[]",singleFileRequests:!1,url:`index.php?ajax-upload/&t=${window.SECURITY_TOKEN}`},i),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url);const n=document.getElementById(e);if(null===n)throw new Error(`Element id '${e}' is unknown.`);this._buttonContainer=n;const a=document.getElementById(t);if(null===a)throw new Error(`Element id '${t}' is unknown.`);if(this._target=a,i.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName&&"TBODY"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._createButton()}_createButton(){this._fileUpload=document.createElement("input"),this._fileUpload.type="file",this._fileUpload.name=this._options.name,this._options.multiple&&(this._fileUpload.multiple=!0),null!==this._options.acceptableFiles&&(this._fileUpload.accept=this._options.acceptableFiles.join(",")),this._fileUpload.addEventListener("change",(e=>this._upload(e))),this._button=document.createElement("p"),this._button.className="button uploadButton",this._button.setAttribute("role","button"),this._fileUpload.addEventListener("focus",(()=>{this._fileUpload.classList.contains("focus-visible")&&this._button.classList.add("active")})),this._fileUpload.addEventListener("blur",(()=>{this._button.classList.remove("active")}));const e=document.createElement("span");e.textContent=r.get("wcf.global.button.upload"),this._button.appendChild(e),this._button.insertAdjacentElement("afterbegin",this._fileUpload),this._insertButton(),a.default.trigger()}_createFileElement(e){const t=document.createElement("progress");let i;switch(t.max=100,this._target.nodeName){case"OL":case"UL":return i=document.createElement("li"),i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i;case"TBODY":return this._createFileTableRow(e);default:return i=document.createElement("p"),i.appendChild(t),this._target.appendChild(i),i}}_createFileElements(e){if(!e.length)return null;const t=[];Array.from(e).forEach((e=>{const i=this._createFileElement(e);i.classList.contains("uploadFailed")||(i.dataset.filename=e.name,i.dataset.internalFileId=(this._internalFileId++).toString(),t.push(i))}));const i=this._fileElements.length;return this._fileElements.push(t),a.default.trigger(),i}_createFileTableRow(e){throw new Error("Has to be implemented in subclass.")}_failure(e,t,i,n,o){return!0}_getParameters(){return{}}_getFormData(){return{}}_insertButton(){this._buttonContainer.insertAdjacentElement("afterbegin",this._button)}_progress(e,t){const i=Math.round(t.loaded/t.total*100);this._fileElements[e].forEach((e=>{const t=e.querySelector("progress");t&&(t.value=i)}))}_removeButton(){this._button.remove(),a.default.trigger()}_success(e,t,i,n,o){}_upload(e,t,i){this._target.querySelectorAll(".uploadFailed").forEach((e=>e.remove()));let n=null,o=[];if(t)o.push(t);else if(i){let e="";switch(i.type){case"image/jpeg":e="jpg";break;case"image/gif":e="gif";break;case"image/png":e="png";break;case"image/webp":e="webp"}o.push({name:`pasted-from-clipboard.${e}`})}else o=Array.from(this._fileUpload.files);return o.length&&this.validateUpload(o)&&(this._options.singleFileRequests?(n=[],o.forEach((e=>{const t=this._uploadFiles([e],i);1!==o.length&&this._multiFileUploadIds.push(t),n.push(t)}))):n=this._uploadFiles(o,i)),this._removeButton(),this._createButton(),n}validateUpload(e){return!0}_uploadFiles(e,t){function i(e,t){null!==e&&(t=t||"",Object.entries(e).forEach((([e,n])=>{if("object"==typeof n){i(n,0===t.length?e:`${t}[${e}]`)}else{const i=0===t.length?e:`${t}[${e}]`;a.append(i,n)}})))}const o=this._createFileElements(e);if(!this._fileElements[o].length)return null;const a=new FormData;for(let i=0,n=e.length;i<n;i++)if(this._fileElements[o][i]){const n=this._fileElements[o][i].dataset.internalFileId;t?a.append(`__files[${n}]`,t,e[i].name):a.append(`__files[${n}]`,e[i])}a.append("actionName",this._options.action),a.append("className",this._options.className),"upload"===this._options.action&&a.append("interfaceName","wcf\\data\\IUploadAction"),i(this._getParameters(),"parameters"),i(this._getFormData());return new n.default({data:a,contentType:!1,failure:this._failure.bind(this,o),silent:!0,success:this._success.bind(this,o),uploadProgress:this._progress.bind(this,o),url:this._options.url,withCredentials:!0}).sendRequest(),o}hasPendingUploads(){return void 0!==this._fileElements.find((e=>e.find((e=>null!==e.querySelector("progress")))))}uploadBlob(e){return this._upload(null,null,e)}uploadFile(e){return this._upload(null,e)}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/prism-meta",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={markup:{title:"Markup",file:"markup"},html:{title:"HTML",file:"markup"},xml:{title:"XML",file:"markup"},svg:{title:"SVG",file:"markup"},mathml:{title:"MathML",file:"markup"},ssml:{title:"SSML",file:"markup"},atom:{title:"Atom",file:"markup"},rss:{title:"RSS",file:"markup"},css:{title:"CSS",file:"css"},clike:{title:"C-like",file:"clike"},javascript:{title:"JavaScript",file:"javascript"},abap:{title:"ABAP",file:"abap"},abnf:{title:"ABNF",file:"abnf"},actionscript:{title:"ActionScript",file:"actionscript"},ada:{title:"Ada",file:"ada"},agda:{title:"Agda",file:"agda"},al:{title:"AL",file:"al"},antlr4:{title:"ANTLR4",file:"antlr4"},apacheconf:{title:"Apache Configuration",file:"apacheconf"},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/Ajax/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ajax/Jsonp",["require","exports","tslib","../Core"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.send=void 0,n=i.__importStar(n),t.send=function(e,t,i,o){if(0===(e="string"==typeof e?e.trim():"").length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof t)throw new TypeError("Expected a valid callback function for parameter 'success'.");o=n.extend({parameterName:"callback",timeout:10},o||{});const a="wcf_jsonp_"+n.getUuid().replace(/-/g,"").substr(0,8),r=document.createElement("script"),s=window.setTimeout((()=>{"function"==typeof i&&i(),window[a]=void 0,r.remove()}),1e3*(~~o.timeout||10));window[a]=(...e)=>{window.clearTimeout(s),t(...e),window[a]=void 0,r.remove()},e+=-1===e.indexOf("?")?"?":"&",e+=o.parameterName+"="+a,r.async=!0,r.src=e,document.head.appendChild(r)}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","tslib","../Language"],(function(e,t,i,n){"use strict";function o(){clearTimeout(s),r.classList.remove("active"),null!==c&&c(),l=!1}Object.defineProperty(t,"__esModule",{value:!0}),t.show=void 0,n=i.__importStar(n);let a,r,s,l=!1,c=null,d=!1;t.show=function(e,t,i){l||(l=!0,d||(d=!0,r=document.createElement("div"),r.id="systemNotification",a=document.createElement("p"),a.addEventListener("click",o),r.appendChild(a),document.body.appendChild(r)),c="function"==typeof t?t:null,a.className=i||"success",a.textContent=n.get(e||"wcf.global.success"),r.classList.add("active"),s=setTimeout(o,2e3))}})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=void 0,t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let i,n=document.createElement("span");for(;i=t.nextNode();){const t=i,o=t.data.split(/\r?\n/);for(let i=0,a=o.length;i<a;i++){const a=o[i];i>=1&&(n.appendChild(document.createTextNode("\n")),yield n,n=document.createElement("span"));let r=document.createTextNode(a),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(r),r=e,s=s.parentNode}n.appendChild(r)}}yield n}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper","../prism-meta"],(function(e,t,i,n,o,a,r,s,l){"use strict";async function c(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importDefault(l);class d{constructor(e){var t;this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=null===(t=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e))))||void 0===t?void 0:t.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new d(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("span");t.tabIndex=0,t.setAttribute("role","button"),t.className="icon icon24 fa-files-o pointer jsTooltip",t.setAttribute("title",n.get("wcf.message.bbcode.code.copy"));const i=async()=>{await o.copyElementTextToClipboard(this.codeContainer),a.show(n.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",i),t.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i())})),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");if(!l.default[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((t,i)=>{e(["prism/components/prism-"+l.default[this.language].file],t,i)})).then(i.__importStar),await c();const t=r.default.languages[this.language];if(!t)throw new Error(`Invalid language '${this.language}' given.`);const n=document.createElement("div");n.innerHTML=r.default.highlight(this.codeContainer.textContent,t,this.language),await c();const o=this.codeContainer.querySelectorAll(".codeBoxLine > span"),a=s.splitIntoLines(n);for(let e=0,t=o.length;e<t;e+=d.chunkSize){await c();const i=Math.min(e+d.chunkSize,t);for(let t=e;t<i;t++){const e=o[t],i=a.next().value;e.parentNode.replaceChild(i,e)}}this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}}return d.chunkSize=50,d})),define("WoltLabSuite/Core/Bbcode/Collapsible",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(e.classList.toggle("collapsed")){if(t.forEach((e=>{const t=e.dataset.titleExpand;e.classList.contains("icon")?(e.classList.remove("fa-compress"),e.classList.add("fa-expand"),e.title=t):e.textContent=t})),i instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse;e.classList.contains("icon")?(e.classList.add("fa-compress"),e.classList.remove("fa-expand"),e.title=t):e.textContent=t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),n=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,n){t.forEach((n=>{n.classList.add("jsToggleButtonEnabled"),n.addEventListener("click",(n=>i(e,t,n))),n.addEventListener("keydown",(n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),i(e,t))}))})),0!==n.scrollTop&&(n.scrollTop=0,i(e,t)),n.addEventListener("scroll",(()=>{n.scrollTop=0,e.classList.contains("collapsed")&&i(e,t)}))}(e,t,n),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Bbcode/Spoiler",["require","exports","tslib","../Core","../Language","../Dom/Util"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),t.observe=function(){const e="jsSpoilerBox";document.querySelectorAll(".jsSpoilerBox").forEach((t=>{t.classList.remove(e);const i=t.querySelector(".jsSpoilerToggle"),r=t.querySelector(".spoilerBoxContent");i.addEventListener("click",(e=>function(e,t,i){e.preventDefault(),i.classList.toggle("active");const r=i.classList.contains("active");r?a.default.show(t):a.default.hide(t),i.setAttribute("aria-expanded",r?"true":"false"),t.setAttribute("aria-hidden",r?"false":"true"),n.stringToBool(i.dataset.hasCustomLabel||"")||(i.textContent=o.get(i.classList.contains("active")?"wcf.bbcode.spoiler.hide":"wcf.bbcode.spoiler.show"))}(e,r,i)))}))}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map;return{add(e,t){if(i.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()}}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,i,n,o,a){"use strict";function r(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a);class s{constructor(){this._active=!1,this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.classList.add("buttonPrimary"),this.confirmButton.textContent=o.get("wcf.global.confirmation.confirm"),this.confirmButton.addEventListener("click",(e=>this._confirm())),e.appendChild(this.confirmButton);const t=document.createElement("button");t.textContent=o.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{a.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,a.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,a.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){this.confirmButton.blur(),this.confirmButton.focus()}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:o.get("wcf.global.confirmation.title")}}}}let l;t.show=function(e){if(!r().active){if((e=n.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");r().open(e)}},t.getContentElement=function(){return r().content}})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";function p(){return g||(g=new f),g}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),h=i.__importStar(h);const m='.messageCheckboxLabel > input[type="checkbox"], .message .messageClipboardCheckbox > input[type="checkbox"], .messageGroupList .columnMark > label > input[type="checkbox"]';class f{constructor(){this.containers=new Map,this.editors=new Map,this.editorDropdowns=new Map,this.itemData=new WeakMap,this.knownCheckboxes=new WeakSet,this.pageClassNames=[],this.pageObjectId=0,this.reloadPageOnSuccess=new Map}setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),a.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=r.default.identify(e);let i=this.containers.get(t);if(void 0===i){const n=e.querySelector(".jsClipboardMarkAll");if(null!==n){if(n.matches(m)){const e=n.closest("label");e.setAttribute("role","checkbox"),e.tabIndex=0,e.setAttribute("aria-checked","false"),e.setAttribute("aria-label",l.get("wcf.clipboard.item.markAll")),e.addEventListener("keyup",(e=>{"Enter"!==e.key&&"Space"!==e.key||n.click()}))}n.dataset.containerId=t,n.addEventListener("click",(e=>this.markAll(e)))}i={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:n,markedObjectIds:new Set},this.containers.set(t,i)}Array.from(i.checkboxes).forEach((e=>{if(this.knownCheckboxes.has(e))return;if(e.dataset.containerId=t,e.matches(m)){const t=e.closest("label");t.setAttribute("role","checkbox"),t.tabIndex=0,t.setAttribute("aria-checked","false"),t.setAttribute("aria-label",l.get("wcf.clipboard.item.mark")),t.addEventListener("keyup",(t=>{"Enter"!==t.key&&"Space"!==t.key||e.click()}))}null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e)}))}))}loadMarkedItems(){n.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,i="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,i);const n=[],o=t.dataset.containerId,a=this.containers.get(o),r=a.element.dataset.type;Array.from(a.checkboxes).forEach((e=>{const o=~~e.dataset.objectId;i?e.checked||(e.checked=!0,a.markedObjectIds.add(o),n.push(o)):e.checked&&(e.checked=!1,a.markedObjectIds.delete(o),n.push(o)),this.setParentAsMarked(e,i);const r=t.closest(".jsClipboardObject");null!==r&&(i?r.classList.add("jsMarked"):r.classList.remove("jsMarked"))})),this.saveState(r,n,i)}mark(e){const t=e instanceof Event?e.currentTarget:e,i=~~t.dataset.objectId,n=t.checked,o=t.dataset.containerId,a=this.containers.get(o),r=a.element.dataset.type,s=t.closest(".jsClipboardObject");n?(a.markedObjectIds.add(i),s.classList.add("jsMarked")):(a.markedObjectIds.delete(i),s.classList.remove("jsMarked")),null!==a.markAll&&(a.markAll.checked=!Array.from(a.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(a.markAll,n)),this.setParentAsMarked(t,t.checked),this.saveState(r,[i],n)}saveState(e,t,i){n.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=i.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:i,responseData:null})}const i=e.currentTarget,n=this.itemData.get(i);if(n.url)return void(window.location.href=n.url);const a="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"";let r=!0;if(o.isPlainObject(n.parameters)&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(a.length){const e="string"==typeof n.internalData.template?n.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const i=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[i]=e.value);break;case"SELECT":t[i]=e.value;break;case"TEXTAREA":t[i]=e.value.trim()}})),this.executeProxyAction(i,n,t)},message:a,template:e})}else this.executeProxyAction(i,n)}else a.length&&(r=!1,c.show({confirm:t,message:a}));r&&t()}executeProxyAction(e,t,i={}){const a="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],r={data:i};o.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{r[e]=t})),n.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:a,parameters:r},(i=>{if("unmarkAll"!==t.actionName){const n=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",n,{data:t,listItem:e,responseData:i});const o=this.reloadPageOnSuccess.get(n);if(o&&o.includes(i.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;n.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=o.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const i=e.element.dataset.type,n=Array.isArray(t[i])?t[i]:[];this.rebuildMarkings(e,n)}));const i=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{i.includes(t)&&(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let n=!1,o=this.editors.get(e),a=this.editorDropdowns.get(e);void 0===o?(n=!0,o=document.createElement("a"),o.className="dropdownToggle",o.textContent=t.label,this.editors.set(e,o),a=document.createElement("ol"),a.className="dropdownMenu",this.editorDropdowns.set(e,a)):(o.textContent=t.label,a.innerHTML=""),Object.values(t.items).forEach((t=>{const i=document.createElement("li"),n=document.createElement("span");n.textContent=t.label,i.appendChild(n),a.appendChild(i),i.dataset.type=e,i.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(i,t)}));const r=document.createElement("li");r.classList.add("dropdownDivider"),a.appendChild(r);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),a.appendChild(s),-1!==i.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):u.add(t,o)}if(n){const e=o.parentElement;e.classList.add("dropdown"),e.appendChild(a),d.default.init(o)}}))}rebuildMarkings(e,t){var i;let n=!0;if(Array.from(e.checkboxes).forEach((e=>{const i=e.closest(".jsClipboardObject"),o=t.includes(~~e.dataset.objectId);o||(n=!1),e.checked=o,o?i.classList.add("jsMarked"):i.classList.remove("jsMarked"),this.setParentAsMarked(e,o)})),null!==e.markAll){e.markAll.checked=n,this.setParentAsMarked(e.markAll,n);const t=null===(i=e.markAll.closest(".columnMark"))||void 0===i?void 0:i.parentNode;t&&(n?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const i=e.parentElement;"checkbox"===i.getAttribute("role")&&i.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),h.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),h.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let g;t.setup=function(e){p().setup(e)},t.reload=function(){p().reload()},t.hideEditor=function(e){p().hideEditor(e)},t.showEditor=function(){p().showEditor()},t.unmark=function(e,t){p().unmark(e,t)}})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(e,"Tab",9)}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return"Exif"===e||"http://ns.adobe.com/xap/1.0/"===e||"http://ns.adobe.com/xmp/extension/"===e}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),i(n.error)})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function a(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==r.SOI)throw new Error("Not a JPEG");let a=t;for(let e=2;e<a.length&&255===a[e];){const t=2+(a[e+2]<<8|a[e+3]);if(a[e+1]===r.APP1){let o="";for(let t=e+4;0!==a[t]&&t<a.length;t++)o+=String.fromCharCode(a[t]);if(i(o)){const i=a.slice(0,e),o=a.slice(e+t);a=n(i,o)}else e+=t}else e+=t}return new Blob([a],{type:e.type})}var r;Object.defineProperty(t,"__esModule",{value:!0}),t.setExifData=t.removeExifData=t.getExifBytesFromJpeg=void 0,function(e){e[e.SOI=216]="SOI",e[e.APP0=224]="APP0",e[e.APP1=225]="APP1",e[e.APP2=226]="APP2",e[e.APP3=227]="APP3",e[e.APP4=228]="APP4",e[e.APP5=229]="APP5",e[e.APP6=230]="APP6",e[e.APP7=231]="APP7",e[e.APP8=232]="APP8",e[e.APP9=233]="APP9",e[e.APP10=234]="APP10",e[e.APP11=235]="APP11",e[e.APP12=236]="APP12",e[e.APP13=237]="APP13",e[e.APP14=238]="APP14",e[e.COM=254]="COM"}(r||(r={}));t.getExifBytesFromJpeg=async function(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);let a=new Uint8Array(0);if(255!==t[0]&&t[1]!==r.SOI)throw new Error("Not a JPEG");for(let e=2;e<t.length&&255===t[e];){const o=2+(t[e+2]<<8|t[e+3]);if(t[e+1]===r.APP1){let r="";for(let i=e+4;0!==t[i]&&i<t.length;i++)r+=String.fromCharCode(t[i]);if(i(r)){a=n(a,t.slice(e,o+e))}}e+=o}return a},t.removeExifData=a,t.setExifData=async function(e,t){e=await a(e);const i=await o(e);let s=2;255===i[2]&&i[3]===r.APP0&&(s+=2+(i[4]<<8|i[5]));const l=n(i.slice(0,s),t,i.slice(s));return new Blob([l],{type:e.type})}})),define("WoltLabSuite/Core/Image/ImageUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsTransparentPixels=void 0,t.containsTransparentPixels=function(e){const t=e.getContext("2d");if(!t)throw new Error("Unable to get canvas context.");const i=t.getImageData(0,0,e.width,e.height);for(let e=3,t=i.data.length;e<t;e+=4)if(255!==i.data[e])return!0;return!1}})),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("pica",[],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pica=e()}}((function(){return function e(t,i,n){function o(r,s){var l,c,d;if(!i[r]){if(!t[r]){if(l="function"==typeof require&&require,!s&&l)return l(r,!0);if(a)return a(r,!0);throw(c=new Error("Cannot find module '"+r+"'")).code="MODULE_NOT_FOUND",c}d=i[r]={exports:{}},t[r][0].call(d.exports,(function(e){return o(t[r][1][e]||e)}),d,d.exports,e,t,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(e,t,i){"use strict";function n(e){var t=e||[],i={js:t.indexOf("js")>=0,wasm:t.indexOf("wasm")>=0};a.call(this,i),this.features={js:i.js,wasm:i.wasm&&this.has_wasm()},this.use(r),this.use(s)}var o=e("inherits"),a=e("multimath"),r=e("multimath/lib/unsharp_mask"),s=e("./mm_resize");o(n,a),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}t.exports={convolveHorizontally:function(e,t,i,o,a,r){var s,l,c,d,u,h,p,m,f,g,_,b=0,v=0;for(f=0;f<o;f++){for(u=0,g=0;g<a;g++){for(h=r[u++],p=r[u++],m=b+4*h|0,s=l=c=d=0;p>0;p--)d=d+(_=r[u++])*e[m+3]|0,c=c+_*e[m+2]|0,l=l+_*e[m+1]|0,s=s+_*e[m]|0,m=m+4|0;t[v+3]=n(d+8192>>14),t[v+2]=n(c+8192>>14),t[v+1]=n(l+8192>>14),t[v]=n(s+8192>>14),v=v+4*o|0}v=4*(f+1)|0,b=(f+1)*i*4|0}},convolveVertically:function(e,t,i,o,a,r){var s,l,c,d,u,h,p,m,f,g,_,b=0,v=0;for(f=0;f<o;f++){for(u=0,g=0;g<a;g++){for(h=r[u++],p=r[u++],m=b+4*h|0,s=l=c=d=0;p>0;p--)d=d+(_=r[u++])*e[m+3]|0,c=c+_*e[m+2]|0,l=l+_*e[m+1]|0,s=s+_*e[m]|0,m=m+4|0;t[v+3]=n(d+8192>>14),t[v+2]=n(c+8192>>14),t[v+1]=n(l+8192>>14),t[v]=n(s+8192>>14),v=v+4*o|0}v=4*(f+1)|0,b=(f+1)*i*4|0}}}},{}],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";var n=e("./resize_filter_gen"),o=e("./convolve").convolveHorizontally,a=e("./convolve").convolveVertically;t.exports=function(e){var t=e.src,i=e.width,r=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,p=e.dest||new Uint8Array(s*l*4),m=void 0===e.quality?3:e.quality,f=e.alpha||!1,g=n(m,i,s,c,u),_=n(m,r,l,d,h),b=new Uint8Array(s*r*4);return o(t,b,i,r,s,g),a(b,p,r,s,l,_),f||function(e,t,i){for(var n=3,o=t*i*4|0;n<o;)e[n]=255,n=n+4|0}(p,s,l),p}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(e,t,i){"use strict";function n(e){return Math.round(e*((1<<a)-1))}var o=e("./resize_filter_info"),a=14;t.exports=function(e,t,i,a,r){var s,l,c,d,u,h,p,m,f,g,_,b,v,w,y,E,S,C=o[e].filter,L=1/a,A=Math.min(1,a),I=o[e].win/A,x=Math.floor(2*(I+1)),k=new Int16Array((x+2)*i),D=0,M=!k.subarray||!k.set;for(s=0;s<i;s++){for(l=(s+.5)*L+r,c=Math.max(0,Math.floor(l-I)),u=(d=Math.min(t-1,Math.ceil(l+I)))-c+1,h=new Float32Array(u),p=new Int16Array(u),m=0,f=c,g=0;f<=d;f++,g++)m+=_=C((f+.5-l)*A),h[g]=_;for(b=0,g=0;g<h.length;g++)b+=v=h[g]/m,p[g]=n(v);for(p[i>>1]+=n(1-b),w=0;w<p.length&&0===p[w];)w++;if(w<p.length){for(y=p.length-1;y>0&&0===p[y];)y--;if(E=c+w,S=y-w+1,k[D++]=E,k[D++]=S,M)for(g=w;g<=y;g++)k[D++]=p[g];else k.set(p.subarray(w,y+1),D),D+=S}else k[D++]=0,k[D++]=0}return k}},{"./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){var n,o,r;if(a)t.set(function(e){return new Uint8Array(e.buffer,0,e.byteLength)}(e),i);else for(n=i,o=0;o<e.length;o++)r=e[o],t[n++]=255&r,t[n++]=r>>8&255}var o=e("./resize_filter_gen"),a=!0;try{a=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,r=e.toWidth,s=e.toHeight,l=e.scaleX||e.toWidth/e.width,c=e.scaleY||e.toHeight/e.height,d=e.offsetX||0,u=e.offsetY||0,h=e.dest||new Uint8Array(r*s*4),p=void 0===e.quality?3:e.quality,m=e.alpha||!1,f=o(p,i,r,l,d),g=o(p,a,s,c,u),_=0,b=this.__align(_+Math.max(t.byteLength,h.byteLength)),v=this.__align(b+a*r*4),w=this.__align(v+f.byteLength),y=w+g.byteLength,E=this.__instance("resize",y),S=new Uint8Array(this.__memory.buffer),C=new Uint32Array(this.__memory.buffer),L=new Uint32Array(t.buffer);return C.set(L),n(f,S,v),n(g,S,w),(E.exports.convolveHV||E.exports._convolveHV)(v,w,b,i,a,r,s),new Uint32Array(h.buffer).set(new Uint32Array(this.__memory.buffer,0,s*r)),m||function(e,t,i){for(var n=3,o=t*i*4|0;n<o;)e[n]=255,n=n+4|0}(h,r,s),h}},{"./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()).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,a){var r,s,l,c,d,u=i/e,h=n/t,p=(2*a+2+1)/o;if(p>.5)return[[i,n]];if((r=Math.ceil(Math.log(Math.min(u,h))/Math.log(p)))<=1)return[[i,n]];for(s=[],l=0;l<r;l++)c=Math.round(Math.pow(Math.pow(e,r-l-1)*Math.pow(i,l+1),1/r)),d=Math.round(Math.pow(Math.pow(t,r-l-1)*Math.pow(n,l+1),1/r)),s.push([c,d]);return s}},{}],11:[function(e,t,i){"use strict";function n(e){var t=Math.round(e);return Math.abs(e-t)<a?t:Math.floor(e)}function o(e){var t=Math.round(e);return Math.abs(e-t)<a?t:Math.ceil(e)}var a=1e-5;t.exports=function(e){var t,i,a,r,s,l,c,d,u=e.toWidth/e.width,h=e.toHeight/e.height,p=n(e.srcTileSize*u)-2*e.destTileBorder,m=n(e.srcTileSize*h)-2*e.destTileBorder;if(p<1||m<1)throw new Error("Internal error in pica: target tile width/height is too small.");for(c=[],r=0;r<e.toHeight;r+=m)for(a=0;a<e.toWidth;a+=p)(t=a-e.destTileBorder)<0&&(t=0),t+(s=a+p+e.destTileBorder-t)>=e.toWidth&&(s=e.toWidth-t),(i=r-e.destTileBorder)<0&&(i=0),i+(l=r+m+e.destTileBorder-i)>=e.toHeight&&(l=e.toHeight-i),d={toX:t,toY:i,toWidth:s,toHeight:l,toInnerX:a,toInnerY:r,toInnerWidth:p,toInnerHeight:m,offsetX:t/u-n(t/u),offsetY:i/h-n(i/h),scaleX:u,scaleY:h,x:n(t/u),y:n(i/h),width:o(s/u),height:o(l/h)},c.push(d);return c}},{}],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,a){n.push((function(){e().then((function(e){o(e),i--,t()}),(function(e){a(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,o=e.data.opts;t||(t=new i(e.data.features)),n=t.resizeAndUnsharp(o),postMessage({result:n},[n.buffer])}}},{"./mathlib":1}],14:[function(e,t,i){function n(e,t,i,n,o,a){var r,s,l,c,d,u,h,p,m,f,g,_,b,v;for(m=0;m<a;m++){for(h=m,p=0,c=d=(r=e[u=m*o])*n[6],g=n[0],_=n[1],b=n[4],v=n[5],f=0;f<o;f++)l=(s=e[u])*g+r*_+c*b+d*v,d=c,c=l,r=s,i[p]=c,p++,u++;for(p--,h+=a*(o-1),c=d=(r=e[--u])*n[7],s=r,g=n[2],_=n[3],f=o-1;f>=0;f--)l=s*g+r*_+c*b+d*v,d=c,c=l,r=s,s=e[u],t[h]=i[p]+c,u--,p--,h-=a}}var o,a,r,s,l,c;t.exports=function(e,t,i,d){var u,h,p;d&&(n(e,u=new Uint16Array(e.length),h=new Float32Array(Math.max(t,i)),p=function(e){e<.5&&(e=.5);var t=Math.exp(.527076)/e,i=Math.exp(-t),n=Math.exp(-2*t),d=(1-i)*(1-i)/(1+2*t*i-n);return o=d,a=d*(t-1)*i,r=d*(t+1)*i,s=-d*n,l=2*i,c=-n,new Float32Array([o,a,r,s,l,c,(o+a)/(1-l-c),(r+s)/(1-l-c)])}(d),t,i),n(u,e,h,p,i,t))}},{}],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({},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 o=e("object-assign"),a=e("./lib/base64decode"),r=e("./lib/wa_detect"),s={js:!0,wasm:!0};n.prototype.has_wasm=r,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=a,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){var n,a;return t&&this.__reallocate(t),this.__wasm[e]||(n=this.__modules[e],this.__wasm[e]=new WebAssembly.Module(this.__base64decode(n.wasm_src))),this.__cache[e]||(a={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(a,i||{})})),this.__cache[e]},n.prototype.__align=function(e,t){var i=e%(t=t||8);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){var t,i,n=e.replace(/[\r\n=]/g,""),o=n.length,a=new Uint8Array(3*o>>2),r=0,s=0;for(t=0;t<o;t++)t%4==0&&t&&(a[s++]=r>>16&255,a[s++]=r>>8&255,a[s++]=255&r),r=r<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(n.charAt(t));return 0===(i=o%4*6)?(a[s++]=r>>16&255,a[s++]=r>>8&255,a[s++]=255&r):18===i?(a[s++]=r>>10&255,a[s++]=r>>2&255):12===i&&(a[s++]=r>>4&255),a}},{}],18:[function(e,t,i){"use strict";t.exports=function(e,t,i){var n,o,a,r,s,l,c=t*i,d=new Uint16Array(c);for(l=0;l<c;l++)n=e[4*l],o=e[4*l+1],a=e[4*l+2],s=n>=o&&n>=a?n:o>=a&&o>=n?o:a,r=n<=o&&n<=a?n:o<=a&&o<=n?o:a,d[l]=257*(s+r)>>1;return d}},{}],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,a,r,s){var l,c,d,u,h,p,m,f,g,_,b,v,w,y,E,S,C,L,A;if(!(0===a||r<.5))for(r>2&&(r=2),y=o(e,t,i),E=new Uint16Array(y),n(E,t,i,r),S=a/100*4096+.5|0,C=257*s|0,L=t*i,A=0;A<L;A++)v=2*(y[A]-E[A]),Math.abs(v)>=C&&(l=e[w=4*A],c=e[w+1],d=e[w+2],p=257*((f=l>=c&&l>=d?l:c>=l&&c>=d?c:d)+(m=l<=c&&l<=d?l:c<=l&&c<=d?c:d))>>1,m===f?u=h=0:(h=p<=32767?4095*(f-m)/(f+m)|0:4095*(f-m)/(510-f-m)|0,u=l===f?65535*(c-d)/(6*(f-m))|0:c===f?21845+(65535*(d-l)/(6*(f-m))|0):43690+(65535*(l-c)/(6*(f-m))|0)),(p+=S*v+2048>>12)>65535?p=65535:p<0&&(p=0),0===h?l=c=d=p>>8:(g=2*p-(_=p<=32767?p*(4096+h)+2048>>12:p+((65535-p)*h+2048>>12))>>8,_>>=8,l=(b=u+21845&65535)>=43690?g:b>=32767?g+(6*(_-g)*(43690-b)+32768>>16):b>=10922?_:g+(6*(_-g)*b+32768>>16),c=(b=65535&u)>=43690?g:b>=32767?g+(6*(_-g)*(43690-b)+32768>>16):b>=10922?_:g+(6*(_-g)*b+32768>>16),d=(b=u-21845&65535)>=43690?g:b>=32767?g+(6*(_-g)*(43690-b)+32768>>16):b>=10922?_:g+(6*(_-g)*b+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,o,a){var r,s,l,c,d,u,h,p,m,f,g,_,b,v;0===n||o<.5||(o>2&&(o=2),u=32,h=0,_=(g=(f=(m=(p=s=4*(r=t*i))+(l=2*r))+(c=2*r))+c)+(d=4*Math.max(t,i)),b=this.__instance("unsharp_mask",s+l+2*c+d+u,{exp:Math.exp}),v=new Uint32Array(e.buffer),new Uint32Array(this.__memory.buffer).set(v),(b.exports.hsl_l16||b.exports._hsl_l16)(h,p,t,i),(b.exports.blurMono16||b.exports._blurMono16)(p,m,f,g,_,t,i,o),(b.exports.unsharp||b.exports._unsharp)(h,h,p,m,t,i,n,a),v.set(new Uint32Array(this.__memory.buffer,0,r)))}},{}],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(){var e,t;if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{return 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),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)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;t.exports=function(){var e,t,i,n;try{if(!Object.assign)return!1;if((e=new String("abc"))[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;return"0123456789"===Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join("")&&(n={},"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join(""))}catch(e){return!1}}()?Object.assign:function(e,t){var i,s,l,c,d,u=n(e);for(l=1;l<arguments.length;l++){for(c in i=Object(arguments[l]))a.call(i,c)&&(u[c]=i[c]);if(o)for(s=o(i),d=0;d<s.length;d++)r.call(i,s[d])&&(u[s[d]]=i[s[d]])}return u}},{}],25:[function(e,t,i){var n=arguments[3],o=arguments[4],a=arguments[5],r=JSON.stringify;t.exports=function(e,t){var i,s,l,c,d,u,h,p,m,f,g,_,b,v,w=Object.keys(a);for(s=0,l=w.length;s<l;s++)if(c=w[s],(d=a[c].exports)===e||d&&d.default===e){i=c;break}if(!i){for(i=Math.floor(Math.pow(16,8)*Math.random()).toString(16),u={},s=0,l=w.length;s<l;s++)u[c=w[s]]=c;o[i]=["function(require,module,exports){"+e+"(self); }",u]}return h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),(p={})[i]=i,o[h]=["function(require,module,exports){var f = require("+r(i)+");(f.default ? f.default : f)(self);}",p],m={},function e(t){var i,n;for(i in m[t]=!0,o[t][1])n=o[t][1][i],m[n]||e(n)}(h),f="("+n+")({"+Object.keys(m).map((function(e){return r(e)+":["+o[e][0]+","+r(o[e][1])+"]"})).join(",")+"},{},["+r(h)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([f],{type:"text/javascript"}),t&&t.bare?_:(b=g.createObjectURL(_),(v=new Worker(b)).objectURL=b,v)}},{}],"/":[function(e,t,i){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i,n,o=[],a=!0,r=!1,s=void 0;try{for(i=e[Symbol.iterator]();!(a=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){r=!0,s=e}finally{try{a||null==i.return||i.return()}finally{if(r)throw s}}return o}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(){return{value:h(g),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 a(e){if(!(this instanceof a))return new a(e);this.options=u({},s,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 r,s,l,c,d,u=e("object-assign"),h=e("webworkify"),p=e("./lib/mathlib"),m=e("./lib/pool"),f=e("./lib/utils"),g=e("./lib/worker"),_=e("./lib/stepper"),b=e("./lib/tiler"),v={},w=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(w=navigator.userAgent.indexOf("Safari")>=0)}catch(e){}r=1,"undefined"!=typeof navigator&&(r=Math.min(navigator.hardwareConcurrency||1,4)),s={tile:1024,concurrency:r,features:["js","wasm","ww"],idle:2e3},l={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},a.prototype.init=function(){var t,i,n,a,r=this;if(this.__initPromise)return this.__initPromise;if(!1!==c&&!0!==c&&(c=!1,"undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray))try{new ImageData(new Uint8ClampedArray(400),10,10),c=!0}catch(e){}if(!1!==d&&!0!==d&&(d=!1,"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?d=!0:this.debug("ImageBitmap does not support .close(), disabled"))),(t=this.options.features.slice()).indexOf("all")>=0&&(t=["cib","wasm","js","ww"]),this.__requested_features=t,this.__mathlib=new p(t),t.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{e("webworkify")((function(){})).terminate(),this.features.ww=!0,i="wp_".concat(JSON.stringify(this.options)),v[i]?this.__workersPool=v[i]:(this.__workersPool=new m(o,this.options.idle),v[i]=this.__workersPool)}catch(e){}return n=this.__mathlib.init().then((function(e){u(r.features,e.features)})),a=d?f.cib_support().then((function(e){r.features.cib&&t.indexOf("cib")<0?r.debug("createImageBitmap() resize supported, but disabled by config"):t.indexOf("cib")>=0&&(r.features.cib=e)})):Promise.resolve(!1),this.__initPromise=Promise.all([n,a]).then((function(){return r})),this.__initPromise},a.prototype.resize=function(e,t,i){var o,a,r,s,h,p=this;return this.debug("Start resize..."),o=u({},l),isNaN(i)?i&&(o=u(o,i)):o=u(o,{quality:i}),o.toWidth=t.width,o.toHeight=t.height,o.width=e.naturalWidth||e.width,o.height=e.naturalHeight||e.height,0===t.width||0===t.height?Promise.reject(new Error("Invalid output size: ".concat(t.width,"x").concat(t.height))):(o.unsharpRadius>2&&(o.unsharpRadius=2),a=!1,r=null,o.cancelToken&&(r=o.cancelToken.then((function(e){throw a=!0,e}),(function(e){throw a=!0,e}))),s=3,h=Math.ceil(Math.max(s,2.5*o.unsharpRadius|0)),this.init().then((function(){var i,s,l,m;return a?r:p.features.cib?(i=t.getContext("2d",{alpha:Boolean(o.alpha)}),p.debug("Resize via createImageBitmap()"),createImageBitmap(e,{resizeWidth:o.toWidth,resizeHeight:o.toHeight,resizeQuality:f.cib_quality_name(o.quality)}).then((function(e){var n,s,l;return a?r:o.unsharpAmount?(p.debug("Unsharp result"),(n=document.createElement("canvas")).width=o.toWidth,n.height=o.toHeight,(s=n.getContext("2d",{alpha:Boolean(o.alpha)})).drawImage(e,0,0),e.close(),l=s.getImageData(0,0,o.toWidth,o.toHeight),p.__mathlib.unsharp_mask(l.data,o.toWidth,o.toHeight,o.unsharpAmount,o.unsharpRadius,o.unsharpThreshold),i.putImageData(l,0,0),l=s=n=i=null,p.debug("Finished!"),t):(i.drawImage(e,0,0),e.close(),i=null,p.debug("Finished!"),t)}))):(s={},l=function(e){return Promise.resolve().then((function(){return p.features.ww?new Promise((function(t,i){var n=p.__workersPool.acquire();r&&r.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:p.__requested_features,preload:{wasm_nodule:p.__mathlib.__}},[e.src.buffer])})):p.__mathlib.resizeAndUnsharp(e,s)}))},m=function(e,t,i){var n,o,s,u=function(t){return p.__limit((function(){var d,u,h,m;return a?r:(f.isCanvas(e)?(p.debug("Get tile pixel data"),d=n.getImageData(t.x,t.y,t.width,t.height)):(p.debug("Draw tile imageBitmap/image to temporary canvas"),(u=document.createElement("canvas")).width=t.width,u.height=t.height,(h=u.getContext("2d",{alpha:Boolean(i.alpha)})).globalCompositeOperation="copy",h.drawImage(o||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),p.debug("Get tile pixel data"),d=h.getImageData(0,0,t.width,t.height),h=u=null),m={src:d.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},p.debug("Invoke resize math"),Promise.resolve().then((function(){return l(m)})).then((function(e){var i,n;if(a)return r;if(d=null,p.debug("Convert raw rgba tile result to ImageData"),c)i=new ImageData(new Uint8ClampedArray(e),t.toWidth,t.toHeight);else if((i=s.createImageData(t.toWidth,t.toHeight)).data.set)i.data.set(e);else for(n=i.data.length-1;n>=0;n--)i.data[n]=e[n];return p.debug("Draw tile"),w?s.putImageData(i,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):s.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(s=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 d?(p.debug("Decode image via createImageBitmap"),createImageBitmap(e).then((function(e){o=e}))):null;throw new Error('".from" should be image or canvas')})).then((function(){function e(){o&&(o.close(),o=null)}var n;return a?r:(p.debug("Calculate tiles"),n=b({width:i.width,height:i.height,srcTileSize:p.options.tile,toWidth:i.toWidth,toHeight:i.toHeight,destTileBorder:h}).map((function(e){return u(e)})),p.debug("Process tiles"),Promise.all(n).then((function(){return p.debug("Finished!"),e(),t}),(function(t){throw e(),t})))}))},function e(t,i,o,s){var l,c,d,h,p;return a?r:(l=n(t.shift(),2),c=l[0],d=l[1],h=0===t.length,s=u({},s,{toWidth:c,toHeight:d,quality:h?s.quality:Math.min(1,s.quality)}),h||((p=document.createElement("canvas")).width=c,p.height=d),m(i,h?o:p,s).then((function(){return h?o:(s.width=c,s.height=d,e(t,p,o,s))})))}(_(o.width,o.height,o.toWidth,o.toHeight,p.options.tile,h),e,t,o))})))},a.prototype.resizeBuffer=function(e){var t=this,i=u({},l,e);return this.init().then((function(){return t.__mathlib.resizeAndUnsharp(i)}))},a.prototype.toBlob=function(e,t,i){return t=t||"image/png",new Promise((function(n){var o,a,r,s;if(e.toBlob)e.toBlob((function(e){return n(e)}),t,i);else{for(a=(o=atob(e.toDataURL(t,i).split(",")[1])).length,r=new Uint8Array(a),s=0;s<a;s++)r[s]=o.charCodeAt(s);n(new Blob([r],{type:t}))}}))},a.prototype.debug=function(){},t.exports=a},{"./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",["require","exports","tslib","../Core","../FileUtil","./ExifUtil","pica"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a);const s=new((r=i.__importDefault(r)).default)({features:["js","wasm","ww"]}),l="image/jpeg";class c{constructor(){this.maxWidth=800,this.maxHeight=600,this.quality=.8,this.fileType=l}setMaxWidth(e){return null==e&&(e=800),this.maxWidth=e,this}setMaxHeight(e){return null==e&&(e=600),this.maxHeight=e,this}setQuality(e){return null==e&&(e=.8),this.quality=e,this}setFileType(e){return null==e&&(e=l),this.fileType=e,this}async saveFile(e,t,i=this.fileType,n=this.quality){const r=/(.+)(\..+?)$/.exec(t);let l=await s.toBlob(e.image,i,n);return"image/jpeg"===i&&void 0!==e.exif&&(l=await a.setExifData(l,e.exif)),o.blobToFile(l,r[1])}async loadFile(e){let t=Promise.resolve(void 0),i=e;"image/jpeg"===e.type&&(t=a.getExifBytesFromJpeg(e),i=await a.removeExifData(i));const n=new Promise(((e,t)=>{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),t(n.error)})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[o,r]=await Promise.all([t,n]);return{exif:o,image:r}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,a){const r=document.createElement("canvas");if(window.createImageBitmap){if((await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965")}const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);r.width=Math.floor(e.width*d),r.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const h={quality:u,cancelToken:a,alpha:!0};return s.resize(e,r,h)}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML,u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;h.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r);const u=new Map,h=new WeakMap;t.init=function(e,t,i,n,c,d){if(u.has(t))return;const p=document.getElementById(e);if(null===p)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let m=document.getElementById(t);null===m&&(m=document.createElement("input"),m.type="hidden",m.id=t,m.name=t,m.value=i.toString(),p.appendChild(m)),function(e,t,i,n,c,d){function p(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=_.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let m;const f=t.parentElement;"DD"===f.nodeName?(m=document.createElement("div"),m.className="dropdown",f.insertAdjacentElement("afterbegin",m)):(m=f,m.classList.add("dropdown")),a.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle dropdownIndicator boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),m.appendChild(g);const _=document.createElement("ul");if(_.className="dropdownMenu",m.appendChild(_),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",p),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),_.appendChild(n);const o=document.createElement("a");o.className="box24",n.appendChild(o);const a=document.createElement("img");a.src=t.iconPath,a.alt="",a.className="iconFlag",o.appendChild(a);const r=document.createElement("span");r.textContent=t.languageName,o.appendChild(r),+e===i&&(g.innerHTML=o.innerHTML)})),d){const e=document.createElement("li");e.className="dropdownDivider",_.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",p),_.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML),t.addEventListener("click",p)}else if(0===i){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("span");t.className="icon icon24 fa-question pointer",e.appendChild(t);const i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),e.appendChild(i)}r.default.init(g),u.set(e,{callback:c,dropdownMenu:_,dropdownToggle:g,element:t});const b=t.closest("form");if(null!==b){b.addEventListener("submit",l);let t=h.get(b);void 0===t&&(t=[],h.set(b,t)),t.push(e)}}(t,m,i,n,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t,i){const n=d.get(e),o=a.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),r=o?o.textContent:"";if(n.languageId!==t){const o=h.get(e);n.languageId&&o.set(n.languageId,n.element.value),0===t?h.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=r,n.buttonLabel.classList[t?"add":"remove"]("active"),n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=a.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),r=h.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!r.get(t)),i?e.classList.add("missingValue"):e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=h.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);const d=new Map,u=new WeakMap,h=new Map;t.init=function(e,t,i,n){if(h.has(e))return;const p=document.getElementById(e);if(null===p)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const m=new Map;Object.entries(t).forEach((([e,t])=>{m.set(+e,r.unescapeHTML(t))})),h.set(e,m),function(e,t,i,n,r){let h=t.parentElement;if(!h.classList.contains("inputAddon")){h=document.createElement("div"),h.className="inputAddon","TEXTAREA"===t.nodeName&&h.classList.add("inputAddonTextarea"),h.dataset.inputId=e;const i=document.activeElement===t;t.insertAdjacentElement("beforebegin",h),h.appendChild(t),i&&t.focus()}h.classList.add("dropdown");const p=document.createElement("span");p.className="button dropdownToggle inputPrefix";const m=document.createElement("span");m.textContent=o.get("wcf.global.button.disabledI18n"),p.appendChild(m),h.insertBefore(p,t);const f=document.createElement("ul");f.className="dropdownMenu",p.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const a=t instanceof HTMLElement;s(e,n,a)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!r){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let _;(r||i.size)&&(_=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),a.default.init(p),a.default.registerCallback(h.id,l),d.set(e,{buttonLabel:m,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:r});const b=t.closest("form");if(null!==b){b.addEventListener("submit",c);let t=u.get(b);void 0===t&&(t=[],u.set(b,t)),t.push(e)}_&&g(_)}(e,p,m,i,n)},t.registerCallback=function(e,t,i){if(!h.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},t.unregister=function(e){if(!h.has(e))throw new Error(`Unknown element id '${e}'.`);h.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const i=h.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),h.set(e,n),void s(e,0,!0);h.set(e,n),i.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const i=t.buttonLabel.parentElement;n.default.hide(i),i.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const i=t.buttonLabel.parentElement;n.default.show(i),i.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!i.isEnabled)return!0;const n=h.get(e),o=a.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let r=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(r)return!1;s=!0}else{if(s)return!1;r=!0}})),!r||t}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input"],(function(e,t,i,n){"use strict";function o(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)}function a(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),t.init=function(e,t,i,r){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected <textarea class="wysiwygTextarea" /> for id '${e}'.`);n.init(e,t,i,r),n.registerCallback(e,"select",o),n.registerCallback(e,"submit",a)}})),define("WoltLabSuite/Core/Media/Clipboard",["require","exports","tslib","../Controller/Clipboard","../Ui/Notification","../Ui/Dialog","../Event/Handler","../Language","../Ajax"],(function(e,t,i,n,o,a,r,s,l){"use strict";let c;Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);const d=new class{_ajaxSetup(){return{data:{className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(e){switch(e.actionName){case"getSetCategoryDialog":a.open(this,e.returnValues.template);break;case"setCategory":a.close(this),o.show(),n.reload()}}_dialogSetup(){return{id:"mediaSetCategoryDialog",options:{onSetup:e=>{e.querySelector("button").addEventListener("click",(t=>{t.preventDefault();const i=e.querySelector('select[name="categoryID"]');var n;n=~~i.value,l.api(d,{actionName:"setCategory",objectIDs:u,parameters:{categoryID:n}});t.currentTarget.disabled=!0}))},title:s.get("wcf.media.setCategory")},source:null}}};let u=[];t.init=function(e,t,i){n.setup({hasMarkedItems:t,pageClassName:e}),c=i,r.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",(e=>function(e){const t=e.data.parameters.objectIDs;switch(e.data.actionName){case"com.woltlab.wcf.media.delete":null!==e.responseData&&c.clipboardDeleteMedia(t);break;case"com.woltlab.wcf.media.insert":c.clipboardInsertMedia(t);break;case"com.woltlab.wcf.media.setCategory":u=t,l.api(d,{actionName:"getSetCategoryDialog"})}}(e)))}})),define("WoltLabSuite/Core/Media/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Media/Upload",["require","exports","tslib","../Upload","../Core","../Dom/Util","../Dom/Traverse","../Language","../User","../Date/Util","../FileUtil","../Dom/Change/Listener","../Event/Handler"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importStar(h);class p extends n.default{constructor(e,t,i){super(e,t,o.extend({className:"wcf\\data\\media\\MediaAction",multiple:!!i.mediaManager,singleFileRequests:!0},i||{})),this._categoryId=null,i=i||{},this._elementTagSize=144,this._options.elementTagSize&&(this._elementTagSize=this._options.elementTagSize),this._mediaManager=null,this._options.mediaManager&&(this._mediaManager=this._options.mediaManager,delete this._options.mediaManager)}_createFileElement(e){let t;if("OL"===this._target.nodeName||"UL"===this._target.nodeName)t=document.createElement("li");else{if("TBODY"===this._target.nodeName){const i=this._target.getElementsByTagName("TR")[0],n=this._target.parentNode.parentNode;return"none"===n.style.getPropertyValue("display")?(t=i,n.style.removeProperty("display"),document.getElementById(this._target.dataset.noItemsInfo).remove()):(t=i.cloneNode(!0),t.removeAttribute("id"),a.identify(t)),Array.from(t.getElementsByTagName("TD")).forEach((t=>{if(t.classList.contains("columnMark"))t.querySelectorAll("[data-object-id]").forEach((e=>a.hide(e)));else if(t.classList.contains("columnIcon"))t.querySelectorAll("[data-object-id]").forEach((e=>a.hide(e))),t.querySelector(".mediaEditButton").classList.add("jsMediaEditButton"),t.querySelector(".jsDeleteButton").dataset.confirmMessageHtml=s.get("wcf.media.delete.confirmMessage",{title:e.name});else if(t.classList.contains("columnFilename")){let i=t.querySelector("img");i||(i=t.querySelector(".icon48"));const n=document.createElement("span");n.className="icon icon48 fa-spinner mediaThumbnail",a.replaceElement(i,n);const o=t.querySelectorAll(".box48 > div > p");o[0].textContent=e.name;let r=o[1].getElementsByTagName("A")[0];r||(r=document.createElement("a"),o[1].getElementsByTagName("SMALL")[0].appendChild(r)),r.setAttribute("href",l.default.getLink()),r.textContent=l.default.username}else t.classList.contains("columnUploadTime")?(t.innerHTML="",t.appendChild(c.getTimeElement(new Date))):t.classList.contains("columnDigits")?t.textContent=d.formatFilesize(e.size):t.innerHTML=""})),a.prepend(t,this._target),t}t=document.createElement("p")}const i=document.createElement("div");i.className="mediaThumbnail",t.appendChild(i);const n=document.createElement("span");n.className="icon icon144 fa-spinner",i.appendChild(n);const o=document.createElement("div");o.className="mediaInformation",t.appendChild(o);const r=document.createElement("p");r.className="mediaTitle",r.textContent=e.name,o.appendChild(r);const h=document.createElement("progress");return h.max=100,o.appendChild(h),a.prepend(t,this._target),u.trigger(),t}_getParameters(){const e={elementTagSize:this._elementTagSize};if(this._mediaManager){e.imagesOnly=this._mediaManager.getOption("imagesOnly");const t=this._mediaManager.getCategoryId();t&&(e.categoryID=t)}return o.extend(super._getParameters(),e)}_replaceFileIcon(e,t,i){if(t.elementTag)e.outerHTML=t.elementTag;else if(t.tinyThumbnailType){const n=document.createElement("img");n.src=t.tinyThumbnailLink,n.alt="",n.style.setProperty("width",`${i}px`),n.style.setProperty("height",`${i}px`),a.replaceElement(e,n)}else{e.classList.remove("fa-spinner");let i=d.getIconNameByFilename(t.filename);i&&(i="-"+i),e.classList.add(`fa-file${i}-o`)}}_success(e,t){const i=this._fileElements[e];i.forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if("TR"===e.tagName)if(n)e.querySelectorAll("[data-object-id]").forEach((e=>{e.dataset.objectId=n.mediaID.toString(),e.style.removeProperty("display")})),e.querySelector(".columnMediaID").textContent=n.mediaID.toString(),this._replaceFileIcon(e.querySelector(".fa-spinner"),n,48);else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename});const o=e.querySelector(".fa-spinner");o.classList.remove("fa-spinner"),o.classList.add("fa-remove","pointer","jsTooltip"),o.title=s.get("wcf.global.button.delete"),o.addEventListener("click",(e=>{e.currentTarget.closest(".mediaFile").remove(),h.fire("com.woltlab.wcf.media.upload","removedErroneousUploadRow")})),e.classList.add("uploadFailed");const r=e.querySelectorAll(".columnFilename .box48 > div > p")[1];a.innerError(r,s.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})),r.remove()}else if(r.childByTag(r.childByClass(e,"mediaInformation"),"PROGRESS").remove(),n){const t=r.childByTag(r.childByClass(e,"mediaThumbnail"),"SPAN");this._replaceFileIcon(t,n,144),e.className="jsClipboardObject mediaFile",e.dataset.objectId=n.mediaID.toString(),this._mediaManager&&(this._mediaManager.setupMediaElement(n,e),this._mediaManager.addMedia(n,e))}else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename});const o=r.childByTag(r.childByClass(e,"mediaThumbnail"),"SPAN");o.classList.remove("fa-spinner"),o.classList.add("fa-remove","pointer"),e.classList.add("uploadFailed","jsTooltip"),e.title=s.get("wcf.global.button.delete"),e.addEventListener("click",(()=>e.remove()));r.childByClass(r.childByClass(e,"mediaInformation"),"mediaTitle").innerText=s.get(`wcf.media.upload.error.${n.errorType}`,{filename:n.filename})}u.trigger()})),h.fire("com.woltlab.wcf.media.upload","success",{files:i,isMultiFileUpload:-1!==this._multiFileUploadIds.indexOf(e),media:t.returnValues.media,upload:this,uploadId:e})}}return o.enableLegacyInheritance(p),p})),define("WoltLabSuite/Core/Media/Replace",["require","exports","tslib","../Core","./Upload","../Language","../Dom/Util","../Ui/Notification","../Dom/Change/Listener"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l);class c extends o.default{constructor(e,t,i,o){super(t,i,n.extend(o,{action:"replaceFile"})),this._mediaID=e}_createButton(){super._createButton(),this._button.classList.add("small"),this._button.querySelector("span").textContent=a.get("wcf.media.button.replaceFile")}_createFileElement(){return this._target}_getFormData(){return{objectIDs:[this._mediaID]}}_success(e,t){this._fileElements[e].forEach((e=>{const i=e.dataset.internalFileId,n=t.returnValues.media[i];if(n)n.isImage&&(this._target.innerHTML=n.smallThumbnailTag),document.getElementById("mediaFilename").textContent=n.filename,document.getElementById("mediaFilesize").textContent=n.formattedFilesize,n.isImage&&(document.getElementById("mediaImageDimensions").textContent=n.imageDimensions),document.getElementById("mediaUploader").innerHTML=n.userLinkElement,this._options.mediaEditor.updateData(n),r.default.innerError(this._buttonContainer,""),s.show();else{let n=t.returnValues.errors[i];n||(n={errorType:"uploadFailed",filename:e.dataset.filename}),r.default.innerError(this._buttonContainer,a.get("wcf.media.upload.error."+n.errorType,{filename:n.filename}))}l.trigger()}))}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Media/Editor",["require","exports","tslib","../Core","../Ui/Notification","../Ui/Dialog","../Language/Chooser","../Language/Input","../Dom/Util","../Dom/Traverse","../Dom/Change/Listener","../Language","../Ajax","./Replace"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),h=i.__importStar(h),p=i.__importDefault(p);class m{constructor(e){if(this._availableLanguageCount=1,this._categoryIds=[],this._dialogs=new Map,this._media=null,this._oldCategoryId=0,this._callbackObject=e||{},this._callbackObject._editorClose&&"function"!=typeof this._callbackObject._editorClose)throw new TypeError("Callback object has no function '_editorClose'.");if(this._callbackObject._editorSuccess&&"function"!=typeof this._callbackObject._editorSuccess)throw new TypeError("Callback object has no function '_editorSuccess'.")}_ajaxSetup(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}}_ajaxSuccess(){o.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),a.close(`mediaEditor_${this._media.mediaID}`),this._media=null}_close(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()}_initEditor(e,t){this._availableLanguageCount=~~t.returnValues.availableLanguageCount,this._categoryIds=t.returnValues.categoryIDs.map((e=>~~e)),t.returnValues.mediaData&&(this._media=t.returnValues.mediaData);const i=this._media.mediaID;setTimeout((()=>{var t,n,o;if(this._availableLanguageCount>1&&r.setLanguageId(`mediaEditor_${i}_languageID`,this._media.languageID||window.LANGUAGE_ID),this._categoryIds.length){const t=e.querySelector("select[name=categoryID]");this._media.categoryID?t.value=this._media.categoryID.toString():t.value="0"}const a=e.querySelector("input[name=title]"),c=e.querySelector("input[name=altText]"),u=e.querySelector("textarea[name=caption]");if(this._availableLanguageCount>1&&this._media.isMultilingual?(document.getElementById(`altText_${i}`)&&s.setValues(`altText_${i}`,this._media.altText||{}),document.getElementById(`caption_${i}`)&&s.setValues(`caption_${i}`,this._media.caption||{}),s.setValues(`title_${i}`,this._media.title||{})):(a.value=(null===(t=this._media)||void 0===t?void 0:t.title[this._media.languageID||window.LANGUAGE_ID])||"",c&&(c.value=(null===(n=this._media)||void 0===n?void 0:n.altText[this._media.languageID||window.LANGUAGE_ID])||""),u&&(u.value=(null===(o=this._media)||void 0===o?void 0:o.caption[this._media.languageID||window.LANGUAGE_ID])||"")),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");t.addEventListener("change",(e=>this._updateLanguageFields(e))),this._updateLanguageFields(null,t)}c&&c.addEventListener("keypress",(e=>this._keyPress(e))),a.addEventListener("keypress",(e=>this._keyPress(e))),e.querySelector("button[data-type=submit]").addEventListener("click",(()=>this._saveData())),document.activeElement.blur(),document.getElementById(`mediaEditor_${i}`).parentNode.scrollTop=0;const h=e.querySelector(".mediaManagerMediaReplaceButton");let m=e.querySelector(".mediaThumbnail");m||(m=document.createElement("div"),e.appendChild(m)),new p.default(i,l.identify(h),l.identify(m),{mediaEditor:this}),d.default.trigger()}),200)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._saveData())}_saveData(){const e=a.getDialog(`mediaEditor_${this._media.mediaID}`).content,t=e.querySelector("select[name=categoryID]"),i=e.querySelector("input[name=altText]"),n=e.querySelector("textarea[name=caption]"),o=e.querySelector("input[name=captionEnableHtml]"),d=e.querySelector("input[name=title]");let p=!1;const m=!!i&&c.childByClass(i.parentNode,"innerError"),f=!!n&&c.childByClass(n.parentNode,"innerError"),g=c.childByClass(d.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~t.value,-1===this._categoryIds.indexOf(this._media.categoryID)&&(this._media.categoryID=0)),this._availableLanguageCount>1){const t=e.querySelector("input[name=isMultilingual]");this._media.isMultilingual=~~t.checked,this._media.languageID=this._media.isMultilingual?null:r.getLanguageId(`mediaEditor_${this._media.mediaID}_languageID`)}else this._media.languageID=window.LANGUAGE_ID;this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual?(i&&!s.validate(i.id,!0)&&(p=!0,m||l.innerError(i,u.get("wcf.global.form.error.multilingual"))),n&&!s.validate(n.id,!0)&&(p=!0,f||l.innerError(n,u.get("wcf.global.form.error.multilingual"))),s.validate(d.id,!0)||(p=!0,g||l.innerError(d,u.get("wcf.global.form.error.multilingual"))),this._media.altText=i?this.mapToI18nValues(s.getValues(i.id)):"",this._media.caption=n?this.mapToI18nValues(s.getValues(n.id)):"",this._media.title=this.mapToI18nValues(s.getValues(d.id))):(this._media.altText[this._media.languageID]=i?i.value:"",this._media.caption[this._media.languageID]=n?n.value:"",this._media.title[this._media.languageID]=d.value),this._media.captionEnableHtml=o?~~o.checked:0;const _={allowAll:~~document.getElementById(`mediaEditor_${this._media.mediaID}_aclAllowAll`).checked,group:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[group][]"]`)).map((e=>~~e.value)),user:Array.from(e.querySelectorAll(`input[name="mediaEditor_${this._media.mediaID}_aclValues[user][]"]`)).map((e=>~~e.value))};p||(m&&m.remove(),f&&f.remove(),g&&g.remove(),h.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{aclValues:_,altText:this._media.altText,caption:this._media.caption,data:{captionEnableHtml:this._media.captionEnableHtml,categoryID:this._media.categoryID,isMultilingual:this._media.isMultilingual,languageID:this._media.languageID},title:this._media.title}}))}mapToI18nValues(e){const t={};return e.forEach(((e,i)=>t[i]=e)),t}_updateLanguageFields(e,t){e&&(t=e.currentTarget);const i=this._media.mediaID,n=document.getElementById(`mediaEditor_${i}_languageIDContainer`).parentNode;t.checked?(s.enable(`title_${i}`),document.getElementById(`caption_${i}`)&&s.enable(`caption_${i}`),document.getElementById(`altText_${i}`)&&s.enable(`altText_${i}`),l.hide(n)):(s.disable(`title_${i}`),document.getElementById(`caption_${i}`)&&s.disable(`caption_${i}`),document.getElementById(`altText_${i}`)&&s.disable(`altText_${i}`),l.show(n))}edit(e){let t,i=0;if("object"==typeof e?(t=e,i=t.mediaID):(t={mediaID:e},i=e),null!==this._media)throw new Error(`Cannot edit media with id ${i} while editing media with id '${this._media.mediaID}'.`);this._media=t,this._dialogs.has(`mediaEditor_${i}`)||this._dialogs.set(`mediaEditor_${i}`,{_dialogSetup:()=>({id:`mediaEditor_${i}`,options:{backdropCloseOnClick:!1,onClose:()=>this._close(),title:u.get("wcf.media.edit")},source:{after:(e,t)=>this._initEditor(e,t),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[i]}}})}),a.open(this._dialogs.get(`mediaEditor_${i}`))}updateData(e){this._callbackObject._editorSuccess&&this._callbackObject._editorSuccess(e)}}return n.enableLegacyInheritance(m),m})),define("WoltLabSuite/Core/Notification/Handler",["require","exports","tslib","../Ajax","../Core","../Event/Handler","../StringUtil"],(function(e,t,i,n,o,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(e){this.inactiveSince=0,this.lastRequestTimestamp=window.TIME_NOW,this.requestTimer=void 0,e=o.extend({enableNotifications:!1,icon:""},e),this.icon=e.icon,this.prepareNextRequest(),document.addEventListener("visibilitychange",(e=>this.onVisibilityChange(e))),window.addEventListener("storage",(()=>this.onStorage())),this.onVisibilityChange(),e.enableNotifications&&this.enableNotifications()}async enableNotifications(){switch(window.Notification.permission){case"granted":this.allowNotification=!0;break;case"default":"granted"===await window.Notification.requestPermission()&&(this.allowNotification=!0);break}}onVisibilityChange(e){if(e&&!document.hidden){(Date.now()-this.inactiveSince)/6e4>4&&(this.resetTimer(),this.dispatchRequest())}this.inactiveSince=document.hidden?Date.now():0}getNextDelay(){if(0===this.inactiveSince)return 5;const e=~~((Date.now()-this.inactiveSince)/6e4);return e<15?5:e<30?10:15}resetTimer(){this.requestTimer&&(window.clearTimeout(this.requestTimer),this.requestTimer=void 0)}prepareNextRequest(){this.resetTimer(),this.requestTimer=window.setTimeout(this.dispatchRequest.bind(this),6e4*this.getNextDelay())}dispatchRequest(){const e={};a.fire("com.woltlab.wcf.notification","beforePoll",e),e.lastRequestTimestamp=this.lastRequestTimestamp,n.api(this,{parameters:e})}onStorage(){let e,t;this.prepareNextRequest();let i=!1;try{e=window.localStorage.getItem(o.getStoragePrefix()+"notification"),t=window.localStorage.getItem(o.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),t=JSON.parse(t)}catch(e){i=!0}i||a.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:t})}_ajaxSuccess(e){const t=e.returnValues.keepAliveData,i=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks({returnValues:t});let n=!1;try{window.localStorage.setItem(o.getStoragePrefix()+"notification",JSON.stringify(i)),window.localStorage.setItem(o.getStoragePrefix()+"keepAliveData",JSON.stringify(t))}catch(e){n=!0,window.console.log(e)}n||this.prepareNextRequest(),this.lastRequestTimestamp=e.returnValues.lastRequestTimestamp,a.fire("com.woltlab.wcf.notification","afterPoll",i),this.showNotification(i)}showNotification(e){if(this.allowNotification&&"object"==typeof e.notification&&"string"==typeof e.notification.message){const t=new window.Notification(e.notification.title,{body:r.unescapeHTML(e.notification.message),icon:this.icon});t.onclick=()=>{window.focus(),t.close(),window.location.href=e.notification.link}}}_ajaxSetup(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}let l;t.setup=function(e){l||(l=new s(e))}})),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["require","exports","tslib","../../Event/Handler","../../Language"],(function(e,t,i,n,o){"use strict";function a(e){if(e.preventDefault(),!e.dataTransfer||!e.dataTransfer.types)return;const t=Object.keys(e.dataTransfer).some((e=>e.startsWith("moz")));u=!1,t?"application/x-moz-file"===e.dataTransfer.types[0]&&(u=!0):u=e.dataTransfer.types.some((e=>"Files"===e)),u&&(d||(d=!0,c.forEach(((e,t)=>{const i=e.editor.$editor[0];if(!i.parentElement)return void c.delete(t);let a=e.element;null===a&&(a=document.createElement("div"),a.className="redactorDropArea",a.dataset.elementId=e.editor.$element[0].id,a.dataset.dropHere=o.get("wcf.attachment.dragAndDrop.dropHere"),a.dataset.dropNow=o.get("wcf.attachment.dragAndDrop.dropNow"),a.addEventListener("dragover",(()=>{a.classList.add("active")})),a.addEventListener("dragleave",(()=>{a.classList.remove("active")})),a.addEventListener("drop",(e=>function(e){if(!u)return;if(!e.dataTransfer||!e.dataTransfer.files.length)return;e.preventDefault();const t=e.currentTarget.dataset.elementId;Array.from(e.dataTransfer.files).forEach((e=>{const i={file:e};n.fire("com.woltlab.wcf.redactor2",`dragAndDrop_${t}`,i)})),r()}(e))),e.element=a),i.parentElement.insertBefore(a,i),a.style.setProperty("top",`${i.offsetTop}px`,"")}))))}function r(){d&&u&&(null!==h&&window.clearTimeout(h),h=window.setTimeout((()=>{d||c.forEach((e=>{e.element&&e.element.parentElement&&(e.element.classList.remove("active"),e.element.remove())})),h=null}),100),d=!1)}function s(){window.addEventListener("dragend",(e=>e.preventDefault())),window.addEventListener("dragover",(e=>a(e))),window.addEventListener("dragleave",(()=>r())),window.addEventListener("drop",(e=>function(e){if(null===e.target.closest(".redactor-layer")){const t={cancelDrop:!0,event:e};c.forEach((e=>{n.fire("com.woltlab.wcf.redactor2",`dragAndDrop_globalDrop_${e.editor.$element[0].id}`,t)})),t.cancelDrop&&e.preventDefault()}r()}(e))),l=!0}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let l=!1;const c=new Map;let d=!1,u=!1,h=null;t.init=function(e){l||s(),c.set(e.uuid,{editor:e,element:null})}})),define("WoltLabSuite/Core/Ui/DragAndDrop",["require","exports","tslib","../Core","../Event/Handler","./Redactor/DragAndDrop"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0,n=i.__importStar(n),o=i.__importStar(o),t.register=function(e){const t=n.getUuid();e=n.extend({element:null,elementId:"",onDrop:function(e){},onGlobalDrop:function(e){}}),o.add("com.woltlab.wcf.redactor2",`dragAndDrop_${e.elementId}`,e.onDrop),o.add("com.woltlab.wcf.redactor2",`dragAndDrop_globalDrop_${e.elementId}`,e.onGlobalDrop),a.init({uuid:t,$editor:[e.element],$element:[{id:e.elementId}]})}})),define("WoltLabSuite/Core/Ui/FlexibleMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","../Dom/Traverse","./Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";function s(e){const t=document.getElementById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(u.has(e))return;const i=a.childByTag(t,"UL");if(null===i)throw"Expected an <ul> element as child of container '"+e+"'.";u.set(e,t),m.set(e,i),d(e)}function l(){document.querySelectorAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)").forEach((e=>{const t=a.childByTag(e,"NAV");null!==t&&(e.classList.add("jsFlexibleMenuEnabled"),s(o.default.identify(t)))}))}function c(){u.forEach(((e,t)=>{d(t)}))}function d(e){const t=u.get(e);if(void 0===t)throw"Expected a valid element id, '"+e+"' is unknown.";const i=window.getComputedStyle(t);let n=t.parentNode.clientWidth;n-=o.default.styleAsInt(i,"margin-left"),n-=o.default.styleAsInt(i,"margin-right");const s=m.get(e),l=a.childrenByTag(s,"LI");let c=h.get(e),f=0;if(void 0!==c){for(let e=0,t=l.length;e<t;e++){const t=l[e];t.classList.contains("dropdown")||o.default.show(t)}null!==c.parentNode&&(f=o.default.outerWidth(c))}const g=[];if(s.scrollWidth-f>n)for(let e=l.length-1;e>=0;e--){const t=l[e];if(!(t.classList.contains("dropdown")||t.classList.contains("active")||t.classList.contains("ui-state-active"))&&(g.push(t),o.default.hide(t),s.scrollWidth<n))break}if(g.length){let t;if(void 0===c){c=document.createElement("li"),c.className="dropdown jsFlexibleMenuDropdown";const i=document.createElement("a");i.className="icon icon16 fa-list",c.appendChild(i),t=document.createElement("ul"),t.classList.add("dropdownMenu"),c.appendChild(t),h.set(e,c),p.set(e,t),r.default.init(i)}else t=p.get(e);null===c.parentNode&&s.appendChild(c);const i=document.createDocumentFragment();g.forEach((t=>{const n=document.createElement("li");n.innerHTML=t.innerHTML,n.addEventListener("click",(i=>{var n;i.preventDefault(),null===(n=t.querySelector("a"))||void 0===n||n.click(),setTimeout((()=>{d(e)}),59)})),i.appendChild(n)})),t.innerHTML="",t.appendChild(i)}else void 0!==c&&null!==c.parentNode&&c.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.rebuild=t.rebuildAll=t.registerTabMenus=t.register=t.setup=void 0,n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r);const u=new Map,h=new Map,p=new Map,m=new Map;t.setup=function(){null!==document.getElementById("mainMenu")&&s("mainMenu");const e=document.querySelector(".navigationHeader");null!==e&&s(o.default.identify(e)),window.addEventListener("resize",c),n.default.add("WoltLabSuite/Core/Ui/FlexibleMenu",l)},t.register=s,t.registerTabMenus=l,t.rebuildAll=c,t.rebuild=d})),define("WoltLabSuite/Core/Ui/Suggestion",["require","exports","tslib","../Ajax","../Core","./Dropdown/Simple"],(function(e,t,i,n,o,a){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a);class r{constructor(e,t){this.dropdownMenu=null,this.value="";const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id.");if(this.element=i,this.ajaxPayload=o.extend({actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},t.ajax),"function"!=typeof t.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this.callbackSelect=t.callbackSelect,this.excludedSearchValues=new Set(Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[]),this.threshold=void 0===t.threshold?3:t.threshold,this.element.addEventListener("click",(e=>e.preventDefault())),this.element.addEventListener("keydown",(e=>this.keyDown(e))),this.element.addEventListener("keyup",(e=>this.keyUp(e)))}addExcludedValue(e){this.excludedSearchValues.add(e)}removeExcludedValue(e){this.excludedSearchValues.delete(e)}isActive(){return null!==this.dropdownMenu&&a.default.isOpen(this.element.id)}keyDown(e){if(!this.isActive())return!0;if(-1===["ArrowDown","ArrowUp","Enter","Escape"].indexOf(e.key))return!0;let t,i=0;const n=this.dropdownMenu.childElementCount;for(;i<n&&(t=this.dropdownMenu.children[i],!t.classList.contains("active"));)i++;if("Enter"===e.key)a.default.close(this.element.id),this.select(void 0,t);else if("Escape"===e.key){if(!a.default.isOpen(this.element.id))return!0;a.default.close(this.element.id)}else{let o=0;"ArrowUp"===e.key?o=(0===i?n:i)-1:"ArrowDown"===e.key&&(o=i+1,o===n&&(o=0)),o!==i&&(t.classList.remove("active"),this.dropdownMenu.children[o].classList.add("active"))}return e.preventDefault(),!1}select(e,t){if(e instanceof MouseEvent){t=e.currentTarget.parentNode}const i=t.children[0];this.callbackSelect(this.element.id,{objectId:+(i.dataset.objectId||0),value:t.textContent||"",type:i.dataset.type||""}),e instanceof MouseEvent&&this.element.focus()}keyUp(e){const t=e.currentTarget.value.trim();if(this.value!==t){if(t.length<this.threshold)return null!==this.dropdownMenu&&a.default.close(this.element.id),void(this.value=t);this.value=t,n.api(this,{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:t}}})}}_ajaxSetup(){return{data:this.ajaxPayload}}_ajaxSuccess(e){null===this.dropdownMenu?(this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="dropdownMenu",a.default.initFragment(this.element,this.dropdownMenu)):this.dropdownMenu.innerHTML="",Array.isArray(e.returnValues)&&e.returnValues.length>0?(e.returnValues.forEach(((e,t)=>{const i=document.createElement("a");e.icon?(i.className="box16",i.innerHTML=`${e.icon} <span></span>`,i.children[1].textContent=e.label):i.textContent=e.label,i.dataset.objectId=e.objectID.toString(),e.type&&(i.dataset.type=e.type),i.addEventListener("click",(e=>this.select(e)));const n=document.createElement("li");0===t&&(n.className="active"),n.appendChild(i),this.dropdownMenu.appendChild(n)})),a.default.open(this.element.id,!0)):a.default.close(this.element.id)}}return o.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/ItemList",["require","exports","tslib","../Core","../Dom/Traverse","../Language","./Suggestion","./Dropdown/Simple","../Dom/Util"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(e){const t=y.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems}function d(e){const t=y.get(e);c(e)?(l.default.show(t.element),l.default.hide(t.limitReached)):(l.default.hide(t.element),l.default.show(t.limitReached))}function u(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?_(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}function h(e){if("Enter"===e.key){e.preventDefault();const t=e.currentTarget;if(y.get(t.id).options.restricted)return;const i=t.value.trim();i.length&&g(t.id,{objectId:0,value:i})}}function p(e){const t=e.currentTarget;if(y.get(t.id).options.restricted)return;let i=t.value;i.includes(",")&&(i=i.replace(/,/g,""),i.length?g(t.id,{objectId:0,value:i}):t.value=i)}function m(e){e.preventDefault();const t=e.clipboardData.getData("text/plain"),i=e.currentTarget,n=i.id,o=+i.maxLength;t.split(/,/).forEach((e=>{e=e.trim(),o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&c(n)&&g(n,{objectId:0,value:e})}))}function f(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}function g(e,t){const i=y.get(e),n=document.createElement("li");n.className="item";const o=document.createElement("span");if(o.className="content",o.dataset.objectId=t.objectId.toString(),t.type&&(o.dataset.type=t.type),o.textContent=t.value,n.appendChild(o),!i.element.disabled){const e=document.createElement("a");e.className="icon icon16 fa-times",e.addEventListener("click",_),n.appendChild(e)}i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",i.element.disabled||d(e);let a=b(i);"function"==typeof i.options.callbackChange&&(null===a&&(a=w(e)),i.options.callbackChange(e,a))}function _(e,t){if(e instanceof Event){e=e.currentTarget.parentElement}const i=e.parentElement.dataset.elementId||"",n=y.get(i);e.children[0].textContent&&n.suggestion.removeExcludedValue(e.children[0].textContent),e.remove(),t||n.element.focus(),d(i);let o=b(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=w(i)),n.options.callbackChange(i,o))}function b(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);const t=w(e.element.id);return e.shadow.value=w(e.element.id).map((e=>e.value)).join(","),t}function v(e){const t=e.currentTarget,i=y.get(t.id);if(i.options.restricted)return;const n=t.value.trim();n.length&&(i.suggestion&&i.suggestion.isActive()||g(t.id,{objectId:0,value:n}))}function w(e){const t=y.get(e);if(!t)throw new Error("Element id '"+e+"' is unknown.");const i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:+(e.dataset.objectId||""),value:e.textContent.trim(),type:e.dataset.type})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importDefault(l);const y=new Map;t.init=function(e,t,i){const d=document.getElementById(e);if(null===d)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(y.has(e)){const t=y.get(e);Object.keys(t).forEach((e=>{const i=t[e];i instanceof Element&&i.parentNode&&i.remove()})),s.default.destroy(e),y.delete(e)}const _=n.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},i),b=o.parentByTag(d,"FORM");if(null!==b)if(_.isCSV)b.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}}));else{if(!_.submitFieldName.length&&"function"!=typeof _.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");b.addEventListener("submit",(()=>{if(c(e)){const t=y.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}const t=w(e);_.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=_.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,b.appendChild(t)})):_.callbackSubmit(b,t)}))}const E=function(e,t){const i=e.parentElement,n=document.createElement("ol");n.className="inputItemList"+(e.disabled?" disabled":""),n.dataset.elementId=e.id,n.addEventListener("click",(t=>{t.target===n&&e.focus()}));const o=document.createElement("li");o.className="input",n.appendChild(o),e.addEventListener("input",p),e.addEventListener("keydown",u),e.addEventListener("keypress",h),e.addEventListener("keyup",f),e.addEventListener("paste",m);const r=e===document.activeElement;r&&e.blur(),e.addEventListener("blur",v),i.insertBefore(n,e),o.appendChild(e),r&&window.setTimeout((()=>{e.focus()}),1),-1!==t.maxLength&&(e.maxLength=t.maxLength);const s=document.createElement("span");s.className="inputItemListLimitReached",s.textContent=a.get("wcf.global.form.input.maxItems"),l.default.hide(s),o.appendChild(s);let c=null;const d=[];if(t.isCSV&&(c=document.createElement("input"),c.className="itemListInputShadow",c.type="hidden",c.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(c,n),e.value.split(",").forEach((e=>{(e=e.trim())&&d.push(e)})),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentNode.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,limitReached:s,list:n,shadow:c,values:d}}(d,_),S=new r.default(e,{ajax:_.ajax,callbackSelect:g,excludedSearchValues:_.excludedSearchValues});y.set(e,{dropdownMenu:null,element:E.element,limitReached:E.limitReached,list:E.list,listItem:E.element.parentElement,options:_,shadow:E.shadow,suggestion:S}),t=_.callbackSetupValues?_.callbackSetupValues():E.values.length?E.values:t,Array.isArray(t)&&t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),g(e,t)}))},t.getValues=w,t.setValues=function(e,t){const i=y.get(e);if(!i)throw new Error("Element id '"+e+"' is unknown.");o.childrenByClass(i.list,"item").forEach((e=>{_(e,!0)})),t.forEach((t=>{g(e,t)}))}})),define("WoltLabSuite/Core/Ui/Pagination",["require","exports","tslib","../Core","../Language","../StringUtil","./Page/JumpTo"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(e,t){this.callbackSwitch=null,this.callbackShouldSwitch=null,this.element=e,this.activePage=t.activePage,this.maxPage=t.maxPage,"function"==typeof t.callbackSwitch&&(this.callbackSwitch=t.callbackSwitch),"function"==typeof t.callbackShouldSwitch&&(this.callbackShouldSwitch=t.callbackShouldSwitch),this.element.classList.add("pagination"),this.rebuild()}rebuild(){let e=!1;this.element.innerHTML="";const t=document.createElement("ul");let i=document.createElement("li");i.className="skip",t.appendChild(i);let n="icon icon24 fa-chevron-left";if(this.activePage>1){const e=document.createElement("a");e.className=n+" jsTooltip",e.href="#",e.title=o.get("wcf.global.page.previous"),e.rel="prev",i.appendChild(e),e.addEventListener("click",(e=>this.switchPage(this.activePage-1,e)))}else i.innerHTML='<span class="'+n+'"></span>',i.classList.add("disabled");t.appendChild(this.createLink(1));let a=s.showLinks-4,l=this.activePage-2;l<0&&(l=0);let c=this.maxPage-(this.activePage+1);c<0&&(c=0),this.activePage>1&&this.activePage<this.maxPage&&a--;const d=a/2;let u=this.activePage,h=this.activePage;u<1&&(u=1),h<1&&(h=1),h>this.maxPage-1&&(h=this.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.maxPage&&(h=this.maxPage);const p='<a class="jsTooltip" title="'+o.get("wcf.page.jumpTo")+'">…</a>';u>1&&(u-1<2?t.appendChild(this.createLink(2)):(i=document.createElement("li"),i.className="jumpTo",i.innerHTML=p,t.appendChild(i),e=!0));for(let e=u+1;e<h;e++)t.appendChild(this.createLink(e));if(h<this.maxPage&&(this.maxPage-h<2?t.appendChild(this.createLink(this.maxPage-1)):(i=document.createElement("li"),i.className="jumpTo",i.innerHTML=p,t.appendChild(i),e=!0)),t.appendChild(this.createLink(this.maxPage)),i=document.createElement("li"),i.className="skip",t.appendChild(i),n="icon icon24 fa-chevron-right",this.activePage<this.maxPage){const e=document.createElement("a");e.className=n+" jsTooltip",e.href="#",e.title=o.get("wcf.global.page.next"),e.rel="next",i.appendChild(e),e.addEventListener("click",(e=>this.switchPage(this.activePage+1,e)))}else i.innerHTML='<span class="'+n+'"></span>',i.classList.add("disabled");e&&(t.dataset.pages=this.maxPage.toString(),r.init(t,this.switchPage.bind(this))),this.element.appendChild(t)}createLink(e){const t=document.createElement("li");if(e!==this.activePage){const i=document.createElement("a");i.textContent=a.addThousandsSeparator(e),i.addEventListener("click",(t=>this.switchPage(e,t))),t.appendChild(i)}else t.classList.add("active"),t.innerHTML="<span>"+a.addThousandsSeparator(e)+'</span><span class="invisible">'+o.get("wcf.page.pagePosition",{pageNo:e,pages:this.maxPage})+"</span>";return t}getActivePage(){return this.activePage}getElement(){return this.element}getMaxPage(){return this.maxPage}switchPage(e,t){if(t instanceof MouseEvent){t.preventDefault();const e=t.currentTarget;if(e&&e.dataset.tooltip){const t=document.getElementById("balloonTooltip");t&&(n.triggerEvent(e,"mouseleave"),t.style.removeProperty("top"),t.style.removeProperty("bottom"))}}if((e=~~e)>0&&this.activePage!==e&&e<=this.maxPage){if(null!==this.callbackShouldSwitch&&!this.callbackShouldSwitch(e))return;this.activePage=e,this.rebuild(),null!==this.callbackSwitch&&this.callbackSwitch(e)}}}return s.showLinks=11,n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Upload/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["require","exports","https://connect.facebook.net/en_US/sdk.js"],(function(e,t){"use strict";return FB.init({version:"v7.0"}),FB})),define("WoltLabSuite/Core/Media/List/Upload",["require","exports","tslib","../Upload","../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_createButton(){super._createButton();const e=this._button.querySelector("span"),t=document.createTextNode(" ");e.insertBefore(t,e.childNodes[0]);const i=document.createElement("span");i.className="icon icon16 fa-upload",e.insertBefore(i,e.childNodes[0])}_getParameters(){return this._options.categoryId?o.extend(super._getParameters(),{categoryID:this._options.categoryId}):super._getParameters()}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Controller/Media/List",["require","exports","tslib","../../Media/List/Upload","../../Media/Clipboard","../../Event/Handler","../../Media/Editor","../../Dom/Change/Listener","../../Controller/Clipboard"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(){Array.from(h.getElementsByClassName("jsMediaEditButton")).forEach((e=>{e.classList.remove("jsMediaEditButton"),e.addEventListener("click",(e=>{return t=e,void u.edit(~~t.currentTarget.dataset.objectId);var t}))}))}function d(e){const t=h.getElementsByTagName("tr").length;void 0===e?t||window.location.reload():e.length===t?window.location.reload():l.reload()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l);const u=new r.default({_editorSuccess:(e,t)=>{e.categoryID!=t&&window.setTimeout((()=>{window.location.reload()}),500)}}),h=document.getElementById("mediaListTableBody");let p;t.init=function(e){e=e||{},p=new n.default("uploadButton","mediaListTableBody",{categoryId:e.categoryId,multiple:!0,elementTagSize:48}),o.init("wcf\\acp\\page\\MediaListPage",e.hasMarkedItems||!1,{clipboardDeleteMedia:e=>function(e){Array.from(document.getElementsByClassName("jsMediaRow")).forEach((t=>{const i=~~t.querySelector(".jsClipboardItem").dataset.objectId;-1!==e.indexOf(i)&&t.remove()})),document.getElementsByClassName("jsMediaRow").length||window.location.reload()}(e)}),a.add("com.woltlab.wcf.media.upload","removedErroneousUploadRow",(()=>d())),new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".jsMediaRow").setCallback(d),c(),s.add("WoltLabSuite/Core/Controller/Media/List",(()=>c())),a.add("com.woltlab.wcf.media.upload","success",(e=>function(e){if(e.upload===p&&!e.isMultiFileUpload&&!p.hasPendingUploads()){const t=Object.keys(e.media);t.length&&u.edit(e.media[t[0]])}}(e)))}})),define("WoltLabSuite/Core/Controller/Notice/Dismiss",["require","exports","tslib","../../Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),t.setup=function(){document.querySelectorAll(".jsDismissNoticeButton").forEach((e=>{e.addEventListener("click",(e=>function(e){const t=e.currentTarget;n.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[t.dataset.objectId]},success:()=>{t.parentElement.remove()}})}(e)))}))}})),define("WoltLabSuite/Core/Devtools/Style/LiveReload",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notify=t.watch=void 0;const i="com.woltlab.wcf#DevTools/Style/LiveReload";t.watch=function(){if(!window.BroadcastChannel)return;new BroadcastChannel(i).onmessage=e=>{const t=document.querySelector("head link[rel=stylesheet]");if(!t)return;const i=new URL(t.href);i.searchParams.set("m",Math.trunc(Date.now()/1e3).toString());const n=document.createElement("link");n.rel="stylesheet",n.addEventListener("load",(()=>{t.remove()})),n.addEventListener("error",(()=>{n.remove()})),n.href=i.toString(),t.insertAdjacentElement("afterend",n)}},t.notify=function(){if(!window.BroadcastChannel)return;new BroadcastChannel(i).postMessage(void 0)}})),define("WoltLabSuite/Core/Form/Builder/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports","tslib","../../../Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);class o{constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}return n.enableLegacyInheritance(o),o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,i,n,o){"use strict";function a(){!0!==h?(h=!0,p=!1,o.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),h=!1,p&&a()):p=!0}function r(){const e=[];d.forEach(((t,i)=>{const o=document.getElementById(i);if(null===o)return void e.push(i);let a=!0;var r;t.forEach((e=>{var t;e.checkDependency()||(t=o,n.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&n.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,i=e.getAttribute("max");i&&(t.set("max",i),e.removeAttribute("max"));const n=e.getAttribute("maxlength");n&&(t.set("maxlength",n),e.removeAttribute("maxlength"));const o=e.getAttribute("min");o&&(t.set("min",o),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),a=!1)})),a&&(r=o,n.default.show(r),s.delete(r),r.classList.contains("tabMenuContent")&&r.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===r.dataset.name&&n.default.show(e)})),r.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==r&&!n.default.isHidden(t);)t=t.parentNode;if(t===r&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),a()}Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=t.isHiddenByDependencies=t.checkDependencies=t.checkContainers=t.addDependency=t.addContainerCheckCallback=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let h=!1,p=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");o.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=n.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>r())):e.addEventListener("change",(()=>r())))}))},t.checkContainers=a,t.checkDependencies=r,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((i=>{e.contains(i)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,i)=>{t.contains(document.getElementById(i))&&d.delete(i),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))}})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterForm=t.registerForm=t.registerField=t.hasForm=t.hasField=t.getForm=t.getField=t.getData=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);const c=new Map,d=new Map;t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const i=e.getData();if(!(i instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(i)})),Promise.all(t).then((e=>e.reduce(((e,t)=>n.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof a.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const i=t.getId();if(s(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");c.get(e).set(i,t),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");o.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),r.unregister(e),o.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}})),define("WoltLabSuite/Core/Form/Builder/Dialog",["require","exports","tslib","../../Core","../../Ui/Dialog","../../Ajax","./Manager"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(e,t,i,n){this.init(e,t,i,n)}init(e,t,i,o){this._dialogId=e,this._className=t,this._actionName=i,this._options=n.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:/\w+\\data\\/.test(this._className)},o),this._options.dialog=n.extend(this._options.dialog||{},{onClose:()=>this._dialogOnClose()}),this._formId="",this._dialogContent=""}_ajaxSetup(){const e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+window.SECURITY_TOKEN,e.withCredentials=!0),e}_ajaxSuccess(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(){o.default.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()}_dialogOnClose(){this._options.destroyOnClose&&this.destroy()}_dialogSetup(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}}_dialogSubmit(){this.getData().then((e=>this._submitForm(e)))}_openDialogContent(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;const i=o.default.open(this,this._dialogContent),a=i.content.querySelector("button[data-type=cancel]");null===a||n.stringToBool(a.dataset.hasEventListener||"")||(a.addEventListener("click",(()=>this._closeDialog())),a.dataset.hasEventListener="1"),this._additionalSubmitButtons=Array.from(i.content.querySelectorAll(':not(.formSubmit) button[type="submit"]')),this._additionalSubmitButtons.forEach((e=>{e.addEventListener("click",(()=>{this._additionalSubmitButtons.forEach((t=>{t.dataset.isClicked=t===e?"1":"0"})),setTimeout((()=>o.default.submit(this._dialogId)),0)}))}))}_submitForm(e){const t=o.default.getDialog(this).content.querySelector("button[data-type=submit]");"function"==typeof this._options.onSubmit?this._options.onSubmit(e,t):"string"==typeof this._options.submitActionName&&(t.disabled=!0,this._additionalSubmitButtons.forEach((e=>e.disabled=!0)),a.api(this,{actionName:this._options.submitActionName,parameters:{data:e,formId:this._formId}}))}destroy(e=!1){""!==this._formId&&(r.hasForm(this._formId)&&r.unregisterForm(this._formId),!0!==e&&o.default.destroy(this))}getData(){if(""===this._formId)throw new Error("Form has not been requested yet.");return r.getData(this._formId)}open(){o.default.getDialog(this._dialogId)?o.default.open(this):a.api(this)}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Media/Manager/Search",["require","exports","tslib","../../Dom/Traverse","../../Language","../../Ajax","../../Core","../../Dom/Util"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(e){this._searchMode=!1,this._mediaManager=e;const t=e.getDialog();this._searchContainer=t.querySelector(".mediaManagerSearch"),this._input=t.querySelector(".mediaManagerSearchField"),this._input.addEventListener("keypress",(e=>this._keyPress(e))),this._cancelButton=t.querySelector(".mediaManagerSearchCancelButton"),this._cancelButton.addEventListener("click",(()=>this._cancelSearch()))}_ajaxSetup(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\media\\MediaAction",interfaceName:"wcf\\data\\ISearchAction"}}}_ajaxSuccess(e){this._mediaManager.setMedia(e.returnValues.media||{},e.returnValues.template||"",{pageCount:e.returnValues.pageCount||0,pageNo:e.returnValues.pageNo||0}),this._mediaManager.getDialog().querySelector(".dialogContent").scrollTop=0}_cancelSearch(){this._searchMode&&(this._searchMode=!1,this.resetSearch(),this._mediaManager.resetMedia())}_hideStringThresholdError(){const e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e&&s.default.hide(e)}_keyPress(e){"Enter"===e.key&&(e.preventDefault(),this._input.value.length>=this._mediaManager.getOption("minSearchLength")?(this._hideStringThresholdError(),this.search()):this._showStringThresholdError())}_showStringThresholdError(){let e=n.childByClass(this._input.parentNode.parentNode,"innerInfo");e?s.default.show(e):(e=document.createElement("p"),e.className="innerInfo",e.textContent=o.get("wcf.media.search.info.searchStringThreshold",{minSearchLength:this._mediaManager.getOption("minSearchLength")}),this._input.parentNode.insertAdjacentElement("afterend",e))}hideSearch(){s.default.hide(this._searchContainer)}resetSearch(){this._input.value=""}showSearch(){s.default.show(this._searchContainer)}search(e){"number"!=typeof e&&(e=1);let t=this._input.value;t&&this._input.value.length<this._mediaManager.getOption("minSearchLength")?(this._showStringThresholdError(),t=""):this._hideStringThresholdError(),this._searchMode=!0,a.api(this,{parameters:{categoryID:this._mediaManager.getCategoryId(),imagesOnly:this._mediaManager.getOption("imagesOnly"),mode:this._mediaManager.getMode(),pageNo:e,searchString:t}})}}return r.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Media/Manager/Base",["require","exports","tslib","../../Core","../../Language","../../Permission","../../Dom/Change/Listener","../../Event/Handler","../../Dom/Traverse","../../Dom/Util","../../Ui/Dialog","../../Controller/Clipboard","../../Ui/Pagination","../../Ui/Notification","../../StringUtil","./Search","../Upload","../Editor","../Clipboard"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p,m,f,g,_,b){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importDefault(h),p=i.__importStar(p),m=i.__importStar(m),f=i.__importDefault(f),g=i.__importDefault(g),_=i.__importDefault(_),b=i.__importStar(b);let v=0;class w{constructor(e){this._forceClipboard=!1,this._hadInitiallyMarkedItems=!1,this._listItems=new Map,this._media=new Map,this._mediaEditor=null,this._mediaManagerMediaList=null,this._pagination=null,this._search=null,this._upload=null,this._options=n.extend({dialogTitle:o.get("wcf.media.manager"),imagesOnly:!1,minSearchLength:3},e),this._id="mediaManager"+v++,a.get("admin.content.cms.canManageMedia")&&(this._mediaEditor=new _.default(this)),r.add("WoltLabSuite/Core/Media/Manager",(()=>this._addButtonEventListeners())),s.add("com.woltlab.wcf.media.upload","success",(e=>this._openEditorAfterUpload(e)))}_addButtonEventListeners(){this._mediaManagerMediaList&&a.get("admin.content.cms.canManageMedia")&&l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaEditButton");t&&(t.classList.remove("jsMediaEditButton"),t.addEventListener("click",(e=>this._editMedia(e))))}))}_categoryChange(){this._search.search()}_click(e){e.preventDefault(),d.open(this)}_dialogClose(){(a.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.hideEditor("com.woltlab.wcf.media")}_dialogInit(e,t){Object.entries(t.returnValues.media||{}).forEach((([e,t])=>{this._media.set(~~e,t)})),this._initPagination(~~t.returnValues.pageCount),this._hadInitiallyMarkedItems=t.returnValues.hasMarkedItems>0}_dialogSetup(){return{id:this._id,options:{onClose:()=>this._dialogClose(),onShow:()=>this._dialogShow(),title:this._options.dialogTitle},source:{after:(e,t)=>this._dialogInit(e,t),data:{actionName:"getManagementDialog",className:"wcf\\data\\media\\MediaAction",parameters:{mode:this.getMode(),imagesOnly:this._options.imagesOnly}}}}}_dialogShow(){if(!this._mediaManagerMediaList){const e=this.getDialog();this._mediaManagerMediaList=e.querySelector(".mediaManagerMediaList"),this._mediaCategorySelect=e.querySelector(".mediaManagerCategoryList > select"),this._mediaCategorySelect&&this._mediaCategorySelect.addEventListener("change",(()=>this._categoryChange()));const t=l.childrenByTag(this._mediaManagerMediaList,"LI");if(t.forEach((e=>{this._listItems.set(~~e.dataset.objectId,e)})),a.get("admin.content.cms.canManageMedia")){const e=d.getDialog(this).dialog.querySelector(".mediaManagerMediaUploadButton");this._upload=new g.default(c.identify(e),c.identify(this._mediaManagerMediaList),{mediaManager:this});new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".mediaFile")._didTriggerEffect=e=>this.removeMedia(e[0].dataset.objectId)}a.get("admin.content.cms.canManageMedia")||this._forceClipboard?b.init("menuManagerDialog-"+this.getMode(),!!this._hadInitiallyMarkedItems,this):this._removeClipboardCheckboxes(),this._search=new f.default(this),t.length||this._search.hideSearch()}(a.get("admin.content.cms.canManageMedia")||this._forceClipboard)&&u.showEditor()}_editMedia(e){if(!a.get("admin.content.cms.canManageMedia"))throw new Error("You are not allowed to edit media files.");d.close(this);const t=e.currentTarget;this._mediaEditor.edit(this._media.get(~~t.dataset.objectId))}_editorClose(){d.open(this)}_editorSuccess(e,t){if(this._mediaCategorySelect){const i=~~this._mediaCategorySelect.value;if(i){const n=~~e.categoryID;t==n||t!=i&&n!=i||this._search.search()}}d.open(this),this._media.set(~~e.mediaID,e);const i=this._listItems.get(~~e.mediaID),n=i.querySelector(".mediaTitle");e.isMultilingual?e.title&&e.title[window.LANGUAGE_ID]?n.textContent=e.title[window.LANGUAGE_ID]:n.textContent=e.filename:e.title&&e.title[e.languageID]?n.textContent=e.title[e.languageID]:n.textContent=e.filename;const o=i.querySelector(".mediaThumbnail");o.innerHTML=e.elementTag;const a=o.querySelector("img");a&&(a.src+=`&refresh=${Date.now()}`)}_initPagination(e,t){if(void 0===t&&(t=1),e>1){const i=document.createElement("div");i.className="paginationBottom jsPagination",c.replaceElement(d.getDialog(this).content.querySelector(".jsPagination"),i),this._pagination=new h.default(i,{activePage:t,callbackSwitch:e=>this._search.search(e),maxPage:e})}else this._pagination&&c.hide(this._pagination.getElement())}_removeClipboardCheckboxes(){this._mediaManagerMediaList.querySelectorAll(".mediaCheckbox").forEach((e=>e.remove()))}_openEditorAfterUpload(e){if(e.upload===this._upload&&!e.isMultiFileUpload&&!this._upload.hasPendingUploads()){const t=Object.keys(e.media);t.length&&(d.close(this),this._mediaEditor.edit(this._media.get(~~e.media[t[0]].mediaID)))}}_setMedia(e){this._media=new Map(Object.entries(e).map((([e,t])=>[~~e,t])));let t=l.nextByClass(this._mediaManagerMediaList,"info");this._media.size?t&&c.hide(t):(null===t&&(t=document.createElement("p"),t.className="info",t.textContent=o.get("wcf.media.search.noResults")),c.show(t),c.insertAfter(t,this._mediaManagerMediaList)),l.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{this._media.has(~~e.dataset.objectId)?c.show(e):c.hide(e)})),r.trigger(),a.get("admin.content.cms.canManageMedia")||this._forceClipboard?u.reload():this._removeClipboardCheckboxes()}addMedia(e,t){e.languageID||(e.isMultilingual=1),this._media.set(~~e.mediaID,e),this._listItems.set(~~e.mediaID,t),1===this._listItems.size&&this._search.showSearch()}clipboardDeleteMedia(e){e.forEach((e=>{this.removeMedia(~~e)})),p.show()}getCategoryId(){return this._mediaCategorySelect?~~this._mediaCategorySelect.value:0}getDialog(){return d.getDialog(this).dialog}getMode(){return""}getOption(e){return this._options[e]?this._options[e]:null}removeMedia(e){if(this._listItems.has(e)){try{this._listItems.get(e).remove()}catch(e){}this._listItems.delete(e),this._media.delete(e)}}resetMedia(){this._search.search()}setMedia(e,t,i){if(Object.entries(e).length>0){const e=document.createElement("ul");e.innerHTML=t,l.childrenByTag(e,"LI").forEach((e=>{this._listItems.has(~~e.dataset.objectId)||(this._listItems.set(~~e.dataset.objectId,e),this._mediaManagerMediaList.appendChild(e))}))}this._initPagination(i.pageCount,i.pageNo),this._setMedia(e)}setupMediaElement(e,t){const i=l.childByClass(t,"mediaInformation"),r=document.createElement("nav");r.className="jsMobileNavigation buttonGroupNavigation",i.parentNode.appendChild(r);const s=document.createElement("ul");s.className="buttonList iconList",r.appendChild(s);const c=document.createElement("li");c.className="mediaCheckbox",s.appendChild(c);const d=document.createElement("a");c.appendChild(d);const u=document.createElement("label");d.appendChild(u);const h=document.createElement("input");if(h.className="jsClipboardItem",h.type="checkbox",h.dataset.objectId=e.mediaID.toString(),u.appendChild(h),a.get("admin.content.cms.canManageMedia")){const t=document.createElement("li");t.className="jsMediaEditButton",t.dataset.objectId=e.mediaID.toString(),s.appendChild(t),t.innerHTML=`\n <a>\n <span class="icon icon16 fa-pencil jsTooltip" title="${o.get("wcf.global.button.edit")}"></span>\n <span class="invisible">${o.get("wcf.global.button.edit")}</span>\n </a>`;const i=document.createElement("li");i.className="jsDeleteButton",i.dataset.objectId=e.mediaID.toString();const a=n.getUuid();i.dataset.confirmMessageHtml=m.unescapeHTML(o.get("wcf.media.delete.confirmMessage",{title:a})).replace(a,m.escapeHTML(e.filename)),s.appendChild(i),i.innerHTML=`\n <a>\n <span class="icon icon16 fa-times jsTooltip" title="${o.get("wcf.global.button.delete")}"></span>\n <span class="invisible">${o.get("wcf.global.button.delete")}</span>\n </a>`}}}return n.enableLegacyInheritance(w),w})),define("WoltLabSuite/Core/Media/Manager/Editor",["require","exports","tslib","./Base","../../Core","../../Event/Handler","../../Dom/Traverse","../../Language","../../Ui/Dialog","../../Controller/Clipboard","../../Dom/Util"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);class u extends n.default{constructor(e){super(e=o.extend({callbackInsert:null},e)),this._forceClipboard=!0,this._activeButton=null;const t=this._options.editor?this._options.editor.core.toolbar()[0]:void 0;if(this._buttons=(t||window.document).getElementsByClassName(this._options.buttonClass||"jsMediaEditorButton"),Array.from(this._buttons).forEach((e=>{e.addEventListener("click",(e=>this._click(e)))})),this._mediaToInsert=new Map,this._mediaToInsertByClipboard=!1,this._uploadData=null,this._uploadId=null,this._options.editor&&!this._options.editor.opts.woltlab.attachments){const e=this._options.editor.$editor[0].dataset.elementId,t=a.add("com.woltlab.wcf.redactor2",`dragAndDrop_${e}`,(e=>this._editorUpload(e))),i=a.add("com.woltlab.wcf.redactor2",`pasteFromClipboard_${e}`,(e=>this._editorUpload(e)));a.add("com.woltlab.wcf.redactor2",`destroy_${e}`,(()=>{a.remove("com.woltlab.wcf.redactor2",`dragAndDrop_${e}`,t),a.remove("com.woltlab.wcf.redactor2",`dragAndDrop_${e}`,i)})),a.add("com.woltlab.wcf.media.upload","success",(e=>this._mediaUploaded(e)))}}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&r.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaInsertButton");t&&(t.classList.remove("jsMediaInsertButton"),t.addEventListener("click",(e=>this._openInsertDialog(e))))}))}_buildInsertDialog(){let e="";this._getThumbnailSizes().forEach((t=>{e+='<option value="'+t+'">'+s.get("wcf.media.insert.imageSize."+t)+"</option>"})),e+='<option value="original">'+s.get("wcf.media.insert.imageSize.original")+"</option>";const t=`\n <div class="section">\n <dl class="thumbnailSizeSelection">\n <dt>${s.get("wcf.media.insert.imageSize")}</dt>\n <dd>\n <select name="thumbnailSize">\n ${e}\n </select>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button class="buttonPrimary">${s.get("wcf.global.button.insert")}</button>\n </div>`;l.open({_dialogSetup:()=>({id:this._getInsertDialogId(),options:{onClose:()=>this._editorClose(),onSetup:e=>{e.querySelector(".buttonPrimary").addEventListener("click",(e=>this._insertMedia(e))),d.default.show(e.querySelector(".thumbnailSizeSelection"))},title:s.get("wcf.media.insert")},source:t})})}_click(e){this._activeButton=e.currentTarget,super._click(e)}_dialogShow(){if(super._dialogShow(),this._uploadData){const e=this._uploadData;if(e.file)this._upload.uploadFile(e.file);else{const e=this._uploadData;this._uploadId=this._upload.uploadBlob(e.blob)}this._uploadData=null}}_editorUpload(e){this._uploadData=e,l.open(this)}_getInsertDialogId(){return["mediaInsert",...this._mediaToInsert.keys()].join("-")}_getThumbnailSizes(){return["small","medium","large"].map((e=>Array.from(this._mediaToInsert.values()).every((t=>null!==t[e+"ThumbnailType"]))?e:null)).filter((e=>null!==e))}_insertMedia(e,t,i=!1){if(void 0===i&&(i=!0),e){l.close(this._getInsertDialogId());t=e.currentTarget.closest(".dialogContent").querySelector("select[name=thumbnailSize]").value}null!==this._options.callbackInsert?this._options.callbackInsert(this._mediaToInsert,"separate",t):this._options.editor.buffer.set(),this._mediaToInsertByClipboard&&c.unmark("com.woltlab.wcf.media",Array.from(this._mediaToInsert.keys())),this._mediaToInsert=new Map,this._mediaToInsertByClipboard=!1,i&&l.close(this)}_insertMediaItem(e,t){if(t.isImage){let i="";["small","medium","large","original"].some((n=>0!=t[n+"ThumbnailHeight"]&&(i=n,e==n))),(e=i)||(e="original");let n=t.link;"original"!==e&&(n=t[e+"ThumbnailLink"]),this._options.editor.insert.html(`<img src="${n}" class="woltlabSuiteMedia" data-media-id="${t.mediaID}" data-media-size="${e}">`)}else this._options.editor.insert.text(`[wsm='${t.mediaID}'][/wsm]`)}_mediaUploaded(e){null!==this._uploadId&&this._upload===e.upload&&(this._uploadId===e.uploadId||Array.isArray(this._uploadId)&&-1!==this._uploadId.indexOf(e.uploadId))&&(this._mediaToInsert=new Map(e.media.entries()),this._insertMedia(null,"medium",!1),this._uploadId=null)}_openInsertDialog(e){const t=e.currentTarget;this.insertMedia([~~t.dataset.objectId])}clipboardInsertMedia(e){this.insertMedia(e,!0)}insertMedia(e,t){this._mediaToInsert=new Map,this._mediaToInsertByClipboard=t||!1;let i=!0;if(e.forEach((e=>{const t=this._media.get(e);this._mediaToInsert.set(t.mediaID,t),t.isImage||(i=!1)})),i){if(this._getThumbnailSizes().length){l.close(this);const e=this._getInsertDialogId();l.getDialog(e)?l.openStatic(e,null):this._buildInsertDialog()}else this._insertMedia(void 0,"original")}else this._insertMedia()}getMode(){return"editor"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaInsertButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML=`\n <a>\n <span class="icon icon16 fa-plus jsTooltip" title="${s.get("wcf.global.button.insert")}"></span>\n <span class="invisible">${s.get("wcf.global.button.insert")}</span>\n </a>`}}return o.enableLegacyInheritance(u),u})),define("WoltLabSuite/Core/Media/Manager/Select",["require","exports","tslib","./Base","../../Core","../../Dom/Traverse","../../FileUtil","../../Language","../../Ui/Dialog","../../Dom/Util"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c);class d extends n.default{constructor(e){super(e),this._activeButton=null,this._storeElements=new WeakMap,this._buttons=document.getElementsByClassName(this._options.buttonClass||"jsMediaSelectButton"),Array.from(this._buttons).forEach((e=>{const t=e.dataset.store;if(t){const i=document.getElementById(t);if(i&&"INPUT"===i.tagName){e.addEventListener("click",(e=>this._click(e))),this._storeElements.set(e,i);const t=document.createElement("p");t.className="button",e.insertAdjacentElement("afterend",t);const n=document.createElement("span");n.className="icon icon16 fa-times",t.appendChild(n),i.value||c.default.hide(t),t.addEventListener("click",(e=>this._removeMedia(e)))}}}))}_addButtonEventListeners(){super._addButtonEventListeners(),this._mediaManagerMediaList&&a.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{const t=e.querySelector(".jsMediaSelectButton");t&&(t.classList.remove("jsMediaSelectButton"),t.addEventListener("click",(e=>this._chooseMedia(e))))}))}_chooseMedia(e){if(null===this._activeButton)throw new Error("Media cannot be chosen if no button is active.");const t=e.currentTarget,i=this._media.get(~~t.dataset.objectId),n=document.getElementById(this._activeButton.dataset.store);n.value=i.mediaID.toString(),o.triggerEvent(n,"change");const a=this._activeButton.dataset.display;if(a){const e=document.getElementById(a);if(e)if(i.isImage){const t=i.smallThumbnailLink?i.smallThumbnailLink:i.link,n=i.altText&&i.altText[window.LANGUAGE_ID]?i.altText[window.LANGUAGE_ID]:"";e.innerHTML=`<img src="${t}" alt="${n}" />`}else{let t=r.getIconNameByFilename(i.filename);t&&(t="-"+t),e.innerHTML=`\n <div class="box48" style="margin-bottom: 10px;">\n <span class="icon icon48 fa-file${t}-o"></span>\n <div class="containerHeadline">\n <h3>${i.filename}</h3>\n <p>${i.formattedFilesize}</p>\n </div>\n </div>`}}this._activeButton.nextElementSibling.style.removeProperty("display"),l.close(this)}_click(e){if(e.preventDefault(),this._activeButton=e.currentTarget,super._click(e),!this._mediaManagerMediaList)return;const t=this._storeElements.get(this._activeButton);a.childrenByTag(this._mediaManagerMediaList,"LI").forEach((e=>{t.value&&t.value==e.dataset.objectId?e.classList.add("jsSelected"):e.classList.remove("jsSelected")}))}getMode(){return"select"}setupMediaElement(e,t){super.setupMediaElement(e,t);const i=t.querySelector("nav.buttonGroupNavigation > ul"),n=document.createElement("li");n.className="jsMediaSelectButton",n.dataset.objectId=e.mediaID.toString(),i.appendChild(n),n.innerHTML='<a><span class="icon icon16 fa-check jsTooltip" title="'+s.get("wcf.media.button.select")+'"></span> <span class="invisible">'+s.get("wcf.media.button.select")+"</span></a>"}_removeMedia(e){e.preventDefault();const t=e.currentTarget,i=t.previousElementSibling;t.remove();const n=document.getElementById(i.dataset.store);n.value="",o.triggerEvent(n,"change");const a=i.dataset.display;if(a){const e=document.getElementById(a);e&&(e.innerHTML="")}}}return o.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ui/Search/Input",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r);class s{constructor(e,t){if(this.activeItem=void 0,this.callbackDropdownInit=void 0,this.callbackSelect=void 0,this.dropdownContainerId="",this.excludedSearchValues=new Set,this.list=void 0,this.lastValue="",this.request=void 0,this.timerDelay=void 0,this.element=e,!(this.element instanceof HTMLInputElement))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this.element.nodeName||"search"!==this.element.type&&"text"!==this.element.type)throw new Error('Expected an input[type="text"].');t=o.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:void 0,callbackSelect:void 0,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1},t),this.ajaxPayload=t.ajax,this.autoFocus=t.autoFocus,this.callbackDropdownInit=t.callbackDropdownInit,this.callbackSelect=t.callbackSelect,this.delay=t.delay,t.excludedSearchValues.forEach((e=>{this.addExcludedSearchValues(e)})),this.minLength=t.minLength,this.noResultPlaceholder=t.noResultPlaceholder,this.preventSubmit=t.preventSubmit,this.element.autocomplete="off",this.element.addEventListener("keydown",(e=>this.keydown(e))),this.element.addEventListener("keyup",(e=>this.keyup(e)))}addExcludedSearchValues(e){this.excludedSearchValues.add(e)}removeExcludedSearchValues(e){this.excludedSearchValues.delete(e)}keydown(e){(null!==this.activeItem&&r.default.isOpen(this.dropdownContainerId)||this.preventSubmit)&&"Enter"===e.key&&e.preventDefault(),["ArrowUp","ArrowDown","Escape"].includes(e.key)&&e.preventDefault()}keyup(e){if(null!==this.activeItem||!this.autoFocus)if(r.default.isOpen(this.dropdownContainerId)){if("ArrowUp"===e.key)return e.preventDefault(),this.keyboardPreviousItem();if("ArrowDown"===e.key)return e.preventDefault(),this.keyboardNextItem();if("Enter"===e.key)return e.preventDefault(),this.keyboardSelectItem()}else this.activeItem=void 0;if("Escape"===e.key)return void r.default.close(this.dropdownContainerId);const t=this.element.value.trim();this.lastValue!==t&&(this.lastValue=t,t.length<this.minLength?this.dropdownContainerId&&(r.default.close(this.dropdownContainerId),this.activeItem=void 0):this.delay?(this.timerDelay&&window.clearTimeout(this.timerDelay),this.timerDelay=window.setTimeout((()=>{this.search(t)}),this.delay)):this.search(t))}search(e){this.request&&this.request.abortPrevious(),this.request=n.api(this,this.getParameters(e))}getParameters(e){return{parameters:{data:{excludedSearchValues:this.excludedSearchValues,searchString:e}}}}keyboardNextItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.nextElementSibling&&(e=this.activeItem.nextElementSibling)),this.activeItem=e||this.list.children[0],this.activeItem.classList.add("active")}keyboardPreviousItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.previousElementSibling&&(e=this.activeItem.previousElementSibling)),this.activeItem=e||this.list.children[this.list.childElementCount-1],this.activeItem.classList.add("active")}keyboardSelectItem(){this.selectItem(this.activeItem)}clickSelectItem(e){this.selectItem(e.currentTarget)}selectItem(e){this.callbackSelect&&!this.callbackSelect(e)?this.element.value="":this.element.value=e.dataset.label||"",this.activeItem=void 0,r.default.close(this.dropdownContainerId)}_ajaxSuccess(e){let t=!1;if(this.list?this.list.innerHTML="":(this.list=document.createElement("ul"),this.list.className="dropdownMenu",t=!0,"function"==typeof this.callbackDropdownInit&&this.callbackDropdownInit(this.list)),"object"==typeof e.returnValues){const t=this.clickSelectItem.bind(this);let i;Object.keys(e.returnValues).forEach((n=>{i=this.createListItem(e.returnValues[n]),i.addEventListener("click",t),this.list.appendChild(i)}))}if(t){this.element.insertAdjacentElement("afterend",this.list);const e=this.element.parentElement;r.default.initFragment(e,this.list),this.dropdownContainerId=a.default.identify(e)}if(this.dropdownContainerId)if(this.activeItem=void 0,this.list.childElementCount||this.handleEmptyResult()){r.default.open(this.dropdownContainerId,!0);const e=this.list.childElementCount?this.list.children[0]:void 0;this.autoFocus&&e&&~~(e.dataset.objectId||"")&&(this.activeItem=e,this.activeItem.classList.add("active"))}else r.default.close(this.dropdownContainerId)}handleEmptyResult(){if(!this.noResultPlaceholder)return!1;const e=document.createElement("li");e.className="dropdownText";const t=document.createElement("span");return t.textContent=this.noResultPlaceholder,e.appendChild(t),this.list.appendChild(e),!0}createListItem(e){const t=document.createElement("li");t.dataset.objectId=e.objectID.toString(),t.dataset.label=e.label;const i=document.createElement("span");return i.textContent=e.label,t.appendChild(i),t}_ajaxSetup(){return{data:this.ajaxPayload}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class a extends o.default{constructor(e,t){const i=n.isPlainObject(t)&&!0===t.includeUserGroups;super(e,t=n.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:i?1:0}}}},t))}createListItem(e){const t=super.createListItem(e);t.dataset.type=e.type;const i=document.createElement("div");return i.className="box16",i.innerHTML="group"===e.type?'<span class="icon icon16 fa-users"></span>':e.icon,i.appendChild(t.children[0]),t.appendChild(i),t}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Acl/Simple",["require","exports","tslib","../../Core","../../Language","../../StringUtil","../../Dom/Change/Listener","../../Dom/Util","../User/Search/Input"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importDefault(l);class c{constructor(e,t){this.prefix=e||"",this.inputName=t||"aclValues";const i=document.getElementById(this.prefix+"aclInputContainer"),n=document.getElementById(this.prefix+"invertPermissionsDl");document.getElementById(this.prefix+"aclAllowAll").addEventListener("change",(()=>{s.default.hide(i),n&&s.default.hide(n)}));document.getElementById(this.prefix+"aclAllowAll_no").addEventListener("change",(()=>{s.default.show(i),n&&s.default.show(n)})),this.list=document.getElementById(this.prefix+"aclAccessList"),this.list.addEventListener("click",this.removeItem.bind(this));const o=[];this.list.querySelectorAll(".aclLabel").forEach((e=>{o.push(e.textContent)})),this.searchInput=new l.default(document.getElementById(this.prefix+"aclSearchInput"),{callbackSelect:this.select.bind(this),includeUserGroups:!0,excludedSearchValues:o,preventSubmit:!0}),this.aclListContainer=document.getElementById(this.prefix+"aclListContainer");const a=document.getElementById(this.prefix+"invertPermissions");a&&a.addEventListener("change",(()=>{this.invertPermissions(!0)}));const c=document.getElementById(this.prefix+"invertPermissions_no");c&&c.addEventListener("change",(()=>{this.invertPermissions(!1)}));const d=document.getElementById(this.prefix+"invertPermissions");d&&this.invertPermissions(!!d.value),r.default.trigger()}select(e){const t=e.dataset.type,i=e.dataset.label,n=e.dataset.objectId,l=`<span class="icon icon16 fa-${"group"===t?"users":"user"}"></span>\n <span class="aclLabel">${a.escapeHTML(i)}</span>\n <span class="icon icon16 fa-times pointer jsTooltip" title="${o.get("wcf.global.button.delete")}"></span>\n <input type="hidden" name="${this.inputName}[${t}][]" value="${n}">`,c=document.createElement("li");c.innerHTML=l;const d=this.list.querySelector(".fa-user");return null===d?this.list.appendChild(c):this.list.insertBefore(c,d.parentNode),s.default.show(this.aclListContainer),this.searchInput.addExcludedSearchValues(i),r.default.trigger(),!1}removeItem(e){const t=e.target;if(t.classList.contains("fa-times")){const e=t.parentElement,i=e.querySelector(".aclLabel");this.searchInput.removeExcludedSearchValues(i.textContent),e.remove(),0===this.list.childElementCount&&s.default.hide(this.aclListContainer)}}invertPermissions(e){const t=document.getElementById(this.prefix+"aclListContainerDt"),i=document.getElementById(this.prefix+"aclSearchInputLabel");t.textContent=o.get(e?"wcf.acl.access.denied":"wcf.acl.access.granted"),i.textContent=o.get(e?"wcf.acl.access.deny":"wcf.acl.access.grant")}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["require","exports","tslib","../../Ajax"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n);class o{constructor(){document.querySelectorAll(".markAllAsReadButton").forEach((e=>{e.addEventListener("click",this.click.bind(this))}))}click(e){e.preventDefault(),n.api(this)}_ajaxSuccess(){const e=document.querySelector(".mainMenu .active .badge");e&&e.remove(),document.querySelectorAll(".articleList .newMessageBadge").forEach((e=>e.remove()))}_ajaxSetup(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}t.init=function(){new o}})),define("WoltLabSuite/Core/Ui/Article/Search",["require","exports","tslib","../../Ajax","../../Dom/Util","../../Language","../../StringUtil","../Dialog"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(){this.callbackSelect=void 0,this.resultContainer=void 0,this.resultList=void 0,this.searchInput=void 0}open(e){this.callbackSelect=e,s.default.open(this)}search(e){e.preventDefault();const t=this.searchInput.parentElement,i=this.searchInput.value.trim();i.length<3?o.default.innerError(t,a.get("wcf.article.search.error.tooShort")):(o.default.innerError(t,!1),n.api(this,{parameters:{searchString:i}}))}click(e){e.preventDefault();const t=e.currentTarget;this.callbackSelect(+t.dataset.articleId),s.default.close(this)}_ajaxSuccess(e){const t=e.returnValues.map((e=>`<li>\n <div class="containerHeadline pointer" data-article-id="${e.articleID}">\n <h3>${r.escapeHTML(e.name)}</h3>\n <small>${r.escapeHTML(e.displayLink)}</small>\n </div>\n </li>`)).join("");if(this.resultList.innerHTML=t,t?o.default.show(this.resultList):o.default.hide(this.resultList),t)this.resultList.querySelectorAll(".containerHeadline").forEach((e=>{e.addEventListener("click",this.click.bind(this))}));else{const e=this.searchInput.parentElement;o.default.innerError(e,a.get("wcf.article.search.error.noResults"))}}_ajaxSetup(){return{data:{actionName:"search",className:"wcf\\data\\article\\ArticleAction"}}}_dialogSetup(){return{id:"wcfUiArticleSearch",options:{onSetup:()=>{this.searchInput=document.getElementById("wcfUiArticleSearchInput"),this.searchInput.addEventListener("keydown",(e=>{"Enter"===e.key&&this.search(e)}));this.searchInput.nextElementSibling.addEventListener("click",this.search.bind(this)),this.resultContainer=document.getElementById("wcfUiArticleSearchResultContainer"),this.resultList=document.getElementById("wcfUiArticleSearchResultList")},onShow:()=>{this.searchInput.focus()},title:a.get("wcf.article.search")},source:`<div class="section">\n <dl>\n <dt>\n <label for="wcfUiArticleSearchInput">${a.get("wcf.article.search.name")}</label>\n </dt>\n <dd>\n <div class="inputAddon">\n <input type="text" id="wcfUiArticleSearchInput" class="long">\n <a href="#" class="inputSuffix"><span class="icon icon16 fa-search"></span></a>\n </div>\n </dd>\n </dl>\n </div>\n <section id="wcfUiArticleSearchResultContainer" class="section" style="display: none;">\n <header class="sectionHeader">\n <h2 class="sectionTitle">${a.get("wcf.article.search.results")}</h2>\n </header>\n <ol id="wcfUiArticleSearchResultList" class="containerList"></ol>\n </section>`}}}let c;t.open=function(e){(c||(c=new l),c).open(e)}})),define("WoltLabSuite/Core/Ui/Color/Picker",["require","exports","tslib","../../Core"],(function(e,t,i,n){"use strict";n=i.__importStar(n);let o=(e,t)=>{if("object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker)return o=(e,t)=>{const i=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&i.setCallbackSubmit(t.callbackSubmit),i},o(e,t);0===a.length&&(window.__wcf_bc_colorPickerInit=()=>{a.forEach((e=>{o(e[0],e[1])})),window.__wcf_bc_colorPickerInit=void 0,a=[]}),a.push([e,t])},a=[];class r{constructor(e,t){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");t=n.extend({callbackSubmit:null},t||{}),o(e,t)}static fromSelector(e){document.querySelectorAll(e).forEach((e=>{new r(e)}))}}return n.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/Comment/Add",["require","exports","tslib","../../Ajax","../../Controller/Captcha","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../Language","../Dialog","../Scroll","../../User","../Notification"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),h=i.__importDefault(h),p=i.__importStar(p);class m{constructor(e){this._editor=null,this._loadingOverlay=null,this._container=e,this._content=this._container.querySelector(".jsOuterEditorContainer"),this._textarea=this._container.querySelector(".wysiwygTextarea"),this._content.addEventListener("click",(e=>{this._content.classList.contains("collapsed")&&(e.preventDefault(),this._content.classList.remove("collapsed"),this._focusEditor())}));this._container.querySelector('button[data-type="save"]').addEventListener("click",(e=>this._submit(e)))}_focusEditor(){u.element(this._container,(()=>{window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor")}))}_submitGuestDialog(e){if(e instanceof KeyboardEvent&&"Enter"!==e.key)return;const t=e.currentTarget.closest(".dialogContent").querySelector("input[name=username]");if(""===t.value)return s.default.innerError(t,c.get("wcf.global.form.error.empty")),void t.closest("dl").classList.add("formError");let i={parameters:{data:{username:t.value}}};if(o.default.has("commentAdd")){const e=o.default.getData("commentAdd");e instanceof Promise?e.then((e=>{i=a.extend(i,e),this._submit(void 0,i)})):(i=a.extend(i,e),this._submit(void 0,i))}else this._submit(void 0,i)}_submit(e,t){if(e&&e.preventDefault(),!this._validate())return;this._showLoadingOverlay();const i=this._getParameters();l.fire("com.woltlab.wcf.redactor2","submit_text",i.data),h.default.userId||t||(i.requireGuestDialog=!0),n.api(this,a.extend({parameters:i},t))}_getParameters(){const e=this._container.closest(".commentList");return{data:{message:this._getEditor().code.get(),objectID:~~e.dataset.objectId,objectTypeID:~~e.dataset.objectTypeId}}}_validate(){if(this._container.querySelectorAll(".innerError").forEach((e=>e.remove())),this._getEditor().utils.isEmpty())return this.throwError(this._textarea,c.get("wcf.global.form.error.empty")),!1;const e={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return l.fire("com.woltlab.wcf.redactor2","validate_text",e),e.valid}throwError(e,t){s.default.innerError(e,"empty"===t?c.get("wcf.global.form.error.empty"):t)}_showLoadingOverlay(){null===this._loadingOverlay&&(this._loadingOverlay=document.createElement("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(){this._content.classList.remove("loading");const e=this._content.querySelector(".commentLoadingOverlay");null!==e&&e.remove()}_reset(){this._getEditor().code.set("<p></p>"),l.fire("com.woltlab.wcf.redactor2","reset_text"),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this._content.classList.add("collapsed")}_handleError(e){this.throwError(this._textarea,e.returnValues.errorType)}_getEditor(){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(e){return s.default.insertHtml(e.returnValues.template,this._container,"after"),p.show(c.get("wcf.global.success.add")),r.default.trigger(),this._container.nextElementSibling}_ajaxSuccess(e){if(!h.default.userId&&e.returnValues.guestDialog){d.default.openStatic("jsDialogGuestComment",e.returnValues.guestDialog,{closable:!1,onClose:()=>{o.default.has("commentAdd")&&o.default.delete("commentAdd")},title:c.get("wcf.global.confirmation.title")});const t=d.default.getDialog("jsDialogGuestComment");t.content.querySelector("input[type=submit]").addEventListener("click",(e=>this._submitGuestDialog(e)));t.content.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._cancelGuestDialog()));t.content.querySelector("input[type=text]").addEventListener("keypress",(e=>this._submitGuestDialog(e)))}else{const t=this._insertMessage(e);h.default.userId||d.default.close("jsDialogGuestComment"),this._reset(),this._hideLoadingOverlay(),window.setTimeout((()=>{u.element(t)}),100)}}_ajaxFailure(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._handleError(e),!1)}_ajaxSetup(){return{data:{actionName:"addComment",className:"wcf\\data\\comment\\CommentAction"},silent:!0}}_cancelGuestDialog(){d.default.close("jsDialogGuestComment"),this._hideLoadingOverlay()}}return a.enableLegacyInheritance(m),m})),define("WoltLabSuite/Core/Ui/Comment/Edit",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Environment","../../Event/Handler","../../Language","../Scroll","../Notification"],(function(e,t,i,n,o,a,r,s,l,c,d,u){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u);class h{constructor(e){this._activeElement=null,this._comments=new WeakSet,this._editorContainer=null,this._container=e,this.rebuild(),a.default.add("Ui/Comment/Edit_"+r.default.identify(this._container),this.rebuild.bind(this))}rebuild(){this._container.querySelectorAll(".comment").forEach((e=>{if(!this._comments.has(e)){if(o.stringToBool(e.dataset.canEdit||"")){const t=e.querySelector(".jsCommentEditButton");null!==t&&t.addEventListener("click",(e=>this._click(e)))}this._comments.add(e)}}))}_click(e){if(e.preventDefault(),null===this._activeElement){const t=e.currentTarget;this._activeElement=t.closest(".comment"),this._prepare(),n.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})}else u.show("wcf.message.error.editorAlreadyInUse",null,"warning")}_prepare(){this._editorContainer=document.createElement("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='<span class="icon icon48 fa-spinner"></span>';const e=this._activeElement.querySelector(".commentContentContainer");e.insertBefore(this._editorContainer,e.firstChild)}_showEditor(e){const t=this._getEditorId(),i=this._editorContainer;i.querySelector(".icon").remove();const n=document.createElement("div");n.className="editorContainer",r.default.setInnerHtml(n,e.returnValues.template),i.appendChild(n);const o=i.querySelector(".formSubmit");o.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save()));o.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),l.add("com.woltlab.wcf.redactor",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()}));const a=document.getElementById(t);"redactor"===s.editor()?window.setTimeout((()=>{d.element(this._activeElement)}),250):a.focus()}_restoreMessage(){this._destroyEditor(),this._editorContainer.remove(),this._activeElement=null}_save(){const e={data:{message:""}},t=this._getEditorId();l.fire("com.woltlab.wcf.redactor2",`getText_${t}`,e.data),this._validate(e)&&(l.fire("com.woltlab.wcf.redactor2",`submit_${t}`,e),n.api(this,{actionName:"save",objectIDs:[this._getObjectId(this._activeElement)],parameters:e}),this._hideEditor())}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=document.getElementById(this._getEditorId());if(window.jQuery(t).data("redactor").utils.isEmpty())return this.throwError(t,c.get("wcf.global.form.error.empty")),!1;const i={api:this,parameters:e,valid:!0};return l.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),i),i.valid}throwError(e,t){r.default.innerError(e,t)}_showMessage(e){const t=this._editorContainer.parentElement.querySelector(".commentContent .userMessage");r.default.setInnerHtml(t,e.returnValues.message),this._restoreMessage(),u.show()}_hideEditor(){const e=this._editorContainer.querySelector(".editorContainer");r.default.hide(e);const t=document.createElement("span");t.className="icon icon48 fa-spinner",this._editorContainer.appendChild(t)}_restoreEditor(){this._editorContainer.querySelector(".fa-spinner").remove();const e=this._editorContainer.querySelector(".editorContainer");null!==e&&r.default.show(e)}_destroyEditor(){l.fire("com.woltlab.wcf.redactor2",`autosaveDestroy_${this._getEditorId()}`),l.fire("com.woltlab.wcf.redactor2",`destroy_${this._getEditorId()}`)}_getEditorId(){return`commentEditor${this._getObjectId(this._activeElement)}`}_getObjectId(e){return~~e.dataset.objectId}_ajaxFailure(e){const t=this._editorContainer.querySelector(".redactor-layer");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.errorType||(r.default.innerError(t,e.returnValues.errorType),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectTypeID:~~this._container.dataset.objectTypeId}}},silent:!0}}}return o.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Dialog/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["require","exports","tslib","../../Core","./Simple"],(function(e,t,i,n,o){"use strict";function a(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 r(e){const t=document.createElement("li");if("divider"===e)return t.className="dropdownDivider",t;"string"==typeof e.identifier&&(t.dataset.identifier=e.identifier);const i=document.createElement("a");if(i.href="string"==typeof e.href?e.href:"#","function"==typeof e.callback)i.addEventListener("click",(t=>{t.preventDefault(),e.callback(i)}));else if("#"===i.href)throw new Error("Expected either a `href` value or a `callback`.");if(e.attributes&&n.isPlainObject(e.attributes)&&Object.keys(e.attributes).forEach((t=>{const n=e.attributes[t];if("string"!=typeof n)throw new Error("Expected only string values.");-1!==t.indexOf("-")?i.setAttribute(`data-${t}`,n):i.dataset[t]=n})),t.appendChild(i),void 0!==e.icon&&n.isPlainObject(e.icon)){if("string"!=typeof e.icon.name)throw new TypeError("Expected a valid icon name.");let t=16;"number"==typeof e.icon.size&&-1!==c.indexOf(~~e.icon.size)&&(t=~~e.icon.size);const n=document.createElement("span");n.className=`icon icon${t} fa-${e.icon.name}`,i.appendChild(n)}const o="string"==typeof e.label?e.label.trim():"",a="string"==typeof e.labelHtml?e.labelHtml.trim():"";if(""===o&&""===a)throw new TypeError("Expected either a label or a `labelHtml`.");const r=document.createElement("span");return r[o?"textContent":"innerHTML"]=o||a,i.appendChild(document.createTextNode(" ")),i.appendChild(r),t}function s(e,t){a(e),e.appendChild(r(t))}function l(e,t){if(a(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");const i=t.length;if(0===i)throw new Error("Expected a non-empty list of items.");if(1===i)s(e,t[0]);else{const i=document.createDocumentFragment();t.forEach((e=>{i.appendChild(r(e))})),e.appendChild(i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.divider=t.attach=t.setItems=t.appendItems=t.appendItem=t.buildItem=t.create=void 0,n=i.__importStar(n),o=i.__importDefault(o);const c=[16,24,32,48,64,96,144];t.create=function(e,t){const i=document.createElement("ul");return i.className="dropdownMenu","string"==typeof t&&(i.dataset.identifier=t),Array.isArray(e)&&e.length>0&&l(i,e),i},t.buildItem=function(e){return r(e)},t.appendItem=s,t.appendItems=l,t.setItems=function(e,t){a(e),e.innerHTML="",l(e,t)},t.attach=function(e,t){a(e),o.default.initFragment(t,e),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),o.default.toggleDropdown(t.id)}))},t.divider=function(){return"divider"}})),define("WoltLabSuite/Core/Ui/Dropdown/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/File/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/File/Delete",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);class s{constructor(e,t,i,n){this.containers=new Map,this.deleteButton=void 0,this.isSingleImagePreview=i,this.uploadHandler=n;const o=document.getElementById(e);if(null===o)throw new Error(`Element id '${e}' is unknown.`);this.buttonContainer=o;const a=document.getElementById(t);if(null===a)throw new Error(`Element id '${t}' is unknown.`);this.target=a;const r=this.target.dataset.internalId;if(!r)throw new Error("InternalId is unknown.");this.internalId=r,this.rebuild()}createButtons(){let e=!1;this.target.querySelectorAll("li.uploadedFile").forEach((t=>{const i=t.dataset.uniqueFileId;if(this.containers.has(i))return;const n={uniqueFileId:i,element:t};this.containers.set(i,n),this.initDeleteButton(t,n),e=!0})),e&&a.default.trigger()}initDeleteButton(e,t){const i=e.querySelector(".buttonGroup");if(null===i)throw new Error(`Button group in '${this.target.id}' is unknown.`);const n=document.createElement("li"),o=document.createElement("span");o.className="button jsDeleteButton small",o.textContent=r.get("wcf.global.button.delete"),n.appendChild(o),i.appendChild(n),n.addEventListener("click",this.deleteElement.bind(this,t.uniqueFileId))}deleteElement(e){n.api(this,{uniqueFileId:e,internalId:this.internalId})}rebuild(){if(!this.isSingleImagePreview)return void this.createButtons();const e=this.target.querySelector("img");if(null!==e){const t=e.dataset.uniqueFileId;if(!this.containers.has(t)){const i={uniqueFileId:t,element:e};this.containers.set(t,i),this.deleteButton=document.createElement("p"),this.deleteButton.className="button deleteButton";const n=document.createElement("span");n.textContent=r.get("wcf.global.button.delete"),this.deleteButton.appendChild(n),this.buttonContainer.appendChild(this.deleteButton),this.deleteButton.addEventListener("click",this.deleteElement.bind(this,i.uniqueFileId))}}}_ajaxSuccess(e){this.containers.get(e.uniqueFileId).element.remove(),this.isSingleImagePreview&&this.deleteButton&&(this.deleteButton.remove(),this.deleteButton=void 0),this.uploadHandler.checkMaxFiles(),o.triggerEvent(this.target,"change")}_ajaxSetup(){return{url:"index.php?ajax-file-delete/&t="+window.SECURITY_TOKEN}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/File/Upload",["require","exports","tslib","../../Core","./Delete","../../Dom/Util","../../Language","../../Upload"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s);class l extends s.default{constructor(e,t,i){if(void 0===(i=i||{}).internalId)throw new Error("Missing internal id.");(i=n.extend({imagePreview:!1,maxFiles:null,className:"invalid",url:`index.php?ajax-file-upload/&t=${window.SECURITY_TOKEN}`},i)).multiple=null===i.maxFiles||i.maxFiles>1,super(e,t,i),this.checkMaxFiles(),this._deleteHandler=new o.default(e,t,this._options.imagePreview,this)}_createFileElement(e){const t=super._createFileElement(e);t.classList.add("box64","uploadedFile");const i=t.querySelector("progress"),n=document.createElement("span");n.className="icon icon64 fa-spinner";const o=t.textContent;t.textContent="",t.append(n);const a=document.createElement("div"),r=document.createElement("p");r.textContent=o;const s=document.createElement("small");s.appendChild(i),a.appendChild(r),a.appendChild(s);const l=document.createElement("div");l.appendChild(a);const c=document.createElement("ul");return c.className="buttonGroup",l.appendChild(c),t.append(l),t}_failure(e,t){throw this._fileElements[e].forEach((e=>{e.classList.add("uploadFailed");const t=e.querySelector("small");t.innerHTML="";const i=e.querySelector(".icon");i.classList.remove("fa-spinner"),i.classList.add("fa-ban");const n=document.createElement("span");n.className="innerError",n.textContent=r.get("wcf.upload.error.uploadFailed"),t.insertAdjacentElement("afterend",n)})),new Error(`Upload failed: ${t.message}`)}_upload(e,t,i){const n=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return n&&n.remove(),super._upload(e,t,i)}_success(e,t){this._fileElements[e].forEach(((i,n)=>{if(void 0!==t.files[n]){const e=t.files[n];if(this._options.imagePreview){if(null===e.image)throw new Error("Expect image for uploaded file. None given.");i.remove();const t=this._target.querySelector("img.previewImage");if(null!==t)t.src=e.image;else{const t=document.createElement("img");t.classList.add("previewImage"),t.src=e.image,t.style.setProperty("max-width","100%",""),t.dataset.uniqueFileId=e.uniqueFileId,this._target.appendChild(t)}}else{i.dataset.uniqueFileId=e.uniqueFileId,i.querySelector("small").textContent=e.filesize.toString();const t=i.querySelector(".icon");t.classList.remove("fa-spinner"),t.classList.add(`fa-${e.icon}`)}}else{if(void 0===t.error[n])throw new Error(`Unknown uploaded file for uploadId ${e}.`);{const e=t.error[n];i.classList.add("uploadFailed");const o=i.querySelector("small");o.innerHTML="";const a=i.querySelector(".icon");a.classList.remove("fa-spinner"),a.classList.add("fa-ban");let r=i.querySelector(".innerError");null===r?(r=document.createElement("span"),r.className="innerError",r.textContent=e.errorMessage,o.insertAdjacentElement("afterend",r)):r.textContent=e.errorMessage}}})),this._deleteHandler.rebuild(),this.checkMaxFiles(),n.triggerEvent(this._target,"change")}_getFormData(){return{internalId:this._options.internalId}}validateUpload(e){if(null===this._options.maxFiles||e.length+this.countFiles()<=this._options.maxFiles)return!0;{let e=this._buttonContainer.parentElement.querySelector("small.innerError:not(.innerFileError)");return null===e&&(e=document.createElement("small"),e.className="innerError",this._buttonContainer.insertAdjacentElement("afterend",e)),e.textContent=r.get("wcf.upload.error.reachedRemainingLimit",{maxFiles:this._options.maxFiles-this.countFiles()}),!1}}countFiles(){return this._options.imagePreview?null!==this._target.querySelector("img")?1:0:this._target.childElementCount}checkMaxFiles(){null!==this._options.maxFiles&&this.countFiles()>=this._options.maxFiles?a.default.hide(this._button):a.default.show(this._button)}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/ItemList/Filter",["require","exports","tslib","../../Core","../../Dom/Util","../../Language","../../StringUtil","../Dropdown/Simple"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(e,t){this._dropdownId="",this._dropdown=void 0,this._fragment=void 0,this._items=new Set,this._value="",this._options=n.extend({callbackPrepareItem:void 0,enableVisibilityFilter:!0,filterPosition:"bottom"},t),"top"!==this._options.filterPosition&&(this._options.filterPosition="bottom");const i=document.getElementById(e);if(null===i)throw new Error("Expected a valid element id, '"+e+"' does not match anything.");if(!i.classList.contains("scrollableCheckboxList")&&"function"!=typeof this._options.callbackPrepareItem)throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");"function"!=typeof this._options.callbackPrepareItem&&(this._options.callbackPrepareItem=e=>this._prepareItem(e)),i.dataset.filter="showAll";const o=document.createElement("div");o.className="itemListFilter",i.insertAdjacentElement("beforebegin",o),o.appendChild(i);const r=document.createElement("div");r.className="inputAddon";const s=document.createElement("input");s.className="long",s.type="text",s.placeholder=a.get("wcf.global.filter.placeholder"),s.addEventListener("keydown",(e=>{"Enter"===e.key&&e.preventDefault()})),s.addEventListener("keyup",(()=>this._keyup()));const l=document.createElement("a");if(l.href="#",l.className="button inputSuffix jsTooltip",l.title=a.get("wcf.global.filter.button.clear"),l.innerHTML='<span class="icon icon16 fa-times"></span>',l.addEventListener("click",(e=>{e.preventDefault(),this.reset()})),r.appendChild(s),r.appendChild(l),this._options.enableVisibilityFilter){const e=document.createElement("a");e.href="#",e.className="button inputSuffix jsTooltip",e.title=a.get("wcf.global.filter.button.visibility"),e.innerHTML='<span class="icon icon16 fa-eye"></span>',e.addEventListener("click",(e=>this._toggleVisibility(e))),r.appendChild(e)}"bottom"===this._options.filterPosition?o.appendChild(r):o.insertBefore(r,i),this._container=o,this._element=i,this._input=s}reset(){this._input.value="",this._keyup()}_buildItems(){this._items.clear(),Array.from(this._element.children).forEach((e=>{this._items.add(this._options.callbackPrepareItem(e))}))}_prepareItem(e){const t=e.children[0],i=t.textContent.trim(),n=t.children[0];for(;n.nextSibling;)t.removeChild(n.nextSibling);t.appendChild(document.createTextNode(" "));const o=document.createElement("span");return o.textContent=i,t.appendChild(o),{item:e,span:o,text:i}}_keyup(){const e=this._input.value.trim();if(this._value===e)return;this._fragment||(this._fragment=document.createDocumentFragment(),this._element.style.setProperty("height",`${this._element.offsetHeight}px`,"")),this._fragment.appendChild(this._element),this._items.size||this._buildItems();const t=new RegExp("("+r.escapeRegExp(e)+")","i");let i=""===e;this._items.forEach((n=>{""===e?(n.span.textContent=n.text,o.default.show(n.item)):t.test(n.text)?(n.span.innerHTML=n.text.replace(t,"<u>$1</u>"),o.default.show(n.item),i=!0):o.default.hide(n.item)})),"bottom"===this._options.filterPosition?this._container.insertAdjacentElement("afterbegin",this._element):this._container.insertAdjacentElement("beforeend",this._element),this._value=e,o.default.innerError(this._container,!i&&a.get("wcf.global.filter.error.noMatches"))}_toggleVisibility(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;if(!this._dropdown){const e=document.createElement("ul");e.className="dropdownMenu",["activeOnly","highlightActive","showAll"].forEach((t=>{const i=document.createElement("a");i.dataset.type=t,i.href="#",i.textContent=a.get(`wcf.global.filter.visibility.${t}`),i.addEventListener("click",(e=>this._setVisibility(e)));const n=document.createElement("li");if(n.appendChild(i),"showAll"===t){n.className="active";const t=document.createElement("li");t.className="dropdownDivider",e.appendChild(t)}e.appendChild(n)})),s.default.initFragment(t,e),this._setupVisibilityFilter(),this._dropdown=e,this._dropdownId=t.id}s.default.toggleDropdown(t.id,t)}_setupVisibilityFilter(){const e=this._element.nextSibling,t=this._element.parentElement,i=this._element.scrollTop;document.createDocumentFragment().appendChild(this._element),this._element.querySelectorAll("li").forEach((e=>{const t=e.querySelector('input[type="checkbox"]');if(t)t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{t.checked?e.classList.add("active"):e.classList.remove("active")}));else{const t=e.querySelector('input[type="radio"]');t&&(t.checked&&e.classList.add("active"),t.addEventListener("change",(()=>{this._element.querySelectorAll("li").forEach((e=>e.classList.remove("active"))),t.checked?e.classList.add("active"):e.classList.remove("active")})))}})),t.insertBefore(this._element,e),this._element.scrollTop=i}_setVisibility(e){e.preventDefault();const t=e.currentTarget,i=t.dataset.type;if(s.default.close(this._dropdownId),this._element.dataset.filter===i)return;this._element.dataset.filter=i;this._dropdown.querySelector(".active").classList.remove("active"),t.parentElement.classList.add("active");const n=document.getElementById(this._dropdownId);"showAll"===i?n.classList.remove("active"):n.classList.add("active");const o=n.querySelector(".icon");"showAll"===i?(o.classList.add("fa-eye"),o.classList.remove("fa-eye-slash")):(o.classList.remove("fa-eye"),o.classList.add("fa-eye-slash"))}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/ItemList/Static",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Language","../Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";function s(e,t){const i=document.createElement("ol");i.className="inputItemList"+(e.disabled?" disabled":""),i.dataset.elementId=e.id,i.addEventListener("click",(t=>{t.target===i&&e.focus()}));const n=document.createElement("li");let o;n.className="input",i.appendChild(n),e.addEventListener("keydown",(e=>function(e){const t=e.currentTarget,i=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==i&&(i.classList.contains("active")?d(i):i.classList.add("active")):"Escape"===e.key&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")}(e))),e.addEventListener("keypress",(e=>function(e){if("Enter"===e.key||"Comma"===e.key){e.preventDefault();const t=e.currentTarget,i=t.value.trim();i.length&&c(t.id,{objectId:0,value:i})}}(e))),e.addEventListener("keyup",(e=>function(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}(e))),e.addEventListener("paste",(e=>function(e){const t=e.currentTarget;e.clipboardData.getData("text/plain").split(",").map((e=>e.trim())).filter((e=>e.length>0)).forEach((e=>{c(t.id,{objectId:0,value:e})})),e.preventDefault()}(e))),e.addEventListener("blur",(e=>function(e){const t=e.currentTarget;window.setTimeout((()=>{const e=t.value.trim();e.length&&c(t.id,{objectId:0,value:e})}),100)}(e))),e.insertAdjacentElement("beforebegin",i),n.appendChild(e),-1!==t.maxLength&&(e.maxLength=t.maxLength);let a=[];if(t.isCSV&&(o=document.createElement("input"),o.className="itemListInputShadow",o.type="hidden",o.name=e.name,e.removeAttribute("name"),i.insertAdjacentElement("beforebegin",o),a=e.value.split(",").map((e=>e.trim())).filter((e=>e.length>0)),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentElement.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,list:i,shadow:o,values:a}}function l(e){const t=p.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.placeholder=a.get("wcf.global.form.input.maxItems")))}function c(e,t,i){const n=p.get(e),o=document.createElement("li");o.className="item";const a=document.createElement("span");if(a.className="content",a.dataset.objectId=t.objectId.toString(),a.textContent=t.value,o.appendChild(a),i||!n.element.disabled){const e=document.createElement("a");e.className="icon icon16 fa-times",e.addEventListener("click",(e=>d(e))),o.appendChild(e)}n.list.insertBefore(o,n.listItem),n.element.value="",n.element.disabled||l(e);let r=u(n);"function"==typeof n.options.callbackChange&&(null===r&&(r=h(e)),n.options.callbackChange(e,r))}function d(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const i=e.parentElement.dataset.elementId,n=p.get(i);e.remove(),t||n.element.focus(),l(i);let o=u(n);"function"==typeof n.options.callbackChange&&(null===o&&(o=h(i)),n.options.callbackChange(i,o))}function u(e){if(!e.options.isCSV)return null;const t=h(e.element.id);return e.shadow.value=t.map((e=>e.value)).join(","),t}function h(e){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const t=p.get(e),i=[];return t.list.querySelectorAll(".item > span").forEach((e=>{i.push({objectId:~~e.dataset.objectId,value:e.textContent})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.setValues=t.getValues=t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);const p=new Map;t.init=function(e,t,i){const a=document.getElementById(e);if(null===a)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(p.has(e)){const t=p.get(e);Object.values(t).forEach((e=>{e instanceof HTMLElement&&e.parentElement&&e.remove()})),r.default.destroy(e),p.delete(e)}const l=n.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},i),d=o.parentByTag(a,"FORM");if(null!==d&&!l.isCSV){if(!l.submitFieldName.length&&"function"!=typeof l.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");d.addEventListener("submit",(()=>{const t=h(e);l.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=l.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,d.appendChild(t)})):l.callbackSubmit(d,t)}))}const u=s(a,l);if(p.set(e,{dropdownMenu:null,element:u.element,list:u.list,listItem:u.element.parentElement,options:l,shadow:u.shadow}),t=u.values.length?u.values:t,Array.isArray(t)){const i=!u.element.disabled;t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),c(e,t,i)}))}},t.getValues=h,t.setValues=function(e,t){if(!p.has(e))throw new Error(`Element id '${e}' is unknown.`);const i=p.get(e);o.childrenByClass(i.list,"item").forEach((e=>d(e,!0))),t.forEach((t=>c(e,t)))}})),define("WoltLabSuite/Core/Ui/ItemList/User",["require","exports","tslib","../ItemList"],(function(e,t,i,n){"use strict";function o(e){const t=a(e.element.id),i=[],n=[];t.forEach((e=>{e.type&&"group"===e.type?n.push(e.objectId):i.push(e.value)}));const o=e.shadow;return o.value=i.join(","),e._shadowGroups||(e._shadowGroups=document.createElement("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=`${o.name}GroupIDs`,o.insertAdjacentElement("beforebegin",e._shadowGroups)),e._shadowGroups.value=n.join(","),t}function a(e){return n.getValues(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=t.init=void 0,n=i.__importStar(n),t.init=function(e,t){n.init(e,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:t.includeUserGroups?~~t.includeUserGroups:0,restrictUserGroupIDs:Array.isArray(t.restrictUserGroupIDs)?t.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof t.callbackChange?t.callbackChange:null,callbackSyncShadow:t.csvPerType?o:null,callbackSetupValues:"function"==typeof t.callbackSetupValues?t.callbackSetupValues:null,excludedSearchValues:Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[],isCSV:!0,maxItems:t.maxItems?~~t.maxItems:-1,restricted:!0})},t.getValues=a})),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../StringUtil","../Dialog"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c);const d=new Map(Object.entries(window.REACTION_TYPES));class u{constructor(e,t){if(this._containers=new Map,this._currentObjectId=0,this._objects=new Map,!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=o.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},t),this.initContainers(),a.default.add(`WoltLabSuite/Core/Ui/Reaction/CountButtons-${e}`,(()=>this.initContainers()))}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=r.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,summary:null,objectId:n,element:t};this._containers.set(i,o),this._initReactionCountButtons(t,o);const a=this._objects.get(n)||[];a.push(o),this._objects.set(n,a),e=!0})),e&&a.default.trigger()}updateCountButtons(e,t){let i=!1;this._objects.get(e).forEach((e=>{let n;if(n=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.element.querySelector(this._options.summaryListSelector),null===n)return;const o=new Map(Object.entries(t)),a=new Map;n.querySelectorAll(".reactCountButton").forEach((e=>{const t=e.dataset.reactionTypeId;o.has(t)?a.set(t,e):e.remove()})),o.forEach(((e,t)=>{if(a.has(t)){a.get(t).querySelector(".reactionCount").innerHTML=l.shortUnit(e)}else if(d.has(t)){const o=document.createElement("span");o.className="reactCountButton",o.innerHTML=d.get(t).renderedIcon,o.dataset.reactionTypeId=t;const a=document.createElement("span");a.className="reactionCount",a.innerHTML=l.shortUnit(e),o.appendChild(a),n.appendChild(o),i=!0}})),n.childElementCount>0?r.default.show(n):r.default.hide(n)})),i&&a.default.trigger()}_initReactionCountButtons(e,t){let i;i=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.querySelector(this._options.summaryListSelector),null!==i&&i.addEventListener("click",(e=>this._showReactionOverlay(t.objectId,e)))}_showReactionOverlay(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()}_showOverlay(){this._options.parameters.data.containerID=`${this._objectType}-${this._currentObjectId}`,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){s.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),c.default.open(this,e.returnValues.template),c.default.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)}_ajaxSetup(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}}_dialogSetup(){return{id:`userReactionOverlay-${this._objectType}`,options:{title:""},source:null}}}return o.enableLegacyInheritance(u),u})),define("WoltLabSuite/Core/Ui/Reaction/Handler",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../Alignment","../CloseOverlay","../Screen","./CountButtons"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importDefault(d);const u=Object.values(window.REACTION_TYPES);class h{constructor(e,t){if(this.activeButton=void 0,this._cache=new Map,this._containers=new Map,this._objects=new Map,this._popoverCurrentObjectId=0,!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._popover=null,this._popoverContent=null,this._options=o.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},t),this.initReactButtons(),this.countButtons=new d.default(this._objectType,this._options),a.default.add(`WoltLabSuite/Core/Ui/Reaction/Handler-${e}`,(()=>this.initReactButtons())),l.default.add("WoltLabSuite/Core/Ui/Reaction/Handler",(()=>this._closePopover())),this.callbackFocus=e=>this.maintainFocus(e)}initReactButtons(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const i=r.default.identify(t);if(this._containers.has(i))return;const n=~~t.dataset.objectId,o={reactButton:null,objectId:n,element:t};this._containers.set(i,o),this._initReactButton(t,o);const a=this._objects.get(n)||[];a.push(o),this._objects.set(n,a),e=!0})),e&&a.default.trigger()}_initReactButton(e,t){if(this._options.isSingleItem?t.reactButton=document.querySelector(this._options.buttonSelector):t.reactButton=e.querySelector(this._options.buttonSelector),null!==t.reactButton){if(1===u.length){const e=u[0];t.reactButton.title=e.title;t.reactButton.querySelector(".invisible").textContent=e.title}t.reactButton.setAttribute("role","button"),u.length>1&&(t.reactButton.setAttribute("aria-haspopup","true"),t.reactButton.setAttribute("aria-expanded","false")),t.reactButton.addEventListener("click",(e=>{this._toggleReactPopover(t.objectId,t.reactButton,e)})),t.reactButton.addEventListener("keydown",(e=>{"Enter"===e.key&&(e.preventDefault(),this._toggleReactPopover(t.objectId,t.reactButton,null))}))}}_updateReactButton(e,t){this._objects.get(e).forEach((e=>{null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),e.reactButton.dataset.reactionTypeId=t.toString()):(e.reactButton.dataset.reactionTypeId="0",e.reactButton.classList.remove("active")))}))}_markReactionAsActive(){let e=null;if(this._objects.get(this._popoverCurrentObjectId).forEach((t=>{null!==t.reactButton&&(e=~~t.reactButton.dataset.reactionTypeId)})),null===e)throw new Error("Unable to find react button for current popover.");const t=this._getPopover();t.querySelectorAll(".reactionTypeButton.active").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-selected")}));const i=t.querySelector(".reactionPopoverContent");if(e){const n=t.querySelector(`.reactionTypeButton[data-reaction-type-id="${e}"]`);n.classList.add("active"),n.setAttribute("aria-selected","true"),0==~~n.dataset.isAssignable&&r.default.show(n),this._scrollReactionIntoView(i,n)}else c.is("screen-xs")&&(t.classList.contains("inverseOrder")?i.scrollTop=0:i.scrollTop=i.scrollHeight-i.clientHeight)}_scrollReactionIntoView(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2}_toggleReactPopover(e,t,i){if(null!==i&&(i.preventDefault(),i.stopPropagation()),1===u.length){const t=u[0];this._popoverCurrentObjectId=e,this._react(t.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover()}_openReactPopover(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,s.set(this._getPopover(),t,{pointer:!0,horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:c.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");const i=this._getPopover();"auto"===i.style.getPropertyValue("bottom")?i.classList.add("inverseOrder"):i.classList.remove("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),i.classList.remove("forceHide"),i.classList.add("active"),this.activeButton=t,u.length>1&&(this.activeButton.setAttribute("aria-expanded","true"),document.body.addEventListener("focus",this.callbackFocus,{capture:!0}))}_getPopover(){if(null==this._popover){this._popover=document.createElement("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=document.createElement("div"),this._popoverContent.className="reactionPopoverContent";const e=document.createElement("ul");e.className="reactionTypeButtonList",this._getSortedReactionTypes().forEach((t=>{const i=document.createElement("li");i.tabIndex=0,i.setAttribute("role","button"),i.className="reactionTypeButton jsTooltip",i.dataset.reactionTypeId=t.reactionTypeID.toString(),i.dataset.title=t.title,i.dataset.isAssignable=t.isAssignable.toString(),i.title=t.title;const n=document.createElement("span");n.className="reactionTypeButtonTitle",n.innerHTML=t.title,i.innerHTML=t.renderedIcon,i.appendChild(n),i.addEventListener("click",(()=>this._react(t.reactionTypeID))),i.addEventListener("keydown",(e=>this.keydown(e))),t.isAssignable||r.default.hide(i),e.appendChild(i)})),this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",(()=>this._rebuildOverflowIndicator()),{passive:!0}),this._popover.appendChild(this._popoverContent);const t=document.createElement("span");t.className="elementPointer",t.appendChild(document.createElement("span")),this._popover.appendChild(t),document.body.appendChild(this._popover),a.default.trigger()}return this._popover}keydown(e){if("Enter"===e.key||" "===e.key||"Escape"===e.key){e.preventDefault();const t=this.activeButton;if("Escape"===e.key)this._closePopover();else{const t=~~e.currentTarget.dataset.reactionTypeId;this._react(t)}t.focus()}}_rebuildOverflowIndicator(){const e=this._popoverContent;e.scrollTop>0?e.classList.add("overflowTop"):e.classList.remove("overflowTop");e.scrollTop+e.clientHeight<e.scrollHeight?e.classList.add("overflowBottom"):e.classList.remove("overflowBottom")}_getSortedReactionTypes(){return u.sort(((e,t)=>e.showOrder-t.showOrder))}_closePopover(){if(0!==this._popoverCurrentObjectId){const e=this._getPopover();e.classList.remove("active"),e.querySelectorAll('.reactionTypeButton[data-is-assignable="0"]').forEach((e=>r.default.hide(e))),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEach((e=>{e.reactButton.closest("nav").style.cssText=""})),u.length>1&&(this.activeButton.setAttribute("aria-expanded","false"),document.body.removeEventListener("focus",this.callbackFocus,{capture:!0})),this.activeButton=void 0,this._popoverCurrentObjectId=0}}_react(e){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=e,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,n.api(this,{parameters:this._options.parameters}),this._closePopover())}_ajaxSuccess(e){this.countButtons.updateCountButtons(e.returnValues.objectID,e.returnValues.reactions),this._updateReactButton(e.returnValues.objectID,e.returnValues.reactionTypeID)}_ajaxSetup(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}maintainFocus(e){if(document.activeElement&&!document.activeElement.classList.contains("focus-visible"))return;const t=this._getPopover();if(t.contains(e.target))this.wasInsideReactions=!0;else if(this.wasInsideReactions)this.activeButton.focus(),this.wasInsideReactions=!1;else{t.querySelector(".reactionTypeButton").focus()}}}return o.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Like/Handler",["require","exports","tslib","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil","../Reaction/Handler","../../User"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importDefault(l);const c=new Map(Object.entries(window.REACTION_TYPES));class d{constructor(e,t){if(this._containers=new WeakMap,!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=n.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},t),this.initContainers(),o.default.add(`WoltLabSuite/Core/Ui/Like/Handler-${e}`,(()=>this.initContainers())),new s.default(this._objectType,{containerSelector:this._options.containerSelector})}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{if(this._containers.has(t))return;const i={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~t.dataset.likeDislikes,liked:~~t.dataset.likeLiked,likes:~~t.dataset.likeLikes,objectId:~~t.dataset.objectId,users:JSON.parse(t.dataset.likeUsers)};this._containers.set(t,i),this._buildWidget(t,i),e=!0})),e&&o.default.trigger()}_buildWidget(e,t){let i,n=!0;if(i=this._options.isSingleItem?document.querySelector(this._options.summarySelector):e.querySelector(this._options.summarySelector),null===i&&(i=this._options.isSingleItem?document.querySelector(this._options.badgeContainerSelector):e.querySelector(this._options.badgeContainerSelector),n=!1),null!==i){const e=document.createElement("ul");if(e.classList.add("reactionSummaryList"),n?e.classList.add("likesSummary"):e.classList.add("reactionSummaryListTiny"),Object.entries(t.users).forEach((([t,i])=>{const n=c.get(t);if("reactionTypeID"===t||!n)return;const o=document.createElement("li");o.className="reactCountButton",o.setAttribute("reaction-type-id",t);const a=document.createElement("span");a.className="reactionCount",a.innerHTML=r.shortUnit(~~i),o.appendChild(a),o.innerHTML=n.renderedIcon+o.innerHTML,e.appendChild(o)})),n)this._options.summaryPrepend?i.insertAdjacentElement("afterbegin",e):i.insertAdjacentElement("beforeend",e);else if("OL"===i.nodeName||"UL"===i.nodeName){const t=document.createElement("li");t.appendChild(e),i.appendChild(t)}else i.appendChild(e);t.badge=e}if(this._options.canLike&&(l.default.userId!=~~e.dataset.userId||this._options.canLikeOwnContent)){let i=null;this._options.buttonAppendToSelector&&(i=this._options.isSingleItem?document.querySelector(this._options.buttonAppendToSelector):e.querySelector(this._options.buttonAppendToSelector));let n=null;if(this._options.buttonBeforeSelector&&(n=this._options.isSingleItem?document.querySelector(this._options.buttonBeforeSelector):e.querySelector(this._options.buttonBeforeSelector)),null===n&&null===i)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,n,i)}}_createButton(e,t,i,n){const o=a.get("wcf.reactions.react"),r=document.createElement("li");r.className="wcfReactButton";const s=document.createElement("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=o;const l=document.createElement("span");l.className="icon icon16 fa-smile-o",void 0===t||0==t?l.dataset.reactionTypeId="0":(s.dataset.reactionTypeId=t.toString(),s.classList.add("active")),s.appendChild(l);const c=document.createElement("span");return c.className="invisible",c.innerHTML=o,s.appendChild(document.createTextNode(" ")),s.appendChild(c),r.appendChild(s),i?i.insertAdjacentElement("beforebegin",r):n.insertAdjacentElement("beforeend",r),s}}return n.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Environment","../../Event/Handler","../../Language","../Dropdown/Reusable","../Notification","../Scroll"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importStar(u),h=i.__importStar(h);class p{constructor(e){this.init(e)}init(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new WeakMap,this._options=o.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),a.default.add(`Ui/Message/InlineEdit_${this._options.className}`,(()=>this.rebuild()))}rebuild(){document.querySelectorAll(this._options.messageSelector).forEach((e=>{if(this._elements.has(e))return;const t=e.querySelector(".jsMessageEditButton");if(null!==t){const i=o.stringToBool(e.dataset.canEdit||""),n=o.stringToBool(e.dataset.canEditInline||"");this._options.canEditInline||n?(t.addEventListener("click",(t=>this._clickDropdown(e,t))),t.classList.add("jsDropdownEnabled"),i&&t.addEventListener("dblclick",(t=>this._click(e,t)))):i&&t.addEventListener("click",(t=>this._click(e,t)))}const i=e.querySelector(".messageBody"),n=e.querySelector(".messageFooter"),a=n.querySelector(".messageFooterButtons"),r=e.querySelector(".messageHeader"),s=i.querySelector(".messageText");this._elements.set(e,{button:t,messageBody:i,messageBodyEditor:null,messageFooter:n,messageFooterButtons:a,messageHeader:r,messageText:s})}))}_click(e,t){null===e&&(e=this._activeDropdownElement),t&&t.preventDefault(),null===this._activeElement?(this._activeElement=e,this._prepare(),n.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(e)}})):u.show("wcf.message.error.editorAlreadyInUse",void 0,"warning")}_clickDropdown(e,t){t.preventDefault();const i=t.currentTarget;if(!i.classList.contains("dropdownToggle")){if(i.classList.add("dropdownToggle"),i.parentElement.classList.add("dropdown"),i.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this._activeDropdownElement=e,d.toggleDropdown(this._options.dropdownIdentifier,i)})),null===this._dropdownMenu){this._dropdownMenu=document.createElement("ul"),this._dropdownMenu.className="dropdownMenu";const e=this._dropdownGetItems();l.fire("com.woltlab.wcf.inlineEditor",`dropdownInit_${this._options.dropdownIdentifier}`,{items:e}),this._dropdownBuild(e),d.init(this._options.dropdownIdentifier,this._dropdownMenu),d.registerCallback(this._options.dropdownIdentifier,((e,t)=>this._dropdownToggle(e,t)))}setTimeout((()=>i.click()),10)}}_dropdownBuild(e){e.forEach((e=>{const t=document.createElement("li");if(t.dataset.item=e.item,"divider"===e.item)t.className="dropdownDivider";else{const i=document.createElement("span");i.textContent=c.get(e.label),t.appendChild(i),"editItem"===e.item?t.addEventListener("click",(e=>this._click(null,e))):t.addEventListener("click",(e=>this._clickDropdownItem(e)))}this._dropdownMenu.appendChild(t)}))}_dropdownToggle(e,t){const i=this._elements.get(this._activeDropdownElement),n=i.button.parentElement;if("close"===t)return n.classList.remove("dropdownOpen"),void i.messageFooterButtons.classList.remove("forceVisible");n.classList.add("dropdownOpen"),i.messageFooterButtons.classList.add("forceVisible");const o=new Map(Object.entries(this._dropdownOpen()));l.fire("com.woltlab.wcf.inlineEditor",`dropdownOpen_${this._options.dropdownIdentifier}`,{element:this._activeDropdownElement,visibility:o});const a=this._dropdownMenu;let s=!1;const c=Array.from(a.children);c.forEach(((e,t)=>{const i=e.dataset.item;if("divider"===i)s?(r.default.show(e),s=!1):r.default.hide(e);else if(!1===o.get(i)){if(r.default.hide(e),t>0&&t+1===c.length){const t=e.previousElementSibling;"divider"===t.dataset.item&&r.default.hide(t)}}else r.default.show(e),s=!0}))}_dropdownGetItems(){return[]}_dropdownOpen(){return{}}_dropdownSelect(e){}_clickDropdownItem(e){e.preventDefault();const t=e.currentTarget.dataset.item,i={cancel:!1,element:this._activeDropdownElement,item:t};l.fire("com.woltlab.wcf.inlineEditor",`dropdownItemClick_${this._options.dropdownIdentifier}`,i),i.cancel?e.preventDefault():this._dropdownSelect(t)}_prepare(){const e=this._elements.get(this._activeElement),t=document.createElement("div");t.className="messageBody editor",e.messageBodyEditor=t;const i=document.createElement("span");i.className="icon icon48 fa-spinner",t.appendChild(i),e.messageBody.insertAdjacentElement("afterend",t),r.default.hide(e.messageBody)}_showEditor(e){const t=this._getEditorId(),i=this._activeElement,n=this._elements.get(i);i.classList.add("jsInvalidQuoteTarget");n.messageBodyEditor.querySelector(".icon").remove();const o=n.messageBodyEditor,a=document.createElement("div");a.className="editorContainer",r.default.setInnerHtml(a,e.returnValues.template),o.appendChild(a);const c=a.querySelector(".formSubmit");c.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save()));if(c.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),l.add("com.woltlab.wcf.redactor",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()})),r.default.hide(n.messageHeader),r.default.hide(n.messageFooter),"redactor"===s.editor())window.setTimeout((()=>{this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(i)}),250);else{document.getElementById(t).focus()}}_restoreMessage(){const e=this._activeElement,t=this._elements.get(e);this._destroyEditor(),t.messageBodyEditor.remove(),t.messageBodyEditor=null,r.default.show(t.messageBody),r.default.show(t.messageFooter),r.default.show(t.messageHeader),e.classList.remove("jsInvalidQuoteTarget"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()}_save(){const e={containerID:this._options.containerId,data:{message:""},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},t=this._getEditorId(),i=document.getElementById(`settings_${t}`);i&&i.querySelectorAll("input, select, textarea").forEach((t=>{if("INPUT"===t.nodeName&&("checkbox"===t.type||"radio"===t.type)&&!t.checked)return;const i=t.name;if(Object.prototype.hasOwnProperty.call(e,i))throw new Error(`Variable overshadowing, key '${i}' is already present.`);e[i]=t.value.trim()})),l.fire("com.woltlab.wcf.redactor2",`getText_${t}`,e.data);let o=this._validate(e);o instanceof Promise||(o=!1===o?Promise.reject():Promise.resolve()),o.then((()=>{l.fire("com.woltlab.wcf.redactor2",`submit_${t}`,e),n.api(this,{actionName:"save",parameters:e}),this._hideEditor()}),(e=>{const t=e.message;console.log(`Validation of post edit failed: ${t}`)}))}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t={api:this,parameters:e,valid:!0,promises:[]};return l.fire("com.woltlab.wcf.redactor2",`validate_${this._getEditorId()}`,t),t.valid?t.promises.push(Promise.resolve()):t.promises.push(Promise.reject()),Promise.all(t.promises)}throwError(e,t){r.default.innerError(e,t)}_showMessage(e){const t=this._activeElement,i=this._getEditorId(),n=this._elements.get(t);if(r.default.setInnerHtml(n.messageBody.querySelector(".messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){n.messageFooter.querySelectorAll(".attachmentThumbnailList, .attachmentFileList").forEach((e=>e.remove()));const t=document.createElement("div");let i;for(r.default.setInnerHtml(t,e.returnValues.attachmentList);t.childNodes.length;)i=t.childNodes[t.childNodes.length-1],n.messageFooter.insertBefore(i,n.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){const t=n.messageBody.querySelector(".pollContainer");null!==t&&t.parentElement.remove();const i=document.createElement("div");i.className="jsInlineEditorHideContent",r.default.setInnerHtml(i,e.returnValues.poll),n.messageBody.insertAdjacentElement("afterbegin",i)}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),l.fire("com.woltlab.wcf.redactor",`autosaveDestroy_${i}`),u.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())}_hideEditor(){const e=this._elements.get(this._activeElement),t=e.messageBodyEditor.querySelector(".editorContainer");r.default.hide(t);const i=document.createElement("span");i.className="icon icon48 fa-spinner",e.messageBodyEditor.appendChild(i)}_restoreEditor(){const e=this._elements.get(this._activeElement).messageBodyEditor;e.querySelector(".fa-spinner").remove();const t=e.querySelector(".editorContainer");null!==t&&r.default.show(t)}_destroyEditor(){l.fire("com.woltlab.wcf.redactor2",`autosaveDestroy_${this._getEditorId()}`),l.fire("com.woltlab.wcf.redactor2",`destroy_${this._getEditorId()}`)}_getHash(e){return`#message${e}`}_updateHistory(e){window.location.hash=e}_getEditorId(){return this._options.editorPrefix+this._getObjectId(this._activeElement).toString()}_getObjectId(e){return e.dataset.objectId||""}_ajaxFailure(e){const t=this._elements.get(this._activeElement).messageBodyEditor.querySelector(".redactor-layer");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(r.default.innerError(t,e.returnValues.realErrorMessage),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}}_ajaxSetup(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}}legacyEdit(e){this._click(document.getElementById(e),null)}}return o.enableLegacyInheritance(p),p})),define("WoltLabSuite/Core/Ui/Message/Manager",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e){this._elements=new Map,this._options=o.extend({className:"",selector:""},e),this.rebuild(),a.default.add(`Ui/Message/Manager${this._options.className}`,this.rebuild.bind(this))}rebuild(){this._elements.clear(),document.querySelectorAll(this._options.selector).forEach((e=>{this._elements.set(e.dataset.objectId,e)}))}getPermission(e,t){t="can"+s.ucfirst(t);const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);return o.stringToBool(i.dataset[s.toCamelCase(t)]||"")}getPropertyValue(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const a=n.dataset[s.toCamelCase(t)]||"";return i?o.stringToBool(a):a}update(e,t,i){n.api(this,{actionName:t,parameters:i||{},objectIDs:[e]})}updateItems(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{const i=this._elements.get(e);void 0!==i&&Object.entries(t).forEach((([e,t])=>{this._update(i,e,t)}))}))}updateAllItems(e){const t=Array.from(this._elements.keys());this.updateItems(t,e)}setNote(e,t,i){const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const o=n.querySelector(".messageFooterNotes");let a=o.querySelector(`.${t}`);i?(null===a&&(a=document.createElement("p"),a.className="messageFooterNote "+t,o.appendChild(a)),a.innerHTML=i):null!==a&&a.remove()}_update(e,t,i){e.dataset[t]=i.toString();const n=1==i||!0===i||"true"===i;this._updateState(e,t,i,n)}_updateState(e,t,i,n){switch(t){case"isDeleted":n?e.classList.add("messageDeleted"):e.classList.remove("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",n);break;case"isDisabled":n?e.classList.add("messageDisabled"):e.classList.remove("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",n)}}_toggleMessageStatus(e,t,i,n,o){let a=e.querySelector(".messageStatus");if(null===a){const t=e.querySelector(".messageHeaderMetaData");if(null===t)return;a=document.createElement("ul"),a.className="messageStatus",t.insertAdjacentElement("afterend",a)}let s=a.querySelector(`.${t}`);if(o){if(null!==s)return;s=document.createElement("span"),s.className=`badge label ${n} ${t}`,s.textContent=r.get(i);const e=document.createElement("li");e.appendChild(s),a.appendChild(e)}else{if(null===s)return;s.parentElement.remove()}}_getAttributeName(e){return-1!==e.indexOf("-")?e:e.split(/([A-Z][a-z]+)/).map((e=>e.trim().toLowerCase())).filter((e=>e.length>0)).join("-")}_ajaxSuccess(e){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")}_ajaxSetup(){return{data:{className:this._options.className}}}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Message/Quote",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util"],(function(e,t,i,n,o,a,r,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiMessageQuote=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importDefault(l);class c{constructor(e,t,i,n,o,a,r){this.activeMessageId="",this.containers=new Map,this.containerSelector="",this.copyQuote=document.createElement("div"),this.message="",this.objectId=0,this.objectType="",this.timerSelectionChange=void 0,this.isMouseDown=!1,this.className=t,this.objectType=i,this.containerSelector=n,this.messageBodySelector=o,this.initContainers(),r=r&&e.supportPaste(),this.quoteManager=e,this.initCopyQuote(r),document.addEventListener("mouseup",(e=>this.onMouseUp(e))),document.addEventListener("selectionchange",(()=>this.onSelectionchange())),s.default.add("UiMessageQuote",(()=>this.initContainers())),document.addEventListener("touchstart",(e=>{if(this.copyQuote.classList.contains("active")){const t=e.target;t===this.copyQuote||this.copyQuote.contains(t)||(this.copyQuote.classList.add("touchForceInaccessible"),document.addEventListener("touchend",(()=>{this.copyQuote.classList.remove("touchForceInaccessible")}),{once:!0}))}}),{passive:!0})}initContainers(){document.querySelectorAll(this.containerSelector).forEach((e=>{var t;const i=l.default.identify(e);this.containers.has(i)||(this.containers.set(i,e),e.classList.contains("jsInvalidQuoteTarget")||(e.addEventListener("mousedown",(e=>this.onMouseDown(e))),e.classList.add("jsQuoteMessageContainer"),null===(t=e.querySelector(".jsQuoteMessage"))||void 0===t||t.addEventListener("click",(e=>this.saveFullQuote(e)))))}))}onSelectionchange(){if(!this.isMouseDown){if(""===this.activeMessageId){const e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return;const t=e.getRangeAt(0),i=l.default.closest(t.startContainer,".jsQuoteMessageContainer"),n=l.default.closest(t.endContainer,".jsQuoteMessageContainer");if(i&&i===n&&!i.classList.contains("jsInvalidQuoteTarget")){let e=t.commonAncestorContainer;e.nodeType!==Node.ELEMENT_NODE&&(e=e.parentElement);const n=e.offsetParent;if(i.contains(n)&&n.scrollTop+n.clientHeight<e.offsetTop)return;this.activeMessageId=i.id}}this.timerSelectionChange&&window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=window.setTimeout((()=>this.onMouseUp()),100)}}onMouseDown(e){this.copyQuote.classList.remove("active");const t=e.currentTarget;this.activeMessageId=t.classList.contains("jsInvalidQuoteTarget")?"":t.id,this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!0}getNodeText(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>"BLOCKQUOTE"===e.nodeName||"SCRIPT"===e.nodeName?NodeFilter.FILTER_REJECT:!(e instanceof HTMLImageElement)||e.classList.contains("smiley")&&e.alt?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i="";const n=[];for(;t.nextNode();){const e=t.currentNode;if(e instanceof Text){const t=e.parentElement;if(t instanceof HTMLAnchorElement&&n.includes(t))continue;i+=e.nodeValue.replace(/\n/g," ")}else{if(e instanceof HTMLAnchorElement){const t=e.textContent;if(t.indexOf("…")>0){const o=t.split(/\u2026/);if(2===o.length){const t=e.href;0===t.indexOf(o[0])&&t.substr(-1*o[1].length)===o[1]&&(i+=t,n.push(e))}}}switch(e.nodeName){case"BR":case"LI":case"TD":case"UL":i+="\n";break;case"P":i+="\n\n";break;case"IMG":i+=` ${e.alt} `;break;case"DIV":(e.classList.contains("codeBoxHeadline")||e.classList.contains("codeBoxLine"))&&(i+="\n")}}}return i}onMouseUp(e){if(e instanceof Event&&(this.timerSelectionChange&&(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0),this.isMouseDown=!1),""===this.activeMessageId)return void this.copyQuote.classList.remove("active");const t=window.getSelection();if(1!==t.rangeCount||t.isCollapsed)return void this.copyQuote.classList.remove("active");const i=this.containers.get(this.activeMessageId),n=~~i.dataset.objectId,o=this.messageBodySelector?i.querySelector(this.messageBodySelector):i;let a=t.anchorNode;for(;a&&a!==o;)a=a.parentNode;if(a!==o)return void this.copyQuote.classList.remove("active");const r=this.getSelectedText().trim();if(""===r)return void this.copyQuote.classList.remove("active");const s=t.getRangeAt(0),c=l.default.getClosestElement(s.startContainer),d=l.default.getClosestElement(s.endContainer);if(c.closest("blockquote")||d.closest("blockquote"))return void this.copyQuote.classList.remove("active");const u=this.getNodeText(o);if(!this.normalizeTextForComparison(u).includes(this.normalizeTextForComparison(r)))return;this.copyQuote.classList.add("active");const h=this.getElementBoundaries(t),p=(this.copyQuote.offsetHeight,this.copyQuote.offsetWidth);let m=(h.right-h.left)/2-p/2+h.left;const f=o.getBoundingClientRect();m<f.left?m=f.left:m+p>f.right&&(m=f.right-p),this.copyQuote.style.setProperty("top",`${h.bottom+7}px`),this.copyQuote.style.setProperty("left",`${m}px`),this.copyQuote.classList.remove("active"),this.timerSelectionChange?(window.clearTimeout(this.timerSelectionChange),this.timerSelectionChange=void 0):this.activeMessageId="",window.setTimeout((()=>{const e=this.getSelectedText().trim();""!==e&&(this.copyQuote.classList.add("active"),this.message=e,this.objectId=n)}),10)}normalizeTextForComparison(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")}getElementBoundaries(e){let t=null;if(e.rangeCount>0){const i=e.getRangeAt(0).getBoundingClientRect(),n=window.pageYOffset;t={bottom:i.bottom+n,left:i.left,right:i.right,top:i.top+n}}return t}initCopyQuote(e){const t=document.getElementById("quoteManagerCopy");null==t||t.remove(),this.copyQuote.id="quoteManagerCopy",this.copyQuote.classList.add("balloonTooltip","interactive");const i=document.createElement("span");if(i.classList.add("jsQuoteManagerStore"),i.textContent=r.get("wcf.message.quote.quoteSelected"),i.addEventListener("click",(e=>this.saveQuote(e))),this.copyQuote.appendChild(i),e){const e=document.createElement("span");e.classList.add("jsQuoteManagerQuoteAndInsert"),e.textContent=r.get("wcf.message.quote.quoteAndReply"),e.addEventListener("click",(e=>this.saveAndInsertQuote(e))),this.copyQuote.appendChild(e)}document.body.appendChild(this.copyQuote)}getSelectedText(){const e=window.getSelection();return e.rangeCount?this.getNodeText(e.getRangeAt(0).cloneContents()):""}saveFullQuote(e){e.preventDefault();const t=e.currentTarget;n.api(this,{actionName:"saveFullQuote",objectIDs:[t.dataset.objectId]});const i=t.querySelector("a");o.stringToBool(t.dataset.isQuoted||"")?(t.dataset.isQuoted="false",i.classList.remove("active")):(t.dataset.isQuoted="true",i.classList.add("active"));const a=t.closest(".buttonGroupNavigation");if(a.classList.contains("jsMobileButtonGroupNavigation")){a.querySelector(".dropdownLabel").click()}}saveQuote(e,t=!1){null==e||e.preventDefault(),n.api(this,{actionName:"saveQuote",objectIDs:[this.objectId],parameters:{message:this.message,renderQuote:t}});const i=window.getSelection();i.rangeCount&&(i.removeAllRanges(),this.copyQuote.classList.remove("active"))}saveAndInsertQuote(e){e.preventDefault(),this.saveQuote(void 0,!0)}_ajaxSuccess(e){if(void 0!==e.returnValues.count){void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs);const t=e.returnValues.fullQuoteObjectIDs||{};this.quoteManager.updateCount(e.returnValues.count,t)}switch(e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&a.fire("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName,quote:e.returnValues.renderedQuote})}}_ajaxSetup(){return{data:{className:this.className,interfaceName:"wcf\\data\\IMessageQuoteAction"}}}updateFullQuoteObjectIDs(e){this.containers.forEach((t=>{const i=t.querySelector(".jsQuoteMessage");i.dataset.isQuoted="false";const n=i.querySelector("a");i.classList.remove("active");const o=~~i.dataset.objectID;e.includes(o)&&(i.dataset.isQuoted="true",n.classList.add("active"))}))}}t.UiMessageQuote=c,t.default=c})),define("WoltLabSuite/Core/Ui/Message/Reply",["require","exports","tslib","../../Ajax","../../Core","../../Event/Handler","../../Language","../../Dom/Change/Listener","../../Dom/Util","../Dialog","../Notification","../../User","../../Controller/Captcha","../Scroll"],(function(e,t,i,n,o,a,r,s,l,c,d,u,h,p){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importDefault(l),c=i.__importDefault(c),d=i.__importStar(d),u=i.__importDefault(u),h=i.__importDefault(h),p=i.__importStar(p);class m{constructor(e){this._editor=null,this._guestDialogId="",this._loadingOverlay=null,this._options=o.extend({ajax:{className:""},quoteManager:null,successMessage:"wcf.global.success.add"},e),this._container=document.getElementById("messageQuickReply"),this._content=this._container.querySelector(".messageContent"),this._textarea=document.getElementById("text"),this._container.querySelector(".message").classList.add("jsInvalidQuoteTarget");this._container.querySelector('button[data-type="save"]').addEventListener("click",(e=>this._submit(e))),document.querySelectorAll(".jsQuickReply").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this._getEditor().WoltLabReply.showEditor(),p.element(this._container,(()=>{this._getEditor().WoltLabCaret.endOfEditor()}))}))}))}_submitGuestDialog(e){if(e instanceof KeyboardEvent&&"Enter"!==e.key)return;const t=e.currentTarget,i=t.closest(".dialogContent").querySelector("input[name=username]");if(""===i.value)return l.default.innerError(i,r.get("wcf.global.form.error.empty")),void i.closest("dl").classList.add("formError");let n={parameters:{data:{username:i.value}}};const a=t.dataset.captchaId;if(h.default.has(a)){const e=h.default.getData(a);e instanceof Promise?e.then((e=>{n=o.extend(n,e),this._submit(void 0,n)})):(n=o.extend(n,e),this._submit(void 0,n))}else this._submit(void 0,n)}_submit(e,t){if(e&&e.preventDefault(),this._content.classList.contains("loading")&&(!this._guestDialogId||!c.default.isOpen(this._guestDialogId)))return;if(!this._validate())return;this._showLoadingOverlay();const i={};Object.entries(this._container.dataset).forEach((([e,t])=>{i[e.replace(/Id$/,"ID")]=t})),i.data={message:this._getEditor().code.get()},i.removeQuoteIDs=this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[];const r=document.getElementById("settings_text");r&&r.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(i,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);i[t]=e.value.trim()})),a.fire("com.woltlab.wcf.redactor2","submit_text",i.data),u.default.userId||t||(i.requireGuestDialog=!0),n.api(this,o.extend({parameters:i},t))}_validate(){if(this._container.querySelectorAll(".innerError").forEach((e=>e.remove())),this._getEditor().utils.isEmpty())return this.throwError(this._textarea,r.get("wcf.global.form.error.empty")),!1;const e={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return a.fire("com.woltlab.wcf.redactor2","validate_text",e),e.valid}throwError(e,t){l.default.innerError(e,"empty"===t?r.get("wcf.global.form.error.empty"):t)}_showLoadingOverlay(){null===this._loadingOverlay&&(this._loadingOverlay=document.createElement("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(){this._content.classList.remove("loading");const e=this._content.querySelector(".messageContentLoadingOverlay");null!==e&&e.remove()}_reset(){this._getEditor().code.set("<p></p>"),a.fire("com.woltlab.wcf.redactor2","reset_text")}_handleError(e){const t={api:this,cancel:!1,returnValues:e.returnValues};a.fire("com.woltlab.wcf.redactor2","handleError_text",t),t.cancel||this.throwError(this._textarea,e.returnValues.realErrorMessage)}_getEditor(){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(e){if(this._getEditor().WoltLabAutosave.reset(),e.returnValues.url)window.location.href==e.returnValues.url&&window.location.reload(),window.location.href=e.returnValues.url;else{if(e.returnValues.template){let t;if("DESC"===this._container.dataset.sortOrder)l.default.insertHtml(e.returnValues.template,this._container,"after"),t=l.default.identify(this._container.nextElementSibling);else{let i=this._container;i.previousElementSibling&&i.previousElementSibling.classList.contains("messageListPagination")&&(i=i.previousElementSibling),l.default.insertHtml(e.returnValues.template,i,"before"),t=l.default.identify(i.previousElementSibling)}this._container.dataset.lastPostTime=e.returnValues.lastPostTime.toString(),window.history.replaceState(void 0,"",`#${t}`),p.element(document.getElementById(t))}d.show(r.get(this._options.successMessage)),this._options.quoteManager&&this._options.quoteManager.countQuotes(),s.default.trigger()}}_ajaxSuccess(e){if(!u.default.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.default.userId&&e.returnValues.guestDialog){const t=e.returnValues.guestDialogID;c.default.openStatic(t,e.returnValues.guestDialog,{closable:!1,onClose:function(){h.default.has(t)&&h.default.delete(t)},title:r.get("wcf.global.confirmation.title")});const i=c.default.getDialog(t);i.content.querySelector("input[type=submit]").addEventListener("click",(e=>this._submitGuestDialog(e)));i.content.querySelector("input[type=text]").addEventListener("keypress",(e=>this._submitGuestDialog(e))),this._guestDialogId=t}else this._insertMessage(e),u.default.userId||c.default.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay()}_ajaxFailure(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(this._handleError(e),!1)}_ajaxSetup(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"},silent:!0}}}return o.enableLegacyInheritance(m),m})),define("WoltLabSuite/Core/Ui/Message/Share",["require","exports","tslib","../../Event/Handler","../../StringUtil"],(function(e,t,i,n,o){"use strict";function a(e,t,i,n){n||(n=s),window.open(t.replace("{pageURL}",n).replace("{text}",r+(i?`%20${n}`:"")),e,"height=600,width=600")}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let r="",s="";t.init=function(){const e=document.querySelector('meta[property="og:title"]');null!==e&&(r=encodeURIComponent(e.content));const t=document.querySelector('meta[property="og:url"]');null!==t&&(s=encodeURIComponent(t.content)),document.querySelectorAll(".jsMessageShareButtons").forEach((e=>{e.classList.remove("jsMessageShareButtons");let t=encodeURIComponent(o.unescapeHTML(e.dataset.url||""));t||(t=s);const i={facebook:{link:e.querySelector(".jsShareFacebook"),share(e){e.preventDefault(),a("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{link:e.querySelector(".jsShareReddit"),share(e){e.preventDefault(),a("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{link:e.querySelector(".jsShareTwitter"),share(e){e.preventDefault(),a("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{link:e.querySelector(".jsShareLinkedIn"),share(e){e.preventDefault(),a("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{link:e.querySelector(".jsSharePinterest"),share(e){e.preventDefault(),a("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{link:e.querySelector(".jsShareXing"),share(e){e.preventDefault(),a("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{link:e.querySelector(".jsShareWhatsApp"),share(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+r+"%20"+s}}};n.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:i,pageDescription:r,pageUrl:s}),Object.values(i).forEach((e=>{if(null!==e.link){e.link.addEventListener("click",(t=>e.share(t)))}}))}))}})),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["require","exports","https://platform.twitter.com/widgets.js"],(function(e,t){"use strict";async function i(e,t,i=!1){const o=await n,a=await o.widgets.createTweet(t,e,{dnt:!0,lang:document.documentElement.lang});if(a&&i){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.embedAll=t.embedTweet=void 0;const n=new Promise((e=>{twttr.ready(e)}));t.embedTweet=i,t.embedAll=function(){document.querySelectorAll("[data-wsc-twitter-tweet]").forEach((e=>{const t=e.dataset.wscTwitterTweet;t&&(delete e.dataset.wscTwitterTweet,i(e,t,!0))}))}})),define("WoltLabSuite/Core/Ui/Page/Search",["require","exports","tslib","../../Ajax","../../Dom/Util","../../Language","../../StringUtil","../Dialog"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(){this.callbackSelect=void 0,this.resultContainer=void 0,this.resultList=void 0,this.searchInput=void 0}open(e){this.callbackSelect=e,s.default.open(this)}search(e){e.preventDefault();const t=this.searchInput.parentNode,i=this.searchInput.value.trim();i.length<3?o.default.innerError(t,a.get("wcf.page.search.error.tooShort")):(o.default.innerError(t,!1),n.api(this,{parameters:{searchString:i}}))}click(e){e.preventDefault();const t=e.currentTarget,i=t.querySelector("h3");this.callbackSelect(t.dataset.pageId+"#"+i.textContent.replace(/['"]/g,"")),s.default.close(this)}_ajaxSuccess(e){const t=e.returnValues.map((e=>{const t=r.escapeHTML(e.name),i=r.escapeHTML(e.displayLink);return`<li>\n <div class="containerHeadline pointer" data-page-id="${e.pageID}">\n <h3>${t}</h3>\n <small>${i}</small>\n </div>\n </li>`})).join("");this.resultList.innerHTML=t,o.default[t?"show":"hide"](this.resultContainer),t?this.resultList.querySelectorAll(".containerHeadline").forEach((e=>{e.addEventListener("click",(e=>this.click(e)))})):o.default.innerError(this.searchInput.parentElement,a.get("wcf.page.search.error.noResults"))}_ajaxSetup(){return{data:{actionName:"search",className:"wcf\\data\\page\\PageAction"}}}_dialogSetup(){return{id:"wcfUiPageSearch",options:{onSetup:()=>{this.searchInput=document.getElementById("wcfUiPageSearchInput"),this.searchInput.addEventListener("keydown",(e=>{"Enter"===e.key&&this.search(e)})),this.searchInput.nextElementSibling.addEventListener("click",(e=>this.search(e))),this.resultContainer=document.getElementById("wcfUiPageSearchResultContainer"),this.resultList=document.getElementById("wcfUiPageSearchResultList")},onShow:()=>{this.searchInput.focus()},title:a.get("wcf.page.search")},source:`<div class="section">\n <dl>\n <dt><label for="wcfUiPageSearchInput">${a.get("wcf.page.search.name")}</label></dt>\n <dd>\n <div class="inputAddon">\n <input type="text" id="wcfUiPageSearchInput" class="long">\n <a href="#" class="inputSuffix"><span class="icon icon16 fa-search"></span></a>\n </div>\n </dd>\n </dl>\n </div>\n <section id="wcfUiPageSearchResultContainer" class="section" style="display: none;">\n <header class="sectionHeader">\n <h2 class="sectionTitle">${a.get("wcf.page.search.results")}</h2>\n </header>\n <ol id="wcfUiPageSearchResultList" class="containerList"></ol>\n </section>`}}}let c;t.open=function(e){(void 0===c&&(c=new l),c).open(e)}})),define("WoltLabSuite/Core/Ui/Sortable/List",["require","exports","tslib","../../Core","../Screen"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e){this._options=n.extend({containerId:"",className:"",offset:0,options:{},isSimpleSorting:!1,additionalParameters:{}},e),o.on("screen-sm-md",{match:()=>this._enable(!0),unmatch:()=>this._disable(),setup:()=>this._enable(!0)}),o.on("screen-lg",{match:()=>this._enable(!1),unmatch:()=>this._disable(),setup:()=>this._enable(!1)})}_enable(e){const t=this._options.options;e&&(t.handle=".sortableNodeHandle"),new window.WCF.Sortable.List(this._options.containerId,this._options.className,this._options.offset,t,this._options.isSimpleSorting,this._options.additionalParameters)}_disable(){window.jQuery(`#${this._options.containerId} .sortableList`)[this._options.isSimpleSorting?"sortable":"nestedSortable"]("destroy")}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Poll/Editor",["require","exports","tslib","../../Core","../../Language","../Sortable/List","../../Event/Handler","../../Date/Picker"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e,t,i,o){const s=document.getElementById(e);if(null===s)throw new Error("Unknown poll editor container with id '"+e+"'.");if(this.container=s,this.wysiwygId=i,""!==i&&null===document.getElementById(i))throw new Error("Unknown wysiwyg field with id '"+i+"'.");this.questionField=document.getElementById(this.wysiwygId+"Poll_question");const l=this.container.querySelector(".sortableList");if(null===l)throw new Error("Cannot find poll options list for container with id '"+e+"'.");if(this.optionList=l,this.endTimeField=document.getElementById(this.wysiwygId+"Poll_endTime"),this.maxVotesField=document.getElementById(this.wysiwygId+"Poll_maxVotes"),this.isChangeableYesField=document.getElementById(this.wysiwygId+"Poll_isChangeable"),this.isChangeableNoField=document.getElementById(this.wysiwygId+"Poll_isChangeable_no"),this.isPublicYesField=document.getElementById(this.wysiwygId+"Poll_isPublic"),this.isPublicNoField=document.getElementById(this.wysiwygId+"Poll_isPublic_no"),this.resultsRequireVoteYesField=document.getElementById(this.wysiwygId+"Poll_resultsRequireVote"),this.resultsRequireVoteNoField=document.getElementById(this.wysiwygId+"Poll_resultsRequireVote_no"),this.sortByVotesYesField=document.getElementById(this.wysiwygId+"Poll_sortByVotes"),this.sortByVotesNoField=document.getElementById(this.wysiwygId+"Poll_sortByVotes_no"),this.optionCount=0,this.options=n.extend({isAjax:!1,maxOptions:20},o),this.createOptionList(t||[]),new a.default({containerId:e,options:{toleranceElement:"> div"}}),this.options.isAjax)["handleError","reset","submit","validate"].forEach((e=>{r.add("com.woltlab.wcf.redactor2",e+"_"+this.wysiwygId,((...t)=>this[e](...t)))}));else{const t=this.container.closest("form");if(null===t)throw new Error("Cannot find form for container with id '"+e+"'.");t.addEventListener("submit",(e=>this.submit(e)))}}createOption(e,t,i){e=e||"",t=t||"0";const n=document.createElement("LI");n.classList.add("sortableNode"),n.dataset.optionId=t,i?i.insertAdjacentElement("afterend",n):this.optionList.appendChild(n);const a=document.createElement("div");a.classList.add("pollOptionInput"),n.appendChild(a);const r=document.createElement("span");r.classList.add("icon","icon16","fa-arrows","sortableNodeHandle"),a.appendChild(r);const s=document.createElement("a");n.setAttribute("role","button"),n.setAttribute("href","#"),s.classList.add("icon","icon16","fa-plus","jsTooltip","jsAddOption","pointer"),s.setAttribute("title",o.get("wcf.poll.button.addOption")),s.addEventListener("click",(()=>this.createOption())),a.appendChild(s);const l=document.createElement("a");l.setAttribute("role","button"),l.setAttribute("href","#"),l.classList.add("icon","icon16","fa-times","jsTooltip","jsDeleteOption","pointer"),l.setAttribute("title",o.get("wcf.poll.button.removeOption")),l.addEventListener("click",(e=>this.removeOption(e))),a.appendChild(l);const c=document.createElement("input");c.type="text",c.value=e,c.maxLength=255,c.addEventListener("keydown",(e=>this.optionInputKeyDown(e))),c.addEventListener("click",(()=>{document.activeElement!==c&&c.focus()})),a.appendChild(c),null!==i&&c.focus(),this.optionCount++,this.optionCount===this.options.maxOptions&&this.optionList.querySelectorAll(".jsAddOption").forEach((e=>{e.classList.remove("pointer"),e.classList.add("disabled")}))}createOptionList(e){e.forEach((e=>{this.createOption(e.optionValue,e.optionID)})),this.optionCount<this.options.maxOptions&&this.createOption()}handleError(e){switch(e.returnValues.fieldName){case this.wysiwygId+"Poll_endTime":case this.wysiwygId+"Poll_maxVotes":{const t=e.returnValues.fieldName.replace(this.wysiwygId+"Poll_",""),i=document.createElement("small");i.classList.add("innerError"),i.innerHTML=o.get("wcf.poll."+t+".error."+e.returnValues.errorType);document.getElementById(e.returnValues.fieldName).nextSibling.insertAdjacentElement("afterbegin",i),e.cancel=!0;break}}}optionInputKeyDown(e){if("Enter"!==e.key)return;const t=e.currentTarget.parentElement.querySelector(".jsAddOption");n.triggerEvent(t,"click"),e.preventDefault()}removeOption(e){e.preventDefault();e.currentTarget.closest("li").remove(),this.optionCount--,0===this.optionList.childElementCount?this.createOption():this.optionList.querySelectorAll(".jsAddOption").forEach((e=>{e.classList.add("pointer"),e.classList.remove("disabled")}))}reset(){this.questionField.value="",this.optionCount=0,this.optionList.innerHTML="",this.createOption(),s.clear(this.endTimeField),this.maxVotesField.value="1",this.isChangeableYesField.checked=!1,this.isChangeableNoField.checked=!0,this.isPublicYesField.checked=!1,this.isPublicNoField.checked=!0,this.resultsRequireVoteYesField.checked=!1,this.resultsRequireVoteNoField.checked=!0,this.sortByVotesYesField.checked=!1,this.sortByVotesNoField.checked=!0,r.fire("com.woltlab.wcf.poll.editor","reset",{pollEditor:this})}submit(e){if(this.options.isAjax)r.fire("com.woltlab.wcf.poll.editor","submit",{event:e,pollEditor:this});else{const e=this.container.closest("form");this.getOptions().forEach(((t,i)=>{const n=document.createElement("input");n.type="hidden",n.name=`${this.wysiwygId} + 'Poll_options[${i}}]`,n.value=t,e.appendChild(n)}))}}validate(e){if(""===this.questionField.value.trim())return;let t=0;if(Array.from(this.optionList.children).forEach((e=>{""!==e.querySelector("input[type=text]").value.trim()&&t++})),0===t)e.api.throwError(this.container,o.get("wcf.global.form.error.empty")),e.valid=!1;else{const i=~~this.maxVotesField.value;i&&i>t?(e.api.throwError(this.maxVotesField.parentElement,o.get("wcf.poll.maxVotes.error.invalid")),e.valid=!1):r.fire("com.woltlab.wcf.poll.editor","validate",{data:e,pollEditor:this})}}getData(){return{[this.questionField.id]:this.questionField.value,[this.wysiwygId+"Poll_options"]:this.getOptions(),[this.endTimeField.id]:this.endTimeField.value,[this.maxVotesField.id]:this.maxVotesField.value,[this.isChangeableYesField.id]:!!this.isChangeableYesField.checked,[this.isPublicYesField.id]:!!this.isPublicYesField.checked,[this.resultsRequireVoteYesField.id]:!!this.resultsRequireVoteYesField.checked,[this.sortByVotesYesField.id]:!!this.sortByVotesYesField.checked}}getOptions(){const e=[];return Array.from(this.optionList.children).forEach((t=>{const i=t.querySelector("input[type=text]").value.trim();""!==i&&e.push(`${t.dataset.optionId}_${i}`)})),e}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Reaction/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Redactor/Article",["require","exports","tslib","../../Core","../Article/Search"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this._editor=e,t.addEventListener("click",(e=>this._click(e)))}_click(e){e.preventDefault(),o.open((e=>this._insert(e)))}_insert(e){this._editor.buffer.set(),this._editor.insert.text(`[wsa='${e}'][/wsa]`)}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Redactor/Metacode",["require","exports","tslib","../../Event/Handler","../../Dom/Util"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromHtml=void 0,n=i.__importStar(n),o=i.__importDefault(o),t.convertFromHtml=function(e,t){const i=document.createElement("div");return i.innerHTML=t,i.querySelectorAll("woltlab-metacode").forEach((t=>{const a=t.dataset.name,r=function(e){try{e=JSON.parse(atob(e))}catch(e){}return Array.isArray(e)?e.map((e=>e.toString().replace(/^'(.*)'$/,"$1"))):[]}(t.dataset.attributes||""),s={attributes:r,cancel:!1,metacode:t};if(n.fire("com.woltlab.wcf.redactor2",`metacode_${a}_${e}`,s),s.cancel)return;const l=function(e,t){let i="["+e;return t.length&&(i+="=",i+=t.map((e=>`'${e}'`)).join(",")),document.createTextNode(i+"]")}(a,r),c=function(e){return document.createTextNode(`[/${e}]`)}(a);if(t.parentElement===i){const e=function(e){let t;if(0===e.childElementCount)t=document.createElement("p"),e.appendChild(t);else{const i=e.children[0];"P"===i.nodeName?t=i:(t=document.createElement("p"),e.insertBefore(t,i))}return t}(t);e.insertBefore(l,e.firstChild),function(e){const t=e.childElementCount;let i;if(0===t)i=document.createElement("p"),e.appendChild(i);else{const n=e.children[t-1];"P"===n.nodeName?i=n:(i=document.createElement("p"),e.appendChild(i))}return i}(t).appendChild(c)}else t.insertBefore(l,t.firstChild),t.appendChild(c);o.default.unwrapChildNodes(t)})),i.querySelectorAll("kbd").forEach((e=>{e.insertBefore(document.createTextNode("[tt]"),e.firstChild),e.appendChild(document.createTextNode("[/tt]")),o.default.unwrapChildNodes(e)})),i.innerHTML}})),define("WoltLabSuite/Core/Ui/Redactor/Autosave",["require","exports","tslib","../../Core","../../Devtools","../../Event/Handler","../../Language","./Metacode"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s);class l{constructor(e){this._container=null,this._editor=null,this._isActive=!0,this._isPending=!1,this._lastMessage="",this._metaData={},this._originalMessage="",this._restored=!1,this._timer=null,this._element=e,this._key=n.getStoragePrefix()+this._element.dataset.autosave,this._cleanup(),delete this._element.dataset.autosave;const t=this._element.closest("form");null!==t&&t.addEventListener("submit",this.destroy.bind(this)),a.add("com.woltlab.wcf.redactor2",`getMetaData_${this._element.id}`,(e=>{Object.entries(this._metaData).forEach((([t,i])=>{e[t]=i}))})),a.add("com.woltlab.wcf.redactor2",`reset_${this._element.id}`,(()=>this.hideOverlay())),document.addEventListener("visibilitychange",(()=>this._onVisibilityChange()))}_onVisibilityChange(){this._isActive=!document.hidden,this._isPending=document.hidden}getInitialValue(){if(window.ENABLE_DEVELOPER_TOOLS&&!o.default._internal_.editorAutosave())return this._element.value;let e="";try{e=window.localStorage.getItem(this._key)||""}catch(e){const t=e.message;window.console.warn(`Unable to access local storage: ${t}`)}let t=null;try{t=JSON.parse(e)}catch(e){}if(null!==t&&"object"==typeof t&&t.content){if(1e3*~~this._element.dataset.autosaveLastEditTime<=t.timestamp){const e=document.createElement("div");e.innerHTML=this._element.value;const i=document.createElement("div");if(i.innerHTML=t.content,e.innerText.trim()!==i.innerText.trim())return this._originalMessage=this._element.value,this._restored=!0,this._metaData=t.meta||{},t.content}}return this._element.value}getMetaData(){return this._metaData}watch(e){if(this._editor=e,null!==this._timer)throw new Error("Autosave timer is already active.");this._timer=window.setInterval((()=>this._saveToStorage()),15e3),this._saveToStorage(),this._isPending=!1}destroy(){this.clear(),this._editor=null,this._timer&&window.clearInterval(this._timer),this._timer=null,this._isPending=!1}clear(){this._metaData={},this._lastMessage="";try{window.localStorage.removeItem(this._key)}catch(e){const t=e.message;window.console.warn(`Unable to remove from local storage: ${t}`)}}createOverlay(){if(!this._restored)return;const e=this._editor,t=document.createElement("div");t.className="redactorAutosaveRestored active";const i=document.createElement("span");i.textContent=r.get("wcf.editor.autosave.restored"),t.appendChild(i);const n=document.createElement("a");n.className="jsTooltip",n.href="#",n.title=r.get("wcf.editor.autosave.keep"),n.innerHTML='<span class="icon icon16 fa-check green"></span>',n.addEventListener("click",(e=>{e.preventDefault(),this.hideOverlay()})),t.appendChild(n);const o=document.createElement("a");o.className="jsTooltip",o.href="#",o.title=r.get("wcf.editor.autosave.discard"),o.innerHTML='<span class="icon icon16 fa-times red"></span>',o.addEventListener("click",(t=>{t.preventDefault(),this.clear();const i=s.convertFromHtml(e.core.element()[0].id,this._originalMessage);e.code.start(i),e.core.textarea().val(e.clean.onSync(e.$editor.html())),this.hideOverlay()})),t.appendChild(o),e.core.box()[0].appendChild(t),e.core.editor()[0].addEventListener("click",(()=>this.hideOverlay()),{once:!0}),this._container=t}hideOverlay(){null!==this._container&&(this._container.classList.remove("active"),window.setTimeout((()=>{null!==this._container&&this._container.remove(),this._container=null,this._originalMessage=""}),1e3))}_saveToStorage(){if(!this._isActive){if(!this._isPending)return;this._isPending=!1}if(window.ENABLE_DEVELOPER_TOOLS&&!o.default._internal_.editorAutosave())return;const e=this._editor;let t=e.code.get();if(e.utils.isEmpty(t)&&(t=""),this._lastMessage!==t){if(""===t)return this.clear();try{a.fire("com.woltlab.wcf.redactor2",`autosaveMetaData_${this._element.id}`,this._metaData),window.localStorage.setItem(this._key,JSON.stringify({content:t,meta:this._metaData,timestamp:Date.now()})),this._lastMessage=t}catch(e){const t=e.message;window.console.warn(`Unable to write to local storage: ${t}`)}}}_cleanup(){const e=Date.now()-6048e5;Object.keys(window.localStorage).filter((e=>e.startsWith(n.getStoragePrefix()))).forEach((t=>{let i="";try{i=window.localStorage.getItem(t)||""}catch(e){const t=e.message;window.console.warn(`Unable to access local storage: ${t}`)}let n=0;try{n=JSON.parse(i).timestamp}catch(e){}if(!i||n<e)try{window.localStorage.removeItem(t)}catch(e){const t=e.message;window.console.warn(`Unable to remove from local storage: ${t}`)}}))}}return n.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Redactor/PseudoHeader",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHeight=void 0,t.getHeight=function(e){let t=~~window.getComputedStyle(e).paddingTop.replace(/px$/,"");const i=window.getComputedStyle(e,"::before");t+=~~i.paddingTop.replace(/px$/,""),t+=~~i.paddingBottom.replace(/px$/,"");let n=~~i.height.replace(/px$/,"");return 0===n&&(n=e.scrollHeight,e.classList.add("redactorCalcHeight"),n-=e.scrollHeight,e.classList.remove("redactorCalcHeight")),t+=n,t}})),define("WoltLabSuite/Core/Ui/Redactor/Code",["require","exports","tslib","../../Core","../../Dom/Util","../../Event/Handler","../../Language","../../StringUtil","../Dialog","./PseudoHeader","../../prism-meta"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importDefault(d);let u=0;class h{constructor(e){this._pre=null,this._editor=e,this._elementId=this._editor.$element[0].id,a.add("com.woltlab.wcf.redactor2",`bbcode_code_${this._elementId}`,(e=>this._bbcodeCode(e))),a.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._editor.opts.activeButtonsStates.pre="code",this._callbackEdit=this._edit.bind(this),this._observeLoad()}_bbcodeCode(e){e.cancel=!0;let 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(),t&&"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("click",this._callbackEdit),this._editor.caret.end(t)))}_observeLoad(){this._editor.$editor[0].querySelectorAll("pre:not(.woltlabHtml)").forEach((e=>{e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)}))}_edit(e){const t=e.currentTarget;0===u&&(u=c.getHeight(t));const i=o.default.offset(t);e.pageY>i.top&&e.pageY<i.top+u&&(e.preventDefault(),this._editor.selection.save(),this._pre=t,l.default.open(this))}_dialogSubmit(){const e="redactor-code-"+this._elementId,t=this._pre;["file","highlighter","line"].forEach((i=>{const n=document.getElementById(`${e}-${i}`);t.dataset[i]=n.value})),this._setTitle(t),this._editor.caret.after(t),l.default.close(this)}_setTitle(e){const t=e.dataset.file;let i=e.dataset.highlighter;i=-1!==this._editor.opts.woltlab.highlighters.indexOf(i)?d.default[i].title:"";const n=r.get("wcf.editor.code.title",{file:t,highlighter:i});e.dataset.title!==n&&(e.dataset.title=n)}_delete(e){e.preventDefault();const t=this._pre;let i=t.nextElementSibling||t.previousElementSibling;null===i&&t.parentElement!==this._editor.core.editor()[0]&&(i=t.parentElement),null===i?(this._editor.code.set(""),this._editor.focus.end()):(t.remove(),this._editor.caret.end(i)),l.default.close(this)}_dialogSetup(){const e=`redactor-code-${this._elementId}`,t=`${e}-button-delete`,i=`${e}-button-save`,n=`${e}-file`,o=`${e}-highlighter`,a=`${e}-line`;return{id:e,options:{onClose:()=>{this._editor.selection.restore(),l.default.destroy(this)},onSetup:()=>{document.getElementById(t).addEventListener("click",(e=>this._delete(e)));let e=`<option value="">${r.get("wcf.editor.code.highlighter.detect")}</option>\n <option value="plain">${r.get("wcf.editor.code.highlighter.plain")}</option>`;const i=this._editor.opts.woltlab.highlighters.map((e=>[e,d.default[e].title]));i.sort(((e,t)=>e[1].localeCompare(t[1]))),e+=i.map((([e,t])=>`<option value="${e}">${s.escapeHTML(t)}</option>`)).join("\n"),document.getElementById(o).innerHTML=e},onShow:()=>{const e=this._pre;document.getElementById(o).value=e.dataset.highlighter||"";const t=~~(e.dataset.line||1);document.getElementById(a).value=t.toString();document.getElementById(n).value=e.dataset.file||""},title:r.get("wcf.editor.code.edit")},source:`<div class="section">\n <dl>\n <dt>\n <label for="${o}">${r.get("wcf.editor.code.highlighter")}</label>\n </dt>\n <dd>\n <select id="${o}"></select>\n <small>${r.get("wcf.editor.code.highlighter.description")}</small>\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="${a}">${r.get("wcf.editor.code.line")}</label>\n </dt>\n <dd>\n <input type="number" id="${a}" min="0" value="1" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.code.line.description")}</small>\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="${n}">${r.get("wcf.editor.code.file")}</label>\n </dt>\n <dd>\n <input type="text" id="${n}" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.code.file.description")}</small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button id="${i}" class="buttonPrimary" data-type="submit">${r.get("wcf.global.button.save")}</button>\n <button id="${t}">${r.get("wcf.global.button.delete")}</button>\n </div>`}}}return n.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Redactor/Editor",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Redactor/Format",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";function o(e){let t=window.getSelection().anchorNode;for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function a(e,t,i){let n=e;for(;n=n[i];)if(n.nodeType!==Node.TEXT_NODE||""!==n.textContent.replace(/\u200B/,""))return!1;return!0}function r(e,t){const i=["DEL","SUB","SUP"].find((i=>{const n=t.anchorNode;let o=n.nodeType===Node.ELEMENT_NODE?n:n.parentElement;if(!(null!==o.querySelector(i.toLowerCase())))for(;o&&o!==e;){if(o.nodeName===i)return!0;o=o.parentElement}return!1}));return"DEL"===i||void 0===i?["strike","strikethrough"]:[i.toLowerCase(),i.toLowerCase()+"script"]}function s(e,t){const i=window.getSelection();if(!i.rangeCount)return;if(!o(e))return void console.error("Invalid selection, range exists outside of the editor:",i.anchorNode);let a=i.getRangeAt(0),s=null;const l=a.collapsed;if(l){let o=a.startContainer;const r=[o];for(;;){const t=o.parentElement;if(t===e||"TD"===t.nodeName)break;o=t,r.push(o)}if(""===o.innerHTML.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/ /gi,"").replace(/<\/?br\s?\/?>/g,"").replace(/\s/g,"").replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,"").replace(/<iframe(.*?[^>])>$/i,"iframe").replace(/<source(.*?[^>])>$/i,"source").replace(/<[^/>][^>]*><\/[^>]+>/gi,"").replace(/<[^/>][^>]*><\/[^>]+>/gi,"").trim()){const e=document.createElement("woltlab-format-marker");return a.insertNode(e),r.forEach((e=>{"SPAN"===e.nodeName&&e.style.getPropertyValue(t)&&n.default.unwrapChildNodes(e)})),a=document.createRange(),a.selectNode(e),a.collapse(!0),i.removeAllRanges(),i.addRange(a),void e.remove()}s=document.createTextNode(""),a.insertNode(s)}let c=e.querySelectorAll("strike");c.forEach((e=>n.default.unwrapChildNodes(e)));const d=r(e,i);if(document.execCommand(d[1]),"strike"!==d[0]&&(c=e.querySelectorAll(d[0])),l&&null!==s&&0===c.length){document.execCommand(d[1]);const e=document.createElement(d[0]);s.parentElement.insertBefore(e,s),e.appendChild(s)}c.forEach((i=>{const o=function(e,t,i){let n=e.parentElement,o=null;for(;n!==t;)"SPAN"===n.nodeName&&""!==n.style.getPropertyValue(i)&&(o=n),n=n.parentElement;return o}(i,e,t);null!==o&&function(e,t,i){const o=t.parentElement;if(!n.default.isAtNodeStart(e,t)){const i=document.createRange();i.setStartBefore(t),i.setEndBefore(e);const n=i.extractContents();o.insertBefore(n,t)}if(!n.default.isAtNodeEnd(e,t)){const i=document.createRange();i.setStartAfter(e),i.setEndAfter(t);const n=i.extractContents();o.insertBefore(n,t.nextSibling)}t.querySelectorAll("span").forEach((e=>{e.style.getPropertyValue(i)&&n.default.unwrapChildNodes(e)})),n.default.unwrapChildNodes(t)}(i,o,t),i.querySelectorAll("span").forEach((e=>{e.style.getPropertyValue(t)&&n.default.unwrapChildNodes(e)})),n.default.unwrapChildNodes(i)})),e.querySelectorAll("span").forEach((e=>{e.parentNode&&!e.textContent.length&&""!==e.style.getPropertyValue(t)&&(1===e.childElementCount&&"MARK"===e.children[0].nodeName&&e.parentNode.insertBefore(e.children[0],e),0===e.childElementCount&&e.remove())}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeFormat=t.format=void 0,n=i.__importDefault(n),t.format=function(e,t,i){const l=window.getSelection();if(!l.rangeCount)return;if(!o(e))return void console.error("Invalid selection, range exists outside of the editor:",l.anchorNode);let c=l.getRangeAt(0),d=null,u=null,h=null;if(c.collapsed)h=document.createElement("strike"),h.textContent="",c.insertNode(h),c=document.createRange(),c.selectNodeContents(h),l.removeAllRanges(),l.addRange(c);else{d=document.createElement("mark"),u=document.createElement("mark");let i=c.cloneRange();i.collapse(!0),i.insertNode(d),i=c.cloneRange(),i.collapse(!1),i.insertNode(u),c=document.createRange(),c.setStartAfter(d),c.setEndBefore(u),l.removeAllRanges(),l.addRange(c),s(e,t),c=document.createRange(),c.setStartAfter(d),c.setEndBefore(u),l.removeAllRanges(),l.addRange(c)}let p=["strike","strikethrough"];null===h&&(p=r(e,l),document.execCommand(p[1]));const m=[];e.querySelectorAll(p[0]).forEach((e=>{const o=document.createElement("span");o.setAttribute("style",`${t}: ${i}`),n.default.replaceElement(e,o),m.push(o)}));const f=m.length;if(f){const e=m[0],i=m[f-1];if(null===h&&e.parentElement===i.parentElement){const o=e.parentElement;"SPAN"===o.nodeName&&""!==o.style.getPropertyValue(t)&&a(e,0,"previousSibling")&&a(i,0,"nextSibling")&&n.default.unwrapChildNodes(o)}c=document.createRange(),c.setStart(e,0),c.setEnd(i,i.childNodes.length),l.removeAllRanges(),l.addRange(c)}null!==d&&(d.remove(),u.remove())},t.removeFormat=s})),define("WoltLabSuite/Core/Ui/Redactor/Html",["require","exports","tslib","../../Core","../../Event/Handler","../../Language"],(function(e,t,i,n,o,a){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a);class r{constructor(e){this._pre=null,this._editor=e,this._elementId=this._editor.$element[0].id,o.add("com.woltlab.wcf.redactor2",`bbcode_woltlabHtml_${this._elementId}`,(e=>this._bbcodeCode(e))),o.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._editor.opts.activeButtonsStates["woltlab-html"]="woltlabHtml",this._observeLoad()}_bbcodeCode(e){e.cancel=!0;let 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(),t&&"PRE"===t.nodeName&&(t.classList.add("woltlabHtml"),1===t.childElementCount&&"BR"===t.children[0].nodeName&&t.removeChild(t.children[0]),this._setTitle(t),this._editor.caret.end(t)))}_observeLoad(){this._editor.$editor[0].querySelectorAll("pre.woltlabHtml").forEach((e=>{this._setTitle(e)}))}_setTitle(e){["title","description"].forEach((t=>{const i=a.get(`wcf.editor.html.${t}`);e.dataset[t]!==i&&(e.dataset[t]=i)}))}}return n.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/Redactor/Link",["require","exports","tslib","../../Dom/Util","../../Language","../Dialog"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showDialog=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a);class r{constructor(){this.boundListener=!1}open(e){a.default.open(this),a.default.setTitle(this,o.get("wcf.editor.link."+(e.insert?"add":"edit")));const t=document.getElementById("redactor-modal-button-action");t.textContent=o.get("wcf.global.button."+(e.insert?"insert":"save")),this.submitCallback=e.submitCallback,this.boundListener||(this.boundListener=!0,t.addEventListener("click",(()=>this.submit())))}submit(){if(this.submitCallback())a.default.close(this);else{const e=document.getElementById("redactor-link-url"),t=""===e.value.trim()?"wcf.global.form.error.empty":"wcf.editor.link.error.invalid";n.default.innerError(e,o.get(t))}}_dialogSetup(){return{id:"redactorDialogLink",options:{onClose:()=>{const e=document.getElementById("redactor-link-url").nextElementSibling;e&&"SMALL"===e.nodeName&&e.remove()},onSetup:e=>{const t=e.querySelector(".formSubmit > .buttonPrimary");null!==t&&e.querySelectorAll('input[type="url"], input[type="text"]').forEach((e=>{e.addEventListener("keyup",(e=>{"Enter"===e.key&&t.click()}))}))},onShow:()=>{document.getElementById("redactor-link-url").focus()}},source:`<dl>\n <dt>\n <label for="redactor-link-url">${o.get("wcf.editor.link.url")}</label>\n </dt>\n <dd>\n <input type="url" id="redactor-link-url" class="long">\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="redactor-link-url-text">${o.get("wcf.editor.link.text")}</label>\n </dt>\n <dd>\n <input type="text" id="redactor-link-url-text" class="long">\n </dd>\n </dl>\n <div class="formSubmit">\n <button id="redactor-modal-button-action" class="buttonPrimary"></button>\n </div>`}}}let s;t.showDialog=function(e){s||(s=new r),s.open(e)}})),define("WoltLabSuite/Core/Ui/Redactor/Mention",["require","exports","tslib","../../Ajax","../../Core","../../StringUtil","../CloseOverlay"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);let s=null;class l{constructor(e){this._active=!1,this._dropdownActive=!1,this._dropdownMenu=null,this._itemIndex=0,this._lineHeight=null,this._mentionStart="",this._timer=null,this._redactor=e,e.WoltLabEvent.register("keydown",(e=>this._keyDown(e))),e.WoltLabEvent.register("keyup",(e=>this._keyUp(e))),r.default.add(`UiRedactorMention-${e.core.element()[0].id}`,(()=>this._hideDropdown()))}_keyDown(e){if(!this._dropdownActive)return;const t=e.event;switch(t.key){case"Enter":this._setUsername(null,this._dropdownMenu.children[this._itemIndex].children[0]);break;case"ArrowUp":this._selectItem(-1);break;case"ArrowDown":this._selectItem(1);break;default:return void this._hideDropdown()}t.preventDefault(),e.cancel=!0}_keyUp(e){const t=e.event;if("Enter"===t.key)return void(this._active=!1);if(this._dropdownActive&&(e.cancel=!0,"ArrowDown"===t.key||"ArrowUp"===t.key))return;const i=this._getTextLineInFrontOfCaret();if(i.length>0&&i.length<25){const e=/@([^,]{3,})$/.exec(i);e?e.index&&!/\s/.test(i[e.index-1])||(this._mentionStart=e[1],null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._timer=window.setTimeout((()=>{n.api(this,{parameters:{data:{searchString:this._mentionStart}}}),this._timer=null}),500)):this._hideDropdown()}else this._hideDropdown()}_getTextLineInFrontOfCaret(){const e=this._selectMention(!1);return null!==e?e.range.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g," ").trim():""}_getDropdownMenuPosition(){const e=this._selectMention();if(null===e)return null;this._redactor.selection.save(),e.selection.removeAllRanges(),e.selection.addRange(e.range);const 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(e,t){e&&(e.preventDefault(),t=e.currentTarget);const i=this._selectMention();if(null===i)return void this._hideDropdown();this._redactor.buffer.set(),i.selection.removeAllRanges(),i.selection.addRange(i.range);let n=window.getSelection().getRangeAt(0);n.deleteContents(),n.collapse(!0);let o=t.dataset.username.trim();o.split(/\s/g).length>2&&(o="'"+o.replace(/'/g,"''")+"'");const a=document.createTextNode("@"+o+" ");n.insertNode(a),n=document.createRange(),n.selectNode(a),n.collapse(!1),i.selection.removeAllRanges(),i.selection.addRange(n),this._hideDropdown()}_selectMention(e){const t=window.getSelection();if(!t.rangeCount||!t.isCollapsed)return null;let i=t.anchorNode;if(i.nodeType===Node.TEXT_NODE&&(i=i.parentElement),-1===i.textContent.indexOf("@"))return null;const n=this._redactor.core.editor()[0];for(;i&&i!==n;){if(-1!==["PRE","WOLTLAB-QUOTE"].indexOf(i.nodeName))return null;i=i.parentElement}let o=t.getRangeAt(0),a=o.startContainer,r=o.startOffset;for(;a.nodeType===Node.ELEMENT_NODE;){if(0===r&&0===a.childNodes.length)return null;a=a.childNodes[r?r-1:0],r>0&&(r=a.nodeType===Node.TEXT_NODE?a.textContent.length:a.childNodes.length)}let s=a,l=-1;for(;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{o=document.createRange(),o.setStart(s,l),o.setEnd(a,r)}catch(e){return window.console.debug(e),null}if(!1===e){let e="";for(l&&(e=s.textContent.substr(0,l));(s=s.previousSibling)&&s.nodeType===Node.TEXT_NODE;)e=s.textContent+e;if(/\S$/.test(e.replace(/\u200B/g,"")))return null}else if(o.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g,"").trim().replace(/^@/,"")!==this._mentionStart)return null;return{range:o,selection:t}}_updateDropdownPosition(){const e=this._getDropdownMenuPosition();if(null===e)return void this._hideDropdown();e.top+=7;const t=this._dropdownMenu;if(t.style.setProperty("left",`${e.left}px`,""),t.style.setProperty("top",`${e.top}px`,""),this._selectItem(0),e.top+t.offsetHeight+10>window.innerHeight+(window.scrollY||window.pageYOffset)){const i=e.top-t.offsetHeight-2*this._lineHeight+7;t.style.setProperty("top",`${i}px`,"")}}_selectItem(e){const t=this._dropdownMenu,i=t.querySelector(".active");null!==i&&i.classList.remove("active"),this._itemIndex+=e,this._itemIndex<0?this._itemIndex=t.childElementCount-1:this._itemIndex>=t.childElementCount&&(this._itemIndex=0),t.children[this._itemIndex].classList.add("active")}_hideDropdown(){null!==this._dropdownMenu&&this._dropdownMenu.classList.remove("dropdownOpen"),this._dropdownActive=!1,this._itemIndex=0}_ajaxSetup(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\user\\UserAction",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{includeUserGroups:!0,scope:"mention"}}},silent:!0}}_ajaxSuccess(e){Array.isArray(e.returnValues)&&e.returnValues.length?(null===this._dropdownMenu&&(this._dropdownMenu=document.createElement("ol"),this._dropdownMenu.className="dropdownMenu",null===s&&(s=document.createElement("div"),s.className="dropdownMenuContainer",document.body.appendChild(s)),s.appendChild(this._dropdownMenu)),this._dropdownMenu.innerHTML="",e.returnValues.forEach((e=>{const t=document.createElement("li"),i=document.createElement("a");i.addEventListener("mousedown",(e=>this._setUsername(e))),i.className="box16",i.innerHTML=`<span>${e.icon}</span> <span>${a.escapeHTML(e.label)}</span>`,i.dataset.userId=e.objectID.toString(),i.dataset.username=e.label,t.appendChild(i),this._dropdownMenu.appendChild(t)})),this._dropdownMenu.classList.add("dropdownOpen"),this._dropdownActive=!0,this._updateDropdownPosition()):this._hideDropdown()}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/Redactor/Page",["require","exports","tslib","../../Core","../Page/Search"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this._editor=e,t.addEventListener("click",(e=>this._click(e)))}_click(e){e.preventDefault(),o.open((e=>this._insert(e)))}_insert(e){this._editor.buffer.set(),this._editor.insert.text(`[wsp='${e}'][/wsp]`)}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Redactor/Quote",["require","exports","tslib","../../Core","../../Dom/Util","../../Event/Handler","../../Language","../../StringUtil","../Dialog","./Metacode","./PseudoHeader"],(function(e,t,i,n,o,a,r,s,l,c,d){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c),d=i.__importStar(d);let u=0;class h{constructor(e,t){this._quote=null,this._editor=e,this._elementId=this._editor.$element[0].id,a.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._editor.button.addCallback(t,this._click.bind(this)),this._observeLoad(),a.add("com.woltlab.wcf.redactor2",`insertQuote_${this._elementId}`,(e=>this._insertQuote(e)))}_insertQuote(e){if(this._editor.WoltLabSource.isActive())return;a.fire("com.woltlab.wcf.redactor2","showEditor");const t=this._editor.core.editor()[0];this._editor.selection.restore(),this._editor.buffer.set();let i=this._editor.selection.block();for(!1===i&&(this._editor.focus.end(),i=this._editor.selection.block());i&&i.parentElement!==t;)i=i.parentElement;const n=document.createElement("woltlab-quote");n.dataset.author=e.author,n.dataset.link=e.link;let o=e.content;e.isText?(o=s.escapeHTML(o),o=`<p>${o}</p>`,o=o.replace(/\n\n/g,"</p><p>"),o=o.replace(/\n/g,"<br>")):o=c.convertFromHtml(this._editor.$element[0].id,o),n.innerHTML=o;const r=i.parentElement;r.insertBefore(n,i.nextSibling),"P"!==i.nodeName||"<br>"!==i.innerHTML&&""!==i.innerHTML.replace(/\u200B/g,"")||r.removeChild(i);let l=n.previousElementSibling;l&&"P"!==l.nodeName&&(l=document.createElement("p"),l.textContent="",n.insertAdjacentElement("beforebegin",l)),this._editor.WoltLabCaret.paragraphAfterBlock(n),this._editor.buffer.set()}_click(){this._editor.button.toggle({},"woltlab-quote","func","block.format");const e=this._editor.selection.block();e&&"WOLTLAB-QUOTE"===e.nodeName&&(this._setTitle(e),e.addEventListener("click",(e=>this._edit(e))),this._editor.caret.end(e))}_observeLoad(){document.querySelectorAll("woltlab-quote").forEach((e=>{e.addEventListener("mousedown",(e=>this._edit(e))),this._setTitle(e)}))}_edit(e){const t=e.currentTarget;0===u&&(u=d.getHeight(t));const i=o.default.offset(t);e.pageY>i.top&&e.pageY<i.top+u&&(e.preventDefault(),this._editor.selection.save(),this._quote=t,l.default.open(this))}_dialogSubmit(){const e=`redactor-quote-${this._elementId}`,t=document.getElementById(`${e}-url`),i=t.value.replace(/\u200B/g,"").trim();if(i.length&&!/^https?:\/\/[^/]+/.test(i))return void o.default.innerError(t,r.get("wcf.editor.quote.url.error.invalid"));o.default.innerError(t,!1);const n=this._quote,a=document.getElementById(e+"-author");n.dataset.author=a.value,n.dataset.link=i,this._setTitle(n),this._editor.caret.after(n),l.default.close(this)}_setTitle(e){const t=r.get("wcf.editor.quote.title",{author:e.dataset.author,url:e.dataset.url});e.dataset.title!==t&&(e.dataset.title=t)}_delete(e){e.preventDefault();const t=this._quote;let i=t.nextElementSibling||t.previousElementSibling;null===i&&t.parentElement!==this._editor.core.editor()[0]&&(i=t.parentElement),null===i?(this._editor.code.set(""),this._editor.focus.end()):(t.remove(),this._editor.caret.end(i)),l.default.close(this)}_dialogSetup(){const e=`redactor-quote-${this._elementId}`,t=`${e}-author`,i=`${e}-button-delete`,n=`${e}-button-save`,o=`${e}-url`;return{id:e,options:{onClose:()=>{this._editor.selection.restore(),l.default.destroy(this)},onSetup:()=>{document.getElementById(i).addEventListener("click",(e=>this._delete(e)))},onShow:()=>{document.getElementById(t).value=this._quote.dataset.author||"";document.getElementById(o).value=this._quote.dataset.link||""},title:r.get("wcf.editor.quote.edit")},source:`<div class="section">\n <dl>\n <dt>\n <label for="${t}">${r.get("wcf.editor.quote.author")}</label>\n </dt>\n <dd>\n <input type="text" id="${t}" class="long" data-dialog-submit-on-enter="true">\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="${o}">${r.get("wcf.editor.quote.url")}</label>\n </dt>\n <dd>\n <input type="text" id="${o}" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.quote.url.description")}</small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button id="${n}" class="buttonPrimary" data-type="submit">${r.get("wcf.global.button.save")}</button>\n <button id="${i}">${r.get("wcf.global.button.delete")}</button>\n </div>`}}}return n.enableLegacyInheritance(h),h})),define("WoltLabSuite/Core/Ui/Redactor/Spoiler",["require","exports","tslib","../../Core","../../Dom/Util","../../Event/Handler","../../Language","../Dialog","./PseudoHeader"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importStar(l);let c=0;class d{constructor(e){this._spoiler=null,this._editor=e,this._elementId=this._editor.$element[0].id,a.add("com.woltlab.wcf.redactor2",`bbcode_spoiler_${this._elementId}`,(e=>this._bbcodeSpoiler(e))),a.add("com.woltlab.wcf.redactor2",`observe_load_${this._elementId}`,(()=>this._observeLoad())),this._observeLoad()}_bbcodeSpoiler(e){e.cancel=!0,this._editor.button.toggle({},"woltlab-spoiler","func","block.format");let t=this._editor.selection.block();t&&("P"===t.nodeName&&(t=t.parentElement),"WOLTLAB-SPOILER"===t.nodeName&&(this._setTitle(t),t.addEventListener("click",(e=>this._edit(e))),this._editor.caret.end(t)))}_observeLoad(){this._editor.$editor[0].querySelectorAll("woltlab-spoiler").forEach((e=>{e.addEventListener("mousedown",(e=>this._edit(e))),this._setTitle(e)}))}_edit(e){const t=e.currentTarget;0===c&&(c=l.getHeight(t));const i=o.default.offset(t);e.pageY>i.top&&e.pageY<i.top+c&&(e.preventDefault(),this._editor.selection.save(),this._spoiler=t,s.default.open(this))}_dialogSubmit(){const e=this._spoiler,t=document.getElementById("redactor-spoiler-"+this._elementId+"-label");e.dataset.label=t.value,this._setTitle(e),this._editor.caret.after(e),s.default.close(this)}_setTitle(e){const t=r.get("wcf.editor.spoiler.title",{label:e.dataset.label||""});e.dataset.title!==t&&(e.dataset.title=t)}_delete(e){e.preventDefault();const t=this._spoiler;let i=t.nextElementSibling||t.previousElementSibling;null===i&&t.parentElement!==this._editor.core.editor()[0]&&(i=t.parentElement),null===i?(this._editor.code.set(""),this._editor.focus.end()):(t.remove(),this._editor.caret.end(i)),s.default.close(this)}_dialogSetup(){const e=`redactor-spoiler-${this._elementId}`,t=`${e}-button-delete`,i=`${e}-button-save`,n=`${e}-label`;return{id:e,options:{onClose:()=>{this._editor.selection.restore(),s.default.destroy(this)},onSetup:()=>{document.getElementById(t).addEventListener("click",(e=>this._delete(e)))},onShow:()=>{document.getElementById(n).value=this._spoiler.dataset.label||""},title:r.get("wcf.editor.spoiler.edit")},source:`<div class="section">\n <dl>\n <dt>\n <label for="${n}">${r.get("wcf.editor.spoiler.label")}</label>\n </dt>\n <dd>\n <input type="text" id="${n}" class="long" data-dialog-submit-on-enter="true">\n <small>${r.get("wcf.editor.spoiler.label.description")}</small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button id="${i}" class="buttonPrimary" data-type="submit">${r.get("wcf.global.button.save")}</button>\n <button id="${t}">${r.get("wcf.global.button.delete")}</button>\n </div>`}}}return n.enableLegacyInheritance(d),d})),define("WoltLabSuite/Core/Ui/Redactor/Table",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showDialog=void 0,n=i.__importStar(n),o=i.__importDefault(o);class a{open(e){o.default.open(this),this.callbackSubmit=e.submitCallback}_dialogSubmit(){let e=!0;["rows","cols"].forEach((t=>{const i=document.getElementById("redactor-table-"+t);(+i.value<1||+i.value>100)&&(e=!1)})),e&&(this.callbackSubmit(),o.default.close(this))}_dialogSetup(){return{id:"redactorDialogTable",options:{onShow:()=>{document.getElementById("redactor-table-rows").value="2";document.getElementById("redactor-table-cols").value="3"},title:n.get("wcf.editor.table.insertTable")},source:`<dl>\n <dt>\n <label for="redactor-table-rows">${n.get("wcf.editor.table.rows")}</label>\n </dt>\n <dd>\n <input type="number" id="redactor-table-rows" class="small" min="1" max="100" value="2" data-dialog-submit-on-enter="true">\n </dd>\n </dl>\n <dl>\n <dt>\n <label for="redactor-table-cols">${n.get("wcf.editor.table.cols")}</label>\n </dt>\n <dd>\n <input type="number" id="redactor-table-cols" class="small" min="1" max="100" value="3" data-dialog-submit-on-enter="true">\n </dd>\n </dl>\n <div class="formSubmit">\n <button id="redactor-modal-button-action" class="buttonPrimary" data-type="submit">${n.get("wcf.global.button.insert")}</button>\n </div>`}}}let r;t.showDialog=function(e){r||(r=new a),r.open(e)}})),define("WoltLabSuite/Core/Ui/Search/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Search/Page",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Dom/Util","../Dropdown/Simple","../Screen","./Input"],(function(e,t,i,n,o,a,r,s,l){"use strict";function c(e){e.preventDefault();const t=document.getElementById("pageHeader");t.classList.add("searchBarForceOpen"),window.setTimeout((()=>{t.classList.remove("searchBarForceOpen")}),10);const i=e.currentTarget,o=i.dataset.objectType,a=document.getElementById("pageHeaderSearchParameters");a.innerHTML="";const r=i.dataset.extendedLink;if(r){document.querySelector(".pageHeaderSearchExtendedLink").href=r}const s=new Map;try{const e=JSON.parse(i.dataset.parameters||"");n.isPlainObject(e)&&Object.keys(e).forEach((t=>{s.set(t,e[t])}))}catch(e){}o&&s.set("types[]",o),s.forEach(((e,t)=>{const i=document.createElement("input");i.type="hidden",i.name=t,i.value=e,a.appendChild(i)}));document.getElementById("pageHeaderSearchInputContainer").querySelector(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").textContent=i.textContent}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s),l=i.__importDefault(l),t.init=function(e){const t=document.getElementById("pageHeaderSearchInput");new l.default(t,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit(e){if(e.classList.add("dropdownMenuPageSearch"),s.is("screen-lg")){e.dataset.dropdownAlignmentHorizontal="right";const i=t.clientWidth;e.style.setProperty("min-width",`${i}px`,"");const n=t.parentElement,o=a.default.offset(n).left+n.clientWidth-(a.default.offset(t).left+i),r=a.default.styleAsInt(window.getComputedStyle(n),"padding-bottom");e.style.setProperty("transform",`translateX(-${Math.ceil(o)}px) translateY(-${r}px)`,"")}},callbackSelect:()=>(setTimeout((()=>{o.parentByTag(t,"FORM").submit()}),1),!0)});const i=document.querySelector(".pageHeaderSearchType"),n=r.default.getDropdownMenu(a.default.identify(i));n.querySelectorAll("a[data-object-type]").forEach((e=>{e.addEventListener("click",c)})),n.querySelector('a[data-object-type="'+e+'"]').click()}})),define("WoltLabSuite/Core/Ui/Smiley/Insert",["require","exports","tslib","../../Core","../../Event/Handler"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e){this.editorId=e;let t=document.getElementById("smilies-"+this.editorId);if(!t&&(t=document.getElementById(this.editorId+"SmiliesTabContainer"),!t))throw new Error("Unable to find the message tab menu container containing the smilies.");this.container=t,this.container.addEventListener("keydown",(e=>this.keydown(e))),this.container.addEventListener("mousedown",(e=>this.mousedown(e)))}keydown(e){const t=document.activeElement;if(t.classList.contains("jsSmiley"))if(["ArrowLeft","ArrowRight","End","Home"].includes(e.key)){e.preventDefault();const i=e.currentTarget,n=Array.from(i.querySelectorAll(".jsSmiley"));"ArrowLeft"===e.key&&n.reverse();let o=n.indexOf(t);"Home"===e.key?o=0:"End"===e.key?o=n.length-1:(o+=1,o===n.length&&(o=0)),n[o].focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();const i=t.querySelector("img");this.insert(i)}}mousedown(e){const t=e.target.closest("li");if(t&&this.container.contains(t)){e.preventDefault();const i=t.querySelector("img");i&&this.insert(i)}}insert(e){o.fire("com.woltlab.wcf.redactor2","insertSmiley_"+this.editorId,{img:e})}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["require","exports","tslib","../../Language","../Dialog","../ItemList/Filter"],(function(e,t,i,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a);class r{constructor(e){this.callback=void 0,this.iconList=void 0,this.itemListFilter=void 0,this.icons=e}open(e){this.callback=e,o.default.open(this)}click(e){e.preventDefault();const t=e.target.closest("li").querySelector("small").textContent.trim();o.default.close(this),this.callback(t)}_dialogSetup(){return{id:"fontAwesomeSelection",options:{onSetup:()=>{this.iconList=document.getElementById("fontAwesomeIcons"),this.iconList.innerHTML=this.icons.map((e=>`<li><span class="icon icon48 fa-${e}"></span><small>${e}</small></li>`)).join(""),this.iconList.addEventListener("click",(e=>this.click(e))),this.itemListFilter=new a.default("fontAwesomeIcons",{callbackPrepareItem:e=>{const t=e.querySelector("small"),i=t.textContent.trim();return{item:e,span:t,text:i}},enableVisibilityFilter:!1,filterPosition:"top"})},onShow:()=>{this.itemListFilter.reset()},title:n.get("wcf.global.fontAwesome.selectIcon")},source:'<ul class="fontAwesomeIcons" id="fontAwesomeIcons"></ul>'}}}let s;t.setup=function(e){s||(s=new r(e))},t.open=function(e){if(!s)throw new Error("Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`.");s.open(e)}})),define("WoltLabSuite/Core/Ui/Toggle/Input",["require","exports","tslib","../../Core","../../Dom/Util"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class a{constructor(e,t){const i=document.querySelector(e);if(null===i)throw new Error("Unable to find element by selector '"+e+"'.");const n="INPUT"===i.nodeName?i.type:"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this.element=i,this.hide=this.getElements("hide",Array.isArray(t.hide)?t.hide:[]),this.hide=this.getElements("show",Array.isArray(t.show)?t.show:[]),this.element.addEventListener("change",(e=>this.change(e))),this.updateVisibility(this.show,this.element.checked),this.updateVisibility(this.hide,!this.element.checked)}getElements(e,t){const i=[];return t.forEach((t=>{let n=null;if("string"==typeof t){if(n=document.querySelector(t),null===n)throw new Error(`Unable to find an element with the selector '${t}'.`)}else{if(!(t instanceof HTMLElement))throw new TypeError(`The array '${e}' may only contain string selectors or DOM elements.`);n=t}i.push(n)})),i}change(e){const t=e.currentTarget.checked;this.updateVisibility(this.show,t),this.updateVisibility(this.hide,!t)}updateVisibility(e,t){e.forEach((e=>{o.default[t?"show":"hide"](e)}))}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/User/Editor",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../../Language","../../StringUtil","../Dialog","../Notification"],(function(e,t,i,n,o,a,r,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importStar(c);class d{constructor(){this.actionName="",this.header=document.querySelector(".userProfileUser"),["ban","disableAvatar","disableCoverPhoto","disableSignature","enable"].forEach((e=>{const t=document.querySelector(".userProfileButtonMenu .jsButtonUser"+s.ucfirst(e));t&&(t.dataset.action=e,t.addEventListener("click",(e=>this._click(e))))}))}_click(e){e.preventDefault();const t=e.currentTarget.dataset.action||"";let i="";switch(t){case"ban":o.stringToBool(this.header.dataset.banned||"")&&(i="unban");break;case"disableAvatar":o.stringToBool(this.header.dataset.disableAvatar||"")&&(i="enableAvatar");break;case"disableCoverPhoto":o.stringToBool(this.header.dataset.disableCoverPhoto||"")&&(i="enableCoverPhoto");break;case"disableSignature":o.stringToBool(this.header.dataset.disableSignature||"")&&(i="enableSignature");break;case"enable":i=o.stringToBool(this.header.dataset.isDisabled||"")?"enable":"disable"}""===i?(this.actionName=t,l.default.open(this)):n.api(this,{actionName:i})}_submit(e){e.preventDefault();const t=document.getElementById("wcfUiUserEditorExpiresLabel");let i="",o="";if(!document.getElementById("wcfUiUserEditorNeverExpires").checked){i=document.getElementById("wcfUiUserEditorExpiresDatePicker").value,""===i&&(o=r.get("wcf.global.form.error.empty"))}a.default.innerError(t,o);const s={};s[this.actionName+"Expires"]=i;const l=document.getElementById("wcfUiUserEditorReason");s[this.actionName+"Reason"]=l.value.trim(),n.api(this,{actionName:this.actionName,parameters:s})}_ajaxSuccess(e){let t;switch(e.actionName){case"ban":case"unban":{this.header.dataset.banned="ban"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserBan"),t.textContent=r.get("wcf.user."+("ban"===e.actionName?"unban":"ban"));const i=this.header.querySelector(".contentTitle");let n=i.querySelector(".jsUserBanned");"ban"===e.actionName?(n=document.createElement("span"),n.className="icon icon24 fa-lock jsUserBanned jsTooltip",n.title=e.returnValues,i.appendChild(n)):n&&n.remove();break}case"disableAvatar":case"enableAvatar":this.header.dataset.disableAvatar="disableAvatar"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserDisableAvatar"),t.textContent=r.get("wcf.user."+("disableAvatar"===e.actionName?"enable":"disable")+"Avatar");break;case"disableCoverPhoto":case"enableCoverPhoto":this.header.dataset.disableCoverPhoto="disableCoverPhoto"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserDisableCoverPhoto"),t.textContent=r.get("wcf.user."+("disableCoverPhoto"===e.actionName?"enable":"disable")+"CoverPhoto");break;case"disableSignature":case"enableSignature":this.header.dataset.disableSignature="disableSignature"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserDisableSignature"),t.textContent=r.get("wcf.user."+("disableSignature"===e.actionName?"enable":"disable")+"Signature");break;case"enable":case"disable":this.header.dataset.isDisabled="disable"===e.actionName?"true":"false",t=document.querySelector(".userProfileButtonMenu .jsButtonUserEnable"),t.textContent=r.get("wcf.acp.user."+("enable"===e.actionName?"disable":"enable"))}-1!==["ban","disableAvatar","disableCoverPhoto","disableSignature"].indexOf(e.actionName)&&l.default.close(this),c.show()}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\UserAction",objectIDs:[+this.header.dataset.objectId]}}}_dialogSetup(){return{id:"wcfUiUserEditor",options:{onSetup:e=>{const t=document.getElementById("wcfUiUserEditorNeverExpires");t.addEventListener("change",(()=>{const e=document.getElementById("wcfUiUserEditorExpiresSettings");a.default[t.checked?"hide":"show"](e)}));e.querySelector("button.buttonPrimary").addEventListener("click",this._submit.bind(this))},onShow:e=>{l.default.setTitle("wcfUiUserEditor",r.get("wcf.user."+this.actionName+".confirmMessage"));let t=document.getElementById("wcfUiUserEditorReason").nextElementSibling;const i="wcf.user."+this.actionName+".reason.description";t.textContent=r.get(i),t.textContent===i?a.default.hide(t):a.default.show(t),t=document.getElementById("wcfUiUserEditorNeverExpires").nextElementSibling,t.textContent=r.get("wcf.user."+this.actionName+".neverExpires"),t=e.querySelector('label[for="wcfUiUserEditorExpires"]'),t.textContent=r.get("wcf.user."+this.actionName+".expires"),t=document.getElementById("wcfUiUserEditorExpiresLabel"),t.textContent=r.get("wcf.user."+this.actionName+".expires.description")}},source:`<div class="section">\n <dl>\n <dt><label for="wcfUiUserEditorReason">${r.get("wcf.global.reason")}</label></dt>\n <dd><textarea id="wcfUiUserEditorReason" cols="40" rows="3"></textarea><small></small></dd>\n </dl>\n <dl>\n <dt></dt>\n <dd><label><input type="checkbox" id="wcfUiUserEditorNeverExpires" checked> <span></span></label></dd>\n </dl>\n <dl id="wcfUiUserEditorExpiresSettings" style="display: none">\n <dt><label for="wcfUiUserEditorExpires"></label></dt>\n <dd>\n <input type="date" name="wcfUiUserEditorExpires" id="wcfUiUserEditorExpires" class="medium" min="${new Date(1e3*window.TIME_NOW).toISOString()}" data-ignore-timezone="true">\n <small id="wcfUiUserEditorExpiresLabel"></small>\n </dd>\n </dl>\n </div>\n <div class="formSubmit">\n <button class="buttonPrimary">${r.get("wcf.global.button.submit")}</button>\n </div>`}}}t.init=function(){new d}})),define("WoltLabSuite/Core/Ui/User/List",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dialog","../Pagination"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(e){this.cache=new Map,this.pageCount=0,this.pageNo=1,this.options=o.extend({className:"",dialogTitle:"",parameters:{}},e)}open(){this.pageNo=1,this.showPage()}showPage(e){if("number"==typeof e&&(this.pageNo=+e),0!==this.pageCount&&(this.pageNo<1||this.pageNo>this.pageCount))throw new RangeError(`pageNo must be between 1 and ${this.pageCount} (${this.pageNo} given).`);if(this.cache.has(this.pageNo)){const e=r.default.open(this,this.cache.get(this.pageNo));if(this.pageCount>1){const t=e.content.querySelector(".jsPagination");null!==t&&new s.default(t,{activePage:this.pageNo,maxPage:this.pageCount,callbackSwitch:this.showPage.bind(this)});const i=e.content.parentElement;i.scrollTop>0&&(i.scrollTop=0)}}else this.options.parameters.pageNo=this.pageNo,n.api(this,{parameters:this.options.parameters})}_ajaxSuccess(e){void 0!==e.returnValues.pageCount&&(this.pageCount=~~e.returnValues.pageCount),this.cache.set(this.pageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserList",className:this.options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}}_dialogSetup(){return{id:a.default.getUniqueId(),options:{title:this.options.dialogTitle},source:null}}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/User/PasswordStrength",["require","exports","tslib","../../Language","../../Dom/Util"],(function(e,t,i,n,o){"use strict";function a(e){return[].concat(e,e.split(/\W+/))}var r;n=i.__importStar(n),o=i.__importDefault(o);const s=[],l=null===(r=document.querySelector('meta[property="og:site_name"]'))||void 0===r?void 0:r.getAttribute("content");l&&s.push(l);return class{constructor(t,o){this.input=t,this.score=document.createElement("span"),this.verdictResult=document.createElement("input"),new Promise(((t,i)=>{e(["zxcvbn"],t,i)})).then(i.__importStar).then((({default:e})=>{this.zxcvbn=e,o.relatedInputs&&(this.relatedInputs=o.relatedInputs),o.staticDictionary&&(this.staticDictionary=o.staticDictionary),this.feedbacker=function(e){const t={};return Object.entries(e.default_phrases).forEach((([e,i])=>{t[e]={},Object.entries(i).forEach((([i,o])=>{const a=`wcf.user.password.zxcvbn.${e}.${i}`,r=n.get(a);t[e][i]=r!==a?r:o}))})),new e(t)}(e.Feedback);const t=this.input.closest(".inputAddon");if(null===t)throw new Error("Expected a parent with `.inputAddon`.");this.wrapper=t,this.wrapper.classList.add("inputAddonPasswordStrength");const i=document.createElement("div");i.className="passwordStrengthRating";const a=document.createElement("small");a.textContent=n.get("wcf.user.password.strength"),i.appendChild(a),this.score.className="passwordStrengthScore",this.score.dataset.score="-1",i.appendChild(this.score),this.wrapper.appendChild(i),this.verdictResult.type="hidden",this.verdictResult.name=`${this.input.name}_passwordStrengthVerdict`,this.wrapper.parentNode.insertBefore(this.verdictResult,this.wrapper),this.input.addEventListener("input",(e=>this.evaluate(e))),this.relatedInputs.forEach((e=>e.addEventListener("input",(e=>this.evaluate(e))))),""!==this.input.value.trim()&&this.evaluate()}))}evaluate(e){const t=(i=s.concat(this.staticDictionary,this.relatedInputs.map((e=>e.value.trim()))),n=a,i.map(n).reduce(((e,t)=>e.concat(t)),[])).filter((e=>e.length>0));var i,n;const r=this.input.value.trim(),l=this.zxcvbn(r.substr(0,100),t);l.feedback=this.feedbacker.from_result(l),this.score.dataset.score=0===r.length?"-1":l.score.toString(),void 0!==e&&o.default.innerError(this.wrapper,l.feedback.warning),this.verdictResult.value=JSON.stringify(l)}}})),define("WoltLabSuite/Core/Controller/Condition/Page/Dependence",["require","exports","tslib","../../../Dom/Util","../../../Event/Handler"],(function(e,t,i,n,o){"use strict";function a(){s.forEach((e=>{const t=l.get(e),i=[];r.forEach((e=>{e.checked&&i.push(~~e.value)}));const o=i.filter((e=>t.includes(e)));!i.length||o.length?function(e){n.default.hide(e);c.get(e).forEach((e=>n.default.hide(e))),c.set(e,[])}(e):function(e){n.default.show(e);let t=e;for(;(t=t.parentElement)&&t;)n.default.isHidden(t)&&c.get(e).push(t),n.default.show(t)}(e)})),o.fire("com.woltlab.wcf.pageConditionDependence","checkVisivility")}Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0,n=i.__importDefault(n),o=i.__importStar(o);const r=Array.from(document.querySelectorAll('input[name="pageIDs[]"]')),s=[],l=new WeakMap,c=new WeakMap;let d=!1;t.register=function(e,t){s.push(e),l.set(e,t),c.set(e,[]),d||(r.forEach((e=>{e.addEventListener("change",(()=>a()))})),d=!0),e.closest("form").addEventListener("submit",(()=>{n.default.isHidden(e)&&e.remove()})),a()}})),define("WoltLabSuite/Core/Controller/Map/Route/Planner",["require","exports","tslib","../../../Ajax/Status","../../../Core","../../../Dom/Util","../../../Language","../../../Ui/Dialog"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s);class l{constructor(e,t){this.didInitDialog=!1,this.directionsRenderer=void 0,this.directionsService=void 0,this.googleLink=void 0,this.lastOrigin=void 0,this.map=void 0,this.originInput=void 0,this.travelMode=void 0;const i=document.getElementById(e);if(null===i)throw new Error(`Unknown button with id '${e}'`);this.button=i,this.button.addEventListener("click",(e=>this.openDialog(e))),this.destination=t}_calculateRoute(e){const t=s.default.getDialog(this).dialog;if(e.label&&(this.originInput.value=e.label),void 0===this.map){const e=t.querySelector(".googleMap");this.map=new google.maps.Map(e,{disableDoubleClickZoom:window.WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),draggable:window.WCF.Location.GoogleMaps.Settings.get("draggable"),mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:window.WCF.Location.GoogleMaps.Settings.get("scaleControl"),scrollwheel:window.WCF.Location.GoogleMaps.Settings.get("scrollwheel")}),this.directionsService=new google.maps.DirectionsService,this.directionsRenderer=new google.maps.DirectionsRenderer,this.directionsRenderer.setMap(this.map);const i=t.querySelector(".googleMapsDirections");this.directionsRenderer.setPanel(i),this.googleLink=t.querySelector(".googleMapsDirectionsGoogleLink")}const i={destination:this.destination,origin:e.location,provideRouteAlternatives:!0,travelMode:google.maps.TravelMode[this.travelMode.value.toUpperCase()]};n.show(),this.directionsService.route(i,((e,t)=>this.setRoute(e,t))),this.googleLink.href=this.getGoogleMapsLink(e.location,this.travelMode.value),this.lastOrigin=e.location}getGoogleMapsLink(e,t){if(e){let 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(){if(!this.didInitDialog){const e=s.default.getDialog(this).dialog;this.originInput=e.querySelector('input[name="origin"]'),new window.WCF.Location.GoogleMaps.LocationSearch(this.originInput,(e=>this._calculateRoute(e))),this.travelMode=e.querySelector('select[name="travelMode"]'),this.travelMode.addEventListener("change",this.updateRoute.bind(this)),this.didInitDialog=!0}}openDialog(e){e.preventDefault(),s.default.open(this)}setRoute(e,t){n.hide(),"OK"===t?(a.default.show(this.map.getDiv().parentElement),google.maps.event.trigger(this.map,"resize"),this.directionsRenderer.setDirections(e),a.default.show(this.travelMode.closest("dl")),a.default.show(this.googleLink),a.default.innerError(this.originInput,!1)):("OVER_QUERY_LIMIT"!==t&&"REQUEST_DENIED"!==t&&(t=google.maps.DirectionsStatus.NOT_FOUND),a.default.innerError(this.originInput,r.get(`wcf.map.route.error.${t.toLowerCase()}`)))}updateRoute(){this._calculateRoute({location:this.lastOrigin})}_dialogSetup(){return{id:this.button.id+"Dialog",options:{onShow:this.initDialog.bind(this),title:r.get("wcf.map.route.planner")},source:`\n<div class="googleMapsDirectionsContainer" style="display: none;">\n <div class="googleMap"></div>\n <div class="googleMapsDirections"></div>\n</div>\n<small class="googleMapsDirectionsGoogleLinkContainer">\n <a href="${this.getGoogleMapsLink()}" class="googleMapsDirectionsGoogleLink" target="_blank" style="display: none;">${r.get("wcf.map.route.viewOnGoogleMaps")}</a>\n</small>\n<dl>\n <dt>${r.get("wcf.map.route.origin")}</dt>\n <dd>\n <input type="text" name="origin" class="long" autofocus>\n </dd>\n</dl>\n<dl style="display: none;">\n <dt>${r.get("wcf.map.route.travelMode")}</dt>\n <dd>\n <select name="travelMode">\n <option value="driving">${r.get("wcf.map.route.travelMode.driving")}</option>\n <option value="walking">${r.get("wcf.map.route.travelMode.walking")}</option>\n <option value="bicycling">${r.get("wcf.map.route.travelMode.bicycling")}</option>\n <option value="transit">${r.get("wcf.map.route.travelMode.transit")}</option>\n </select>\n </dd>\n</dl>`}}}return o.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Controller/User/Notification/Settings",["require","exports","tslib","../../../Language","../../../Ui/Dropdown/Reusable"],(function(e,t,i,n,o){"use strict";function a(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;var i,a;l=~~t.dataset.objectId,function(){if(s)return;s=document.createElement("ul"),s.className="dropdownMenu",["instant","daily","divider","none"].forEach((e=>{const t=document.createElement("li");if("divider"===e)t.className="dropdownDivider";else{const i=document.createElement("a");i.href="#",i.textContent=n.get(`wcf.user.notification.mailNotificationType.${e}`),t.appendChild(i),t.dataset.value=e,t.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget.dataset.value;r().value=t;const i=document.querySelector(`.notificationSettingsEmailType[data-object-id="${l}"]`);i.title=n.get(`wcf.user.notification.mailNotificationType.${t}`);const o=i.querySelector(".jsIconNotificationSettingsEmailType");switch(o.classList.remove("fa-clock-o","fa-flash","fa-times","green","red"),t){case"daily":o.classList.add("fa-clock-o","green");break;case"instant":o.classList.add("fa-flash","green");break;case"none":o.classList.add("fa-times","red")}l=0}(e)))}s.appendChild(t)})),o.init("UiNotificationSettingsEmailType",s)}(),i=r().value,s.querySelectorAll("li").forEach((e=>{e.dataset.value===i?e.classList.add("active"):e.classList.remove("active")})),a=t,o.toggleDropdown("UiNotificationSettingsEmailType",a)}function r(){return document.getElementById(`settings_${l}_mailNotificationType`)}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o);let l=0;t.init=function(){document.querySelectorAll(".jsCheckboxNotificationSettingsState").forEach((e=>{e.addEventListener("change",(e=>function(e){const t=e.currentTarget,i=~~t.dataset.objectId,n=document.querySelector(`.notificationSettingsEmailType[data-object-id="${i}"]`);null!==n&&(t.checked?n.classList.remove("disabled"):n.classList.add("disabled"))}(e)))})),document.querySelectorAll(".notificationSettingsEmailType").forEach((e=>{e.addEventListener("click",(e=>a(e)))}))}})),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["require","exports","tslib","../../../Ui/Dropdown/Simple","../../../Event/Handler","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r{constructor(e,t){this._formId=e,this._suffixField=document.getElementById(t),this._suffixDropdownMenu=n.default.getDropdownMenu(t+"_dropdown"),this._suffixDropdownToggle=n.default.getDropdown(t+"_dropdown").getElementsByClassName("dropdownToggle")[0],Array.from(this._suffixDropdownMenu.children).forEach((e=>{e.addEventListener("click",(e=>this._changeSuffixSelection(e)))})),o.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",(e=>this._destroyDropdown(e)))}_changeSuffixSelection(e){const t=e.currentTarget;t.classList.contains("disabled")||(Array.from(this._suffixDropdownMenu.children).forEach((e=>{e===t?e.classList.add("active"):e.classList.remove("active")})),this._suffixField.value=t.dataset.value,this._suffixDropdownToggle.innerHTML=t.dataset.label+' <span class="icon icon16 fa-caret-down pointer"></span>')}_destroyDropdown(e){e.formId===this._formId&&n.default.destroy(this._suffixDropdownMenu.id)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return{[this._fieldId]:this._aclList.getData()}}_readField(){}setAclList(e){return this._aclList=e,this}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Button",["require","exports","tslib","./Field"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0,n=i.__importDefault(n);class o extends n.default{_getData(){const e={};return"1"===this._field.dataset.isClicked&&(e[this._fieldId]=this._field.value),e}}t.Button=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["require","exports","tslib","./Field","../../../Controller/Captcha","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importStar(a);class r extends n.default{_getData(){return o.default.has(this._fieldId)?o.default.getData(this._fieldId):{}}_readField(){}destroy(){o.default.has(this._fieldId)&&o.default.delete(this._fieldId)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){const e=this._fields.map((e=>e.checked?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e}}_readField(){this._fields=Array.from(document.querySelectorAll(`input[name="${this._fieldId}[]"]`))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return{[this._fieldId]:this._field.checked?1:0}}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Date",["require","exports","tslib","./Field","../../../Date/Picker","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importDefault(o),a=i.__importStar(a);class r extends n.default{_getData(){return{[this._fieldId]:o.default.getValue(this._field)}}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["require","exports","tslib","./Field","../../../Ui/ItemList/Static","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e=[];return o.getValues(this._fieldId).forEach((t=>{t.objectId?e[t.objectId]=t.value:e.push(t.value)})),{[this._fieldId]:e}}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){const e={};return this._fields.some((t=>!!t.checked&&(e[this._fieldId]=t.value,!0))),e}_readField(){this._fields=Array.from(document.querySelectorAll("input[name="+this._fieldId+"]"))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){const e=Array.from(document.querySelectorAll('input[name="'+this._fieldId+'[group][]"]')).map((e=>e.value)),t=Array.from(document.querySelectorAll('input[name="'+this._fieldId+'[user][]"]')).map((e=>e.value));return{[this._fieldId]:{group:e,user:t}}}_readField(){}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["require","exports","tslib","./Field","../../../Ui/ItemList","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e}}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/User",["require","exports","tslib","./Field","../../../Core","../../../Ui/ItemList"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e=a.getValues(this._fieldId).map((e=>e.objectId?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e.join(",")}}}return o.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Value",["require","exports","tslib","./Field","../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return{[this._fieldId]:this._field.value}}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["require","exports","tslib","./Field","../../../Language/Input","../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{_getData(){const e={},t=o.getValues(this._fieldId);return t.size>1?t.forEach(((t,i)=>{e[this._fieldId+"_i18n"][i]=t})):e[this._fieldId]=t.get(0),e}destroy(){o.unregister(this._fieldId)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Ui/Comment/Response/Add",["require","exports","tslib","../../../Core","../../../Dom/Change/Listener","../../../Dom/Util","../../../Language","../Add","../../Notification"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importDefault(a),r=i.__importStar(r),s=i.__importDefault(s),l=i.__importStar(l);class c extends s.default{constructor(e,t){super(e),this._options=n.extend({callbackInsert:null},t)}getContainer(){return this._container}getContent(){return window.jQuery(this._textarea).redactor("code.get")}setContent(e){window.jQuery(this._textarea).redactor("code.set",e),window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor");const t=this._textarea.parentElement.querySelector(".innerError");null!==t&&t.remove(),this._content.classList.remove("collapsed"),this._focusEditor()}_getParameters(){const e=super._getParameters(),t=this._container.closest(".comment");return e.data.commentID=~~t.dataset.objectId,e}_insertMessage(e){const t=this._container.parentElement.querySelector(".commentContent");let i=t.nextElementSibling;return null!==i&&i.classList.contains("commentResponseList")||(i=document.createElement("ul"),i.className="containerList commentResponseList",i.dataset.responses="0",t.insertAdjacentElement("afterend",i)),a.default.insertHtml(e.returnValues.template,i,"append"),l.show(r.get("wcf.global.success.add")),o.default.trigger(),window.jQuery(this._textarea).redactor("code.set",""),null!==this._options.callbackInsert&&this._options.callbackInsert(),i.dataset.responses=i.children.length.toString(),i.lastElementChild}_ajaxSetup(){const e=super._ajaxSetup();return e.data.actionName="addResponse",e}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/Comment/Response/Edit",["require","exports","tslib","../../../Ajax","../../../Core","../../../Dom/Change/Listener","../../../Dom/Util","../Edit","../../Notification"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s),l=i.__importStar(l);class c extends s.default{constructor(e){super(e),this._responses=new WeakSet,this.rebuildResponses(),a.default.add("Ui/Comment/Response/Edit_"+r.default.identify(this._container),(()=>this.rebuildResponses()))}rebuild(){}rebuildResponses(){this._container.querySelectorAll(".commentResponse").forEach((e=>{if(!this._responses.has(e)){if(o.stringToBool(e.dataset.canEdit||"")){const t=e.querySelector(".jsCommentResponseEditButton");null!==t&&t.addEventListener("click",(e=>this._click(e)))}this._responses.add(e)}}))}_click(e){if(e.preventDefault(),null===this._activeElement){const t=e.currentTarget;this._activeElement=t.closest(".commentResponse"),this._prepare(),n.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})}else l.show("wcf.message.error.editorAlreadyInUse",null,"warning")}_prepare(){this._editorContainer=document.createElement("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='<span class="icon icon48 fa-spinner"></span>';const e=this._activeElement.querySelector(".commentResponseContent");e.insertBefore(this._editorContainer,e.firstChild)}_showMessage(e){const t=this._editorContainer.parentElement;r.default.setInnerHtml(t.querySelector(".commentResponseContent .userMessage"),e.returnValues.message),this._restoreMessage(),l.show()}_getEditorId(){return`commentResponseEditor${this._getObjectId(this._activeElement)}`}_ajaxSetup(){return{data:{className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{objectTypeID:~~this._container.dataset.objectTypeId}}},silent:!0}}}return o.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/Message/InlineEditor/Data",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Ui/Page/Header/Fixed",["require","exports","tslib","../../../Event/Handler","../../Alignment","../../CloseOverlay","../../Dropdown/Simple","../../Screen"],(function(e,t,i,n,o,a,r,s){"use strict";function l(){h=document.getElementById("pageHeaderSearch"),h.addEventListener("click",(e=>e.stopPropagation())),u=document.getElementById("pageHeaderPanel"),p=document.getElementById("pageHeaderSearchInput"),m=document.getElementById("topMenu"),f=document.getElementById("userPanelSearchButton"),f.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.classList.contains("searchBarOpen")?c():function(){window.WCF.Dropdown.Interactive.Handler.closeAll(),d.classList.add("searchBarOpen"),f.parentElement.classList.add("open"),g||o.set(h,m,{horizontal:"right"});h.style.setProperty("top",`${u.clientHeight}px`,""),p.focus(),window.setTimeout((()=>{p.selectionStart=p.selectionEnd=p.value.length}),1)}()})),a.default.add("WoltLabSuite/Core/Ui/Page/Header/Fixed",(()=>{d.classList.contains("searchBarForceOpen")||c()})),n.add("com.woltlab.wcf.MainMenuMobile","more",(e=>{"com.woltlab.wcf.search"===e.identifier&&(e.handler.close(!0),f.click())}))}function c(){d.classList.remove("searchBarOpen"),f.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{h.style.removeProperty(e)})),p.blur();const e=h.querySelector(".pageHeaderSearchType");r.default.close(e.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importStar(s);let d,u,h,p,m,f,g=!1;t.init=function(){d=document.getElementById("pageHeader"),l(),s.on("screen-md-down",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),n.add("com.woltlab.wcf.Search","close",c)}})),define("WoltLabSuite/Core/Ui/Page/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importDefault(o);class a extends o.default{constructor(e,t){if("function"!=typeof t.callbackSuccess)throw new Error("Expected a valid callback function for 'callbackSuccess'.");super(e,t=n.extend({ajax:{className:"wcf\\data\\page\\PageAction"}},t)),this.callbackSuccess=t.callbackSuccess,this.pageId=0}setPageId(e){this.pageId=e}getParameters(e){const t=super.getParameters(e);return t.objectIDs=[this.pageId],t}_ajaxSuccess(e){this.callbackSuccess(e)}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/Page/Search/Handler",["require","exports","tslib","../../../Language","../../../StringUtil","../../../Dom/Util","../../Dialog","./Input"],(function(e,t,i,n,o,a,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(){this.callbackSuccess=void 0,this.resultList=void 0,this.resultListContainer=void 0,this.searchInput=void 0,this.searchInputHandler=void 0,this.searchInputLabel=void 0}open(e,t,i,o){this.callbackSuccess=i,r.default.open(this),r.default.setTitle(this,t),this.searchInputLabel.textContent=n.get(o||"wcf.page.pageObjectID.search.terms"),this._getSearchInputHandler().setPageId(e)}buildList(e){this.resetList(),Array.isArray(e.returnValues)&&0!==e.returnValues.length?(e.returnValues.forEach((e=>{let t=e.image;/^fa-/.test(t)&&(t=`<span class="icon icon48 ${t} pointer jsTooltip" title="${n.get("wcf.global.select")}"></span>`);const i=document.createElement("li");i.dataset.objectId=e.objectID.toString();const a=e.description?`<p>${e.description}</p>`:"";i.innerHTML=`<div class="box48">\n ${t}\n <div>\n <div class="containerHeadline">\n <h3>\n <a href="${o.escapeHTML(e.link)}">${o.escapeHTML(e.title)}</a>\n </h3>\n ${a}\n </div>\n </div>\n </div>`,i.addEventListener("click",this.click.bind(this)),this.resultList.appendChild(i)})),a.default.show(this.resultListContainer)):a.default.innerError(this.searchInput,n.get("wcf.page.pageObjectID.search.noResults"))}resetList(){a.default.innerError(this.searchInput,!1),this.resultList.innerHTML="",a.default.hide(this.resultListContainer)}_getSearchInputHandler(){if(!this.searchInputHandler){const e=document.getElementById("wcfUiPageSearchInput");this.searchInputHandler=new s.default(e,{callbackSuccess:this.buildList.bind(this)})}return this.searchInputHandler}click(e){if("A"===e.target.nodeName)return;e.stopPropagation();const t=e.currentTarget;this.callbackSuccess(+t.dataset.objectId),r.default.close(this)}_dialogSetup(){return{id:"wcfUiPageSearchHandler",options:{onShow:e=>{this.searchInput||(this.searchInput=document.getElementById("wcfUiPageSearchInput"),this.searchInputLabel=e.querySelector('label[for="wcfUiPageSearchInput"]'),this.resultList=document.getElementById("wcfUiPageSearchResultList"),this.resultListContainer=document.getElementById("wcfUiPageSearchResultListContainer")),this.searchInput.value="",a.default.hide(this.resultListContainer),this.resultList.innerHTML="",this.searchInput.focus()},title:""},source:`<div class="section">\n <dl>\n <dt>\n <label for="wcfUiPageSearchInput">${n.get("wcf.page.pageObjectID.search.terms")}</label>\n </dt>\n <dd>\n <input type="text" id="wcfUiPageSearchInput" class="long">\n </dd>\n </dl>\n </div>\n <section id="wcfUiPageSearchResultListContainer" class="section sectionContainerList">\n <header class="sectionHeader">\n <h2 class="sectionTitle">${n.get("wcf.page.pageObjectID.search.results")}</h2>\n </header>\n <ul id="wcfUiPageSearchResultList" class="containerList wcfUiPageSearchResultList"></ul>\n </section>`}}}let c;t.open=function(e,t,i,n){(c||(c=new l),c).open(e,t,i,n)}})),define("WoltLabSuite/Core/Ui/Reaction/Profile/Loader",["require","exports","tslib","../../../Ajax","../../../Core","../../../Dom/Util","../../../Language"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importStar(r);class s{constructor(e){if(this._reactionTypeID=null,this._targetType="received",this._container=document.getElementById("likeList"),this._userID=e,this._options={parameters:{}},!this._userID)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'userID' given.");const t=document.createElement("li");t.className="likeListMore showMore",this._noMoreEntries=document.createElement("small"),this._noMoreEntries.innerHTML=r.get("wcf.like.reaction.noMoreEntries"),this._noMoreEntries.style.display="none",t.appendChild(this._noMoreEntries),this._loadButton=document.createElement("button"),this._loadButton.className="small",this._loadButton.innerHTML=r.get("wcf.like.reaction.more"),this._loadButton.addEventListener("click",(()=>this._loadReactions())),this._loadButton.style.display="none",t.appendChild(this._loadButton),this._container.appendChild(t),2===document.querySelectorAll("#likeList > li").length?this._noMoreEntries.style.display="":this._loadButton.style.display="",this._setupReactionTypeButtons(),this._setupTargetTypeButtons()}_setupReactionTypeButtons(){document.querySelectorAll("#reactionType .button").forEach((e=>{e.addEventListener("click",(()=>this._changeReactionTypeValue(~~e.dataset.reactionTypeId)))}))}_setupTargetTypeButtons(){document.querySelectorAll("#likeType .button").forEach((e=>{e.addEventListener("click",(()=>this._changeTargetType(e.dataset.likeType)))}))}_changeTargetType(e){if("given"!==e&&"received"!==e)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Profile/Loader] Invalid parameter 'targetType' given.");e!==this._targetType&&(document.querySelector("#likeType .button.active").classList.remove("active"),document.querySelector(`#likeType .button[data-like-type="${e}"]`).classList.add("active"),this._targetType=e,this._reload())}_changeReactionTypeValue(e){const t=document.querySelector("#reactionType .button.active");t&&t.classList.remove("active"),this._reactionTypeID!==e?(document.querySelector(`#reactionType .button[data-reaction-type-id="${e}"]`).classList.add("active"),this._reactionTypeID=e):this._reactionTypeID=null,this._reload()}_reload(){document.querySelectorAll("#likeList > li:not(:first-child):not(:last-child)").forEach((e=>e.remove())),this._container.dataset.lastLikeTime="0",this._loadReactions()}_loadReactions(){this._options.parameters.userID=this._userID,this._options.parameters.lastLikeTime=~~this._container.dataset.lastLikeTime,this._options.parameters.targetType=this._targetType,this._options.parameters.reactionTypeID=~~this._reactionTypeID,n.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){e.returnValues.template?(document.querySelector("#likeList > li:nth-last-child(1)").insertAdjacentHTML("beforebegin",e.returnValues.template),this._container.dataset.lastLikeTime=e.returnValues.lastLikeTime.toString(),a.default.hide(this._noMoreEntries),a.default.show(this._loadButton)):(a.default.show(this._noMoreEntries),a.default.hide(this._loadButton))}_ajaxSetup(){return{data:{actionName:"load",className:"\\wcf\\data\\reaction\\ReactionAction"}}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["require","exports","tslib","../../../Ajax","../../../Core","../../../Language","../../../Dom/Util"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s{constructor(e){this.containerId=e;const t=document.getElementById(this.containerId);this.list=t.querySelector(".recentActivityList");const i=document.createElement("li");if(i.className="showMore",this.list.childElementCount){i.innerHTML='<button class="small">'+a.get("wcf.user.recentActivity.more")+"</button>";i.children[0].addEventListener("click",(e=>this.showMore(e)))}else i.innerHTML="<small>"+a.get("wcf.user.recentActivity.noMoreEntries")+"</small>";this.list.appendChild(i),this.showMoreItem=i,t.querySelectorAll(".jsRecentActivitySwitchContext .button").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault(),e.classList.contains("active")||this.switchContext()}))}))}showMore(e){e.preventDefault();this.showMoreItem.children[0].disabled=!0,n.api(this,{actionName:"load",parameters:{boxID:~~this.list.dataset.boxId,filteredByFollowedUsers:o.stringToBool(this.list.dataset.filteredByFollowedUsers||""),lastEventId:this.list.dataset.lastEventId,lastEventTime:this.list.dataset.lastEventTime,userID:~~this.list.dataset.userId}})}switchContext(){n.api(this,{actionName:"switchContext"},(()=>{window.location.hash=`#${this.containerId}`,window.location.reload()}))}_ajaxSuccess(e){if(e.returnValues.template){r.default.insertHtml(e.returnValues.template,this.showMoreItem,"before"),this.list.dataset.lastEventTime=e.returnValues.lastEventTime.toString(),this.list.dataset.lastEventId=e.returnValues.lastEventID.toString();this.showMoreItem.children[0].disabled=!1}else this.showMoreItem.innerHTML="<small>"+a.get("wcf.user.recentActivity.noMoreEntries")+"</small>"}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/CoverPhoto/Delete",["require","exports","tslib","../../../Ajax","../../../Dom/Util","../../../Event/Handler","../../../Language","../../Confirmation","../../Notification"],(function(e,t,i,n,o,a,r,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importStar(l);class c{constructor(e){this.button=document.querySelector(".jsButtonDeleteCoverPhoto"),this.button.addEventListener("click",(e=>this._click(e))),this.userId=e,a.add("com.woltlab.wcf.user","coverPhoto",(e=>{"string"==typeof e.url&&e.url.length>0&&o.default.show(this.button.parentElement)}))}_click(e){e.preventDefault(),s.show({confirm:()=>n.api(this),message:r.get("wcf.user.coverPhoto.delete.confirmMessage")})}_ajaxSuccess(e){document.querySelector(".userProfileCoverPhoto").style.setProperty("background-image",`url(${e.returnValues.url})`,""),o.default.hide(this.button.parentElement),l.show()}_ajaxSetup(){return{data:{actionName:"deleteCoverPhoto",className:"wcf\\data\\user\\UserProfileAction",parameters:{userID:this.userId}}}}}let d;t.init=function(e){d||(d=new c(e))}})),define("WoltLabSuite/Core/Ui/User/CoverPhoto/Upload",["require","exports","tslib","../../../Core","../../../Dom/Util","../../../Event/Handler","../../Dialog","../../Notification","../../../Upload"],(function(e,t,i,n,o,a,r,s,l){"use strict";n=i.__importStar(n),o=i.__importDefault(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s),l=i.__importDefault(l);class c extends l.default{constructor(e){super("coverPhotoUploadButtonContainer","coverPhotoUploadPreview",{action:"uploadCoverPhoto",className:"wcf\\data\\user\\UserProfileAction"}),this.userId=e}_getParameters(){return{userID:this.userId}}_success(e,t){if(o.default.innerError(this._button,t.returnValues.errorMessage),this._target.innerHTML="",t.returnValues.url){document.querySelector(".userProfileCoverPhoto").style.setProperty("background-image",`url(${t.returnValues.url})`,""),r.close("userProfileCoverPhotoUpload"),s.show(),a.fire("com.woltlab.wcf.user","coverPhoto",{url:t.returnValues.url})}}}return n.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Ui/User/Session/Delete",["require","exports","tslib","../../../Ajax","../../Notification","../../Confirmation","../../../Language"],(function(e,t,i,n,o,a,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiUserSessionDelete=void 0,n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r);class s{constructor(){this.knownElements=new Map,document.querySelectorAll(".sessionDeleteButton").forEach((e=>{if(!e.dataset.sessionId)throw new Error("No sessionId for session delete button given.");this.knownElements.has(e.dataset.sessionId)||(e.addEventListener("click",(t=>this.delete(e,t))),this.knownElements.set(e.dataset.sessionId,e))}))}delete(e,t){t.preventDefault(),a.show({message:r.get("wcf.user.security.deleteSession.confirmMessage"),confirm:t=>{n.api(this,{sessionID:e.dataset.sessionId})}})}_ajaxSuccess(e){const t=this.knownElements.get(e.sessionID);if(void 0!==t){const e=t.closest("li");null!==e&&e.remove()}o.show()}_ajaxSetup(){return{url:"index.php?delete-session/&t="+window.SECURITY_TOKEN}}}t.UiUserSessionDelete=s,t.default=s})),define("WoltLabSuite/Core/Ui/User/Trophy/List",["require","exports","tslib","../../../Ajax","../../../Core","../../../Dom/Change/Listener","../../Dialog","../../Pagination"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importDefault(a),r=i.__importDefault(r),s=i.__importDefault(s);class l{constructor(e,t){this.pageCount=e,this.title=t,this.cache=new Map}has(e){return this.cache.has(e)}get(e){return this.cache.get(e)}set(e,t){this.cache.set(e,t)}}class c{constructor(){this.cache=new Map,this.currentPageNo=0,this.currentUser=0,this.knownElements=new WeakSet,a.default.add("WoltLabSuite/Core/Ui/User/Trophy/List",(()=>this.rebuild())),this.rebuild()}rebuild(){document.querySelectorAll(".userTrophyOverlayList").forEach((e=>{this.knownElements.has(e)||(e.addEventListener("click",(t=>this.open(e,t))),this.knownElements.add(e))}))}open(e,t){t.preventDefault(),this.currentPageNo=1,this.currentUser=+e.dataset.userId,this.showPage()}showPage(e){void 0!==e&&(this.currentPageNo=e);const t=this.cache.get(this.currentUser);if(t&&0!==t.pageCount&&(this.currentPageNo<1||this.currentPageNo>t.pageCount))throw new RangeError(`pageNo must be between 1 and ${t.pageCount} (${this.currentPageNo} given).`);if(t&&t.has(this.currentPageNo)){const e=r.default.open(this,t.get(this.currentPageNo));if(r.default.setTitle("userTrophyListOverlay",t.title),t.pageCount>1){const i=e.content.querySelector(".jsPagination");null!==i&&new s.default(i,{activePage:this.currentPageNo,maxPage:t.pageCount,callbackSwitch:this.showPage.bind(this)})}}else n.api(this,{parameters:{pageNo:this.currentPageNo,userID:this.currentUser}})}_ajaxSuccess(e){let t;void 0!==e.returnValues.pageCount?(t=new l(+e.returnValues.pageCount,e.returnValues.title),this.cache.set(this.currentUser,t)):t=this.cache.get(this.currentUser),t.set(this.currentPageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserTrophyList",className:"wcf\\data\\user\\trophy\\UserTrophyAction"}}}_dialogSetup(){return{id:"userTrophyListOverlay",options:{title:""},source:null}}}return o.enableLegacyInheritance(c),c})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["require","exports","tslib","../../../../Core","../../../../Dom/Util","../../../../Language","../../../../Ui/Dropdown/Simple"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s{constructor(e,t,i){this._formFieldContainer=document.getElementById(e+"Container"),this._labelChooser=this._formFieldContainer.getElementsByClassName("labelChooser")[0],this._options=n.extend({forceSelection:!1,showWithoutSelection:!1},i),this._input=document.createElement("input"),this._input.type="hidden",this._input.id=e,this._input.name=e,this._input.value=t,this._formFieldContainer.appendChild(this._input);const s=o.identify(this._labelChooser);let l=r.default.getDropdownMenu(s);null===l&&(r.default.init(this._labelChooser.getElementsByClassName("dropdownToggle")[0]),l=r.default.getDropdownMenu(s));let c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=document.createElement("ul"),l.appendChild(c);const e=document.createElement("li");e.classList.add("dropdownDivider"),c.appendChild(e)}if(this._options.showWithoutSelection){const e=document.createElement("li");e.dataset.labelId="-1",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=a.get("wcf.label.withoutSelection"),t.appendChild(i)}if(!this._options.forceSelection){const e=document.createElement("li");e.dataset.labelId="0",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const i=document.createElement("span");i.classList.add("badge","label"),i.innerHTML=a.get("wcf.label.none"),t.appendChild(i)}l.querySelectorAll("li:not(.dropdownDivider)").forEach((e=>{e.addEventListener("click",(e=>this._click(e))),t&&e.dataset.labelId===t&&this._selectLabel(e)}))}_blockScroll(e){e.addEventListener("wheel",(e=>e.preventDefault()),{passive:!1})}_click(e){e.preventDefault(),this._selectLabel(e.currentTarget)}_selectLabel(e){let t=e.dataset.labelId;t||(t="0");const i=e.querySelector("span > span"),n=this._labelChooser.querySelector(".dropdownToggle > span");n.className=i.className,n.textContent=i.textContent,this._input.value=t}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["require","exports","tslib","../../../../Core","../../../../Environment"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t,i,n){if(this._field=document.getElementById(e+"Container"),null===this._field)throw new Error("Unknown field with id '"+e+"'");this._input=document.createElement("input"),this._input.id=e,this._input.name=e,this._input.type="hidden",this._input.value=t,this._field.appendChild(this._input),this._activeCssClasses=i,this._defaultCssClasses=n,this._ratingElements=new Map;const o=this._field.querySelector(".ratingList");o.addEventListener("mouseleave",(()=>this._restoreRating())),o.querySelectorAll("li").forEach((e=>{e.classList.contains("ratingMetaButton")?(e.addEventListener("click",(e=>this._metaButtonClick(e))),e.addEventListener("mouseenter",(()=>this._restoreRating()))):(this._ratingElements.set(e.dataset.rating,e),e.addEventListener("click",(e=>this._listItemClick(e))),e.addEventListener("mouseenter",(e=>this._listItemMouseEnter(e))),e.addEventListener("mouseleave",(()=>this._listItemMouseLeave())))}))}_listItemClick(e){const t=e.currentTarget;this._input.value=t.dataset.rating,"desktop"!==o.platform()&&this._restoreRating()}_listItemMouseEnter(e){const t=e.currentTarget.dataset.rating;this._ratingElements.forEach(((e,i)=>{const n=e.getElementsByClassName("icon")[0];this._toggleIcon(n,~~i<=~~t)}))}_listItemMouseLeave(){this._ratingElements.forEach((e=>{const t=e.getElementsByClassName("icon")[0];this._toggleIcon(t,!1)}))}_metaButtonClick(e){"removeRating"===e.currentTarget.dataset.action&&(this._input.value="",this._listItemMouseLeave())}_restoreRating(){this._ratingElements.forEach(((e,t)=>{const i=e.getElementsByClassName("icon")[0];this._toggleIcon(i,~~t<=~~this._input.value)}))}_toggleIcon(e,t=!1){t?(e.classList.remove(...this._defaultCssClasses),e.classList.add(...this._activeCssClasses)):(e.classList.remove(...this._activeCssClasses),e.classList.add(...this._defaultCssClasses))}}return n.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["require","exports","tslib","./Manager","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this.init(e,t)}checkDependency(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")}getDependentNode(){return this._dependentElement}getField(){return this._field}getFields(){return this._fields}init(e,t){if(this._dependentElement=document.getElementById(e),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+e+"Container'.");if(this._field=document.getElementById(t),null===this._field){if(this._fields=[],document.querySelectorAll("input[type=radio][name="+t+"]").forEach((e=>{this._fields.push(e)})),!this._fields.length&&(document.querySelectorAll('input[type=checkbox][name="'+t+'[]"]').forEach((e=>{this._fields.push(e)})),!this._fields.length))throw new Error("Unknown field with id '"+t+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.tagName&&"radio"===this._field.type&&""!==this._field.dataset.noInputId){if(this._noField=document.getElementById(this._field.dataset.noInputId),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+t+"'");this._fields.push(this._noField)}n.addDependency(this)}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["require","exports","tslib","./Abstract","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return!e.checked;case"radio":return!(!this._noField||!this._noField.checked)||!e.checked;default:return 0===e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0===this._field.querySelectorAll("option:checked").length:"0"==e.value||0===e.value.length}case"TEXTAREA":return 0===this._field.value.trim().length}return this._fields.every((e=>!e.checked))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/IsNotClicked",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsNotClicked=void 0,n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{constructor(e,t){super(e,t),this._field.addEventListener("click",(()=>{this._field.dataset.isClicked="1",o.checkDependencies()}))}checkDependency(){return"1"!==this._field.dataset.isClicked}}t.IsNotClicked=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["require","exports","tslib","./Abstract","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return e.checked;case"radio":return(!this._noField||!this._noField.checked)&&e.checked;default:return 0!==e.value.trim().length}}case"SELECT":{const e=this._field;return e.multiple?0!==e.querySelectorAll("option:checked").length:"0"!=e.value&&0!==e.value.length}case"TEXTAREA":return 0!==this._field.value.trim().length}return this._fields.some((e=>e.checked))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["require","exports","tslib","./Abstract","./Manager","../../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{constructor(){super(...arguments),this._isNegated=!1}checkDependency(){if(!this._values)throw new Error("Values have not been set.");const e=[];if(this._field){if(o.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else{let t=!0;if(this._fields.forEach((i=>{if(i.checked){if(o.isHiddenByDependencies(i))return t=!1,!1;e.push(i.value)}})),!t)return!1}let t=!1;return this._values.forEach((i=>{e.forEach((e=>{i==e&&(t=!0)}))})),t?!this._isNegated:this._isNegated}negate(e){return this._isNegated=e,this}values(e){return this._values=e,this}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["require","exports","tslib","../Value","../../../../Language/Chooser","../../../../Core"],(function(e,t,i,n,o,a){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a);class r extends n.default{destroy(){o.removeChooser(this._fieldId)}}return a.enableLegacyInheritance(r),r})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["require","exports","tslib","../Value","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{constructor(e){super(e+"_tmpHash")}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Poll",["require","exports","tslib","../Field","../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importDefault(n),o=i.__importStar(o);class a extends n.default{_getData(){return this._pollEditor.getData()}_readField(){}setPollEditor(e){this._pollEditor=e}}return o.enableLegacyInheritance(a),a}));let G=null;class H{}H.render=function(e,t){G(e,t)},self.QrCreator=H,function(e){function t(t,i,n,o){var a,r,s={},l=e(n,i);return l.u(t),l.J(),o=o||0,a=l.h(),r=l.h()+2*o,s.text=t,s.level=i,s.version=n,s.O=r,s.a=function(e,t){return t-=o,!(0>(e-=o)||e>=a||0>t||t>=a)&&l.a(e,t)},s}function i(e,t,i,n,o,a,r,s,l,c){function d(t,i,n,o,r,s,l){t?(e.lineTo(i+s,n+l),e.arcTo(i,n,o,r,a)):e.lineTo(i,n)}r?e.moveTo(t+a,i):e.moveTo(t,i),d(s,n,i,n,o,-a,0),d(l,n,o,t,o,0,-a),d(c,t,o,t,i,a,0),d(r,t,i,n,i,0,a)}function n(e,t,i,n,o,a,r,s,l,c){function d(t,i,n,o){e.moveTo(t+n,i),e.lineTo(t,i),e.lineTo(t,i+o),e.arcTo(t,i,t+n,i,a)}r&&d(t,i,a,a),s&&d(n,i,-a,a),l&&d(n,o,-a,-a),c&&d(t,o,a,-a)}function o(e,o){var a,r,s,l,c,d,u,h,p,m,f,g,_,b,v,w,y,E,S,C,L,A,I;e:{for(a=o.text,r=o.v,s=o.N,l=o.K,c=o.P,s=Math.max(1,s||1),l=Math.min(40,l||40);s<=l;s+=1)try{d=t(a,r,s,c);break e}catch(e){}d=void 0}if(!d)return null;for(a=e.getContext("2d"),o.background&&(a.fillStyle=o.background,a.fillRect(o.left,o.top,o.size,o.size)),r=d.O,l=o.size/r,a.beginPath(),c=0;c<r;c+=1)for(s=0;s<r;s+=1)u=a,h=o.left+s*l,p=o.top+c*l,m=c,f=s,g=d.a,_=h+l,b=p+l,v=m-1,w=m+1,y=f-1,E=f+1,S=Math.floor(Math.min(.5,Math.max(0,o.R))*l),C=g(m,f),L=g(v,y),A=g(v,f),v=g(v,E),I=g(m,E),E=g(w,E),f=g(w,f),w=g(w,y),m=g(m,y),h=Math.round(h),p=Math.round(p),_=Math.round(_),b=Math.round(b),C?i(u,h,p,_,b,S,!A&&!m,!A&&!I,!f&&!I,!f&&!m):n(u,h,p,_,b,S,A&&m&&L,A&&I&&v,f&&I&&E,f&&m&&w);return function(e,t){var i,n,o,a=t.fill;if("string"==typeof a)e.fillStyle=a;else{if(i=a.type,n=a.colorStops,a=a.position.map((e=>Math.round(e*t.size))),"linear-gradient"===i)o=e.createLinearGradient.apply(e,a);else{if("radial-gradient"!==i)throw Error("Unsupported fill");o=e.createRadialGradient.apply(e,a)}n.forEach((([e,t])=>{o.addColorStop(e,t)})),e.fillStyle=o}}(a,o),a.fill(),e}var a={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};G=function(e,t){var i={};Object.assign(i,a,e),i.N=i.minVersion,i.K=i.maxVersion,i.v=i.ecLevel,i.left=i.left,i.top=i.top,i.size=i.size,i.fill=i.fill,i.background=i.background,i.text=i.text,i.R=i.radius,i.P=i.quiet,t instanceof HTMLCanvasElement?(t.width===i.size&&t.height===i.size||(t.width=i.size,t.height=i.size),t.getContext("2d").clearRect(0,0,t.width,t.height),o(t,i)):((e=document.createElement("canvas")).width=i.size,e.height=i.size,i=o(e,i),t.appendChild(i))}}(function(){function e(o,r){function s(e,t){var i,n;for(i=-1;7>=i;i+=1)if(!(-1>=e+i||u<=e+i))for(n=-1;7>=n;n+=1)-1>=t+n||u<=t+n||(d[e+i][t+n]=0<=i&&6>=i&&(0==n||6==n)||0<=n&&6>=n&&(0==i||6==i)||2<=i&&4>=i&&2<=n&&4>=n)}function l(e,i){var r,l,m,f,g,_,b,v,w,y;for(r=u=4*o+17,l=Array(r),m=0;m<r;m+=1)for(l[m]=Array(r),f=0;f<r;f+=1)l[m][f]=null;for(d=l,s(0,0),s(u-7,0),s(0,u-7),r=n.G(o),l=0;l<r.length;l+=1)for(m=0;m<r.length;m+=1)if(f=r[l],g=r[m],null==d[f][g])for(_=-2;2>=_;_+=1)for(b=-2;2>=b;b+=1)d[f+_][g+b]=-2==_||2==_||-2==b||2==b||0==_&&0==b;for(r=8;r<u-8;r+=1)null==d[r][6]&&(d[r][6]=0==r%2);for(r=8;r<u-8;r+=1)null==d[6][r]&&(d[6][r]=0==r%2);for(r=n.w(c<<3|i),l=0;15>l;l+=1)m=!e&&1==(r>>l&1),d[6>l?l:8>l?l+1:u-15+l][8]=m,d[8][8>l?u-l-1:9>l?15-l:14-l]=m;if(d[u-8][8]=!e,7<=o){for(r=n.A(o),l=0;18>l;l+=1)m=!e&&1==(r>>l&1),d[Math.floor(l/3)][l%3+u-8-3]=m;for(l=0;18>l;l+=1)m=!e&&1==(r>>l&1),d[l%3+u-8-3][Math.floor(l/3)]=m}if(null==h){for(e=a.I(o,c),r=function(){var e=[],t=0,i={B:function(){return e},c:function(t){return 1==(e[Math.floor(t/8)]>>>7-t%8&1)},put:function(e,t){for(var n=0;n<t;n+=1)i.m(1==(e>>>t-n-1&1))},f:function(){return t},m:function(i){var n=Math.floor(t/8);e.length<=n&&e.push(0),i&&(e[n]|=128>>>t%8),t+=1}};return i}(),l=0;l<p.length;l+=1)m=p[l],r.put(4,4),r.put(m.b(),n.f(4,o)),m.write(r);for(l=m=0;l<e.length;l+=1)m+=e[l].j;if(r.f()>8*m)throw Error("code length overflow. ("+r.f()+">"+8*m+")");for(r.f()+4<=8*m&&r.put(0,4);0!=r.f()%8;)r.m(!1);for(;!(r.f()>=8*m)&&(r.put(236,8),!(r.f()>=8*m));)r.put(17,8);for(v=0,m=l=0,f=Array(e.length),g=Array(e.length),_=0;_<e.length;_+=1){for(w=e[_].j,y=e[_].o-w,l=Math.max(l,w),m=Math.max(m,y),f[_]=Array(w),b=0;b<f[_].length;b+=1)f[_][b]=255&r.B()[b+v];for(v+=w,b=n.C(y),w=t(f[_],b.b()-1).l(b),g[_]=Array(b.b()-1),b=0;b<g[_].length;b+=1)y=b+w.b()-g[_].length,g[_][b]=0<=y?w.c(y):0}for(b=r=0;b<e.length;b+=1)r+=e[b].o;for(r=Array(r),b=v=0;b<l;b+=1)for(_=0;_<e.length;_+=1)b<f[_].length&&(r[v]=f[_][b],v+=1);for(b=0;b<m;b+=1)for(_=0;_<e.length;_+=1)b<g[_].length&&(r[v]=g[_][b],v+=1);h=r}for(e=h,r=-1,l=u-1,m=7,f=0,i=n.F(i),g=u-1;0<g;g-=2)for(6==g&&--g;;){for(_=0;2>_;_+=1)null==d[l][g-_]&&(b=!1,f<e.length&&(b=1==(e[f]>>>m&1)),i(l,g-_)&&(b=!b),d[l][g-_]=b,-1==--m&&(f+=1,m=7));if(0>(l+=r)||u<=l){l-=r,r=-r;break}}}var c=i[r],d=null,u=0,h=null,p=[],m={u:function(t){t=function(t){var i=e.s(t);return{S:function(){return 4},b:function(){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}}}(t),p.push(t),h=null},a:function(e,t){if(0>e||u<=e||0>t||u<=t)throw Error(e+","+t);return d[e][t]},h:function(){return u},J:function(){var e,t,i,o;for(e=0,t=0,i=0;8>i;i+=1)l(!0,i),o=n.D(m),(0==i||e>o)&&(e=o,t=i);l(!1,t)}};return m}function t(e,i){if(void 0===e.length)throw Error(e.length+"/"+i);var n=function(){var t,n,o;for(t=0;t<e.length&&0==e[t];)t+=1;for(n=Array(e.length-t+i),o=0;o<e.length-t;o+=1)n[o]=e[o+t];return n}(),a={c:function(e){return n[e]},b:function(){return n.length},multiply:function(e){var i,n,r;for(i=Array(a.b()+e.b()-1),n=0;n<a.b();n+=1)for(r=0;r<e.b();r+=1)i[n+r]^=o.i(o.g(a.c(n))+o.g(e.c(r)));return t(i,0)},l:function(e){if(0>a.b()-e.b())return a;for(var i=o.g(a.c(0))-o.g(e.c(0)),n=Array(a.b()),r=0;r<a.b();r+=1)n[r]=a.c(r);for(r=0;r<e.b();r+=1)n[r]^=o.i(o.g(e.c(r))+i);return t(n,0).l(e)}};return a}e.s=function(e){var t,i,n;for(t=[],i=0;i<e.length;i++)128>(n=e.charCodeAt(i))?t.push(n):2048>n?t.push(192|n>>6,128|63&n):55296>n||57344<=n?t.push(224|n>>12,128|n>>6&63,128|63&n):(i++,n=65536+((1023&n)<<10|1023&e.charCodeAt(i)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n));return t};var i={L:1,M:0,Q:3,H:2},n=function(){function e(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t}var i=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];return{w:function(t){for(var i=t<<10;0<=e(i)-e(1335);)i^=1335<<e(i)-e(1335);return 21522^(t<<10|i)},A:function(t){for(var i=t<<12;0<=e(i)-e(7973);)i^=7973<<e(i)-e(7973);return t<<12|i},G:function(e){return i[e-1]},F:function(e){switch(e){case 0:return function(e,t){return 0==(e+t)%2};case 1:return function(e){return 0==e%2};case 2:return function(e,t){return 0==t%3};case 3:return function(e,t){return 0==(e+t)%3};case 4:return function(e,t){return 0==(Math.floor(e/2)+Math.floor(t/3))%2};case 5:return function(e,t){return 0==e*t%2+e*t%3};case 6:return function(e,t){return 0==(e*t%2+e*t%3)%2};case 7:return function(e,t){return 0==(e*t%3+(e+t)%2)%2};default:throw Error("bad maskPattern:"+e)}},C:function(e){for(var i=t([1],0),n=0;n<e;n+=1)i=i.multiply(t([1,o.i(n)],0));return i},f:function(e,t){if(4!=e||1>t||40<t)throw Error("mode: "+e+"; type: "+t);return 10>t?8:16},D:function(e){var t,i,n,o,a,r,s,l;for(t=e.h(),i=0,n=0;n<t;n+=1)for(o=0;o<t;o+=1){for(a=0,r=e.a(n,o),s=-1;1>=s;s+=1)if(!(0>n+s||t<=n+s))for(l=-1;1>=l;l+=1)0>o+l||t<=o+l||(0!=s||0!=l)&&r==e.a(n+s,o+l)&&(a+=1);5<a&&(i+=3+a-5)}for(n=0;n<t-1;n+=1)for(o=0;o<t-1;o+=1)a=0,e.a(n,o)&&(a+=1),e.a(n+1,o)&&(a+=1),e.a(n,o+1)&&(a+=1),e.a(n+1,o+1)&&(a+=1),(0==a||4==a)&&(i+=3);for(n=0;n<t;n+=1)for(o=0;o<t-6;o+=1)e.a(n,o)&&!e.a(n,o+1)&&e.a(n,o+2)&&e.a(n,o+3)&&e.a(n,o+4)&&!e.a(n,o+5)&&e.a(n,o+6)&&(i+=40);for(o=0;o<t;o+=1)for(n=0;n<t-6;n+=1)e.a(n,o)&&!e.a(n+1,o)&&e.a(n+2,o)&&e.a(n+3,o)&&e.a(n+4,o)&&!e.a(n+5,o)&&e.a(n+6,o)&&(i+=40);for(o=a=0;o<t;o+=1)for(n=0;n<t;n+=1)e.a(n,o)&&(a+=1);return i+Math.abs(100*a/t/t-50)/5*10}}}(),o=function(){for(var e=Array(256),t=Array(256),i=0;8>i;i+=1)e[i]=1<<i;for(i=8;256>i;i+=1)e[i]=e[i-4]^e[i-5]^e[i-6]^e[i-8];for(i=0;255>i;i+=1)t[e[i]]=i;return{g:function(e){if(1>e)throw Error("glog("+e+")");return t[e]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),a=function(){function e(e,n){switch(n){case i.L:return t[4*(e-1)];case i.M:return t[4*(e-1)+1];case i.Q:return t[4*(e-1)+2];case i.H:return t[4*(e-1)+3]}}var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];return{I:function(t,i){var n,o,a,r,s,l,c,d=e(t,i);if(void 0===d)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+i);for(t=d.length/3,i=[],n=0;n<t;n+=1)for(o=d[3*n],a=d[3*n+1],r=d[3*n+2],s=0;s<o;s+=1)l=r,(c={}).o=a,c.j=l,i.push(c);return i}}}();return e}()),define("qr-creator",function(e){return function(){return e.QrCreator}}(this)),define("WoltLabSuite/Core/Ui/User/Multifactor/Totp/Qr",["require","exports","tslib","qr-creator"],(function(e,t,i,n){"use strict";function o(e){const t=e.querySelector(".totpSecret");if(!t)return;const i=t.dataset.accountname;if(!i)return;const o=t.dataset.issuer,a=(o?`${o}:`:"")+i,r=e.querySelector("canvas");n.default.render({text:`otpauth://totp/${encodeURIComponent(a)}?secret=${encodeURIComponent(t.textContent)}${o?`&issuer=${encodeURIComponent(o)}`:""}`,size:r&&r.clientWidth?r.clientWidth:200},r||e)}Object.defineProperty(t,"__esModule",{value:!0}),t.renderAll=t.render=void 0,n=i.__importDefault(n),t.render=o,t.default=o,t.renderAll=function(){document.querySelectorAll(".totpSecretContainer").forEach((e=>o(e)))}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["require","exports","tslib","../Manager","../../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e){this.init(e)}checkContainer(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")}init(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=document.getElementById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");n.addContainerCheckCallback((()=>this.checkContainer()))}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["require","exports","tslib","./Abstract","../../../../../Core","../Manager","../../../../../Dom/Util"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends n.default{checkContainer(){if(o.stringToBool(this._container.dataset.ignoreDependencies||""))return;if(a.isHiddenByDependencies(this._container))return;const e=!r.default.isHidden(this._container),t=Array.from(this._container.children).some(((e,t)=>(0!==t||"H2"!==e.tagName&&"HEADER"!==e.tagName)&&!r.default.isHidden(e)));e!==t&&(t?r.default.show(this._container):r.default.hide(this._container),a.checkContainers())}}return o.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu","../../../../../Core"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s);class l extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!a.isHidden(this._container),t=Array.from(this._container.children).some((e=>!a.isHidden(e)));if(e!==t){const e=this._container.parentNode.parentNode.querySelector("#"+a.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]");if(null===e)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)a.show(this._container),a.show(e);else{a.hide(this._container),a.hide(e);const t=r.getTabMenu(a.identify(e.closest(".tabMenuContainer")));t.getActiveTab()===e&&t.selectFirstVisible()}o.checkContainers()}}}return s.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu","../../../../../Core"],(function(e,t,i,n,o,a,r,s){"use strict";n=i.__importDefault(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importStar(r),s=i.__importStar(s);class l extends n.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!a.isHidden(this._container),t=this._container.parentNode.querySelectorAll("#"+a.identify(this._container)+" > nav > ul > li"),i=Array.from(t).some((e=>!a.isHidden(e)));e!==i&&(i?(a.show(this._container),r.getTabMenu(a.identify(this._container)).selectFirstVisible()):a.hide(this._container),o.checkContainers())}}return s.enableLegacyInheritance(l),l})),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract",["require","exports","tslib","../../../../../Ajax","../../../../../Core"],(function(e,t,i,n,o){"use strict";n=i.__importStar(n),o=i.__importStar(o);class a{constructor(e,t){this._button=document.createElement("a"),this._listItem=document.createElement("li"),this._userId=e,this._isActive=t,this._initButton(),this._updateButton()}_initButton(){this._button.href="#",this._button.addEventListener("click",(e=>this._toggle(e))),this._listItem.appendChild(this._button);document.querySelector('.userProfileButtonMenu[data-menu="interaction"]').insertAdjacentElement("afterbegin",this._listItem)}_toggle(e){e.preventDefault(),n.api(this,{actionName:this._getAjaxActionName(),parameters:{data:{userID:this._userId}}})}_updateButton(){this._button.textContent=this._getLabel(),this._isActive?this._listItem.classList.add("active"):this._listItem.classList.remove("active")}_getLabel(){throw new Error("Implement me!")}_getAjaxActionName(){throw new Error("Implement me!")}_ajaxSuccess(e){throw new Error("Implement me!")}_ajaxSetup(){throw new Error("Implement me!")}}return o.enableLegacyInheritance(a),a})),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow",["require","exports","tslib","../../../../../Core","../../../../../Language","../../../../Notification","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(e,t){super(e,t)}_getLabel(){return o.get("wcf.user.button."+(this._isActive?"un":"")+"follow")}_getAjaxActionName(){return this._isActive?"unfollow":"follow"}_ajaxSuccess(e){this._isActive=!!e.returnValues.following,this._updateButton(),a.show()}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\follow\\UserFollowAction"}}}}return n.enableLegacyInheritance(s),s})),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["require","exports","tslib","../../../../../Core","../../../../../Language","../../../../Notification","./Abstract"],(function(e,t,i,n,o,a,r){"use strict";n=i.__importStar(n),o=i.__importStar(o),a=i.__importStar(a),r=i.__importDefault(r);class s extends r.default{constructor(e,t){super(e,t)}_getLabel(){return o.get("wcf.user.button."+(this._isActive?"un":"")+"ignore")}_getAjaxActionName(){return this._isActive?"unignore":"ignore"}_ajaxSuccess(e){this._isActive=!!e.returnValues.isIgnoredUser,this._updateButton(),a.show()}_ajaxSetup(){return{data:{className:"wcf\\data\\user\\ignore\\UserIgnoreAction"}}}}return n.enableLegacyInheritance(s),s})),function(e){function t(){for(;n.length&&"function"==typeof n[0];)n.shift()()}var i=e.require,n=[],o=0;e.orgRequire=i,e.require=function(a,r,s){if(!Array.isArray(a))return i.apply(e,arguments);var l=new Promise((function(e,r){var s=o++;n.push(s),i(a,(function(){var i=arguments;n[n.indexOf(s)]=function(){e(i)},t()}),(function(e){n[n.indexOf(s)]=function(){r(e)},t()}))}));return r&&(l=l.then((function(t){return r.apply(e,t)}))),s&&l.catch(s),l},e.require.config=i.config}(window),define("require.linearExecution",(function(){}));
\ No newline at end of file