PageSourceSearch

https://mistarg.cn/assets/modules/api.08c02172311db25cf328.min.js

js mistarg.cn collected 2026-10-06 13:18:18 UTC 5,115 bytes, 1 lines download raw bytes

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

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.