1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,5719,18314,22067,34271,36228,42289,43602,49897,87212,99127],{10281(D,x,r){var d,m;d=[r(52473),r(81335),r(28061),r(47283),r(49897),r(65303),r(29930)],m=(function(c,y,o,E,h,g,a){const s={};s.init=function(){$("#state").val(ajaxify.data.state).removeAttr("disabled"),$("#assignee").val(ajaxify.data.assignee).removeAttr("disabled"),$("#content > div").on("click","[data-action]",function(){const t=this.getAttribute("data-action"),e=$(this).parents("[data-uid]").attr("data-uid"),i=document.getElementById("note");switch(t){case"assign":$("#assignee").val(app.user.uid);case"update":{const l=$("#attributes").serializeArray().reduce((b,I)=>(b[I.name]=I.value,b),{});h.put(`/flags/${ajaxify.data.flagId}`,l).then(({history:b})=>{a.success("[[flags:updated]]"),s.reloadHistory(b)}).catch(a.error);break}case"addEditNote":{const l=this.closest('[component="flag/note"]');let b,I;if(l){b=l.getAttribute("data-datetime");const n=l.getAttribute("data-index");I=ajaxify.data.notes[n].content}g.prompt({title:`[[flags:${b?"edit":"add"}-note]]`,inputType:"textarea",rows:3,value:I,callback:n=>{n&&h.post(`/flags/${ajaxify.data.flagId}/notes`,{note:n,datetime:b}).then(f=>{a.success("[[flags:note-added]]"),s.reloadNotes(f.notes),s.reloadHistory(f.history)}).catch(a.error)}});break}case"appendNote":h.post(`/flags/${ajaxify.data.flagId}/notes`,{note:i.value,datetime:parseInt(i.getAttribute("data-datetime"),10)}).then(l=>{a.success("[[flags:note-added]]"),s.reloadNotes(l.notes),s.reloadHistory(l.history),i.removeAttribute("data-datetime")}).catch(a.error);break;case"delete-note":{const l=parseInt(this.closest("[data-datetime]").getAttribute("data-datetime"),10);g.confirm("[[flags:delete-note-confirm]]",function(b){b&&h.del(`/flags/${ajaxify.data.flagId}/notes/${l}`,{}).then(I=>{a.success("[[flags:note-deleted]]"),s.reloadNotes(I.notes),s.reloadHistory(I.history)}).catch(a.error)});break}case"chat":r.e(92619).then(function(){var l=[r(92619)];(function(b){b.newChat(e)}).apply(null,l)}).catch(r.oe);break;case"ban":o.banAccount(e,ajaxify.refresh);break;case"unban":o.unbanAccount(e);break;case"mute":o.muteAccount(e,ajaxify.refresh);break;case"unmute":o.unmuteAccount(e);break;case"delete-account":E.account(e,ajaxify.refresh);break;case"delete-content":E.content(e,ajaxify.refresh);break;case"delete-all":E.purge(e,ajaxify.refresh);break;case"delete-post":A("delete",h.del,`/posts/${ajaxify.data.target.pid}/state`);break;case"purge-post":A("purge",h.del,`/posts/${ajaxify.data.target.pid}`);break;case"restore-post":A("restore",h.put,`/posts/${ajaxify.data.target.pid}/state`);break;case"delete-flag":{g.confirm("[[flags:delete-flag-confirm]]",function(l){l&&h.del(`/flags/${ajaxify.data.flagId}`,{}).then(()=>{a.success("[[flags:flag-deleted]]"),ajaxify.go("flags")}).catch(a.error)});break}}})};function A(t,e,i){g.confirm(`[[topic:post-${t}-confirm]]`,function(l){l&&e(i).then(ajaxify.refresh).catch(a.error)})}return s.reloadNotes=function(t){ajaxify.data.notes=t,y.render("flags/detail",{notes:t},"notes").then(function(e){const i=c.get("flag/notes");i.empty(),i.html(e),i.find("span.timeago").timeago()})},s.reloadHistory=function(t){app.parseAndTranslate("flags/detail","history",{history:t},function(e){const i=c.get("flag/history");i.empty(),i.html(e),i.find("span.timeago").timeago()})},s}).apply(x,d),m!==void 0&&(D.exports=m)},47283(D,x,r){var d,m;d=[r(49897),r(65303),r(29930)],m=(function(c,y,o){const E={};E.account=function(g,a){h(g,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",a)},E.content=function(g,a){h(g,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",a)},E.purge=function(g,a){h(g,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",a)};function h(g,a,s,A,t){y.confirm(a,function(e){e&&c.del(`/users/${encodeURIComponent(g)}${s}`,{}).then(()=>{if(o.success(A),typeof t=="function")return t()}).catch(o.error)})}return E}).apply(x,d),m!==void 0&&(D.exports=m)},28061(D,x,r){var d,m;d=[r(49897),r(65303),r(29930),r(81335)],m=(function(c,y,o,E){const h={};h.banAccount=function(a,s){a=a||ajaxify.data.theirid,g({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(A){c.put("/users/"+encodeURIComponent(a)+"/ban",{until:A.until,reason:A.reason||""}).then(()=>
1{if(typeof s=="function")return s();ajaxify.refresh()}).catch(o.error)}})},h.unbanAccount=function(a){g({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(s){c.del("/users/"+encodeURIComponent(a)+"/ban",{reason:s.reason||""}).then(()=>{ajaxify.refresh()}).catch(o.error)}})},h.muteAccount=function(a,s){a=a||ajaxify.data.theirid,g({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(A){c.put("/users/"+a+"/mute",{until:A.until,reason:A.reason||""}).then(()=>{if(typeof s=="function")return s();ajaxify.refresh()}).catch(o.error)}})},h.unmuteAccount=function(a){g({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(s){c.del("/users/"+a+"/mute",{reason:s.reason||""}).then(()=>{ajaxify.refresh()}).catch(o.error)}})};async function g(a){const s=await socket.emit("user.getCustomReasons",{type:a.type||""}),A=await E.render(a.tpl,{reasons:s}),t=await y.dialog({title:a.title,message:A,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:a.title,callback:function(){const e=t.find("form").serializeArray().reduce(function(i,l){return i[l.name]=l.value,i},{});if(Object.hasOwn(e,"length")){const l=parseInt(e.unit,10)?24:1;e.until=e.length>0?Date.now()+e.length*36e5*l:0}else e.until=0;a.onSubmit(e)}}}});return t.find("[data-key]").on("click",function(){const e=s.find(i=>String(i.key)===$(this).attr("data-key"));e&&e.body&&t.find('[name="reason"]').val(e.body)}),t}return h.throwModal=g,h}).apply(x,d),m!==void 0&&(D.exports=m)},49897(D,x,r){r.r(x),r.d(x,{del:()=>b,get:()=>A,head:()=>t,patch:()=>i,post:()=>e,put:()=>l});var d=r(91749),m=r.n(d),c=r(65303),y=r(17459),o=r.n(y),E=r(68636),h=r.n(E);const g=config.relative_path+"/api/v3";async function a(n,f){if(n.url=n.url.startsWith("/api")?config.relative_path+n.url:g+n.url,n.headers=n.headers||{},n.headers["x-return-to"]||(n.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof f=="function"){s(n).then(u=>f(null,u),u=>f(u));return}try{return await s(n)}catch(u){if(u.message===await y.translate("[[error:api.401]]",config.userLang)){const{url:p}=await(0,d.fire)("filter:admin.reauth",{url:"login"}),v=await y.translate("[[error:api.reauth-required]]",config.userLang);(0,c.confirm)(v,O=>{O&&(E.setItem("location-hash",window.location.hash),ajaxify.go(p))})}throw u}}async function s(n){const{url:f}=n;delete n.url,n.data&&!(n.data instanceof FormData)&&(n.data=JSON.stringify(n.data||{}),n.headers["content-type"]="application/json; charset=utf-8"),{options:n}=await(0,d.fire)("filter:api.options",{options:n}),n.data&&(n.body=n.data,delete n.data);const u=await fetch(f,n),{headers:p}=u;if(p.get("x-redirect"))return s({url:p.get("x-redirect"),...n});const v=p.get("content-type"),O=v&&v.startsWith("application/json");let P;if(n.method!=="HEAD"&&(O?P=await u.json():P=await u.text()),!u.ok){if(P){const j=O&&(P.status?.message||P.error||""),M=typeof P=="string"?P:u.statusText||`[[error:api.${u.status}]]`;throw new Error(O&&j?j:M)}throw new Error(u.statusText)}return O&&P&&P.hasOwnProperty("status")&&P.hasOwnProperty("response")?P.response:P}function A(n,f,u){return a({url:n+(f&&Object.keys(f).length?"?"+$.param(f):"")},u)}function t(n,f,u){return a({url:n+(f&&Object.keys(f).length?"?"+$.param(f):""),method:"HEAD"},u)}function e(n,f,u,p){return I("POST",n,f,u,p)}function i(n,f,u,p){return I("PATCH",n,f,u,p)}function l(n,f,u,p){return I("PUT",n,f,u,p)}function b(n,f,u,p){return I("DELETE",n,f,u,p)}function I(n,f,u,p,v){return typeof p=="function"&&(v=p,p={}),a({url:f,method:n,data:u,headers:{"x-csrf-token":config.csrf_token,...p}},v)}},65303(D,x,r){r.r(x),r.d(x,{alert:()=>E,confirm:()=>h,dialog:()=>o,prompt:()=>g,promptPassword:()=>a});var d=r(33530),m=r.n(d),c=r(17459),y=r.n(c);d.setDefaults({locale:config.userLang}),c.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{d.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),d.setLocale(config.userLang)});async function o(t){const[e,i,l]=await Promise.all([c.translate(t.title||""),s(t)||"",A(t.buttons)]);return d.dialog({...t,title:e,message:i,buttons:l})}async function E(t,e){const[i,l]=await Promise.all([t&&t.title?c.translate(t.title):null,s(t)]);return e=typeof e=="function"?e:t.callback,d.alert({...t,title:i,message:l,callback:e})}async function h(t,e){const[i,l]=await Promise.all([t&&t.title?c.translate(t.title):null,s(t)]);return e=typeof e=="function"?e:t.callback,d.confirm({...t,title:i,message:l,callback:e})}async function g(t,e){const[i,l]=await Promise.all([c.translate(typeof t=="string"?t:t.title),t&&t.message?s(t):null]);return e=typeof e=="function"?e:t.callback,d.prompt({...t,title:i,message:l,callback:e})}async function a(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{g({...t,inputType:"password",required:!0,value:"",callback:e})})}function s(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:c.translate(e||"")}async function A(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async i=>({...i,label:await c.translateKey(i.label)})))}},68636(D,x,r){var d;d=(function(){function m(){this._store={},this._keys=[]}m.prototype.isMock=!0,m.prototype.setItem=function(o,E){o=String(o),this._keys.indexOf(o)===-1&&this._keys.push(o),this._store[o]=E},m.prototype.getItem=function(o){return o=String(o),this._keys.indexOf(o)===-1?null:this._store[o]},m.prototype.removeItem=function(o){o=String(o),this._keys=this._keys.filter(function(E){return E!==o}),this._store[o]=null},m.prototype.clear=function(){this._keys=[],this._store={}},m.prototype.key=function(o){return o=parseInt(o,10)||0,this._keys[o]},Object.defineProperty&&Object.defineProperty(m.prototype,"length",{get:function(){return this._keys.length}});let c;const y=Date.now().toString();try{if(c=window.localStorage,c.setItem(y,y),c.getItem(y)!==y)throw Error("localStorage behaved unexpectedly");return c.removeItem(y),c}catch(o){console.warn(o),console.warn("localStorage failed, falling back on sessionStorage");try{if(c=window.sessionStorage,c.setItem(y,y),c.getItem(y)!==y)throw Error("sessionStorage behaved unexpectedly");return c.removeItem(y),c}catch(E){return console.warn(E),console.warn("sessionStorage failed, falling back on memory storage"),new m}}}).call(x,r,x,D),d!==void 0&&(D.exports=d)}}]);
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.