1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,43602,49897,63091,87212,99127],{41739(w,m,i){i.r(m),i.d(m,{init:()=>f});var l=i(49897);function f(o,u){if(!o||!u){console.warn("[chats/search] Search element not found");return}o.addEventListener("keyup",utils.debounce(async function(n){const d=await(0,l.get)(`/chats/search?query=${n.target.value}`),D=await app.parseAndTranslate("chats","rooms",d);$(u).html(D)},300))}},49897(w,m,i){i.r(m),i.d(m,{del:()=>L,get:()=>I,head:()=>t,patch:()=>h,post:()=>a,put:()=>E});var l=i(91749),f=i.n(l),o=i(65303),u=i(17459),n=i.n(u),d=i(68636),D=i.n(d);const M=config.relative_path+"/api/v3";async function _(e,s){if(e.url=e.url.startsWith("/api")?config.relative_path+e.url:M+e.url,e.headers=e.headers||{},e.headers["x-return-to"]||(e.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof s=="function"){y(e).then(r=>s(null,r),r=>s(r));return}try{return await y(e)}catch(r){if(r.message===await u.translate("[[error:api.401]]",config.userLang)){const{url:c}=await(0,l.fire)("filter:admin.reauth",{url:"login"}),P=await u.translate("[[error:api.reauth-required]]",config.userLang);(0,o.confirm)(P,O=>{O&&(d.setItem("location-hash",window.location.hash),ajaxify.go(c))})}throw r}}async function y(e){const{url:s}=e;delete e.url,e.data&&!(e.data instanceof FormData)&&(e.data=JSON.stringify(e.data||{}),e.headers["content-type"]="application/json; charset=utf-8"),{options:e}=await(0,l.fire)("filter:api.options",{options:e}),e.data&&(e.body=e.data,delete e.data);const r=await fetch(s,e),{headers:c}=r;if(c.get("x-redirect"))return y({url:c.get("x-redirect"),...e});const P=c.get("content-type"),O=P&&P.startsWith("application/json");let g;if(e.method!=="HEAD"&&(O?g=await r.json():g=await r.text()),!r.ok){if(g){const T=O&&(g.status?.message||g.error||""),A=typeof g=="string"?g:r.statusText||`[[error:api.${r.status}]]`;throw new Error(O&&T?T:A)}throw new Error(r.statusText)}return O&&g&&g.hasOwnProperty("status")&&g.hasOwnProperty("response")?g.response:g}function I(e,s,r){return _({url:e+(s&&Object.keys(s).length?"?"+$.param(s):"")},r)}function t(e,s,r){return _({url:e+(s&&Object.keys(s).length?"?"+$.param(s):""),method:"HEAD"},r)}function a(e,s,r,c){return v("POST",e,s,r,c)}function h(e,s,r,c){return v("PATCH",e,s,r,c)}function E(e,s,r,c){return v("PUT",e,s,r,c)}function L(e,s,r,c){return v("DELETE",e,s,r,c)}function v(e,s,r,c,P){return typeof c=="function"&&(P=c,c={}),_({url:s,method:e,data:r,headers:{"x-csrf-token":config.csrf_token,...c}},P)}},65303(w,m,i){i.r(m),i.d(m,{alert:()=>d,confirm:()=>D,dialog:()=>n,prompt:()=>M,promptPassword:()=>_});var l=i(33530),f=i.n(l),o=i(17459),u=i.n(o);l.setDefaults({locale:config.userLang}),o.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{l.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),l.setLocale(config.userLang)});async function n(t){const[a,h,E]=await Promise.all([o.translate(t.title||""),y(t)||"",I(t.buttons)]);return l.dialog({...t,title:a,message:h,buttons:E})}async function d(t,a){const[h,E]=await Promise.all([t&&t.title?o.translate(t.title):null,y(t)]);return a=typeof a=="function"?a:t.callback,l.alert({...t,title:h,message:E,callback:a})}async function D(t,a){const[h,E]=await Promise.all([t&&t.title?o.translate(t.title):null,y(t)]);return a=typeof a=="function"?a:t.callback,l.confirm({...t,title:h,message:E,callback:a})}async function M(t,a){const[h,E]=await Promise.all([o.translate(typeof t=="string"?t:t.title),t&&t.message?y(t):null]);return a=typeof a=="function"?a:t.callback,l.prompt({...t,title:h,message:E,callback:a})}async function _(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(a=>{M({...t,inputType:"password",required:!0,value:"",callback:a})})}function y(t){const a=t&&t.message?t.message:t;return a instanceof jQuery?a:o.translate(a||"")}async function I(t){if(!Object.keys(t||{}).length)return;const a=Object.values(t);return await Promise.all(a.map(async h=>({...h,label:await o.translateKey(h.label)})))}},68636(w,m,i){var l;l=(function(){function f(){this._store={},this._keys=[]}f.prototype.isMock=!0,f.prototype.setItem=function(n,d){n=String(n),this._keys.indexOf(n)===-1&&this._keys.push(n),this._store[n]=d},f.prototype.getItem=function(n){return n=String(n),this._keys.indexOf(n)===-1?null:this._store[n]},f.prototype.removeItem=function(n){n=String(n),this._keys=this._keys.filter(function(d){return d!==n}),this._store[n]=null},f.prototype.clear=function(){this._keys=[],this._store={}},f.prototype.key=function(n){return n=parseInt(n,10)||0,this._keys[n]},Object.defineProperty&&Object.defineProperty(f.prototype,"length",{get:function(){return this._keys.length}});let o;const u=Date.now().toString();try{if(o=window.localStorage,o.setItem(u,u),o.getItem(u)!==u)throw Error("localStorage behaved unexpectedly");return o.removeItem(u),o}catch(n){console.warn(n),console.warn("localStorage failed, falling back on sessionStorage");try{if(o=window.sessionStorage,o.setItem(u,u),o.getItem(u)!==u)throw Error("sessionStorage behaved unexpectedly");return o.removeItem(u),o}catch(d){return console.warn(d),console.warn("sessionStorage failed, falling back on memory storage"),new f}}}).call(m,i,m,w),l!==void 0&&(w.exports=l)}}]);
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.