/*
* International Telephone Input v25.13.2
* https://github.com/jackocnr/intl-tel-input.git
* Licensed under the MIT license
*/
// UMD
(function(factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory();
} else {
window.intlTelInput = factory();
}
}(() => {
var factoryOutput=(()=>{var H1=Object.defineProperty;var h2=Object.getOwnPropertyDescriptor;var p2=Object.getOwnPropertyNames;var f2=Object.prototype.hasOwnProperty;var m2=(h,e)=>{for(var n in e)H1(h,n,{get:e[n],enumerable:!0})},C2=(h,e,n,$)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p2(e))!f2.call(h,r)&&r!==n&&H1(h,r,{get:()=>e[r],enumerable:!($=h2(e,r))||$.enumerable});return h};var g2=h=>C2(H1({},"__esModule",{value:!0}),h);var w2={};m2(w2,{default:()=>A2});var y2=[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]],w0=[];for(let h of y2)w0.push({name:"",iso2:h[0],dialCode:h[1],priority:h[2]||0,areaCodes:h[3]||null,nodeById:{},nationalPrefix:h[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var X=w0;var I2={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"\xC5land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barth\xE9lemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"C\xF4te d\u2019Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Cura\xE7ao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"R\xE9union",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"S\xE3o Tom\xE9 & Pr\xEDncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},D0=I2;var E2={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},M0=E2;var _2={...D0,...M0},B1=_2;var a1={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},_={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight"},M={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},U1={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},q={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},P0={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},G1={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},N1={SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6},L1={PLUS:"+",NANP:"1"},T1={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},R0={ISO2:"us",DIAL_CODE:"1"},c1={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},b1={AUTO:"auto"},k1={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},v={EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",ACTIVE_DESCENDANT:"aria-activedescendant",HASPOPUP:"aria-haspopup",CONTROLS:"aria-controls",HIDDEN:"aria-hidden",AUTOCOMPLETE:"aria-autocomplete",MODAL:"aria-modal"};var F1=h=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(h).matches,v2=()=>{if(typeof navigator<"u"&&typeof window<"u"){let h=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),e=F1("(max-width: 500px)"),n=F1("(max-height: 600px)"),$=F1("(pointer: coarse)");return h||e||$&&n}return!1},V1={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:c1.POLITE,containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:v2(),validationNumberTypes:["MOBILE"]},O0=(h,e)=>{h.useFullscreenPopup&&(h.fixDropdownWidth=!1),h.onlyCountries.length===1&&(h.initialCountry=h.onlyCountries[0]),h.separateDialCode&&(h.nationalMode=!1),h.allowDropdown&&!h.showFlags&&!h.separateDialCode&&(h.nationalMode=!1),h.useFullscreenPopup&&!h.dropdownContainer&&(h.dropdownContainer=document.body),h.i18n={...e,...h.i18n}};var n1=h=>h.replace(/\D/g,""),A1=(h="")=>h.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var x0=(h,e)=>{let n=A1(e),$=[],r=[],a=[],u=[],f=[],C=[];for(let E of h)E.iso2===n?$.push(E):E.normalisedName.startsWith(n)?r.push(E):E.normalisedName.includes(n)?a.push(E):n===E.dialCode||n===E.dialCodePlus?u.push(E):E.dialCodePlus.includes(n)?f.push(E):E.initials.includes(n)&&C.push(E);let y=(E,L)=>E.priority-L.priority;return[...$.sort(y),...r.sort(y),...a.sort(y),...u.sort(y),...f.sort(y),...C.sort(y)]},H0=(h,e)=>{let n=e.toLowerCase();for(let $ of h)if($.name.toLowerCase().startsWith(n))return $;return null};var w1=h=>Object.keys(h).filter(e=>!!h[e]).join(" "),N=(h,e,n)=>{let $=document.createElement(h);return e&&Object.entries(e).forEach(([r,a])=>$.setAttribute(r,a)),n&&n.appendChild($),$};var B0=()=>`
`,U0=h=>{let e=`iti-${h}-clear-mask`;return`
`};var h1=class{constructor(e,n,$){this.highlightedItem=null;this.selectedItem=null;e.dataset.intlTelInputId=$.toString(),this.telInput=e,this.options=n,this.id=$,this.hadInitialPlaceholder=!!e.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.originalPaddingLeft=this.telInput.style.paddingLeft)}generateMarkup(e){this.countries=e,this._prepareTelInput();let n=this._createWrapperAndInsert();this._maybeBuildCountryContainer(n),n.appendChild(this.telInput),this._maybeUpdateInputPaddingAndReveal(),this._maybeBuildHiddenInputs(n)}_prepareTelInput(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!this.telInput.form?.hasAttribute("autocomplete")&&this.telInput.setAttribute("autocomplete","off")}_createWrapperAndInsert(){let{allowDropdown:e,showFlags:n,containerClass:$,useFullscreenPopup:r}=this.options,a=w1({iti:!0,"iti--allow-dropdown":e,"iti--show-flags":n,"iti--inline-dropdown":!r,[$]:!!$}),u=N("div",{class:a});return this.isRTL&&u.setAttribute("dir","ltr"),this.telInput.before(u),u}_maybeBuildCountryContainer(e){let{allowDropdown:n,separateDialCode:$,showFlags:r}=this.options;if(n||r||$){this.countryContainer=N("div",{class:`iti__country-container ${_.V_HIDE}`},e),n?(this.selectedCountry=N("button",{type:"button",class:"iti__selected-country",[v.EXPANDED]:"false",[v.LABEL]:this.options.i18n.noCountrySelected,[v.HASPOPUP]:"dialog",[v.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=N("div",{class:"iti__selected-country"},this.countryContainer);let a=N("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=N("div",{class:_.FLAG},a),n&&(this.dropdownArrow=N("div",{class:"iti__arrow",[v.HIDDEN]:"true"},a)),$&&(this.selectedDialCode=N("div",{class:"iti__selected-dial-code"},this.selectedCountry)),n&&this._buildDropdownContent()}}_buildDropdownContent(){let{fixDropdownWidth:e,useFullscreenPopup:n,countrySearch:$,i18n:r,dropdownContainer:a,containerClass:u}=this.options,f=e?"":"iti--flexible-dropdown-width";if(this.dropdownContent=N("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${_.HIDE} ${f}`,role:"dialog",[v.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),$&&this._buildSearchUI(),this.countryList=N("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[v.LABEL]:r.countryListAriaLabel},this.dropdownContent),this._appendListItems(),$&&this.updateSearchResultsA11yText(),a){let C=w1({iti:!0,"iti--container":!0,"iti--fullscreen-popup":n,"iti--inline-dropdown":!n,[u]:!!u});this.dropdown=N("div",{class:C}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_buildSearchUI(){let{i18n:e}=this.options,n=N("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=N("span",{class:"iti__search-icon",[v.HIDDEN]:"true"},n),this.searchIcon.innerHTML=B0(),this.searchInput=N("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:e.searchPlaceholder,role:"combobox",[v.EXPANDED]:"true",[v.LABEL]:e.searchPlaceholder,[v.CONTROLS]:`iti-${this.id}__country-listbox`,[v.AUTOCOMPLETE]:"list",autocomplete:"off"},n),this.searchClearButton=N("button",{type:"button",class:`iti__search-clear ${_.HIDE}`,[v.LABEL]:e.clearSearchAriaLabel,tabindex:"-1"},n),this.searchClearButton.innerHTML=U0(this.id),this.searchResultsA11yText=N("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=N("div",{class:`iti__no-results ${_.HIDE}`,[v.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=e.zeroSearchResults}_maybeUpdateInputPaddingAndReveal(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(_.V_HIDE))}_maybeBuildHiddenInputs(e){let{hiddenInput:n}=this.options;if(n){let $=this.telInput.getAttribute("name")||"",r=n($);if(r.phone){let a=this.telInput.form?.querySelector(`input[name="${r.phone}"]`);a?this.hiddenInput=a:(this.hiddenInput=N("input",{type:"hidden",name:r.phone}),e.appendChild(this.hiddenInput))}if(r.country){let a=this.telInput.form?.querySelector(`input[name="${r.country}"]`);a?this.hiddenInputCountry=a:(this.hiddenInputCountry=N("input",{type:"hidden",name:r.country}),e.appendChild(this.hiddenInputCountry))}}}_appendListItems(){let e=document.createDocumentFragment();for(let n=0;nu){let L=r-f;n.scrollTop=E-L}}highlightListItem(e,n){let $=this.highlightedItem;if($&&$.classList.remove(_.HIGHLIGHT),this.highlightedItem=e,this.highlightedItem&&(this.highlightedItem.classList.add(_.HIGHLIGHT),this.options.countrySearch)){let r=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(v.ACTIVE_DESCENDANT,r)}n&&this.highlightedItem.focus()}updateSelectedItem(e){if(this.selectedItem&&this.selectedItem.dataset.countryCode!==e&&(this.selectedItem.setAttribute(v.SELECTED,"false"),this.selectedItem=null),e&&!this.selectedItem){let n=this.countryList.querySelector(`[data-country-code="${e}"]`);n&&(n.setAttribute(v.SELECTED,"true"),this.selectedItem=n)}}filterCountries(e){this.countryList.innerHTML="";let n=!0;for(let $ of e){let r=$.nodeById[this.id];r&&(this.countryList.appendChild(r),n&&(this.highlightListItem(r,!1),n=!1))}n?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(_.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(_.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.originalPaddingLeft);let e=this.telInput.parentNode;e.before(this.telInput),e.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.searchClearButton=null,this.searchNoResults=null,this.searchResultsA11yText=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null,this.selectedItem=null;for(let n of this.countries)delete n.nodeById[this.id];this.countries=null}};var G0=h=>{let{onlyCountries:e,excludeCountries:n}=h;if(e.length){let $=e.map(r=>r.toLowerCase());return X.filter(r=>$.includes(r.iso2))}else if(n.length){let $=n.map(r=>r.toLowerCase());return X.filter(r=>!$.includes(r.iso2))}return X},k0=(h,e)=>{for(let n of h){let $=n.iso2.toLowerCase();e.i18n[$]&&(n.name=e.i18n[$])}},F0=h=>{let e=new Set,n=0,$={},r=(u,f)=>{if(!u||!f)return;f.length>n&&(n=f.length),$.hasOwnProperty(f)||($[f]=[]);let C=$[f];C.includes(u)||C.push(u)},a=[...h].sort((u,f)=>u.priority-f.priority);for(let u of a){e.has(u.dialCode)||e.add(u.dialCode);for(let f=1;f{e.countryOrder&&(e.countryOrder=e.countryOrder.map(n=>n.toLowerCase())),h.sort((n,$)=>{let{countryOrder:r}=e;if(r){let a=r.indexOf(n.iso2),u=r.indexOf($.iso2),f=a>-1,C=u>-1;if(f||C)return f&&C?a-u:f?-1:1}return n.name.localeCompare($.name)})},K0=h=>{for(let e of h)e.normalisedName=A1(e.name),e.initials=e.normalisedName.split(/[^a-z]/).map(n=>n[0]).join(""),e.dialCodePlus=`+${e.dialCode}`};var W0=(h,e,n,$)=>{let r=h;if(n&&e){e=`+${$.dialCode}`;let a=r[e.length]===" "||r[e.length]==="-"?e.length+1:e.length;r=r.substring(a)}return r},j0=(h,e,n,$,r)=>{let a=n?n.formatNumberAsYouType(h,$.iso2):h,{dialCode:u}=$;return r&&e.charAt(0)!=="+"&&a.includes(`+${u}`)?(a.split(`+${u}`)[1]||"").trim():a};var Y0=(h,e,n,$)=>{if(n===0&&!$)return 0;let r=0;for(let a=0;a{let e=n1(h);if(e.startsWith(L1.NANP)&&e.length>=4){let n=e.substring(1,4);return S2.includes(n)}return!1};for(let h of X)h.name=B1[h.iso2];var N2=0,L2=new Set(X.map(h=>h.iso2)),W1=h=>L2.has(h),j1=class h{constructor(e,n={}){this.id=N2++,this.options={...V1,...n},O0(this.options,B1),this.ui=new h1(e,this.options,this.id),this.isAndroid=h._getIsAndroid(),this.promise=this._createInitPromises(),this.countries=G0(this.options);let{dialCodes:$,dialCodeMaxLen:r,dialCodeToIso2Map:a}=F0(this.countries);this.dialCodes=$,this.dialCodeMaxLen=r,this.dialCodeToIso2Map=a,this.countryByIso2=new Map(this.countries.map(u=>[u.iso2,u])),this._init()}static _getIsAndroid(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_updateNumeralSet(e){/[\u0660-\u0669]/.test(e)?this.userNumeralSet="arabic-indic":/[\u06F0-\u06F9]/.test(e)?this.userNumeralSet="persian":this.userNumeralSet="ascii"}_mapAsciiToUserNumerals(e){if(this.userNumeralSet||this._updateNumeralSet(this.ui.telInput.value),this.userNumeralSet==="ascii")return e;let n=this.userNumeralSet==="arabic-indic"?1632:1776;return e.replace(/[0-9]/g,$=>String.fromCharCode(n+Number($)))}_normaliseNumerals(e){if(!e)return"";if(this._updateNumeralSet(e),this.userNumeralSet==="ascii")return e;let n=this.userNumeralSet==="arabic-indic"?1632:1776,$=this.userNumeralSet==="arabic-indic"?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return e.replace($,r=>String.fromCharCode(48+(r.charCodeAt(0)-n)))}_getTelInputValue(){let e=this.ui.telInput.value.trim();return this._normaliseNumerals(e)}_setTelInputValue(e){this.ui.telInput.value=this._mapAsciiToUserNumerals(e)}_createInitPromises(){let e=new Promise(($,r)=>{this.resolveAutoCountryPromise=$,this.rejectAutoCountryPromise=r}),n=new Promise(($,r)=>{this.resolveUtilsScriptPromise=$,this.rejectUtilsScriptPromise=r});return Promise.all([e,n])}_init(){this.selectedCountryData={},this.abortController=new AbortController,this._processCountryData(),this.ui.generateMarkup(this.countries),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){k0(this.countries,this.options),V0(this.countries,this.options),K0(this.countries)}_setInitialState(e=!1){let n=this.ui.telInput.getAttribute("value"),$=this._normaliseNumerals(n),r=this._getTelInputValue(),u=$&&$.startsWith("+")&&(!r||!r.startsWith("+"))?$:r,f=this._getDialCode(u),C=K1(u),{initialCountry:y,geoIpLookup:E}=this.options,L=y===b1.AUTO&&E;if(f&&!C)this._updateCountryFromNumber(u);else if(!L||e){let B=y?y.toLowerCase():"";W1(B)?this._setCountry(B):f&&C?this._setCountry(R0.ISO2):this._setCountry("")}u&&this._updateValFromNumber(u)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.ui.hiddenInput||this.ui.hiddenInputCountry)&&this.ui.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){let e=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.hiddenInputCountry&&(this.ui.hiddenInputCountry.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",e,{signal:this.abortController.signal})}_initDropdownListeners(){let e=this.abortController.signal,n=u=>{this.ui.dropdownContent.classList.contains(_.HIDE)?this.ui.telInput.focus():u.preventDefault()},$=this.ui.telInput.closest("label");$&&$.addEventListener("click",n,{signal:e});let r=()=>{this.ui.dropdownContent.classList.contains(_.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._openDropdown()};this.ui.selectedCountry.addEventListener("click",r,{signal:e});let a=u=>{this.ui.dropdownContent.classList.contains(_.HIDE)&&[M.ARROW_UP,M.ARROW_DOWN,M.SPACE,M.ENTER].includes(u.key)&&(u.preventDefault(),u.stopPropagation(),this._openDropdown()),u.key===M.TAB&&this._closeDropdown()};this.ui.countryContainer.addEventListener("keydown",a,{signal:e})}_initRequests(){let{loadUtils:e,initialCountry:n,geoIpLookup:$}=this.options;if(e&&!g.utils){let a=()=>{g.attachUtils(e)?.catch(()=>{})};if(g.documentReady())a();else{let u=()=>{a()};window.addEventListener("load",u,{signal:this.abortController.signal})}}else this.resolveUtilsScriptPromise();n===b1.AUTO&&$&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){g.autoCountry?this.handleAutoCountry():g.startedLoadingAutoCountry||(g.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((e="")=>{let n=e.toLowerCase();W1(n)?(g.autoCountry=n,setTimeout(()=>p1("handleAutoCountry"))):(this._setInitialState(!0),p1("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),p1("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.ui.searchInput.value="+",this._filterCountriesByQuery("")}_initTelInputListeners(){this._bindInputListener(),this._maybeBindKeydownListener(),this._maybeBindPasteListener()}_bindInputListener(){let{strictMode:e,formatAsYouType:n,separateDialCode:$,allowDropdown:r,countrySearch:a}=this.options,u=!1;q.ALPHA_UNICODE.test(this._getTelInputValue())&&(u=!0);let f=C=>{let y=this._getTelInputValue();if(this.isAndroid&&C?.data==="+"&&$&&r&&a){let O=this.ui.telInput.selectionStart||0,F=y.substring(0,O-1),U=y.substring(O);this._setTelInputValue(F+U),this._openDropdownWithPlus();return}this._updateCountryFromNumber(y)&&this._triggerCountryChange();let E=C?.data&&q.NON_PLUS_NUMERIC.test(C.data),L=C?.inputType===U1.PASTE&&y;E||L&&!e?u=!0:q.NON_PLUS_NUMERIC.test(y)||(u=!1);let B=C?.detail&&C.detail.isSetNumber,W=this.userNumeralSet==="ascii";if(n&&!u&&!B&&W){let O=this.ui.telInput.selectionStart||0,U=y.substring(0,O).replace(q.NON_PLUS_NUMERIC_GLOBAL,"").length,V=C?.inputType===U1.DELETE_FWD,b=this._getFullNumber(),K=j0(b,y,g.utils,this.selectedCountryData,this.options.separateDialCode),G=Y0(U,K,O,V);this._setTelInputValue(K),this.ui.telInput.setSelectionRange(G,G)}};this.ui.telInput.addEventListener("input",f,{signal:this.abortController.signal})}_maybeBindKeydownListener(){let{strictMode:e,separateDialCode:n,allowDropdown:$,countrySearch:r}=this.options;if(e||n){let a=u=>{if(u.key&&u.key.length===1&&!u.altKey&&!u.ctrlKey&&!u.metaKey){if(n&&$&&r&&u.key==="+"){u.preventDefault(),this._openDropdownWithPlus();return}if(e){let f=this._getTelInputValue(),y=!f.startsWith("+")&&this.ui.telInput.selectionStart===0&&u.key==="+",E=this._normaliseNumerals(u.key),L=/^[0-9]$/.test(E),B=n?L:y||L,W=this.ui.telInput,O=W.selectionStart,F=W.selectionEnd,U=f.slice(0,O),V=f.slice(F),b=U+u.key+V,K=this._getFullNumber(b),G=g.utils.getCoreNumber(K,this.selectedCountryData.iso2),i1=this.maxCoreNumberLength&&G.length>this.maxCoreNumberLength,f1=this._getNewCountryFromNumber(K)!==null;(!B||i1&&!f1&&!y)&&u.preventDefault()}}};this.ui.telInput.addEventListener("keydown",a,{signal:this.abortController.signal})}}_maybeBindPasteListener(){if(this.options.strictMode){let e=n=>{n.preventDefault();let $=this.ui.telInput,r=$.selectionStart,a=$.selectionEnd,u=this._getTelInputValue(),f=u.slice(0,r),C=u.slice(a),y=this.selectedCountryData.iso2,E=n.clipboardData.getData("text"),L=this._normaliseNumerals(E),B=r===0&&a>0,W=!u.startsWith("+")||B,O=L.replace(q.NON_PLUS_NUMERIC_GLOBAL,""),F=O.startsWith("+"),U=O.replace(/\+/g,""),V=F&&W?`+${U}`:U,b=f+V+C;if(b.length>5){let G=g.utils.getCoreNumber(b,y);for(;G.length===0&&b.length>0;)b=b.slice(0,-1),G=g.utils.getCoreNumber(b,y);if(!G)return;if(this.maxCoreNumberLength&&G.length>this.maxCoreNumberLength)if($.selectionEnd===u.length){let i1=G.length-this.maxCoreNumberLength;b=b.slice(0,b.length-i1)}else return}this._setTelInputValue(b);let K=r+V.length;$.setSelectionRange(K,K),$.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",e,{signal:this.abortController.signal})}}_cap(e){let n=Number(this.ui.telInput.getAttribute("maxlength"));return n&&e.length>n?e.substring(0,n):e}_trigger(e,n={}){let $=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});this.ui.telInput.dispatchEvent($)}_openDropdown(){let{fixDropdownWidth:e,countrySearch:n}=this.options;if(this.dropdownAbortController=new AbortController,e&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(_.HIDE),this.ui.selectedCountry.setAttribute(v.EXPANDED,"true"),this._setDropdownPosition(),n){let $=this.ui.countryList.firstElementChild;$&&(this.ui.highlightListItem($,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._bindDropdownListeners(),this.ui.dropdownArrow.classList.add(_.ARROW_UP),this._trigger(a1.OPEN_COUNTRY_DROPDOWN)}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let e=this.ui.telInput.getBoundingClientRect(),n=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${e.top+n}px`,this.ui.dropdown.style.left=`${e.left}px`;let $=()=>this._closeDropdown();window.addEventListener("scroll",$,{signal:this.dropdownAbortController.signal})}}}_bindDropdownListeners(){let e=this.dropdownAbortController.signal;this._bindDropdownMouseoverListener(e),this._bindDropdownCountryClickListener(e),this._bindDropdownClickOffListener(e),this._bindDropdownKeydownListener(e),this.options.countrySearch&&this._bindDropdownSearchListeners(e)}_bindDropdownMouseoverListener(e){let n=$=>{let r=$.target?.closest(`.${_.COUNTRY_ITEM}`);r&&this.ui.highlightListItem(r,!1)};this.ui.countryList.addEventListener("mouseover",n,{signal:e})}_bindDropdownCountryClickListener(e){let n=$=>{let r=$.target?.closest(`.${_.COUNTRY_ITEM}`);r&&this._selectListItem(r)};this.ui.countryList.addEventListener("click",n,{signal:e})}_bindDropdownClickOffListener(e){let n=$=>{!!$.target.closest(`#iti-${this.id}__dropdown-content`)||this._closeDropdown()};setTimeout(()=>{document.documentElement.addEventListener("click",n,{signal:e})},0)}_bindDropdownKeydownListener(e){let n="",$=null,r=a=>{[M.ARROW_UP,M.ARROW_DOWN,M.ENTER,M.ESC].includes(a.key)&&(a.preventDefault(),a.stopPropagation(),a.key===M.ARROW_UP||a.key===M.ARROW_DOWN?this._handleUpDownKey(a.key):a.key===M.ENTER?this._handleEnterKey():a.key===M.ESC&&(this._closeDropdown(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&q.HIDDEN_SEARCH_CHAR.test(a.key)&&(a.stopPropagation(),$&&clearTimeout($),n+=a.key.toLowerCase(),this._searchForCountry(n),$=setTimeout(()=>{n=""},P0.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",r,{signal:e})}_bindDropdownSearchListeners(e){let n=()=>{let u=this.ui.searchInput.value.trim();this._filterCountriesByQuery(u),this.ui.searchInput.value?this.ui.searchClearButton.classList.remove(_.HIDE):this.ui.searchClearButton.classList.add(_.HIDE)},$=null,r=()=>{$&&clearTimeout($),$=setTimeout(()=>{n(),$=null},100)};this.ui.searchInput.addEventListener("input",r,{signal:e});let a=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),n()};this.ui.searchClearButton.addEventListener("click",a,{signal:e})}_searchForCountry(e){let n=H0(this.countries,e);if(n){let $=n.nodeById[this.id];this.ui.highlightListItem($,!1),this.ui.scrollTo($)}}_filterCountriesByQuery(e){let n;e===""?n=this.countries:n=x0(this.countries,e),this.ui.filterCountries(n)}_handleUpDownKey(e){let n=e===M.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!n&&this.ui.countryList.childElementCount>1&&(n=e===M.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),n&&(this.ui.scrollTo(n),this.ui.highlightListItem(n,!1))}_handleEnterKey(){this.ui.highlightedItem&&this._selectListItem(this.ui.highlightedItem)}_updateValFromNumber(e){let n=e;if(this.options.formatOnDisplay&&g.utils&&this.selectedCountryData){let $=this.options.nationalMode||!n.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:r,INTERNATIONAL:a}=g.utils.numberFormat,u=$?r:a;n=g.utils.formatNumber(n,this.selectedCountryData.iso2,u)}n=this._beforeSetNumber(n),this._setTelInputValue(n)}_updateCountryFromNumber(e){let n=this._getNewCountryFromNumber(e);return n!==null?this._setCountry(n):!1}_ensureHasDialCode(e){let{dialCode:n,nationalPrefix:$}=this.selectedCountryData;if(e.startsWith("+")||!n)return e;let u=$&&e.startsWith($)&&!this.options.separateDialCode?e.substring(1):e;return`+${n}${u}`}_getNewCountryFromNumber(e){let n=e.indexOf("+"),$=n?e.substring(n):e,r=this.selectedCountryData.iso2,a=this.selectedCountryData.dialCode;$=this._ensureHasDialCode($);let u=this._getDialCode($,!0),f=n1($);if(u){let C=n1(u),y=this.dialCodeToIso2Map[C];if(y.length===1)return y[0]===r?null:y[0];if(!r&&this.defaultCountry&&y.includes(this.defaultCountry))return this.defaultCountry;if(a===L1.NANP&&K1(f))return null;let{areaCodes:L,priority:B}=this.selectedCountryData;if(L){let V=L.map(b=>`${a}${b}`);for(let b of V)if(f.startsWith(b))return null}let O=L&&!(B===0)&&f.length>C.length,F=r&&y.includes(r)&&!O,U=r===y[0];if(!F&&!U)return y[0]}else if($.startsWith("+")&&f.length){let C=this.selectedCountryData.dialCode||"";return C&&C.startsWith(f)?null:""}else if((!$||$==="+")&&!r)return this.defaultCountry;return null}_setCountry(e){let{separateDialCode:n,showFlags:$,i18n:r,allowDropdown:a}=this.options,u=this.selectedCountryData.iso2||"";if(a&&this.ui.updateSelectedItem(e),this.selectedCountryData=e?this.countryByIso2.get(e):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.ui.selectedCountry){let f=e&&$?`${_.FLAG} iti__${e}`:`${_.FLAG} ${_.GLOBE}`,C,y;if(e){let{name:E,dialCode:L}=this.selectedCountryData;y=E,C=r.selectedCountryAriaLabel.replace("${countryName}",E).replace("${dialCode}",`+${L}`)}else y=r.noCountrySelected,C=r.noCountrySelected;this.ui.selectedCountryInner.className=f,this.ui.selectedCountry.setAttribute("title",y),this.ui.selectedCountry.setAttribute(v.LABEL,C)}if(n){let f=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=f,this.ui.updateInputPadding()}return this._updatePlaceholder(),this._updateMaxLength(),u!==e}_updateMaxLength(){let{strictMode:e,placeholderNumberType:n,validationNumberTypes:$}=this.options,{iso2:r}=this.selectedCountryData;if(e&&g.utils)if(r){let a=g.utils.numberType[n],u=g.utils.getExampleNumber(r,!1,a,!0),f=u;for(;g.utils.isPossibleNumber(u,r,$);)f=u,u+="0";let C=g.utils.getCoreNumber(f,r);this.maxCoreNumberLength=C.length,r==="by"&&(this.maxCoreNumberLength=C.length+1)}else this.maxCoreNumberLength=null}_updatePlaceholder(){let{autoPlaceholder:e,placeholderNumberType:n,nationalMode:$,customPlaceholder:r}=this.options,a=e===c1.AGGRESSIVE||!this.ui.hadInitialPlaceholder&&e===c1.POLITE;if(g.utils&&a){let u=g.utils.numberType[n],f=this.selectedCountryData.iso2?g.utils.getExampleNumber(this.selectedCountryData.iso2,$,u):"";f=this._beforeSetNumber(f),typeof r=="function"&&(f=r(f,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",f)}}_selectListItem(e){let n=e.dataset[k1.COUNTRY_CODE],$=this._setCountry(n);this._closeDropdown();let r=e.dataset[k1.DIAL_CODE];if(this._updateDialCode(r),this.options.formatOnDisplay){let a=this._getTelInputValue();this._updateValFromNumber(a)}this.ui.telInput.focus(),$&&this._triggerCountryChange()}_closeDropdown(){this.ui.dropdownContent.classList.contains(_.HIDE)||(this.ui.dropdownContent.classList.add(_.HIDE),this.ui.selectedCountry.setAttribute(v.EXPANDED,"false"),this.options.countrySearch&&(this.ui.searchInput.removeAttribute(v.ACTIVE_DESCENDANT),this.ui.highlightedItem&&(this.ui.highlightedItem.classList.remove(_.HIGHLIGHT),this.ui.highlightedItem=null)),this.ui.dropdownArrow.classList.remove(_.ARROW_UP),this.dropdownAbortController.abort(),this.dropdownAbortController=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._trigger(a1.CLOSE_COUNTRY_DROPDOWN))}_updateDialCode(e){let n=this._getTelInputValue(),$=`+${e}`,r;if(n.startsWith("+")){let a=this._getDialCode(n);a?r=n.replace(a,$):r=$,this._setTelInputValue(r)}}_getDialCode(e,n){let $="";if(e.startsWith("+")){let r="",a=!1;for(let u=0;ue?this._utilsIsValidNumber(u):this._utilsIsPossibleNumber(u),$=this._getFullNumber(),r=$.search(q.ALPHA_UNICODE);if(r>-1&&!this.options.allowPhonewords){let u=$.substring(0,r),f=n(u),C=n($);return f&&C}return n($)}_utilsIsValidNumber(e){return g.utils?g.utils.isValidNumber(e,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(e){let n=e?.toLowerCase();if(!W1(n))throw new Error(`Invalid country code: '${n}'`);let $=this.selectedCountryData.iso2;if(e&&n!==$||!e&&$){if(this._setCountry(n),this._updateDialCode(this.selectedCountryData.dialCode),this.options.formatOnDisplay){let a=this._getTelInputValue();this._updateValFromNumber(a)}this._triggerCountryChange()}}setNumber(e){let n=this._normaliseNumerals(e),$=this._updateCountryFromNumber(n);this._updateValFromNumber(n),$&&this._triggerCountryChange(),this._trigger(a1.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(e){this.options.placeholderNumberType=e,this._updatePlaceholder()}setDisabled(e){this.ui.telInput.disabled=e,e?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},T2=h=>{if(!g.utils&&!g.startedLoadingUtilsScript){let e;if(typeof h=="function")try{e=Promise.resolve(h())}catch(n){return Promise.reject(n)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof h}`));return g.startedLoadingUtilsScript=!0,e.then(n=>{let $=n?.default;if(!$||typeof $!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return g.utils=$,p1("handleUtils"),!0}).catch(n=>{throw p1("rejectUtilsScriptPromise",n),n})}return null},p1=(h,...e)=>{Object.values(g.instances).forEach(n=>{let $=n[h];typeof $=="function"&&$.apply(n,e)})},g=Object.assign((h,e)=>{let n=new j1(h,e);return g.instances[n.id]=n,h.iti=n,n},{defaults:V1,documentReady:()=>document.readyState==="complete",getCountryData:()=>X,getInstance:h=>{let e=h.dataset.intlTelInputId;return e?g.instances[e]:null},instances:{},attachUtils:T2,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.13.2"}),Y1=g;(function(){var h=this||self;function e(d,t){d=d.split(".");var i=h;d[0]in i||typeof i.execScript>"u"||i.execScript("var "+d[0]);for(var o;d.length&&(o=d.shift());)d.length||t===void 0?i[o]&&i[o]!==Object.prototype[o]?i=i[o]:i=i[o]={}:i[o]=t}function n(d,t){function i(){}i.prototype=t.prototype,d.ma=t.prototype,d.prototype=new i,d.prototype.constructor=d,d.sa=function(o,s,l){for(var c=Array(arguments.length-2),p=2;pd.length?!1:j(r2,d)}function $0(d){return j(n2,d)?y1(d,q0):y1(d,M1)}function r0(d){var t=$0(d.toString());H(d),d.g(t)}function o0(d){return d!=null&&(z(d,9)!=1||R(d,9)[0]!=-1)}function y1(d,t){for(var i=new A,o,s=d.length,l=0;lt?2:l[l.length-1]=s&&s<=o;++s)if(i=parseInt(d.substring(0,s),10),i in r1)return t.g(d.substring(s)),i;return 0}function p0(d,t,i,o,s,l){if(t.length==0)return 0;t=new A(t);var c;i!=null&&(c=m(i,11)),c==null&&(c="NonMatch");var p=t.toString();if(p.length==0)c=20;else if(o1.test(p))p=p.replace(o1,""),H(t),t.g($0(p)),c=1;else{if(p=new RegExp(c),r0(t),c=t.toString(),c.search(p)==0){p=c.match(p)[0].length;var I=c.substring(p).match(t0);I&&I[1]!=null&&0=t.h.length)throw Error("Phone number too short after IDD");if(d=h0(t,o),d!=0)return w(l,1,d),d;throw Error("Invalid country calling code")}return i!=null&&(c=S(i,10),p=""+c,I=t.toString(),I.lastIndexOf(p,0)==0&&(p=new A(I.substring(p.length)),I=m(i,1),I=new RegExp(S(I,2)),f0(p,i,null),p=p.toString(),!j(I,t.toString())&&j(I,p)||_1(d,t.toString(),i,-1)==3))?(o.g(p),s&&w(l,6,10),w(l,1,c),c):(w(l,1,0),0)}function f0(d,t,i){var o=d.toString(),s=o.length,l=m(t,15);if(s!=0&&l!=null&&l.length!=0){var c=new RegExp("^(?:"+l+")");if(s=c.exec(o)){l=new RegExp(S(m(t,1),2));var p=j(l,o),I=s.length-1;t=m(t,16),t==null||t.length==0||s[I]==null||s[I].length==0?(!p||j(l,o.substring(s[0].length)))&&(i!=null&&0=t.length)l="";else{var c=t.indexOf(";",l);l=c!==-1?t.substring(l,c):t.substring(l)}var p=l;if(p==null?c=!0:p.length===0?c=!1:(c=i2.exec(p),p=$2.exec(p),c=c!==null||p!==null),!c||(l!=null?(l.charAt(0)==="+"&&s.g(l),l=t.indexOf("tel:"),s.g(t.substring(0<=l?l+4:0,t.indexOf(";phone-context=")))):(l=s.g,c=t??"",p=c.search(d2),0<=p?(c=c.substring(p),c=c.replace(e2,""),p=c.search(t2),0<=p&&(c=c.substring(0,p))):c="",l.call(s,c)),l=s.toString(),c=l.indexOf(";isub="),0t.h.length||(c!=null&&(i=new A,s=new A(t.toString()),f0(s,c,i),d=_1(d,s.toString(),c,-1),d!=2&&d!=4&&d!=5&&(t=s,o&&0d))throw Error("The string supplied is too short to be a phone number");if(17{let t=[];return d.includes("FIXED_LINE_OR_MOBILE")?(d.includes("MOBILE")||t.push("MOBILE"),d.includes("FIXED_LINE")||t.push("FIXED_LINE")):(d.includes("MOBILE")||d.includes("FIXED_LINE"))&&t.push("FIXED_LINE_OR_MOBILE"),d.concat(t)},O1={FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1};e("intlTelInputUtilsTemp",{}),e("intlTelInputUtilsTemp.formatNumberAsYouType",(d,t)=>{try{let i=d.replace(/[^+0-9]/g,""),o=new u2(t);t="";for(let s=0;s{try{let s=D.g(),l=t1(s,d,t);var o=v1(s,l,-1);return o==0||o==4?s.format(l,typeof i>"u"?0:i):d}catch{return d}}),e("intlTelInputUtilsTemp.getExampleNumber",(d,t,i,o)=>{try{let I=D.g();d:{var s=I;if(I1(d)){var l=E1(J(s,d),i);try{if(x(l,6)){var c=m(l,6),p=m0(s,c,d,!1);break d}}catch{}}p=null}return I.format(p,o?0:t?2:1)}catch{return""}}),e("intlTelInputUtilsTemp.getExtension",(d,t)=>{try{return m(t1(D.g(),d,t),3)}catch{return""}}),e("intlTelInputUtilsTemp.getNumberType",(d,t)=>{try{let i=D.g(),o=t1(i,d,t);return u0(i,o)}catch{return-99}}),e("intlTelInputUtilsTemp.getValidationError",(d,t)=>{if(!t)return 1;try{let i=D.g(),o=t1(i,d,t);return v1(i,o,-1)}catch(i){return i.message==="Invalid country calling code"?1:3>=d.length||i.message==="Phone number too short after IDD"||i.message==="The string supplied is too short to be a phone number"?2:i.message==="The string supplied is too long to be a phone number"?3:-99}}),e("intlTelInputUtilsTemp.isValidNumber",(d,t,i)=>{try{let o=D.g(),s=t1(o,d,t),l=l2(o,s);if(i){let c=A0(i).map(p=>O1[p]);return l&&c.includes(u0(o,s))}return l}catch{return!1}}),e("intlTelInputUtilsTemp.isPossibleNumber",(d,t,i)=>{try{let o=D.g(),s=t1(o,d,t);if(i){let l=A0(i);for(let c of l)if(v1(o,s,O1[c])===0)return!0;return!1}return v1(o,s,-1)===0}catch{return!1}}),e("intlTelInputUtilsTemp.getCoreNumber",(d,t)=>{try{return m(t1(D.g(),d,t),2).toString()}catch{return""}}),e("intlTelInputUtilsTemp.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3}),e("intlTelInputUtilsTemp.numberType",O1),e("intlTelInputUtilsTemp.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5})})();var z0=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:void 0,b2=z0.intlTelInputUtilsTemp;delete z0.intlTelInputUtilsTemp;var Z0=b2;Y1.utils=Z0;var A2=Y1;return g2(w2);})();
// UMD
return factoryOutput.default;
}));