/** * @copyright (C) 2020 Open Source Matters, Inc. * @license GNU General Public License version 2 or later; see LICENSE.txt */Joomla=window.Joomla||{},Joomla.toggleAllNextElements=(s,o)=>{const i=(t=>{const n=[];do n.push(t);while((t=t.nextElementSibling)!==null);return n})(s);i.length&&i.forEach(t=>{t.classList.contains(o)?t.classList.remove(o):t.classList.add(o)})},document.addEventListener("DOMContentLoaded",()=>{const s=document.getElementById("toolbar-status-group");if(!s)return;const o=s.querySelector(".button-transition-headline"),a=s.querySelector(".button-transition-separator"),i=document.querySelector("table.itemList");let t=[],n=[];i&&(t=i.querySelectorAll("tbody tr"));function c(){if(n.length){let e=n.shift();for(;n.length;){const l=n.shift();e=e.filter(r=>l.indexOf(r)!==-1)}e.length&&(o&&o.classList.remove("d-none"),a&&a.classList.remove("d-none")),e.forEach(l=>{const r=s.querySelector(`.transition-${l}`);r&&r.parentNode.classList.remove("d-none")})}}function d(e){n.push(e.getAttribute("data-transitions").split(","))}i&&i.addEventListener("click",()=>{s.querySelectorAll(".button-transition").forEach(e=>{e.parentNode.classList.add("d-none")}),o&&o.classList.add("d-none"),a&&a.classList.add("d-none"),n=[],t.forEach(e=>{const l=e.querySelector("input[type=checkbox]");if(l.checked){const r=l.closest("tr");d(r)}}),c()})});