"use strict";
(globalThis["webpackChunkathemes_starter_sites"] = globalThis["webpackChunkathemes_starter_sites"] || []).push([["vendors-node_modules_react-international-phone_dist_index_css-node_modules_react-internationa-e45498"],{

/***/ "./node_modules/react-international-phone/dist/index.css":
/*!***************************************************************!*\
  !*** ./node_modules/react-international-phone/dist/index.css ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./node_modules/react-international-phone/dist/index.mjs":
/*!***************************************************************!*\
  !*** ./node_modules/react-international-phone/dist/index.mjs ***!
  \***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CountrySelector: () => (/* binding */ ae),
/* harmony export */   CountrySelectorDropdown: () => (/* binding */ ne),
/* harmony export */   DialCodePreview: () => (/* binding */ ie),
/* harmony export */   FlagImage: () => (/* binding */ q),
/* harmony export */   PhoneInput: () => (/* binding */ Ue),
/* harmony export */   buildCountryData: () => (/* binding */ De),
/* harmony export */   defaultCountries: () => (/* binding */ _),
/* harmony export */   getActiveFormattingMask: () => (/* binding */ Q),
/* harmony export */   getCountry: () => (/* binding */ $),
/* harmony export */   guessCountryByPartialPhoneNumber: () => (/* binding */ X),
/* harmony export */   parseCountry: () => (/* binding */ M),
/* harmony export */   removeDialCode: () => (/* binding */ ce),
/* harmony export */   usePhoneInput: () => (/* binding */ ee)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
var _=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["Andorra","ad","376"],["Angola","ao","244"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54",{default:"(..) .... ....","/^11/":"(..) .... ....","/^15/":"(..) ... ....","/^(2|3|4|5)/":"(.) .... ....","/^9/":"(.) .... ....."},0],["Armenia","am","374",".. ......"],["Aruba","aw","297"],["Australia","au","61",{default:". .... ....","/^4/":"... ... ...","/^5(?!50)/":"... ... ...","/^1(3|8)00/":".... ... ...","/^13/":".. .. ..","/^180/":"... ...."},0,[]],["Austria","at","43"],["Azerbaijan","az","994","(..) ... .. .."],["Bahamas","bs","1242"],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1246"],["Belarus","by","375","(..) ... .. .."],["Belgium","be","32","... .. .. .."],["Belize","bz","501"],["Benin","bj","229"],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55","(..) .....-...."],["British Indian Ocean Territory","io","246"],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599","",1],["Cayman Islands","ky","1","... ... ....",4,["345"]],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86","... .... ...."],["Colombia","co","57","... ... ...."],["Comoros","km","269"],["Congo","cd","243"],["Congo","cg","242"],["Costa Rica","cr","506","....-...."],["C\xF4te d'Ivoire","ci","225",".. .. .. .. .."],["Croatia","hr","385"],["Cuba","cu","53"],["Cura\xE7ao","cw","599","",0],["Cyprus","cy","357",".. ......"],["Czech Republic","cz","420","... ... ..."],["Denmark","dk","45",".. .. .. .."],["Djibouti","dj","253",".. .. ...."],["Dominica","dm","1767"],["Dominican Republic","do","1","(...) ...-....",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503","....-...."],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372",".... ......"],["Ethiopia","et","251",".. ... ...."],["Faroe Islands","fo","298",".. .. .."],["Fiji","fj","679"],["Finland","fi","358",".. ... .. .."],["France","fr","33",". .. .. .. .."],["French Guiana","gf","594","... .. .. .."],["French Polynesia","pf","689",{"/^44/":".. .. ..","/^80[0-5]/":"... .. .. ..",default:".. .. .. .."}],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49","... ........."],["Ghana","gh","233"],["Greece","gr","30"],["Greenland","gl","299",".. .. .."],["Grenada","gd","1473"],["Guadeloupe","gp","590","... .. .. ..",0],["Guam","gu","1671"],["Guatemala","gt","502","....-...."],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509","....-...."],["Honduras","hn","504"],["Hong Kong","hk","852",".... ...."],["Hungary","hu","36"],["Iceland","is","354","... ...."],["India","in","91",".....-....."],["Indonesia","id","62"],["Iran","ir","98","... ... ...."],["Iraq","iq","964"],["Ireland","ie","353",".. ......."],["Israel","il","972","... ... ...."],["Italy","it","39","... .......",0],["Jamaica","jm","1876"],["Japan","jp","81",".. .... ...."],["Jordan","jo","962"],["Kazakhstan","kz","7","... ...-..-..",0],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996","... ... ..."],["Laos","la","856"],["Latvia","lv","371",".. ... ..."],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Macedonia","mk","389"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60","..-....-...."],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596","... .. .. .."],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262","... .. .. ..",1,["269","639"]],["Mexico","mx","52","... ... ....",0],["Micronesia","fm","691"],["Moldova","md","373","(..) ..-..-.."],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Morocco","ma","212"],["Mozambique","mz","258"],["Myanmar","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands","nl","31",{"/^06/":"(.). .........","/^6/":". .........","/^0(10|13|14|15|20|23|24|26|30|33|35|36|38|40|43|44|45|46|50|53|55|58|70|71|72|73|74|75|76|77|78|79|82|84|85|87|88|91)/":"(.).. ........","/^(10|13|14|15|20|23|24|26|30|33|35|36|38|40|43|44|45|46|50|53|55|58|70|71|72|73|74|75|76|77|78|79|82|84|85|87|88|91)/":".. ........","/^0/":"(.)... .......",default:"... ......."}],["New Caledonia","nc","687"],["New Zealand","nz","64","...-...-...."],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["North Korea","kp","850"],["Norway","no","47","... .. ..."],["Oman","om","968"],["Pakistan","pk","92","...-......."],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63","... ... ...."],["Poland","pl","48","...-...-..."],["Portugal","pt","351"],["Puerto Rico","pr","1","(...) ...-....",3,["787","939"]],["Qatar","qa","974"],["R\xE9union","re","262","... .. .. ..",0],["Romania","ro","40"],["Russia","ru","7","(...) ...-..-..",1],["Rwanda","rw","250"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Pierre & Miquelon","pm","508",{"/^708/":"... ... ...","/^8/":"... .. .. ..",default:".. .. .."}],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["S\xE3o Tom\xE9 and Pr\xEDncipe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65","....-...."],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82","... .... ...."],["South Sudan","ss","211"],["Spain","es","34","... ... ..."],["Sri Lanka","lk","94"],["Sudan","sd","249"],["Suriname","sr","597"],["Swaziland","sz","268"],["Sweden","se","46","... ... ..."],["Switzerland","ch","41",".. ... .. .."],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia","tn","216"],["Turkey","tr","90","... ... .. .."],["Turkmenistan","tm","993"],["Tuvalu","tv","688"],["Uganda","ug","256"],["Ukraine","ua","380","(..) ... .. .."],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",".... ......"],["United States","us","1","(...) ...-....",0],["Uruguay","uy","598"],["Uzbekistan","uz","998",".. ... .. .."],["Vanuatu","vu","678"],["Vatican City","va","39",".. .... ....",1],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis & Futuna","wf","681",".. .. .."],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"]];var xe="react-international-phone-",se=(...t)=>t.filter(e=>!!e).join(" ").trim(),Se=(...t)=>se(...t).split(" ").map(e=>`${xe}${e}`).join(" "),P=({addPrefix:t,rawClassNames:e})=>se(Se(...t),...e);var le=({value:t,mask:e,maskSymbol:a,offset:s=0,trimNonMaskCharsLeftover:r=!1})=>{if(t.length<s)return t;let n=t.slice(0,s),c=t.slice(s),i=n,o=0;for(let l of e.split("")){if(o>=c.length){if(!r&&l!==a){i+=l;continue}break}l===a?(i+=c[o],o+=1):i+=l}return i};var F=t=>t?/^\d+$/.test(t):!1;var z=t=>t.replace(/\D/g,"");var ue=(t,e)=>{let a=t.style.display;a!=="block"&&(t.style.display="block");let s=t.getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.top-s.top,c=s.bottom-r.bottom;n>=0&&c>=0||(Math.abs(n)<Math.abs(c)?t.scrollTop+=n:t.scrollTop-=c),t.style.display=a};var De=t=>{let{name:e,iso2:a,dialCode:s,format:r,priority:n,areaCodes:c}=t,i=[e,a,s,r,n,c];for(let o=0;o<i.length;o+=1){if(o===0)continue;let l=i[o-1],d=i[o];if(l===void 0&&d!==void 0){let m=JSON.stringify(i,(f,g)=>g===void 0?"__undefined":g).replace(/"__undefined"/g,"undefined");throw new Error(`[react-international-phone] invalid country values passed to buildCountryData. Check ${l} in: ${m}`)}}return i.filter(o=>o!==void 0)};var de=()=>typeof window>"u"?!1:window.navigator.userAgent.toLowerCase().includes("macintosh");var ce=({phone:t,dialCode:e,prefix:a="+",charAfterDialCode:s=" "})=>{if(!t||!e)return t;let r=t;return r.startsWith(a)&&(r=r.replace(a,"")),r.startsWith(e)?(r=r.replace(e,""),r.startsWith(s)&&(r=r.replace(s,"")),r):t};var pe=(t,e)=>{let a=e.disableDialCodeAndPrefix?!1:e.forceDialCode,s=e.disableDialCodeAndPrefix?!1:e.insertDialCodeOnEmpty,r=t,n=l=>e.trimNonDigitsEnd?l.trim():l;if(!r)return s&&!r.length||a?n(`${e.prefix}${e.dialCode}${e.charAfterDialCode}`):n(r);if(r=z(r),r===e.dialCode&&!e.disableDialCodeAndPrefix)return n(`${e.prefix}${e.dialCode}${e.charAfterDialCode}`);if(e.dialCode.startsWith(r)&&!e.disableDialCodeAndPrefix)return n(a?`${e.prefix}${e.dialCode}${e.charAfterDialCode}`:`${e.prefix}${r}`);if(!r.startsWith(e.dialCode)&&!e.disableDialCodeAndPrefix){if(a)return n(`${e.prefix}${e.dialCode}${e.charAfterDialCode}`);if(r.length<e.dialCode.length)return n(`${e.prefix}${r}`)}let c=()=>{let l=e.dialCode.length,d=r.slice(0,l),m=r.slice(l);return{phoneLeftSide:d,phoneRightSide:m}},{phoneLeftSide:i,phoneRightSide:o}=c();return i=`${e.prefix}${i}${e.charAfterDialCode}`,o=le({value:o,mask:e.mask,maskSymbol:e.maskChar,trimNonMaskCharsLeftover:e.trimNonDigitsEnd||e.disableDialCodeAndPrefix&&o.length===0}),e.disableDialCodeAndPrefix&&(i=""),n(`${i}${o}`)};var me=({phoneBeforeInput:t,phoneAfterInput:e,phoneAfterFormatted:a,cursorPositionAfterInput:s,leftOffset:r=0,deletion:n})=>{if(s<r)return r;if(!t)return a.length;let c=null;for(let d=s-1;d>=0;d-=1)if(F(e[d])){c=d;break}if(c===null){for(let d=0;d<e.length;d+=1)if(F(a[d]))return d;return e.length}let i=0;for(let d=0;d<c;d+=1)F(e[d])&&(i+=1);let o=0,l=0;for(let d=0;d<a.length&&(o+=1,F(a[d])&&(l+=1),!(l>=i+1));d+=1);if(n!=="backward")for(;!F(a[o])&&o<a.length;)o+=1;return o};var O=({phone:t,prefix:e})=>t?`${e}${z(t)}`:"";function W({value:t,country:e,insertDialCodeOnEmpty:a,trimNonDigitsEnd:s,countries:r,prefix:n,charAfterDialCode:c,forceDialCode:i,disableDialCodeAndPrefix:o,defaultMask:l,countryGuessingEnabled:d,disableFormatting:m}){let f=t;o&&(f=f.startsWith(`${n}`)?f:`${n}${e.dialCode}${f}`);let g=d?X({phone:f,countries:r,currentCountryIso2:e?.iso2}):void 0,S=g?.country??e,p=pe(f,{prefix:n,mask:Q({phone:f,country:S,defaultMask:l,disableFormatting:m}),maskChar:J,dialCode:S.dialCode,trimNonDigitsEnd:s,charAfterDialCode:c,forceDialCode:i,insertDialCodeOnEmpty:a,disableDialCodeAndPrefix:o}),C=d&&!g?.fullDialCodeMatch?e:S;return{phone:O({phone:o?`${C.dialCode}${p}`:p,prefix:n}),inputValue:p,country:C}}var Ie=t=>{if(t?.toLocaleLowerCase().includes("delete")??!1)return t?.toLocaleLowerCase().includes("forward")?"forward":"backward"},fe=(t,{country:e,insertDialCodeOnEmpty:a,phoneBeforeInput:s,prefix:r,charAfterDialCode:n,forceDialCode:c,disableDialCodeAndPrefix:i,countryGuessingEnabled:o,defaultMask:l,disableFormatting:d,countries:m})=>{let f=t.nativeEvent,g=f.inputType,S=Ie(g),p=!!g?.startsWith("insertFrom"),C=g==="insertText",D=f?.data||void 0,I=t.target.value,A=t.target.selectionStart??0;if(g?.includes("history"))return{inputValue:s,phone:O({phone:s,prefix:r}),cursorPosition:s.length,country:e};if(C&&!F(D)&&I!==r)return{inputValue:s,phone:O({phone:i?`${e.dialCode}${s}`:s,prefix:r}),cursorPosition:A-(D?.length??0),country:e};if(c&&!I.startsWith(`${r}${e.dialCode}`)&&!p){let b=I?s:`${r}${e.dialCode}${n}`;return{inputValue:b,phone:O({phone:b,prefix:r}),cursorPosition:r.length+e.dialCode.length+n.length,country:e}}let{phone:N,inputValue:u,country:h}=W({value:I,country:e,trimNonDigitsEnd:S==="backward",insertDialCodeOnEmpty:a,countryGuessingEnabled:o,countries:m,prefix:r,charAfterDialCode:n,forceDialCode:c,disableDialCodeAndPrefix:i,disableFormatting:d,defaultMask:l}),y=me({cursorPositionAfterInput:A,phoneBeforeInput:s,phoneAfterInput:I,phoneAfterFormatted:u,leftOffset:c?r.length+e.dialCode.length+n.length:0,deletion:S});return{phone:N,inputValue:u,cursorPosition:y,country:h}};var Ce=(t,e)=>{let a=Object.keys(t),s=Object.keys(e);if(a.length!==s.length)return!1;for(let r of a)if(t[r]!==e[r])return!1;return!0};var ye=()=>{let t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),e=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(Date.now());return{check:()=>{let s=Date.now(),r=t.current?s-e.current:void 0;return t.current=e.current,e.current=s,r}}};var ke={size:20,overrideLastItemDebounceMS:-1};function ge(t,e){let{size:a,overrideLastItemDebounceMS:s,onChange:r}={...ke,...e},[n,c]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(t),[i,o]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([n]),[l,d]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),m=ye();return[n,(p,C)=>{if(typeof p=="object"&&typeof n=="object"&&Ce(p,n)||p===n)return;let k=s>0,D=m.check(),I=k&&D!==void 0?D>s:!0;if(C?.overrideLastItem!==void 0?C.overrideLastItem:!I)o(N=>[...N.slice(0,l),p]);else{let N=i.length>=a;o(u=>[...u.slice(N?1:0,l+1),p]),N||d(u=>u+1)}c(p),r?.(p)},()=>{if(l<=0)return{success:!1};let p=i[l-1];return c(p),d(C=>C-1),r?.(p),{success:!0,value:p}},()=>{if(l+1>=i.length)return{success:!1};let p=i[l+1];return c(p),d(C=>C+1),r?.(p),{success:!0,value:p}}]}var J=".",E={defaultCountry:"us",value:"",prefix:"+",defaultMask:"............",charAfterDialCode:" ",historySaveDebounceMS:200,disableCountryGuess:!1,disableDialCodePrefill:!1,forceDialCode:!1,disableDialCodeAndPrefix:!1,disableFormatting:!1,countries:_,preferredCountries:[]},ee=({defaultCountry:t=E.defaultCountry,value:e=E.value,countries:a=E.countries,prefix:s=E.prefix,defaultMask:r=E.defaultMask,charAfterDialCode:n=E.charAfterDialCode,historySaveDebounceMS:c=E.historySaveDebounceMS,disableCountryGuess:i=E.disableCountryGuess,disableDialCodePrefill:o=E.disableDialCodePrefill,forceDialCode:l=E.forceDialCode,disableDialCodeAndPrefix:d=E.disableDialCodeAndPrefix,disableFormatting:m=E.disableFormatting,onChange:f,inputRef:g})=>{let C={countries:a,prefix:s,charAfterDialCode:n,forceDialCode:d?!1:l,disableDialCodeAndPrefix:d,defaultMask:r,countryGuessingEnabled:!i,disableFormatting:m},k=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),D=g||k,I=w=>{Promise.resolve().then(()=>{typeof window>"u"||D.current!==document?.activeElement||D.current?.setSelectionRange(w,w)})},[{phone:A,inputValue:N,country:u},h,y,b]=ge(()=>{let w=$({value:t,field:"iso2",countries:a});w||console.error(`[react-international-phone]: can not find a country with "${t}" iso2 code`);let T=w||$({value:"us",field:"iso2",countries:a}),{phone:x,inputValue:L,country:U}=W({value:e,country:T,insertDialCodeOnEmpty:!o,...C});return I(L.length),{phone:x,inputValue:L,country:U.iso2}},{overrideLastItemDebounceMS:c,onChange:({inputValue:w,phone:T,country:x})=>{if(!f)return;let L=v(x);f({phone:T,inputValue:w,country:L})}}),v=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(w=>$({value:w,field:"iso2",countries:a}),[a]),R=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>v(u),[u,v]);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{let w=D.current;if(!w)return;let T=x=>{if(!x.key)return;let L=x.ctrlKey,U=x.metaKey,ve=x.shiftKey;if(x.key.toLowerCase()==="z"){if(de()){if(!U)return}else if(!L)return;ve?b():y()}};return w.addEventListener("keydown",T),()=>{w.removeEventListener("keydown",T)}},[D,y,b]);let V=w=>{w.preventDefault();let{phone:T,inputValue:x,country:L,cursorPosition:U}=fe(w,{country:R,phoneBeforeInput:N,insertDialCodeOnEmpty:!1,...C});return h({inputValue:x,phone:T,country:L.iso2}),I(U),e},K=(w,T={focusOnInput:!1})=>{let x=$({value:w,field:"iso2",countries:a});if(!x){console.error(`[react-international-phone]: can not find a country with "${w}" iso2 code`);return}let L=d?"":`${s}${x.dialCode}${n}`;h({inputValue:L,phone:`${s}${x.dialCode}`,country:x.iso2}),T.focusOnInput&&Promise.resolve().then(()=>{D.current?.focus()})},[G,j]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{if(!G){j(!0),e!==A&&f?.({inputValue:N,phone:A,country:R});return}if(e===A)return;let{phone:w,inputValue:T,country:x}=W({value:e,country:R,insertDialCodeOnEmpty:!o,...C});h({phone:w,inputValue:T,country:x.iso2})},[e]),{phone:A,inputValue:N,country:R,setCountry:K,handlePhoneValueChange:V,inputRef:D}};var Q=({phone:t,country:e,defaultMask:a="............",disableFormatting:s=!1})=>{let r=e.format,n=i=>s?i.replace(new RegExp(`[^${J}]`,"g"),""):i;if(!r)return n(a);if(typeof r=="string")return n(r);if(!r.default)return console.error(`[react-international-phone]: default mask for ${e.iso2} is not provided`),n(a);let c=Object.keys(r).find(i=>{if(i==="default")return!1;if(!(i.charAt(0)==="/"&&i.charAt(i.length-1)==="/"))return console.error(`[react-international-phone]: format regex "${i}" for ${e.iso2} is not valid`),!1;let l=new RegExp(i.substring(1,i.length-1)),d=t.replace(e.dialCode,"");return l.test(z(d))});return n(c?r[c]:r.default)};var M=t=>{let[e,a,s,r,n,c]=t;return{name:e,iso2:a,dialCode:s,format:r,priority:n,areaCodes:c}};var Ae=t=>`Field "${t}" is not supported`,$=({field:t,value:e,countries:a=_})=>{if(["priority"].includes(t))throw new Error(Ae(t));let s=a.find(r=>{let n=M(r);return e===n[t]});if(s)return M(s)};var X=({phone:t,countries:e=_,currentCountryIso2:a})=>{let s={country:void 0,fullDialCodeMatch:!1};if(!t)return s;let r=z(t);if(!r)return s;let n=s,c=({country:i,fullDialCodeMatch:o})=>{let l=i.dialCode===n.country?.dialCode,d=(i.priority??0)<(n.country?.priority??0);(!l||d)&&(n={country:i,fullDialCodeMatch:o})};for(let i of e){let o=M(i),{dialCode:l,areaCodes:d}=o;if(r.startsWith(l)){let m=n.country?Number(l)>=Number(n.country.dialCode):!0;if(d){let f=r.substring(l.length);for(let g of d)if(f.startsWith(g))return{country:o,fullDialCodeMatch:!0}}(m||l===r||!n.fullDialCodeMatch)&&c({country:o,fullDialCodeMatch:!0})}n.fullDialCodeMatch||r.length<l.length&&l.startsWith(r)&&(!n.country||Number(l)<=Number(n.country.dialCode))&&c({country:o,fullDialCodeMatch:!1})}if(a){let i=$({value:a,field:"iso2",countries:e});if(!i)return n;let l=i?(m=>{if(!m?.areaCodes)return!1;let f=r.substring(m.dialCode.length);return m.areaCodes.some(g=>g.startsWith(f))})(i):!1;!!n&&n.country?.dialCode===i.dialCode&&n.country!==i&&n.fullDialCodeMatch&&(!i.areaCodes||l)&&(n={country:i,fullDialCodeMatch:!0})}return n};var Te=(t,e)=>{let a=parseInt(t,16);return Number(a+e).toString(16)},Ee="abcdefghijklmnopqrstuvwxyz",Le="1f1e6",Pe=Ee.split("").reduce((t,e,a)=>({...t,[e]:Te(Le,a)}),{}),$e=t=>[Pe[t[0]],Pe[t[1]]].join("-"),q=({iso2:t,size:e,src:a,protocol:s="https",disableLazyLoading:r,className:n,style:c,...i})=>{if(!t)return react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:P({addPrefix:["flag-emoji"],rawClassNames:[n]}),width:e,height:e,...i});let o=()=>{if(a)return a;let l=$e(t);return`${s}://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${l}.svg`};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:P({addPrefix:["flag-emoji"],rawClassNames:[n]}),src:o(),width:e,height:e,draggable:!1,"data-country":t,loading:r?void 0:"lazy",style:{width:e,height:e,...c},alt:"",...i})};var He=1e3,ne=({show:t,dialCodePrefix:e="+",selectedCountry:a,countries:s=_,preferredCountries:r=[],flags:n,onSelect:c,onClose:i,...o})=>{let l=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),d=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),m=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>{if(!r||!r.length)return s;let u=[],h=[...s];for(let y of r){let b=h.findIndex(v=>M(v).iso2===y);if(b!==-1){let v=h.splice(b,1)[0];u.push(v)}}return u.concat(h)},[s,r]),f=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({updatedAt:void 0,value:""}),g=u=>{let h=f.current.updatedAt&&new Date().getTime()-f.current.updatedAt.getTime()>He;f.current={value:h?u:`${f.current.value}${u}`,updatedAt:new Date};let y=m.findIndex(b=>M(b).name.toLowerCase().startsWith(f.current.value));y!==-1&&C(y)},S=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(u=>m.findIndex(h=>M(h).iso2===u),[m]),[p,C]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(S(a)),k=()=>{d.current!==a&&C(S(a))},D=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(u=>{C(S(u.iso2)),c?.(u)},[c,S]),I=u=>{let h=m.length-1,y=b=>u==="prev"?b-1:u==="next"?b+1:u==="last"?h:0;C(b=>{let v=y(b);return v<0?0:v>h?h:v})},A=u=>{if(u.stopPropagation(),u.key==="Enter"){u.preventDefault();let h=M(m[p]);D(h);return}if(u.key==="Escape"){i?.();return}if(u.key==="ArrowUp"){u.preventDefault(),I("prev");return}if(u.key==="ArrowDown"){u.preventDefault(),I("next");return}if(u.key==="PageUp"){u.preventDefault(),I("first");return}if(u.key==="PageDown"){u.preventDefault(),I("last");return}u.key===" "&&u.preventDefault(),u.key.length===1&&!u.altKey&&!u.ctrlKey&&!u.metaKey&&g(u.key.toLocaleLowerCase())},N=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{if(!l.current||p===void 0)return;let u=M(m[p]).iso2;if(u===d.current)return;let h=l.current.querySelector(`[data-country="${u}"]`);h&&(ue(l.current,h),d.current=u)},[p,m]);return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{N()},[p,N]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{l.current&&(t?l.current.focus():k())},[t]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{k()},[a]),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{ref:l,role:"listbox",className:P({addPrefix:["country-selector-dropdown"],rawClassNames:[o.className]}),style:{display:t?"block":"none",...o.style},onKeyDown:A,onBlur:i,tabIndex:-1,"aria-activedescendant":`react-international-phone__${M(m[p]).iso2}-option`},m.map((u,h)=>{let y=M(u),b=y.iso2===a,v=h===p,R=r.includes(y.iso2),V=h===r.length-1,K=n?.find(G=>G.iso2===y.iso2);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,{key:y.iso2},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{"data-country":y.iso2,role:"option","aria-selected":b,"aria-label":`${y.name} ${e}${y.dialCode}`,id:`react-international-phone__${y.iso2}-option`,className:P({addPrefix:["country-selector-dropdown__list-item",R&&"country-selector-dropdown__list-item--preferred",b&&"country-selector-dropdown__list-item--selected",v&&"country-selector-dropdown__list-item--focused"],rawClassNames:[o.listItemClassName,R&&o.listItemPreferredClassName,b&&o.listItemSelectedClassName,v&&o.listItemFocusedClassName]}),onClick:()=>D(y),style:o.listItemStyle,title:y.name},react__WEBPACK_IMPORTED_MODULE_0__.createElement(q,{iso2:y.iso2,src:K?.src,className:P({addPrefix:["country-selector-dropdown__list-item-flag-emoji"],rawClassNames:[o.listItemFlagClassName]}),style:o.listItemFlagStyle}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:P({addPrefix:["country-selector-dropdown__list-item-country-name"],rawClassNames:[o.listItemCountryNameClassName]}),style:o.listItemCountryNameStyle},y.name),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:P({addPrefix:["country-selector-dropdown__list-item-dial-code"],rawClassNames:[o.listItemDialCodeClassName]}),style:o.listItemDialCodeStyle},e,y.dialCode)),V?react__WEBPACK_IMPORTED_MODULE_0__.createElement("hr",{className:P({addPrefix:["country-selector-dropdown__preferred-list-divider"],rawClassNames:[o.preferredListDividerClassName]}),style:o.preferredListDividerStyle}):null)}))};var ae=({selectedCountry:t,onSelect:e,disabled:a,hideDropdown:s,countries:r=_,preferredCountries:n=[],flags:c,renderButtonWrapper:i,...o})=>{let[l,d]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),m=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>{if(t)return $({value:t,field:"iso2",countries:r})},[r,t]),f=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),g=p=>{p.key&&["ArrowUp","ArrowDown"].includes(p.key)&&(p.preventDefault(),d(!0))},S=()=>{let p={title:m?.name,onClick:()=>d(k=>!k),onMouseDown:k=>k.preventDefault(),onKeyDown:g,disabled:s||a,role:"combobox","aria-label":"Country selector","aria-haspopup":"listbox","aria-expanded":l},C=react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:P({addPrefix:["country-selector-button__button-content"],rawClassNames:[o.buttonContentWrapperClassName]}),style:o.buttonContentWrapperStyle},react__WEBPACK_IMPORTED_MODULE_0__.createElement(q,{iso2:t,src:c?.find(k=>k.iso2===t)?.src,className:P({addPrefix:["country-selector-button__flag-emoji",a&&"country-selector-button__flag-emoji--disabled"],rawClassNames:[o.flagClassName]}),style:{visibility:t?"visible":"hidden",...o.flagStyle}}),!s&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:P({addPrefix:["country-selector-button__dropdown-arrow",a&&"country-selector-button__dropdown-arrow--disabled",l&&"country-selector-button__dropdown-arrow--active"],rawClassNames:[o.dropdownArrowClassName]}),style:o.dropdownArrowStyle}));return i?i({children:C,rootProps:p}):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{...p,type:"button",className:P({addPrefix:["country-selector-button",l&&"country-selector-button--active",a&&"country-selector-button--disabled",s&&"country-selector-button--hide-dropdown"],rawClassNames:[o.buttonClassName]}),"data-country":t,style:o.buttonStyle},C)};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:P({addPrefix:["country-selector"],rawClassNames:[o.className]}),style:o.style,ref:f},S(),react__WEBPACK_IMPORTED_MODULE_0__.createElement(ne,{show:l,countries:r,preferredCountries:n,flags:c,onSelect:p=>{d(!1),e?.(p)},selectedCountry:t,onClose:()=>{d(!1)},...o.dropdownStyleProps}))};var ie=({dialCode:t,prefix:e,disabled:a,style:s,className:r})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:P({addPrefix:["dial-code-preview",a&&"dial-code-preview--disabled"],rawClassNames:[r]}),style:s},`${e}${t}`);var Ue=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({value:t,onChange:e,countries:a=_,preferredCountries:s=[],hideDropdown:r,showDisabledDialCodeAndPrefix:n,disableFocusAfterCountrySelect:c,flags:i,style:o,className:l,inputStyle:d,inputClassName:m,countrySelectorStyleProps:f,dialCodePreviewStyleProps:g,inputProps:S,placeholder:p,disabled:C,name:k,onFocus:D,onBlur:I,required:A,autoFocus:N,...u},h)=>{let{phone:y,inputValue:b,inputRef:v,country:R,setCountry:V,handlePhoneValueChange:K}=ee({value:t,countries:a,...u,onChange:j=>{e?.(j.phone,{country:j.country,inputValue:j.inputValue})}}),G=u.disableDialCodeAndPrefix&&n&&R?.dialCode;return (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(h,()=>v.current?Object.assign(v.current,{setCountry:V,state:{phone:y,inputValue:b,country:R}}):null,[v,V,y,b,R]),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{ref:h,className:P({addPrefix:["input-container"],rawClassNames:[l]}),style:o},react__WEBPACK_IMPORTED_MODULE_0__.createElement(ae,{onSelect:j=>V(j.iso2,{focusOnInput:!c}),flags:i,selectedCountry:R.iso2,countries:a,preferredCountries:s,disabled:C,hideDropdown:r,...f}),G&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(ie,{dialCode:R.dialCode,prefix:u.prefix??"+",disabled:C,...g}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{onChange:K,value:b,type:"tel",ref:v,className:P({addPrefix:["input",C&&"input--disabled"],rawClassNames:[m]}),placeholder:p,disabled:C,style:d,name:k,onFocus:D,onBlur:I,autoFocus:N,required:A,...S}))});


/***/ })

}]);
//# sourceMappingURL=vendors-node_modules_react-international-phone_dist_index_css-node_modules_react-internationa-e45498.js.map?ver=55d8c500cab8a80236fd