PageSourceSearch

https://mistarg.cn/assets/forum/header-chat.f1c50b71f2d0751f3fa7.min.js

js mistarg.cn collected 2026-10-06 13:17:21 UTC 6,596 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,13201,18314,22067,34271,43602,49897,87212,99127],{11599(O,w,i){var c,h;c=[i(52473),i(91749),i(49897)],h=(function(o,f,a){const m={};m.prepareDOM=function(){const g=$('[component="chat/dropdown"]');g.on("show.bs.dropdown",t=>{d("loadChatsDropdown",$(t.target).parent().find('[component="chat/list"]'))}),g.each((t,n)=>{const l=$(n).parent().find(".dropdown-menu");l.hasClass("show")&&d("loadChatsDropdown",l.find('[component="chat/list"]'))}),socket.removeListener("event:chats.receive",C),socket.on("event:chats.receive",C),socket.removeListener("event:chats.typing",P),socket.on("event:chats.typing",P),socket.removeListener("event:chats.roomRename",_),socket.on("event:chats.roomRename",_),socket.on("event:unread.updateChatCount",async function(t){if(t){const[M,p]=await app.require(["chat","forum/chats"]);if(M.isFromBlockedUser(t.fromUid)||M.isLookingAtRoom(t.roomId)||app.user.uid===parseInt(t.fromUid,10))return;p.markChatPageElUnread(t),p.updateTeaser(t.roomId,t.teaser)}let{count:n}=await a.get("/chats/unread");const l=o.get("chat/icon");n=Math.max(0,n),l.toggleClass("fa-comment",n>0).toggleClass("fa-comment-o",n<=0);const E=n>99?"99+":n;l.toggleClass("unread-count",n>0).attr("data-content",E),o.get("chat/count").toggleClass("hidden",n<=0).text(E),f.fire("action:chat.updateCount",{count:n})})};function C(g){d("onChatMessageReceived",g)}function P(g){d("onUserTyping",g)}function _(g){d("onRoomRename",g)}async function d(g,t){(await app.require("chat"))[g](t)}return m}).apply(w,c),h!==void 0&&(O.exports=h)},49897(O,w,i){i.r(w),i.d(w,{del:()=>M,get:()=>g,head:()=>t,patch:()=>l,post:()=>n,put:()=>E});var c=i(91749),h=i.n(c),o=i(65303),f=i(17459),a=i.n(f),m=i(68636),C=i.n(m);const P=config.relative_path+"/api/v3";async function _(e,s){if(e.url=e.url.startsWith("/api")?config.relative_path+e.url:P+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"){d(e).then(r=>s(null,r),r=>s(r));return}try{return await d(e)}catch(r){if(r.message===await f.translate("[[error:api.401]]",config.userLang)){const{url:u}=await(0,c.fire)("filter:admin.reauth",{url:"login"}),v=await f.translate("[[error:api.reauth-required]]",config.userLang);(0,o.confirm)(v,D=>{D&&(m.setItem("location-hash",window.location.hash),ajaxify.go(u))})}throw r}}async function d(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,c.fire)("filter:api.options",{options:e}),e.data&&(e.body=e.data,delete e.data);const r=await fetch(s,e),{headers:u}=r;if(u.get("x-redirect"))return d({url:u.get("x-redirect"),...e});const v=u.get("content-type"),D=v&&v.startsWith("application/json");let y;if(e.method!=="HEAD"&&(D?y=await r.json():y=await r.text()),!r.ok){if(y){const I=D&&(y.status?.message||y.error||""),L=typeof y=="string"?y:r.statusText||`[[error:api.${r.status}]]`;throw new Error(D&&I?I:L)}throw new Error(r.statusText)}return D&&y&&y.hasOwnProperty("status")&&y.hasOwnProperty("response")?y.response:y}function g(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 n(e,s,r,u){return p("POST",e,s,r,u)}function l(e,s,r,u){return p("PATCH",e,s,r,u)}function E(e,s,r,u){return p("PUT",e,s,r,u)}function M(e,s,r,u){return p("DELETE",e,s,r,u)}function p(e,s,r,u,v){return typeof u=="function"&&(v=u,u={}),_({url:s,method:e,data:r,headers:{"x-csrf-token":config.csrf_token,...u}},v)}},65303(O,w,i){i.r(w),i.d(w,{alert:()=>m,confirm:()=>C,dialog:()=>a,prompt:()=>P,promptPassword:()=>_});var c=i(33530),h=i.n(c),o=i(17459),f=i.n(o);c.setDefaults({locale:config.userLang}),o.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{c.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}
1),c.setLocale(config.userLang)});async function a(t){const[n,l,E]=await Promise.all([o.translate(t.title||""),d(t)||"",g(t.buttons)]);return c.dialog({...t,title:n,message:l,buttons:E})}async function m(t,n){const[l,E]=await Promise.all([t&&t.title?o.translate(t.title):null,d(t)]);return n=typeof n=="function"?n:t.callback,c.alert({...t,title:l,message:E,callback:n})}async function C(t,n){const[l,E]=await Promise.all([t&&t.title?o.translate(t.title):null,d(t)]);return n=typeof n=="function"?n:t.callback,c.confirm({...t,title:l,message:E,callback:n})}async function P(t,n){const[l,E]=await Promise.all([o.translate(typeof t=="string"?t:t.title),t&&t.message?d(t):null]);return n=typeof n=="function"?n:t.callback,c.prompt({...t,title:l,message:E,callback:n})}async function _(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(n=>{P({...t,inputType:"password",required:!0,value:"",callback:n})})}function d(t){const n=t&&t.message?t.message:t;return n instanceof jQuery?n:o.translate(n||"")}async function g(t){if(!Object.keys(t||{}).length)return;const n=Object.values(t);return await Promise.all(n.map(async l=>({...l,label:await o.translateKey(l.label)})))}},68636(O,w,i){var c;c=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(a,m){a=String(a),this._keys.indexOf(a)===-1&&this._keys.push(a),this._store[a]=m},h.prototype.getItem=function(a){return a=String(a),this._keys.indexOf(a)===-1?null:this._store[a]},h.prototype.removeItem=function(a){a=String(a),this._keys=this._keys.filter(function(m){return m!==a}),this._store[a]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(a){return a=parseInt(a,10)||0,this._keys[a]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let o;const f=Date.now().toString();try{if(o=window.localStorage,o.setItem(f,f),o.getItem(f)!==f)throw Error("localStorage behaved unexpectedly");return o.removeItem(f),o}catch(a){console.warn(a),console.warn("localStorage failed, falling back on sessionStorage");try{if(o=window.sessionStorage,o.setItem(f,f),o.getItem(f)!==f)throw Error("sessionStorage behaved unexpectedly");return o.removeItem(f),o}catch(m){return console.warn(m),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(w,i,w,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.