PageSourceSearch

https://www.izipizi.com/cdn/shop/t/5/assets/header-drawer.js?v=67659300411303339431784792618

js izipizi.com collected 2026-09-26 01:38:44 UTC 3,008 bytes, 2 lines download raw bytes

1import{Component}from"@theme/component";import{trapFocus,removeTrapFocus}from"@theme/focus";import{loadDeferredImages,onAnimationEnd}from"@theme/utilities";class HeaderDrawer extends Component{requiredRefs=["details","menuDrawer"];connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this.#onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keyup",this.#onKeyUp)}#onKeyUp=event=>{event.key==="Escape"&&this.#close(this.#getDetailsElement(event))};get isOpen(){return this.refs.details.hasAttribute("open")}#getDetailsElement(event){return event?.target instanceof Element?event.target.closest("details")??this.refs.details:this.refs.details}toggle(){return this.isOpen?this.close():this.open()}open(target,event){const details=this.#getDetailsElement(event),summary=details.querySelector("summary");if(!summary)return;const header=document.querySelector(".header-section .header");if(header){const headerDist=header.getBoundingClientRect();document.body.style.setProperty("--header-drawer-offset",`${headerDist.top+headerDist.height}px`)}summary.setAttribute("aria-expanded","true"),loadDeferredImages(details),this.#disableAccordionAnimations(details),requestAnimationFrame(()=>{details.classList.add("menu-open"),details.getAttribute("open")||details.setAttribute("open","true"),target&&this.refs.menuDrawer.classList.add("menu-drawer--has-submenu-opened");const drawer=details.querySelector(".menu-drawer, .menu-drawer__submenu");onAnimationEnd(drawer||details,()=>
1{trapFocus(details),this.#enableAccordionAnimations(details)},{subtree:!1})})}#disableAccordionAnimations(details){details.querySelectorAll("accordion-custom .details-content").forEach(element=>{element instanceof HTMLElement&&element.classList.add("details-content--no-animation")})}#enableAccordionAnimations(details){details.querySelectorAll("accordion-custom .details-content").forEach(element=>{element instanceof HTMLElement&&element.classList.remove("details-content--no-animation")})}back(event){this.#close(this.#getDetailsElement(event))}close(){this.#close(this.refs.details)}#close(details){const summary=details.querySelector("summary");if(!summary)return;summary.setAttribute("aria-expanded","false"),details.classList.remove("menu-open"),this.refs.menuDrawer.classList.remove("menu-drawer--has-submenu-opened");const drawer=details.querySelector(".menu-drawer, .menu-drawer__submenu");onAnimationEnd(drawer||details,()=>{reset(details),details===this.refs.details?(removeTrapFocus(),this.querySelectorAll("details[open]:not(accordion-custom > details)").forEach(reset)):trapFocus(this.refs.details)},{subtree:!1})}}customElements.get("header-drawer")||customElements.define("header-drawer",HeaderDrawer);function reset(element){element.classList.remove("menu-open"),element.removeAttribute("open"),element.querySelector("summary")?.setAttribute("aria-expanded","false")}
2//# sourceMappingURL=/cdn/shop/t/5/assets/header-drawer.js.map?v=67659300411303339431784792618

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.