PageSourceSearch

https://couch1.de/cdn/shop/t/6/assets/mobile-nav.js?v=65063705214388957511740754605

js couch1.de collected 2026-10-06 08:59:41 UTC 4,010 bytes, 2 lines download raw bytes

1import"@archetype-themes/scripts/config";import"@archetype-themes/scripts/modules/header-nav";import"@archetype-themes/scripts/helpers/size-drawer";import"@archetype-themes/scripts/helpers/utils";import"@archetype-themes/scripts/helpers/delegate";theme.MobileNav=(function(){var selectors={wrapper:".slide-nav__wrapper",nav:".slide-nav",childList:".slide-nav__dropdown",allLinks:"a.slide-nav__link",subNavToggleBtn:".js-toggle-submenu",openBtn:".mobile-nav-trigger"},classes={isActive:"is-active"},defaults={isOpen:!1,menuLevel:1,inHeader:!1};function MobileNav(args){this.config=Object.assign({},defaults,args),this.namespace=".nav-header-"+args.id,this.container=document.getElementById(this.config.id),this.container&&(this.wrapper=this.container.querySelector(selectors.wrapper),this.wrapper&&(this.nav=this.wrapper.querySelector(selectors.nav),this.openTriggers=document.querySelectorAll(selectors.openBtn),this.init()))}return MobileNav.prototype=Object.assign({},MobileNav.prototype,{init:function(){var _this=this;this.openTriggers.length&&this.openTriggers.forEach(function(btn){btn.addEventListener("click",function(){this.config.isOpen?this.close():this.open()}.bind(_this))}),this.nav.querySelectorAll(selectors.subNavToggleBtn).forEach(function(btn){btn.addEventListener("click",_this.toggleSubNav.bind(_this))}),this.nav.querySelectorAll(selectors.allLinks).forEach(function(link){link.addEventListener("click",_this.close.bind(_this))}),this.inHeader&&(document.addEventListener("unmatchSmall",function(){this.close(null,!0)}.bind(this)),document.addEventListener("CartDrawer:open",this.close.bind(this)),document.addEventListener("mobileNav:open",this.open.bind(this)),document.addEventListener("mobileNav:close",this.close.bind(this)))},open:function(evt){evt&&evt.preventDefault(),theme.sizeDrawer(),this.openTriggers.forEach(function(btn){btn.classList.add("is-active")}),theme.utils.prepareTransition(this.container,function(){this.container.classList.add("is-active")}.bind(this)),window.on("keyup"+this.namespace,function(evt2){evt2.keyCode===27&&this.close()}.bind(this)),theme.headerNav.removeOverlayClass(),document.documentElement.classList.add("mobile-nav-open"),document.dispatchEvent(new CustomEvent("MobileNav:open")),this.config.isOpen=!0,setTimeout(function(){window.on("click"+this.namespace,function(evt2){this.close(evt2)}.bind(this))}.bind(this),0)},close:function(evt,noAnimate){var forceClose=!1;evt&&evt.target.closest&&evt.target.closest(".site-header__drawer")&&(evt.currentTarget&&evt.currentTarget.classList&&evt.currentTarget.classList.contains("slide-nav__link")&&(forceClose=!0),!forceClose)||(this.openTriggers.forEach(function(btn){btn.classList.remove("is-active")}),noAnimate?this.container.classList.remove("is-active"):theme.utils.prepareTransition(this.container,function(){this.container.classList.remove("is-active")}.bind(this)),document.documentElement.classList.remove("mobile-nav-open"),document.dispatchEvent(new CustomEvent("MobileNav:close")),window.off("keyup"+this.namespace),window.off("click"+this.namespace),this.config.isOpen=!1)},toggleSubNav:function(evt){var btn=evt.currentTarget;this.goToSubnav(btn.dataset.target)},goToSubnav:function(target){var targetMenu=this.nav.querySelector(selectors.childList+'[data-parent="'+target+'"]');targetMenu?(this.config.menuLevel=targetMenu.dataset.level,this.config.menuLevel==2&&this.nav.querySelectorAll(selectors.childList+'[data-level="3"]').forEach(function(list){list.classList.remove(classes.isActive)}),targetMenu.classList.add(classes.isActive),this.setWrapperHeight(targetMenu.offsetHeight)):(this.config.menuLevel=1,this.wrapper.removeAttribute("style"),this.nav.querySelectorAll(selectors.childList).forEach(function(list){list.classList.remove(classes.isActive)})),this.wrapper.dataset.level=this.config.menuLevel},setWrapperHeight:function(h){this.wrapper.style.height=h+"px"}}),MobileNav})();
2//# sourceMappingURL=/cdn/shop/t/6/assets/mobile-nav.js.map?v=65063705214388957511740754605

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.