1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[24832],{49512(c,u,i){c.exports=i(1983)},1983(c,u,i){"use strict";var g,r;g=[i(29930),i(54222),i(65303)],r=(function(t,p,l){const h={};let s=0;$(window).on("action:ajaxify.end",function(n,e){e.url==="admin/plugins/dbsearch"&&ajaxify.data.working?a():o()}),h.init=function(){$("#save").on("click",function(){return $.post(config.relative_path+"/api/admin/plugins/dbsearch/save",{_csrf:config.csrf_token,topicLimit:$("#topicLimit").val(),postLimit:$("#postLimit").val(),excludeCategories:$("#exclude-categories").val(),mongoReadPreference:$("#mongoReadPreference").val()},function(n){typeof n=="string"&&p.toggleSaveSuccess($("#save"))}),!1}),$("#reindex").on("click",function(){return l.confirm("Are you sure you want to reindex all content? This might take a while depending on the amount of content. During the operation the forum might slow down.",function(n){n&&socket.emit("admin.plugins.dbsearch.reindex",function(e){if(e)return t.error(e),o();t.success("Started indexing content! This might take a while. You can check the progress on this page."),a()})}),!1}),$("#clear-index").on("click",function(){return l.confirm("Are you sure you want to clear all indices? This might take a while depending on the amount of content. During the operation the forum might slow down.",function(n){n&&socket.emit("admin.plugins.dbsearch.clearIndex",function(e){if(e)return t.error(e),o();t.success("Started clearing index! This might take a while. You can check the progress on this page."),a()})}),!1}),$("#changeLanguage").on("click",function(){const n=$("#indexLanguage").val();t.success('Changing index language to "'+n+'".'),socket.emit("admin.plugins.dbsearch.changeLanguage",n,function(e){if(e)return t.error(e);t.success("Search index language changed!")})})};function a(){$("#topics-indexed").text(0),$("#posts-indexed").text(0),$("#messages-indexed").text(0),$(".progress-bar").css("width","0%").text("0%"),$(".progress").removeClass("invisible"),o(),s=setInterval(x,1e3)}function o(){s&&(clearInterval(s),$(".progress").addClass("invisible"),s=0)}function x(){socket.emit("admin.plugins.dbsearch.checkProgress",function(n,e){if(n)return o(),t.error(n);$(".topic-progress").css("width",e.topicsPercent+"%").text(e.topicsPercent+"%"),$(".post-progress").css("width",e.postsPercent+"%").text(e.postsPercent+"%"),$(".message-progress").css("width",e.messagesPercent+"%").text(e.messagesPercent+"%");const f=parseInt(e.working,10);f?($("#reindex").attr("disabled",!0),$("#clear-index").attr("disabled",!0),$(".progress").removeClass("invisible")):(clearInterval(s),$("#reindex").removeAttr("disabled"),$("#clear-index").removeAttr("disabled"),setTimeout(()=>{$(".progress").addClass("invisible")},2e3),$.getJSON(config.relative_path+"/api/admin/plugins/dbsearch",function(d){$("#topics-indexed").text(d.topicsIndexed),$("#posts-indexed").text(d.postsIndexed),$("#messages-indexed").text(d.messagesIndexed)})),$("#work-in-progress").toggleClass("hidden",!f)})}return h}).apply(u,g),r!==void 0&&(c.exports=r)}}]);
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.