1class s 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(t=>t.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(t){t.code.toUpperCase()==="ESCAPE"&&(this.hideList(),this.elements.button.focus())}onItemClick(t){t.preventDefault();const e=this.querySelector("form");this.elements.input.value=t.currentTarget.dataset.value,e&&e.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(t){this.contains(t.relatedTarget)===!1&&this.hideList()}onListFocusOut(t){t.currentTarget.contains(t.relatedTarget)||this.hideList()}onBodyClick(t){const e=this.contains(t.target);this.elements.button.getAttribute("aria-expanded")==="true"&&!e&&this.hideList()}}window.customElements.define("localization-form",s); 2//# sourceMappingURL=localization-form.4e79aa6c.min.js.map
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.