1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,34271,49897,67109,69185,86198,99127],{49897:((D,C,l)=>{l.r(C),l.d(C,{del:()=>i,get:()=>e,head:()=>c,patch:()=>a,post:()=>d,put:()=>h});var f=l(91749),u=l.n(f),E=l(33530),p=l.n(E);const A=config.relative_path+"/api/v3";async function g(t,r){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:A+t.url,typeof r=="function"){o(t).then(n=>r(null,n),n=>r(n));return}try{return await o(t)}catch(n){if(n.message==="A valid login session was not found. Please log in and try again."){const{url:s}=await(0,f.fire)("filter:admin.reauth",{url:"login"});return(0,E.confirm)("[[error:api.reauth-required]]",y=>{y&&ajaxify.go(s)})}throw n}}async function o(t){const{url:r}=t;delete t.url,t.data&&!(t.data instanceof FormData)&&(t.data=JSON.stringify(t.data||{}),t.headers["content-type"]="application/json; charset=utf-8"),{options:t}=await(0,f.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const n=await fetch(r,t),{headers:s}=n;if(s.get("x-redirect"))return o({url:s.get("x-redirect"),...t});const y=s.get("content-type"),w=y&&y.startsWith("application/json");let m;if(t.method!=="HEAD"&&(w?m=await n.json():m=await n.text()),!n.ok)throw m?new Error(w?m.status.message:m):new Error(n.statusText);return w&&m&&m.hasOwnProperty("status")&&m.hasOwnProperty("response")?m.response:m}function e(t,r,n){return g({url:t+(r&&Object.keys(r).length?"?"+$.param(r):"")},n)}function c(t,r,n){return g({url:t+(r&&Object.keys(r).length?"?"+$.param(r):""),method:"HEAD"},n)}function d(t,r,n){return g({url:t,method:"POST",data:r,headers:{"x-csrf-token":config.csrf_token}},n)}function a(t,r,n){return g({url:t,method:"PATCH",data:r,headers:{"x-csrf-token":config.csrf_token}},n)}function h(t,r,n){return g({url:t,method:"PUT",data:r,headers:{"x-csrf-token":config.csrf_token}},n)}function i(t,r,n){return g({url:t,method:"DELETE",data:r,headers:{"x-csrf-token":config.csrf_token}},n)}}),65348:((D,C,l)=>{var f,u;f=[l(96349),l(33530),l(91749),l(17459)],u=(function(E,p,A,g){const o={};return o.init=function(e,c){if(!e||!e.length)return;c=c||{};const d=c.onSelect||function(){};c.states=c.states||["watching","tracking","notwatching","ignoring"],c.template=c.template||"partials/category/selector-dropdown-left",A.fire("action:category.selector.options",{el:e,options:c}),E.init(e,c);const a={el:e,selectedCategory:null};e.on("click","[data-cid]",function(){const i=$(this);return i.hasClass("disabled")?!1:(a.selectCategory(i.attr("data-cid")),d(a.selectedCategory))});let h=a.el.find('[component="category-selector-selected"]').html();return g.translate(h,i=>{h=i}),a.selectCategory=function(i){const t=a.el.find('[data-cid="'+i+'"]');a.selectedCategory={cid:i,name:t.attr("data-name")},t.length?a.el.find('[component="category-selector-selected"]').html(t.find('[component="category-markup"]').html()):a.el.find('[component="category-selector-selected"]').html(h)},a.getSelectedCategory=function(){return a.selectedCategory},a.getSelectedCid=function(){return a.selectedCategory?a.selectedCategory.cid:0},c.hasOwnProperty("selectedCategory")&&app.parseAndTranslate(c.template,{selectedCategory:c.selectedCategory},function(i){a.el.find('[component="category-selector-selected"]').html(i.find('[component="category-selector-selected"]').html())}),a},o.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(c){const d=p.dialog({title:e.title||"[[modules:composer.select-category]]",message:c,buttons:{save:{label:"[[global:select]]",className:"btn-primary",callback:h}}}),a=o.init(d.find('[component="category-selector"]'),e);function h(i){return i.preventDefault(),a.selectedCategory&&(e.onSubmit(a.selectedCategory),d.modal("hide")),!1}e.openOnLoad&&d.on("shown.bs.modal",function(){d.find(".dropdown-toggle").dropdown("toggle")}),d.find("form").on("submit",h)})},o}).apply(C,f),u!==void 0&&(D.exports=u)}),89067:((D,C,l)=>{var f,u;f=[l(65348)],u=(function(E){const p={};
1return p.init=function(){app.enterRoom("categories"),E.init($('[component="category-selector"]'),{privilege:"find",onSelect:function(A){ajaxify.go("/category/"+A.cid)}})},p}).apply(C,f),u!==void 0&&(D.exports=u)}),96349:((D,C,l)=>{var f,u;f=[l(29930),l(89336),l(49897)],u=(function(E,p,A){const g={};return g.init=function(o,e){let c=e.defaultCategories||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 d=[];Array.isArray(e.localCategories)&&(d=e.localCategories.map(r=>({...r})),c&&(c=[...d,...c])),e.selectedCids=e.selectedCids||ajaxify.data.selectedCids||[];const a=o.find('[component="category-selector-search"]');if(!a.length)return;const h=a.parents('[component="category/dropdown"]').length>0||a.parents('[component="category-selector"]').length>0;o.on("show.bs.dropdown",function(){h&&a.removeClass("hidden");function r(){const n=a.find("input").val();n.length>1||!n&&!c?i(n,function(s){c=e.cacheList&&(c||s),t(s)}):!n&&c&&t(c)}a.on("click",function(n){n.preventDefault(),n.stopPropagation()}),a.find("input").val("").on("keyup",utils.debounce(r,300)),r()}),o.on("shown.bs.dropdown",function(){["xs","sm"].includes(utils.findBootstrapEnvironment())||a.find("input").focus()}),o.on("hide.bs.dropdown",function(){h&&a.addClass("hidden"),a.off("click"),a.find("input").off("keyup")});function i(r,n){A.get("/search/categories",{search:r,query:utils.params(),parentCid:e.parentCid||0,selectedCids:e.selectedCids,privilege:e.privilege,states:e.states,showLinks:e.showLinks},function(s,{categories:y}){if(s)return E.error(s);n(d.concat(y))})}function t(r){const n=e.selectedCids.map(String);r.forEach(function(s){s.selected=n.includes(String(s.cid))}),app.parseAndTranslate(e.template,{categoryItems:r.slice(0,200),selectedCategory:ajaxify.data.selectedCategory,allCategoriesUrl:ajaxify.data.allCategoriesUrl},function(s){o.find('[component="category/list"]').html(s.find('[component="category/list"]').html()),o.find('[component="category/list"] [component="category/no-matches"]').toggleClass("hidden",!!r.length);const y=p.Dropdown.getInstance(o.find(".dropdown-toggle").get(0));y&&y.update()})}},g}).apply(C,f),u!==void 0&&(D.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.