PageSourceSearch

https://horze.es/cdn/shop/t/648/assets/mega-menu-item-DDMM_kBd.js

js horze.es collected 2026-10-07 06:39:49 UTC 2,566 bytes, 1 lines download raw bytes

1import c from"./prefetch-handler-BVg2ws-M.js";import{t as n}from"./vendor-motionone-dom-D_SzuYh_.js";import"./vendor-tslib-BGVaTf34.js";import"./vendor-hey-listen-DkH12NBk.js";import"./vendor-motionone-utils-DQEekzk6.js";import"./vendor-motionone-types-BEVUia5N.js";import"./vendor-motionone-animation-Dd2lbbbE.js";import"./vendor-motionone-easing-DC358-Hn.js";function l(o){const e={};return o.querySelectorAll("[data-target]").forEach(a=>{const t=a.getAttribute("data-target").split(".")[1];e[t]||(e[t]=[]),e[t].push(a)}),e}customElements.define("mega-menu-item",class extends HTMLElement{connectedCallback(){this.toggle=async(e,a=!1)=>{this.toggleAttribute("data-open",e);const{dropdown:[t]}=l(this),r=n([[t,{clipPath:e?["inset(0 0 100% 0)","inset(0 0 0 0)"]:["inset(0 0 0 0)","inset(0 0 100% 0)"]},{duration:e?.45:.3,fill:"forwards",at:0,easing:"cubic-bezier(0.4, 0, 0.2, 1)"}]]);r.finished.then(()=>{this.hasAttribute("data-open")||(t.style.clipPath="inset(0 0 100% 0)")}),a&&r.finish(),e?this.resetSubcategories():this.resetCategoriesHover(),await r.finished},this.hasAttribute("data-dropdown")&&this.setupSubcategoryHover()}resetCategoriesHover(){const e=this.querySelector('[data-target="mega-menu-item.dropdown"]');if(!e)return;e.querySelectorAll("li[data-category-link]").forEach(t=>{t.classList.remove("font-bold")})}resetSubcategories(){const e=this.querySelector('[data-target="mega-menu-item.dropdown"]');if(!e)return;const a=e.querySelector("[data-subcategories-container]");if(!a)return;a.querySelectorAll(".subcategory-content").forEach(r=>{r.classList.add("hidden"),r.classList.remove("active")})}setupSubcategoryHover(){const e=this.querySelector('[data-target="mega-menu-item.dropdown"]');if(!e)return;const a=e.querySelectorAll("li[data-category-link]"),t=e.querySelector("[data-subcategories-container]");!a.length||!t||a.forEach(r=>{r.addEventListener("mouseenter",()=>{const s=r.getAttribute("data-category-link");r.hasAttribute("data-has-subcategories")?this.showSubcategory(s,t):this.clearSubcategories(t),a.forEach(i=>{i.classList.remove("font-bold")}),r.classList.add("font-bold")})})}showSubcategory(e,a){a.querySelectorAll(".subcategory-content").forEach(s=>{s.classList.add("hidden"),s.classList.remove("active")});const r=a.querySelector(`[data-subcategory="${e}"]`);if(r){const s=r.querySelectorAll("a[href]");c(s),r.classList.remove("hidden"),r.classList.add("active")}}clearSubcategories(e){e.querySelectorAll(".subcategory-content").forEach(t=>{t.classList.add("hidden"),t.classList.remove("active")})}disconnectedCallback(){}});

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.