"use strict";(()=>{var U0=Object.create;var e0=Object.defineProperty;var F0=Object.getOwnPropertyDescriptor;var G0=Object.getOwnPropertyNames;var W0=Object.getPrototypeOf,V0=Object.prototype.hasOwnProperty;var K0=(c,a)=>()=>(c&&(a=c(c=0)),a);var j0=(c,a)=>()=>(a||c((a={exports:{}}).exports,a),a.exports),z0=(c,a)=>{for(var g in a)e0(c,g,{get:a[g],enumerable:!0})},Y0=(c,a,g,E)=>{if(a&&typeof a=="object"||typeof a=="function")for(let _ of G0(a))!V0.call(c,_)&&_!==g&&e0(c,_,{get:()=>a[_],enumerable:!(E=F0(a,_))||E.enumerable});return c};var q0=(c,a,g)=>(g=c!=null?U0(W0(c)):{},Y0(a||!c||!c.__esModule?e0(g,"default",{value:c,enumerable:!0}):g,c));var T0=j0((v2,K1)=>{(function(c){typeof K1=="object"&&K1.exports?K1.exports=c():window.intlTelInput=c()})(()=>{var c=(()=>{var a=Object.defineProperty,g=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,_=Object.prototype.hasOwnProperty,y=(l,e)=>{for(var n in e)a(l,n,{get:e[n],enumerable:!0})},P=(l,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let $ of E(e))!_.call(l,$)&&$!==n&&a(l,$,{get:()=>e[$],enumerable:!(r=g(e,$))||r.enumerable});return l},k=l=>P(a({},"__esModule",{value:!0}),l),v={};y(v,{Iti:()=>H1,default:()=>C1});var L=[["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"]],D=[];for(let l of L)D.push({name:"",iso2:l[0],dialCode:l[1],priority:l[2]||0,areaCodes:l[3]||null,nodeById:{},nationalPrefix:l[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var F=D,R={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"},n1=R,$1={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"},s1=$1,i1={...n1,...s1},U=i1,O={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},N={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"},q={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},D1={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},G={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},x1={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},Z={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},f1={SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6},b={PLUS:"+",NANP:"1"},x={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},X={ISO2:"us",DIAL_CODE:"1"},l1={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},K={AUTO:"auto"},S1={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},M={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"},m1=l=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(l).matches,M1=()=>{if(typeof navigator<"u"&&typeof window<"u"){let l=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),e=m1("(max-width: 500px)"),n=m1("(max-height: 600px)"),r=m1("(pointer: coarse)");return l||e||r&&n}return!1},_1={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:l1.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:M1(),validationNumberTypes:["MOBILE"]},y1=(l,e)=>{l.useFullscreenPopup&&(l.fixDropdownWidth=!1),l.onlyCountries.length===1&&(l.initialCountry=l.onlyCountries[0]),l.separateDialCode&&(l.nationalMode=!1),l.allowDropdown&&!l.showFlags&&!l.separateDialCode&&(l.nationalMode=!1),l.useFullscreenPopup&&!l.dropdownContainer&&(l.dropdownContainer=document.body),l.i18n={...e,...l.i18n}},W=l=>l.replace(/\D/g,""),J=(l="")=>l.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),u1=(l,e)=>{let n=J(e),r=[],$=[],f=[],h=[],C=[],w=[];for(let A of l)A.iso2===n?r.push(A):A.normalisedName.startsWith(n)?$.push(A):A.normalisedName.includes(n)?f.push(A):n===A.dialCode||n===A.dialCodePlus?h.push(A):A.dialCodePlus.includes(n)?C.push(A):A.initials.includes(n)&&w.push(A);let S=(A,V)=>A.priority-V.priority;return[...r.sort(S),...$.sort(S),...f.sort(S),...h.sort(S),...C.sort(S),...w.sort(S)]},P1=(l,e)=>{let n=e.toLowerCase();for(let r of l)if(r.name.toLowerCase().startsWith(n))return r;return null},B=l=>Object.keys(l).filter(e=>!!l[e]).join(" "),H=(l,e,n)=>{let r=document.createElement(l);return e&&Object.entries(e).forEach(([$,f])=>r.setAttribute($,f)),n&&n.appendChild(r),r},c1=()=>` `,R1=l=>{let e=`iti-${l}-clear-mask`;return` `},a1=class{constructor(l,e,n){this.highlightedItem=null,l.dataset.intlTelInputId=n.toString(),this.telInput=l,this.options=e,this.id=n,this.hadInitialPlaceholder=!!l.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.originalPaddingLeft=this.telInput.style.paddingLeft)}generateMarkup(l){this.countries=l,this._prepareTelInput();let 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(){let{allowDropdown:l,showFlags:e,containerClass:n,useFullscreenPopup:r}=this.options,$=B({iti:!0,"iti--allow-dropdown":l,"iti--show-flags":e,"iti--inline-dropdown":!r,[n]:!!n}),f=H("div",{class:$});return this.isRTL&&f.setAttribute("dir","ltr"),this.telInput.before(f),f}_maybeBuildCountryContainer(l){let{allowDropdown:e,separateDialCode:n,showFlags:r}=this.options;if(e||r||n){this.countryContainer=H("div",{class:`iti__country-container ${N.V_HIDE}`},l),e?(this.selectedCountry=H("button",{type:"button",class:"iti__selected-country",[M.EXPANDED]:"false",[M.LABEL]:this.options.i18n.noCountrySelected,[M.HASPOPUP]:"dialog",[M.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=H("div",{class:"iti__selected-country"},this.countryContainer);let $=H("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=H("div",{class:N.FLAG},$),e&&(this.dropdownArrow=H("div",{class:"iti__arrow",[M.HIDDEN]:"true"},$)),n&&(this.selectedDialCode=H("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._buildDropdownContent()}}_buildDropdownContent(){let{fixDropdownWidth:l,useFullscreenPopup:e,countrySearch:n,i18n:r,dropdownContainer:$,containerClass:f}=this.options,h=l?"":"iti--flexible-dropdown-width";if(this.dropdownContent=H("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${N.HIDE} ${h}`,role:"dialog",[M.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),n&&this._buildSearchUI(),this.countryList=H("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[M.LABEL]:r.countryListAriaLabel},this.dropdownContent),this._appendListItems(),n&&this.updateSearchResultsA11yText(),$){let C=B({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[f]:!!f});this.dropdown=H("div",{class:C}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_buildSearchUI(){let{i18n:l}=this.options,e=H("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=H("span",{class:"iti__search-icon",[M.HIDDEN]:"true"},e),this.searchIcon.innerHTML=c1(),this.searchInput=H("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:l.searchPlaceholder,role:"combobox",[M.EXPANDED]:"true",[M.LABEL]:l.searchPlaceholder,[M.CONTROLS]:`iti-${this.id}__country-listbox`,[M.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.searchClearButton=H("button",{type:"button",class:`iti__search-clear ${N.HIDE}`,[M.LABEL]:l.clearSearchAriaLabel,tabindex:"-1"},e),this.searchClearButton.innerHTML=R1(this.id),this.searchResultsA11yText=H("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=H("div",{class:`iti__no-results ${N.HIDE}`,[M.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=l.zeroSearchResults}_maybeUpdateInputPaddingAndReveal(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(N.V_HIDE))}_maybeBuildHiddenInputs(l){let{hiddenInput:e}=this.options;if(e){let n=this.telInput.getAttribute("name")||"",r=e(n);if(r.phone){let $=this.telInput.form?.querySelector(`input[name="${r.phone}"]`);$?this.hiddenInput=$:(this.hiddenInput=H("input",{type:"hidden",name:r.phone}),l.appendChild(this.hiddenInput))}if(r.country){let $=this.telInput.form?.querySelector(`input[name="${r.country}"]`);$?this.hiddenInputCountry=$:(this.hiddenInputCountry=H("input",{type:"hidden",name:r.country}),l.appendChild(this.hiddenInputCountry))}}}_appendListItems(){let l=document.createDocumentFragment();for(let e=0;ef){let A=r-h;e.scrollTop=S-A}}highlightListItem(l,e){let n=this.highlightedItem;if(n&&(n.classList.remove(N.HIGHLIGHT),n.setAttribute(M.SELECTED,"false")),this.highlightedItem=l,this.highlightedItem&&(this.highlightedItem.classList.add(N.HIGHLIGHT),this.highlightedItem.setAttribute(M.SELECTED,"true"),this.options.countrySearch)){let r=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(M.ACTIVE_DESCENDANT,r)}e&&this.highlightedItem.focus()}filterCountries(l){this.countryList.innerHTML="";let e=!0;for(let n of l){let r=n.nodeById[this.id];r&&(this.countryList.appendChild(r),e&&(this.highlightListItem(r,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(N.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(N.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 l=this.telInput.parentNode;l.before(this.telInput),l.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(let e of this.countries)delete e.nodeById[this.id];this.countries=null}},k1=l=>{let{onlyCountries:e,excludeCountries:n}=l;if(e.length){let r=e.map($=>$.toLowerCase());return F.filter($=>r.includes($.iso2))}else if(n.length){let r=n.map($=>$.toLowerCase());return F.filter($=>!r.includes($.iso2))}return F},z1=(l,e)=>{for(let n of l){let r=n.iso2.toLowerCase();e.i18n[r]&&(n.name=e.i18n[r])}},E1=(l,e)=>{let n=new Set,r=0,$={},f=(h,C,w)=>{if(!h||!C)return;C.length>r&&(r=C.length),$.hasOwnProperty(C)||($[C]=[]);let S=$[C];if(S.includes(h))return;let A=w!==void 0?w:S.length;S[A]=h};for(let h of l){n.has(h.dialCode)||n.add(h.dialCode);for(let C=1;C{$[h]=$[h].filter(Boolean)});for(let h of l)if(h.areaCodes){let C=$[h.dialCode][0];for(let w of h.areaCodes){for(let S=1;S{e.countryOrder&&(e.countryOrder=e.countryOrder.map(n=>n.toLowerCase())),l.sort((n,r)=>{let{countryOrder:$}=e;if($){let f=$.indexOf(n.iso2),h=$.indexOf(r.iso2),C=f>-1,w=h>-1;if(C||w)return C&&w?f-h:C?-1:1}return n.name.localeCompare(r.name)})},j=l=>{for(let e of l)e.normalisedName=J(e.name),e.initials=e.normalisedName.split(/[^a-z]/).map(n=>n[0]).join(""),e.dialCodePlus=`+${e.dialCode}`},T1=(l,e,n,r)=>{let $=l;if(n&&e){e=`+${r.dialCode}`;let f=$[e.length]===" "||$[e.length]==="-"?e.length+1:e.length;$=$.substring(f)}return $},Y1=(l,e,n,r,$)=>{let f=n?n.formatNumberAsYouType(l,r.iso2):l,{dialCode:h}=r;return $&&e.charAt(0)!=="+"&&f.includes(`+${h}`)?(f.split(`+${h}`)[1]||"").trim():f},q1=(l,e,n,r)=>{if(n===0&&!r)return 0;let $=0;for(let f=0;f{let e=W(l);if(e.startsWith(b.NANP)&&e.length>=4){let n=e.substring(1,4);return Z1.includes(n)}return!1};for(let l of F)l.name=U[l.iso2];var B1=0,X1=new Set(F.map(l=>l.iso2)),N1=l=>X1.has(l),H1=class S0{constructor(e,n={}){this.id=B1++,this.options={..._1,...n},y1(this.options,U),this.ui=new a1(e,this.options,this.id),this.isAndroid=S0._getIsAndroid(),this.promise=this._createInitPromises(),this.countries=k1(this.options);let{dialCodes:r,dialCodeMaxLen:$,dialCodeToIso2Map:f}=E1(this.countries,this.options);this.dialCodes=r,this.dialCodeMaxLen=$,this.dialCodeToIso2Map=f,this.countryByIso2=new Map(this.countries.map(h=>[h.iso2,h])),this._init()}static _getIsAndroid(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_createInitPromises(){let e=new Promise((r,$)=>{this.resolveAutoCountryPromise=r,this.rejectAutoCountryPromise=$}),n=new Promise((r,$)=>{this.resolveUtilsScriptPromise=r,this.rejectUtilsScriptPromise=$});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(){z1(this.countries,this.options),O1(this.countries,this.options),j(this.countries)}_setInitialState(e=!1){let n=this.ui.telInput.getAttribute("value"),r=this.ui.telInput.value,f=n&&n.startsWith("+")&&(!r||!r.startsWith("+"))?n:r,h=this._getDialCode(f),C=g1(f),{initialCountry:w,geoIpLookup:S}=this.options,A=w===K.AUTO&&S;if(h&&!C)this._updateCountryFromNumber(f);else if(!A||e){let V=w?w.toLowerCase():"";N1(V)?this._setCountry(V):h&&C?this._setCountry(X.ISO2):this._setCountry("")}f&&this._updateValFromNumber(f)}_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=h=>{this.ui.dropdownContent.classList.contains(N.HIDE)?this.ui.telInput.focus():h.preventDefault()},r=this.ui.telInput.closest("label");r&&r.addEventListener("click",n,{signal:e});let $=()=>{this.ui.dropdownContent.classList.contains(N.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._openDropdown()};this.ui.selectedCountry.addEventListener("click",$,{signal:e});let f=h=>{this.ui.dropdownContent.classList.contains(N.HIDE)&&[q.ARROW_UP,q.ARROW_DOWN,q.SPACE,q.ENTER].includes(h.key)&&(h.preventDefault(),h.stopPropagation(),this._openDropdown()),h.key===q.TAB&&this._closeDropdown()};this.ui.countryContainer.addEventListener("keydown",f,{signal:e})}_initRequests(){let{loadUtils:e,initialCountry:n,geoIpLookup:r}=this.options;if(e&&!I.utils){let f=()=>{I.attachUtils(e)?.catch(()=>{})};if(I.documentReady())f();else{let h=()=>{f()};window.addEventListener("load",h,{signal:this.abortController.signal})}}else this.resolveUtilsScriptPromise();n===K.AUTO&&r&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){I.autoCountry?this.handleAutoCountry():I.startedLoadingAutoCountry||(I.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((e="")=>{let n=e.toLowerCase();N1(n)?(I.autoCountry=n,setTimeout(()=>b1("handleAutoCountry"))):(this._setInitialState(!0),b1("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),b1("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.ui.searchInput.value="+",this._filterCountriesByQuery("")}_initTelInputListeners(){this._bindInputListener(),this._maybeBindKeydownListener(),this._maybeBindPasteListener()}_bindInputListener(){let{strictMode:e,formatAsYouType:n,separateDialCode:r,allowDropdown:$,countrySearch:f}=this.options,h=!1;G.ALPHA_UNICODE.test(this.ui.telInput.value)&&(h=!0);let C=w=>{if(this.isAndroid&&w?.data==="+"&&r&&$&&f){let z=this.ui.telInput.selectionStart||0,t1=this.ui.telInput.value.substring(0,z-1),r1=this.ui.telInput.value.substring(z);this.ui.telInput.value=t1+r1,this._openDropdownWithPlus();return}this._updateCountryFromNumber(this.ui.telInput.value)&&this._triggerCountryChange();let S=w?.data&&G.NON_PLUS_NUMERIC.test(w.data),A=w?.inputType===D1.PASTE&&this.ui.telInput.value;S||A&&!e?h=!0:G.NON_PLUS_NUMERIC.test(this.ui.telInput.value)||(h=!1);let V=w?.detail&&w.detail.isSetNumber;if(n&&!h&&!V){let z=this.ui.telInput.selectionStart||0,r1=this.ui.telInput.value.substring(0,z).replace(G.NON_PLUS_NUMERIC_GLOBAL,"").length,o1=w?.inputType===D1.DELETE_FWD,Q=this._getFullNumber(),d1=Y1(Q,this.ui.telInput.value,I.utils,this.selectedCountryData,this.options.separateDialCode),Y=q1(r1,d1,z,o1);this.ui.telInput.value=d1,this.ui.telInput.setSelectionRange(Y,Y)}};this.ui.telInput.addEventListener("input",C,{signal:this.abortController.signal})}_maybeBindKeydownListener(){let{strictMode:e,separateDialCode:n,allowDropdown:r,countrySearch:$}=this.options;if(e||n){let f=h=>{if(h.key&&h.key.length===1&&!h.altKey&&!h.ctrlKey&&!h.metaKey){if(n&&r&&$&&h.key==="+"){h.preventDefault(),this._openDropdownWithPlus();return}if(e){let C=this.ui.telInput.value,S=!C.startsWith("+")&&this.ui.telInput.selectionStart===0&&h.key==="+",A=/^[0-9]$/.test(h.key),V=n?A:S||A,z=C.slice(0,this.ui.telInput.selectionStart)+h.key+C.slice(this.ui.telInput.selectionEnd),t1=this._getFullNumber(z),r1=I.utils.getCoreNumber(t1,this.selectedCountryData.iso2),o1=this.maxCoreNumberLength&&r1.length>this.maxCoreNumberLength,d1=this._getNewCountryFromNumber(t1)!==null;(!V||o1&&!d1&&!S)&&h.preventDefault()}}};this.ui.telInput.addEventListener("keydown",f,{signal:this.abortController.signal})}}_maybeBindPasteListener(){if(this.options.strictMode){let e=n=>{n.preventDefault();let r=this.ui.telInput,$=r.selectionStart,f=r.selectionEnd,h=r.value.slice(0,$),C=r.value.slice(f),w=this.selectedCountryData.iso2,S=n.clipboardData.getData("text"),A=$===0&&f>0,V=!r.value.startsWith("+")||A,z=S.replace(G.NON_PLUS_NUMERIC_GLOBAL,""),t1=z.startsWith("+"),r1=z.replace(/\+/g,""),o1=t1&&V?`+${r1}`:r1,Q=h+o1+C,d1=I.utils.getCoreNumber(Q,w);for(;d1.length===0&&Q.length>0;)Q=Q.slice(0,-1),d1=I.utils.getCoreNumber(Q,w);if(!d1)return;if(this.maxCoreNumberLength&&d1.length>this.maxCoreNumberLength)if(r.selectionEnd===r.value.length){let e1=d1.length-this.maxCoreNumberLength;Q=Q.slice(0,Q.length-e1)}else return;r.value=Q;let Y=$+o1.length;r.setSelectionRange(Y,Y),r.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 r=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});this.ui.telInput.dispatchEvent(r)}_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(N.HIDE),this.ui.selectedCountry.setAttribute(M.EXPANDED,"true"),this._setDropdownPosition(),n){let r=this.ui.countryList.firstElementChild;r&&(this.ui.highlightListItem(r,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._bindDropdownListeners(),this.ui.dropdownArrow.classList.add(N.ARROW_UP),this._trigger(O.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 r=()=>this._closeDropdown();window.addEventListener("scroll",r,{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=r=>{let $=r.target?.closest(`.${N.COUNTRY_ITEM}`);$&&this.ui.highlightListItem($,!1)};this.ui.countryList.addEventListener("mouseover",n,{signal:e})}_bindDropdownCountryClickListener(e){let n=r=>{let $=r.target?.closest(`.${N.COUNTRY_ITEM}`);$&&this._selectListItem($)};this.ui.countryList.addEventListener("click",n,{signal:e})}_bindDropdownClickOffListener(e){let n=r=>{!!r.target.closest(`#iti-${this.id}__dropdown-content`)||this._closeDropdown()};setTimeout(()=>{document.documentElement.addEventListener("click",n,{signal:e})},0)}_bindDropdownKeydownListener(e){let n="",r=null,$=f=>{[q.ARROW_UP,q.ARROW_DOWN,q.ENTER,q.ESC].includes(f.key)&&(f.preventDefault(),f.stopPropagation(),f.key===q.ARROW_UP||f.key===q.ARROW_DOWN?this._handleUpDownKey(f.key):f.key===q.ENTER?this._handleEnterKey():f.key===q.ESC&&this._closeDropdown()),!this.options.countrySearch&&G.HIDDEN_SEARCH_CHAR.test(f.key)&&(f.stopPropagation(),r&&clearTimeout(r),n+=f.key.toLowerCase(),this._searchForCountry(n),r=setTimeout(()=>{n=""},x1.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",$,{signal:e})}_bindDropdownSearchListeners(e){let n=()=>{let h=this.ui.searchInput.value.trim();this._filterCountriesByQuery(h),this.ui.searchInput.value?this.ui.searchClearButton.classList.remove(N.HIDE):this.ui.searchClearButton.classList.add(N.HIDE)},r=null,$=()=>{r&&clearTimeout(r),r=setTimeout(()=>{n(),r=null},100)};this.ui.searchInput.addEventListener("input",$,{signal:e});let f=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),n()};this.ui.searchClearButton.addEventListener("click",f,{signal:e})}_searchForCountry(e){let n=P1(this.countries,e);if(n){let r=n.nodeById[this.id];this.ui.highlightListItem(r,!1),this.ui.scrollTo(r)}}_filterCountriesByQuery(e){let n;e===""?n=this.countries:n=u1(this.countries,e),this.ui.filterCountries(n)}_handleUpDownKey(e){let n=e===q.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!n&&this.ui.countryList.childElementCount>1&&(n=e===q.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&&I.utils&&this.selectedCountryData){let r=this.options.nationalMode||!n.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:$,INTERNATIONAL:f}=I.utils.numberFormat,h=r?$:f;n=I.utils.formatNumber(n,this.selectedCountryData.iso2,h)}n=this._beforeSetNumber(n),this.ui.telInput.value=n}_updateCountryFromNumber(e){let n=this._getNewCountryFromNumber(e);return n!==null?this._setCountry(n):!1}_ensureHasDialCode(e){let{dialCode:n,nationalPrefix:r}=this.selectedCountryData;if(e.startsWith("+")||!n)return e;let h=r&&e.startsWith(r)&&!this.options.separateDialCode?e.substring(1):e;return`+${n}${h}`}_getNewCountryFromNumber(e){let n=e.indexOf("+"),r=n?e.substring(n):e,$=this.selectedCountryData.iso2,f=this.selectedCountryData.dialCode;r=this._ensureHasDialCode(r);let h=this._getDialCode(r,!0),C=W(r);if(h){let w=W(h),S=this.dialCodeToIso2Map[w];if(S.length===1)return S[0]===$?null:S[0];if(!$&&this.defaultCountry&&S.includes(this.defaultCountry))return this.defaultCountry;if(f===b.NANP&&g1(C))return null;let{areaCodes:V,priority:z}=this.selectedCountryData;if(V){let d1=V.map(Y=>`${f}${Y}`);for(let Y of d1)if(C.startsWith(Y))return null}let r1=V&&!(z===0)&&C.length>w.length,o1=$&&S.includes($)&&!r1,Q=$===S[0];if(!o1&&!Q)return S[0]}else if(r.startsWith("+")&&C.length){let w=this.selectedCountryData.dialCode||"";return w&&w.startsWith(C)?null:""}else if((!r||r==="+")&&!$)return this.defaultCountry;return null}_setCountry(e){let{separateDialCode:n,showFlags:r,i18n:$}=this.options,f=this.selectedCountryData.iso2||"";if(this.selectedCountryData=e?this.countryByIso2.get(e):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.ui.selectedCountry){let h=e&&r?`${N.FLAG} iti__${e}`:`${N.FLAG} ${N.GLOBE}`,C,w;if(e){let{name:S,dialCode:A}=this.selectedCountryData;w=S,C=$.selectedCountryAriaLabel.replace("${countryName}",S).replace("${dialCode}",`+${A}`)}else w=$.noCountrySelected,C=$.noCountrySelected;this.ui.selectedCountryInner.className=h,this.ui.selectedCountry.setAttribute("title",w),this.ui.selectedCountry.setAttribute(M.LABEL,C)}if(n){let h=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=h,this.ui.updateInputPadding()}return this._updatePlaceholder(),this._updateMaxLength(),f!==e}_updateMaxLength(){let{strictMode:e,placeholderNumberType:n,validationNumberTypes:r}=this.options,{iso2:$}=this.selectedCountryData;if(e&&I.utils)if($){let f=I.utils.numberType[n],h=I.utils.getExampleNumber($,!1,f,!0),C=h;for(;I.utils.isPossibleNumber(h,$,r);)C=h,h+="0";let w=I.utils.getCoreNumber(C,$);this.maxCoreNumberLength=w.length,$==="by"&&(this.maxCoreNumberLength=w.length+1)}else this.maxCoreNumberLength=null}_updatePlaceholder(){let{autoPlaceholder:e,placeholderNumberType:n,nationalMode:r,customPlaceholder:$}=this.options,f=e===l1.AGGRESSIVE||!this.ui.hadInitialPlaceholder&&e===l1.POLITE;if(I.utils&&f){let h=I.utils.numberType[n],C=this.selectedCountryData.iso2?I.utils.getExampleNumber(this.selectedCountryData.iso2,r,h):"";C=this._beforeSetNumber(C),typeof $=="function"&&(C=$(C,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",C)}}_selectListItem(e){let n=e.dataset[S1.COUNTRY_CODE],r=this._setCountry(n);this._closeDropdown();let $=e.dataset[S1.DIAL_CODE];this._updateDialCode($),this.options.formatOnDisplay&&this._updateValFromNumber(this.ui.telInput.value),this.ui.telInput.focus(),r&&this._triggerCountryChange()}_closeDropdown(){this.ui.dropdownContent.classList.contains(N.HIDE)||(this.ui.dropdownContent.classList.add(N.HIDE),this.ui.selectedCountry.setAttribute(M.EXPANDED,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(M.SELECTED,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(M.ACTIVE_DESCENDANT),this.ui.dropdownArrow.classList.remove(N.ARROW_UP),this.dropdownAbortController.abort(),this.dropdownAbortController=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._trigger(O.CLOSE_COUNTRY_DROPDOWN))}_updateDialCode(e){let n=this.ui.telInput.value,r=`+${e}`,$;if(n.startsWith("+")){let f=this._getDialCode(n);f?$=n.replace(f,r):$=r,this.ui.telInput.value=$}}_getDialCode(e,n){let r="";if(e.startsWith("+")){let $="",f=!1;for(let h=0;he?this._utilsIsValidNumber(h):this._utilsIsPossibleNumber(h),r=this._getFullNumber(),$=r.search(G.ALPHA_UNICODE);if($>-1&&!this.options.allowPhonewords){let h=r.substring(0,$),C=n(h),w=n(r);return C&&w}return n(r)}_utilsIsValidNumber(e){return I.utils?I.utils.isValidNumber(e,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(e){let n=e?.toLowerCase();if(!N1(n))throw new Error(`Invalid country code: '${n}'`);let r=this.selectedCountryData.iso2;(e&&n!==r||!e&&r)&&(this._setCountry(n),this._updateDialCode(this.selectedCountryData.dialCode),this.options.formatOnDisplay&&this._updateValFromNumber(this.ui.telInput.value),this._triggerCountryChange())}setNumber(e){let n=this._updateCountryFromNumber(e);this._updateValFromNumber(e),n&&this._triggerCountryChange(),this._trigger(O.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")}},J1=l=>{if(!I.utils&&!I.startedLoadingUtilsScript){let e;if(typeof l=="function")try{e=Promise.resolve(l())}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 l}`));return I.startedLoadingUtilsScript=!0,e.then(n=>{let r=n?.default;if(!r||typeof r!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return I.utils=r,b1("handleUtils"),!0}).catch(n=>{throw b1("rejectUtilsScriptPromise",n),n})}return null},b1=(l,...e)=>{Object.values(I.instances).forEach(n=>{let r=n[l];typeof r=="function"&&r.apply(n,e)})},I=Object.assign((l,e)=>{let n=new H1(l,e);return I.instances[n.id]=n,l.iti=n,n},{defaults:_1,documentReady:()=>document.readyState==="complete",getCountryData:()=>F,getInstance:l=>{let e=l.dataset.intlTelInputId;return e?I.instances[e]:null},instances:{},attachUtils:J1,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.12.5"}),C1=I;return k(v)})();return c.default})});var A0={};z0(A0,{default:()=>s2});var N0,$2,s2,D0=K0(()=>{(function(){var c=this||self;function a(d,t){d=d.split(".");var i=c;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 g(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,u){for(var p=Array(arguments.length-2),m=2;md.length?!1:h1(n,d)}function h(d){return h1(J1,d)?S(d,q1):S(d,T1)}function C(d){var t=h(d.toString());J(d),d.g(t)}function w(d){return d!=null&&(l1(d,9)!=1||X(d,9)[0]!=-1)}function S(d,t){for(var i=new W,o,s=d.length,u=0;ut?2:u[u.length-1]=s&&s<=o;++s)if(i=parseInt(d.substring(0,s),10),i in E1)return t.g(d.substring(s)),i;return 0}function o0(d,t,i,o,s,u){if(t.length==0)return 0;t=new W(t);var p;i!=null&&(p=b(i,11)),p==null&&(p="NonMatch");var m=t.toString();if(m.length==0)p=20;else if(g1.test(m))m=m.replace(g1,""),J(t),t.g(h(m)),p=1;else{if(m=new RegExp(p),C(t),p=t.toString(),p.search(m)==0){m=p.match(m)[0].length;var T=p.substring(m).match(B1);T&&T[1]!=null&&0=t.h.length)throw Error("Phone number too short after IDD");if(d=r0(t,o),d!=0)return K(u,1,d),d;throw Error("Invalid country calling code")}return i!=null&&(p=x(i,10),m=""+p,T=t.toString(),T.lastIndexOf(m,0)==0&&(m=new W(T.substring(m.length)),T=b(i,1),T=new RegExp(x(T,2)),$0(m,i,null),m=m.toString(),!h1(T,t.toString())&&h1(T,m)||U1(d,t.toString(),i,-1)==3))?(o.g(m),s&&K(u,6,10),K(u,1,p),p):(K(u,1,0),0)}function $0(d,t,i){var o=d.toString(),s=o.length,u=b(t,15);if(s!=0&&u!=null&&u.length!=0){var p=new RegExp("^(?:"+u+")");if(s=p.exec(o)){u=new RegExp(x(b(t,1),2));var m=h1(u,o),T=s.length-1;t=b(t,16),t==null||t.length==0||s[T]==null||s[T].length==0?(!m||h1(u,o.substring(s[0].length)))&&(i!=null&&0=t.length)u="";else{var p=t.indexOf(";",u);u=p!==-1?t.substring(u,p):t.substring(u)}var m=u;if(m==null?p=!0:m.length===0?p=!1:(p=b1.exec(m),m=I.exec(m),p=p!==null||m!==null),!p||(u!=null?(u.charAt(0)==="+"&&s.g(u),u=t.indexOf("tel:"),s.g(t.substring(0<=u?u+4:0,t.indexOf(";phone-context=")))):(u=s.g,p=t??"",m=p.search(X1),0<=m?(p=p.substring(m),p=p.replace(H1,""),m=p.search(N1),0<=m&&(p=p.substring(0,m))):p="",u.call(s,p)),u=s.toString(),p=u.indexOf(";isub="),0t.h.length||(p!=null&&(i=new W,s=new W(t.toString()),$0(s,p,i),d=U1(d,s.toString(),p,-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)},d0={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};a("intlTelInputUtilsTemp",{}),a("intlTelInputUtilsTemp.formatNumberAsYouType",(d,t)=>{try{let i=d.replace(/[^+0-9]/g,""),o=new O0(t);t="";for(let s=0;s{try{let s=j.g(),u=v1(s,d,t);var o=F1(s,u,-1);return o==0||o==4?s.format(u,typeof i>"u"?0:i):d}catch{return d}}),a("intlTelInputUtilsTemp.getExampleNumber",(d,t,i,o)=>{try{let T=j.g();d:{var s=T;if(V(d)){var u=o1(Y(s,d),i);try{if(Z(u,6)){var p=b(u,6),m=s0(s,p,d,!1);break d}}catch{}}m=null}return T.format(m,o?0:t?2:1)}catch{return""}}),a("intlTelInputUtilsTemp.getExtension",(d,t)=>{try{return b(v1(j.g(),d,t),3)}catch{return""}}),a("intlTelInputUtilsTemp.getNumberType",(d,t)=>{try{let i=j.g(),o=v1(i,d,t);return Q(i,o)}catch{return-99}}),a("intlTelInputUtilsTemp.getValidationError",(d,t)=>{if(!t)return 1;try{let i=j.g(),o=v1(i,d,t);return F1(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}}),a("intlTelInputUtilsTemp.isValidNumber",(d,t,i)=>{try{let o=j.g(),s=v1(o,d,t),u=k0(o,s);if(i){let p=b0(i).map(m=>d0[m]);return u&&p.includes(Q(o,s))}return u}catch{return!1}}),a("intlTelInputUtilsTemp.isPossibleNumber",(d,t,i)=>{try{let o=j.g(),s=v1(o,d,t);if(i){let u=b0(i);for(let p of u)if(F1(o,s,d0[p])===0)return!0;return!1}return F1(o,s,-1)===0}catch{return!1}}),a("intlTelInputUtilsTemp.getCoreNumber",(d,t)=>{try{return b(v1(j.g(),d,t),2).toString()}catch{return""}}),a("intlTelInputUtilsTemp.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3}),a("intlTelInputUtilsTemp.numberType",d0),a("intlTelInputUtilsTemp.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5})})();N0=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:void 0,$2=N0.intlTelInputUtilsTemp;delete N0.intlTelInputUtilsTemp;s2=$2});var V1={MAIN:"article-cta-card",EDIT:"article-cta-card-edit"},I1={COPY_HTML:"copy-html",VISIBILITY:"visibility",RICH_TEXT:"rich-text",LINK:"link"};function v0(c,a){let g=c.getAttribute(V1.MAIN);return g?g.split(",").map(_=>_.trim().toLowerCase()).includes(a.toLowerCase()):!1}function L1(c,a=document){let g=a.querySelectorAll(`[${V1.MAIN}]`);return Array.from(g).filter(E=>v0(E,c))}var w1={copy:'',check:'',trash:'',edit:'',link:''},Z0=` .article-cta-editor-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; opacity: 0.7; } .article-cta-editor-btn:hover { opacity: 1; transform: scale(1.05); } .article-cta-copy-btn { top: 8px; right: 8px; background: #10B981; color: white; z-index: 1001; } .article-cta-copy-btn.copied { background: #059669; } .article-cta-delete-btn { top: 4px; right: 4px; background: #EF4444; color: white; z-index: 1002; width: 24px; height: 24px; } .article-cta-delete-btn:hover { background: #DC2626; } .article-cta-link-btn { top: 4px; right: 32px; background: #8B5CF6; color: white; z-index: 1002; width: 24px; height: 24px; } .article-cta-link-btn:hover { background: #7C3AED; } .article-cta-edit-indicator { top: 8px; right: 48px; background: #3B82F6; color: white; pointer-events: none; z-index: 1000; } [article-cta-card*="copy-html"] { position: relative; } [article-cta-card*="visibility"] { position: relative; } [article-cta-card-edit] [contenteditable="true"] { outline: 2px dashed #3B82F6; outline-offset: 2px; cursor: text; } [article-cta-card-edit] [contenteditable="true"]:focus { outline: 2px solid #3B82F6; background: rgba(59, 130, 246, 0.05); } /* Markdown Editor Modal Styles */ .md-editor-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; opacity: 0; visibility: hidden; transition: all 0.2s ease; } .md-editor-overlay.active { opacity: 1; visibility: visible; } .md-editor-modal { background: white; border-radius: 12px; width: 90%; max-width: 800px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); transform: scale(0.95); transition: transform 0.2s ease; } .md-editor-overlay.active .md-editor-modal { transform: scale(1); } .md-editor-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #E5E7EB; } .md-editor-title { font-size: 18px; font-weight: 600; color: #111827; margin: 0; } .md-editor-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #6B7280; padding: 4px; line-height: 1; } .md-editor-close:hover { color: #111827; } .md-editor-toolbar { display: flex; gap: 4px; padding: 12px 20px; border-bottom: 1px solid #E5E7EB; flex-wrap: wrap; } .md-editor-toolbar-btn { background: #F3F4F6; border: 1px solid #D1D5DB; border-radius: 6px; padding: 8px 12px; cursor: pointer; font-size: 13px; font-weight: 500; color: #374151; transition: all 0.15s ease; } .md-editor-toolbar-btn:hover { background: #E5E7EB; border-color: #9CA3AF; } .md-editor-toolbar-btn.active { background: #3B82F6; color: white; border-color: #3B82F6; } .md-editor-body { display: flex; flex: 1; overflow: hidden; min-height: 300px; } .md-editor-input-wrap { flex: 1; display: flex; flex-direction: column; border-right: 1px solid #E5E7EB; } .md-editor-preview-wrap { flex: 1; display: flex; flex-direction: column; } .md-editor-label { font-size: 12px; font-weight: 500; color: #6B7280; padding: 8px 16px; background: #F9FAFB; border-bottom: 1px solid #E5E7EB; } .md-editor-textarea { flex: 1; border: none; resize: none; padding: 16px; font-family: 'Monaco', 'Menlo', monospace; font-size: 14px; line-height: 1.6; outline: none; } .md-editor-preview { flex: 1; padding: 16px; overflow-y: auto; font-size: 14px; line-height: 1.6; } .md-editor-preview h1 { font-size: 24px; font-weight: 700; margin: 0 0 16px; } .md-editor-preview h2 { font-size: 20px; font-weight: 600; margin: 16px 0 12px; } .md-editor-preview h3 { font-size: 16px; font-weight: 600; margin: 12px 0 8px; } .md-editor-preview p { margin: 0 0 12px; } .md-editor-preview ul, .md-editor-preview ol { margin: 0 0 12px; padding-left: 24px; } .md-editor-preview li { margin: 4px 0; } .md-editor-preview strong { font-weight: 600; } .md-editor-preview em { font-style: italic; } .md-editor-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid #E5E7EB; } .md-editor-btn { padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; } .md-editor-btn-cancel { background: white; border: 1px solid #D1D5DB; color: #374151; } .md-editor-btn-cancel:hover { background: #F3F4F6; } .md-editor-btn-save { background: #10B981; border: 1px solid #10B981; color: white; } .md-editor-btn-save:hover { background: #059669; border-color: #059669; } /* Rich text click hint */ [article-cta-card="rich-text"] { cursor: pointer; transition: outline 0.15s ease; } [article-cta-card-edit] [article-cta-card="rich-text"]:hover { outline: 2px dashed #8B5CF6; outline-offset: 2px; } `;function X0(){if(document.getElementById("article-cta-editor-styles"))return;let c=document.createElement("style");c.id="article-cta-editor-styles",c.textContent=Z0,document.head.appendChild(c)}function J0(c){let a=c.cloneNode(!0);return a.querySelectorAll(".article-cta-editor-btn").forEach(g=>g.remove()),a.querySelectorAll("[contenteditable]").forEach(g=>{g.removeAttribute("contenteditable")}),a.hasAttribute("article-cta-card-edit")&&a.removeAttribute("article-cta-card-edit"),a.querySelectorAll("*").forEach(g=>{let E=g;E.style&&(E.style.outline="",E.style.outlineOffset="")}),a.querySelectorAll('[style=""]').forEach(g=>{g.removeAttribute("style")}),a.outerHTML}function Q0(){L1(I1.COPY_HTML).forEach(a=>{let g=a;if(g.querySelector(".article-cta-copy-btn"))return;let E=document.createElement("button");E.className="article-cta-editor-btn article-cta-copy-btn",E.innerHTML=w1.copy,E.title="Copy HTML to clipboard",E.addEventListener("click",async _=>{_.preventDefault(),_.stopPropagation();let y=J0(g);try{await navigator.clipboard.writeText(y),E.innerHTML=w1.check,E.classList.add("copied"),setTimeout(()=>{E.innerHTML=w1.copy,E.classList.remove("copied")},2e3)}catch(P){console.error("Failed to copy HTML:",P),alert("Failed to copy HTML to clipboard")}}),g.appendChild(E)})}function d2(c){let a=c.parentElement;return a&&(a.classList.contains("w-dyn-item")||a.getAttribute("role")==="listitem")?a:c}function t2(){L1(I1.VISIBILITY).forEach(a=>{let g=a;if(g.querySelector(".article-cta-delete-btn"))return;let E=document.createElement("button");E.className="article-cta-editor-btn article-cta-delete-btn",E.innerHTML=w1.trash,E.title="Remove this element",E.addEventListener("click",_=>{_.preventDefault(),_.stopPropagation(),d2(g).remove()}),g.appendChild(E)})}function e2(){L1(I1.LINK).forEach(a=>{let g=a;if(g.querySelector(".article-cta-link-btn"))return;let E=g.tagName.toLowerCase()==="a",_=g.querySelector("a");if(!E&&!_)return;let y=document.createElement("button");y.className="article-cta-editor-btn article-cta-link-btn",y.innerHTML=w1.link,y.title="Edit link URL",y.addEventListener("click",P=>{P.preventDefault(),P.stopPropagation();let k=E?g:_;if(!k)return;let v=k.getAttribute("href")||"",L=prompt("Enter new URL:",v);L!==null&&L!==v&&(k.setAttribute("href",L),y.style.background="#10B981",setTimeout(()=>{y.style.background=""},1e3))}),g.appendChild(y)})}function W1(c){let a=c;a=a.replace(/&/g,"&").replace(//g,">"),a=a.replace(/^### (.+)$/gm,"

$1

"),a=a.replace(/^## (.+)$/gm,"

$1

"),a=a.replace(/^# (.+)$/gm,"

$1

"),a=a.replace(/\*\*\*(.+?)\*\*\*/g,"$1"),a=a.replace(/\*\*(.+?)\*\*/g,"$1"),a=a.replace(/\*(.+?)\*/g,"$1"),a=a.replace(/___(.+?)___/g,"$1"),a=a.replace(/__(.+?)__/g,"$1"),a=a.replace(/_(.+?)_/g,"$1");let g=/^[\-\*] (.+)$/gm,E,_=[],y=0,k=a.split(` `),v=!1,L=!1,D=[];for(let F=0;F'),v=!0),D.push(`
  • ${n1[1]}
  • `)):$1?(v&&(D.push(""),v=!1),L||(D.push('
      '),L=!0),D.push(`
    1. ${$1[1]}
    2. `)):(v&&(D.push(""),v=!1),L&&(D.push("
    "),L=!1),R.trim()&&!R.match(/^<[huo]/)?D.push(`

    ${R}

    `):R.trim()&&D.push(R))}return v&&D.push(""),L&&D.push(""),a=D.join(` `),a=a.replace(/

    <\/p>/g,""),a=a.replace(/

    \s*<\/p>/g,""),a}function n2(c){let a=document.createElement("div");a.innerHTML=c;let g="";function E(_){let y="";if(_.nodeType===Node.TEXT_NODE)return _.textContent||"";if(_.nodeType!==Node.ELEMENT_NODE)return"";let P=_,k=P.tagName.toLowerCase(),v=Array.from(P.childNodes).map(E).join("");switch(k){case"h1":y=`# ${v} `;break;case"h2":y=`## ${v} `;break;case"h3":y=`### ${v} `;break;case"p":y=`${v} `;break;case"strong":case"b":y=`**${v}**`;break;case"em":case"i":y=`*${v}*`;break;case"ul":y=v;break;case"ol":let L=0;y=Array.from(P.children).map(D=>(L++,`${L}. ${E(D).replace(/^- /,"")}`)).join(` `)+` `;break;case"li":y=`- ${v} `;break;case"br":y=` `;break;case"div":y=v;break;default:y=v}return y}return Array.from(a.childNodes).forEach(_=>{g+=E(_)}),g.trim()}function i2(){let c=null,a=null;function g(){let y=document.createElement("div");y.className="md-editor-overlay",y.innerHTML=`

    Rich Text Editor

    Markdown
    Preview
    `;let P=y.querySelector(".md-editor-close"),k=y.querySelector(".md-editor-btn-cancel"),v=y.querySelector(".md-editor-btn-save"),L=y.querySelector(".md-editor-textarea"),D=y.querySelector(".md-editor-preview"),F=y.querySelectorAll(".md-editor-toolbar-btn");return P.addEventListener("click",_),k.addEventListener("click",_),y.addEventListener("click",R=>{R.target===y&&_()}),v.addEventListener("click",()=>{c&&(c.innerHTML=W1(L.value),_())}),L.addEventListener("input",()=>{D.innerHTML=W1(L.value)}),F.forEach(R=>{R.addEventListener("click",()=>{let n1=R.getAttribute("data-action");if(!n1)return;let $1=L.selectionStart,s1=L.selectionEnd,i1=L.value,U=i1.substring($1,s1),O="",N=0;switch(n1){case"h1":O=`# ${U||"Heading 1"}`,N=U?O.length:2;break;case"h2":O=`## ${U||"Heading 2"}`,N=U?O.length:3;break;case"h3":O=`### ${U||"Heading 3"}`,N=U?O.length:4;break;case"bold":O=`**${U||"bold text"}**`,N=U?O.length:2;break;case"italic":O=`*${U||"italic text"}*`,N=U?O.length:1;break;case"ul":O=`- ${U||"List item"}`,N=U?O.length:2;break;case"ol":O=`1. ${U||"List item"}`,N=U?O.length:3;break}L.value=i1.substring(0,$1)+O+i1.substring(s1),L.focus(),D.innerHTML=W1(L.value)})}),document.addEventListener("keydown",R=>{R.key==="Escape"&&y.classList.contains("active")&&_()}),y}function E(y){c=y,a||(a=g(),document.body.appendChild(a));let P=a.querySelector(".md-editor-textarea"),k=a.querySelector(".md-editor-preview"),v=y.innerHTML,L=n2(v);P.value=L,k.innerHTML=W1(L),requestAnimationFrame(()=>{a.classList.add("active"),P.focus()})}function _(){a&&a.classList.remove("active"),c=null}return{open:E,close:_}}function r2(){let c=document.querySelectorAll(`[${V1.EDIT}]`),a=i2();c.forEach(g=>{let E=g,_=E.querySelectorAll("h1, h2, h3, h4, h5, h6, p, span, a, li");if(L1(I1.RICH_TEXT,E).forEach(v=>{v.addEventListener("click",L=>{L.preventDefault(),L.stopPropagation(),a.open(v)})}),_.forEach(v=>{let L=v.closest(`[${V1.MAIN}]`);if(L&&v0(L,I1.RICH_TEXT))return;let D=v;if(D.setAttribute("contenteditable","true"),v.tagName.toLowerCase()==="a"||v.closest("a")){v.addEventListener("click",R=>{R.preventDefault()});let F=v.closest("a");F&&F.addEventListener("click",R=>{R.preventDefault()})}D.addEventListener("paste",F=>{F.preventDefault();let R=F.clipboardData?.getData("text/plain")||"";document.execCommand("insertText",!1,R)})}),E.querySelectorAll("a").forEach(v=>{v.addEventListener("click",L=>{L.preventDefault()})}),L1(I1.LINK,E).forEach(v=>{v.addEventListener("click",L=>{L.preventDefault()})}),!E.querySelector(".article-cta-edit-indicator")){let v=document.createElement("div");v.className="article-cta-editor-btn article-cta-edit-indicator",v.innerHTML=w1.edit,v.title="Edit mode active",E.appendChild(v)}})}var o2="/cta---construcor",I0=()=>{!window.location.pathname.includes(o2)||L1(I1.COPY_HTML).length===0||(X0(),Q0(),t2(),e2(),r2())};var _0=()=>{let c=document.querySelector(".colored-cards-grid");if(!c)return;let a=c.querySelectorAll(".colored-cards-grid_item");if(!a.length)return;let g=c.getAttribute("colored-cards-grid-data"),E;g&&g.trim()?E=g.split(",").map(_=>{let y=_.trim();return y.startsWith("#")?y:`#${y}`}):E=["#E8E9EA","#FEFCE8","#E0F2FE","#FCE7F3","#E0F2E9","#D1D5DB"],a.forEach((_,y)=>{let P=y%E.length;_.style.backgroundColor=E[P]})};var w0=()=>{let c=document.getElementById("current-year");if(!c)return;let a=new Date().getFullYear();c.textContent=a.toString()};var L0=()=>{let c=document.querySelector("[el-menu-nav]"),a=document.querySelectorAll("[menu-dark]"),g=document.querySelectorAll("[menu-light]"),E=document.querySelector("[el-menu-logo-dark]"),_=document.querySelector("[el-menu-logo-light]");if(!c||a.length===0&&g.length===0)return;let y=c;y.style.transition="background-color 100ms ease",E&&(E.style.transition="opacity 100ms ease"),_&&(_.style.transition="opacity 100ms ease");let P=!1,k="default",v=()=>{let L=c.getBoundingClientRect(),D=L.top+window.scrollY,F=D+L.height,R=!1,n1=!1;for(let s1 of a){let i1=s1.getBoundingClientRect(),U=i1.top+window.scrollY,O=U+i1.height;if(DU){R=!0,s1.getAttribute("menu-dark")==="logo-light"&&(n1=!0);break}}if(!R)for(let s1 of g){let i1=s1.getBoundingClientRect(),U=i1.top+window.scrollY,O=U+i1.height;if(DU){s1.getAttribute("menu-light")==="logo-light"&&(n1=!0);break}}R!==P&&(P=R,P?y.style.backgroundColor="rgba(2, 39, 31, 0.29)":y.style.backgroundColor="");let $1=n1?"light":"default";$1!==k&&(k=$1,E&&_&&(k==="light"?(E.style.opacity="0",_.style.opacity="1"):(E.style.opacity="",_.style.opacity="")))};return v(),window.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{window.removeEventListener("scroll",v),window.removeEventListener("resize",v)}};var x0=q0(T0(),1),l2="[intl-tel-input_inner]",a2="https://cdn.jsdelivr.net/npm/intl-tel-input@25.12.5/build/css/intlTelInput.min.css",j1=new Map,M0=()=>{let c=document.querySelectorAll(l2);if(c.length!==0)return m2(),c.forEach(a=>u2(a)),()=>{j1.forEach(a=>a.destroy()),j1.clear()}};function u2(c){if(j1.has(c))return;let a=(0,x0.default)(c,{loadUtils:()=>Promise.resolve().then(()=>(D0(),A0)),initialCountry:"auto",geoIpLookup:(y,P)=>{fetch("https://ipapi.co/json").then(k=>{if(!k.ok)throw new Error("GeoIP request failed");return k.json()}).then(k=>{k.country_code?y(k.country_code):P()}).catch(()=>{P()})},countryOrder:["cz","de","gb","us","nl","at"],separateDialCode:!0,showFlags:!0,countrySearch:!0,nationalMode:!0,formatAsYouType:!0,autoPlaceholder:"aggressive",strictMode:!0,hiddenInput:()=>({phone:"phone_full",country:"phone_country"}),i18n:{searchPlaceholder:"Search country"}});j1.set(c,a),c.addEventListener("blur",()=>c2(c,a)),c.addEventListener("focus",()=>h2(c));let g=c.closest("form");g&&g.addEventListener("submit",y=>p2(y,c,a));let E,_=()=>{clearTimeout(E),E=setTimeout(()=>{let y=a.getSelectedCountryData();y.iso2&&a.setCountry(y.iso2)},150)};window.addEventListener("resize",_)}function c2(c,a){if(!c.value.trim()){R0(c);return}a.isValidNumber()?f2(c):P0(c)}function h2(c){R0(c)}function p2(c,a,g){if(!a.value.trim()&&!a.required)return;if(!g.isValidNumber()){c.preventDefault(),c.stopPropagation(),P0(a),a.focus();return}let _=g.getNumber();a.value=_}function f2(c){c.classList.remove("is-error"),c.classList.add("is-valid"),c.setCustomValidity("")}function P0(c){c.classList.remove("is-valid"),c.classList.add("is-error"),c.setCustomValidity("Please enter a valid phone number")}function R0(c){c.classList.remove("is-error","is-valid"),c.setCustomValidity("")}function m2(){if(!document.getElementById("intl-tel-input-css")){let c=document.createElement("link");c.id="intl-tel-input-css",c.rel="stylesheet",c.href=a2,c.media="all",document.head.appendChild(c)}if(!document.getElementById("intl-tel-input-custom-css")){let c=document.createElement("style");c.id="intl-tel-input-custom-css",c.textContent=` /* Container takes full width */ .iti { width: 100%; display: block; } /* Input takes full width */ .iti__tel-input { width: 100%; } /* Align country selector inside input */ .iti--allow-dropdown .iti__country-container { inset-inline-start: 0.5rem; } /* Round left corners on selector */ .iti__selected-country { border-radius: 0.375rem 0 0 0.375rem; } /* Validation states */ .iti .is-error { border-color: #dc3545 !important; } .iti .is-valid { border-color: #28a745 !important; } /* Dropdown z-index for Webflow */ .iti__dropdown-content { z-index: 9999; } /* Taller search input with space for magnifier icon */ .iti__search-input { height: 3rem !important; padding: 0.75rem 1rem 0.75rem 2.5rem !important; font-size: 1rem; } /* Add space between dial code and phone number input */ .iti__selected-dial-code { margin-right: 0.5rem !important; } `,document.head.appendChild(c)}}window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{L0(),w0(),_0(),M0(),I0()});})();