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