1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[14526,25285,40755,42619,69749,91722],{71131(W,R,c){"use strict";var y,p;y=[c(70550),c(60984),c(52473),c(49897),c(65303),c(29930),c(89336)],p=(function(h,v,u,k,A,E,U){const w={};w.init=function(o){h.init(D,()=>{const n=document.querySelector(".thread-tools button");new U.Dropdown(n).show()},o),f(),$('[component="category/topic"]').each((n,r)=>{v.observeTopicLabels($(r).find('[component="topic/labels"]'))}),u.get("topic/delete").on("click",function(){return s("del","/state","delete",i),!1}),u.get("topic/restore").on("click",function(){return s("put","/state","restore",i),!1}),u.get("topic/purge").on("click",function(){return s("del","","purge",l),!1}),u.get("topic/lock").on("click",function(){return s("put","/lock","lock",e),!1}),u.get("topic/unlock").on("click",function(){return s("del","/lock","unlock",e),!1}),u.get("topic/pin").on("click",function(){return s("put","/pin","pin",e),!1}),u.get("topic/unpin").on("click",function(){return s("del","/pin","unpin",e),!1}),u.get("topic/mark-unread-for-all").on("click",function(){const n=h.getSelectedTids();return n.length?(socket.emit("topics.markAsUnreadForAll",n,function(r){if(r)return E.error(r);E.success("[[topic:markAsUnreadForAll.success]]"),n.forEach(function(m){$('[component="category/topic"][data-tid="'+m+'"]').addClass("unread")}),e()}),!1):E.error("[[error:no-topics-selected]]")}),u.get("topic/move").on("click",function(){c.e(28310).then(function(){var n=[c(28310)];(function(r){const m=h.getSelectedTids();if(!m.length)return E.error("[[error:no-topics-selected]]");r.init(m,null,e)}).apply(null,n)}).catch(c.oe)}),u.get("topic/move-all").on("click",function(){const n=ajaxify.data.cid;if(!ajaxify.data.template.category)return E.error("[[error:invalid-data]]");c.e(28310).then(function(){var r=[c(28310)];(function(m){m.init(null,n,function(I){if(I)return E.error(I);ajaxify.refresh()})}).apply(null,r)}).catch(c.oe)}),u.get("topic/merge").on("click",function(){const n=h.getSelectedTids();c.e(2403).then(function(){var r=[c(2403)];(function(m){m.init(function(){n.length&&n.forEach(function(I){m.addTopic(I)})})}).apply(null,r)}).catch(c.oe)}),u.get("topic/tag").on("click",async function(){const n=h.getSelectedTids();if(!n.length)return E.error("[[error:no-topics-selected]]");const r=await Promise.all(n.map(m=>k.get(`/topics/${m}`)));Promise.all([c.e(20056),c.e(63)]).then(function(){var m=[c(63)];(function(I){I.init(r,ajaxify.data.tagWhitelist,e)}).apply(null,m)}).catch(c.oe)}),w.removeListeners(),socket.on("event:topic_deleted",d),socket.on("event:topic_restored",d),socket.on("event:topic_purged",g),socket.on("event:topic_locked",C),socket.on("event:topic_unlocked",C),socket.on("event:topic_pinned",x),socket.on("event:topic_unpinned",x),socket.on("event:topic_moved",j)};function s(o,n,r,m){m||(m=function(){});const I=h.getSelectedTids(),P={},S=function(N){N&&Promise.all(I.map(K=>k[o](`/topics/${K}${n}`,P))).then(m).catch(E.error)};if(!I.length)return E.error("[[error:no-topics-selected]]");switch(r){case"delete":case"restore":case"purge":A.confirm(`[[topic:thread-tools.${r}-confirm]]`,S);break;case"pin":v.requestPinExpiry(P,S.bind(null,!0));break;default:S(!0);break}}w.removeListeners=function(){socket.removeListener("event:topic_deleted",d),socket.removeListener("event:topic_restored",d),socket.removeListener("event:topic_purged",g),socket.removeListener("event:topic_locked",C),socket.removeListener("event:topic_unlocked",C),socket.removeListener("event:topic_pinned",x),socket.removeListener("event:topic_unpinned",x),socket.removeListener("event:topic_moved",j)};function t(){$(".thread-tools .show").removeClass("show")}function e(){t(),h.unselectAll()}function i(){t(),D()}function l(){t(),h.unselectAll(),D()}function D(){const o=h.getSelectedTids(),n=b(M,o),r=T(M,o),m=b(O,o),I=b(L,o),P=b(B,o),S=T(B,o);u.get("topic/delete").toggleClass("hidden",n),u.get("topic/restore").toggleClass("hidden",P||!n),u.get("topic/purge").toggleClass("hidden",!r||!o.length),u.get("topic/lock").toggleClass("hidden",I),u.get("topic/unlock").toggleClass("hidden",!I),u.get("topic/pin").toggleClass("hidden",S||m),u.get("topic/unpin").toggleClass("hidden",S||!m),u.get("topic/merge").toggleClass("hidden",P)}function b(o,n){for(let r=0;r<n.length;r+=1)if(o(n[r]))return!0;return!1}function T(o,n){for(let r=0;r<n.length;r+=1)if(!o(n[r]))return!1;return!0}function M(o){return a(o).hasClass("deleted")}function L(o){return a(o).hasClass("locked")}function O(o){return a(o).hasClass("pinned")}function B(o){return a(o).hasClass("scheduled")}function a(o){return u.get("category/topic","tid",o)}function d(o){const n=a(o.tid);n.toggleClass("deleted",o.isDeleted),n.find('[component="topic/locked"]').toggleClass("hidden",!o.isDeleted)}function x(o){const n=a(o.tid);n.toggleClass("pinned",o.isPinned),n.find('[component="topic/pinned"]').toggleClass("hidden",!o.isPinned),ajaxify.refresh()}function C(o){const n=a(o.tid);n.toggleClass("locked",o.isLocked),n.find('[component="topic/locked"]').toggleClass("hidden",!o.isLocked)}async function j(o){if(ajaxify.data.template.category||String(o.toCid)==="-1")a(o.tid).remove();else{const n=await k.get(`/categories/${o.toCid}`),r=await app.parseAndTranslate("partials/topics_list",{topics:[{...o,category:n}]}),m=`[component="category/topic"][data-tid="${o.tid}"] [component="topic/category"]`;$(m).replaceWith(r.find(m))}}function g(o){a(o.tid).remove()}function f(){if(!ajaxify.data.topics||!ajaxify.data.template.category)return;const o=ajaxify.data.topics.filter(n=>n.pinned).length;!app.user.isAdmin&&!app.user.isMod||o<2||app.loadJQueryUI(function(){const n=$('[component="category"]').filter(function(m,I){return!$(I).parents("[widget-area],[data-widget-area]").length});let r=0;n.sortable({axis:"y",handle:'[component="topic/pinned"]',items:'[component="category/topic"].pinned',start:function(){r=parseInt(n.find('[component="category/topic"].pinned').first().attr("data-index"),10)},update:function(m,I){const P=I.item.attr("data-tid"),S=n.find('[component="category/topic"].pinned');let N=0;S.each((K,F)=>{if($(F).attr("data-tid")===P)return N=K,!1}),socket.emit("topics.orderPinnedTopics",{tid:P,order:r+N},function(K){if(K)return E.error(K);S.each((F,H)=>{$(H).attr("data-index",r+F)})})}})})}return w}).apply(R,y),p!==void 0&&(W.exports=p)},96147(W,R,c){"use strict";var y,p;y=[c(22410),c(69749),c(43349),c(91749),c(29930),c(49897),c(65303),c(30076),c(71131),c(17459),c(95692),c(60644),c(47943),c(34342),c(91722)],p=(function(h,v,u,k,A,E,U,w,s,t,e,i,l,D,b){const T={};T.init=function(){app.enterRoom("world"),e.init({route:"/topics",body:{cid:config.activitypub.worldDefaultCid||aja
1xify.data.cid}}),u.handleSort("categoryTopicSort","world"),d(),O(),B(),x(),s.init($("#world-feed")),socket.on("event:new_post",j),$(window).one("action:ajaxify.start",function(){s.removeListeners(),socket.removeListener("event:new_post",j)});const g=document.getElementById("sort-label"),f=document.getElementById("sort-options");if(g&&f){const o=new URLSearchParams(window.location.search);if(o.get("sort")==="popular")t.translate(`[[world:popular-${o.get("term")}]]`,function(n){g.innerText=n});else{let n="";o.get("all")==="1"?n="-all":o.get("local")==="1"&&(n="-local"),t.translate(`[[world:latest${n}]]`,function(r){g.innerText=r})}}i.init((o,n)=>{L(o,void 0,1,(r,m)=>{app.parseAndTranslate(ajaxify.data.template.name,"posts",r,function(I){const P=document.getElementById("world-feed");$(P).append(I),l(P,()=>{I.find(".timeago").timeago(),d(),x(),m(),n()})})})},{container:"#world-feed"}),v.enableQuickSearch({searchElements:{inputEl:$('[component="category-search"]'),resultEl:$(".world .quick-search-container")},searchOptions:{in:"categories"},dropdown:{maxWidth:"400px",maxHeight:"350px"},hideOnNoMatches:!1}),config.usePagination||h.init(o=>{const n=Array.from(document.querySelectorAll('[component="category/topic"]'));if(!n.length)return;const r=o>0?n.pop():n.shift(),m=(parseInt(r.getAttribute("data-index"),10)||0)+(o>0?1:0),I=r.getAttribute("data-tid");m<config.topicsPerPage||L(m,I,o,(P,S)=>{app.parseAndTranslate(ajaxify.data.template.name,"posts",P,function(N){const K=document.getElementById("world-feed");$(K)[o===-1?"prepend":"append"](N),N.find(".timeago").timeago(),d(),x(),S()})})}),ajaxify.data.categories.forEach(function(o){a(o.cid)}),b.addHandlers(),k.fire("action:topics.loaded",{topics:ajaxify.data.topics}),k.fire("action:category.loaded",{cid:ajaxify.data.cid})};function M(g,f){return Math.floor(g/config.topicsPerPage)+(f>0?1:0)}function L(g,f,o,n){n=n||function(){};const r=utils.params();r.page=M(g,o),r[o>0?"after":"before"]=f,h.loadMoreXhr(r,n)}function O(){const g=$("#world-feed");g.on("click",'[data-action="bookmark"]',function(){const f=$(this),o=f.attr("data-bookmarked")==="true",n=f.attr("data-pid"),r=parseInt(f.attr("data-bookmarks"),10);E[o?"del":"put"](`/posts/${n}/bookmark`,void 0,function(I){if(I)return A.error(I);const P=o?"unbookmark":"bookmark",S=r+(o?-1:1);f.find('[component="bookmark-count"]').text(w.humanReadableNumber(S)),f.attr("data-bookmarks",S),f.attr("data-bookmarked",o?"false":"true"),f.find("i").toggleClass("fa text-primary",!o).toggleClass("fa-regular text-muted",o),k.fire(`action:post.${P}`,{pid:n})})}),g.on("click",'[data-action="upvote"]',function(f){return f.preventDefault(),D.toggleVote($(this),"upvoted",1,"i"),!1}),g.on("click",'[data-action="reply"]',function(){const f=$(this),o=f.attr("data-is-main")==="true";app.newReply({tid:f.attr("data-tid"),pid:o?void 0:f.attr("data-pid")}).catch(A.error)})}function B(){const g=document.getElementById("world-help");if(!g)return;const f=['<p class="lead">[[world:help.intro]]</p>',"<p>[[world:help.fediverse]]</p>","<p>[[world:help.build]]</p>","<p>[[world:help.federating]]</p>","<p>[[world:help.next-generation]]</p>"];g.addEventListener("click",()=>{U.dialog({title:"[[world:help.title]]",message:f.join(` 2`),size:"large"})})}function a(g){$('[data-cid="'+g+'"]').find('[component="category/watching"], [component="category/tracking"], [component="category/ignoring"], [component="category/notwatching"]').on("click",async o=>{const n=o.currentTarget.getAttribute("data-state"),{uid:r}=ajaxify.data,{modified:m}=await E.put(`/categories/${encodeURIComponent(g)}/watch`,{state:n,uid:r});C(m,n),A.success("[[category:"+n+".message]]")})}function d(){$('[component="post/content"] img:not(.not-responsive)').addClass("img-fluid")}function x(){const g=document.getElementById("world-feed");g&&(g.querySelectorAll('[component="post/content"]').forEach(f=>{const o=f.getAttribute("data-showmore");parseInt(o,10)!==1&&(f.clientHeight<f.scrollHeight-1&&(f.parentNode.querySelector('[component="show/more"]').classList.remove("hidden"),f.classList.toggle("clamp-fade-6",!0)),f.setAttribute("data-showmore","1"))}),parseInt(g.getAttribute("data-showmore"),10)!==1&&(g.addEventListener("click",f=>{const o=f.target.closest('[component="show/more"]');if(o){const n=o.closest(".post-body").querySelector('[component="post/content"]'),r=parseInt(o.getAttribute("ismore"),10)===1;n.classList.toggle("line-clamp-6",r),n.classList.toggle("clamp-fade-6",r),$(o).translateText(r?"[[world:see-more]]":"[[world:see-less]]"),o.setAttribute("ismore",r?0:1)}}),g.setAttribute("data-showmore","1")))}function C(g,f){g.forEach(function(o){const n=$('[data-cid="'+o+'"]');n.find('[component="category/watching/menu"]').toggleClass("hidden",f!=="watching"),n.find('[component="category/watching/check"]').toggleClass("fa-check",f==="watching"),n.find('[component="category/tracking/menu"]').toggleClass("hidden",f!=="tracking"),n.find('[component="category/tracking/check"]').toggleClass("fa-check",f==="tracking"),n.find('[component="category/notwatching/menu"]').toggleClass("hidden",f!=="notwatching"),n.find('[component="category/notwatching/check"]').toggleClass("fa-check",f==="notwatching"),n.find('[component="category/ignoring/menu"]').toggleClass("hidden",f!=="ignoring"),n.find('[component="category/ignoring/check"]').toggleClass("fa-check",f==="ignoring")})}async function j({posts:g}){const f=document.getElementById("world-feed"),o=await app.parseAndTranslate("world","posts",{posts:g});
2!f||!o||(f.prepend(...o),d(),x())}return T}).apply(R,y),p!==void 0&&(W.exports=p)},91722(W,R,c){"use strict";c.r(R),c.d(R,{addHandlers:()=>L,list:()=>l,refresh:()=>b,register:()=>T,save:()=>D,trigger:()=>B});var y=c(65303),p=c(81335),h=c.n(p),v=c(49897),u=c(68636),k=c.n(u),A=c(17459),E=c.n(A),U=c(29930);const w="ap:intents:handles";function s(){try{return k().getItem(w)}catch{return null}}function t(a){try{k().setItem(w,a)}catch{}}const e={create:"[[intents:display.create]]",like:"[[intents:display.like]]",dislike:"[[intents:display.dislike]]",follow:"[[intents:display.follow]]",object:"[[intents:display.object]]"};async function i(a){return await(0,A.translateKeys)(Object.keys(a).map(d=>`${e[d.toLowerCase()]}`))}function l(){const a=s();if(!a)return new Map;let d;try{d=JSON.parse(a)}catch{return new Map}const x=new Map;return Array.isArray(d)&&d.forEach(C=>{C&&C.handle&&typeof C.intents=="object"&&!Array.isArray(C.intents)&&x.set(C.handle,C.intents)}),x}function D(a,d){if(typeof a!="string"||!a.trim()||(a=a.trim(),!d||typeof d!="object"||Array.isArray(d)))return;const x=l();x.set(a,d);const C=Array.from(x.entries()).map(([j,g])=>({handle:j,intents:g}));t(JSON.stringify(C))}async function b(a){if(typeof a!="string"||!a.trim())return null;a=a.trim().replace(/^@/,"");const d=await(0,v.get)(`/api/v3/intents/query/${a}`);return d&&d.intents&&typeof d.intents=="object"?(D(a,d.intents),{intents:Object.keys(d.intents)}):null}async function T(){if(!config.activitypub.enabled)return;let a=l(),d=await Promise.all(Array.from(a.entries()).map(async([x,C])=>({handle:x,intents:(await i(C)).join(", ")})));p.render("modals/intents/register",{description:"[[intents:description]]",handles:d}).then(async x=>{const C=await(0,y.dialog)({title:"[[intents:title]]",message:x}),j=C.find("#intents-handle-input"),g=C.find("#intents-register-btn"),f=()=>{const o=j.val().trim(),n=/^@?[\w.-]+@[\w.-]+\.[\w]{2,}$/.test(o);g.prop("disabled",!n)};j.on("input",f),f(),C.find("#intents-register-form").on("submit",async o=>{o.preventDefault();const n=j.val().trim();g.prop("disabled",!0);try{await b(n),a=l(),d=await Promise.all(Array.from(a.entries()).map(async([m,I])=>({handle:m,intents:(await i(I)).join(", ")})));const r=await p.render("modals/intents/register",{handles:d});C.find("#intents-registered-list").html(r)}catch(r){U.error(r.message)}finally{j.val(""),g.prop("disabled",!1)}}),C.on("click",'[data-action="remove"]',function(){const o=$(this).attr("data-handle"),n=l();n.delete(o);const r=Array.from(n.entries()).map(([m,I])=>({handle:m,intents:I}));t(JSON.stringify(r)),$(this).closest("li").remove(),n.size||(C.find("#intents-registered-list").closest("hr").next("h6, p").remove(),C.find("#intents-registered-list").closest("hr").prev("p").after('<p class="text-muted mt-3">[[intents:no-handles]]</p>'))})})}const M='[component="topic/reply/guest"], [component="category/post/guest"]';function L(){config.activitypub.enabled&&(document.removeEventListener("click",O),document.addEventListener("click",O,!0))}function O(a){if(a.target.closest(M)){a.preventDefault(),a.stopPropagation();const x=ajaxify.data.tid,C=ajaxify.data.cid,j={};x?(j.inReplyTo=utils.isNumber(ajaxify.data.mainPid)?`${config.url}/post/${ajaxify.data.mainPid}`:ajaxify.data.mainPid,j.content=`@${ajaxify.data.author.userslug}`):C&&(j.content=`@${ajaxify.data.handleFull}`),B("create",j)}}async function B(a,d){if(!config.activitypub.enabled)return;const x=l(),C=a.toLowerCase(),j=e[C],g=await(0,A.translate)(`${j||a}`),f=Array.from(x.entries()).filter(([,n])=>n&&typeof n=="object"&&C in n).map(([n,r])=>({handle:n,intents:r})),o=await Promise.all(f.map(async({handle:n,intents:r})=>({handle:n,intents:(await i(r)).join(", ")})));p.render("modals/intents/trigger",{displayIntent:g,matchingHandles:o,hasAnyHandles:x.size>0}).then(async n=>{const r=await(0,y.dialog)({title:`[[intents:trigger-title, ${g}]]`,message:n});r.on("click",'[data-action="execute-intent"]',function(){const m=$(this).attr("data-handle"),I=x.get(m);let P=I&&I[C];if(P&&d&&typeof d=="object"&&Object.keys(d).forEach(S=>{const N=d[S],K=`{${S}}`;P.includes(K)&&(P=P.replaceAll(K,encodeURIComponent(N)))}),P=P?.replaceAll(/\{[^}]+\}/g,""),P)try{const S=new URL(P);(S.protocol==="http:"||S.protocol==="https:")&&(window.location.href=P)}catch{}}),r.on("click",'[data-action="open-register"]',function(){r.modal("hide"),setTimeout(()=>T(),300)}),r.on("click",'[data-action="go-login"]',function(){r.modal("hide"),aja
2xify.go("login")})})}},69749(W,R,c){"use strict";var y,p;y=[c(17459),c(68636),c(91749),c(29930),c(89336)],p=(function(h,v,u,k,A){const E={current:{}};E.init=function(s){if(!config.searchEnabled)return;s=s||{in:config.searchDefaultInQuick||"titles"},$('[component="search/form"]').each((e,i)=>{U($(i),s)})};function U(s,t){const e=s.find('[component="search/button"]'),i=s.find('[component="search/fields"]'),l=i.find('input[name="query"]'),D=i.find("#quick-search-container"),b=i.hasClass("hidden"),T=/^(@|acct:)?[\p{L}\p{N}\p{M}_.-]+@.+$/u;b&&i.off("focusout").on("focusout",function(){setTimeout(function(){i.find(":focus").length||(i.addClass("hidden"),e.removeClass("hidden"))},200)}),l.off("focus");const M={inputEl:l,resultEl:D};E.enableQuickSearch({searchOptions:t,searchElements:M}),e.off("click").on("click",function(L){return!config.loggedIn&&!app.user.privileges["search:content"]?(k.alert({message:"[[error:search-requires-login]]",timeout:3e3}),ajaxify.go("login"),!1):(L.stopPropagation(),E.showAndFocusInput(s),!1)}),s.off("submit").on("submit",function(){const L=$(this).find('input[name="query"]'),O=E.getSearchPreferences();return O.term=L.val(),O.in=t.in,T.test(O.term)&&(O.in="users"),u.fire("action:search.submit",{searchOptions:O,searchElements:M}),E.query(O,function(){L.val(""),l.trigger("blur")}),!1})}E.enableQuickSearch=function(s){if(!config.searchEnabled||!app.user.privileges["search:content"])return;const t=Object.assign({in:config.searchDefaultInQuick||"titles"},s.searchOptions),e=s.searchElements.resultEl,i=s.searchElements.inputEl;let l=i.val();const D=e.find(".filter-category");async function b(){if(ajaxify.data.template.category&&ajaxify.data.cid){const a=await h.translateKey("search:search-in-category",[ajaxify.data.name]),d=$("<div></div>").html(a).text();D.find(".name").text(d)}D.toggleClass("hidden",!(ajaxify.data.template.category&&ajaxify.data.cid))}function T(){s.searchOptions=Object.assign({},t),s.searchOptions.term=i.val(),b(),ajaxify.data.template.category&&ajaxify.data.cid&&D.find('input[type="checkbox"]').is(":checked")&&(s.searchOptions.categories=[ajaxify.data.cid],s.searchOptions.searchChildren=!0),s.hideDuringSearch||(e.removeClass("hidden").find(".quick-search-results-container").html(""),e.find(".loading-indicator").removeClass("hidden")),u.fire("action:search.quick.start",s),s.searchOptions.searchOnly=1,E.api(s.searchOptions,function(a){if(e.find(".loading-indicator").addClass("hidden"),s.searchOptions.in==="categories"){if(!a.categories||s.hideOnNoMatches&&!a.categories.length)return e.addClass("hidden").find(".quick-search-results-container").html("");a.dropdown={maxWidth:"400px",maxHeight:"500px",...s.dropdown},app.parseAndTranslate("partials/quick-category-search-results",a,d=>{d.length&&d.find(".timeago").timeago(),e.toggleClass("hidden",!d.length||!i.is(":focus")).find(".quick-search-results-container").html(d.length?d:""),u.fire("action:search.quick.complete",{data:a,options:s})})}else{if(!a.posts||s.hideOnNoMatches&&!a.posts.length)return e.addClass("hidden").find(".quick-search-results-container").html("");a.posts.forEach(function(d){const x=$("<div>"+d.content+"</div>").text(),C=i.val().toLowerCase().replace(/^in:topic-\d+/,""),j=Math.max(0,x.toLowerCase().indexOf(C)-40);d.snippet=utils.escapeHTML((j>0?"...":"")+x.slice(j,j+80)+(x.length-j>80?"...":""))}),a.dropdown={maxWidth:"400px",maxHeight:"500px",...s.dropdown},app.parseAndTranslate("partials/quick-search-results",a,function(d){d.length&&d.find(".timeago").timeago(),e.toggleClass("hidden",!d.length||!i.is(":focus")).find(".quick-search-results-container").html(d.length?d:"");const x=e.find(".quick-search-results .quick-search-title, .quick-search-results .snippet");E.highlightMatches(s.searchOptions.term,x),u.fire("action:search.quick.complete",{data:a,options:s})})}})}e.find('.filter-category input[type="checkbox"]').on("change",function(){i.focus(),T()}),i.off("keyup").on("keyup",utils.debounce(function(){if(i.val().length<3){e.addClass("hidden"),l=i.val();return}if(i.val()!==l){if(l=i.val(),!i.is(":focus"))return e.addClass("hidden");T()}},500)),e.on("mousedown",".quick-search-results > *",function(){$(window).one("mouseup",function(){e.addClass("hidden")})});const M=i.parent(),L=e.parent();M.on("focusout",O),L.on("focusout",O);function O(){setTimeout(function(){!M.find(":focus").length&&!L.find(":focus").length&&!e.hasClass("hidden")&&e.addClass("hidden")},200)}let B=!1;u.on("action:ajaxify.end",function(){ajaxify.isCold()||(B=!0),e.addClass("hidden")}),i.on("focus",function(){const a=i.val();l=a,a&&e.find("#quick-search-results").children().length&&(b(),B?(T(),B=!1):e.removeClass("hidden"),i[0].setSelectionRange(a.startsWith("in:topic")?a.indexOf(" ")+1:0,a.length))}),i.off("refresh").on("refresh",function(){T()})}
2,E.showAndFocusInput=function(s){const t=s.parents(".dropdown-menu");if(t.length){const e=t.siblings("[data-bs-toggle]"),i=A.Dropdown.getOrCreateInstance(e[0]);i&&i.show()}else s.find('[component="search/fields"]').removeClass("hidden"),s.find('[component="search/button"]').addClass("hidden"),s.find('[component="search/fields"] input[name="query"]').trigger("focus")},E.query=function(s,t){t=t||function(){},ajaxify.go("search?"+w(s),t)},E.api=function(s,t){const e=config.relative_path+"/api/search?"+w(s);s.hasOwnProperty("searchOnly")&&delete s.searchOnly;const i=config.relative_path+"/search?"+w(s);$.get(e,function(l){l.url=i,t(l)})};function w(s){const t=s.in||"titles",e=s.term.replace(/^[ ?#]*/,""),i={...s,term:e,in:t};return u.fire("action:search.createQueryString",{query:i,data:s}),$.param(i)}return E.getSearchPreferences=function(){try{return JSON.parse(v.getItem("search-preferences")||"{}")}catch(s){return console.error(s),{}}},E.highlightMatches=function(s,t){if(!s||!t.length)return;s=utils.escapeHTML(s.replace(/^"/,"").replace(/"$/,"").trim());const e=s.split(" ").filter(l=>l.length>1).map(function(l){return utils.escapeRegexChars(l)}).join("|"),i=new RegExp("("+e+")","gi");t.each(function(){const l=$(this),D=[];l.find("*").each(function(){$(this).after("<!-- "+D.length+" -->"),D.push($("<div></div>").append($(this)))}),l.html(l.html().replace(i,function(b,T){return'<strong class="search-match fw-bold text-decoration-underline">'+T+"</strong>"})),D.forEach(function(b,T){l.html(l.html().replace("<!-- "+T+" -->",function(){return b.html()}))})}),$(".search-results .content").find("img:not(.not-responsive)").addClass("img-fluid")},E}).apply(R,y),p!==void 0&&(W.exports=p)},43349(W,R,c){"use strict";var y,p;y=[c(52473)],p=(function(h){const v={};return v.handleSort=function(u,k){const A=h.get("thread/sort");A.find("i").removeClass("fa-check");const E=ajaxify.data.sortOption||config[u];A.find('a[data-sort="'+E+'"]').find("i").addClass("fa-check"),$("body").off("click",'[component="thread/sort"] a[data-sort]').on("click",'[component="thread/sort"] a[data-sort]',function(){const w=$(this).attr("data-sort"),s=utils.params();s.sort=w;const t=$.param(s);ajaxify.go(k+(t?"?"+t:""))})},v}).apply(R,y),p!==void 0&&(W.exports=p)},70550(W,R,c){"use strict";var y,p;y=[c(52473)],p=(function(h){const v={};let u,k;v.init=function(t,e,i){k=i||$('[component="category"]'),k.on("selectstart",'[component="topic/select"]',function(L){L.preventDefault()});let l=!1;const D=function(L){const B=$(this).parents('[component="category/topic"]');if(L.shiftKey)return U(B.attr("data-tid")),u=B,!1;const a=B.hasClass("selected");A(B,!a),u=B,typeof t=="function"&&t()};k.on("click",'[component="topic/select"]',function(L){if(l)return L.preventDefault(),L.stopImmediatePropagation(),!1;D.call(this,L)});let b;const T=function(L){l=!1,b=setTimeout(()=>{l=!0,D.call(this,L),navigator.vibrate&&navigator.vibrate(50),this.closest('[component="category/topic"]').classList.contains("selected")&&e()},500)},M=()=>{clearTimeout(b)};k.on("mousedown",'[component="topic/select"]',T),k.on("touchstart",'[component="topic/select"]',T),k.on("mouseup",'[component="topic/select"]',M),k.on("mouseleave",'[component="topic/select"]',M),k.on("touchend",'[component="topic/select"]',M),k.on("touchcancel",'[component="topic/select"]',M),k.on("contextmenu",'[component="topic/select"]',L=>{L.preventDefault()})};function A(t,e){const i=t.find('[component="topic/select"]');i.toggleClass("fa-check-square-o",e),i.toggleClass("fa-square-o",!e),i.parents('[component="category/topic"]').toggleClass("selected",e),E()}function E(){const t=$('[component="topic/selected/badge"]');if(t.length){const e=k.find('[component="category/topic"].selected').length;t.text(e>0?e:"")}}v.getSelectedTids=function(){const t=[];return k&&k.find('[component="category/topic"].selected').each(function(){t.push($(this).attr("data-tid"))}),t},v.unselectAll=function(){k&&(k.find('[component="category/topic"].selected').removeClass("selected"),k.find('[component="topic/select"]').toggleClass("fa-check-square-o",!1).toggleClass("fa-square-o",!0),E())};function U(t){u||(u=$('[component="category/topic"]').first());const e=h.get("category/topic","tid",t).hasClass("selected"),i=s(t),l=s(u.attr("data-tid"));w(i,l,!e)}function w(t,e,i){if(t>e){const l=t;t=e,e=l}for(let l=t;l<=e;l+=1){const D=$('[component="category/topic"]').eq(l);A(D,i)}}function s(t){return h.get("category/topic","tid",t).index('[component="category/topic"]')}return v}).apply(R,y),p!==void 0&&(W.exports=p)},47943(W,R,c){/*! 3 * imagesLoaded v5.0.0 4 * JavaScript is all like "You images are done yet or what?" 5 * MIT License 6 */(function(y,p){W.exports?W.exports=p(y,c(22228)):y.imagesLoaded=p(y,y.EvEmitter)})(typeof window<"u"?window:this,function(p,h){let v=p.jQuery,u=p.console;function k(t){return Array.isArray(t)?t:typeof t=="object"&&typeof t.length=="number"?[...t]:[t]}function A(t,e,i){if(!(this instanceof A))return new A(t,e,i);let l=t;if(typeof t=="string"&&(l=document.querySelectorAll(t)),!l){u.error(`Bad element for imagesLoaded ${l||t}`);return}this.elements=k(l),this.options={},typeof e=="function"?i=e:Object.assign(this.options,e),i&&this.on("always",i),this.getImages(),v&&(this.jqDeferred=new v.Deferred),setTimeout(this.check.bind(this))}A.prototype=Object.create(h.prototype),A.prototype.getImages=function(){this.images=[],this.elements.forEac
6h(this.addElementImages,this)};const E=[1,9,11];A.prototype.addElementImages=function(t){t.nodeName==="IMG"&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!E.includes(e))return;let i=t.querySelectorAll("img");for(let l of i)this.addImage(l);if(typeof this.options.background=="string"){let l=t.querySelectorAll(this.options.background);for(let D of l)this.addElementBackgroundImages(D)}};const U=/url\((['"])?(.*?)\1\)/gi;A.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=U.exec(e.backgroundImage);for(;i!==null;){let l=i&&i[2];l&&this.addBackground(l,t),i=U.exec(e.backgroundImage)}},A.prototype.addImage=function(t){let e=new w(t);this.images.push(e)},A.prototype.addBackground=function(t,e){let i=new s(t,e);this.images.push(i)},A.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}let t=(e,i,l)=>{setTimeout(()=>{this.progress(e,i,l)})};this.images.forEach(function(e){e.once("progress",t),e.check()})},A.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&u&&u.log(`progress: ${i}`,t,e)},A.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}};function w(t){this.img=t}w.prototype=Object.create(h.prototype),w.prototype.check=function(){if(this.getIsImageComplete()){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src},w.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},w.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,l=i.nodeName==="PICTURE"?i:this.img;this.emitEvent("progress",[this,l,e])},w.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},w.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},w.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},w.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function s(t,e){this.url=t,this.element=e,this.img=new Image}return s.prototype=Object.create(w.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},A.makeJQueryPlugin=function(t){t=t||p.jQuery,t&&(v=t,v.fn.imagesLoaded=function(e,i){return new A(this,e,i).jqDeferred.promise(v(this))})},A.makeJQueryPlugin(),A})},22228(W){(function(R,c){W.exports?W.exports=c():R.EvEmitter=c()})(typeof window<"u"?window:this,function(){function R(){}let c=R.prototype;return c.on=function(y,p){if(!y||!p)return this;let h=this._events=this._events||{},v=h[y]=h[y]||[];return v.includes(p)||v.push(p),this},c.once=function(y,p){if(!y||!p)return this;this.on(y,p);let h=this._onceEvents=this._onceEvents||{},v=h[y]=h[y]||{};return v[p]=!0,this},c.off=function(y,p){let h=this._events&&this._events[y];if(!h||!h.length)return this;let v=h.indexOf(p);return v!=-1&&h.splice(v,1),this},c.emitEvent=function(y,p){let h=this._events&&this._events[y];if(!h||!h.length)return this;
6h=h.slice(0),p=p||[];let v=this._onceEvents&&this._onceEvents[y];for(let u of h)v&&v[u]&&(this.off(y,u),delete v[u]),u.apply(this,p);return this},c.allOff=function(){return delete this._events,delete this._onceEvents,this},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.