1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[677,1091,2067,3602,4271,4747,7212,8314,8395,9127,9897],{677(M,_,c){var u,m;u=[c(2473),c(6227),c(7459),c(9930),c(9897)],m=(function(f,r,s,d,v){const x={};let l,p,O;x.init=function(n){l||(O=ajaxify.data.tid,app.parseAndTranslate("modals/move-post",{},function(t){l=t,p=l.find("#move_posts_confirm"),$("body").append(l),l.find("#move_posts_cancel").on("click",i),l.find("#topicId").on("keyup",utils.debounce(E,200)),r.init(w),g(),n&&r.togglePostSelection(n,n.attr("data-pid")),$(window).off("action:ajaxify.end",e).on("action:ajaxify.end",e),p.on("click",function(){const o=a();if(!o)return;p.attr("disabled",!0);const h={pids:r.pids.slice(),tid:o};if(config.undoTimeout>0)return d.alert({alert_id:"pids_move_"+r.pids.join("-"),title:"[[topic:thread-tools.move-posts]]",message:"[[topic:topic-move-posts-success]]",type:"success",timeout:config.undoTimeout,timeoutfn:function(){D(h)},clickfn:function(P,y){delete y.timeoutfn,d.success("[[topic:topic-move-posts-undone]]"),p.removeAttr("disabled")}});D(h)})}))};function e(){if(!l)return;const n=l.find("#topicId");let t=null;ajaxify.data.template.topic&&ajaxify.data.tid&&String(ajaxify.data.tid)!==String(O)&&(t=ajaxify.data.tid),t&&n.val(t),E()}function a(){const n=l.find("#topicId");return n.length&&n.val()?n.val():ajaxify.data.template.topic&&ajaxify.data.tid}function g(){if(!l)return;const n=a();r.pids.length?n&&String(n)!==String(O)?v.get(`/topics/${n}`,{}).then(function(t){if(!t||!t.tid)return d.error("[[error:no-topic]]");if(t.scheduled)return d.error("[[error:cant-move-posts-to-scheduled]]");const o=s.compile("topic:x-posts-will-be-moved-to-y",r.pids.length,t.title);l.find("#pids").translateText(o)}):l.find("#pids").translateText("[[topic:x-posts-selected, "+r.pids.length+"]]"):l.find("#pids").translateText("[[topic:no-posts-selected]]")}function E(){if(!l)return;const n=a();r.pids.length&&n&&String(n)!==String(O)?p.removeAttr("disabled"):p.attr("disabled",!0),g()}function w(){E()}function D(n){n.tid&&Promise.all(n.pids.map(t=>v.put(`/posts/${encodeURIComponent(t)}/move`,{tid:n.tid}))).then(()=>{n.pids.forEach(function(t){f.get("post","pid",t).fadeOut(500,function(){$(this).remove()})}),n.pids.length&&ajaxify.data.template.topic&&String(n.tid)===String(ajaxify.data.tid)&&ajaxify.go(`/post/${n.pids[0]}`),i()}).catch(d.error)}function i(){l&&(l.remove(),l=null,r.disable(),$(window).off("action:ajaxify.end",e))}return x}).apply(_,u),m!==void 0&&(M.exports=m)},9897(M,_,c){c.r(_),c.d(_,{del:()=>w,get:()=>O,head:()=>e,patch:()=>g,post:()=>a,put:()=>E});var u=c(1749),m=c.n(u),f=c(5303),r=c(7459),s=c.n(r),d=c(8636),v=c.n(d);const x=config.relative_path+"/api/v3";async function l(i,n){if(i.url=i.url.startsWith("/api")?config.relative_path+i.url:x+i.url,i.headers=i.headers||{},i.headers["x-return-to"]||(i.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof n=="function"){p(i).then(t=>n(null,t),t=>n(t));return}try{return await p(i)}catch(t){if(t.status===401){const{url:o}=await(0,u.fire)("filter:admin.reauth",{url:"login"}),h=await r.translate("[[error:api.reauth-required]]",config.userLang);(0,f.confirm)(h,P=>{P&&(d.setItem("location-hash",window.location.hash),ajaxify.go(o))})}throw t}}async function p(i){const{url:n}=i;delete i.url,i.data&&!(i.data instanceof FormData)&&(i.data=JSON.stringify(i.data||{}),i.headers["content-type"]="application/json; charset=utf-8"),{options:i}=await(0,u.fire)("filter:api.options",{options:i}),i.data&&(i.body=i.data,delete i.data);const t=await fetch(n,i),{headers:o}=t;if(o.get("x-redirect"))return p({url:o.get("x-redirect"),...i});const h=o.get("content-type"),P=h&&h.startsWith("application/json");let y;if(i.method!=="HEAD"&&(P?y=await t.json():y=await t.text()),!t.ok){let T=t.statusText;if(y){const A=P&&(y.status?.message||y.error||""),S=typeof y=="string"?y:t.statusText||`[[error:api.${t.status}]]`;T=P&&A?A:S}const I=new Error(T);throw I.status=t.status,I}return P&&y&&y.hasOwnProperty("status")&&y.hasOwnProperty("response")?y.response:y}function O(i,n,t){return l({url:i+(n&&Object.keys(n).length?"?"+$.param(n):"")},t)}function e(i,n,t){return l({url:i+(n&&Object.keys(n).length?"?"+$.param(n):""),method:"HEAD"},t)}function a(i,n,t,o){return D("POST",i,n,t,o)}function g(i,n,t,o){return D("PATCH",i,n,t,o)}function E(i,n,t,o){return D("PUT",i,n,t,o)}function w(i,n,t,o){return D("DELETE",i,n,t,o)}function D(i,n,t,o,h){return typeof o=="function"&&(h=o,o={}),l({url:n,method:i,data:t,headers:{"x-csrf-token":config.csrf_token,...o}},h)}},5303(M,_,c){c.r(_),c.d(_,{alert:()=>d,confirm:()=>v,dialog:()=>s,prompt:()=>x,promptPassword:()=>l});var u=c(3530),m=c.n(u),f=c(7459),r=c.n(f);u.setDefaults({locale:config.userLang}),f.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(e=>{u.addLocale(config.userLang,{OK:e[0],CANCEL:e[1],CONFIRM:e[2]}),u.setLocale(config.userLang)});async function s(e){const[a,g,E]=await Promise.all([f.translate(e.title||""),p(e)||"",O(e.buttons)]);return u.dialog({...e,title:a,message:g,buttons:E})}async function d(e,a){const[g,E]=await Promise.all([e&&e.title?f.translate(e.title):null,p(e)]);return a=typeof a=="function"?a:e.callback,u.alert({...e,title:g,message:E,callback:a})}async function v(e,a){const[g,E]=await Promise.all([e&&e.title?f.translate(e.title):null,p(e)]);return a=typeof a=="function"?a:e.callback,u.confirm({...e,title:g,message:E,callback:a})}async function x(e,a){const[g,E]=await Promise.all([f.translate(typeof e=="string"?e:e.title),e&&e.message?p(e):null]);return a=typeof a=="function"?a:e.callback,u.prompt({...e,title:g,message:E,callback:a})}async function l(e){return typeof e=="string"&&(e={title:e}),e=e||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(a=>{x({...e,inputType:"password",required:!0,value:"",callback:a})})}function p(e){const a=e&&e.message?e.message:e;return a instanceof jQuery?a:f.translate(a||"")}async function O(e){if(!Object.keys(e||{}).length)return;const a=Object.values(e);return await Promise.all(a.map(async g=>({...g,label:await f.translateKey(g.label)})))}},6227(M,_,c){var u,m;u=[c(2473)],m=(function(f){const r={};let s;r.pids=[];let d=!1,v;r.init=function(t,o){r.pids.length=0,v=null,s=t,o=o||{},d=o.allowMainPostSelect||!1,$("#content").on("click",'[component="topic"] [component="post"]',x),$("#content").on("selectstart",'[component="topic"] [component="post"]',l),i()};function x(t){t.stopPropagation();const o=$(this).attr("data-pid");a($(this))&&(t.shiftKey&&v&&v!==o?O(o):r.togglePostSelection(g(o),o),v=o)}function l(t){t.shiftKey&&t.preventDefault()}r.disable=function(){r.pids.forEach(function(t){f.get("post","pid",t).toggleClass("selected",!1)}),$("#content").off("click",'[component="topic"] [component="post"]',x),$("#content").off("selectstart",'[component="topic"] [component="post"]',l),n()},r.togglePostSelection=function(t,o){o&&(p(o,r.pids.indexOf(o)===-1,t),e())};function p(t,o,h){const P=r.pids.indexOf(t);o!==(P!==-1)&&(o?r.pids.push(t):r.pids.splice(P,1),(h||g(t)).toggleClass("selected",o))}function O(t){const o=E(),h=w(o,v),P=w(o,t);
1if(h===-1||P===-1){r.togglePostSelection(g(t),t);return}const y=r.pids.indexOf(t)===-1;o.slice(Math.min(h,P),Math.max(h,P)+1).each(function(){p($(this).attr("data-pid"),y,$(this))}),e()}function e(){r.pids.length&&r.pids.sort(function(t,o){return t-o}),typeof s=="function"&&s()}function a(t){return d||parseInt(t.attr("data-index"),10)!==0}function g(t){return $('[component="topic"] [data-pid="'+t+'"]')}function E(){return $('[component="topic"] [component="post"]').filter(function(){return a($(this))})}function w(t,o){return t.index(t.filter('[data-pid="'+o+'"]').first())}function D(){return!1}function i(){$("#content").on("click",'[component="post"] button, [component="post"] a',D)}function n(){$("#content").off("click",'[component="post"] button, [component="post"] a',D)}return r}).apply(_,u),m!==void 0&&(M.exports=m)},8636(M,_,c){var u;u=(function(){function m(){this._store={},this._keys=[]}m.prototype.isMock=!0,m.prototype.setItem=function(s,d){s=String(s),this._keys.indexOf(s)===-1&&this._keys.push(s),this._store[s]=d},m.prototype.getItem=function(s){return s=String(s),this._keys.indexOf(s)===-1?null:this._store[s]},m.prototype.removeItem=function(s){s=String(s),this._keys=this._keys.filter(function(d){return d!==s}),this._store[s]=null},m.prototype.clear=function(){this._keys=[],this._store={}},m.prototype.key=function(s){return s=parseInt(s,10)||0,this._keys[s]},Object.defineProperty&&Object.defineProperty(m.prototype,"length",{get:function(){return this._keys.length}});let f;const r=Date.now().toString();try{if(f=window.localStorage,f.setItem(r,r),f.getItem(r)!==r)throw Error("localStorage behaved unexpectedly");return f.removeItem(r),f}catch(s){console.warn(s),console.warn("localStorage failed, falling back on sessionStorage");try{if(f=window.sessionStorage,f.setItem(r,r),f.getItem(r)!==r)throw Error("sessionStorage behaved unexpectedly");return f.removeItem(r),f}catch(d){return console.warn(d),console.warn("sessionStorage failed, falling back on memory storage"),new m}}}).call(_,c,_,M),u!==void 0&&(M.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.