PageSourceSearch

https://mistarg.cn/assets/forum/header.0018965c178b84caf1fa.min.js

js mistarg.cn collected 2026-10-06 13:18:21 UTC 11,522 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,13201,18314,22067,34271,34590,43602,49897,68326,87212,98813,99127],{86174(y,v,i){var d,p;d=[i(19046),i(71949),i(11599),i(29930)],p=(function(u,h,r,g){const E={};E.prepareDOM=function(){app.user.uid>0&&u.initUnreadTopics(),h.prepareDOM(),r.prepareDOM(),n(),s(),l()};function n(){$('[component="header/usercontrol"] [data-status]').off("click").on("click",function(c){const t=$(this).attr("data-status");socket.emit("user.setStatus",t,function(e){if(e)return g.error(e);$('[data-uid="'+app.user.uid+'"] [component="user/status"], [component="header/profilelink"] [component="user/status"]').removeClass("away online dnd offline").addClass(t),$('[component="header/usercontrol"] [data-status]').each(function(){$(this).toggleClass("selected",$(this).attr("data-status")===t)}),app.user.status=t}),c.preventDefault()})}function s(){const c=utils.findBootstrapEnvironment();if(c==="xs"||c==="sm"||utils.isTouchDevice())return;const t=$("#header-menu .nav-item[title]");t.tooltip({trigger:"manual",animation:!1,placement:"bottom"}),t.on("mouseenter",function(e){const o=$(e.target);o.hasClass("dropdown-menu")||o.parents(".dropdown-menu").length||$(this).tooltip("show")}),t.on("click mouseleave",function(){$(this).tooltip("hide")})}function l(){$("body").on("click",'[component="user/logout"]',function(){return i.e(20739).then(function(){var c=[i(75427)];(function(t){t()}).apply(null,c)}).catch(i.oe),!1})}return E}).apply(v,d),p!==void 0&&(y.exports=p)},11599(y,v,i){var d,p;d=[i(52473),i(91749),i(49897)],p=(function(u,h,r){const g={};g.prepareDOM=function(){const c=$('[component="chat/dropdown"]');c.on("show.bs.dropdown",t=>{l("loadChatsDropdown",$(t.target).parent().find('[component="chat/list"]'))}),c.each((t,e)=>{const o=$(e).parent().find(".dropdown-menu");o.hasClass("show")&&l("loadChatsDropdown",o.find('[component="chat/list"]'))}),socket.removeListener("event:chats.receive",E),socket.on("event:chats.receive",E),socket.removeListener("event:chats.typing",n),socket.on("event:chats.typing",n),socket.removeListener("event:chats.roomRename",s),socket.on("event:chats.roomRename",s),socket.on("event:unread.updateChatCount",async function(t){if(t){const[A,D]=await app.require(["chat","forum/chats"]);if(A.isFromBlockedUser(t.fromUid)||A.isLookingAtRoom(t.roomId)||app.user.uid===parseInt(t.fromUid,10))return;D.markChatPageElUnread(t),D.updateTeaser(t.roomId,t.teaser)}let{count:e}=await r.get("/chats/unread");const o=u.get("chat/icon");e=Math.max(0,e),o.toggleClass("fa-comment",e>0).toggleClass("fa-comment-o",e<=0);const C=e>99?"99+":e;o.toggleClass("unread-count",e>0).attr("data-content",C),u.get("chat/count").toggleClass("hidden",e<=0).text(C),h.fire("action:chat.updateCount",{count:e})})};function E(c){l("onChatMessageReceived",c)}function n(c){l("onUserTyping",c)}function s(c){l("onRoomRename",c)}async function l(c,t){(await app.require("chat"))[c](t)}return g}).apply(v,d),p!==void 0&&(y.exports=p)},71949(y,v,i){var d;d=(function(){const p={};p.prepareDOM=function(){const r=$('[component="notifications"] [data-bs-toggle="dropdown"]');r.on("show.bs.dropdown",async g=>{const E=await app.require("notifications"),n=$(g.target),s=n.parent().find(".dropdown-menu");s.find('[data-filter="all"]').addClass("active"),s.find('[data-filter="unread"]').removeClass("active"),E.loadNotifications(n,n.parent().find('[component="notifications/list"]'))}),r.each((g,E)=>{const n=$(E),s=n.parent().find(".dropdown-menu"),l=s.find('[component="notifications/list"]');s.hasClass("show")&&app.require("notifications").then(c=>{c.loadNotifications(n,l)}),s.on("click","[data-filter]",c=>{const t=c.target.getAttribute("data-filter");s.find("[data-filter]").removeClass("active"),c.target.classList.add("active"),t==="unread"?l.get(0).querySelectorAll("[data-nid]:not(.unread)").forEach(o=>{o.classList.toggle("hidden",!0)}):l.get(0).querySelectorAll("[data-nid]").forEach(o=>{o.classList.toggle("hidden",!1)});const e=s.find("[data-nid]:not(.hidden)").length;s.find(".no-notifs").toggleClass("hidden",e!==0)})}),socket.removeListener("event:new_notification",u),socket.on("event:new_notification",u),socket.removeListener("event:notifications.updateCount",h),socket.on("event:notifications.updateCount",h)};async function u(r){(await app.require("notifications")).onNewNotification(r)}async function h(r){(await app.require("notifications")).updateNotifCount(r)}return p}).call(v,i,v,y),d!==void 0&&(y.exports=d)},19046(y,v,i){var d,p;d=[i(91749)],p=(function(u){const h={},r={ignoring:1,notwatching:2,watching:3};h.initUnreadTopics=function(){const n=app.user.unreadData;function s(t){if(t&&t.posts&&t.posts.length&&n){const e=t.posts[0];if(parseInt(e.uid,10)===parseInt(app.user.uid,10)||!e.topic.isFollowing&&e.categoryWatchState!==r.watching)return;const o=e.topic.tid;(!n[""][o]||!n.new[o]||!n.watched[o]||!n.unreplied[o])&&c(o),n[""][o]||(l(""),n[""][o]=!0),e.isMain&&parseInt(e.uid,10)!==parseInt(app.user.uid,10)&&!n.new[o]&&(l("new"),n.new[o]=!0),parseInt(e.topic.postcount,10)<=1&&!n.unreplied[o]&&(l("unreplied"),n.unreplied[o]=!0),e.topic.isFollowing&&!n.watched[o]&&(l("watched"),n.watched[o]=!0)}}function l(t){const e="/unread"+(t?"?filter="+t:""),o=1+parseInt($('a[href="'+config.relative_path+e+'"].navigation-link i').attr("data-content"),10);E(e,o)}function c(t){$('[data-tid="'+t+'"]').addClass("unread")}$(window).on("action:ajaxify.end",function(){ajaxify.data.template.topic&&["","new","watched","unreplied"].forEach(function(t){delete n[t][ajaxify.data.tid]})}),socket.removeListener("event:new_post",s),socket.on("event:new_post",s),socket.removeListener("event:unread.updateCount",g),socket.on("event:unread.updateCount",g)};function g(n){E("/unread",n.unreadTopicCount),E("/unread?filter=new",n.unreadNewTopicCount),E("/unread?filter=watched",n.unreadWatchedTopicCount),E("/unread?filter=unreplied",n.unreadUnrepliedTopicCount)}function E(n,s){if(!utils.isNumber(s))return;s=Math.max(0,s);const l=s>99?"99+":s,c=$('a[href="'+config.relative_path+n+'"].navigation-link');c.find("i").toggleClass("unread-count",s>0).attr("data-content",l),c.find('[component="navigation/count"]').toggleClass("hidden",s<=0).text(l),c.length&&($('#mobile-menu [data-unread-url="'+n+'"]').attr("data-content",l),$('[component="unread/count"][data-unread-url="'+n+'"]').toggleClass("hidden",s<=0).text(l)),u.fire("action:unread.updateCount",{url:n,count:s})}return h.updateUnreadTopicCount=E,h}
1).apply(v,d),p!==void 0&&(y.exports=p)},49897(y,v,i){i.r(v),i.d(v,{del:()=>A,get:()=>c,head:()=>t,patch:()=>o,post:()=>e,put:()=>C});var d=i(91749),p=i.n(d),u=i(65303),h=i(17459),r=i.n(h),g=i(68636),E=i.n(g);const n=config.relative_path+"/api/v3";async function s(a,m){if(a.url=a.url.startsWith("/api")?config.relative_path+a.url:n+a.url,a.headers=a.headers||{},a.headers["x-return-to"]||(a.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof m=="function"){l(a).then(f=>m(null,f),f=>m(f));return}try{return await l(a)}catch(f){if(f.message===await h.translate("[[error:api.401]]",config.userLang)){const{url:w}=await(0,d.fire)("filter:admin.reauth",{url:"login"}),P=await h.translate("[[error:api.reauth-required]]",config.userLang);(0,u.confirm)(P,M=>{M&&(g.setItem("location-hash",window.location.hash),ajaxify.go(w))})}throw f}}async function l(a){const{url:m}=a;delete a.url,a.data&&!(a.data instanceof FormData)&&(a.data=JSON.stringify(a.data||{}),a.headers["content-type"]="application/json; charset=utf-8"),{options:a}=await(0,d.fire)("filter:api.options",{options:a}),a.data&&(a.body=a.data,delete a.data);const f=await fetch(m,a),{headers:w}=f;if(w.get("x-redirect"))return l({url:w.get("x-redirect"),...a});const P=w.get("content-type"),M=P&&P.startsWith("application/json");let _;if(a.method!=="HEAD"&&(M?_=await f.json():_=await f.text()),!f.ok){if(_){const T=M&&(_.status?.message||_.error||""),I=typeof _=="string"?_:f.statusText||`[[error:api.${f.status}]]`;throw new Error(M&&T?T:I)}throw new Error(f.statusText)}return M&&_&&_.hasOwnProperty("status")&&_.hasOwnProperty("response")?_.response:_}function c(a,m,f){return s({url:a+(m&&Object.keys(m).length?"?"+$.param(m):"")},f)}function t(a,m,f){return s({url:a+(m&&Object.keys(m).length?"?"+$.param(m):""),method:"HEAD"},f)}function e(a,m,f,w){return D("POST",a,m,f,w)}function o(a,m,f,w){return D("PATCH",a,m,f,w)}function C(a,m,f,w){return D("PUT",a,m,f,w)}function A(a,m,f,w){return D("DELETE",a,m,f,w)}function D(a,m,f,w,P){return typeof w=="function"&&(P=w,w={}),s({url:m,method:a,data:f,headers:{"x-csrf-token":config.csrf_token,...w}},P)}},65303(y,v,i){i.r(v),i.d(v,{alert:()=>g,confirm:()=>E,dialog:()=>r,prompt:()=>n,promptPassword:()=>s});var d=i(33530),p=i.n(d),u=i(17459),h=i.n(u);d.setDefaults({locale:config.userLang}),u.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{d.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),d.setLocale(config.userLang)});async function r(t){const[e,o,C]=await Promise.all([u.translate(t.title||""),l(t)||"",c(t.buttons)]);return d.dialog({...t,title:e,message:o,buttons:C})}async function g(t,e){const[o,C]=await Promise.all([t&&t.title?u.translate(t.title):null,l(t)]);return e=typeof e=="function"?e:t.callback,d.alert({...t,title:o,message:C,callback:e})}async function E(t,e){const[o,C]=await Promise.all([t&&t.title?u.translate(t.title):null,l(t)]);return e=typeof e=="function"?e:t.callback,d.confirm({...t,title:o,message:C,callback:e})}async function n(t,e){const[o,C]=await Promise.all([u.translate(typeof t=="string"?t:t.title),t&&t.message?l(t):null]);return e=typeof e=="function"?e:t.callback,d.prompt({...t,title:o,message:C,callback:e})}async function s(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{n({...t,inputType:"password",required:!0,value:"",callback:e})})}function l(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:u.translate(e||"")}async function c(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async o=>({...o,label:await u.translateKey(o.label)})))}},68636(y,v,i){var d;d=(function(){function p(){this._store={},this._keys=[]}p.prototype.isMock=!0,p.prototype.setItem=function(r,g){r=String(r),this._keys.indexOf(r)===-1&&this._keys.push(r),this._store[r]=g},p.prototype.getItem=function(r){return r=String(r),this._keys.indexOf(r)===-1?null:this._store[r]},p.prototype.removeItem=function(r){r=String(r),this._keys=this._keys.filter(function(g){return g!==r}),this._store[r]=null},p.prototype.clear=function(){this._keys=[],this._store={}},p.prototype.key=function(r){return r=parseInt(r,10)||0,this._keys[r]},Object.defineProperty&&Object.defineProperty(p.prototype,"length",{get:function(){return this._keys.length}});let u;const h=Date.now().toString();try{if(u=window.localStorage,u.setItem(h,h),u.getItem(h)!==h)throw Error("localStorage behaved unexpectedly");return u.removeItem(h),u}catch(r){console.warn(r),console.warn("localStorage failed, falling back on sessionStorage");try{if(u=window.sessionStorage,u.setItem(h,h),u.getItem(h)!==h)throw Error("sessionStorage behaved unexpectedly");return u.removeItem(h),u}catch(g){return console.warn(g),console.warn("sessionStorage failed, falling back on memory storage"),new p}}}).call(v,i,v,y),d!==void 0&&(y.exports=d)}}]);

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.