1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[4884,16554,18470,97082],{67910(m,b,r){"use strict";var v,h;v=[r(36684),r(72254),r(52473),r(17459),r(47283),r(28061),r(7524),r(49897),r(65303),r(29930)],h=(function(p,o,f,a,s,u,c,t,n,i){const e={};let d;e.init=function(){d=ajaxify.data.isAdmin||ajaxify.data.isSelf||ajaxify.data.isGlobalModerator,l(),d&&y(),f.get("account/follow").on("click",()=>x("follow")),f.get("account/unfollow").on("click",()=>x("unfollow")),f.get("account/chat").on("click",async function(){const{roomId:g}=await t.get(`/users/${encodeURIComponent(ajaxify.data.uid)}/chat`),A=await app.require("chat");g?A.openChat(g):A.newChat(ajaxify.data.uid)}),f.get("account/new-chat").on("click",async function(){(await app.require("chat")).newChat(ajaxify.data.uid,function(){f.get("account/chat").parent().removeClass("hidden")})}),f.get("account/ban").on("click",()=>u.banAccount(ajaxify.data.theirid)),f.get("account/mute").on("click",()=>u.muteAccount(ajaxify.data.theirid)),f.get("account/unban").on("click",()=>u.unbanAccount(ajaxify.data.theirid)),f.get("account/unmute").on("click",()=>u.unmuteAccount(ajaxify.data.theirid)),f.get("account/delete-account").on("click",()=>s.account(ajaxify.data.theirid)),f.get("account/delete-content").on("click",()=>s.content(ajaxify.data.theirid)),f.get("account/delete-all").on("click",()=>s.purge(ajaxify.data.theirid)),f.get("account/flag").on("click",C),f.get("account/already-flagged").on("click",E),f.get("account/block").on("click",()=>R("block")),f.get("account/unblock").on("click",()=>R("unblock"))};function l(){$('[component="profile/change/picture"]').on("click",function(){return c.openChangeModal(),!1})}function y(){p.init(f.get("account/cover"),function(g,A,D){socket.emit("user.updateCover",{uid:ajaxify.data.uid,imageData:g,position:A},D)},function(){o.show({title:"[[user:upload-cover-picture]]",socketMethod:"user.updateCover",aspectRatio:NaN,allowSkippingCrop:!0,restrictImageDimension:!1,paramName:"uid",paramValue:ajaxify.data.theirid,accept:".png,.jpg,.bmp"},function(g){g=(g.startsWith("http")?"":config.relative_path)+g+"?"+Date.now(),f.get("account/cover").css("background-image","url("+g+")")})},j)}function x(g){if(!app.user.uid){let D;return utils.isNumber(ajaxify.data.uid)?D=config.url+"/user/"+ajaxify.data.uid:D=ajaxify.data.userslug,r.e(91722).then(r.bind(r,91722)).then(({trigger:k})=>{k("follow",{object:D})}),!1}const A=isFinite(ajaxify.data.uid)?ajaxify.data.uid:encodeURIComponent(ajaxify.data.userslug);return t[g==="follow"?"put":"del"]("/users/"+A+"/follow",void 0,function(D){if(D)return i.error(D);f.get("account/follow").toggleClass("hide",g==="follow"),f.get("account/unfollow").toggleClass("hide",g==="unfollow"),i.success("[[global:alert."+g+", "+ajaxify.data.username+"]]")}),!1}function C(){r.e(6574).then(function(){var g=[r(6574)];(function(A){A.showFlagModal({type:"user",id:ajaxify.data.uid})}).apply(null,g)}).catch(r.oe)}function E(){const g=$(this).data("flag-id");r.e(6574).then(function(){var A=[r(6574)];(function(D){n.confirm("[[flags:modal-confirm-rescind]]",function(k){k&&D.rescind(g)})}).apply(null,A)}).catch(r.oe)}function R(g){return socket.emit("user.toggleBlock",{blockeeUid:ajaxify.data.uid,blockerUid:app.user.uid,action:g},function(A,D){if(A)return i.error(A);f.get("account/block").toggleClass("hidden",D),f.get("account/unblock").toggleClass("hidden",!D)}),!1}function j(){n.confirm("[[user:remove-cover-picture-confirm]]",function(g){g&&socket.emit("user.removeCover",{uid:ajaxify.data.uid},function(A){A?i.error(A):ajaxify.refresh()})})}return e}).apply(b,v),h!==void 0&&(m.exports=h)},66934(m,b,r){m.exports=r(72961)},47283(m,b,r){"use strict";var v,h;v=[r(49897),r(65303),r(29930)],h=(function(p,o,f){const a={};a.account=function(u,c){s(u,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",c)},a.content=function(u,c){s(u,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",c)},a.purge=function(u,c){s(u,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",c)};function s(u,c,t,n,i){o.confirm(c,function(e){e&&p.del(`/users/${encodeURIComponent(u)}${t}`,{}).then(()=>
1{if(f.success(n),typeof i=="function")return i()}).catch(f.error)})}return a}).apply(b,v),h!==void 0&&(m.exports=h)},28061(m,b,r){"use strict";var v,h;v=[r(49897),r(65303),r(29930),r(81335)],h=(function(p,o,f,a){const s={};s.banAccount=function(c,t){c=c||ajaxify.data.theirid,u({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(n){p.put("/users/"+encodeURIComponent(c)+"/ban",{until:n.until,reason:n.reason||""}).then(()=>{if(typeof t=="function")return t();ajaxify.refresh()}).catch(f.error)}})},s.unbanAccount=function(c){u({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(t){p.del("/users/"+encodeURIComponent(c)+"/ban",{reason:t.reason||""}).then(()=>{ajaxify.refresh()}).catch(f.error)}})},s.muteAccount=function(c,t){c=c||ajaxify.data.theirid,u({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(n){p.put("/users/"+c+"/mute",{until:n.until,reason:n.reason||""}).then(()=>{if(typeof t=="function")return t();ajaxify.refresh()}).catch(f.error)}})},s.unmuteAccount=function(c){u({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(t){p.del("/users/"+c+"/mute",{reason:t.reason||""}).then(()=>{ajaxify.refresh()}).catch(f.error)}})};async function u(c){const t=await socket.emit("user.getCustomReasons",{type:c.type||""}),n=await a.render(c.tpl,{reasons:t}),i=await o.dialog({title:c.title,message:n,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:c.title,callback:function(){const e=i.find("form").serializeArray().reduce(function(d,l){return d[l.name]=l.value,d},{});if(Object.hasOwn(e,"length")){const l=parseInt(e.unit,10)?24:1;e.until=e.length>0?Date.now()+e.length*36e5*l:0}else e.until=0;c.onSubmit(e)}}}});return i.find("[data-key]").on("click",function(){const e=t.find(d=>String(d.key)===$(this).attr("data-key"));e&&e.body&&i.find('[name="reason"]').val(e.body)}),i}return s.throwModal=u,s}).apply(b,v),h!==void 0&&(m.exports=h)},36684(m,b,r){"use strict";var v,h;v=[r(29930),r(18675)],h=(function(p){const o={coverEl:null,saveFn:null};o.init=function(a,s,u,c){o.coverEl=a,o.saveFn=s,a.find(".upload").on("click",u),a.find(".resize").on("click",function(){f(a)}),a.find(".remove").on("click",c),a.on("dragover",o.onDragOver).on("drop",o.onDrop),a.find(".save").on("click",o.save),a.addClass("initialised")},o.onDragOver=function(a){a.stopPropagation(),a.preventDefault(),a.originalEvent.dataTransfer.dropEffect="copy"},o.onDrop=function(a){a.stopPropagation(),a.preventDefault();const s=a.originalEvent.dataTransfer.files,u=new FileReader;s.length&&s[0].type.match("image.*")&&(u.onload=function(c){o.coverEl.css("background-image","url("+c.target.result+")"),o.newCover=c.target.result},u.readAsDataURL(s[0]),f(o.coverEl))};function f(a){a.toggleClass("active",1).backgroundDraggable({axis:"y",units:"percent"}),p.alert({alert_id:"drag_start",title:"[[modules:cover.dragging-title]]",message:"[[modules:cover.dragging-message]]",timeout:5e3})}return o.save=function(){o.coverEl.addClass("saving"),o.saveFn(o.newCover||void 0,o.coverEl.css("background-position"),function(a){a?p.error(a):(o.coverEl.toggleClass("active",0),o.coverEl.backgroundDraggable("disable"),o.coverEl.off("dragover",o.onDragOver),o.coverEl.off("drop",o.onDrop),p.success("[[modules:cover.saved]]")),o.coverEl.removeClass("saving")})},o}).apply(b,v),h!==void 0&&(m.exports=h)},70012(m,b,r){"use strict";var v,h;v=[r(91749),r(29930)],h=(function(p,o){let f=[],a=0;function s(t,n){typeof t!="string"&&(t=$(t),t=t.data("type")||t.attr("type")||t.prop("tagName"));const i=c.plugins[t.toLowerCase()];if(i==null)return;const e=i[n];return typeof e=="function"?e:null}const u={deepClone:function(t){return typeof t=="object"?JSON.parse(JSON.stringify(t)):t},createElement:function(t,n,i){const e=document.createElement(t);for(const[d,l]of Object.entries(n))e.setAttribute(d,l);return i&&e.appendChild(document.createTextNode(i)),e},initElement:function(t){const n=s(t,"init");n?.call(c,$(t))},destructElement:function(t){const n=s(t,"destruct");n?.call(c,$(t))},createElementOfType:function(t,n,i){let e;const d=s(t,"create");
1return d!=null?e=$(d.call(c,t,n,i)):(i==null&&(i={}),t!=null&&(i.type=t),e=$(u.createElement(n||"input",i))),e.data("type",t),u.initElement(e),e},cleanArray:function(t,n,i){const e=[];if(!n&&i)return t;for(let d=0;d<t.length;d+=1){let l=t[d];n&&(l===!!l?l=+l:l&&typeof l.trim=="function"&&(l=l.trim())),(i||l!=null&&l.length)&&e.push(l)}return e},isTrue:function(t){return t==="true"||+t==1},isFalse:function(t){return t==="false"||+t==0},readValue:function(t){let n=!u.isFalse(t.data("empty"));const i=!u.isFalse(t.data("trim")),e=t.data("split"),d=s(t,"get");let l;if(d!=null)return d.call(c,t,i,n);if(e!=null){n=u.isTrue(t.data("empty")),l=t.val();const y=l!=null&&l.split(e||",")||[];return u.cleanArray(y,i,n)}if(l=t.val(),i&&l!=null&&typeof l.trim=="function"&&(l=l.trim()),n||l!==void 0&&(l==null||l.length!==0))return l},fillField:function(t,n){const i=s(t,"set");let e=t.data("trim");if(e=e!=="false"&&+e!=0,i!=null)return i.call(c,t,n,e);n instanceof Array&&(n=n.join(t.data("split")||(e?", ":","))),e&&n&&typeof n.trim=="function"?(n=n.trim(),typeof n.toString=="function"&&(n=n.toString())):n!=null?(typeof n.toString=="function"&&(n=n.toString()),e&&(n=n.trim())):n="",n!==void 0&&t.val(n)},initFields:function(t){$("[data-key]",t).each(function(n,i){i=$(i);const e=s(i,"init"),d=i.data("key").split(".");let l=c.get();e?.call(c,i);for(let y=0;y<d.length;y+=1){const x=d[y];x&&l!=null&&(l=l[x])}u.fillField(i,l)})},registerReadyJobs:function(t){return a+=t,a},beforeReadyJobsDecreased:function(t){if(t==null&&(t=1),a>0&&(a-=t,a<=0)){for(let n=0;n<f.length;n+=1)f[n]();f=[]}},whenReady:function(t){a<=0?t():f.push(t)},serializeForm:function(t){const n=t.serializeObject();return t.find('input[type="checkbox"]').each(function(i,e){e=$(e),e.is(":checked")||(n[e.attr("name")]="off")}),t.find("select[multiple]").each(function(i,e){e=$(e),n[e.attr("name")]=JSON.stringify(e.val())}),n},persistSettings:function(t,n,i,e){n!=null&&n._!=null&&typeof n._!="string"&&(n=u.deepClone(n),n._=JSON.stringify(n._)),socket.emit("admin.settings.set",{hash:t,values:n},function(d){i&&(d?o.alert({title:"[[admin/admin:changes-not-saved]]",type:"danger",message:`[[admin/admin/changes-not-saved-message, ${d.message}]]`,timeout:5e3}):o.alert({title:"[[admin/admin:changes-saved]]",type:"success",message:"[[admin/admin:changes-saved-message]]",timeout:2500})),typeof e=="function"&&e(d)})},use:function(t){try{t._=JSON.parse(t._)}catch(n){console.error(n)}c.cfg=t}},c={helper:u,plugins:{},cfg:{},get:function(){return c.cfg!=null&&c.cfg._!==void 0?c.cfg._:c.cfg},registerPlugin:function(t,n){n==null?n=t.types:t.types=n,typeof t.use=="function"&&t.use.call(c);for(let i=0;i<n.length;i+=1){const e=n[i].toLowerCase();c.plugins[e]==null&&(c.plugins[e]=t)}},set:function(t,n,i,e,d){d==null&&(d=!0),u.whenReady(function(){u.use(n),u.initFields(i||"form"),u.persistSettings(t,n,d,e)})},sync:function(t,n,i){socket.emit("admin.settings.get",{hash:t},function(e,d){e?typeof i=="function"&&i(e):u.whenReady(function(){u.use(d),u.initFields(n||"form"),typeof i=="function"&&i()})})},persist:function(t,n,i,e){const d=[],l=$("[data-key]",n||"form").toArray();e==null&&(e=!0);for(let y=0;y<l.length;y+=1){const x=$(l[y]),C=u.readValue(x);let E=c.get();const R=x.data("key").split("."),j=R[R.length-1];if(R.length>1)for(let g=0;g<R.length-1;g+=1){const A=R[g];A&&E!=null&&(E=E[A])}E!=null?C!=null?E[j]=C:delete E[j]:d.push(x.data("key"))}d.length&&o.alert({title:"Attributes Not Saved",message:"'"+d.join(", ")+"' could not be saved. Please contact the plugin-author!",type:"danger",timeout:5e3}),u.persistSettings(t,c.cfg,e,i)},load:function(t,n,i){i=i||function(){};const e=n.attr("data-socket-get");socket.emit(e||"admin.settings.get",{hash:t},function(d,l){if(d)return i(d);$(n).find("select[multiple]").each(function(x,C){const E=$(C).attr("name");if(E&&l.hasOwnProperty(E))try{l[E]=JSON.parse(l[E])}catch(R){console.error(R)}}),ajaxify.data[e?t:"settings"]=l,u.whenReady(function(){$(n).find("[data-sorted-list]").each(function(x,C){s(C,"get").call(c,$(C),t)})}),$(n).deserialize(l),p.fire("action:admin.settingsLoaded"),$(n).on("change","input, select, textarea",function(){app.flags=app.flags||{},app.flags._unsaved=!0});const y=document.getElementById("save");y&&r.e(6411).then(function(){var x=[r(6411)];(function(C){C.bind("ctrl+s",function(E){y.click(),E.preventDefault()})}).apply(null,x)}).catch(r.oe),i(null,l)})},save:function(t,n,i){n=$(n);const e=n.get(0).elements;if(c.check(e)&&n.length){const l=u.serializeForm(n);u.whenReady(function(){const x=n.find("[data-sorted-list]");x.length&&x.each((C,E)=>{s(E,"set").call(c,$(E),l)})});const y=n.attr("data-socket-set");socket.emit(y||"admin.settings.set",{hash:t,values:l},function(x){if(app.flags._unsaved=!1,ajaxify.data[y?t:"settings"]=l,typeof i=="function")i(x);else if(x)o.alert({title:"[[admin/admin:changes-not-saved]]",message:`[[admin/admin:changes-not-saved-message, ${x.message}]]`,type:"error",timeout:5e3});else{const C=document.getElementById("save");C.classList.toggle("saved",!0),setTimeout(()=>{C.classList.toggle("saved",!1)},1500)}})}},check:function(t){const n=i=>{const e=i.target.closest(".form-group");e&&e.classList.add("has-error"),i.target.removeEventListener("invalid",n)};return Array.prototype.map.call(t,i=>{const e=i.closest(".form-group");return e&&e.classList.remove("has-error"),i.addEventListener("invalid",n),i.reportValidity()}).every(Boolean)}};return u.registerReadyJobs(1),Promise.all([r.e(23662),r.e(65285),r.e(19308)]).then(function(){var t=[r(75210),r(474),r(50397),r(71575),r(40054),r(17708),r(46700),r(59175)];(function(){for(let n=0;n<arguments.length;n+=1)c.registerPlugin(arguments[n]);u.beforeReadyJobsDecreased()}).apply(null,t)}).catch(r.oe),c}
1).apply(b,v),h!==void 0&&(m.exports=h)},72961(m,b,r){"use strict";var v,h;v=[r(67910),r(49897),r(70012),r(29930)],h=(function(p,o,f,a){const s={};return s.init=()=>{p.init(),s.setupForm()},s.setupForm=()=>{const u=document.getElementById("save");if(u){const c=document.getElementById("theme-settings");u.addEventListener("click",async()=>{const t=f.helper.serializeForm($(c));await o.put(`/users/${ajaxify.data.uid}/settings`,{settings:{...t}}),ajaxify.data.isSelf&&(config.theme=(await o.get("/api/config")).theme),a.success("[[success:settings-saved]]")})}},s}).apply(b,v),h!==void 0&&(m.exports=h)},18675(){(function(m){var b=m(window),r=function(o,f,a,s){if(arguments.length===3||s){if(a<o)return o;if(a>f)return f}return a},v=function(o){o.clientX=o.originalEvent.touches[0].clientX,o.clientY=o.originalEvent.touches[0].clientY},h=function(o){var f=(o.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1];if(f){var a={width:0,height:0},s=new Image;return s.onload=function(){if(o.css("background-size")=="cover"){var u=o.innerWidth(),c=o.innerHeight(),t=u/c,n=s.width/s.height,i=1;n>=t?i=c/s.height:i=u/s.width,a.width=s.width*i,a.height=s.height*i}else a.width=s.width,a.height=s.height},s.src=f,a}};function p(o,f){this.element=o,this.options=f,this.init()}p.prototype.init=function(){var o=m(this.element),f=(o.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1],a=this.options;if(f){var s={width:0,height:0};(a.bound||a.units=="percent")&&(s=h(o)),m(window).on("keydown.dbg",u=>{var c=o.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],t=parseInt(c[1])||0,n=parseInt(c[2])||0;a.units=="percent"&&(t=Math.round(t/-200*s.width),n=Math.round(n/-200*s.height));var i=0,e=0;return u.which===37?i=-5:u.which===39?i=5:u.which===38?e=-5:u.which===40&&(e=5),a.units==="percent"?(t=a.axis==="y"?t:r(-s.width/2,0,t+i,a.bound),n=a.axis==="x"?n:r(-s.height/2,0,n+e,a.bound),o.css("background-position",t/s.width*-200+"% "+n/s.height*-200+"%")):(t=a.axis==="y"?t:r(o.innerWidth()-s.width,0,t+i,a.bound),n=a.axis==="x"?n:r(o.innerHeight()-s.height,0,n+e,a.bound)),[37,38,39,40].includes(u.which)?!1:void 0}),o.on("mousedown.dbg touchstart.dbg",function(u){if(u.target===o[0]){if
1(u.preventDefault(),u.originalEvent.touches)v(u);else if(u.which!==1)return;var c=u.clientX,t=u.clientY,n=o.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],i=parseInt(n[1])||0,e=parseInt(n[2])||0;a.units=="percent"&&(i=Math.round(i/-200*s.width),e=Math.round(e/-200*s.height)),b.on("mousemove.dbg touchmove.dbg",function(d){d.preventDefault(),d.originalEvent.touches&&v(d);var l=d.clientX,y=d.clientY;a.units=="percent"?(i=a.axis==="y"?i:r(-s.width/2,0,i+l-c,a.bound),e=a.axis==="x"?e:r(-s.height/2,0,e+y-t,a.bound),o.css("background-position",i/s.width*-200+"% "+e/s.height*-200+"%")):(i=a.axis==="y"?i:r(o.innerWidth()-s.width,0,i+l-c,a.bound),e=a.axis==="x"?e:r(o.innerHeight()-s.height,0,e+y-t,a.bound),o.css("background-position",i+"px "+e+"px")),c=l,t=y}),b.on("mouseup.dbg touchend.dbg mouseleave.dbg",function(){a.done&&a.done(),b.off("mousemove.dbg touchmove.dbg"),b.off("mouseup.dbg touchend.dbg mouseleave.dbg")})}})}},p.prototype.disable=function(){var o=m(this.element);o.off("mousedown.dbg touchstart.dbg"),b.off("mousemove.dbg touchmove.dbg mouseup.dbg touchend.dbg mouseleave.dbg keydown.dbg")},m.fn.backgroundDraggable=function(o){var f=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=m(this),s;typeof o>"u"||typeof o=="object"?(o=m.extend({},m.fn.backgroundDraggable.defaults,o),s=new p(this,o),a.data("dbg",s)):typeof o=="string"&&a.data("dbg")&&(s=a.data("dbg"),p.prototype[o].apply(s,f))})},m.fn.backgroundDraggable.defaults={bound:!0,axis:void 0,units:"pixels"}})(jQuery)}}]);
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.