PageSourceSearch

https://www.data-basics.com/hubfs/hub_generated/module_assets/1/19…/1788284791219/module_megamenu-2.min.js

js data-basics.com collected 2026-10-02 05:30:20 UTC 4,067 bytes, 2 lines download raw bytes

1var module_195592740728=void $(document).ready(function(){let hoverTimeout,resizeTimeout;function updateMenuHeight(){const spn=document.querySelector("#menu.mm-spn");if(!spn)return;const activePanel=spn.querySelector("ul.mm-spn--open:not(.mm-spn--parent)");if(!activePanel)return;let itemsHeight=0;for(const child of activePanel.children)itemsHeight+=child.offsetHeight;const spnRect=spn.getBoundingClientRect(),panelRect=activePanel.getBoundingClientRect(),contentHeight=itemsHeight+Math.max(0,panelRect.top-spnRect.top),drawerEl=document.querySelector(".mm-ocd__content"),maxHeight=drawerEl?drawerEl.getBoundingClientRect().height:window.innerHeight,targetHeight=Math.min(contentHeight,maxHeight);spn.style.height=targetHeight+"px"}function preventScrollOutsideMenu(e){e.target.closest(".mm-ocd__content")||e.preventDefault()}function unlockBodyScroll(){document.documentElement.style.overflow="",document.body.style.overflow="",document.removeEventListener("touchmove",preventScrollOutsideMenu,{passive:!1})}function initMenu(){if(window.innerWidth>767)return;if(window.mmenuInited)return;const menuElement=document.querySelector("#menu"),trigger=document.querySelector(".site-header__menu-toggle");if(!menuElement||!trigger)return;const menuMedia=window.matchMedia("(max-width: 767px)"),menu=new MmenuLight(menuElement,"(max-width: 767px)"),drawer=(menu.navigation(),menu.offcanvas());let isOpen=!1;
1function handleMenuBreakpointChange(event){event.matches||(drawer.close(),isOpen=!1,document.body.classList.remove("mobile-menu-active"),unlockBodyScroll(),menuElement.style.height="")}"function"==typeof menuMedia.addEventListener?menuMedia.addEventListener("change",handleMenuBreakpointChange):menuMedia.addListener(handleMenuBreakpointChange),new MutationObserver(()=>{requestAnimationFrame(updateMenuHeight)}).observe(menuElement,{attributes:!0,attributeFilter:["class"],subtree:!0}),trigger.addEventListener("click",e=>{if(e.preventDefault(),isOpen)drawer.close(),isOpen=!1,document.body.classList.remove("mobile-menu-active"),unlockBodyScroll();else{const headerContainer=document.querySelector(".header__container");let menuTop=139;if(headerContainer){const rect=headerContainer.getBoundingClientRect();menuTop=Math.max(0,rect.bottom)}document.documentElement.style.setProperty("--menu-top",menuTop+2+"px"),document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.addEventListener("touchmove",preventScrollOutsideMenu,{passive:!1}),drawer.open(),isOpen=!0,document.body.classList.add("mobile-menu-active"),requestAnimationFrame(updateMenuHeight)}}),window.mmenuInited=!0}function copyMenuToBottom(){if(window.innerWidth>767)return;const menuTop=document.querySelector(".header__menu-top"),bottom=document.querySelector("#menu .bottom");menuTop&&bottom&&(bottom.innerHTML=menuTop.innerHTML);const scheduleDemo=document.getElementById("hs_cos_wrapper_schedule_a_demo"),buttonLogIn=document.getElementById("hs_cos_wrapper_button_log_in"),center=document.querySelector("#menu .center");center&&(center.innerHTML="",scheduleDemo&&center.appendChild(scheduleDemo.cloneNode(!0)),buttonLogIn&&center.appendChild(buttonLogIn.cloneNode(!0)))}$(".menu-item-has-children > a").hover(function(){$(this).parent().addClass("open")}),$(".menu-item-has-children").mouseleave(function(){$(this).removeClass("open")}),$(".menu-main.desktop .nav-tabs li:first").tab("show"),$(".menu-main.desktop .nav-tabs li").on("mouseenter",function(){const $this=$(this);clearTimeout(hoverTimeout),hoverTimeout=setTimeout(function(){$this.tab("show")},125)}).on("mouseleave",function(){clearTimeout(hoverTimeout)}),$(".menu-main.desktop .nav-tabs li a").on("click",function(e){return!0}),initMenu(),copyMenuToBottom(),window.addEventListener("resize",()=>{clearTimeout(resizeTimeout),resizeTimeout=setTimeout(()=>{window.innerWidth<=767&&!window.mmenuInited&&initMenu(),copyMenuToBottom()},250)})});
2//# sourceURL=https://2107769.fs1.hubspotusercontent-na1.net/hubfs/2107769/hub_generated/module_assets/1/195592740728/1788284791219/module_megamenu-2.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.