1const dd=document.querySelectorAll(".drop-down");for(let i=0;i<dd.length;i++){const btn=dd[i].querySelector(".drop-down__btn"),list=dd[i].querySelector(".drop-down__list"),option=list.querySelectorAll(".drop-down__option");function setTabindex(value){for(let k=0;k<option.length;k++)option[k].setAttribute("tabindex",value)}function closeList(){list.classList.remove("drop-down__list--active"),setTabindex("-1")}setTabindex("-1"),btn.addEventListener("click",function(event){for(let x=0;x<dd.length;x++){const otherList=dd[x].querySelector(".drop-down__list");otherList!==list&&(otherList.classList.remove("drop-down__list--active"),otherList.querySelectorAll(".drop-down__option").forEach(function(o){o.setAttribute("tabindex","-1")}))}list.classList.toggle("drop-down__list--active"),setTabindex(list.classList.contains("drop-down__list--active")?"0":"-1")}),btn.addEventListener("keydown",function(event){"Escape"===event.key&&closeList()});for(let j=0;j<option.length;j++)option[j].addEventListener("click",function(event){const active_option=list.querySelector(".drop-down__option--active");active_option&&active_option.classList.remove("drop-down__option--active"),event.target.classList.add("drop-down__option--active"),btn.querySelector(".drop-down__btn-text").innerHTML=event.target.innerHTML,closeList()}),option[j].addEventListener("keydown",function(event){"Escape"===event.key&&(closeList(),btn.focus())}),option[j].addEventListener("blur",function(){requestAnimationFrame(function(){list.contains(document.activeElement)||closeList()})});document.addEventListener("click",function(event){event.target.closest(".drop-down")||closeList()})} 2//# sourceURL=https://23945802.fs1.hubspotusercontent-na1.net/hubfs/23945802/hub_generated/template_assets/1/186252707392/1790173537568/template_drop-down.js
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.