PageSourceSearch

https://www.everlane.com/cdn/shop/t/1272/assets/localization-form.js?v=64366121123358757181790206358

js everlane.com collected 2026-09-24 17:12:41 UTC 3,350 bytes, 2 lines download raw bytes

1customElements.get("localization-form")||customElements.define("localization-form",class extends HTMLElement{constructor(){super(),this.mql=window.matchMedia("(min-width: 750px)"),this.header=document.querySelector(".header-wrapper"),this.elements={input:this.querySelector('input[name="locale_code"], input[name="country_code"]'),button:this.querySelector("button.localization-form__select"),panel:this.querySelector(".disclosure__list-wrapper"),closeButton:this.querySelector(".country-selector__close-button"),overlay:this.querySelector(".country-selector__overlay"),portal:null},this.addEventListener("keyup",this.onContainerKeyUp.bind(this)),this.addEventListener("keydown",this.onContainerKeyDown.bind(this)),this.elements.button?.addEventListener("click",this.openSelector.bind(this)),this.elements.closeButton&&this.elements.closeButton.addEventListener("click",this.hidePanel.bind(this)),this.elements.overlay&&this.elements.overlay.addEventListener("click",this.hidePanel.bind(this)),this.querySelectorAll("a").forEach(item=>item.addEventListener("click",this.onItemClick.bind(this)))}hidePanel(){this.elements.button.setAttribute("aria-expanded","false"),this.elements.panel.setAttribute("hidden",!0),document.body.classList.remove("overflow-hidden-mobile"),document.querySelector(".menu-drawer").classList.remove("country-selector-open"),this.header.preventHide=!1}onContainerKeyDown(event){const focusableItems=Array.from(this.querySelectorAll("a")).filter(item=>!item.parentElement.classList.contains("hidden"));let focusedItemIndex=focusableItems.findIndex(item=>item===document.activeElement),itemToFocus;switch(event.code.toUpperCase()){case"ARROWUP":event.preventDefault(),itemToFocus=focusedItemIndex>0?focusableItems[focusedItemIndex-1]:focusableItems[focusableItems.length-1],itemToFocus.focus();break;case"ARROWDOWN":event.preventDefault(),itemToFocus=focusedItemIndex<focusableItems.length-1?focusableItems[focusedItemIndex+1]:focusableItems[0],itemToFocus.focus();break}}onContainerKeyUp(event){switch(event.preventDefault(),event.code.toUpperCase()){case"ESCAPE":if(this.elements.button.getAttribute("aria-expanded")=="false")return;this.hidePanel(),event.stopPropagation(),this.elements.button.focus();break;case"SPACE":if(this.elements.button.getAttribute("aria-expanded")=="true")return;this.openSelector();break}}onItemClick(event){event.preventDefault();const form=this.querySelector("form");this.elements.input.value=event.currentTarget.dataset.value,form&&form.submit()}openSelector(){this.elements.portal||(this.elements.portal=document.createElement("div"),document.body.appendChild(this.elements.portal),this.elements.portal.appendChild(this.elements.panel),this.elements.portal.appendChild(this.elements.overlay)),this.elements.button.focus(),this.elements.panel.toggleAttribute("hidden"),this.elements.button.setAttribute("aria-expanded",(this.elements.button.getAttribute("aria-expanded")==="false").toString()),document.body.classList.contains("overflow-hidden-tablet")||document.body.classList.add("overflow-hidden-mobile"),this.hasAttribute("data-prevent-hide")&&(this.header.preventHide=!0),document.querySelector(".menu-drawer").classList.add("country-selector-open")}closeSelector(){this.hidePanel()}});
2//# sourceMappingURL=/cdn/shop/t/1272/assets/localization-form.js.map?v=64366121123358757181790206358

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.