'use strict';document.addEventListener('DOMContentLoaded',()=>{if(document.body.clientWidth<1024){const create_name=(text)=>text.toLowerCase().replace(/^\s+|\s+$|[^a-z0-9&\s-]/g,'').replace(/&/g,'and').replace(/\s/g,'-').replace(/(-)+\1/g,'$1');const h2=document.querySelectorAll('#sidebar div div h2');h2.forEach((element)=>{element.classList.add('toggle');element.parentNode.classList.add('hide');const name=create_name(element.textContent);element.nextElementSibling.setAttribute('name',name);element.innerHTML=`<a href="#${name}" title="Reveal ${element.textContent} content">${element.innerHTML}</a>`;element.addEventListener('click',(e)=>{e.preventDefault();element.parentNode.classList.toggle('hide');});});const h2_link=document.querySelectorAll('h2.toggle a');h2_link.forEach((element)=>{element.addEventListener('mouseup',()=>{const event=new Event('blur',{bubbles:true,cancelable:false});element.dispatchEvent(event);});});}});