1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[4884,46923,97082],{67910(m,x,c){"use strict";var y,f;y=[c(36684),c(72254),c(52473),c(17459),c(47283),c(28061),c(7524),c(49897),c(65303),c(29930)],f=(function(p,n,a,t,o,i,e,u,l,r){const s={};let d;s.init=function(){d=ajaxify.data.isAdmin||ajaxify.data.isSelf||ajaxify.data.isGlobalModerator,b(),d&&h(),a.get("account/follow").on("click",()=>E("follow")),a.get("account/unfollow").on("click",()=>E("unfollow")),a.get("account/chat").on("click",async function(){const{roomId:g}=await u.get(`/users/${encodeURIComponent(ajaxify.data.uid)}/chat`),v=await app.require("chat");g?v.openChat(g):v.newChat(ajaxify.data.uid)}),a.get("account/new-chat").on("click",async function(){(await app.require("chat")).newChat(ajaxify.data.uid,function(){a.get("account/chat").parent().removeClass("hidden")})}),a.get("account/ban").on("click",()=>i.banAccount(ajaxify.data.theirid)),a.get("account/mute").on("click",()=>i.muteAccount(ajaxify.data.theirid)),a.get("account/unban").on("click",()=>i.unbanAccount(ajaxify.data.theirid)),a.get("account/unmute").on("click",()=>i.unmuteAccount(ajaxify.data.theirid)),a.get("account/delete-account").on("click",()=>o.account(ajaxify.data.theirid)),a.get("account/delete-content").on("click",()=>o.content(ajaxify.data.theirid)),a.get("account/delete-all").on("click",()=>o.purge(ajaxify.data.theirid)),a.get("account/flag").on("click",A),a.get("account/already-flagged").on("click",C),a.get("account/block").on("click",()=>D("block")),a.get("account/unblock").on("click",()=>D("unblock"))};function b(){$('[component="profile/change/picture"]').on("click",function(){return e.openChangeModal(),!1})}function h(){p.init(a.get("account/cover"),function(g,v,w){socket.emit("user.updateCover",{uid:ajaxify.data.uid,imageData:g,position:v},w)},function(){n.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(),a.get("account/cover").css("background-image","url("+g+")")})},j)}function E(g){if(!app.user.uid){let w;return utils.isNumber(ajaxify.data.uid)?w=config.url+"/user/"+ajaxify.data.uid:w=ajaxify.data.userslug,c.e(91722).then(c.bind(c,91722)).then(({trigger:k})=>{k("follow",{object:w})}),!1}const v=isFinite(ajaxify.data.uid)?ajaxify.data.uid:encodeURIComponent(ajaxify.data.userslug);return u[g==="follow"?"put":"del"]("/users/"+v+"/follow",void 0,function(w){if(w)return r.error(w);a.get("account/follow").toggleClass("hide",g==="follow"),a.get("account/unfollow").toggleClass("hide",g==="unfollow"),r.success("[[global:alert."+g+", "+ajaxify.data.username+"]]")}),!1}function A(){c.e(6574).then(function(){var g=[c(6574)];(function(v){v.showFlagModal({type:"user",id:ajaxify.data.uid})}).apply(null,g)}).catch(c.oe)}function C(){const g=$(this).data("flag-id");c.e(6574).then(function(){var v=[c(6574)];(function(w){l.confirm("[[flags:modal-confirm-rescind]]",function(k){k&&w.rescind(g)})}).apply(null,v)}).catch(c.oe)}function D(g){return socket.emit("user.toggleBlock",{blockeeUid:ajaxify.data.uid,blockerUid:app.user.uid,action:g},function(v,w){if(v)return r.error(v);a.get("account/block").toggleClass("hidden",w),a.get("account/unblock").toggleClass("hidden",!w)}),!1}function j(){l.confirm("[[user:remove-cover-picture-confirm]]",function(g){g&&socket.emit("user.removeCover",{uid:ajaxify.data.uid},function(v){v?r.error(v):ajaxify.refresh()})})}return s}).apply(x,y),f!==void 0&&(m.exports=f)},76835(m,x,c){"use strict";var y,f;y=[c(67910),c(22410),c(91749)],f=(function(p,n,a){const t={};let o,i=1;t.init=function(){p.init(),t.handleInfiniteScroll("account/topics")},t.handleInfiniteScroll=function(l){o=l,i=ajaxify.data.pagination.currentPage,config.usePagination||n.init(e)};function e(l){if(l<0)return;const r=utils.params();i+=1,r.page=i,n.loadMoreXhr(r,function(s,d){s.topics&&s.topics.length?u(s.topics,d):d()})}function u(l,r){app.parseAndTranslate(o,"topics",{topics:l},function(s){$('[component="category"]').append(s),s.find(".timeago").timeago(),a.fire("action:topics.loaded",{topics:l}),r()})}return t}
1).apply(x,y),f!==void 0&&(m.exports=f)},22410(m,x,c){"use strict";var y,f;y=[c(91749),c(29930),c(49897)],f=(function(p,n,a){const t={};let o,i=0,e=!1,u,l=0;t.init=function(d,b){const h=$("body");typeof d=="function"?(o=d,u=h):(o=b,u=d||h),i=$(window).scrollTop(),$(window).off("scroll",r).on("scroll",r),h.height()<=$(window).height()&&ajaxify.data.pagination&&ajaxify.data.pagination.pageCount>1&&o(1)};function r(){l&&clearTimeout(l),l=setTimeout(function(){l=0,s()},60)}function s(){const d=utils.findBootstrapEnvironment(),b=(d==="xs"||d==="sm")&&$("html").hasClass("composing");if(e||b||app.flags._glance)return;const h=$(window).scrollTop(),E=$(window).height(),A=u.height()-E,C=u.offset()?u.offset().top:0,D=100*(h-C)/(A<=0?E:A),j=15,g=85,v=h>i?1:-1;(D<j&&h<i||D>g&&h>i||D<0&&v>0&&A<0)&&o(v),i=h}return t.loadMore=function(d,b,h){if(e)return;e=!0;const E={method:d,data:b};p.fire("action:infinitescroll.loadmore",E),(E.method.startsWith("/")?a.get:socket.emit)(E.method,E.data,function(C,D){if(C)return e=!1,n.error(C);h(D,function(){e=!1})})},t.loadMoreXhr=function(d,b){if(e)return;e=!0;const h=config.relative_path+"/api"+location.pathname.replace(new RegExp("^"+config.relative_path),""),E={url:h,data:d};p.fire("action:infinitescroll.loadmore.xhr",E),$.get(h,d,function(A){b(A,function(){e=!1})}).fail(function(A){e=!1,n.error(String(A.responseJSON||"[[error:no-connection]]"))})},t.removeExtra=function(d,b,h){let E=$();if(d.length<=h)return E;const A=d.length-h;if(b>0){const C=$(document).height(),D=$(window).scrollTop();E=d.slice(0,A).remove(),$(window).scrollTop(D+($(document).height()-C))}else E=d.slice(d.length-A).remove();return E},t}).apply(x,y),f!==void 0&&(m.exports=f)},47283(m,x,c){"use strict";var y,f;y=[c(49897),c(65303),c(29930)],f=(function(p,n,a){const t={};t.account=function(i,e){o(i,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",e)},t.content=function(i,e){o(i,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",e)},t.purge=function(i,e){o(i,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",e)};function o(i,e,u,l,r){n.confirm(e,function(s){s&&p.del(`/users/${encodeURIComponent(i)}${u}`,{}).then(()=>{if(a.success(l),typeof r=="function")return r()}).catch(a.error)})}return t}).apply(x,y),f!==void 0&&(m.exports=f)},28061(m,x,c){"use strict";var y,f;y=[c(49897),c(65303),c(29930),c(81335)],f=(function(p,n,a,t){const o={};o.banAccount=function(e,u){e=e||ajaxify.data.theirid,i({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(l){p.put("/users/"+encodeURIComponent(e)+"/ban",{until:l.until,reason:l.reason||""}).then(()=>{if(typeof u=="function")return u();ajaxify.refresh()}).catch(a.error)}})},o.unbanAccount=function(e){i({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(u){p.del("/users/"+encodeURIComponent(e)+"/ban",{reason:u.reason||""}).then(()=>{ajaxify.refresh()}).catch(a.error)}})},o.muteAccount=function(e,u){e=e||ajaxify.data.theirid,i({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(l){p.put("/users/"+e+"/mute",{until:l.until,reason:l.reason||""}).then(()=>{if(typeof u=="function")return u();ajaxify.refresh()}).catch(a.error)}})},o.unmuteAccount=function(e){i({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(u){p.del("/users/"+e+"/mute",{reason:u.reason||""}).then(()=>{ajaxify.refresh()}).catch(a.error)}})};async function i(e){const u=await socket.emit("user.getCustomReasons",{type:e.type||""}),l=await t.render(e.tpl,{reasons:u}),r=await n.dialog({title:e.title,message:l,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:e.title,callback:function(){const s=r.find("form").serializeArray().reduce(function(d,b){return d[b.name]=b.value,d},{});if(Object.hasOwn(s,"length")){const b=parseInt(s.unit,10)?24:1;s.until=s.length>0?Date.now()+s.length*36e5*b:0}else s.until=0;e.onSubmit(s)}}}});return r.find("[data-key]").on("click",function(){const s=u.find(d=>String(d.key)===$(this).attr("data-key"));s&&s.body&&r.find('[name="reason"]').val(s.body)}),r}return o.throwModal=i,o}
1).apply(x,y),f!==void 0&&(m.exports=f)},36684(m,x,c){"use strict";var y,f;y=[c(29930),c(18675)],f=(function(p){const n={coverEl:null,saveFn:null};n.init=function(t,o,i,e){n.coverEl=t,n.saveFn=o,t.find(".upload").on("click",i),t.find(".resize").on("click",function(){a(t)}),t.find(".remove").on("click",e),t.on("dragover",n.onDragOver).on("drop",n.onDrop),t.find(".save").on("click",n.save),t.addClass("initialised")},n.onDragOver=function(t){t.stopPropagation(),t.preventDefault(),t.originalEvent.dataTransfer.dropEffect="copy"},n.onDrop=function(t){t.stopPropagation(),t.preventDefault();const o=t.originalEvent.dataTransfer.files,i=new FileReader;o.length&&o[0].type.match("image.*")&&(i.onload=function(e){n.coverEl.css("background-image","url("+e.target.result+")"),n.newCover=e.target.result},i.readAsDataURL(o[0]),a(n.coverEl))};function a(t){t.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 n.save=function(){n.coverEl.addClass("saving"),n.saveFn(n.newCover||void 0,n.coverEl.css("background-position"),function(t){t?p.error(t):(n.coverEl.toggleClass("active",0),n.coverEl.backgroundDraggable("disable"),n.coverEl.off("dragover",n.onDragOver),n.coverEl.off("drop",n.onDrop),p.success("[[modules:cover.saved]]")),n.coverEl.removeClass("saving")})},n}).apply(x,y),f!==void 0&&(m.exports=f)},18675(){(function(m){var x=m(window),c=function(n,a,t,o){if(arguments.length===3||o){if(t<n)return n;if(t>a)return a}return t},y=function(n){n.clientX=n.originalEvent.touches[0].clientX,n.clientY=n.originalEvent.touches[0].clientY},f=function(n){var a=(n.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1];if(a){var t={width:0,height:0},o=new Image;return o.onload=function(){if(n.css("background-size")=="cover"){var i=n.innerWidth(),e=n.innerHeight(),u=i/e,l=o.width/o.height,r=1;l>=u?r=e/o.height:r=i/o.width,t.width=o.width*r,t.height=o.height*r}else t.width=o.width,t.height=o.height},o.src=a,t}};function p(n,a){this.element=n,this.options=a,this.init()}p.prototype.init=function(){var n=m(this.element),a=(n.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1],t=this.options;if(a){var o={width:0,height:0};(t.bound||t.units=="percent")&&(o=f(n)),m(window).on("keydown.dbg",i=>{var e=n.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],u=parseInt(e[1])||0,l=parseInt(e[2])||0;t.units=="percent"&&(u=Math.round(u/-200*o.width),l=Math.round(l/-200*o.height));var r=0,s=0;return i.which===37?r=-5:i.which===39?r=5:i.which===38?s=-5:i.which===40&&(s=5),t.units==="percent"?(u=t.axis==="y"?u:c(-o.width/2,0,u+r,t.bound),l=t.axis==="x"?l:c(-o.height/2,0,l+s,t.bound),n.css("background-position",u/o.width*-200+"% "+l/o.height*-200+"%")):(u=t.axis==="y"?u:c(n.innerWidth()-o.width,0,u+r,t.bound),l=t.axis==="x"?l:c(n.innerHeight()-o.height,0,l+s,t.bound)),[37,38,39,40].includes(i.which)?!1:void 0}),n.on("mousedown.dbg touchstart.dbg",function(i){if(i.target===n[0]){if(i.preventDefault(),i.originalEvent.touches)y(i);else if(i.which!==1)return;var e=i.clientX,u=i.clientY,l=n.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],r=parseInt(l[1])||0,s=parseInt(l[2])||0;t.units=="percent"&&(r=Math.round(r/-200*o.width),s=Math.round(s/-200*o.height)),x.on("mousemove.dbg touchmove.dbg",function(d){d.preventDefault(),d.originalEvent.touches&&y(d);var b=d.clientX,h=d.clientY;t.units=="percent"?(r=t.axis==="y"?r:c(-o.width/2,0,r+b-e,t.bound),s=t.axis==="x"?s:c(-o.height/2,0,s+h-u,t.bound),n.css("background-position",r/o.width*-200+"% "+s/o.height*-200+"%")):(r=t.axis==="y"?r:c(n.innerWidth()-o.width,0,r+b-e,t.bound),s=t.axis==="x"?s:c(n.innerHeight()-o.height,0,s+h-u,t.bound),n.css("background-position",r+"px "+s+"px")),e=b,u=h}),x.on("mouseup.dbg touchend.dbg mouseleave.dbg",function(){t.done&&t.done(),x.off("mousemove.dbg touchmove.dbg"),x.off("mouseup.dbg touchend.dbg mouseleave.dbg")})}})}},p.prototype.disable=function(){var n=m(this.element);n.off("mousedown.dbg touchstart.dbg"),x.off("mousemove.dbg touchmove.dbg mouseup.dbg touchend.dbg mouseleave.dbg keydown.dbg")},m.fn.backgroundDraggable=function(n){var a=Array.prototype.slice.call(arguments,1
1);return this.each(function(){var t=m(this),o;typeof n>"u"||typeof n=="object"?(n=m.extend({},m.fn.backgroundDraggable.defaults,n),o=new p(this,n),t.data("dbg",o)):typeof n=="string"&&t.data("dbg")&&(o=t.data("dbg"),p.prototype[n].apply(o,a))})},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.