PageSourceSearch

https://vulndetect.org/assets/forum/flags-detail.8fa155bb03102ea450d1.min.js

js vulndetect.org collected 2026-09-26 04:44:19 UTC 11,123 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,5719,18314,22067,34271,36228,42289,43602,65928,87212,99127],{10281(D,x,r){var d,h;d=[r(52473),r(81335),r(28061),r(47283),r(49897),r(65303),r(29930)],h=(function(l,y,o,E,m,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"),c=document.getElementById("note");switch(t){case"assign":$("#assignee").val(app.user.uid);case"update":{const i=$("#attributes").serializeArray().reduce((b,I)=>(b[I.name]=I.value,b),{});m.put(`/flags/${ajaxify.data.flagId}`,i).then(({history:b})=>{a.success("[[flags:updated]]"),s.reloadHistory(b)}).catch(a.error);break}case"addEditNote":{const i=this.closest('[component="flag/note"]');let b,I;if(i){b=i.getAttribute("data-datetime");const n=i.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&&m.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":m.post(`/flags/${ajaxify.data.flagId}/notes`,{note:c.value,datetime:parseInt(c.getAttribute("data-datetime"),10)}).then(i=>{a.success("[[flags:note-added]]"),s.reloadNotes(i.notes),s.reloadHistory(i.history),c.removeAttribute("data-datetime")}).catch(a.error);break;case"delete-note":{const i=parseInt(this.closest("[data-datetime]").getAttribute("data-datetime"),10);g.confirm("[[flags:delete-note-confirm]]",function(b){b&&m.del(`/flags/${ajaxify.data.flagId}/notes/${i}`,{}).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 i=[r(92619)];(function(b){b.newChat(e)}).apply(null,i)}).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",m.del,`/posts/${ajaxify.data.target.pid}/state`);break;case"purge-post":A("purge",m.del,`/posts/${ajaxify.data.target.pid}`);break;case"restore-post":A("restore",m.put,`/posts/${ajaxify.data.target.pid}/state`);break;case"delete-message":{g.confirm("[[flags:delete-message-confirm]]",function(i){i&&m.del(`/chats/${ajaxify.data.target.roomId}/messages/${ajaxify.data.target.mid}`,{}).then(ajaxify.refresh).catch(a.error)});break}case"delete-flag":{g.confirm("[[flags:delete-flag-confirm]]",function(i){i&&m.del(`/flags/${ajaxify.data.flagId}`,{}).then(()=>{a.success("[[flags:flag-deleted]]"),ajaxify.go("flags")}).catch(a.error)});break}}})};function A(t,e,c){g.confirm(`[[topic:post-${t}-confirm]]`,function(i){i&&e(c).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 c=l.get("flag/notes");c.empty(),c.html(e),c.find("span.timeago").timeago()})},s.reloadHistory=function(t){app.parseAndTranslate("flags/detail","history",{history:t},function(e){const c=l.get("flag/history");c.empty(),c.html(e),c.find("span.timeago").timeago()})},s}).apply(x,d),h!==void 0&&(D.exports=h)},47283(D,x,r){var d,h;d=[r(49897),r(65303),r(29930)],h=(function(l,y,o){const E={};E.account=function(g,a){m(g,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",a)},E.content=function(g,a){m(g,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",a)},E.purge=function(g,a){m(g,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",a)};function m(g,a,s,A,t){y.confirm(a,function(e){e&&l.del(`/users/${encodeURIComponent(g)}${s}`,{}).then(()=>
1{if(o.success(A),typeof t=="function")return t()}).catch(o.error)})}return E}).apply(x,d),h!==void 0&&(D.exports=h)},28061(D,x,r){var d,h;d=[r(49897),r(65303),r(29930),r(81335)],h=(function(l,y,o,E){const m={};m.banAccount=function(a,s){a=a||ajaxify.data.theirid,g({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(A){l.put("/users/"+encodeURIComponent(a)+"/ban",{until:A.until,reason:A.reason||""}).then(()=>{if(typeof s=="function")return s();ajaxify.refresh()}).catch(o.error)}})},m.unbanAccount=function(a){g({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(s){l.del("/users/"+encodeURIComponent(a)+"/ban",{reason:s.reason||""}).then(()=>{ajaxify.refresh()}).catch(o.error)}})},m.muteAccount=function(a,s){a=a||ajaxify.data.theirid,g({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(A){l.put("/users/"+a+"/mute",{until:A.until,reason:A.reason||""}).then(()=>{if(typeof s=="function")return s();ajaxify.refresh()}).catch(o.error)}})},m.unmuteAccount=function(a){g({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(s){l.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(c,i){return c[i.name]=i.value,c},{});if(Object.hasOwn(e,"length")){const i=parseInt(e.unit,10)?24:1;e.until=e.length>0?Date.now()+e.length*36e5*i:0}else e.until=0;a.onSubmit(e)}}}});return t.find("[data-key]").on("click",function(){const e=s.find(c=>String(c.key)===$(this).attr("data-key"));e&&e.body&&t.find('[name="reason"]').val(e.body)}),t}return m.throwModal=g,m}).apply(x,d),h!==void 0&&(D.exports=h)},49897(D,x,r){r.r(x),r.d(x,{del:()=>b,get:()=>A,head:()=>t,patch:()=>c,post:()=>e,put:()=>i});var d=r(91749),h=r.n(d),l=r(65303),y=r(17459),o=r.n(y),E=r(68636),m=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"}),j=await y.translate("[[error:api.reauth-required]]",config.userLang);(0,l.confirm)(j,v=>{v&&(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 j=p.get("content-type"),v=j&&j.startsWith("application/json");let P;if(n.method!=="HEAD"&&(v?P=await u.json():P=await u.text()),!u.ok){if(P){const O=v&&(P.status?.message||P.error||""),M=typeof P=="string"?P:u.statusText||`[[error:api.${u.status}]]`;throw new Error(v&&O?O:M)}throw new Error(u.statusText)}return v&&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 c(n,f,u,p){return I("PATCH",n,f,u,p)}function i(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,j){return typeof p=="function"&&(j=p,p={}),a({url:f,method:n,data:u,headers:{"x-csrf-token":config.csrf_token,...p}},j)}},65303(D,x,r){r.r(x),r.d(x,{alert:()=>E,confirm:()=>m,dialog:()=>o,prompt:()=>g,promptPassword:()=>a});var d=r(33530),h=r.n(d),l=r(17459),y=r.n(l);d.setDefaults({locale:config.userLang}),l.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,c,i]=await Promise.all([l.translate(t.title||""),s(t)||"",A(t.buttons)]);return d.dialog({...t,title:e,message:c,buttons:i})}async function E(t,e){const[c,i]=await Promise.all([t&&t.title?l.translate(t.title):null,s(t)]);return e=typeof e=="function"?e:t.callback,d.alert({...t,title:c,message:i,callback:e})}async function m(t,e){const[c,i]=await Promise.all([t&&t.title?l.translate(t.title):null,s(t)]);return e=typeof e=="function"?e:t.callback,d.confirm({...t,title:c,message:i,callback:e})}async function g(t,e){const[c,i]=await Promise.all([l.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:c,message:i,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:l.translate(e||"")}async function A(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async c=>({...c,label:await l.translateKey(c.label)})))}},68636(D,x,r){var d;d=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(o,E){o=String(o),this._keys.indexOf(o)===-1&&this._keys.push(o),this._store[o]=E},h.prototype.getItem=function(o){return o=String(o),this._keys.indexOf(o)===-1?null:this._store[o]},h.prototype.removeItem=function(o){o=String(o),this._keys=this._keys.filter(function(E){return E!==o}),this._store[o]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(o){return o=parseInt(o,10)||0,this._keys[o]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let l;const y=Date.now().toString();try{if(l=window.localStorage,l.setItem(y,y),l.getItem(y)!==y)throw Error("localStorage behaved unexpectedly");return l.removeItem(y),l}catch(o){console.warn(o),console.warn("localStorage failed, falling back on sessionStorage");try{if(l=window.sessionStorage,l.setItem(y,y),l.getItem(y)!==y)throw Error("sessionStorage behaved unexpectedly");return l.removeItem(y),l}catch(E){return console.warn(E),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).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.