1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,34271,49897,69076,99127],{91746(C,d,a){var f,p;f=[a(60419),a(92619),a(52473)],p=(function(g,m,v){const o={},l={"event:chats.receive":y,"event:chats.public.unread":U,"event:user_status_change":w,"event:chats.roomRename":x,"event:chats.mark":t,"event:chats.typing":n};let E=null,i=null;o.init=async function(){i=await app.require("forum/chats"),E=$('[component="chat/nav-wrapper"]'),o.removeListeners();for(const[e,r]of Object.entries(l))socket.on(e,r)},o.removeListeners=function(){for(const[e,r]of Object.entries(l))socket.removeListener(e,r)};function y(e){if(m.isFromBlockedUser(e.fromUid))return;e.self=parseInt(app.user.uid,10)===parseInt(e.fromUid,10)?1:0,e.message.self=e.self,e.message.timestamp=Math.min(Date.now(),e.message.timestamp),e.message.timestampISO=utils.toISOString(e.message.timestamp),parseInt(e.roomId,10)===parseInt(ajaxify.data.roomId,10)&&(i.newMessage||(i.newMessage=e.self===0),g.appendChatMessage($('[component="chat/message/content"]'),e.message)),i.updateTeaser(e.roomId,{content:utils.stripHTMLTags(utils.decodeHTMLEntities(e.message.content)),user:e.message.fromUser,timestampISO:e.message.timestampISO})}function U(e){!ajaxify.data.template.chats||m.isFromBlockedUser(e.fromUid)||m.isLookingAtRoom(e.roomId)||app.user.uid===parseInt(e.fromUid,10)||(i.markChatPageElUnread(e),i.increasePublicRoomUnreadCount(E.find("[data-roomid="+e.roomId+"]")))}function w(e){app.updateUserStatus($(`.chats-list [data-uid="${e.uid}"] [component="user/status"]`),e.status)}function x(e){const r=v.get("chat/recent/room",e.roomId);if(r.length){const u=r.find('[component="chat/room/title"]');ajaxify.data.roomName=e.newName,u.translateText(e.newName?e.newName:ajaxify.data.usernames)}const c=$(`[component="chat/main-wrapper"][data-roomid="${e.roomId}"] [component="chat/header/title"]`);c.length&&c.html(e.newName?`<i class="fa ${ajaxify.data.icon} text-muted"></i> ${e.newName}`:ajaxify.data.chatWithMessage)}function t({roomId:e,state:r}){$(`[component="chat/recent"] [data-roomid="${e}"], [component="chat/list"] [data-roomid="${e}"], [component="chat/public"] [data-roomid="${e}"]`).each((u,s)=>{const h=$(s);m.markChatElUnread(h,r===1),r===0&&i.updatePublicRoomUnreadCount(h,0)})}function n(e){e.uid===app.user.uid||m.isFromBlockedUser(e.uid)||m.updateTypingUserList($(`[component="chat/main-wrapper"][data-roomid="${e.roomId}"]`),e)}return o}).apply(d,f),p!==void 0&&(C.exports=p)},49897(C,d,a){a.r(d),a.d(d,{del:()=>x,get:()=>E,head:()=>i,patch:()=>U,post:()=>y,put:()=>w});var f=a(91749),p=a.n(f),g=a(33530),m=a.n(g);const v=config.relative_path+"/api/v3";async function o(t,n){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:v+t.url,typeof n=="function"){l(t).then(e=>n(null,e),e=>n(e));return}try{return await l(t)}catch(e){if(e.message==="A valid login session was not found. Please log in and try again."){const{url:r}=await(0,f.fire)("filter:admin.reauth",{url:"login"});return(0,g.confirm)("[[error:api.reauth-required]]",c=>{c&&ajaxify.go(r)})}throw e}}async function l(t){const{url:n}=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,f.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const e=await fetch(n,t),{headers:r}=e;if(r.get("x-redirect"))return l({url:r.get("x-redirect"),...t});const c=r.get("content-type"),u=c&&c.startsWith("application/json");let s;if(t.method!=="HEAD"&&(u?s=await e.json():s=await e.text()),!e.ok){if(s){const h=u&&(s.status?.message||s.error||"");throw new Error(u&&h?h:s)}throw new Error(e.statusText)}return u&&s&&s.hasOwnProperty("status")&&s.hasOwnProperty("response")?s.response:s}function E(t,n,e){return o({url:t+(n&&Object.keys(n).length?"?"+$.param(n):"")},e)}function i(t,n,e){return o({url:t+(n&&Object.keys(n).length?"?"+$.param(n):""),method:"HEAD"},e)}function y(t,n,e){return o({url:t,method:"POST",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function U(t,n,e){return o({url:t,method:"PATCH",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function w(t,n,e){return o({url:t,method:"PUT",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}function x(t,n,e){return o({url:t,method:"DELETE",data:n,headers:{"x-csrf-token":config.csrf_token}},e)}}}]);
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.