1(()=>{"use strict";const e=window.wp.hooks;class t{constructor(t){this.buttons=t,this.openedButton=null,this.buttons.forEach((e=>{e.addEventListener("click",this.onClick.bind(this))})),document.addEventListener("keyup",this.onKeyup.bind(this)),document.body.classList.add("beapi-mega-menu-domready"),document.body.addEventListener("click",this.onClickBody.bind(this)),(0,e.createHooks)().addAction("closeMegaMenu","beapi-mega-menu",this.closeMegaMenu.bind(this))}closeMegaMenu(){this.openedButton&&(this.openedButton.setAttribute("aria-expanded","false"),this.openedButton=null,document.documentElement.classList.remove("mega-menu--is-open"))}closeMegaMenus(e){this.buttons.forEach((t=>{e!==t&&"true"===t.getAttribute("aria-expanded")&&t.setAttribute("aria-expanded","false")})),this.openedButton=null,document.documentElement.classList.remove("mega-menu--is-open")}toggleMegaMenu(e){if(this.closeMegaMenus(e),document.getElementById(e.getAttribute("aria-controls"))){const t="true"===e.getAttribute("aria-expanded")?"false":"true";e.setAttribute("aria-expanded",t),"true"===t&&(this.openedButton=e,document.documentElement.classList.add("mega-menu--is-open"))}}onClick(e){e.preventDefault(),this.toggleMegaMenu(e.currentTarget)}onKeyup(e){const t=document.activeElement;27===e.keyCode?this.openedButton&&this.openedButton===t&&this.closeMegaMenu():9===e.keyCode&&this.openedButton&&this.openedButton!==t&&(this.openedButton.parentNode.contains(t)||this.closeMegaMenu())}onClickBody(e){this.openedButton&&(this.openedButton.parentNode.contains(e.target)||this.closeMegaMenu())}}window.addEventListener("load",(()=>{const e=document.querySelectorAll(".mega-menu__toggle");new t(e)}))})();
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.