1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,43602,49897,66131,87212,95737,99127],{34567(O,E,u){var c,h;c=[u(49897),u(29930),u(30637)],h=(function(l,f,o){const d={};let _=0;d.init=function(){app.enterRoom("user_list");const n=utils.param("section")?"?section="+utils.param("section"):"",s=$('[component="user/list/menu"]');s.find("a").removeClass("active"),s.find('a[href="'+window.location.pathname+n+'"]').addClass("active"),d.handleSearch(),o.handle(),socket.removeListener("event:user_status_change",e),socket.on("event:user_status_change",e)},d.handleSearch=function(n){_=n&&n.resultCount,$("#search-user").on("keyup",utils.debounce(y,250)),$('.search select, .search input[type="checkbox"]').on("change",y);const s=document.getElementById("search-user");if(s){const t=new URLSearchParams(document.location.search).get("query");t&&(s.value=t),utils.isMobile()||s.focus()}};function y(){if(!ajaxify.data.template.users)return;$('[component="user/search/icon"]').removeClass("fa-search").addClass("fa-spinner fa-spin");const n=m(),s={section:n||"users",page:1},A=$("#search-user").val();if(A)s.query=A;else return p(s);const t=P();t&&(s.sortBy=t);const a=[];($(".search .online-only").is(":checked")||n==="online")&&a.push("online"),n==="banned"&&a.push("banned"),n==="muted"&&a.push("muted"),n==="flagged"&&a.push("flagged"),a.length&&(s.filters=a),p(s)}function P(){let n;const s=m();return s==="sort-posts"?n="postcount":s==="sort-reputation"?n="reputation":s==="users"&&(n="joindate"),n}function p(n){l.get("/api/users",n).then(D).catch(f.error);const s=new URLSearchParams(n);ajaxify.updateHistory(`users?${s.toString()}`,!0)}function D(n){app.parseAndTranslate("partials/paginator",{pagination:n.pagination}).then(function(s){$(".pagination-container").replaceWith(s)}),_&&(n.users=n.users.slice(0,_)),n.isAdminOrGlobalMod=app.user.isAdmin||app.user.isGlobalMod,app.parseAndTranslate("users","users",n,function(s){$("#users-container").html(s),s.find(".timeago").timeago(),$('[component="user/search/icon"]').addClass("fa-search").removeClass("fa-spinner fa-spin")})}function e(n){const s=m();(s.startsWith("online")||s.startsWith("users"))&&r(n)}function r(n){app.updateUserStatus($('#users-container [data-uid="'+n.uid+'"] [component="user/status"]'),n.status)}function m(){return utils.param("section")||""}return d}).apply(E,c),h!==void 0&&(O.exports=h)},30637(O,E,u){var c,h;c=[u(49897),u(81335),u(65303),u(29930)],h=(function(l,f,o,d){const _={};function y(){return ajaxify.data.template.name.startsWith("admin/")}return _.handle=function(){$('[component="user/invite"]').on("click",function(P){P.preventDefault(),l.get(`/api/v3/users/${app.user.uid}/invites/groups`,{}).then(p=>{f.render("modals/invite",{groups:p}).then(function(D){o.dialog({message:D,title:`[[${y()?"admin/manage/u
1sers:invite":"users:invite"}]]`,onEscape:!0,buttons:{cancel:{label:`[[${y()?"admin/manage/users:alerts.button-cancel":"modules:bootbox.cancel"}]]`,className:"btn-light"},invite:{label:`[[${y()?"admin/manage/users:invite":"users:invite"}]]`,className:"btn-primary",callback:_.send}}})})}).catch(d.error)})},_.send=function(){const P=$("#invite-modal-emails"),p=$("#invite-modal-groups"),D={emails:P.val().split(",").map(e=>e.trim()).filter(Boolean).filter((e,r,m)=>r===m.indexOf(e)).join(","),groupsToJoin:p.val()};D.emails&&l.post(`/users/${app.user.uid}/invites`,D).then(()=>{d.success(`[[${y()?"admin/manage/users:alerts.email-sent-to":"users:invitation-email-sent"}, ${D.emails.replace(/,/g,", ")}]]`)}).catch(d.error)},_}).apply(E,c),h!==void 0&&(O.exports=h)},49897(O,E,u){u.r(E),u.d(E,{del:()=>s,get:()=>D,head:()=>e,patch:()=>m,post:()=>r,put:()=>n});var c=u(91749),h=u.n(c),l=u(65303),f=u(17459),o=u.n(f),d=u(68636),_=u.n(d);const y=config.relative_path+"/api/v3";async function P(t,a){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:y+t.url,t.headers=t.headers||{},t.headers["x-return-to"]||(t.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof a=="function"){p(t).then(i=>a(null,i),i=>a(i));return}try{return await p(t)}catch(i){if(i.message===await f.translate("[[error:api.401]]",config.userLang)){const{url:g}=await(0,c.fire)("filter:admin.reauth",{url:"login"}),w=await f.translate("[[error:api.reauth-required]]",config.userLang);(0,l.confirm)(w,M=>{M&&(d.setItem("location-hash",window.location.hash),ajaxify.go(g))})}throw i}}async function p(t){const{url:a}=t;delete t.url,t.data&&!(t.data instanceof FormData)&&(t.data=JSON.stringify(t.data||{}),t.headers["content-type"]="application/json; charset=utf-8"),{options:t}=await(0,c.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const i=await fetch(a,t),{headers:g}=i;if(g.get("x-redirect"))return p({url:g.get("x-redirect"),...t});const w=g.get("content-type"),M=w&&w.startsWith("application/json");let v;if(t.method!=="HEAD"&&(M?v=await i.json():v=await i.text()),!i.ok){if(v){const C=M&&(v.status?.message||v.error||""),I=typeof v=="string"?v:i.statusText||`[[error:api.${i.status}]]`;throw new Error(M&&C?C:I)}throw new Error(i.statusText)}return M&&v&&v.hasOwnProperty("status")&&v.hasOwnProperty("response")?v.response:v}function D(t,a,i){return P({url:t+(a&&Object.keys(a).length?"?"+$.param(a):"")},i)}function e(t,a,i){return P({url:t+(a&&Object.keys(a).length?"?"+$.param(a):""),method:"HEAD"},i)}function r(t,a,i,g){return A("POST",t,a,i,g)}function m(t,a,i,g){return A("PATCH",t,a,i,g)}function n(t,a,i,g){return A("PUT",t,a,i,g)}function s(t,a,i,g){return A("DELETE",t,a,i,g)}function A(t,a,i,g,w){return typeof g=="function"&&(w=g,g={}),P({url:a,method:t,data:i,headers:{"x-csrf-token":config.csrf_token,...g}},w)}},65303(O,E,u){u.r(E),u.d(E,{alert:()=>d,confirm:()=>_,dialog:()=>o,prompt:()=>y,promptPassword:()=>P});var c=u(33530),h=u.n(c),l=u(17459),f=u.n(l);c.setDefaults({locale:config.userLang}),l.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(e=>{c.addLocale(config.userLang,{OK:e[0],CANCEL:e[1],CONFIRM:e[2]}
1),c.setLocale(config.userLang)});async function o(e){const[r,m,n]=await Promise.all([l.translate(e.title||""),p(e)||"",D(e.buttons)]);return c.dialog({...e,title:r,message:m,buttons:n})}async function d(e,r){const[m,n]=await Promise.all([e&&e.title?l.translate(e.title):null,p(e)]);return r=typeof r=="function"?r:e.callback,c.alert({...e,title:m,message:n,callback:r})}async function _(e,r){const[m,n]=await Promise.all([e&&e.title?l.translate(e.title):null,p(e)]);return r=typeof r=="function"?r:e.callback,c.confirm({...e,title:m,message:n,callback:r})}async function y(e,r){const[m,n]=await Promise.all([l.translate(typeof e=="string"?e:e.title),e&&e.message?p(e):null]);return r=typeof r=="function"?r:e.callback,c.prompt({...e,title:m,message:n,callback:r})}async function P(e){return typeof e=="string"&&(e={title:e}),e=e||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(r=>{y({...e,inputType:"password",required:!0,value:"",callback:r})})}function p(e){const r=e&&e.message?e.message:e;return r instanceof jQuery?r:l.translate(r||"")}async function D(e){if(!Object.keys(e||{}).length)return;const r=Object.values(e);return await Promise.all(r.map(async m=>({...m,label:await l.translateKey(m.label)})))}},68636(O,E,u){var c;c=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(o,d){o=String(o),this._keys.indexOf(o)===-1&&this._keys.push(o),this._store[o]=d},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(d){return d!==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 f=Date.now().toString();try{if(l=window.localStorage,l.setItem(f,f),l.getItem(f)!==f)throw Error("localStorage behaved unexpectedly");return l.removeItem(f),l}catch(o){console.warn(o),console.warn("localStorage failed, falling back on sessionStorage");try{if(l=window.sessionStorage,l.setItem(f,f),l.getItem(f)!==f)throw Error("sessionStorage behaved unexpectedly");return l.removeItem(f),l}catch(d){return console.warn(d),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(E,u,E,O),c!==void 0&&(O.exports=c)}}]);
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.