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