(globalThis.webpackChunkcheckout_for_woocommerce=globalThis.webpackChunkcheckout_for_woocommerce||[]).push([[467],{3777(t){var e;e=()=>{var t=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,n={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(n,{Iti:()=>W,default:()=>H});var o=[];for(const t of[["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"]])o.push({name:"",iso2:t[0],dialCode:t[1],priority:t[2]||0,areaCodes:t[3]||null,nodeById:{},nationalPrefix:t[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var r=o,l={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:"Åland 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élemy",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ôte d’Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Curaçao",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éunion",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ão Tomé & Príncipe",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",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"},a="iti__hide",u="iti__v-hide",d="iti__arrow--up",h="iti__globe",c="iti__flag",p="iti__country",m="iti__highlight",C={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},y={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},g="polite",b="auto",f="aria-expanded",_="aria-label",w="aria-selected",I="aria-activedescendant",L="aria-haspopup",v="aria-controls",N="aria-hidden",D="aria-autocomplete",A="aria-modal",S=t=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia(t).matches,k={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:g,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:(()=>{if("undefined"!=typeof navigator&&"undefined"!=typeof window){const t=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),e=S("(max-width: 500px)"),i=S("(max-height: 600px)"),s=S("(pointer: coarse)");return t||e||s&&i}return!1})(),validationNumberTypes:["MOBILE"]},P=t=>t.replace(/\D/g,""),T=(t="")=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),E=t=>Object.keys(t).filter(e=>Boolean(t[e])).join(" "),x=(t,e,i)=>{const s=document.createElement(t);return e&&Object.entries(e).forEach(([t,e])=>s.setAttribute(t,e)),i&&i.appendChild(s),s},R=class{constructor(t,e,i){this.highlightedItem=null,t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.hadInitialPlaceholder=Boolean(t.getAttribute("placeholder")),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.originalPaddingLeft=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this._prepareTelInput();const e=this._createWrapperAndInsert();this._maybeBuildCountryContainer(e),e.appendChild(this.telInput),this._maybeUpdateInputPaddingAndReveal(),this._maybeBuildHiddenInputs(e)}_prepareTelInput(){this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.form?.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","off")}_createWrapperAndInsert(){const{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:s}=this.options,n=E({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!s,[i]:Boolean(i)}),o=x("div",{class:n});return this.isRTL&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}_maybeBuildCountryContainer(t){const{allowDropdown:e,separateDialCode:i,showFlags:s}=this.options;if(e||s||i){this.countryContainer=x("div",{class:`iti__country-container ${u}`},t),e?(this.selectedCountry=x("button",{type:"button",class:"iti__selected-country",[f]:"false",[_]:this.options.i18n.noCountrySelected,[L]:"dialog",[v]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=x("div",{class:"iti__selected-country"},this.countryContainer);const s=x("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=x("div",{class:c},s),e&&(this.dropdownArrow=x("div",{class:"iti__arrow",[N]:"true"},s)),i&&(this.selectedDialCode=x("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._buildDropdownContent()}}_buildDropdownContent(){const{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:s,dropdownContainer:n,containerClass:o}=this.options,r=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=x("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${a} ${r}`,role:"dialog",[A]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._buildSearchUI(),this.countryList=x("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[_]:s.countryListAriaLabel},this.dropdownContent),this._appendListItems(),i&&this.updateSearchResultsA11yText(),n){const t=E({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[o]:Boolean(o)});this.dropdown=x("div",{class:t}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_buildSearchUI(){const{i18n:t}=this.options,e=x("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=x("span",{class:"iti__search-icon",[N]:"true"},e),this.searchIcon.innerHTML=`\n  <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${N}="true">\n    <circle cx="11" cy="11" r="7" />\n    <line x1="21" y1="21" x2="16.65" y2="16.65" />\n  </svg>`,this.searchInput=x("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[f]:"true",[_]:t.searchPlaceholder,[v]:`iti-${this.id}__country-listbox`,[D]:"list",autocomplete:"off"},e),this.searchClearButton=x("button",{type:"button",class:`iti__search-clear ${a}`,[_]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.searchClearButton.innerHTML=(()=>{const t=`iti-${this.id}-clear-mask`;return`\n    <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${N}="true" focusable="false">\n      <mask id="${t}" maskUnits="userSpaceOnUse">\n        <rect width="16" height="16" fill="white" />\n        <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />\n      </mask>\n      <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />\n    </svg>`})(),this.searchResultsA11yText=x("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=x("div",{class:`iti__no-results ${a}`,[N]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.zeroSearchResults}_maybeUpdateInputPaddingAndReveal(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(u))}_maybeBuildHiddenInputs(t){const{hiddenInput:e}=this.options;if(e){const i=e(this.telInput.getAttribute("name")||"");if(i.phone){const e=this.telInput.form?.querySelector(`input[name="${i.phone}"]`);e?this.hiddenInput=e:(this.hiddenInput=x("input",{type:"hidden",name:i.phone}),t.appendChild(this.hiddenInput))}if(i.country){const e=this.telInput.form?.querySelector(`input[name="${i.country}"]`);e?this.hiddenInputCountry=e:(this.hiddenInputCountry=x("input",{type:"hidden",name:i.country}),t.appendChild(this.hiddenInputCountry))}}}_appendListItems(){const t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){const i=this.countries[e],s=E({[p]:!0,[m]:0===e}),n=x("li",{id:`iti-${this.id}__item-${i.iso2}`,class:s,tabindex:"-1",role:"option",[w]:"false"});n.dataset.dialCode=i.dialCode,n.dataset.countryCode=i.iso2,i.nodeById[this.id]=n,this.options.showFlags&&x("div",{class:`${c} iti__${i.iso2}`},n),x("span",{class:"iti__country-name"},n).textContent=i.name;const o=x("span",{class:"iti__dial-code"},n);this.isRTL&&o.setAttribute("dir","ltr"),o.textContent=`+${i.dialCode}`,t.appendChild(n)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){const t=this.options.separateDialCode?78:42,e=(this.selectedCountry.offsetWidth||this._getHiddenSelectedCountryWidth()||t)+6;this.telInput.style.paddingLeft=`${e}px`}}_getHiddenSelectedCountryWidth(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch(e){t=document.body}const e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);const i=this.countryContainer.cloneNode();e.appendChild(i);const s=this.selectedCountry.cloneNode(!0);i.appendChild(s);const n=s.offsetWidth;return t.removeChild(e),n}return 0}updateSearchResultsA11yText(){const{i18n:t}=this.options,e=this.countryList.childElementCount;let i;i=0===e?t.zeroSearchResults:t.searchResultsText?t.searchResultsText(e):1===e?t.oneSearchResult:t.multipleSearchResults.replace("${count}",e.toString()),this.searchResultsA11yText.textContent=i}scrollTo(t){const e=this.countryList,i=document.documentElement.scrollTop,s=e.offsetHeight,n=e.getBoundingClientRect().top+i,o=n+s,r=t.offsetHeight,l=t.getBoundingClientRect().top+i,a=l+r,u=l-n+e.scrollTop;if(l<n)e.scrollTop=u;else if(a>o){const t=s-r;e.scrollTop=u-t}}highlightListItem(t,e){const i=this.highlightedItem;if(i&&(i.classList.remove(m),i.setAttribute(w,"false")),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(m),this.highlightedItem.setAttribute(w,"true"),this.options.countrySearch)){const t=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(I,t)}e&&this.highlightedItem.focus()}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(const i of t){const t=i.nodeById[this.id];t&&(this.countryList.appendChild(t),e&&(this.highlightListItem(t,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(a)):this.searchNoResults&&this.searchNoResults.classList.add(a),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);const t=this.telInput.parentNode;t.before(this.telInput),t.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;for(const t of this.countries)delete t.nodeById[this.id];this.countries=null}},M=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],B=t=>{const e=P(t);if(e.startsWith("1")&&e.length>=4){const t=e.substring(1,4);return M.includes(t)}return!1};for(const t of r)t.name=l[t.iso2];var O,$=0,U=new Set(r.map(t=>t.iso2)),F=t=>U.has(t),W=class t{constructor(e,i={}){var s,n;this.id=$++,this.options={...k,...i},s=this.options,n=l,s.useFullscreenPopup&&(s.fixDropdownWidth=!1),1===s.onlyCountries.length&&(s.initialCountry=s.onlyCountries[0]),s.separateDialCode&&(s.nationalMode=!1),!s.allowDropdown||s.showFlags||s.separateDialCode||(s.nationalMode=!1),s.useFullscreenPopup&&!s.dropdownContainer&&(s.dropdownContainer=document.body),s.i18n={...n,...s.i18n},this.ui=new R(e,this.options,this.id),this.isAndroid=t._getIsAndroid(),this.promise=this._createInitPromises(),this.countries=(t=>{const{onlyCountries:e,excludeCountries:i}=t;if(e.length){const t=e.map(t=>t.toLowerCase());return r.filter(e=>t.includes(e.iso2))}if(i.length){const t=i.map(t=>t.toLowerCase());return r.filter(e=>!t.includes(e.iso2))}return r})(this.options);const{dialCodes:o,dialCodeMaxLen:a,dialCodeToIso2Map:u}=((t,e)=>{const i=new Set;let s=0;const n={},o=(t,e,i)=>{if(!t||!e)return;e.length>s&&(s=e.length),n.hasOwnProperty(e)||(n[e]=[]);const o=n[e];o.includes(t)||(o[void 0!==i?i:o.length]=t)};for(const e of t){i.has(e.dialCode)||i.add(e.dialCode);for(let t=1;t<e.dialCode.length;t++){const i=e.dialCode.substring(0,t);o(e.iso2,i)}o(e.iso2,e.dialCode,e.priority)}(e.onlyCountries.length||e.excludeCountries.length)&&i.forEach(t=>{n[t]=n[t].filter(Boolean)});for(const e of t)if(e.areaCodes){const t=n[e.dialCode][0];for(const i of e.areaCodes){for(let s=1;s<i.length;s++){const n=i.substring(0,s),r=e.dialCode+n;o(t,r),o(e.iso2,r)}o(e.iso2,e.dialCode+i)}}return{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:n}})(this.countries,this.options);this.dialCodes=o,this.dialCodeMaxLen=a,this.dialCodeToIso2Map=u,this.countryByIso2=new Map(this.countries.map(t=>[t.iso2,t])),this._init()}static _getIsAndroid(){return"undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent)}_createInitPromises(){const t=new Promise((t,e)=>{this.resolveAutoCountryPromise=t,this.rejectAutoCountryPromise=e}),e=new Promise((t,e)=>{this.resolveUtilsScriptPromise=t,this.rejectUtilsScriptPromise=e});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.abortController=new AbortController,this._processCountryData(),this.ui.generateMarkup(this.countries),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){var t,e;((t,e)=>{for(const i of t){const t=i.iso2.toLowerCase();e.i18n[t]&&(i.name=e.i18n[t])}})(this.countries,this.options),t=this.countries,(e=this.options).countryOrder&&(e.countryOrder=e.countryOrder.map(t=>t.toLowerCase())),t.sort((t,i)=>{const{countryOrder:s}=e;if(s){const e=s.indexOf(t.iso2),n=s.indexOf(i.iso2),o=e>-1,r=n>-1;if(o||r)return o&&r?e-n:o?-1:1}return t.name.localeCompare(i.name)}),(t=>{for(const e of t)e.normalisedName=T(e.name),e.initials=e.normalisedName.split(/[^a-z]/).map(t=>t[0]).join(""),e.dialCodePlus=`+${e.dialCode}`})(this.countries)}_setInitialState(t=!1){const e=this.ui.telInput.getAttribute("value"),i=this.ui.telInput.value,s=!e||!e.startsWith("+")||i&&i.startsWith("+")?i:e,n=this._getDialCode(s),o=B(s),{initialCountry:r,geoIpLookup:l}=this.options,a=r===b&&l;if(n&&!o)this._updateCountryFromNumber(s);else if(!a||t){const t=r?r.toLowerCase():"";F(t)?this._setCountry(t):n&&o?this._setCountry("us"):this._setCountry("")}s&&this._updateValFromNumber(s)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.ui.hiddenInput||this.ui.hiddenInputCountry)&&this.ui.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){this.ui.telInput.form?.addEventListener("submit",()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.hiddenInputCountry&&(this.ui.hiddenInputCountry.value=this.selectedCountryData.iso2||"")},{signal:this.abortController.signal})}_initDropdownListeners(){const t=this.abortController.signal,e=this.ui.telInput.closest("label");e&&e.addEventListener("click",t=>{this.ui.dropdownContent.classList.contains(a)?this.ui.telInput.focus():t.preventDefault()},{signal:t}),this.ui.selectedCountry.addEventListener("click",()=>{!this.ui.dropdownContent.classList.contains(a)||this.ui.telInput.disabled||this.ui.telInput.readOnly||this._openDropdown()},{signal:t}),this.ui.countryContainer.addEventListener("keydown",t=>{this.ui.dropdownContent.classList.contains(a)&&[C.ARROW_UP,C.ARROW_DOWN,C.SPACE,C.ENTER].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this._openDropdown()),t.key===C.TAB&&this._closeDropdown()},{signal:t})}_initRequests(){const{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!j.utils){const e=()=>{j.attachUtils(t)?.catch(()=>{})};if(j.documentReady())e();else{const t=()=>{e()};window.addEventListener("load",t,{signal:this.abortController.signal})}}else this.resolveUtilsScriptPromise();e===b&&i&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){j.autoCountry?this.handleAutoCountry():j.startedLoadingAutoCountry||(j.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((t="")=>{const e=t.toLowerCase();F(e)?(j.autoCountry=e,setTimeout(()=>z("handleAutoCountry"))):(this._setInitialState(!0),z("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),z("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.ui.searchInput.value="+",this._filterCountriesByQuery("")}_initTelInputListeners(){this._bindInputListener(),this._maybeBindKeydownListener(),this._maybeBindPasteListener()}_bindInputListener(){const{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:s,countrySearch:n}=this.options;let o=!1;y.ALPHA_UNICODE.test(this.ui.telInput.value)&&(o=!0),this.ui.telInput.addEventListener("input",r=>{if(this.isAndroid&&"+"===r?.data&&i&&s&&n){const t=this.ui.telInput.selectionStart||0,e=this.ui.telInput.value.substring(0,t-1),i=this.ui.telInput.value.substring(t);return this.ui.telInput.value=e+i,void this._openDropdownWithPlus()}this._updateCountryFromNumber(this.ui.telInput.value)&&this._triggerCountryChange();const l=r?.data&&y.NON_PLUS_NUMERIC.test(r.data),a="insertFromPaste"===r?.inputType&&this.ui.telInput.value;l||a&&!t?o=!0:y.NON_PLUS_NUMERIC.test(this.ui.telInput.value)||(o=!1);const u=r?.detail&&r.detail.isSetNumber;if(e&&!o&&!u){const t=this.ui.telInput.selectionStart||0,e=this.ui.telInput.value.substring(0,t).replace(y.NON_PLUS_NUMERIC_GLOBAL,"").length,i="deleteContentForward"===r?.inputType,s=((t,e,i,s,n)=>{const o=i?i.formatNumberAsYouType(t,s.iso2):t,{dialCode:r}=s;return n&&"+"!==e.charAt(0)&&o.includes(`+${r}`)?(o.split(`+${r}`)[1]||"").trim():o})(this._getFullNumber(),this.ui.telInput.value,j.utils,this.selectedCountryData,this.options.separateDialCode),n=((t,e,i,s)=>{if(0===i&&!s)return 0;let n=0;for(let i=0;i<e.length;i++){if(/[+0-9]/.test(e[i])&&n++,n===t&&!s)return i+1;if(s&&n===t+1)return i}return e.length})(e,s,t,i);this.ui.telInput.value=s,this.ui.telInput.setSelectionRange(n,n)}},{signal:this.abortController.signal})}_maybeBindKeydownListener(){const{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:s}=this.options;if(t||e){const n=n=>{if(n.key&&1===n.key.length&&!n.altKey&&!n.ctrlKey&&!n.metaKey){if(e&&i&&s&&"+"===n.key)return n.preventDefault(),void this._openDropdownWithPlus();if(t){const t=this.ui.telInput.value,i=!t.startsWith("+")&&0===this.ui.telInput.selectionStart&&"+"===n.key,s=/^[0-9]$/.test(n.key),o=e?s:i||s,r=t.slice(0,this.ui.telInput.selectionStart)+n.key+t.slice(this.ui.telInput.selectionEnd),l=this._getFullNumber(r),a=j.utils.getCoreNumber(l,this.selectedCountryData.iso2),u=this.maxCoreNumberLength&&a.length>this.maxCoreNumberLength,d=this._getNewCountryFromNumber(l);o&&(!u||null!==d||i)||n.preventDefault()}}};this.ui.telInput.addEventListener("keydown",n,{signal:this.abortController.signal})}}_maybeBindPasteListener(){if(this.options.strictMode){const t=t=>{t.preventDefault();const e=this.ui.telInput,i=e.selectionStart,s=e.selectionEnd,n=e.value.slice(0,i),o=e.value.slice(s),r=this.selectedCountryData.iso2,l=t.clipboardData.getData("text"),a=0===i&&s>0,u=!e.value.startsWith("+")||a,d=l.replace(y.NON_PLUS_NUMERIC_GLOBAL,""),h=d.startsWith("+"),c=d.replace(/\+/g,""),p=h&&u?`+${c}`:c;let m=n+p+o,C=j.utils.getCoreNumber(m,r);for(;0===C.length&&m.length>0;)m=m.slice(0,-1),C=j.utils.getCoreNumber(m,r);if(!C)return;if(this.maxCoreNumberLength&&C.length>this.maxCoreNumberLength){if(e.selectionEnd!==e.value.length)return;{const t=C.length-this.maxCoreNumberLength;m=m.slice(0,m.length-t)}}e.value=m;const g=i+p.length;e.setSelectionRange(g,g),e.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.abortController.signal})}}_cap(t){const e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_trigger(t,e={}){const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_openDropdown(){const{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.dropdownAbortController=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(a),this.ui.selectedCountry.setAttribute(f,"true"),this._setDropdownPosition(),e){const t=this.ui.countryList.firstElementChild;t&&(this.ui.highlightListItem(t,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._bindDropdownListeners(),this.ui.dropdownArrow.classList.add(d),this._trigger("open:countrydropdown")}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){const t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;const i=()=>this._closeDropdown();window.addEventListener("scroll",i,{signal:this.dropdownAbortController.signal})}}}_bindDropdownListeners(){const t=this.dropdownAbortController.signal;this._bindDropdownMouseoverListener(t),this._bindDropdownCountryClickListener(t),this._bindDropdownClickOffListener(t),this._bindDropdownKeydownListener(t),this.options.countrySearch&&this._bindDropdownSearchListeners(t)}_bindDropdownMouseoverListener(t){this.ui.countryList.addEventListener("mouseover",t=>{const e=t.target?.closest(`.${p}`);e&&this.ui.highlightListItem(e,!1)},{signal:t})}_bindDropdownCountryClickListener(t){this.ui.countryList.addEventListener("click",t=>{const e=t.target?.closest(`.${p}`);e&&this._selectListItem(e)},{signal:t})}_bindDropdownClickOffListener(t){const e=t=>{t.target.closest(`#iti-${this.id}__dropdown-content`)||this._closeDropdown()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_bindDropdownKeydownListener(t){let e="",i=null;document.addEventListener("keydown",t=>{[C.ARROW_UP,C.ARROW_DOWN,C.ENTER,C.ESC].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key===C.ARROW_UP||t.key===C.ARROW_DOWN?this._handleUpDownKey(t.key):t.key===C.ENTER?this._handleEnterKey():t.key===C.ESC&&this._closeDropdown()),!this.options.countrySearch&&y.HIDDEN_SEARCH_CHAR.test(t.key)&&(t.stopPropagation(),i&&clearTimeout(i),e+=t.key.toLowerCase(),this._searchForCountry(e),i=setTimeout(()=>{e=""},1e3))},{signal:t})}_bindDropdownSearchListeners(t){const e=()=>{const t=this.ui.searchInput.value.trim();this._filterCountriesByQuery(t),this.ui.searchInput.value?this.ui.searchClearButton.classList.remove(a):this.ui.searchClearButton.classList.add(a)};let i=null;this.ui.searchInput.addEventListener("input",()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)},{signal:t}),this.ui.searchClearButton.addEventListener("click",()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()},{signal:t})}_searchForCountry(t){const e=((t,e)=>{const i=e.toLowerCase();for(const e of t)if(e.name.toLowerCase().startsWith(i))return e;return null})(this.countries,t);if(e){const t=e.nodeById[this.id];this.ui.highlightListItem(t,!1),this.ui.scrollTo(t)}}_filterCountriesByQuery(t){let e;e=""===t?this.countries:((t,e)=>{const i=T(e),s=[],n=[],o=[],r=[],l=[],a=[];for(const e of t)e.iso2===i?s.push(e):e.normalisedName.startsWith(i)?n.push(e):e.normalisedName.includes(i)?o.push(e):i===e.dialCode||i===e.dialCodePlus?r.push(e):e.dialCodePlus.includes(i)?l.push(e):e.initials.includes(i)&&a.push(e);const u=(t,e)=>t.priority-e.priority;return[...s.sort(u),...n.sort(u),...o.sort(u),...r.sort(u),...l.sort(u),...a.sort(u)]})(this.countries,t),this.ui.filterCountries(e)}_handleUpDownKey(t){let e=t===C.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===C.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_handleEnterKey(){this.ui.highlightedItem&&this._selectListItem(this.ui.highlightedItem)}_updateValFromNumber(t){let e=t;if(this.options.formatOnDisplay&&j.utils&&this.selectedCountryData){const t=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:i,INTERNATIONAL:s}=j.utils.numberFormat,n=t?i:s;e=j.utils.formatNumber(e,this.selectedCountryData.iso2,n)}e=this._beforeSetNumber(e),this.ui.telInput.value=e}_updateCountryFromNumber(t){const e=this._getNewCountryFromNumber(t);return null!==e&&this._setCountry(e)}_ensureHasDialCode(t){const{dialCode:e,nationalPrefix:i}=this.selectedCountryData;return t.startsWith("+")||!e?t:`+${e}${i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t}`}_getNewCountryFromNumber(t){const e=t.indexOf("+");let i=e?t.substring(e):t;const s=this.selectedCountryData.iso2,n=this.selectedCountryData.dialCode;i=this._ensureHasDialCode(i);const o=this._getDialCode(i,!0),r=P(i);if(o){const t=P(o),e=this.dialCodeToIso2Map[t];if(1===e.length)return e[0]===s?null:e[0];if(!s&&this.defaultCountry&&e.includes(this.defaultCountry))return this.defaultCountry;if("1"===n&&B(r))return null;const{areaCodes:i,priority:l}=this.selectedCountryData;if(i){const t=i.map(t=>`${n}${t}`);for(const e of t)if(r.startsWith(e))return null}const a=i&&!(0===l)&&r.length>t.length,u=s&&e.includes(s)&&!a,d=s===e[0];if(!u&&!d)return e[0]}else{if(i.startsWith("+")&&r.length){const t=this.selectedCountryData.dialCode||"";return t&&t.startsWith(r)?null:""}if(!(i&&"+"!==i||s))return this.defaultCountry}return null}_setCountry(t){const{separateDialCode:e,showFlags:i,i18n:s}=this.options,n=this.selectedCountryData.iso2||"";if(this.selectedCountryData=t?this.countryByIso2.get(t):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.ui.selectedCountry){const e=t&&i?`${c} iti__${t}`:`${c} ${h}`;let n,o;if(t){const{name:t,dialCode:e}=this.selectedCountryData;o=t,n=s.selectedCountryAriaLabel.replace("${countryName}",t).replace("${dialCode}",`+${e}`)}else o=s.noCountrySelected,n=s.noCountrySelected;this.ui.selectedCountryInner.className=e,this.ui.selectedCountry.setAttribute("title",o),this.ui.selectedCountry.setAttribute(_,n)}if(e){const t=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=t,this.ui.updateInputPadding()}return this._updatePlaceholder(),this._updateMaxLength(),n!==t}_updateMaxLength(){const{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:s}=this.selectedCountryData;if(t&&j.utils)if(s){const t=j.utils.numberType[e];let n=j.utils.getExampleNumber(s,!1,t,!0),o=n;for(;j.utils.isPossibleNumber(n,s,i);)o=n,n+="0";const r=j.utils.getCoreNumber(o,s);this.maxCoreNumberLength=r.length,"by"===s&&(this.maxCoreNumberLength=r.length+1)}else this.maxCoreNumberLength=null}_updatePlaceholder(){const{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:s}=this.options,n="aggressive"===t||!this.ui.hadInitialPlaceholder&&t===g;if(j.utils&&n){const t=j.utils.numberType[e];let n=this.selectedCountryData.iso2?j.utils.getExampleNumber(this.selectedCountryData.iso2,i,t):"";n=this._beforeSetNumber(n),"function"==typeof s&&(n=s(n,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",n)}}_selectListItem(t){const e=t.dataset.countryCode,i=this._setCountry(e);this._closeDropdown();const s=t.dataset.dialCode;this._updateDialCode(s),this.options.formatOnDisplay&&this._updateValFromNumber(this.ui.telInput.value),this.ui.telInput.focus(),i&&this._triggerCountryChange()}_closeDropdown(){this.ui.dropdownContent.classList.contains(a)||(this.ui.dropdownContent.classList.add(a),this.ui.selectedCountry.setAttribute(f,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(w,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(I),this.ui.dropdownArrow.classList.remove(d),this.dropdownAbortController.abort(),this.dropdownAbortController=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._trigger("close:countrydropdown"))}_updateDialCode(t){const e=this.ui.telInput.value,i=`+${t}`;let s;if(e.startsWith("+")){const t=this._getDialCode(e);s=t?e.replace(t,i):i,this.ui.telInput.value=s}}_getDialCode(t,e){let i="";if(t.startsWith("+")){let s="",n=!1;for(let o=0;o<t.length;o++){const r=t.charAt(o);if(/[0-9]/.test(r)){if(s+=r,!Boolean(this.dialCodeToIso2Map[s]))break;if(this.dialCodes.has(s)){if(i=t.substring(0,o+1),n=!0,!e)break}else e&&n&&(i=t.substring(0,o+1));if(s.length===this.dialCodeMaxLen)break}}}return i}_getFullNumber(t){const e=t||this.ui.telInput.value.trim(),{dialCode:i}=this.selectedCountryData;let s;const n=P(e);return s=this.options.separateDialCode&&!e.startsWith("+")&&i&&n?`+${i}`:"",s+e}_beforeSetNumber(t){const e=((t,e,i,s)=>{let n=t;if(i&&e){const t=" "===n[(e=`+${s.dialCode}`).length]||"-"===n[e.length]?e.length+1:e.length;n=n.substring(t)}return n})(t,this._getDialCode(t),this.options.separateDialCode,this.selectedCountryData);return this._cap(e)}_triggerCountryChange(){this._trigger("countrychange")}handleAutoCountry(){this.options.initialCountry===b&&j.autoCountry&&(this.defaultCountry=j.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h)||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}handleUtils(){j.utils&&(this.ui.telInput.value&&this._updateValFromNumber(this.ui.telInput.value),this.selectedCountryData.iso2&&(this._updatePlaceholder(),this._updateMaxLength())),this.resolveUtilsScriptPromise()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._closeDropdown(),this.abortController.abort(),this.abortController=null,this.ui.destroy(),j.instances instanceof Map?j.instances.delete(this.id):delete j.instances[this.id])}getExtension(){return j.utils?j.utils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}getNumber(t){if(j.utils){const{iso2:e}=this.selectedCountryData;return j.utils.formatNumber(this._getFullNumber(),e,t)}return""}getNumberType(){return j.utils?j.utils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(j.utils){const{iso2:t}=this.selectedCountryData;return j.utils.getValidationError(this._getFullNumber(),t)}return-99}isValidNumber(){const{dialCode:t,iso2:e}=this.selectedCountryData;if("44"===t&&j.utils){const t=this._getFullNumber(),i=j.utils.getCoreNumber(t,e);if("7"===i[0]&&10!==i.length)return!1}return this._validateNumber(!1)}isValidNumberPrecise(){return this._validateNumber(!0)}_utilsIsPossibleNumber(t){return j.utils?j.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_validateNumber(t){if(!j.utils)return null;if(!this.selectedCountryData.iso2)return!1;const e=e=>t?this._utilsIsValidNumber(e):this._utilsIsPossibleNumber(e),i=this._getFullNumber(),s=i.search(y.ALPHA_UNICODE);if(s>-1&&!this.options.allowPhonewords){const t=e(i.substring(0,s)),n=e(i);return t&&n}return e(i)}_utilsIsValidNumber(t){return j.utils?j.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){const e=t?.toLowerCase();if(!F(e))throw new Error(`Invalid country code: '${e}'`);const i=this.selectedCountryData.iso2;(t&&e!==i||!t&&i)&&(this._setCountry(e),this._updateDialCode(this.selectedCountryData.dialCode),this.options.formatOnDisplay&&this._updateValFromNumber(this.ui.telInput.value),this._triggerCountryChange())}setNumber(t){const e=this._updateCountryFromNumber(t);this._updateValFromNumber(t),e&&this._triggerCountryChange(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._updatePlaceholder()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},z=(t,...e)=>{Object.values(j.instances).forEach(i=>{const s=i[t];"function"==typeof s&&s.apply(i,e)})},j=Object.assign((t,e)=>{const i=new W(t,e);return j.instances[i.id]=i,t.iti=i,i},{defaults:k,documentReady:()=>"complete"===document.readyState,getCountryData:()=>r,getInstance:t=>{const e=t.dataset.intlTelInputId;return e?j.instances[e]:null},instances:{},attachUtils:t=>{if(!j.utils&&!j.startedLoadingUtilsScript){let e;if("function"!=typeof t)return Promise.reject(new TypeError("The argument passed to attachUtils must be a function that returns a promise for the utilities module, not "+typeof t));try{e=Promise.resolve(t())}catch(t){return Promise.reject(t)}return j.startedLoadingUtilsScript=!0,e.then(t=>{const e=t?.default;if(!e||"object"!=typeof e)throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return j.utils=e,z("handleUtils"),!0}).catch(t=>{throw z("rejectUtilsScriptPromise",t),t})}return null},startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.12.5"}),H=j;return O=n,((n,o,r,l)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let r of i(o))s.call(n,r)||undefined===r||t(n,r,{get:()=>o[r],enumerable:!(l=e(o,r))||l.enumerable});return n})(t({},"__esModule",{value:!0}),O)})();return t.default},t.exports?t.exports=e():window.intlTelInput=e()}}]);