1if(!customElements.get("localization-form")){customElements.define("localization-form",class LocalizationForm extends HTMLElement{constructor(){super();this.elements={input:this.querySelector('input[name="locale_code"], input[name="country_code"]',),button:this.querySelector("button"),panel:this.querySelector(".disclosure__list-wrapper"),};this.elements.button.addEventListener("click",this.openSelector.bind(this),);this.elements.button.addEventListener("focusout",this.closeSelector.bind(this),);this.addEventListener("keyup",this.onContainerKeyUp.bind(this));this.querySelectorAll("a").forEach((item)=>item.addEventListener("click",this.onItemClick.bind(this)),);} 2hidePanel(){this.elements.button.setAttribute("aria-expanded","false");this.elements.panel.setAttribute("hidden",true);} 3onContainerKeyUp(event){if(event.code.toUpperCase()!=="ESCAPE")return;this.hidePanel();this.elements.button.focus();} 4onItemClick(event){event.preventDefault();const form=this.querySelector("form");this.elements.input.value=event.currentTarget.dataset.value;if(form)form.submit();} 5openSelector(){this.elements.button.focus();this.elements.panel.toggleAttribute("hidden");this.elements.button.setAttribute("aria-expanded",(this.elements.button.getAttribute("aria-expanded")==="false").toString(),);} 6closeSelector(event){const isChild=this.elements.panel.contains(event.relatedTarget)||this.elements.button.contains(event.relatedTarget);if(!event.relatedTarget||!isChild){this.hidePanel();}}},);}
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.