1var LocalizationForm=class extends window.HTMLElement{constructor(){super(),this.elements={input:this.querySelector('input[name="language_code"], input[name="country_code"]'),button:this.querySelector("button"),list:this.querySelector("ul")},this.elements.button.addEventListener("click",this.toggleList.bind(this)),this.elements.button.addEventListener("focusout",this.onButtonFocusOut.bind(this)),this.elements.list.addEventListener("focusout",this.onListFocusOut.bind(this)),this.addEventListener("keyup",this.onLocalizationFormKeyUp.bind(this)),this.querySelectorAll("a").forEach(item=>item.addEventListener("click",this.onItemClick.bind(this))),document.body.addEventListener("click",this.onBodyClick.bind(this))}hideList(){this.elements.button.setAttribute("aria-expanded","false"),this.elements.list.setAttribute("hidden",!0),this.elements.button.classList.remove("rounded-b","md:rounded-b-none","md:rounded-b-none"),this.elements.button.classList.add("rounded")}onLocalizationFormKeyUp(event){event.code.toUpperCase()==="ESCAPE"&&(this.hideList(),this.elements.button.focus())}onItemClick(event){event.preventDefault();const form=this.querySelector("form");this.elements.input.value=event.currentTarget.dataset.value,form&&form.submit()}toggleList(){this.elements.list.toggleAttribute("hidden"),this.elements.button.classList.toggle("rounded-b"),this.elements.button.classList.toggle("md:rounded-t"),this.elements.button.classList.toggle("md:rounded-b-none"),this.elements.button.setAttribute("aria-expanded",(this.elements.button.getAttribute("aria-expanded")==="false").toString())}onButtonFocusOut(event){this.contains(event.relatedTarget)===!1&&this.hideList()}onListFocusOut(event){event.currentTarget.contains(event.relatedTarget)||this.hideList()}onBodyClick(event){const isOption=this.contains(event.target);this.elements.button.getAttribute("aria-expanded")==="true"&&!isOption&&this.hideList()}};window.customElements.define("localization-form",LocalizationForm); 2//# sourceMappingURL=/cdn/shop/t/189/assets/localization-form.js.map?v=159283842824951195261781642383
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.