1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[26477,99127,5719,42289,34271,51831,69185,86198,1091],{67855:(D,x,s)=>{var y,m;y=[s(39259),s(65348),s(49897),s(29930),s(40027),s(28061),s(47283)],m=function(v,A,j,g,d,e,t){const i={};i.init=function(){$('[data-bs-toggle="tooltip"]').tooltip(),v.init($('[component="category/dropdown"]'),{privilege:"moderate"}),o(),E(),f('[data-action="editContent"]',".post-content-editable","textarea",".post-content"),f('[data-action="editTitle"]',".topic-title-editable","input",".topic-title"),$(".posts-list").on("click",".topic-category[data-editable]",function(r){n(this),r.stopPropagation(),r.preventDefault()}),$('[component="post/content"] img:not(.not-responsive)').addClass("img-fluid"),a()};function a(){$(".posts-list [data-id]").each((r,h)=>{const u=$(h),w=u.find('[component="post-queue/link-container"]'),p=w.find('[component="post-queue/link-container/list"]'),C=u.find(".post-content a");C.each((k,b)=>{const P=$(b).attr("href");p.append(`<li><a href="${P}">${P}</a></li>`)}),w.toggleClass("hidden",!C.length)})}function l(r){return new Promise(h=>{d.confirm(r,h)})}function f(r,h,u,w){$(".posts-list").on("click",r,function(){const p=$(this),C=p.parents("[data-id]").find(h),k=p.parents("[data-id]").find(w);C.length&&(k.addClass("hidden"),C.removeClass("hidden").find(u).focus())}),$(".posts-list").on("blur",h+" "+u,function(){const p=$(this),C=p.parent().parent().find(w),k=p.parents("[data-id]").attr("data-id"),b=r==='[data-action="editTitle"]';socket.emit("posts.editQueuedContent",{id:k,title:b?p.val():void 0,content:b?void 0:p.val()},function(P,L){if(P)return g.error(P);b?C.find(".title-text").text(L.postData.title):C.html(L.postData.content),p.parent().addClass("hidden"),C.removeClass("hidden")})})}function n(r){const h=$(r),u=h.parents("[data-id]").attr("data-id");return A.modal({onSubmit:function(w){Promise.all([j.get(`/categories/${w.cid}`,{}),socket.emit("posts.editQueuedContent",{id:u,cid:w.cid})]).then(function(p){const C=p[0];app.parseAndTranslate("post-queue","posts",{posts:[{category:C}]},function(k){h.find(".category-text").length?h.find(".category-text").text(k.find(".topic-category .category-text").text()):h.replaceWith(k.find(".topic-category"))})}).catch(g.error)}}),!1}function o(){const r=document.querySelector(".posts-list");r&&r.addEventListener("click",h=>{const u=h.target.closest("[data-action]");if(u){const w=u.getAttribute("data-action"),p=u.closest("[data-uid]").getAttribute("data-uid");switch(w){case"editCategory":{const C=h.target.closest("[data-id]").querySelector(".topic-category");n(C);break}case"ban":e.banAccount(p,ajaxify.refresh);break;case"unban":e.unbanAccount(p);break;case"mute":e.muteAccount(p,ajaxify.refresh);break;case"unmute":e.unmuteAccount(p);break;case"delete-account":t.account(p,ajaxify.go.bind(null,"post-queue"));break;case"delete-content":t.content(p,ajaxify.go.bind(null,"post-queue"));break;case"delete-all":t.purge(p,ajaxify.go.bind(null,"post-queue"));break;default:c.call(h.target);break}}})}async function c(){function r(){return new Promise(C=>{const k=d.dialog({title:"[[post-queue:notify-user]]",message:'<textarea class="form-control"></textarea>',buttons:{OK:{label:"[[modules:bootbox.send]]",callback:function(){const b=k.find("textarea").val();b&&C(b)}}}})})}const h=$(this).parents("[data-id]"),u=$(this).attr("data-action"),w=h.attr("data-id"),p=h.get(0).parentNode;if(!(!["accept","reject","notify"].includes(u)||u==="reject"&&!await l(ajaxify.data.canAccept?"[[post-queue:confirm-reject]]":"[[post-queue:confirm-remove]]")))return socket.emit("posts."+u,{id:w,message:u==="notify"?await r():void 0},function(C){if(C)return g.error(C);(u==="accept"||u==="reject")&&h.remove(),p.childElementCount===0&&(ajaxify.data.singlePost?ajaxify.go("/post-queue"+window.location.search):ajaxify.refresh())}),!1}function E(){$('[component="post-queue/bulk-actions"]').on("click","[data-action]",async function(){const r=$(this).attr("data-action");let h=$(".posts-list [data-id]");(r==="accept-selected"||r==="reject-selected")&&(h=h.filter((b,P)=>$(P).find('input[type="checkbox"]').is(":checked")));const u=h.map((b,P)=>$(P).attr("data-id")).get(),w=r==="reject-all"||r==="reject-selected",p=ajaxify.data.canAccept?`${r}-confirm`:`${r.replace(/^reject/,"remove")}-confirm`;if(!u.length||w&&!await l(`[[post-queue:${p}, ${u.length}]]`))return;const C=r.split("-")[0],k=u.map(b=>socket.emit("posts."+C,{id:b}));Promise.allSettled(k).then(function(b){const P=b.filter(S=>S.status==="fulfilled").length,L=b.filter(S=>S.status==="rejected");P&&(g.success(`[[post-queue:bulk-${C}-success, ${P}
1]]`),ajaxify.refresh()),L.forEach(S=>g.error(S.reason))})})}return i}.apply(x,y),m!==void 0&&(D.exports=m)},47283:(D,x,s)=>{var y,m;y=[s(49897),s(40027),s(29930)],m=function(v,A,j){const g={};g.account=function(e,t){d(e,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",t)},g.content=function(e,t){d(e,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",t)},g.purge=function(e,t){d(e,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",t)};function d(e,t,i,a,l){A.confirm(t,function(f){f&&v.del(`/users/${e}${i}`,{}).then(()=>{if(j.success(a),typeof l=="function")return l()}).catch(j.error)})}return g}.apply(x,y),m!==void 0&&(D.exports=m)},28061:(D,x,s)=>{var y,m;y=[s(81335),s(49897),s(40027),s(29930)],m=function(v,A,j,g){const d={};d.banAccount=function(t,i){t=t||ajaxify.data.theirid,e({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",onSubmit:function(a){const l=a.length>0?Date.now()+a.length*1e3*60*60*(parseInt(a.unit,10)?24:1):0;A.put("/users/"+t+"/ban",{until:l,reason:a.reason||""}).then(()=>{if(typeof i=="function")return i();ajaxify.refresh()}).catch(g.error)}})},d.unbanAccount=function(t){e({tpl:"modals/unban",title:"[[user:unban-account]]",onSubmit:function(i){A.del("/users/"+t+"/ban",{reason:i.reason||""}).then(()=>{ajaxify.refresh()}).catch(g.error)}})},d.muteAccount=function(t,i){t=t||ajaxify.data.theirid,e({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",onSubmit:function(a){const l=a.length>0?Date.now()+a.length*1e3*60*60*(parseInt(a.unit,10)?24:1):0;A.put("/users/"+t+"/mute",{until:l,reason:a.reason||""}).then(()=>{if(typeof i=="function")return i();ajaxify.refresh()}).catch(g.error)}})},d.unmuteAccount=function(t){e({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(i){A.del("/users/"+t+"/mute",{reason:i.reason||""}).then(()=>{ajaxify.refresh()}).catch(g.error)}})};function e(t){v.render(t.tpl,{}).then(function(i){const a=j.dialog({title:t.title,message:i,show:!0,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:t.title,callback:function(){const l=a.find("form").serializeArray().reduce(function(f,n){return f[n.name]=n.value,f},{});t.onSubmit(l)}}}})})}return d}.apply(x,y),m!==void 0&&(D.exports=m)},49897:(D,x,s)=>{s.r(x),s.d(x,{del:()=>f,get:()=>e,head:()=>t,patch:()=>a,post:()=>i,put:()=>l});var y=s(91749),m=s.n(y),v=s(40027),A=s.n(v);const j=config.relative_path+"/api/v3";async function g(n,o){if(n.url=n.url.startsWith("/api")?config.relative_path+n.url:j+n.url,typeof o=="function"){d(n).then(c=>o(null,c),c=>o(c));return}try{return await d(n)}catch(c){if(c.message==="A valid login session was not found. Please log in and try again."){const{url:E}=await(0,y.fire)("filter:admin.reauth",{url:"login"});return(0,v.confirm)("[[error:api.reauth-required]]",r=>{r&&ajaxify.go(E)})}throw c}}async function d(n){const{url:o}=n;delete n.url,n.data&&!(n.data instanceof FormData)&&(n.data=JSON.stringify(n.data||{}),n.headers["content-type"]="application/json; charset=utf-8"),{options:n}=await(0,y.fire)("filter:api.options",{options:n}),n.data&&(n.body=n.data,delete n.data);const c=await fetch(o,n),{headers:E}=c,r=E.get("content-type"),h=r&&r.startsWith("application/json");let u;if(n.method!=="HEAD"&&(h?u=await c.json():u=await c.text()),!c.ok)throw u?new Error(h?u.status.message:u):new Error(c.statusText);return h&&u&&u.hasOwnProperty("status")&&u.hasOwnProperty("response")?u.response:u}function e(n,o,c){return g({url:n+(o&&Object.keys(o).length?"?"+$.param(o):"")},c)}function t(n,o,c){return g({url:n+(o&&Object.keys(o).length?"?"+$.param(o):""),method:"HEAD"},c)}function i(n,o,c){return g({url:n,method:"POST",data:o,headers:{"x-csrf-token":config.csrf_token}},c)}function a(n,o,c){return g({url:n,method:"PATCH",data:o,headers:{"x-csrf-token":config.csrf_token}},c)}function l(n,o,c){return g({url:n,method:"PUT",data:o,headers:{"x-csrf-token":config.csrf_token}},c)}function f(n,o,c){return g({url:n,method:"DELETE",data:o,headers:{"x-csrf-token":config.csrf_token}},c)}},39259:(D,x,s)=>{var y,m;y=[s(96349),s(49897),s(91749)],m=function(v,A,j){const g={};g.init=function(e,t){if(!e||!e.length)return;t=t||{},t.states=t.states||["watching","tracking","notwatching","ignoring"],t.template=t.template||"partials/category/filter-dropdown-left",j.fire("action:category.filter.options",{el:e,options:t}),v.init(e,t);let i=[],a=[];Array.isArray(t.selectedCids)?i=t.selectedCids.map(String):Array.isArray(ajaxify.data.selectedCids)&&(i=ajaxify.data.selectedCids.map(String)),a=i.slice(),e.on("hidden.bs.dropdown",function(){let l=a.length!==i.length;
1if(a.forEach(function(f,n){f!==i[n]&&(l=!0)}),a=i.slice(),l&&(t.updateButton?t.updateButton({el:e,changed:l,selectedCids:i.slice()}):t.updateButton!==!1&&d(e,i)),t.onHidden){t.onHidden({changed:l,selectedCids:i.slice()});return}if(l){let f=window.location.pathname;const n=utils.params();i.length?n.cid=i:delete n.cid,delete n.page,Object.keys(n).length&&(f+="?"+decodeURIComponent($.param(n))),ajaxify.go(f)}}),e.on("click",'[component="category/list"] [data-cid]',function(){const l=e.find('[component="category/list"]'),f=$(this),n=f.find("a").attr("href");if(n&&n!=="#"&&n.length)return;const o=f.attr("data-cid"),c=f.find('[component="category/select/icon"]');return o!=="all"?(i.includes(o)?i.splice(i.indexOf(o),1):i.push(o),i.sort(function(E,r){return E-r}),c.toggleClass("invisible"),l.find('[data-cid="all"] i').toggleClass("invisible",!!i.length)):(e.find('[component="category/select/icon"]').addClass("invisible"),l.find('[data-cid="all"] i').removeClass("invisible"),i=[]),t.selectedCids=i,t.onSelect&&t.onSelect({cid:o,selectedCids:i.slice()}),!1})};function d(e,t){t.length>1?i({icon:"fa-plus",name:"[[unread:multiple-categories-selected]]",bgColor:"#ddd"}):t.length===1?A.get(`/categories/${t[0]}`,{}).then(i):i();function i(a){app.parseAndTranslate("partials/category/filter-dropdown-content",{selectedCategory:a},function(l){e.find("button").replaceWith($("<div/>").html(l).find("button"))})}}return g}.apply(x,y),m!==void 0&&(D.exports=m)},96349:(D,x,s)=>{var y,m;y=[s(29930),s(89336),s(49897)],m=function(v,A,j){const g={};return g.init=function(d,e){let t=null;e=e||{},e.privilege=e.privilege||"topics:read",e.states=e.states||["watching","tracking","notwatching","ignoring"],e.cacheList=e.hasOwnProperty("cacheList")?e.cacheList:!0;let i=[];Array.isArray(e.localCategories)&&(i=e.localCategories.map(o=>({...o}))),e.selectedCids=e.selectedCids||ajaxify.data.selectedCids||[];const a=d.find('[component="category-selector-search"]');if(!a.length)return;const l=a.parent('[component="category/dropdown"]').length>0||a.parent('[component="category-selector"]').length>0;d.on("show.bs.dropdown",function(){l&&(d.find(".dropdown-toggle").css({visibility:"hidden"}),a.removeClass("hidden"),a.css({"z-index":d.find(".dropdown-toggle").css("z-index")+1}));function o(){const c=a.find("input").val();c.length>1||!c&&!t?f(c,function(E){t=e.cacheList&&(t||E),n(E)}):!c&&t&&n(t)}a.on("click",function(c){c.preventDefault(),c.stopPropagation()}),a.find("input").val("").on("keyup",utils.debounce(o,300)),o()}),d.on("shown.bs.dropdown",function(){["xs","sm"].includes(utils.findBootstrapEnvironment())||a.find("input").focus()}),d.on("hide.bs.dropdown",function(){l&&(d.find(".dropdown-toggle").css({visibility:"inherit"}),a.addClass("hidden")),a.off("click"),a.find("input").off("keyup")});function f(o,c){j.get("/search/categories",{search:o,query:utils.params(),parentCid:e.parentCid||0,selectedCids:e.selectedCids,privilege:e.privilege,states:e.states,showLinks:e.showLinks},function(E,{categories:r}){if(E)return v.error(E);c(i.concat(r))})}function n(o){const c=e.selectedCids.map(String);o.forEach(function(E){E.selected=c.includes(String(E.cid))}),app.parseAndTranslate(e.template,{categoryItems:o.slice(0,200),selectedCategory:ajaxify.data.selectedCategory,allCategoriesUrl:ajaxify.data.allCategoriesUrl},function(E){d.find('[component="category/list"]').html(E.find('[component="category/list"]').html()),d.find('[component="category/list"] [component="category/no-matches"]').toggleClass("hidden",!!o.length);const r=A.Dropdown.getInstance(d.find(".dropdown-toggle").get(0));r&&r.update()})}},g}.apply(x,y),m!==void 0&&(D.exports=m)},65348:(D,x,s)=>{var y,m;y=[s(96349),s(40027),s(91749),s(17459)],m=function(v,A,j,g){const d={};return d.init=function(e,t){if(!e||!e.length)return;t=t||{};const i=t.onSelect||function(){};t.states=t.states||["watching","tracking","notwatching","ignoring"],t.template=t.template||"partials/category/selector-dropdown-left",j.fire("action:category.selector.options",{el:e,options:t}),v.init(e,t);const a={el:e,selectedCategory:null};e.on("click","[data-cid]",function(){const f=$(this);return f.hasClass("disabled")?!1:(a.selectCategory(f.attr("data-cid")),i(a.selectedCategory))});let l=a.el.find('[component="category-selector-selected"]').html();return g.translate(l,f=>{l=f}),a.selectCategory=function(f){const n=a.el.find('[data-cid="'+f+'"]');a.selectedCategory={cid:f,name:n.attr("data-name")},n.length?a.el.find('[component="category-selector-selected"]').html(n.find('[component="category-markup"]').html()):a.el.find('[component="category-selector-selected"]').html(l)},a.getSelectedCategory=function(){return a.selectedCategory},a.getSelectedCid=function(){return a.selectedCategory?a.selectedCategory.cid:0},t.hasOwnProperty("selectedCategory")&&app.parseAndTranslate(t.template,{selectedCategory:t.selectedCategory},function(f){a.el.find('[component="category-selector-selected"]').html(f.find('[component="category-selector-selected"]').html())}),a},d.modal=function(e){e=e||{},e.onSelect=e.onSelect||function(){},e.onSubmit=e.onSubmit||function(){},app.parseAndTranslate("admin/partials/categories/select-category",{message:e.message},function(t){const i=A.dialog({title:e.title||"[[modules:composer.select-category]]",message:t,buttons:{save:{label:"[[global:select]]",className:"btn-primary",callback:l}}}),a=d.init(i.find('[component="category-selector"]'),e);function l(f){return f.preventDefault(),a.selectedCategory&&(e.onSubmit(a.selectedCategory),i.modal("hide")),!1}e.openOnLoad&&i.on("shown.bs.modal",function(){i.find(".dropdown-toggle").dropdown("toggle")}),i.find("form").on("submit",l)})},d}.apply(x,y),m!==void 0&&(D.exports=m)}}]);
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.