PageSourceSearch

https://brownsboard.com/assets/forum/topic-manage-editors.bba65c5bd12133b79133.min.js

js brownsboard.com collected 2026-10-09 22:41:03 UTC 9,158 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,1579,2067,3417,3602,4271,4459,7212,8314,9127,9897],{4459(D,_,l){var m,h;m=[l(4405),l(9930)],h=(function(d,g){const u={};let i;u.init=async function(v){if(i)return;const y=v.attr("data-pid"),{users:w,groups:t}=await socket.emit("posts.getEditors",{pid:y});let e=w,a=t;app.parseAndTranslate("modals/manage-editors",{editors:e,editorGroups:a},function(s){i=s;const f=i.find("#manage_editors_commit");$("body").append(i),i.find("#manage_editors_cancel").on("click",E),f.on("click",function(){O(y)}),d.user(i.find("#username"),{filters:["notbanned"]},function(c,n){e.find(r=>String(r.uid)===String(n.item.user.uid))||(e.push(n.item.user),app.parseAndTranslate("modals/manage-editors","editors",{editors:e},function(r){i.find('[component="topic/editors"]').html(r),i.find("#username").val("")}))}),d.group(i.find("#editor-group-search"),function(c,n){a.includes(n.item.group.name)||(a.push(n.item.group.name),app.parseAndTranslate("modals/manage-editors","editorGroups",{editorGroups:a},function(o){i.find('[component="topic/editor-groups"]').html(o),i.find("#editor-group-search").val("")}))}),i.on("click","button.remove-user-icon",function(){const c=$(this).parents("[data-uid]"),n=c.attr("data-uid");e=e.filter(o=>String(o.uid)!==String(n)),c.remove()}),i.on("click","button.remove-group-icon",function(){const c=$(this).parents("[data-name]"),n=c.attr("data-name");a=a.filter(o=>o!==n),c.remove()})})};function O(v){const y=i.find('[component="topic/editors"]>[data-uid]').map((t,e)=>$(e).attr("data-uid")).get(),w=i.find('[component="topic/editor-groups"]>[data-name]').map((t,e)=>$(e).attr("data-name")).get();socket.emit("posts.saveEditors",{pid:v,uids:y,groups:w},function(t){if(t)return g.error(t);E()})}function E(){i&&(i.remove(),i=null)}return u}).apply(_,m),h!==void 0&&(D.exports=h)},9897(D,_,l){l.r(_),l.d(_,{del:()=>f,get:()=>w,head:()=>t,patch:()=>a,post:()=>e,put:()=>s});var m=l(1749),h=l.n(m),d=l(5303),g=l(7459),u=l.n(g),i=l(8636),O=l.n(i);const E=config.relative_path+"/api/v3";async function v(n,o){if(n.url=n.url.startsWith("/api")?config.relative_path+n.url:E+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 o=="function"){y(n).then(r=>o(null,r),r=>o(r));return}try{return await y(n)}catch(r){if(r.status===401){const{url:p}=await(0,m.fire)("filter:admin.reauth",{url:"login"}),A=await g.translate("[[error:api.reauth-required]]",config.userLang);(0,d.confirm)(A,I=>{I&&(i.setItem("location-hash",window.location.hash),ajaxify.go(p))})}throw r}}async function y(n){const{url:o}=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,m.fire)("filter:api.options",{options:n}),n.data&&(n.body=n.data,delete n.data);const r=await fetch(o,n),{headers:p}=r;if(p.get("x-redirect"))return y({url:p.get("x-redirect"),...n});const A=p.get("content-type"),I=A&&A.startsWith("application/json");let P;if(n.method!=="HEAD"&&(I?P=await r.json():P=await r.text()),!r.ok){let M=r.statusText;if(P){const x=I&&(P.status?.message||P.error||""),C=typeof P=="string"?P:r.statusText||`[[error:api.${r.status}]]`;M=I&&x?x:C}const T=new Error(M);throw T.status=r.status,T}return I&&P&&P.hasOwnProperty("status")&&P.hasOwnProperty("response")?P.response:P}function w(n,o,r){return v({url:n+(o&&Object.keys(o).length?"?"+$.param(o):"")},r)}function t(n,o,r){return v({url:n+(o&&Object.keys(o).length?"?"+$.param(o):""),method:"HEAD"},r)}function e(n,o,r,p){return c("POST",n,o,r,p)}function a(n,o,r,p){return c("PATCH",n,o,r,p)}function s(n,o,r,p){return c("PUT",n,o,r,p)}function f(n,o,r,p){return c("DELETE",n,o,r,p)}function c(n,o,r,p,A){return typeof p=="function"&&(A=p,p={}),v({url:o,method:n,data:r,headers:{"x-csrf-token":config.csrf_token,...p}},A)}},4405(D,_,l){var m,h;m=[l(9897),l(9930),l(6e3),l(9787),l(5786)],h=(function(d,g,{Textcomplete:u},{TextareaEditor:i},{ContenteditableEditor:O}){const E={},v={delay:200,appendTo:null};E.init=t=>{const e={...v,...t},{input:a,onSelect:s}=e;app.loadJQueryUI(function(){a.autocomplete({position:y(),...e,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(f,c){w(a,s,f,c)}})})},E.user=function(t,e,a){typeof e=="function"&&(a=e,e={}),e=e||{},E.init({input:t,onSelect:a,source:(s,f)=>
1{e.query=s.term,d.get("/api/users",e,function(c,n){if(c)return g.error(c);if(n&&n.users){const o=n.users.map(function(r){return r&&{label:r.username,value:r.username,user:{uid:r.uid,name:r.username,slug:r.userslug,username:r.username,userslug:r.userslug,displayname:r.displayname,picture:r.picture,banned:r.banned,"icon:text":r["icon:text"],"icon:bgColor":r["icon:bgColor"]}}});f(o)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},E.group=function(t,e){E.init({input:t,onSelect:e,source:(a,s)=>{d.get("/groups",{query:a.term},function(f,c){if(f)return g.error(f);if(c&&c.groups.length){const n=c.groups.map(function(o){return o&&{label:o.name,value:o.name,group:o}});s(n)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},E.tag=function(t,e){E.init({input:t,onSelect:e,delay:100,source:(a,s)=>{socket.emit("topics.autocompleteTags",{query:a.term,cid:ajaxify.data.cid||0},function(f,c){if(f)return g.error(f);c&&s(c),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function y(){const t=document.querySelector("html").getAttribute("data-dir")==="rtl"?"right":"left";return{my:`${t} top`,at:`${t} bottom`,collision:"none"}}function w(t,e,a,s){e=e||function(){};const f=jQuery.Event("keypress");f.which=13,f.keyCode=13,setTimeout(function(){t.trigger(f)},100),e(a,s)}return E.setup=function({element:t,strategies:e,options:a}){const s=t.get(0);if(!s)return;let f;if(s.nodeName==="TEXTAREA"||s.nodeName==="INPUT"?f=new i(s):s.nodeName==="DIV"&&s.getAttribute("contenteditable")==="true"&&(f=new O(s)),!f)throw new Error("unknown target element type");s.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));const c=new u(f,e,{dropdown:a});return c.on("rendered",function(){c.dropdown.items.length&&c.dropdown.items[0].activate()}),c},E}).apply(_,m),h!==void 0&&(D.exports=h)},5303(D,_,l){l.r(_),l.d(_,{alert:()=>i,confirm:()=>O,dialog:()=>u,prompt:()=>E,promptPassword:()=>v});var m=l(3530),h=l.n(m),d=l(7459),g=l.n(d);m.setDefaults({locale:config.userLang}),d.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{m.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),m.setLocale(config.userLang)});async function u(t){const[e,a,s]=await Promise.all([d.translate(t.title||""),y(t)||"",w(t.buttons)]);return m.dialog({...t,title:e,message:a,buttons:s})}async function i(t,e){const[a,s]=await Promise.all([t&&t.title?d.translate(t.title):null,y(t)]);return e=typeof e=="function"?e:t.callback,m.alert({...t,title:a,message:s,callback:e})}async function O(t,e){const[a,s]=await Promise.all([t&&t.title?d.translate(t.title):null,y(t)]);return e=typeof e=="function"?e:t.callback,m.confirm({...t,title:a,message:s,callback:e})}async function E(t,e){const[a,s]=await Promise.all([d.translate(typeof t=="string"?t:t.title),t&&t.message?y(t):null]);return e=typeof e=="function"?e:t.callback,m.prompt({...t,title:a,message:s,callback:e})}async function v(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{E({...t,inputType:"password",required:!0,value:"",callback:e})})}function y(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:d.translate(e||"")}async function w(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async a=>({...a,label:await d.translateKey(a.label)})))}},8636(D,_,l){var m;m=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(u,i){u=String(u),this._keys.indexOf(u)===-1&&this._keys.push(u),this._store[u]=i},h.prototype.getItem=function(u){return u=String(u),this._keys.indexOf(u)===-1?null:this._store[u]},h.prototype.removeItem=function(u){u=String(u),this._keys=this._keys.filter(function(i){return i!==u}),this._store[u]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(u){return u=parseInt(u,10)||0,this._keys[u]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let d;const g=Date.now().toString();try{if(d=window.localStorage,d.setItem(g,g),d.getItem(g)!==g)throw Error("localStorage behaved unexpectedly");return d.removeItem(g),d}catch(u){console.warn(u),console.warn("localStorage failed, falling back on sessionStorage");try{if(d=window.sessionStorage,d.setItem(g,g),d.getItem(g)!==g)throw Error("sessionStorage behaved unexpectedly");return d.removeItem(g),d}catch(i){return console.warn(i),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(_,l,_,D),m!==void 0&&(D.exports=m)}}]);

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.