https://newsroom.cancom.de/wp-content/cache/min/2/wp-content/theme…/assets/submenu.js?ver=1788247758
1(function(){'use strict';var menuSelector='.navigation ul.menu';class DisclosureNav{constructor(domNode){this.rootNode=domNode;this.controlledNodes=[];this.openIndex=null;this.useArrowKeys=!0;this.topLevelNodes=[...this.rootNode.querySelectorAll('[role=button][aria-expanded][aria-controls]'),];this.topLevelNodes.forEach((node)=>{if(node.getAttribute('role')&&node.getAttribute('role').toLowerCase()==='button'&&node.hasAttribute('aria-controls')){let menu=node.parentNode.querySelector('ul');if(!menu){menu=node.parentNode.querySelector('.dropmenu_template')} 2if(menu){this.controlledNodes.push(menu);node.setAttribute('aria-expanded','false');menu.addEventListener('keydown',this.onMenuKeyDown.bind(this));node.addEventListener('click',this.onButtonClick.bind(this,node));node.addEventListener('keydown',function(event){if(event.keyCode===32||event.keyCode===13){event.preventDefault();event.stopPropagation();this.click()}});node.addEventListener('keydown',this.onButtonKeyDown.bind(this))}}else{this.controlledNodes.push(null);node.addEventListener('keydown',this.onLinkKeyDown.bind(this))}});this.rootNode.addEventListener('focusout',this.onBlur.bind(this))} 3controlFocusByKey(keyboardEvent,nodeList,currentIndex){switch(keyboardEvent.key){case 'ArrowUp':case 'ArrowLeft':keyboardEvent.preventDefault();if(currentIndex>-1){var prevIndex=Math.max(0,currentIndex-1);nodeList[prevIndex].focus()} 4break;case 'ArrowDown':case 'ArrowRight':keyboardEvent.preventDefault();if(currentIndex>-1){var nextIndex=Math.min(nodeList.length-1,currentIndex+1);nodeList[nextIndex].focus()} 5break;case 'Home':keyboardEvent.preventDefault();nodeList[0].focus();break;case 'End':keyboardEvent.preventDefault();nodeList[nodeList.length-1].focus();break}}
6close(){this.toggleExpand(this.openIndex,!1,!0)} 7onBlur(event){var menuContainsFocus=!1;var target=event.relatedTarget 8if(target&&this.openIndex!==null){menuContainsFocus=this.controlledNodes[this.openIndex].contains(target)} 9if(!menuContainsFocus&&this.openIndex!==null){this.toggleExpand(this.openIndex,!1,!1)}} 10onButtonClick(event){var button=arguments[0];var buttonIndex=this.topLevelNodes.indexOf(button);var buttonExpanded=button.getAttribute('aria-expanded')==='true';this.toggleExpand(buttonIndex,!buttonExpanded,!0)} 11onButtonKeyDown(event){var targetButtonIndex=this.topLevelNodes.indexOf(document.activeElement);if(event.key==='Escape'){this.toggleExpand(this.openIndex,!1,!0)}else if(this.useArrowKeys&&this.openIndex===targetButtonIndex&&event.key==='ArrowDown'){event.preventDefault();this.controlledNodes[this.openIndex].querySelector('a').focus()}else if(this.useArrowKeys){this.controlFocusByKey(event,this.topLevelNodes,targetButtonIndex)}} 12onLinkKeyDown(event){var targetLinkIndex=this.topLevelNodes.indexOf(document.activeElement);if(this.useArrowKeys){this.controlFocusByKey(event,this.topLevelNodes,targetLinkIndex)}} 13onMenuKeyDown(event){if(this.openIndex===null){return} 14var menuLinks=Array.prototype.slice.call(this.controlledNodes[this.openIndex].querySelectorAll('a'));var currentIndex=menuLinks.indexOf(document.activeElement);if(event.key==='Escape'){this.topLevelNodes[this.openIndex].focus();
14this.toggleExpand(this.openIndex,!1,!0)}else if(this.useArrowKeys){this.controlFocusByKey(event,menuLinks,currentIndex)}} 15toggleExpand(index,expanded,instant){if(this.topLevelNodes[index]){this.openIndex=expanded?index:null;if(!expanded&&!instant){setTimeout(()=>{this.topLevelNodes[index].setAttribute('aria-expanded',expanded)},150)}else{this.topLevelNodes[index].setAttribute('aria-expanded',expanded)}}} 16updateKeyControls(useArrowKeys){this.useArrowKeys=useArrowKeys}} 17window.addEventListener('load',function(){var menus=[].slice.call(document.querySelectorAll(menuSelector));if(menus.length===0){console.warn('EE: Menu not found');return} 18var disclosureMenus=[];for(var i=0;i<menus.length;i++){disclosureMenus[i]=new DisclosureNav(menus[i])}})})()
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.