PageSourceSearch

https://wpde.org/js/WBB.min.js?v=1790151657

js wpde.org collected 2026-09-24 08:32:41 UTC 28,223 bytes, 1 lines download raw bytes

1var WBB={Thread:{}};WBB.Thread.Editor={_callbacks:[],_dialog:null,_dialogContainer:null,_environment:"",_notification:null,_proxy:null,_threadID:0,beginEdit:function(e,t){this._callbacks=[],this._environment=e,this._threadID=t,null===this._proxy&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})),this._proxy.setOption("data",{actionName:"beginEdit",className:"wbb\\data\\thread\\ThreadAction",parameters:{data:{threadID:this._threadID}}}),this._proxy.sendRequest()},registerCallback:function(e){this._callbacks.push(e)},_success:function(e,t,a){switch(e.returnValues.actionName){case"beginEdit":this._showEditor(e);break;case"saveEdit":this._saveEdit(e)}},_showEditor:function(e){var t,a,i;null===this._dialog?(this._dialogContainer=$('<div id="threadEditor" />').data("wbbThreadEditor",this).hide().appendTo(document.body),this._dialog=$("<div />").appendTo(this._dialogContainer),t=$('<div class="formSubmit" />').appendTo(this._dialogContainer),a=$('<button type="button" class="button buttonPrimary">'+WCF.Language.get("wcf.global.button.save")+"</button>").appendTo(t),$('<button type="button" class="button">'+WCF.Language.get("wcf.global.button.cancel")+"</button>").appendTo(t).click($.proxy(this._cancel,this)),a.click($.proxy(this._save,this))):$("#threadEditorLanguageIDContainer").length&&require(["WoltLabSuite/Core/Language/Chooser"],(function(e){e.removeChooser("threadLanguageID")})),this._dialogContainer.data("threadID",e.returnValues.threadID),this._dialog.html(e.returnValues.template),i=this,this._dialog.find("#topic").keyup((function(e){if(e.which===$.ui.keyCode.ENTER)return i._save(),e.preventDefault(),!1})),this._dialogContainer.wcfDialog({title:WCF.Language.get("wbb.thread.edit")}),this._dialogContainer.wcfDialog("render")},_save:function(){var e,t,a={},i=this._dialog.find("fieldset, .section");if(i.length){for(i.each($.proxy((function(e,t){var i=$(t),s=i.attr("id").replace(/^threadEditor/,"").toLowerCase();a[s]=this._getValues(i)}),this)),e=0,t=this._callbacks.length;e<t;e++)a=this._callbacks[e].getValues(this._dialog,a);$.getLength(a)&&(this._proxy.setOption("data",{actionName:"saveEdit",className:"wbb\\data\\thread\\ThreadAction",parameters:{data:{values:a,threadID:this._threadID}}}),this._proxy.sendRequest())}},_saveEdit:function(e){var t,a;if(e.returnValues.errors&&$.getLength(e.returnValues.errors))for(this._dialog.find("small.innerError").remove(),t=0,a=this._callbacks.length;t<a;t++)"function"==typeof this._callbacks[t].showErrors&&this._callbacks[t].showErrors(e.returnValues.errors);else if(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),e.returnValues.forceReload)this._notification.show((function(){window.location.reload()}),void 0,WCF.Language.get("wcf.global.success.edit"));else{for(t in this._callbacks)this._callbacks[t].saved(this._environment,this._threadID,e);this._dialogContainer.wcfDialog("close"),this._notification.show()}},_getValues:function(e){var t={};return e.find("input:not([type=radio])").each((function(e,a){var i=$(a);"checkbox"===i.attr("type")?t[i.attr("id")]=i.prop("checked")?1:0:t[i.attr("id")]=i.val()})),e.find("input[type=radio]:checked").each((function(e,a){var i=$(a);t[i.attr("name")]=i.val()})),e.find("select").each((function(e,a){var i=$(a);t[i.attr("id")]=i.val()})),t},_cancel:function(){this._dialogContainer.wcfDialog("close")}},WBB.Thread.Editor.Default=Class.extend({init:function(){$("#threadEditor").data("wbbThreadEditor").registerCallback(this),this._handleThreadType()}
1,_handleThreadType:function(){var e=$("#threadEditorAnnouncementLabel"),t=$("#threadEditorAnnouncementContainer"),a=function(a,i){switch(a){case 0:case 1:e.hide(),t.hide(),i||$("#threadEditor").wcfDialog("render");break;case 2:e.show(),t.show(),i||$("#threadEditor").wcfDialog("render")}};$("#threadEditor input[name=type]").click((function(e){a(parseInt($(e.currentTarget).val()),!1)})).each((function(e,t){var i=$(t);if(i.is(":checked"))return a(parseInt(i.val()),!0),!1}))},_click:function(e){this._type=parseInt($(e.currentTarget).prop("value")),this._update()},_update:function(){this._type},getValues:function(e,t){return t},saved:function(e,t,a){void 0!==a.returnValues.default&&("board"===e?$("#thread"+t+" .columnSubject > h3 > a").text(a.returnValues.default.topic):$('.contentHeader[data-thread-id="'+t+'"] .contentTitle').text(a.returnValues.default.topic))},showErrors:function(e){if(e.default)for($fieldName in e.default)$('<small class="innerError">'+e.default[$fieldName]+"</small>").insertAfter($("#threadEditorDefault #"+$fieldName))}}),WBB.Thread.Editor.LabelChooser=WCF.Label.Chooser.extend({init:function(e,t,a,i){this._super(e,t,a,i),$("#threadEditor").data("wbbThreadEditor").registerCallback(this)},getValues:function(e,t){var a,i;for(a in t.label={},this._groups)void 0!==(i=this._groups[a]).data("labelID")&&(t.label[a]=i.data("labelID"));return t},saved:function(e,t,a){var i,s,n,r,o,d,l;if(void 0!==a.returnValues.label)if(r=a.returnValues.label.labels,o=null,"board"===e)for((o=(d=$("#thread"+t+" > .columnSubject")).children(".labelList")).length?r.length?o.empty():o.remove():r.length&&(o=$('<ul class="labelList" />').prependTo(d)),i=0;i<r.length;i++)s=r[i],(n=$('<li><a href="'+s.link+'" class="badge label '+s.cssClassName+'">'+WCF.String.escapeHTML(s.label)+"</a></li>").appendTo(o)).before(" ");else for((o=(l=$("header.wbbThread[data-thread-id="+t+"]")).find(".labelList")).length?r.length?o.empty():o.parent().remove():r.length&&(n=$('<li><fa-icon size="16" name="tags"></fa-icon> </li>').prependTo(l.find(".contentHeaderMetaData")),o=$('<ul class="labelList" />').appendTo(n)),i=0;i<r.length;i++)s=r[i],(n=$('<li><span class="badge label '+s.cssClassName+'">'+WCF.String.escapeHTML(s.label)+"</span></li>").appendTo(o)).after(" ")},showErrors:function(e){e.label&&$("#threadEditorLabel").find(".labelList").each((function(t,a){var i=$(a),s=i.data("objectID");e.label.labelIDs[s]&&$('<small class="innerError">'+WCF.Language.get("wcf.label.error.missing")+"</small>").insertAfter(i)}))}}),WBB.Thread.Editor.Language=WCF.Language.Chooser.extend({init:function(e,t,a,i,s,n){this._languages=i,this._super(e,t,a,i,s,n),$("#threadEditor").data("wbbThreadEditor").registerCallback(this)},getValues:function(e,t){return t.default.threadLanguageID&&(t.default.languageID=t.default.threadLanguageID,delete t.default.threadLanguageID),t},saved:function(e,t,a){"board"===e&&$("#thread"+t+" > .columnSubject .statusDisplay .iconFlag").attr("src",this._languages[a.returnValues.default.languageID].iconPath)}}),WBB.Thread.Editor.TagList=Class.extend({_api:null,init:function(){$("#threadEditor").data("wbbThreadEditor").registerCallback(this),require(["WoltLabSuite/Core/Ui/ItemList","Ui/SimpleDropdown"],function(e,t){t.destroy("tagSearchInputThread"),this._api=e}.bind(this))},getValues:function(e,t){var a,i,s,n;for(delete t.tags,a=[],s=0,n=(i=this._api.getValues("tagSearchInputThread")).length;s<n;s++)a.push(i[s].value);return t.tag=a.length?a:["__wcf_noTags"],t},saved:function(e,t,a){}}),WBB.Thread.InlineEditor=WCF.InlineEditor.extend({_advancedIsDisabled:!1,_boardID:0,_environment:"thread",_permissions:{},_redirectURL:"",_updateHandler:null,_setOptions:function(){this._boardID=0,this._environment="thread",this._options=[{label:WCF.Language.get("wbb.thread.edit.done"),optionName:"done"},{label:WCF.Language.get("wbb.thread.edit.undone"),optionName:"undone"},{label:WCF.Language.get("wbb.thread.edit.close"),optionName:"close"},{label:WCF.Language.get("wbb.thread.edit.open"),optionName:"open"},{label:WCF.Language.get("wbb.thread.edit.sticky"),optionName:"sticky"},{label:WCF.Language.get("wbb.thread.edit.scrape"),optionName:"scrape"},{label:WCF.Language.get("wbb.thread.edit.enable"),optionName:"enable"},{label:WCF.Language.get("wbb.thread.edit.disable"),optionName:"disable"},{label:WCF.Language.get("wbb.thread.edit.move"),optionName:"move"},{label:WCF.Language.get("wbb.thread.edit.removeLink"),optionName:"removeLink"},{label:WCF.Language.get("wbb.thread.edit.trash"),optionName:"trash"},{label:WCF.Language.get("wbb.thread.edit.restore"),optionName:"restore"},{label:WCF.Language.get("wbb.thread.edit.delete"),optionName:"delete"},{optionName:"divider"},{label:WCF.Language.get("wbb.thread.edit.markThread"),optionName:"markThread"},{label:WCF.Language.get("wbb.thread.edit.unmarkThread"),optionName:"unmarkThread"},{label:WCF.Language.get("wbb.thread.edit.markPosts"),optionName:"markPosts"},{label:WCF.Language.get("wbb.thread.edit.advanced"),optionName:"advanced",isQuickOption:!0}]},setUpdateHandler:function(e){this._updateHandler=e}
1,_getTriggerElement:function(e){return e.find(".jsThreadInlineEditor")},_validate:function(e,t){var a,i=$("#"+e).data("threadID");if(this._updateHandler.getValue(i,"isLink"))return!("removeLink"!==t||!this._getPermission("canMoveThread"));switch(t){case"close":case"open":return!!this._getPermission("canCloseThread")&&("open"===t?this._updateHandler.getValue(i,"isClosed"):!this._updateHandler.getValue(i,"isClosed"));case"delete":return!!this._getPermission("canDeleteThreadCompletely")&&this._updateHandler.getValue(i,"isDeleted");case"done":case"undone":return!!this._updateHandler.getValue(i,"canMarkAsDone")&&("undone"===t?this._updateHandler.getValue(i,"isDone"):!this._updateHandler.getValue(i,"isDone"));case"restore":return!!this._getPermission("canRestoreThread")&&this._updateHandler.getValue(i,"isDeleted");case"trash":return!!this._getPermission("canDeleteThread")&&!this._updateHandler.getValue(i,"isDeleted");case"sticky":case"scrape":return!(!this._getPermission("canPinThread")||this._updateHandler.getValue(i,"isAnnouncement"))&&("scrape"===t?this._updateHandler.getValue(i,"isSticky"):!this._updateHandler.getValue(i,"isSticky"));case"enable":return!!this._getPermission("canEnableThread")&&!this._updateHandler.getValue(i,"isDeleted")&&this._updateHandler.getValue(i,"isDisabled");case"disable":return!!this._getPermission("canEnableThread")&&!this._updateHandler.getValue(i,"isDeleted")&&!this._updateHandler.getValue(i,"isDisabled");case"move":return this._getPermission("canMoveThread");case"markThread":return"thread"===this._environment&&(a=document.getElementById("wbbThreadClipboardMark"))&&!a.checked;case"unmarkThread":return"thread"===this._environment&&(a=document.getElementById("wbbThreadClipboardMark"))&&a.checked;case"markPosts":return"thread"===this._environment&&Array.from(document.querySelectorAll(".wbbThreadPostList .wbbPost .jsClipboardItem")).some((e=>!e.checked));case"advanced":return!this._advancedIsDisabled}return!1},_execute:function(e,t){var a,i,s,n,r;if(!this._validate(e,t))return!1;switch(t){case"close":case"open":a="open"===t?0:1,this._updateThread(e,t,{isClosed:a});break;case"sticky":case"scrape":i="scrape"===t?0:1,this._updateThread(e,t,{isSticky:i});break;case"done":case"undone":s="done"===t?1:0,this._updateThread(e,t,{isDone:s});break;case"enable":require(["WoltLabSuite/Forum/Ui/Thread/Enable"],function(a){a.init(this._elements[e].data("threadID"),function(a,i){a?this._updateThread(e,t,{isDisabled:0,updateTime:i}):window.location.reload()}.bind(this))}.bind(this));break;case"disable":n=this,WCF.System.Confirmation.show(WCF.Language.get("wcf.dialog.confirmation.disable.indeterminate"),(function(a){"confirm"===a&&n._updateThread(e,t,{isDisabled:1})}));break;case"move":r=this._elements[e].data("threadID"),WBB.Thread.MoveHandler.prepare([r],$.proxy((function(e){this._updateHandler.update(r,e.returnValues.threadData[r])}),this),this._boardID,this._environment);break;case"removeLink":this._updateThread(e,t,{removeLink:1});break;case"delete":n=this,WCF.System.Confirmation.show(WCF.Language.get("wbb.thread.confirmDelete"),(function(a){"confirm"===a&&n._updateThread(e,t,{deleted:1})}));break;case"restore":this._updateThread(e,t,{isDeleted:0});break;case"trash":n=this,WCF.System.Confirmation.show(WCF.Language.get("wbb.thread.confirmTrash"),(function(a){"confirm"===a&&n._updateThread(e,t,{isDeleted:1,reason:$("#wcfSystemConfirmationContent").find("textarea").val()})}),{},$('<div class="section"><dl><dt>'+WCF.Language.get("wbb.thread.confirmTrash.reason")+'</dt><dd><textarea cols="40" rows="4" /></dd></dl></div>'));break;case"markThread":case"unmarkThread":document.getElementById("wbbThreadClipboardMark").click();break;case"markPosts":document.querySelectorAll(".wbbThreadPostList .wbbPost .jsClipboardItem").forEach((e=>{e.checked||e.click()}));break;case"advanced":WBB.Thread.Editor.beginEdit(this._environment,this._elements[e].data("threadID"));break;default:return!1}return!0},_updateThread:function(e,t,a){var i,s;"delete"===t||"removeLink"===t?(i=this,s=this._elements[e].data("threadID"),new WCF.Action.Proxy({autoSend:!0,data:{actionName:t,className:"wbb\\data\\thread\\ThreadAction",objectIDs:[s]},success:function(e){i._updateHandler.update(s,e.returnValues.threadData[s])}})):(this._updateData.push({data:a,elementID:e,optionName:t}),this._proxy.setOption("data",{actionName:t,className:"wbb\\data\\thread\\ThreadAction",objectIDs:[this._elements[e].data("threadID")],parameters:{data:a}}
1),this._proxy.sendRequest())},_updateState:function(){var e,t,a,i;for(this._notification.show(),e=0,t=this._updateData.length;e<t;e++){if(void 0!==(a=this._updateData[e]).data.isSticky&&this._redirectURL)return void(window.location=this._redirectURL);if(void 0!==a.data.isDisabled&&0===a.data.isDisabled)return void window.location.reload();i=$("#"+a.elementID).data("threadID"),this._updateHandler.update(i,a.data)}},_getPermission:function(e){return this._permissions[e]?this._permissions[e]:0},disableAdvancedOptions:function(e){void 0===e&&(e=!0),this._advancedIsDisabled=!!e},setEnvironment:function(e,t,a){"board"!==e&&(e="thread"),this._boardID=t||0,this._environment=e,this._redirectURL=a},setPermission:function(e,t){this._permissions[e]=t},setPermissions:function(e){for(var t in e)this.setPermission(t,e[t])}}),WBB.Thread.Clipboard=Class.extend({_boardID:0,_environment:"board",_updateHandler:null,init:function(e,t,a){this._updateHandler=e,this._environment=t,this._boardID=a||0,require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wbb.thread",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){switch(e.data.actionName){case"com.woltlab.wbb.thread.assignLabel":WBB.Thread.AssignLabelHandler.prepare(e.data.parameters);break;case"com.woltlab.wbb.thread.copy":WBB.Thread.CopyHandler.prepare(e.data.parameters);break;case"com.woltlab.wbb.thread.merge":new WBB.Thread.MergeHandler(e.data.parameters.objectIDs).load();break;case"com.woltlab.wbb.thread.move":WBB.Thread.MoveHandler.prepare(e.data.parameters.objectIDs,$.proxy(this._move,this),this._boardID,this._environment)}null!==e.responseData&&this._evaluateResponse(void 0,e.responseData,"com.woltlab.wbb.thread",e.data.actionName,null)},_move:function(e){window.location.reload()},_evaluateResponse:function(e,t,a,i,s){if("com.woltlab.wbb.thread"===a&&t.returnValues.threadData&&$.getLength(t.returnValues.threadData)){for(var n in t.returnValues.threadData)this._updateHandler.update(n,t.returnValues.threadData[n],!1);WCF.Clipboard.reload()}}}),WBB.Thread.UpdateHandler=Class.extend({_updateHandlerPromise:null,_updateHandler:null,init:function(){console.warn("WBB.Thread.UpdateHandler is deprecated since version 5.5. Use WoltLabSuite/Forum/Handler/Thread/UpdateHandler instead.")},setMarkAsDoneHandler:function(e){},update:function(e,t,a){this._updateHandler.update(e,t,a)},getValue:function(e,t){return this._updateHandler.getValue(e,t)}}),WBB.Thread.UpdateHandler.Board=WBB.Thread.UpdateHandler.extend({init:function(){console.warn("WBB.Thread.UpdateHandler.Board is deprecated since version 5.5. Use WoltLabSuite/Forum/Handler/Thread/BoardUpdateHandler instead."),this._updateHandlerPromise=require(["WoltLabSuite/Forum/Handler/Thread/BoardUpdateHandler"]).then((([{BoardUpdateHandler:e}])=>(this._updateHandler=new e,this._updateHandler)))}}),WBB.Thread.MergeHandler=Class.extend({_className:"",_dialog:null,_dialogTitle:"",_objectIDs:[],_proxy:null,_successMessage:"",init:function(e){this._className="wbb\\data\\thread\\ThreadAction",this._dialogTitle=WCF.Language.get("wbb.thread.edit.merge"),this._objectIDs=e,this._successMessage=WCF.Language.get("wbb.thread.edit.merge.success"),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},load:function(){this._proxy.setOption("data",{actionName:"prepareMerge",className:this._className,objectIDs:this._objectIDs}),this._proxy.sendRequest()},_success:function(e,t,a){var i;e.returnValues.redirectURL?new WCF.System.Notification(this._successMessage).show((function(){window.location.href===e.returnValues.redirectURL?window.location.reload():window.location=e.returnValues.redirectURL})):(null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template),this._dialog.wcfDialog({title:this._dialogTitle})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("show")),i=this._dialog.find(".formSubmit > button[data-type=submit]").disable().click($.proxy(this._submit,this)),this._dialog.find("input[type=radio]").change((function(){i.enable()})))},_submit:function(){this._dialog.find(".formSubmit > button[data-type=submit]").disable(),this._proxy.setOption("data",{actionName:"merge",className:this._className,objectIDs:this._objectIDs,parameters:this._getParameters()}
1),this._proxy.sendRequest()},_getParameters:function(){return{threadID:this._dialog.find("input[type=radio]:checked").val()}}}),WBB.Thread.AssignLabelHandler={_boardID:0,_dialog:null,_objectIDs:[],prepare:function(e){this._boardID=e.boardID,this._objectIDs=e.objectIDs,null===this._dialog?(this._dialog=$("<div />").appendTo(document.body),this._dialog.html(e.template),this._dialog.wcfDialog({title:WCF.Language.get("wbb.thread.edit.assignLabel")})):(this._dialog.html(e.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .buttonPrimary").click($.proxy(this._click,this))},_click:function(){var e={};this._dialog.find(".labelList > .dropdown").each((function(t,a){var i=$(a);i.data("labelID")&&(e[i.data("groupID")]=i.data("labelID"))})),new WCF.Action.Proxy({autoSend:!0,data:{actionName:"assignLabel",className:"wbb\\data\\thread\\ThreadAction",objectIDs:this._objectIDs,parameters:{boardID:this._boardID,labelIDs:e}},success:$.proxy(this._success,this)})},_success:function(e,t,a){var i,s,n,r,o,d=e.returnValues.labels;for(i=0;i<e.objectIDs.length;i++)for((n=(s=$("#thread"+e.objectIDs[i]+" > .columnSubject")).children(".labelList")).length?d.length?n.empty():n.remove():d.length&&(n=$('<ul class="labelList" />').prependTo(s)),r=0;r<d.length;r++)o=d[r],$('<li><a href="'+o.link+'" class="badge label '+o.cssClassName+'">'+WCF.String.escapeHTML(o.label)+"</a></li>").appendTo(n).before(" ");this._dialog.wcfDialog("close"),WCF.Clipboard.reload(),(new WCF.System.Notification).show()}},WBB.Thread.CopyHandler={_boardID:0,_i:0,_objectIDs:[],prepare:function(e){this._boardID=e.boardID,this._i=0,this._objectIDs=e.objectIDs,this.copy()},copy:function(e){!0===e&&this._i++;var t=WCF.Language.get("wbb.thread.copy.title",{count:this._objectIDs.length,item:this._i+1});this._i+1==this._objectIDs.length?new WCF.System.Worker("copy","wbb\\data\\thread\\ThreadAction",t,{boardID:this._boardID,sourceThreadID:this._objectIDs[this._i]}):new WCF.System.Worker("copy","wbb\\data\\thread\\ThreadAction",t,{boardID:this._boardID,sourceThreadID:this._objectIDs[this._i]},(function(e){e._dialog.wcfDialog("option","onClose",null),e._dialog.wcfDialog("option","closeConfirmMessage",null),e._dialog.wcfDialog("close"),WBB.Thread.CopyHandler.copy(!0)}))}},WBB.Thread.MoveHandler={_boardID:0,_callback:null,_dialog:null,_didInit:!1,_environment:"",_proxy:null,_threadIDs:[],_init:function(){this._dialog=$("<div />").hide().appendTo(document.body),this._proxy=new WCF.Action.Proxy,this._didInit=!0},prepare:function(e,t,a,i){$.isFunction(t)?(this._callback=t,this._boardID=a||0,this._threadIDs=e,this._environment=i,this._didInit||this._init(),this._proxy.setOption("data",{actionName:"prepareMove",className:"wbb\\data\\thread\\ThreadAction",objectIDs:this._threadIDs,parameters:{boardID:this._boardID}}),this._proxy.setOption("success",$.proxy(this._success,this)),this._proxy.sendRequest()):console.debug("[WBB.Thread.MoveHandler] Given callback is invalid.")},_success:function(e,t,a){this._dialog.data("objectIDs",e.objectIDs).html(e.returnValues.template),this._dialog.wcfDialog({title:WCF.Language.get("wbb.thread.edit.moveThreads")}),this._dialog.find(".formSubmit > input[type=submit]").click($.proxy(this._move,this))},_move:function(e){var t=this._dialog.find("#showMoveNotice").prop("checked"),a=parseInt(this._dialog.find("#boardID").prop("value"));if(a){if(a==this._boardID&&1==this._threadIDs.length&&"thread"===this._environment)return this._dialog.find("#boardID").next("small.innerError").remove(),void $('<small class="innerError">'+WCF.Language.get("wbb.thread.edit.moveDestination.error.equalsOrigin")+"</small>").insertAfter(this._dialog.find("#boardID"));this._proxy.setOption("data",{actionName:"move",className:"wbb\\data\\thread\\ThreadAction",objectIDs:this._dialog.data("objectIDs"),parameters:{boardID:a,showMoveNotice:t}}),this._proxy.setOption("success",$.proxy((function(e){this._callback(e)}),this)),this._proxy.sendRequest()}this._dialog.wcfDialog("close")}},WBB.Thread.TypeChooser=Class.extend({_boardIDsContainer:null,_type:0,init:function(e){var t,a;this._type=parseInt(e),this._boardIDsContainer=$("#boardIDsContainer"),t=$("input[name=type]").click($.proxy(this._click,this)),a=this,t.each((function(e,t){var i=$(t);if(i.prop("value")==a._type)return i.prop("checked","checked"),a._update(),!1}))},_click:function(e){this._type=parseInt($(e.currentTarget).prop("value")),this._update()},_update:function(){switch(this._type){case 0:case 1:this._boardIDsContainer.hide();break;case 2:this._boardIDsContainer.show()}}}),WBB.Thread.MarkAsDone=Class.extend({_proxy:null,_updateHandler:null,_threads:{},init:function(e){this._updateHandler=e,this._threads={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});var t=this;$(".wbbThread").each((function(e,a){var i=$(a),s=i.data("threadID");t._threads[s]=i,i.data("canMarkAsDone")&&t.watch(s)})),this._updateHandler.setMarkAsDoneHandler(this)},watch:function(e){this._threads[e]&&this._threads[e].data("canMarkAsDone")&&this._threads[e].find(".jsMarkAsDone").data("threadID",e).dblclick($.proxy(this._dblclick,this))},_dblclick:function(e){const t="square-check"===e.currentTarget.querySelector("fa-icon").name,a=e.currentTarget.dataset.threadId;this._proxy.setOption("data",{actionName:t?"undone":"done",className:"wbb\\data\\thread\\ThreadAction",objectIDs:[a]}
1),this._proxy.sendRequest()},_success:function(e,t,a){for(var i in e.returnValues.threadData)this._updateHandler.update(i,e.returnValues.threadData[i])}}),WBB.Post={},WBB.Post.Add={},WBB.Post.Add.MessageOptions=Class.extend({_subscribeButton:null,init:function(){this._subscribeButton=$(".jsSubscribeButton"),WCF.System.Event.addListener("com.woltlab.wcf.ckeditor5","updateMessageOptions",$.proxy(this._updateMessageOptions,this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","updatedSubscription",$.proxy(this._updateMessageOptions,this))},_updateMessageOptions:function(e){var t=$("#settings_text").find("input[name=subscribeThread]");t.length&&("1"===this._subscribeButton.attr("data-is-subscribed")?t.prop("checked","checked"):t.prop("checked",!1))}}),WBB.Post.Clipboard=Class.extend({_postManager:null,_threadUpdateHandler:null,init:function(e){this._postManager=e,WCF.System.Event.addListener("com.woltlab.wcf.clipboard","com.woltlab.wbb.post",function(e){null===e.responseData?this._execute(e.data.actionName,e.data.parameters):this._evaluateResponse(e.data.actionName,e.responseData)}.bind(this))},setThreadUpdateHandler:function(e){this._threadUpdateHandler=e},_execute:function(e,t){switch(e){case"com.woltlab.wbb.post.copyToExistingThread":WBB.Post.CopyToExistingThread.prepare(t);break;case"com.woltlab.wbb.post.copyToNewThread":WBB.Post.CopyToNewThread.prepare(t);break;case"com.woltlab.wbb.post.merge":new WBB.Post.MergeHandler(t.objectIDs).load();break;case"com.woltlab.wbb.post.moveToNewThread":WBB.Post.MoveToNewThread.prepare(t)}},_evaluateResponse:function(e,t){var a;if("com.woltlab.wbb.post.moveToExistingThread"!==e){if(t.returnValues.postData&&$.getLength(t.returnValues.postData)&&this._postManager._ajaxSuccess(t),this._threadUpdateHandler&&t.returnValues.threadData&&$.getLength(t.returnValues.threadData))for(a in t.returnValues.threadData)t.returnValues.threadData.hasOwnProperty(a)&&this._threadUpdateHandler.update(a,t.returnValues.threadData[a])}else(new WCF.System.Notification).show((function(){window.location=t.returnValues.redirectURL}))}}),WBB.Post.MergeHandler=WBB.Thread.MergeHandler.extend({init:function(e){this._super(e),this._className="wbb\\data\\post\\PostAction",this._dialogTitle=WCF.Language.get("wbb.post.edit.merge"),this._successMessage=WCF.Language.get("wbb.post.edit.merge.success")},_success:function(e,t,a){this._super(e,t,a),void 0===e.returnValues.redirectURL&&this._dialog.find(".formSubmit > button[data-type=submit]").enable()},_getParameters:function(){var e=[];return this._dialog.find(".jsPostContainer").each((function(t,a){e.push($(a).data("postID"))})),{postOrder:e}}}),WBB.Post.CopyToExistingThread={prepare:function(e){new WCF.System.Worker("copyToExistingThread","wbb\\data\\post\\PostAction",WCF.Language.get("wbb.post.copy.title"),e)}},WBB.Post.CopyToNewThread={_boardSelect:null,_dialog:null,_objectIDs:[],_submitButton:null,_topic:null,prepare:function(e){null===this._dialog?(this._dialog=$("<div>"+e.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wbb.post.copy.title")})):this._dialog.html($.parseHTML(e.template)).wcfDialog("open"),this._boardSelect=$("#postCopyNewThreadBoardID"),this._objectIDs=e.objectIDs,this._submitButton=this._dialog.find(".formSubmit > button[data-type=submit]").disable().click($.proxy(this._submit,this)),this._topic=$("#postCopyNewThreadTopic").keyup($.proxy(this._keyUp,this)).focus(),$.trim(this._topic.val()).length&&this._submitButton.enable(),$.browser.mozilla&&$.browser.touch&&this._topic.on("input",$.proxy(this._keyUp,this))},_keyUp:function(){$.trim(this._topic.val()).length>0?this._submitButton.enable():this._submitButton.disable()},_submit:function(){this._dialog.wcfDialog("close"),new WCF.System.Worker("copyToNewThread","wbb\\data\\post\\PostAction",WCF.Language.get("wbb.post.copy.title"),{boardID:parseInt(this._boardSelect.val()),objectIDs:this._objectIDs,topic:$.trim(this._topic.val())})}},WBB.Post.MoveToNewThread={_boardSelect:null,_dialog:null,_objectIDs:[],_submitButton:null,_topic:null,prepare:function(e){null===this._dialog?(this._dialog=$("<div>"+e.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wbb.post.moveToNewThread")})):this._dialog.html($.parseHTML(e.template)).wcfDialog("open"),this._boardSelect=$("#postMoveNewThreadBoardID"),this._objectIDs=e.objectIDs,this._submitButton=this._dialog.find(".formSubmit > button[data-type=submit]").disable().click($.proxy(this._submit,this)),this._topic=$("#postMoveNewThreadTopic").keyup($.proxy(this._keyUp,this)).focus(),this._topic[0].addEventListener("input",(()=>this._keyUp())),$.trim(this._topic.val()).length&&this._submitButton.enable(),$.browser.mozilla&&$.browser.touch&&this._topic.on("input",$.proxy(this._keyUp,this))},_keyUp:function(){$.trim(this._topic.val()).length>0?this._submitButton.enable():this._submitButton.disable()},_submit:function(){this._submitButton.disable(),new WCF.Action.Proxy({autoSend:!0,data:{actionName:"moveToNewThread",className:"wbb\\data\\post\\PostAction",objectIDs:this._objectIDs,parameters:{boardID:parseInt(this._boardSelect.val()),topic:$.trim(this._topic.val())}},success:$.proxy(this._success,this)})},_success:function(e,t,a){(new WCF.System.Notification).show((function(){window.location=e.returnValues.redirectURL}))}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.