@movmo_app/react-common 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -111,5 +111,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
111
111
|
Copyright (c) 2017 Jed Watson.
|
|
112
112
|
Licensed under the MIT License (MIT), see
|
|
113
113
|
http://jedwatson.github.io/classnames
|
|
114
|
-
*/(function(){var n={}.hasOwnProperty;function o(){for(var i=[],l=0;l<arguments.length;l++){var s=arguments[l];if(s){var u=typeof s;if(u==="string"||u==="number")i.push(s);else if(Array.isArray(s)&&s.length){var c=o.apply(null,s);c&&i.push(c)}else if(u==="object")for(var d in s)n.call(s,d)&&s[d]&&i.push(d)}}return i.join(" ")}e.exports?(o.default=o,e.exports=o):(a=(function(){return o}).apply(t,[]))===void 0||(e.exports=a)})()},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,y=d.Symbol,A=y?y.prototype:void 0,C=A?A.toString:void 0;function p(S){if(typeof S=="string")return S;if(E(S))return C?C.call(S):"";var x=S+"";return x=="0"&&1/S==-1/0?"-0":x}function m(S){var x=typeof S;return!!S&&(x=="object"||x=="function")}function E(S){return typeof S=="symbol"||function(x){return!!x&&typeof x=="object"}(S)&&h.call(S)=="[object Symbol]"}function w(S){return S?(S=function(x){if(typeof x=="number")return x;if(E(x))return NaN;if(m(x)){var M=typeof x.valueOf=="function"?x.valueOf():x;x=m(M)?M+"":M}if(typeof x!="string")return x===0?x:+x;x=x.replace(n,"");var T=i.test(x);return T||l.test(x)?s(x.slice(2),T?2:8):o.test(x)?NaN:+x}(S))===1/0||S===-1/0?17976931348623157e292*(S<0?-1:1):S==S?S:0:S===0?S:0}e.exports=function(S,x,M){var T,B,$,J;return S=(T=S)==null?"":p(T),B=function(ue){var V=w(ue),ee=V%1;return V==V?ee?V-ee:V:0}(M),$=0,J=S.length,B==B&&(J!==void 0&&(B=B<=J?B:J),$!==void 0&&(B=B>=$?B:$)),M=B,x=p(x),S.slice(M,M+x.length)==x}}).call(this,r(3))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(a){var n=/^\[object .+?Constructor\]$/,o=typeof a=="object"&&a&&a.Object===Object&&a,i=typeof self=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),s,u=Array.prototype,c=Function.prototype,d=Object.prototype,h=l["__core-js_shared__"],y=(s=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"",A=c.toString,C=d.hasOwnProperty,p=d.toString,m=RegExp("^"+A.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=u.splice,w=ue(l,"Map"),S=ue(Object,"create");function x(N){var L=-1,W=N?N.length:0;for(this.clear();++L<W;){var U=N[L];this.set(U[0],U[1])}}function M(N){var L=-1,W=N?N.length:0;for(this.clear();++L<W;){var U=N[L];this.set(U[0],U[1])}}function T(N){var L=-1,W=N?N.length:0;for(this.clear();++L<W;){var U=N[L];this.set(U[0],U[1])}}function B(N,L){for(var W,U,te=N.length;te--;)if((W=N[te][0])===(U=L)||W!=W&&U!=U)return te;return-1}function $(N){return!(!ee(N)||(L=N,y&&y in L))&&(function(W){var U=ee(W)?p.call(W):"";return U=="[object Function]"||U=="[object GeneratorFunction]"}(N)||function(W){var U=!1;if(W!=null&&typeof W.toString!="function")try{U=!!(W+"")}catch{}return U}(N)?m:n).test(function(W){if(W!=null){try{return A.call(W)}catch{}try{return W+""}catch{}}return""}(N));var L}function J(N,L){var W,U,te=N.__data__;return((U=typeof(W=L))=="string"||U=="number"||U=="symbol"||U=="boolean"?W!=="__proto__":W===null)?te[typeof L=="string"?"string":"hash"]:te.map}function ue(N,L){var W=function(U,te){return U==null?void 0:U[te]}(N,L);return $(W)?W:void 0}function V(N,L){if(typeof N!="function"||L&&typeof L!="function")throw new TypeError("Expected a function");var W=function(){var U=arguments,te=L?L.apply(this,U):U[0],Ee=W.cache;if(Ee.has(te))return Ee.get(te);var H=N.apply(this,U);return W.cache=Ee.set(te,H),H};return W.cache=new(V.Cache||T),W}function ee(N){var L=typeof N;return!!N&&(L=="object"||L=="function")}x.prototype.clear=function(){this.__data__=S?S(null):{}},x.prototype.delete=function(N){return this.has(N)&&delete this.__data__[N]},x.prototype.get=function(N){var L=this.__data__;if(S){var W=L[N];return W==="__lodash_hash_undefined__"?void 0:W}return C.call(L,N)?L[N]:void 0},x.prototype.has=function(N){var L=this.__data__;return S?L[N]!==void 0:C.call(L,N)},x.prototype.set=function(N,L){return this.__data__[N]=S&&L===void 0?"__lodash_hash_undefined__":L,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(N){var L=this.__data__,W=B(L,N);return!(W<0)&&(W==L.length-1?L.pop():E.call(L,W,1),!0)},M.prototype.get=function(N){var L=this.__data__,W=B(L,N);return W<0?void 0:L[W][1]},M.prototype.has=function(N){return B(this.__data__,N)>-1},M.prototype.set=function(N,L){var W=this.__data__,U=B(W,N);return U<0?W.push([N,L]):W[U][1]=L,this},T.prototype.clear=function(){this.__data__={hash:new x,map:new(w||M),string:new x}},T.prototype.delete=function(N){return J(this,N).delete(N)},T.prototype.get=function(N){return J(this,N).get(N)},T.prototype.has=function(N){return J(this,N).has(N)},T.prototype.set=function(N,L){return J(this,N).set(N,L),this},V.Cache=T,e.exports=V}).call(this,r(3))},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,y=Math.max,A=Math.min,C=function(){return d.Date.now()};function p(E){var w=typeof E;return!!E&&(w=="object"||w=="function")}function m(E){if(typeof E=="number")return E;if(function(x){return typeof x=="symbol"||function(M){return!!M&&typeof M=="object"}(x)&&h.call(x)=="[object Symbol]"}(E))return NaN;if(p(E)){var w=typeof E.valueOf=="function"?E.valueOf():E;E=p(w)?w+"":w}if(typeof E!="string")return E===0?E:+E;E=E.replace(n,"");var S=i.test(E);return S||l.test(E)?s(E.slice(2),S?2:8):o.test(E)?NaN:+E}e.exports=function(E,w,S){var x,M,T,B,$,J,ue=0,V=!1,ee=!1,N=!0;if(typeof E!="function")throw new TypeError("Expected a function");function L(O){var _=x,ae=M;return x=M=void 0,ue=O,B=E.apply(ae,_)}function W(O){return ue=O,$=setTimeout(te,w),V?L(O):B}function U(O){var _=O-J;return J===void 0||_>=w||_<0||ee&&O-ue>=T}function te(){var O=C();if(U(O))return Ee(O);$=setTimeout(te,function(_){var ae=w-(_-J);return ee?A(ae,T-(_-ue)):ae}(O))}function Ee(O){return $=void 0,N&&x?L(O):(x=M=void 0,B)}function H(){var O=C(),_=U(O);if(x=arguments,M=this,J=O,_){if($===void 0)return W(J);if(ee)return $=setTimeout(te,w),L(J)}return $===void 0&&($=setTimeout(te,w)),B}return w=m(w)||0,p(S)&&(V=!!S.leading,T=(ee="maxWait"in S)?y(m(S.maxWait)||0,w):T,N="trailing"in S?!!S.trailing:N),H.cancel=function(){$!==void 0&&clearTimeout($),ue=0,x=J=M=$=void 0},H.flush=function(){return $===void 0?B:Ee(C())},H}}).call(this,r(3))},function(e,t,r){(function(a,n){var o="[object Arguments]",i="[object Map]",l="[object Object]",s="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y=/\\(\\)?/g,A=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[o]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[i]=p["[object Number]"]=p[l]=p["[object RegExp]"]=p[s]=p["[object String]"]=p["[object WeakMap]"]=!1;var m=typeof a=="object"&&a&&a.Object===Object&&a,E=typeof self=="object"&&self&&self.Object===Object&&self,w=m||E||Function("return this")(),S=t&&!t.nodeType&&t,x=S&&typeof n=="object"&&n&&!n.nodeType&&n,M=x&&x.exports===S&&m.process,T=function(){try{return M&&M.binding("util")}catch{}}(),B=T&&T.isTypedArray;function $(f,R,P,k){var Y=-1,re=f?f.length:0;for(k&&re&&(P=f[++Y]);++Y<re;)P=R(P,f[Y],Y,f);return P}function J(f,R){for(var P=-1,k=f?f.length:0;++P<k;)if(R(f[P],P,f))return!0;return!1}function ue(f,R,P,k,Y){return Y(f,function(re,ve,Le){P=k?(k=!1,re):R(P,re,ve,Le)}),P}function V(f){var R=!1;if(f!=null&&typeof f.toString!="function")try{R=!!(f+"")}catch{}return R}function ee(f){var R=-1,P=Array(f.size);return f.forEach(function(k,Y){P[++R]=[Y,k]}),P}function N(f){var R=-1,P=Array(f.size);return f.forEach(function(k){P[++R]=k}),P}var L,W,U,te=Array.prototype,Ee=Function.prototype,H=Object.prototype,O=w["__core-js_shared__"],_=(L=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",ae=Ee.toString,X=H.hasOwnProperty,b=H.toString,fe=RegExp("^"+ae.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),de=w.Symbol,le=w.Uint8Array,Ae=H.propertyIsEnumerable,we=te.splice,Pe=(W=Object.keys,U=Object,function(f){return W(U(f))}),Z=Ct(w,"DataView"),De=Ct(w,"Map"),Re=Ct(w,"Promise"),G=Ct(w,"Set"),j=Ct(w,"WeakMap"),Q=Ct(Object,"create"),ge=yt(Z),oe=yt(De),me=yt(Re),he=yt(G),Ge=yt(j),K=de?de.prototype:void 0,ie=K?K.valueOf:void 0,Ce=K?K.toString:void 0;function q(f){var R=-1,P=f?f.length:0;for(this.clear();++R<P;){var k=f[R];this.set(k[0],k[1])}}function ne(f){var R=-1,P=f?f.length:0;for(this.clear();++R<P;){var k=f[R];this.set(k[0],k[1])}}function ke(f){var R=-1,P=f?f.length:0;for(this.clear();++R<P;){var k=f[R];this.set(k[0],k[1])}}function tt(f){var R=-1,P=f?f.length:0;for(this.__data__=new ke;++R<P;)this.add(f[R])}function Je(f){this.__data__=new ne(f)}function at(f,R){var P=g(f)||Nn(f)?function(ve,Le){for(var Xe=-1,We=Array(ve);++Xe<ve;)We[Xe]=Le(Xe);return We}(f.length,String):[],k=P.length,Y=!!k;for(var re in f)!X.call(f,re)||Y&&(re=="length"||on(re,k))||P.push(re);return P}function lt(f,R){for(var P=f.length;P--;)if(Gn(f[P][0],R))return P;return-1}q.prototype.clear=function(){this.__data__=Q?Q(null):{}},q.prototype.delete=function(f){return this.has(f)&&delete this.__data__[f]},q.prototype.get=function(f){var R=this.__data__;if(Q){var P=R[f];return P==="__lodash_hash_undefined__"?void 0:P}return X.call(R,f)?R[f]:void 0},q.prototype.has=function(f){var R=this.__data__;return Q?R[f]!==void 0:X.call(R,f)},q.prototype.set=function(f,R){return this.__data__[f]=Q&&R===void 0?"__lodash_hash_undefined__":R,this},ne.prototype.clear=function(){this.__data__=[]},ne.prototype.delete=function(f){var R=this.__data__,P=lt(R,f);return!(P<0)&&(P==R.length-1?R.pop():we.call(R,P,1),!0)},ne.prototype.get=function(f){var R=this.__data__,P=lt(R,f);return P<0?void 0:R[P][1]},ne.prototype.has=function(f){return lt(this.__data__,f)>-1},ne.prototype.set=function(f,R){var P=this.__data__,k=lt(P,f);return k<0?P.push([f,R]):P[k][1]=R,this},ke.prototype.clear=function(){this.__data__={hash:new q,map:new(De||ne),string:new q}},ke.prototype.delete=function(f){return zt(this,f).delete(f)},ke.prototype.get=function(f){return zt(this,f).get(f)},ke.prototype.has=function(f){return zt(this,f).has(f)},ke.prototype.set=function(f,R){return zt(this,f).set(f,R),this},tt.prototype.add=tt.prototype.push=function(f){return this.__data__.set(f,"__lodash_hash_undefined__"),this},tt.prototype.has=function(f){return this.__data__.has(f)},Je.prototype.clear=function(){this.__data__=new ne},Je.prototype.delete=function(f){return this.__data__.delete(f)},Je.prototype.get=function(f){return this.__data__.get(f)},Je.prototype.has=function(f){return this.__data__.has(f)},Je.prototype.set=function(f,R){var P=this.__data__;if(P instanceof ne){var k=P.__data__;if(!De||k.length<199)return k.push([f,R]),this;P=this.__data__=new ke(k)}return P.set(f,R),this};var vt,ze=(vt=function(f,R){return f&&Rt(f,R,Ue)},function(f,R){if(f==null)return f;if(!D(f))return vt(f,R);for(var P=f.length,k=-1,Y=Object(f);++k<P&&R(Y[k],k,Y)!==!1;);return f}),Rt=function(f){return function(R,P,k){for(var Y=-1,re=Object(R),ve=k(R),Le=ve.length;Le--;){var Xe=ve[++Y];if(P(re[Xe],Xe,re)===!1)break}return R}}();function Wt(f,R){for(var P=0,k=(R=kt(R,f)?[R]:Ht(R)).length;f!=null&&P<k;)f=f[Lt(R[P++])];return P&&P==k?f:void 0}function nn(f,R){return f!=null&&R in Object(f)}function ht(f,R,P,k,Y){return f===R||(f==null||R==null||!Se(f)&&!Ne(R)?f!=f&&R!=R:function(re,ve,Le,Xe,We,Te){var ut=g(re),qe=g(ve),Qe="[object Array]",Ke="[object Array]";ut||(Qe=(Qe=pt(re))==o?l:Qe),qe||(Ke=(Ke=pt(ve))==o?l:Ke);var dt=Qe==l&&!V(re),Yt=Ke==l&&!V(ve),Tt=Qe==Ke;if(Tt&&!dt)return Te||(Te=new Je),ut||xe(re)?an(re,ve,Le,Xe,We,Te):function(_e,je,mr,_t,Tn,it,It){switch(mr){case"[object DataView]":if(_e.byteLength!=je.byteLength||_e.byteOffset!=je.byteOffset)return!1;_e=_e.buffer,je=je.buffer;case"[object ArrayBuffer]":return!(_e.byteLength!=je.byteLength||!_t(new le(_e),new le(je)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Gn(+_e,+je);case"[object Error]":return _e.name==je.name&&_e.message==je.message;case"[object RegExp]":case"[object String]":return _e==je+"";case i:var Pt=ee;case s:var ln=2⁢if(Pt||(Pt=N),_e.size!=je.size&&!ln)return!1;var Pn=It.get(_e);if(Pn)return Pn==je;it|=1,It.set(_e,je);var Jt=an(Pt(_e),Pt(je),_t,Tn,it,It);return It.delete(_e),Jt;case"[object Symbol]":if(ie)return ie.call(_e)==ie.call(je)}return!1}(re,ve,Qe,Le,Xe,We,Te);if(!(2&We)){var ga=dt&&X.call(re,"__wrapped__"),ma=Yt&&X.call(ve,"__wrapped__");if(ga||ma){var Bs=ga?re.value():re,Vs=ma?ve.value():ve;return Te||(Te=new Je),Le(Bs,Vs,Xe,We,Te)}}return Tt?(Te||(Te=new Je),function(_e,je,mr,_t,Tn,it){var It=2&Tn,Pt=Ue(_e),ln=Pt.length,Pn=Ue(je).length;if(ln!=Pn&&!It)return!1;for(var Jt=ln;Jt--;){var Ot=Pt[Jt];if(!(It?Ot in je:X.call(je,Ot)))return!1}var va=it.get(_e);if(va&&it.get(je))return va==je;var On=!0;it.set(_e,je),it.set(je,_e);for(var vr=It;++Jt<ln;){Ot=Pt[Jt];var Fn=_e[Ot],Mn=je[Ot];if(_t)var ha=It?_t(Mn,Fn,Ot,je,_e,it):_t(Fn,Mn,Ot,_e,je,it);if(!(ha===void 0?Fn===Mn||mr(Fn,Mn,_t,Tn,it):ha)){On=!1;break}vr||(vr=Ot=="constructor")}if(On&&!vr){var Bn=_e.constructor,Vn=je.constructor;Bn==Vn||!("constructor"in _e)||!("constructor"in je)||typeof Bn=="function"&&Bn instanceof Bn&&typeof Vn=="function"&&Vn instanceof Vn||(On=!1)}return it.delete(_e),it.delete(je),On}(re,ve,Le,Xe,We,Te)):!1}(f,R,ht,P,k,Y))}function Gt(f){return!(!Se(f)||function(R){return!!_&&_ in R}(f))&&(z(f)||V(f)?fe:A).test(yt(f))}function Nt(f){return typeof f=="function"?f:f==null?He:typeof f=="object"?g(f)?function(k,Y){return kt(k)&&En(Y)?wn(Lt(k),Y):function(re){var ve=function(Le,Xe,We){var Te=Le==null?void 0:Wt(Le,Xe);return Te===void 0?We:Te}(re,k);return ve===void 0&&ve===Y?function(Le,Xe){return Le!=null&&function(We,Te,ut){Te=kt(Te,We)?[Te]:Ht(Te);for(var qe,Qe=-1,Ke=Te.length;++Qe<Ke;){var dt=Lt(Te[Qe]);if(!(qe=We!=null&&ut(We,dt)))break;We=We[dt]}return qe||!!(Ke=We?We.length:0)&&pe(Ke)&&on(dt,Ke)&&(g(We)||Nn(We))}(Le,Xe,nn)}(re,k):ht(Y,ve,void 0,3)}}(f[0],f[1]):function(k){var Y=function(re){for(var ve=Ue(re),Le=ve.length;Le--;){var Xe=ve[Le],We=re[Xe];ve[Le]=[Xe,We,En(We)]}return ve}(k);return Y.length==1&&Y[0][2]?wn(Y[0][0],Y[0][1]):function(re){return re===k||function(ve,Le,Xe,We){var Te=Xe.length,ut=Te;if(ve==null)return!ut;for(ve=Object(ve);Te--;){var qe=Xe[Te];if(qe[2]?qe[1]!==ve[qe[0]]:!(qe[0]in ve))return!1}for(;++Te<ut;){var Qe=(qe=Xe[Te])[0],Ke=ve[Qe],dt=qe[1];if(qe[2]){if(Ke===void 0&&!(Qe in ve))return!1}else{var Yt=new Je,Tt;if(!(Tt===void 0?ht(dt,Ke,We,3,Yt):Tt))return!1}}return!0}(re,k,Y)}}(f):kt(R=f)?(P=Lt(R),function(k){return k==null?void 0:k[P]}):function(k){return function(Y){return Wt(Y,k)}}(R);var R,P}function rn(f){if(P=(R=f)&&R.constructor,k=typeof P=="function"&&P.prototype||H,R!==k)return Pe(f);var R,P,k,Y=[];for(var re in Object(f))X.call(f,re)&&re!="constructor"&&Y.push(re);return Y}function Ht(f){return g(f)?f:Rn(f)}function an(f,R,P,k,Y,re){var ve=2&Y,Le=f.length,Xe=R.length;if(Le!=Xe&&!(ve&&Xe>Le))return!1;var We=re.get(f);if(We&&re.get(R))return We==R;var Te=-1,ut=!0,qe=1&Y?new tt:void 0;for(re.set(f,R),re.set(R,f);++Te<Le;){var Qe=f[Te],Ke=R[Te];if(k)var dt=ve?k(Ke,Qe,Te,R,f,re):k(Qe,Ke,Te,f,R,re);if(dt!==void 0){if(dt)continue;ut=!1;break}if(qe){if(!J(R,function(Yt,Tt){if(!qe.has(Tt)&&(Qe===Yt||P(Qe,Yt,k,Y,re)))return qe.add(Tt)})){ut=!1;break}}else if(Qe!==Ke&&!P(Qe,Ke,k,Y,re)){ut=!1;break}}return re.delete(f),re.delete(R),ut}function zt(f,R){var P,k,Y=f.__data__;return((k=typeof(P=R))=="string"||k=="number"||k=="symbol"||k=="boolean"?P!=="__proto__":P===null)?Y[typeof R=="string"?"string":"hash"]:Y.map}function Ct(f,R){var P=function(k,Y){return k==null?void 0:k[Y]}(f,R);return Gt(P)?P:void 0}var pt=function(f){return b.call(f)};function on(f,R){return!!(R=R??9007199254740991)&&(typeof f=="number"||C.test(f))&&f>-1&&f%1==0&&f<R}function kt(f,R){if(g(f))return!1;var P=typeof f;return!(P!="number"&&P!="symbol"&&P!="boolean"&&f!=null&&!Ie(f))||c.test(f)||!u.test(f)||R!=null&&f in Object(R)}function En(f){return f==f&&!Se(f)}function wn(f,R){return function(P){return P!=null&&P[f]===R&&(R!==void 0||f in Object(P))}}(Z&&pt(new Z(new ArrayBuffer(1)))!="[object DataView]"||De&&pt(new De)!=i||Re&&pt(Re.resolve())!="[object Promise]"||G&&pt(new G)!=s||j&&pt(new j)!="[object WeakMap]")&&(pt=function(f){var R=b.call(f),P=R==l?f.constructor:void 0,k=P?yt(P):void 0;if(k)switch(k){case ge:return"[object DataView]";case oe:return i;case me:return"[object Promise]";case he:return s;case Ge:return"[object WeakMap]"}return R});var Rn=sn(function(f){var R;f=(R=f)==null?"":function(k){if(typeof k=="string")return k;if(Ie(k))return Ce?Ce.call(k):"";var Y=k+"";return Y=="0"&&1/k==-1/0?"-0":Y}(R);var P=[];return d.test(f)&&P.push(""),f.replace(h,function(k,Y,re,ve){P.push(re?ve.replace(y,"$1"):Y||k)}),P});function Lt(f){if(typeof f=="string"||Ie(f))return f;var R=f+"";return R=="0"&&1/f==-1/0?"-0":R}function yt(f){if(f!=null){try{return ae.call(f)}catch{}try{return f+""}catch{}}return""}function sn(f,R){if(typeof f!="function"||R&&typeof R!="function")throw new TypeError("Expected a function");var P=function(){var k=arguments,Y=R?R.apply(this,k):k[0],re=P.cache;if(re.has(Y))return re.get(Y);var ve=f.apply(this,k);return P.cache=re.set(Y,ve),ve};return P.cache=new(sn.Cache||ke),P}function Gn(f,R){return f===R||f!=f&&R!=R}function Nn(f){return function(R){return Ne(R)&&D(R)}(f)&&X.call(f,"callee")&&(!Ae.call(f,"callee")||b.call(f)==o)}sn.Cache=ke;var g=Array.isArray;function D(f){return f!=null&&pe(f.length)&&!z(f)}function z(f){var R=Se(f)?b.call(f):"";return R=="[object Function]"||R=="[object GeneratorFunction]"}function pe(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=9007199254740991}function Se(f){var R=typeof f;return!!f&&(R=="object"||R=="function")}function Ne(f){return!!f&&typeof f=="object"}function Ie(f){return typeof f=="symbol"||Ne(f)&&b.call(f)=="[object Symbol]"}var xe=B?function(f){return function(R){return f(R)}}(B):function(f){return Ne(f)&&pe(f.length)&&!!p[b.call(f)]};function Ue(f){return D(f)?at(f):rn(f)}function He(f){return f}n.exports=function(f,R,P){var k=g(f)?$:ue,Y=arguments.length<3;return k(f,Nt(R),P,Y,ze)}}).call(this,r(3),r(7)(e))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t){String.prototype.padEnd||(String.prototype.padEnd=function(r,a){return r>>=0,a=String(a!==void 0?a:" "),this.length>r?String(this):((r-=this.length)>a.length&&(a+=a.repeat(r/a.length)),String(this)+a.slice(0,r))})},function(e,t,r){function a(H,O,_){return O in H?Object.defineProperty(H,O,{value:_,enumerable:!0,configurable:!0,writable:!0}):H[O]=_,H}function n(H){if(Symbol.iterator in Object(H)||Object.prototype.toString.call(H)==="[object Arguments]")return Array.from(H)}function o(H){return function(O){if(Array.isArray(O)){for(var _=0,ae=new Array(O.length);_<O.length;_++)ae[_]=O[_];return ae}}(H)||n(H)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(H){if(Array.isArray(H))return H}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(H,O){if(!(H instanceof O))throw new TypeError("Cannot call a class as a function")}function u(H,O){for(var _=0;_<O.length;_++){var ae=O[_];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(H,ae.key,ae)}}function c(H){return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(H)}function d(H){return(d=typeof Symbol=="function"&&c(Symbol.iterator)==="symbol"?function(O){return c(O)}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":c(O)})(H)}function h(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function y(H){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)})(H)}function A(H,O){return(A=Object.setPrototypeOf||function(_,ae){return _.__proto__=ae,_})(H,O)}r.r(t);var C=r(0),p=r.n(C),m=r(5),E=r.n(m),w=r(4),S=r.n(w),x=r(6),M=r.n(x),T=r(2),B=r.n(T),$=r(1),J=r.n($);r(8);function ue(H,O){return i(H)||function(_,ae){var X=[],b=!0,fe=!1,de=void 0;try{for(var le,Ae=_[Symbol.iterator]();!(b=(le=Ae.next()).done)&&(X.push(le.value),!ae||X.length!==ae);b=!0);}catch(we){fe=!0,de=we}finally{try{b||Ae.return==null||Ae.return()}finally{if(fe)throw de}}return X}(H,O)||l()}var V=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"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",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d’Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2,["809","829","849"]],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["55","81","33","656","664","998","774","229"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3,["787","939"]],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]],ee=[["American Samoa",["oceania"],"as","1684"],["Anguilla",["america","carribean"],"ai","1264"],["Bermuda",["america","north-america"],"bm","1441"],["British Virgin Islands",["america","carribean"],"vg","1284"],["Cayman Islands",["america","carribean"],"ky","1345"],["Cook Islands",["oceania"],"ck","682"],["Falkland Islands",["america","south-america"],"fk","500"],["Faroe Islands",["europe"],"fo","298"],["Gibraltar",["europe"],"gi","350"],["Greenland",["america"],"gl","299"],["Jersey",["europe","eu-union"],"je","44",".... ......"],["Montserrat",["america","carribean"],"ms","1664"],["Niue",["asia"],"nu","683"],["Norfolk Island",["oceania"],"nf","672"],["Northern Mariana Islands",["oceania"],"mp","1670"],["Saint Barthélemy",["america","carribean"],"bl","590","",1],["Saint Helena",["africa"],"sh","290"],["Saint Martin",["america","carribean"],"mf","590","",2],["Saint Pierre and Miquelon",["america","north-america"],"pm","508"],["Sint Maarten",["america","carribean"],"sx","1721"],["Tokelau",["oceania"],"tk","690"],["Turks and Caicos Islands",["america","carribean"],"tc","1649"],["U.S. Virgin Islands",["america","carribean"],"vi","1340"],["Wallis and Futuna",["oceania"],"wf","681"]];function N(H,O,_,ae,X){return!_||X?H+"".padEnd(O.length,".")+" "+ae:H+"".padEnd(O.length,".")+" "+_}function L(H,O,_,ae,X){var b,fe,de=[];return fe=O===!0,[(b=[]).concat.apply(b,o(H.map(function(le){var Ae={name:le[0],regions:le[1],iso2:le[2],countryCode:le[3],dialCode:le[3],format:N(_,le[3],le[4],ae,X),priority:le[5]||0},we=[];return le[6]&&le[6].map(function(Pe){var Z=function(De){for(var Re=1;Re<arguments.length;Re++){var G=arguments[Re]!=null?arguments[Re]:{},j=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(j=j.concat(Object.getOwnPropertySymbols(G).filter(function(Q){return Object.getOwnPropertyDescriptor(G,Q).enumerable}))),j.forEach(function(Q){a(De,Q,G[Q])})}return De}({},Ae);Z.dialCode=le[3]+Pe,Z.isAreaCode=!0,Z.areaCodeLength=Pe.length,we.push(Z)}),we.length>0?(Ae.mainCode=!0,fe||O.constructor.name==="Array"&&O.includes(le[2])?(Ae.hasAreaCodes=!0,[Ae].concat(we)):(de=de.concat(we),[Ae])):[Ae]}))),de]}function W(H,O,_,ae){if(_!==null){var X=Object.keys(_),b=Object.values(_);X.forEach(function(fe,de){if(ae)return H.push([fe,b[de]]);var le=H.findIndex(function(we){return we[0]===fe});if(le===-1){var Ae=[fe];Ae[O]=b[de],H.push(Ae)}else H[le][O]=b[de]})}}function U(H,O){return O.length===0?H:H.map(function(_){var ae=O.findIndex(function(b){return b[0]===_[2]});if(ae===-1)return _;var X=O[ae];return X[1]&&(_[4]=X[1]),X[3]&&(_[5]=X[3]),X[2]&&(_[6]=X[2]),_})}var te=function H(O,_,ae,X,b,fe,de,le,Ae,we,Pe,Z,De,Re){s(this,H),this.filterRegions=function(K,ie){if(typeof K=="string"){var Ce=K;return ie.filter(function(q){return q.regions.some(function(ne){return ne===Ce})})}return ie.filter(function(q){return K.map(function(ne){return q.regions.some(function(ke){return ke===ne})}).some(function(ne){return ne})})},this.sortTerritories=function(K,ie){var Ce=[].concat(o(K),o(ie));return Ce.sort(function(q,ne){return q.name<ne.name?-1:q.name>ne.name?1:0}),Ce},this.getFilteredCountryList=function(K,ie,Ce){return K.length===0?ie:Ce?K.map(function(q){var ne=ie.find(function(ke){return ke.iso2===q});if(ne)return ne}).filter(function(q){return q}):ie.filter(function(q){return K.some(function(ne){return ne===q.iso2})})},this.localizeCountries=function(K,ie,Ce){for(var q=0;q<K.length;q++)ie[K[q].iso2]!==void 0?K[q].localName=ie[K[q].iso2]:ie[K[q].name]!==void 0&&(K[q].localName=ie[K[q].name]);return Ce||K.sort(function(ne,ke){return ne.localName<ke.localName?-1:ne.localName>ke.localName?1:0}),K},this.getCustomAreas=function(K,ie){for(var Ce=[],q=0;q<ie.length;q++){var ne=JSON.parse(JSON.stringify(K));ne.dialCode+=ie[q],Ce.push(ne)}return Ce},this.excludeCountries=function(K,ie){return ie.length===0?K:K.filter(function(Ce){return!ie.includes(Ce.iso2)})};var G=function(K,ie,Ce){var q=[];return W(q,1,K,!0),W(q,3,ie),W(q,2,Ce),q}(le,Ae,we),j=U(JSON.parse(JSON.stringify(V)),G),Q=U(JSON.parse(JSON.stringify(ee)),G),ge=ue(L(j,O,Z,De,Re),2),oe=ge[0],me=ge[1];if(_){var he=ue(L(Q,O,Z,De,Re),2),Ge=he[0];he[1],oe=this.sortTerritories(Ge,oe)}ae&&(oe=this.filterRegions(ae,oe)),this.onlyCountries=this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(X,oe,de.includes("onlyCountries")),fe),Pe,de.includes("onlyCountries")),this.preferredCountries=b.length===0?[]:this.localizeCountries(this.getFilteredCountryList(b,oe,de.includes("preferredCountries")),Pe,de.includes("preferredCountries")),this.hiddenAreaCodes=this.excludeCountries(this.getFilteredCountryList(X,me),fe)},Ee=function(H){function O(X){var b;s(this,O),(b=function(G,j){return!j||d(j)!=="object"&&typeof j!="function"?h(G):j}(this,y(O).call(this,X))).getProbableCandidate=S()(function(G){return G&&G.length!==0?b.state.onlyCountries.filter(function(j){return B()(j.name.toLowerCase(),G.toLowerCase())},h(h(b)))[0]:null}),b.guessSelectedCountry=S()(function(G,j,Q,ge){var oe;if(b.props.enableAreaCodes===!1&&(ge.some(function(Ge){if(B()(G,Ge.dialCode))return Q.some(function(K){if(Ge.iso2===K.iso2&&K.mainCode)return oe=K,!0}),!0}),oe))return oe;var me=Q.find(function(Ge){return Ge.iso2==j});if(G.trim()==="")return me;var he=Q.reduce(function(Ge,K){return B()(G,K.dialCode)&&(K.dialCode.length>Ge.dialCode.length||K.dialCode.length===Ge.dialCode.length&&K.priority<Ge.priority)?K:Ge},{dialCode:"",priority:10001},h(h(b)));return he.name?he:me}),b.updateCountry=function(G){var j,Q=b.state.onlyCountries;(j=G.indexOf(0)>="0"&&G.indexOf(0)<="9"?Q.find(function(ge){return ge.dialCode==+G}):Q.find(function(ge){return ge.iso2==G}))&&j.dialCode&&b.setState({selectedCountry:j,formattedNumber:b.props.disableCountryCode?"":b.formatNumber(j.dialCode,j)})},b.scrollTo=function(G,j){if(G){var Q=b.dropdownRef;if(Q&&document.body){var ge=Q.offsetHeight,oe=Q.getBoundingClientRect().top+document.body.scrollTop,me=oe+ge,he=G,Ge=he.getBoundingClientRect(),K=he.offsetHeight,ie=Ge.top+document.body.scrollTop,Ce=ie+K,q=ie-oe+Q.scrollTop,ne=ge/2-K/2;if(b.props.enableSearch?ie<oe+32:ie<oe)j&&(q-=ne),Q.scrollTop=q;else if(Ce>me){j&&(q+=ne);var ke=ge-K;Q.scrollTop=q-ke}}}},b.scrollToTop=function(){var G=b.dropdownRef;G&&document.body&&(G.scrollTop=0)},b.formatNumber=function(G,j){if(!j)return G;var Q,ge=j.format,oe=b.props,me=oe.disableCountryCode,he=oe.enableAreaCodeStretch,Ge=oe.enableLongNumbers,K=oe.autoFormat;if(me?((Q=ge.split(" ")).shift(),Q=Q.join(" ")):he&&j.isAreaCode?((Q=ge.split(" "))[1]=Q[1].replace(/\.+/,"".padEnd(j.areaCodeLength,".")),Q=Q.join(" ")):Q=ge,!G||G.length===0)return me?"":b.props.prefix;if(G&&G.length<2||!Q||!K)return me?G:b.props.prefix+G;var ie,Ce=M()(Q,function(q,ne){if(q.remainingText.length===0)return q;if(ne!==".")return{formattedText:q.formattedText+ne,remainingText:q.remainingText};var ke,tt=i(ke=q.remainingText)||n(ke)||l(),Je=tt[0],at=tt.slice(1);return{formattedText:q.formattedText+Je,remainingText:at}},{formattedText:"",remainingText:G.split("")});return(ie=Ge?Ce.formattedText+Ce.remainingText.join(""):Ce.formattedText).includes("(")&&!ie.includes(")")&&(ie+=")"),ie},b.cursorToEnd=function(){var G=b.numberInputRef;if(document.activeElement===G){G.focus();var j=G.value.length;G.value.charAt(j-1)===")"&&(j-=1),G.setSelectionRange(j,j)}},b.getElement=function(G){return b["flag_no_".concat(G)]},b.getCountryData=function(){return b.state.selectedCountry?{name:b.state.selectedCountry.name||"",dialCode:b.state.selectedCountry.dialCode||"",countryCode:b.state.selectedCountry.iso2||"",format:b.state.selectedCountry.format||""}:{}},b.handleFlagDropdownClick=function(G){if(G.preventDefault(),b.state.showDropdown||!b.props.disabled){var j=b.state,Q=j.preferredCountries,ge=j.onlyCountries,oe=j.selectedCountry,me=b.concatPreferredCountries(Q,ge).findIndex(function(he){return he.dialCode===oe.dialCode&&he.iso2===oe.iso2});b.setState({showDropdown:!b.state.showDropdown,highlightCountryIndex:me},function(){b.state.showDropdown&&b.scrollTo(b.getElement(b.state.highlightCountryIndex))})}},b.handleInput=function(G){var j=G.target.value,Q=b.props,ge=Q.prefix,oe=Q.onChange,me=b.props.disableCountryCode?"":ge,he=b.state.selectedCountry,Ge=b.state.freezeSelection;if(!b.props.countryCodeEditable){var K=ge+(he.hasAreaCodes?b.state.onlyCountries.find(function(ze){return ze.iso2===he.iso2&&ze.mainCode}).dialCode:he.dialCode);if(j.slice(0,K.length)!==K)return}if(j===ge)return oe&&oe("",b.getCountryData(),G,""),b.setState({formattedNumber:""});if(!(j.replace(/\D/g,"").length>15&&(b.props.enableLongNumbers===!1||typeof b.props.enableLongNumbers=="number"&&j.replace(/\D/g,"").length>b.props.enableLongNumbers))&&j!==b.state.formattedNumber){G.preventDefault?G.preventDefault():G.returnValue=!1;var ie=b.props.country,Ce=b.state,q=Ce.onlyCountries,ne=Ce.selectedCountry,ke=Ce.hiddenAreaCodes;if(oe&&G.persist(),j.length>0){var tt=j.replace(/\D/g,"");(!b.state.freezeSelection||ne&&ne.dialCode.length>tt.length)&&(he=b.props.disableCountryGuess?ne:b.guessSelectedCountry(tt.substring(0,6),ie,q,ke)||ne,Ge=!1),me=b.formatNumber(tt,he),he=he.dialCode?he:ne}var Je=G.target.selectionStart,at=G.target.selectionStart,lt=b.state.formattedNumber,vt=me.length-lt.length;b.setState({formattedNumber:me,freezeSelection:Ge,selectedCountry:he},function(){vt>0&&(at-=vt),me.charAt(me.length-1)==")"?b.numberInputRef.setSelectionRange(me.length-1,me.length-1):at>0&<.length>=me.length?b.numberInputRef.setSelectionRange(at,at):Je<lt.length&&b.numberInputRef.setSelectionRange(Je,Je),oe&&oe(me.replace(/[^0-9]+/g,""),b.getCountryData(),G,me)})}},b.handleInputClick=function(G){b.setState({showDropdown:!1}),b.props.onClick&&b.props.onClick(G,b.getCountryData())},b.handleDoubleClick=function(G){var j=G.target.value.length;G.target.setSelectionRange(0,j)},b.handleFlagItemClick=function(G,j){var Q=b.state.selectedCountry,ge=b.state.onlyCountries.find(function(Ge){return Ge==G});if(ge){var oe=b.state.formattedNumber.replace(" ","").replace("(","").replace(")","").replace("-",""),me=oe.length>1?oe.replace(Q.dialCode,ge.dialCode):ge.dialCode,he=b.formatNumber(me.replace(/\D/g,""),ge);b.setState({showDropdown:!1,selectedCountry:ge,freezeSelection:!0,formattedNumber:he,searchValue:""},function(){b.cursorToEnd(),b.props.onChange&&b.props.onChange(he.replace(/[^0-9]+/g,""),b.getCountryData(),j,he)})}},b.handleInputFocus=function(G){b.numberInputRef&&b.numberInputRef.value===b.props.prefix&&b.state.selectedCountry&&!b.props.disableCountryCode&&b.setState({formattedNumber:b.props.prefix+b.state.selectedCountry.dialCode},function(){b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)}),b.setState({placeholder:""}),b.props.onFocus&&b.props.onFocus(G,b.getCountryData()),b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)},b.handleInputBlur=function(G){G.target.value||b.setState({placeholder:b.props.placeholder}),b.props.onBlur&&b.props.onBlur(G,b.getCountryData())},b.handleInputCopy=function(G){if(b.props.copyNumbersOnly){var j=window.getSelection().toString().replace(/[^0-9]+/g,"");G.clipboardData.setData("text/plain",j),G.preventDefault()}},b.getHighlightCountryIndex=function(G){var j=b.state.highlightCountryIndex+G;return j<0||j>=b.state.onlyCountries.length+b.state.preferredCountries.length?j-G:b.props.enableSearch&&j>b.getSearchFilteredCountries().length?0:j},b.searchCountry=function(){var G=b.getProbableCandidate(b.state.queryString)||b.state.onlyCountries[0],j=b.state.onlyCountries.findIndex(function(Q){return Q==G})+b.state.preferredCountries.length;b.scrollTo(b.getElement(j),!0),b.setState({queryString:"",highlightCountryIndex:j})},b.handleKeydown=function(G){var j=b.props.keys,Q=G.target.className;if(Q.includes("selected-flag")&&G.which===j.ENTER&&!b.state.showDropdown)return b.handleFlagDropdownClick(G);if(Q.includes("form-control")&&(G.which===j.ENTER||G.which===j.ESC))return G.target.blur();if(b.state.showDropdown&&!b.props.disabled&&(!Q.includes("search-box")||G.which===j.UP||G.which===j.DOWN||G.which===j.ENTER||G.which===j.ESC&&G.target.value==="")){G.preventDefault?G.preventDefault():G.returnValue=!1;var ge=function(oe){b.setState({highlightCountryIndex:b.getHighlightCountryIndex(oe)},function(){b.scrollTo(b.getElement(b.state.highlightCountryIndex),!0)})};switch(G.which){case j.DOWN:ge(1);break;case j.UP:ge(-1);break;case j.ENTER:b.props.enableSearch?b.handleFlagItemClick(b.getSearchFilteredCountries()[b.state.highlightCountryIndex]||b.getSearchFilteredCountries()[0],G):b.handleFlagItemClick([].concat(o(b.state.preferredCountries),o(b.state.onlyCountries))[b.state.highlightCountryIndex],G);break;case j.ESC:case j.TAB:b.setState({showDropdown:!1},b.cursorToEnd);break;default:(G.which>=j.A&&G.which<=j.Z||G.which===j.SPACE)&&b.setState({queryString:b.state.queryString+String.fromCharCode(G.which)},b.state.debouncedQueryStingSearcher)}}},b.handleInputKeyDown=function(G){var j=b.props,Q=j.keys,ge=j.onEnterKeyPress,oe=j.onKeyDown;G.which===Q.ENTER&&ge&&ge(G),oe&&oe(G)},b.handleClickOutside=function(G){b.dropdownRef&&!b.dropdownContainerRef.contains(G.target)&&b.state.showDropdown&&b.setState({showDropdown:!1})},b.handleSearchChange=function(G){var j=G.currentTarget.value,Q=b.state,ge=Q.preferredCountries,oe=Q.selectedCountry,me=0;if(j===""&&oe){var he=b.state.onlyCountries;me=b.concatPreferredCountries(ge,he).findIndex(function(Ge){return Ge==oe}),setTimeout(function(){return b.scrollTo(b.getElement(me))},100)}b.setState({searchValue:j,highlightCountryIndex:me})},b.concatPreferredCountries=function(G,j){return G.length>0?o(new Set(G.concat(j))):j},b.getDropdownCountryName=function(G){return G.localName||G.name},b.getSearchFilteredCountries=function(){var G=b.state,j=G.preferredCountries,Q=G.onlyCountries,ge=G.searchValue,oe=b.props.enableSearch,me=b.concatPreferredCountries(j,Q),he=ge.trim().toLowerCase().replace("+","");if(oe&&he){if(/^\d+$/.test(he))return me.filter(function(ie){var Ce=ie.dialCode;return["".concat(Ce)].some(function(q){return q.toLowerCase().includes(he)})});var Ge=me.filter(function(ie){var Ce=ie.iso2;return["".concat(Ce)].some(function(q){return q.toLowerCase().includes(he)})}),K=me.filter(function(ie){var Ce=ie.name,q=ie.localName;return ie.iso2,["".concat(Ce),"".concat(q||"")].some(function(ne){return ne.toLowerCase().includes(he)})});return b.scrollToTop(),o(new Set([].concat(Ge,K)))}return me},b.getCountryDropdownList=function(){var G=b.state,j=G.preferredCountries,Q=G.highlightCountryIndex,ge=G.showDropdown,oe=G.searchValue,me=b.props,he=me.disableDropdown,Ge=me.prefix,K=b.props,ie=K.enableSearch,Ce=K.searchNotFound,q=K.disableSearchIcon,ne=K.searchClass,ke=K.searchStyle,tt=K.searchPlaceholder,Je=K.autocompleteSearch,at=b.getSearchFilteredCountries().map(function(ze,Rt){var Wt=Q===Rt,nn=J()({country:!0,preferred:ze.iso2==="us"||ze.iso2==="gb",active:ze.iso2==="us",highlight:Wt}),ht="flag ".concat(ze.iso2);return p.a.createElement("li",Object.assign({ref:function(Gt){return b["flag_no_".concat(Rt)]=Gt},key:"flag_no_".concat(Rt),"data-flag-key":"flag_no_".concat(Rt),className:nn,"data-dial-code":"1",tabIndex:he?"-1":"0","data-country-code":ze.iso2,onClick:function(Gt){return b.handleFlagItemClick(ze,Gt)},role:"option"},Wt?{"aria-selected":!0}:{}),p.a.createElement("div",{className:ht}),p.a.createElement("span",{className:"country-name"},b.getDropdownCountryName(ze)),p.a.createElement("span",{className:"dial-code"},ze.format?b.formatNumber(ze.dialCode,ze):Ge+ze.dialCode))}),lt=p.a.createElement("li",{key:"dashes",className:"divider"});j.length>0&&(!ie||ie&&!oe.trim())&&at.splice(j.length,0,lt);var vt=J()(a({"country-list":!0,hide:!ge},b.props.dropdownClass,!0));return p.a.createElement("ul",{ref:function(ze){return!ie&&ze&&ze.focus(),b.dropdownRef=ze},className:vt,style:b.props.dropdownStyle,role:"listbox",tabIndex:"0"},ie&&p.a.createElement("li",{className:J()(a({search:!0},ne,ne))},!q&&p.a.createElement("span",{className:J()(a({"search-emoji":!0},"".concat(ne,"-emoji"),ne)),role:"img","aria-label":"Magnifying glass"},"🔎"),p.a.createElement("input",{className:J()(a({"search-box":!0},"".concat(ne,"-box"),ne)),style:ke,type:"search",placeholder:tt,autoFocus:!0,autoComplete:Je?"on":"off",value:oe,onChange:b.handleSearchChange})),at.length>0?at:p.a.createElement("li",{className:"no-entries-message"},p.a.createElement("span",null,Ce)))};var fe,de=new te(X.enableAreaCodes,X.enableTerritories,X.regions,X.onlyCountries,X.preferredCountries,X.excludeCountries,X.preserveOrder,X.masks,X.priority,X.areaCodes,X.localization,X.prefix,X.defaultMask,X.alwaysDefaultMask),le=de.onlyCountries,Ae=de.preferredCountries,we=de.hiddenAreaCodes,Pe=X.value?X.value.replace(/\D/g,""):"";fe=X.disableInitialCountryGuess?0:Pe.length>1?b.guessSelectedCountry(Pe.substring(0,6),X.country,le,we)||0:X.country&&le.find(function(G){return G.iso2==X.country})||0;var Z,De=Pe.length<2&&fe&&!B()(Pe,fe.dialCode)?fe.dialCode:"";Z=Pe===""&&fe===0?"":b.formatNumber((X.disableCountryCode?"":De)+Pe,fe.name?fe:void 0);var Re=le.findIndex(function(G){return G==fe});return b.state={showDropdown:X.showDropdown,formattedNumber:Z,onlyCountries:le,preferredCountries:Ae,hiddenAreaCodes:we,selectedCountry:fe,highlightCountryIndex:Re,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:E()(b.searchCountry,250),searchValue:""},b}var _,ae;return function(X,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");X.prototype=Object.create(b&&b.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),b&&A(X,b)}(O,H),_=O,(ae=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(X,b,fe){X.country!==this.props.country?this.updateCountry(this.props.country):X.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(X){if(X===null)return this.setState({selectedCountry:0,formattedNumber:""});var b=this.state,fe=b.onlyCountries,de=b.selectedCountry,le=b.hiddenAreaCodes,Ae=this.props,we=Ae.country,Pe=Ae.prefix;if(X==="")return this.setState({selectedCountry:de,formattedNumber:""});var Z,De,Re=X.replace(/\D/g,"");if(de&&B()(X,Pe+de.dialCode))De=this.formatNumber(Re,de),this.setState({formattedNumber:De});else{var G=(Z=this.props.disableCountryGuess?de:this.guessSelectedCountry(Re.substring(0,6),we,fe,le)||de)&&B()(Re,Pe+Z.dialCode)?Z.dialCode:"";De=this.formatNumber((this.props.disableCountryCode?"":G)+Re,Z||void 0),this.setState({selectedCountry:Z,formattedNumber:De})}}},{key:"render",value:function(){var X,b,fe,de=this,le=this.state,Ae=le.onlyCountries,we=le.selectedCountry,Pe=le.showDropdown,Z=le.formattedNumber,De=le.hiddenAreaCodes,Re=this.props,G=Re.disableDropdown,j=Re.renderStringAsFlag,Q=Re.isValid,ge=Re.defaultErrorMessage,oe=Re.specialLabel;if(typeof Q=="boolean")b=Q;else{var me=Q(Z.replace(/\D/g,""),we,Ae,De);typeof me=="boolean"?(b=me)===!1&&(fe=ge):(b=!1,fe=me)}var he=J()((a(X={},this.props.containerClass,!0),a(X,"react-tel-input",!0),X)),Ge=J()({arrow:!0,up:Pe}),K=J()(a({"form-control":!0,"invalid-number":!b,open:Pe},this.props.inputClass,!0)),ie=J()({"selected-flag":!0,open:Pe}),Ce=J()(a({"flag-dropdown":!0,"invalid-number":!b,open:Pe},this.props.buttonClass,!0)),q="flag ".concat(we&&we.iso2);return p.a.createElement("div",{className:"".concat(he," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},oe&&p.a.createElement("div",{className:"special-label"},oe),fe&&p.a.createElement("div",{className:"invalid-number-message"},fe),p.a.createElement("input",Object.assign({className:K,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:Z,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(ne){de.numberInputRef=ne,typeof de.props.inputProps.ref=="function"?de.props.inputProps.ref(ne):typeof de.props.inputProps.ref=="object"&&(de.props.inputProps.ref.current=ne)}})),p.a.createElement("div",{className:Ce,style:this.props.buttonStyle,ref:function(ne){return de.dropdownContainerRef=ne}},j?p.a.createElement("div",{className:ie},j):p.a.createElement("div",{onClick:G?void 0:this.handleFlagDropdownClick,className:ie,title:we?"".concat(we.localName||we.name,": + ").concat(we.dialCode):"",tabIndex:G?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!Pe||void 0},p.a.createElement("div",{className:q},!G&&p.a.createElement("div",{className:Ge}))),Pe&&this.getCountryDropdownList()))}}])&&u(_.prototype,ae),O}(p.a.Component);Ee.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t.default=Ee}]);const mb=Ws(gb),Os=({value:e,onChange:t,error:r,onBlur:a,id:n,name:o,required:i,defaultCountry:l="us",className:s,responsive:u=!1,enableSearch:c=!0,autoComplete:d})=>{const h=(y,A)=>{t("+"+y,A.countryCode)};return v.jsxs("div",{className:s,children:[v.jsx("div",{className:Me("movmo-phone-input flex items-center px-3.5 py-0 h-10 rounded-lg border",u&&"movmo-phone-input-responsive",r?"border-error-500 focus:ring-error-500":"border-grayWarm-300 focus-within:ring-2 focus-within:ring-grayWarm-950"),children:v.jsx(mb,{country:l,value:e.replace("+",""),onChange:h,inputProps:{onBlur:a,required:i,id:n,name:o,...d&&{autoComplete:d}},enableSearch:c,autoFormat:!0})}),r&&v.jsx("p",{className:"text-error-500 text-xs mt-1",children:r})]})},Fs=({email:e,phone:t,otpLength:r,otpAction:a,onVerify:n,onClose:o,externalError:i,title:l,description:s})=>{const[u,c]=F.useState("".padStart(r,"")),[d,h]=F.useState(null),y=(p,m)=>{if(!/^\d*$/.test(p))return;const E=u.split("");if(E[m]=p.slice(-1),c(E.join("")),d&&h(null),p&&m<r-1){const w=document.getElementById(`otp-input-${m+1}`);w&&w.focus()}},A=p=>{p.preventDefault();const E=p.clipboardData.getData("text/plain").replace(/\D/g,"");if(E.length>0){const w=u.split("");for(let T=0;T<Math.min(E.length,r);T++)w[T]=E[T];c(w.join("")),d&&h(null);const S=w.findIndex(T=>T===""),x=S!==-1?S:r-1,M=document.getElementById(`otp-input-${x}`);M&&M.focus()}},C=p=>{const m=u.split("");if(m[p]="",c(m.join("")),p>0){const E=document.getElementById(`otp-input-${p-1}`);E&&E.focus()}};return F.useEffect(()=>{u.length===r&&!u.includes(" ")&&u.trim().length===r&&n(u)},[u,r,n]),F.useEffect(()=>{const p=m=>{m.key==="Escape"&&o()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[o]),v.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[110]",children:v.jsxs($r,{className:"min-w-[400px] rounded-lg max-w-screen-sm",children:[v.jsx(Qr,{className:"p-4 border-b border-grayWarm-200",children:v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("button",{onClick:o,className:"w-8 h-8 flex items-center justify-center bg-grayWarm-100 hover:bg-grayWarm-200 rounded-lg transition-colors","aria-label":"Close modal",children:v.jsx("svg",{className:"w-4 h-4 text-grayWarm-600",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),v.jsx("h2",{className:"text-xl md:text-lg font-bold text-center flex-1",children:l||"Verify Account"}),v.jsx("div",{className:"w-8"})]})}),v.jsxs(Kr,{className:"p-4 text-center",children:[v.jsxs("div",{className:"text-center mb-3",children:[v.jsx("p",{className:"text-sm md:text-md text-grayWarm-600",children:s||`Enter the ${r}-digit code we sent to`}),!s&&v.jsx("p",{className:"text-sm md:text-md text-grayWarm-600 mt-1",children:a===rt.OTPAction.EMAILED?e:t})]}),v.jsx("div",{className:"flex justify-center gap-2 mb-6",children:Array.from({length:r}).map((p,m)=>v.jsx("input",{type:"text",maxLength:1,className:"w-10 h-16 border border-grayWarm-300 shadow-xs rounded-md text-center text-lg focus:outline-none focus:ring-2 focus:ring-grayWarm-950",value:u[m]||"",onChange:E=>y(E.target.value,m),onPaste:A,id:`otp-input-${m}`,"data-testid":`otp-input-${m}`,onKeyDown:E=>{E.key==="Backspace"&&C(m)}},m))}),(d||i)&&v.jsx("p",{className:"text-error-500 text-center text-sm mb-4",children:i||d})]})]})})},Ms=e=>/^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/.test(e),vb={us:{dialCode:"1",lengths:[10]},ca:{dialCode:"1",lengths:[10]},gb:{dialCode:"44",lengths:[10]},au:{dialCode:"61",lengths:[9]},de:{dialCode:"49",lengths:[10,11]},fr:{dialCode:"33",lengths:[9]},it:{dialCode:"39",lengths:[9,10]},es:{dialCode:"34",lengths:[9]},jp:{dialCode:"81",lengths:[10,11]},kr:{dialCode:"82",lengths:[10,11]},in:{dialCode:"91",lengths:[10]},br:{dialCode:"55",lengths:[10,11]},mx:{dialCode:"52",lengths:[10]},cn:{dialCode:"86",lengths:[11]}};function Yr(e,t){if(!e||!e.startsWith("+"))return!1;const r=e.slice(1);if(!/^\d+$/.test(r))return!1;if(t){const a=vb[t.toLowerCase()];if(a){if(!r.startsWith(a.dialCode))return!1;const n=r.slice(a.dialCode.length);return a.lengths.includes(n.length)}}return r.length>=7&&r.length<=15}const hb=({isOpen:e,onClose:t,loginUser:r,verifyOTP:a,getCurrentUser:n,onLoginSuccess:o})=>{const[i,l]=F.useState(""),[s,u]=F.useState(null),[c,d]=F.useState(""),[h,y]=F.useState(null),[A,C]=F.useState(!1),[p,m]=F.useState(null),[E,w]=F.useState(6),[S,x]=F.useState(null),[M,T]=F.useState(!1),[B,$]=F.useState(""),[J,ue]=F.useState(rt.OTPAction.EMAILED),[V,ee]=F.useState("us"),N=O=>{const _=O.target.value;l(_),s&&u(null)},L=(O,_)=>{d(O),ee(_),h&&y(null)},W=()=>{c&&!Yr(c,V)&&y("Please enter a valid phone number")},U=async()=>{let O=!1;if((!i||!Ms(i))&&(u("Please enter a valid email address"),O=!0),Yr(c,V)||(y("Please enter a valid phone number"),O=!0),!O){T(!0);try{const _=await r(i,c,rt.AuthenticationUsernameType.EMAIL);m(_.session),$(_.username||i),_.challengeName&&(w(8),x(_.challengeName),ue(_.challengeName===rt.AuthenticationChallengeName.SMS_OTP?rt.OTPAction.TEXTED:rt.OTPAction.EMAILED)),C(!0),t()}catch(_){console.error("Error sending OTP:",_),u("An error occurred. Please try again.")}finally{T(!1)}}},te=async O=>{if(p)try{await a(B,O,p,S);const _=await n();o(_),C(!1),l(""),$(""),m(null),w(6),ue(rt.OTPAction.EMAILED),x(null)}catch(_){console.error("Error verifying OTP:",_)}},Ee=()=>{C(!1),l(""),$(""),d(""),y(null),m(null),w(6),ue(rt.OTPAction.EMAILED),x(null)},H=()=>{u(null),y(null),A||(l(""),d("")),t()};return v.jsxs(v.Fragment,{children:[v.jsx(pr,{isOpen:e,onClose:H,title:"Sign in to Movmo",maxWidthPx:398,children:v.jsxs("form",{onSubmit:O=>{O.preventDefault(),U()},className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx(At,{id:"sign-in-email",type:"email",placeholder:"Email",required:!0,value:i,onChange:N,className:`w-full ${s?"border-error-500 focus:ring-error-500":""} autofill:bg-white autofill:shadow-[inset_0_0_0px_1000px_white]`,autoFocus:!0}),s&&v.jsx("p",{className:"text-error-500 text-xs mt-1",children:s})]}),v.jsx(Os,{value:c,onChange:L,onBlur:W,error:h,required:!0,id:"sign-in-phone",name:"sign-in-phone"}),v.jsx("button",{type:"submit",disabled:M,className:"w-full py-3 px-4 bg-gradient-to-r from-[#E91E63] to-[#E91E63] hover:from-[#D81B60] hover:to-[#D81B60] text-white font-semibold rounded-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:M?"Loading...":"Continue"})]})}),A&&v.jsx(Fs,{email:i,phone:c,otpLength:E,otpAction:J,onVerify:te,onClose:Ee})]})};exports.Avatar=_i;exports.AvatarFallback=Zi;exports.AvatarImage=Xi;exports.Badge=Oi;exports.Button=Ao;exports.COUNTRY_OPTIONS=zr;exports.CURRENCY_OPTIONS=gr;exports.Card=$r;exports.CardContent=Kr;exports.CardDescription=Po;exports.CardFooter=Oo;exports.CardHeader=Qr;exports.CardTitle=To;exports.Checkbox=Pi;exports.Chip=vs;exports.CurrencyModal=bb;exports.DEFAULT_LOCALE=Ts;exports.DateDropdowns=Hr;exports.IconButton=Fi;exports.Input=At;exports.LOCALE_OPTIONS=br;exports.LOCALE_STORAGE_KEY=sb;exports.LocaleModal=db;exports.Modal=pr;exports.OTPModal=Fs;exports.Pagination=gs;exports.PassengerForm=rb;exports.PassengerFormSkeleton=ib;exports.PhoneInput=Os;exports.SearchInput=ms;exports.SelectDropdown=Cn;exports.Separator=No;exports.SignInModal=hb;exports.Textarea=bs;exports.Toggle=$i;exports.ToggleGroup=fs;exports.ToggleGroupItem=ps;exports.findCurrencyOption=pb;exports.findLocaleOption=lb;exports.getCurrencyDisplayText=Ps;exports.getLanguageDisplayName=ub;exports.validateEmail=Ms;exports.validatePhoneNumber=Yr;
|
|
114
|
+
*/(function(){var n={}.hasOwnProperty;function o(){for(var i=[],l=0;l<arguments.length;l++){var s=arguments[l];if(s){var u=typeof s;if(u==="string"||u==="number")i.push(s);else if(Array.isArray(s)&&s.length){var c=o.apply(null,s);c&&i.push(c)}else if(u==="object")for(var d in s)n.call(s,d)&&s[d]&&i.push(d)}}return i.join(" ")}e.exports?(o.default=o,e.exports=o):(a=(function(){return o}).apply(t,[]))===void 0||(e.exports=a)})()},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,y=d.Symbol,A=y?y.prototype:void 0,C=A?A.toString:void 0;function p(S){if(typeof S=="string")return S;if(E(S))return C?C.call(S):"";var x=S+"";return x=="0"&&1/S==-1/0?"-0":x}function m(S){var x=typeof S;return!!S&&(x=="object"||x=="function")}function E(S){return typeof S=="symbol"||function(x){return!!x&&typeof x=="object"}(S)&&h.call(S)=="[object Symbol]"}function w(S){return S?(S=function(x){if(typeof x=="number")return x;if(E(x))return NaN;if(m(x)){var M=typeof x.valueOf=="function"?x.valueOf():x;x=m(M)?M+"":M}if(typeof x!="string")return x===0?x:+x;x=x.replace(n,"");var T=i.test(x);return T||l.test(x)?s(x.slice(2),T?2:8):o.test(x)?NaN:+x}(S))===1/0||S===-1/0?17976931348623157e292*(S<0?-1:1):S==S?S:0:S===0?S:0}e.exports=function(S,x,M){var T,B,$,J;return S=(T=S)==null?"":p(T),B=function(ue){var V=w(ue),ee=V%1;return V==V?ee?V-ee:V:0}(M),$=0,J=S.length,B==B&&(J!==void 0&&(B=B<=J?B:J),$!==void 0&&(B=B>=$?B:$)),M=B,x=p(x),S.slice(M,M+x.length)==x}}).call(this,r(3))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(a){var n=/^\[object .+?Constructor\]$/,o=typeof a=="object"&&a&&a.Object===Object&&a,i=typeof self=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),s,u=Array.prototype,c=Function.prototype,d=Object.prototype,h=l["__core-js_shared__"],y=(s=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"",A=c.toString,C=d.hasOwnProperty,p=d.toString,m=RegExp("^"+A.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=u.splice,w=ue(l,"Map"),S=ue(Object,"create");function x(N){var L=-1,W=N?N.length:0;for(this.clear();++L<W;){var U=N[L];this.set(U[0],U[1])}}function M(N){var L=-1,W=N?N.length:0;for(this.clear();++L<W;){var U=N[L];this.set(U[0],U[1])}}function T(N){var L=-1,W=N?N.length:0;for(this.clear();++L<W;){var U=N[L];this.set(U[0],U[1])}}function B(N,L){for(var W,U,te=N.length;te--;)if((W=N[te][0])===(U=L)||W!=W&&U!=U)return te;return-1}function $(N){return!(!ee(N)||(L=N,y&&y in L))&&(function(W){var U=ee(W)?p.call(W):"";return U=="[object Function]"||U=="[object GeneratorFunction]"}(N)||function(W){var U=!1;if(W!=null&&typeof W.toString!="function")try{U=!!(W+"")}catch{}return U}(N)?m:n).test(function(W){if(W!=null){try{return A.call(W)}catch{}try{return W+""}catch{}}return""}(N));var L}function J(N,L){var W,U,te=N.__data__;return((U=typeof(W=L))=="string"||U=="number"||U=="symbol"||U=="boolean"?W!=="__proto__":W===null)?te[typeof L=="string"?"string":"hash"]:te.map}function ue(N,L){var W=function(U,te){return U==null?void 0:U[te]}(N,L);return $(W)?W:void 0}function V(N,L){if(typeof N!="function"||L&&typeof L!="function")throw new TypeError("Expected a function");var W=function(){var U=arguments,te=L?L.apply(this,U):U[0],Ee=W.cache;if(Ee.has(te))return Ee.get(te);var H=N.apply(this,U);return W.cache=Ee.set(te,H),H};return W.cache=new(V.Cache||T),W}function ee(N){var L=typeof N;return!!N&&(L=="object"||L=="function")}x.prototype.clear=function(){this.__data__=S?S(null):{}},x.prototype.delete=function(N){return this.has(N)&&delete this.__data__[N]},x.prototype.get=function(N){var L=this.__data__;if(S){var W=L[N];return W==="__lodash_hash_undefined__"?void 0:W}return C.call(L,N)?L[N]:void 0},x.prototype.has=function(N){var L=this.__data__;return S?L[N]!==void 0:C.call(L,N)},x.prototype.set=function(N,L){return this.__data__[N]=S&&L===void 0?"__lodash_hash_undefined__":L,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(N){var L=this.__data__,W=B(L,N);return!(W<0)&&(W==L.length-1?L.pop():E.call(L,W,1),!0)},M.prototype.get=function(N){var L=this.__data__,W=B(L,N);return W<0?void 0:L[W][1]},M.prototype.has=function(N){return B(this.__data__,N)>-1},M.prototype.set=function(N,L){var W=this.__data__,U=B(W,N);return U<0?W.push([N,L]):W[U][1]=L,this},T.prototype.clear=function(){this.__data__={hash:new x,map:new(w||M),string:new x}},T.prototype.delete=function(N){return J(this,N).delete(N)},T.prototype.get=function(N){return J(this,N).get(N)},T.prototype.has=function(N){return J(this,N).has(N)},T.prototype.set=function(N,L){return J(this,N).set(N,L),this},V.Cache=T,e.exports=V}).call(this,r(3))},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,y=Math.max,A=Math.min,C=function(){return d.Date.now()};function p(E){var w=typeof E;return!!E&&(w=="object"||w=="function")}function m(E){if(typeof E=="number")return E;if(function(x){return typeof x=="symbol"||function(M){return!!M&&typeof M=="object"}(x)&&h.call(x)=="[object Symbol]"}(E))return NaN;if(p(E)){var w=typeof E.valueOf=="function"?E.valueOf():E;E=p(w)?w+"":w}if(typeof E!="string")return E===0?E:+E;E=E.replace(n,"");var S=i.test(E);return S||l.test(E)?s(E.slice(2),S?2:8):o.test(E)?NaN:+E}e.exports=function(E,w,S){var x,M,T,B,$,J,ue=0,V=!1,ee=!1,N=!0;if(typeof E!="function")throw new TypeError("Expected a function");function L(O){var _=x,ae=M;return x=M=void 0,ue=O,B=E.apply(ae,_)}function W(O){return ue=O,$=setTimeout(te,w),V?L(O):B}function U(O){var _=O-J;return J===void 0||_>=w||_<0||ee&&O-ue>=T}function te(){var O=C();if(U(O))return Ee(O);$=setTimeout(te,function(_){var ae=w-(_-J);return ee?A(ae,T-(_-ue)):ae}(O))}function Ee(O){return $=void 0,N&&x?L(O):(x=M=void 0,B)}function H(){var O=C(),_=U(O);if(x=arguments,M=this,J=O,_){if($===void 0)return W(J);if(ee)return $=setTimeout(te,w),L(J)}return $===void 0&&($=setTimeout(te,w)),B}return w=m(w)||0,p(S)&&(V=!!S.leading,T=(ee="maxWait"in S)?y(m(S.maxWait)||0,w):T,N="trailing"in S?!!S.trailing:N),H.cancel=function(){$!==void 0&&clearTimeout($),ue=0,x=J=M=$=void 0},H.flush=function(){return $===void 0?B:Ee(C())},H}}).call(this,r(3))},function(e,t,r){(function(a,n){var o="[object Arguments]",i="[object Map]",l="[object Object]",s="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y=/\\(\\)?/g,A=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[o]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[i]=p["[object Number]"]=p[l]=p["[object RegExp]"]=p[s]=p["[object String]"]=p["[object WeakMap]"]=!1;var m=typeof a=="object"&&a&&a.Object===Object&&a,E=typeof self=="object"&&self&&self.Object===Object&&self,w=m||E||Function("return this")(),S=t&&!t.nodeType&&t,x=S&&typeof n=="object"&&n&&!n.nodeType&&n,M=x&&x.exports===S&&m.process,T=function(){try{return M&&M.binding("util")}catch{}}(),B=T&&T.isTypedArray;function $(f,R,P,k){var Y=-1,re=f?f.length:0;for(k&&re&&(P=f[++Y]);++Y<re;)P=R(P,f[Y],Y,f);return P}function J(f,R){for(var P=-1,k=f?f.length:0;++P<k;)if(R(f[P],P,f))return!0;return!1}function ue(f,R,P,k,Y){return Y(f,function(re,ve,Le){P=k?(k=!1,re):R(P,re,ve,Le)}),P}function V(f){var R=!1;if(f!=null&&typeof f.toString!="function")try{R=!!(f+"")}catch{}return R}function ee(f){var R=-1,P=Array(f.size);return f.forEach(function(k,Y){P[++R]=[Y,k]}),P}function N(f){var R=-1,P=Array(f.size);return f.forEach(function(k){P[++R]=k}),P}var L,W,U,te=Array.prototype,Ee=Function.prototype,H=Object.prototype,O=w["__core-js_shared__"],_=(L=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",ae=Ee.toString,X=H.hasOwnProperty,b=H.toString,fe=RegExp("^"+ae.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),de=w.Symbol,le=w.Uint8Array,Ae=H.propertyIsEnumerable,we=te.splice,Pe=(W=Object.keys,U=Object,function(f){return W(U(f))}),Z=Ct(w,"DataView"),De=Ct(w,"Map"),Re=Ct(w,"Promise"),G=Ct(w,"Set"),j=Ct(w,"WeakMap"),Q=Ct(Object,"create"),ge=yt(Z),oe=yt(De),me=yt(Re),he=yt(G),Ge=yt(j),K=de?de.prototype:void 0,ie=K?K.valueOf:void 0,Ce=K?K.toString:void 0;function q(f){var R=-1,P=f?f.length:0;for(this.clear();++R<P;){var k=f[R];this.set(k[0],k[1])}}function ne(f){var R=-1,P=f?f.length:0;for(this.clear();++R<P;){var k=f[R];this.set(k[0],k[1])}}function ke(f){var R=-1,P=f?f.length:0;for(this.clear();++R<P;){var k=f[R];this.set(k[0],k[1])}}function tt(f){var R=-1,P=f?f.length:0;for(this.__data__=new ke;++R<P;)this.add(f[R])}function Je(f){this.__data__=new ne(f)}function at(f,R){var P=g(f)||Nn(f)?function(ve,Le){for(var Xe=-1,We=Array(ve);++Xe<ve;)We[Xe]=Le(Xe);return We}(f.length,String):[],k=P.length,Y=!!k;for(var re in f)!X.call(f,re)||Y&&(re=="length"||on(re,k))||P.push(re);return P}function lt(f,R){for(var P=f.length;P--;)if(Gn(f[P][0],R))return P;return-1}q.prototype.clear=function(){this.__data__=Q?Q(null):{}},q.prototype.delete=function(f){return this.has(f)&&delete this.__data__[f]},q.prototype.get=function(f){var R=this.__data__;if(Q){var P=R[f];return P==="__lodash_hash_undefined__"?void 0:P}return X.call(R,f)?R[f]:void 0},q.prototype.has=function(f){var R=this.__data__;return Q?R[f]!==void 0:X.call(R,f)},q.prototype.set=function(f,R){return this.__data__[f]=Q&&R===void 0?"__lodash_hash_undefined__":R,this},ne.prototype.clear=function(){this.__data__=[]},ne.prototype.delete=function(f){var R=this.__data__,P=lt(R,f);return!(P<0)&&(P==R.length-1?R.pop():we.call(R,P,1),!0)},ne.prototype.get=function(f){var R=this.__data__,P=lt(R,f);return P<0?void 0:R[P][1]},ne.prototype.has=function(f){return lt(this.__data__,f)>-1},ne.prototype.set=function(f,R){var P=this.__data__,k=lt(P,f);return k<0?P.push([f,R]):P[k][1]=R,this},ke.prototype.clear=function(){this.__data__={hash:new q,map:new(De||ne),string:new q}},ke.prototype.delete=function(f){return zt(this,f).delete(f)},ke.prototype.get=function(f){return zt(this,f).get(f)},ke.prototype.has=function(f){return zt(this,f).has(f)},ke.prototype.set=function(f,R){return zt(this,f).set(f,R),this},tt.prototype.add=tt.prototype.push=function(f){return this.__data__.set(f,"__lodash_hash_undefined__"),this},tt.prototype.has=function(f){return this.__data__.has(f)},Je.prototype.clear=function(){this.__data__=new ne},Je.prototype.delete=function(f){return this.__data__.delete(f)},Je.prototype.get=function(f){return this.__data__.get(f)},Je.prototype.has=function(f){return this.__data__.has(f)},Je.prototype.set=function(f,R){var P=this.__data__;if(P instanceof ne){var k=P.__data__;if(!De||k.length<199)return k.push([f,R]),this;P=this.__data__=new ke(k)}return P.set(f,R),this};var vt,ze=(vt=function(f,R){return f&&Rt(f,R,Ue)},function(f,R){if(f==null)return f;if(!D(f))return vt(f,R);for(var P=f.length,k=-1,Y=Object(f);++k<P&&R(Y[k],k,Y)!==!1;);return f}),Rt=function(f){return function(R,P,k){for(var Y=-1,re=Object(R),ve=k(R),Le=ve.length;Le--;){var Xe=ve[++Y];if(P(re[Xe],Xe,re)===!1)break}return R}}();function Wt(f,R){for(var P=0,k=(R=kt(R,f)?[R]:Ht(R)).length;f!=null&&P<k;)f=f[Lt(R[P++])];return P&&P==k?f:void 0}function nn(f,R){return f!=null&&R in Object(f)}function ht(f,R,P,k,Y){return f===R||(f==null||R==null||!Se(f)&&!Ne(R)?f!=f&&R!=R:function(re,ve,Le,Xe,We,Te){var ut=g(re),qe=g(ve),Qe="[object Array]",Ke="[object Array]";ut||(Qe=(Qe=pt(re))==o?l:Qe),qe||(Ke=(Ke=pt(ve))==o?l:Ke);var dt=Qe==l&&!V(re),Yt=Ke==l&&!V(ve),Tt=Qe==Ke;if(Tt&&!dt)return Te||(Te=new Je),ut||xe(re)?an(re,ve,Le,Xe,We,Te):function(_e,je,mr,_t,Tn,it,It){switch(mr){case"[object DataView]":if(_e.byteLength!=je.byteLength||_e.byteOffset!=je.byteOffset)return!1;_e=_e.buffer,je=je.buffer;case"[object ArrayBuffer]":return!(_e.byteLength!=je.byteLength||!_t(new le(_e),new le(je)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Gn(+_e,+je);case"[object Error]":return _e.name==je.name&&_e.message==je.message;case"[object RegExp]":case"[object String]":return _e==je+"";case i:var Pt=ee;case s:var ln=2⁢if(Pt||(Pt=N),_e.size!=je.size&&!ln)return!1;var Pn=It.get(_e);if(Pn)return Pn==je;it|=1,It.set(_e,je);var Jt=an(Pt(_e),Pt(je),_t,Tn,it,It);return It.delete(_e),Jt;case"[object Symbol]":if(ie)return ie.call(_e)==ie.call(je)}return!1}(re,ve,Qe,Le,Xe,We,Te);if(!(2&We)){var ga=dt&&X.call(re,"__wrapped__"),ma=Yt&&X.call(ve,"__wrapped__");if(ga||ma){var Bs=ga?re.value():re,Vs=ma?ve.value():ve;return Te||(Te=new Je),Le(Bs,Vs,Xe,We,Te)}}return Tt?(Te||(Te=new Je),function(_e,je,mr,_t,Tn,it){var It=2&Tn,Pt=Ue(_e),ln=Pt.length,Pn=Ue(je).length;if(ln!=Pn&&!It)return!1;for(var Jt=ln;Jt--;){var Ot=Pt[Jt];if(!(It?Ot in je:X.call(je,Ot)))return!1}var va=it.get(_e);if(va&&it.get(je))return va==je;var On=!0;it.set(_e,je),it.set(je,_e);for(var vr=It;++Jt<ln;){Ot=Pt[Jt];var Fn=_e[Ot],Mn=je[Ot];if(_t)var ha=It?_t(Mn,Fn,Ot,je,_e,it):_t(Fn,Mn,Ot,_e,je,it);if(!(ha===void 0?Fn===Mn||mr(Fn,Mn,_t,Tn,it):ha)){On=!1;break}vr||(vr=Ot=="constructor")}if(On&&!vr){var Bn=_e.constructor,Vn=je.constructor;Bn==Vn||!("constructor"in _e)||!("constructor"in je)||typeof Bn=="function"&&Bn instanceof Bn&&typeof Vn=="function"&&Vn instanceof Vn||(On=!1)}return it.delete(_e),it.delete(je),On}(re,ve,Le,Xe,We,Te)):!1}(f,R,ht,P,k,Y))}function Gt(f){return!(!Se(f)||function(R){return!!_&&_ in R}(f))&&(z(f)||V(f)?fe:A).test(yt(f))}function Nt(f){return typeof f=="function"?f:f==null?He:typeof f=="object"?g(f)?function(k,Y){return kt(k)&&En(Y)?wn(Lt(k),Y):function(re){var ve=function(Le,Xe,We){var Te=Le==null?void 0:Wt(Le,Xe);return Te===void 0?We:Te}(re,k);return ve===void 0&&ve===Y?function(Le,Xe){return Le!=null&&function(We,Te,ut){Te=kt(Te,We)?[Te]:Ht(Te);for(var qe,Qe=-1,Ke=Te.length;++Qe<Ke;){var dt=Lt(Te[Qe]);if(!(qe=We!=null&&ut(We,dt)))break;We=We[dt]}return qe||!!(Ke=We?We.length:0)&&pe(Ke)&&on(dt,Ke)&&(g(We)||Nn(We))}(Le,Xe,nn)}(re,k):ht(Y,ve,void 0,3)}}(f[0],f[1]):function(k){var Y=function(re){for(var ve=Ue(re),Le=ve.length;Le--;){var Xe=ve[Le],We=re[Xe];ve[Le]=[Xe,We,En(We)]}return ve}(k);return Y.length==1&&Y[0][2]?wn(Y[0][0],Y[0][1]):function(re){return re===k||function(ve,Le,Xe,We){var Te=Xe.length,ut=Te;if(ve==null)return!ut;for(ve=Object(ve);Te--;){var qe=Xe[Te];if(qe[2]?qe[1]!==ve[qe[0]]:!(qe[0]in ve))return!1}for(;++Te<ut;){var Qe=(qe=Xe[Te])[0],Ke=ve[Qe],dt=qe[1];if(qe[2]){if(Ke===void 0&&!(Qe in ve))return!1}else{var Yt=new Je,Tt;if(!(Tt===void 0?ht(dt,Ke,We,3,Yt):Tt))return!1}}return!0}(re,k,Y)}}(f):kt(R=f)?(P=Lt(R),function(k){return k==null?void 0:k[P]}):function(k){return function(Y){return Wt(Y,k)}}(R);var R,P}function rn(f){if(P=(R=f)&&R.constructor,k=typeof P=="function"&&P.prototype||H,R!==k)return Pe(f);var R,P,k,Y=[];for(var re in Object(f))X.call(f,re)&&re!="constructor"&&Y.push(re);return Y}function Ht(f){return g(f)?f:Rn(f)}function an(f,R,P,k,Y,re){var ve=2&Y,Le=f.length,Xe=R.length;if(Le!=Xe&&!(ve&&Xe>Le))return!1;var We=re.get(f);if(We&&re.get(R))return We==R;var Te=-1,ut=!0,qe=1&Y?new tt:void 0;for(re.set(f,R),re.set(R,f);++Te<Le;){var Qe=f[Te],Ke=R[Te];if(k)var dt=ve?k(Ke,Qe,Te,R,f,re):k(Qe,Ke,Te,f,R,re);if(dt!==void 0){if(dt)continue;ut=!1;break}if(qe){if(!J(R,function(Yt,Tt){if(!qe.has(Tt)&&(Qe===Yt||P(Qe,Yt,k,Y,re)))return qe.add(Tt)})){ut=!1;break}}else if(Qe!==Ke&&!P(Qe,Ke,k,Y,re)){ut=!1;break}}return re.delete(f),re.delete(R),ut}function zt(f,R){var P,k,Y=f.__data__;return((k=typeof(P=R))=="string"||k=="number"||k=="symbol"||k=="boolean"?P!=="__proto__":P===null)?Y[typeof R=="string"?"string":"hash"]:Y.map}function Ct(f,R){var P=function(k,Y){return k==null?void 0:k[Y]}(f,R);return Gt(P)?P:void 0}var pt=function(f){return b.call(f)};function on(f,R){return!!(R=R??9007199254740991)&&(typeof f=="number"||C.test(f))&&f>-1&&f%1==0&&f<R}function kt(f,R){if(g(f))return!1;var P=typeof f;return!(P!="number"&&P!="symbol"&&P!="boolean"&&f!=null&&!Ie(f))||c.test(f)||!u.test(f)||R!=null&&f in Object(R)}function En(f){return f==f&&!Se(f)}function wn(f,R){return function(P){return P!=null&&P[f]===R&&(R!==void 0||f in Object(P))}}(Z&&pt(new Z(new ArrayBuffer(1)))!="[object DataView]"||De&&pt(new De)!=i||Re&&pt(Re.resolve())!="[object Promise]"||G&&pt(new G)!=s||j&&pt(new j)!="[object WeakMap]")&&(pt=function(f){var R=b.call(f),P=R==l?f.constructor:void 0,k=P?yt(P):void 0;if(k)switch(k){case ge:return"[object DataView]";case oe:return i;case me:return"[object Promise]";case he:return s;case Ge:return"[object WeakMap]"}return R});var Rn=sn(function(f){var R;f=(R=f)==null?"":function(k){if(typeof k=="string")return k;if(Ie(k))return Ce?Ce.call(k):"";var Y=k+"";return Y=="0"&&1/k==-1/0?"-0":Y}(R);var P=[];return d.test(f)&&P.push(""),f.replace(h,function(k,Y,re,ve){P.push(re?ve.replace(y,"$1"):Y||k)}),P});function Lt(f){if(typeof f=="string"||Ie(f))return f;var R=f+"";return R=="0"&&1/f==-1/0?"-0":R}function yt(f){if(f!=null){try{return ae.call(f)}catch{}try{return f+""}catch{}}return""}function sn(f,R){if(typeof f!="function"||R&&typeof R!="function")throw new TypeError("Expected a function");var P=function(){var k=arguments,Y=R?R.apply(this,k):k[0],re=P.cache;if(re.has(Y))return re.get(Y);var ve=f.apply(this,k);return P.cache=re.set(Y,ve),ve};return P.cache=new(sn.Cache||ke),P}function Gn(f,R){return f===R||f!=f&&R!=R}function Nn(f){return function(R){return Ne(R)&&D(R)}(f)&&X.call(f,"callee")&&(!Ae.call(f,"callee")||b.call(f)==o)}sn.Cache=ke;var g=Array.isArray;function D(f){return f!=null&&pe(f.length)&&!z(f)}function z(f){var R=Se(f)?b.call(f):"";return R=="[object Function]"||R=="[object GeneratorFunction]"}function pe(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=9007199254740991}function Se(f){var R=typeof f;return!!f&&(R=="object"||R=="function")}function Ne(f){return!!f&&typeof f=="object"}function Ie(f){return typeof f=="symbol"||Ne(f)&&b.call(f)=="[object Symbol]"}var xe=B?function(f){return function(R){return f(R)}}(B):function(f){return Ne(f)&&pe(f.length)&&!!p[b.call(f)]};function Ue(f){return D(f)?at(f):rn(f)}function He(f){return f}n.exports=function(f,R,P){var k=g(f)?$:ue,Y=arguments.length<3;return k(f,Nt(R),P,Y,ze)}}).call(this,r(3),r(7)(e))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t){String.prototype.padEnd||(String.prototype.padEnd=function(r,a){return r>>=0,a=String(a!==void 0?a:" "),this.length>r?String(this):((r-=this.length)>a.length&&(a+=a.repeat(r/a.length)),String(this)+a.slice(0,r))})},function(e,t,r){function a(H,O,_){return O in H?Object.defineProperty(H,O,{value:_,enumerable:!0,configurable:!0,writable:!0}):H[O]=_,H}function n(H){if(Symbol.iterator in Object(H)||Object.prototype.toString.call(H)==="[object Arguments]")return Array.from(H)}function o(H){return function(O){if(Array.isArray(O)){for(var _=0,ae=new Array(O.length);_<O.length;_++)ae[_]=O[_];return ae}}(H)||n(H)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(H){if(Array.isArray(H))return H}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(H,O){if(!(H instanceof O))throw new TypeError("Cannot call a class as a function")}function u(H,O){for(var _=0;_<O.length;_++){var ae=O[_];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(H,ae.key,ae)}}function c(H){return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(H)}function d(H){return(d=typeof Symbol=="function"&&c(Symbol.iterator)==="symbol"?function(O){return c(O)}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":c(O)})(H)}function h(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function y(H){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)})(H)}function A(H,O){return(A=Object.setPrototypeOf||function(_,ae){return _.__proto__=ae,_})(H,O)}r.r(t);var C=r(0),p=r.n(C),m=r(5),E=r.n(m),w=r(4),S=r.n(w),x=r(6),M=r.n(x),T=r(2),B=r.n(T),$=r(1),J=r.n($);r(8);function ue(H,O){return i(H)||function(_,ae){var X=[],b=!0,fe=!1,de=void 0;try{for(var le,Ae=_[Symbol.iterator]();!(b=(le=Ae.next()).done)&&(X.push(le.value),!ae||X.length!==ae);b=!0);}catch(we){fe=!0,de=we}finally{try{b||Ae.return==null||Ae.return()}finally{if(fe)throw de}}return X}(H,O)||l()}var V=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"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",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d’Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2,["809","829","849"]],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["55","81","33","656","664","998","774","229"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3,["787","939"]],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]],ee=[["American Samoa",["oceania"],"as","1684"],["Anguilla",["america","carribean"],"ai","1264"],["Bermuda",["america","north-america"],"bm","1441"],["British Virgin Islands",["america","carribean"],"vg","1284"],["Cayman Islands",["america","carribean"],"ky","1345"],["Cook Islands",["oceania"],"ck","682"],["Falkland Islands",["america","south-america"],"fk","500"],["Faroe Islands",["europe"],"fo","298"],["Gibraltar",["europe"],"gi","350"],["Greenland",["america"],"gl","299"],["Jersey",["europe","eu-union"],"je","44",".... ......"],["Montserrat",["america","carribean"],"ms","1664"],["Niue",["asia"],"nu","683"],["Norfolk Island",["oceania"],"nf","672"],["Northern Mariana Islands",["oceania"],"mp","1670"],["Saint Barthélemy",["america","carribean"],"bl","590","",1],["Saint Helena",["africa"],"sh","290"],["Saint Martin",["america","carribean"],"mf","590","",2],["Saint Pierre and Miquelon",["america","north-america"],"pm","508"],["Sint Maarten",["america","carribean"],"sx","1721"],["Tokelau",["oceania"],"tk","690"],["Turks and Caicos Islands",["america","carribean"],"tc","1649"],["U.S. Virgin Islands",["america","carribean"],"vi","1340"],["Wallis and Futuna",["oceania"],"wf","681"]];function N(H,O,_,ae,X){return!_||X?H+"".padEnd(O.length,".")+" "+ae:H+"".padEnd(O.length,".")+" "+_}function L(H,O,_,ae,X){var b,fe,de=[];return fe=O===!0,[(b=[]).concat.apply(b,o(H.map(function(le){var Ae={name:le[0],regions:le[1],iso2:le[2],countryCode:le[3],dialCode:le[3],format:N(_,le[3],le[4],ae,X),priority:le[5]||0},we=[];return le[6]&&le[6].map(function(Pe){var Z=function(De){for(var Re=1;Re<arguments.length;Re++){var G=arguments[Re]!=null?arguments[Re]:{},j=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(j=j.concat(Object.getOwnPropertySymbols(G).filter(function(Q){return Object.getOwnPropertyDescriptor(G,Q).enumerable}))),j.forEach(function(Q){a(De,Q,G[Q])})}return De}({},Ae);Z.dialCode=le[3]+Pe,Z.isAreaCode=!0,Z.areaCodeLength=Pe.length,we.push(Z)}),we.length>0?(Ae.mainCode=!0,fe||O.constructor.name==="Array"&&O.includes(le[2])?(Ae.hasAreaCodes=!0,[Ae].concat(we)):(de=de.concat(we),[Ae])):[Ae]}))),de]}function W(H,O,_,ae){if(_!==null){var X=Object.keys(_),b=Object.values(_);X.forEach(function(fe,de){if(ae)return H.push([fe,b[de]]);var le=H.findIndex(function(we){return we[0]===fe});if(le===-1){var Ae=[fe];Ae[O]=b[de],H.push(Ae)}else H[le][O]=b[de]})}}function U(H,O){return O.length===0?H:H.map(function(_){var ae=O.findIndex(function(b){return b[0]===_[2]});if(ae===-1)return _;var X=O[ae];return X[1]&&(_[4]=X[1]),X[3]&&(_[5]=X[3]),X[2]&&(_[6]=X[2]),_})}var te=function H(O,_,ae,X,b,fe,de,le,Ae,we,Pe,Z,De,Re){s(this,H),this.filterRegions=function(K,ie){if(typeof K=="string"){var Ce=K;return ie.filter(function(q){return q.regions.some(function(ne){return ne===Ce})})}return ie.filter(function(q){return K.map(function(ne){return q.regions.some(function(ke){return ke===ne})}).some(function(ne){return ne})})},this.sortTerritories=function(K,ie){var Ce=[].concat(o(K),o(ie));return Ce.sort(function(q,ne){return q.name<ne.name?-1:q.name>ne.name?1:0}),Ce},this.getFilteredCountryList=function(K,ie,Ce){return K.length===0?ie:Ce?K.map(function(q){var ne=ie.find(function(ke){return ke.iso2===q});if(ne)return ne}).filter(function(q){return q}):ie.filter(function(q){return K.some(function(ne){return ne===q.iso2})})},this.localizeCountries=function(K,ie,Ce){for(var q=0;q<K.length;q++)ie[K[q].iso2]!==void 0?K[q].localName=ie[K[q].iso2]:ie[K[q].name]!==void 0&&(K[q].localName=ie[K[q].name]);return Ce||K.sort(function(ne,ke){return ne.localName<ke.localName?-1:ne.localName>ke.localName?1:0}),K},this.getCustomAreas=function(K,ie){for(var Ce=[],q=0;q<ie.length;q++){var ne=JSON.parse(JSON.stringify(K));ne.dialCode+=ie[q],Ce.push(ne)}return Ce},this.excludeCountries=function(K,ie){return ie.length===0?K:K.filter(function(Ce){return!ie.includes(Ce.iso2)})};var G=function(K,ie,Ce){var q=[];return W(q,1,K,!0),W(q,3,ie),W(q,2,Ce),q}(le,Ae,we),j=U(JSON.parse(JSON.stringify(V)),G),Q=U(JSON.parse(JSON.stringify(ee)),G),ge=ue(L(j,O,Z,De,Re),2),oe=ge[0],me=ge[1];if(_){var he=ue(L(Q,O,Z,De,Re),2),Ge=he[0];he[1],oe=this.sortTerritories(Ge,oe)}ae&&(oe=this.filterRegions(ae,oe)),this.onlyCountries=this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(X,oe,de.includes("onlyCountries")),fe),Pe,de.includes("onlyCountries")),this.preferredCountries=b.length===0?[]:this.localizeCountries(this.getFilteredCountryList(b,oe,de.includes("preferredCountries")),Pe,de.includes("preferredCountries")),this.hiddenAreaCodes=this.excludeCountries(this.getFilteredCountryList(X,me),fe)},Ee=function(H){function O(X){var b;s(this,O),(b=function(G,j){return!j||d(j)!=="object"&&typeof j!="function"?h(G):j}(this,y(O).call(this,X))).getProbableCandidate=S()(function(G){return G&&G.length!==0?b.state.onlyCountries.filter(function(j){return B()(j.name.toLowerCase(),G.toLowerCase())},h(h(b)))[0]:null}),b.guessSelectedCountry=S()(function(G,j,Q,ge){var oe;if(b.props.enableAreaCodes===!1&&(ge.some(function(Ge){if(B()(G,Ge.dialCode))return Q.some(function(K){if(Ge.iso2===K.iso2&&K.mainCode)return oe=K,!0}),!0}),oe))return oe;var me=Q.find(function(Ge){return Ge.iso2==j});if(G.trim()==="")return me;var he=Q.reduce(function(Ge,K){return B()(G,K.dialCode)&&(K.dialCode.length>Ge.dialCode.length||K.dialCode.length===Ge.dialCode.length&&K.priority<Ge.priority)?K:Ge},{dialCode:"",priority:10001},h(h(b)));return he.name?he:me}),b.updateCountry=function(G){var j,Q=b.state.onlyCountries;(j=G.indexOf(0)>="0"&&G.indexOf(0)<="9"?Q.find(function(ge){return ge.dialCode==+G}):Q.find(function(ge){return ge.iso2==G}))&&j.dialCode&&b.setState({selectedCountry:j,formattedNumber:b.props.disableCountryCode?"":b.formatNumber(j.dialCode,j)})},b.scrollTo=function(G,j){if(G){var Q=b.dropdownRef;if(Q&&document.body){var ge=Q.offsetHeight,oe=Q.getBoundingClientRect().top+document.body.scrollTop,me=oe+ge,he=G,Ge=he.getBoundingClientRect(),K=he.offsetHeight,ie=Ge.top+document.body.scrollTop,Ce=ie+K,q=ie-oe+Q.scrollTop,ne=ge/2-K/2;if(b.props.enableSearch?ie<oe+32:ie<oe)j&&(q-=ne),Q.scrollTop=q;else if(Ce>me){j&&(q+=ne);var ke=ge-K;Q.scrollTop=q-ke}}}},b.scrollToTop=function(){var G=b.dropdownRef;G&&document.body&&(G.scrollTop=0)},b.formatNumber=function(G,j){if(!j)return G;var Q,ge=j.format,oe=b.props,me=oe.disableCountryCode,he=oe.enableAreaCodeStretch,Ge=oe.enableLongNumbers,K=oe.autoFormat;if(me?((Q=ge.split(" ")).shift(),Q=Q.join(" ")):he&&j.isAreaCode?((Q=ge.split(" "))[1]=Q[1].replace(/\.+/,"".padEnd(j.areaCodeLength,".")),Q=Q.join(" ")):Q=ge,!G||G.length===0)return me?"":b.props.prefix;if(G&&G.length<2||!Q||!K)return me?G:b.props.prefix+G;var ie,Ce=M()(Q,function(q,ne){if(q.remainingText.length===0)return q;if(ne!==".")return{formattedText:q.formattedText+ne,remainingText:q.remainingText};var ke,tt=i(ke=q.remainingText)||n(ke)||l(),Je=tt[0],at=tt.slice(1);return{formattedText:q.formattedText+Je,remainingText:at}},{formattedText:"",remainingText:G.split("")});return(ie=Ge?Ce.formattedText+Ce.remainingText.join(""):Ce.formattedText).includes("(")&&!ie.includes(")")&&(ie+=")"),ie},b.cursorToEnd=function(){var G=b.numberInputRef;if(document.activeElement===G){G.focus();var j=G.value.length;G.value.charAt(j-1)===")"&&(j-=1),G.setSelectionRange(j,j)}},b.getElement=function(G){return b["flag_no_".concat(G)]},b.getCountryData=function(){return b.state.selectedCountry?{name:b.state.selectedCountry.name||"",dialCode:b.state.selectedCountry.dialCode||"",countryCode:b.state.selectedCountry.iso2||"",format:b.state.selectedCountry.format||""}:{}},b.handleFlagDropdownClick=function(G){if(G.preventDefault(),b.state.showDropdown||!b.props.disabled){var j=b.state,Q=j.preferredCountries,ge=j.onlyCountries,oe=j.selectedCountry,me=b.concatPreferredCountries(Q,ge).findIndex(function(he){return he.dialCode===oe.dialCode&&he.iso2===oe.iso2});b.setState({showDropdown:!b.state.showDropdown,highlightCountryIndex:me},function(){b.state.showDropdown&&b.scrollTo(b.getElement(b.state.highlightCountryIndex))})}},b.handleInput=function(G){var j=G.target.value,Q=b.props,ge=Q.prefix,oe=Q.onChange,me=b.props.disableCountryCode?"":ge,he=b.state.selectedCountry,Ge=b.state.freezeSelection;if(!b.props.countryCodeEditable){var K=ge+(he.hasAreaCodes?b.state.onlyCountries.find(function(ze){return ze.iso2===he.iso2&&ze.mainCode}).dialCode:he.dialCode);if(j.slice(0,K.length)!==K)return}if(j===ge)return oe&&oe("",b.getCountryData(),G,""),b.setState({formattedNumber:""});if(!(j.replace(/\D/g,"").length>15&&(b.props.enableLongNumbers===!1||typeof b.props.enableLongNumbers=="number"&&j.replace(/\D/g,"").length>b.props.enableLongNumbers))&&j!==b.state.formattedNumber){G.preventDefault?G.preventDefault():G.returnValue=!1;var ie=b.props.country,Ce=b.state,q=Ce.onlyCountries,ne=Ce.selectedCountry,ke=Ce.hiddenAreaCodes;if(oe&&G.persist(),j.length>0){var tt=j.replace(/\D/g,"");(!b.state.freezeSelection||ne&&ne.dialCode.length>tt.length)&&(he=b.props.disableCountryGuess?ne:b.guessSelectedCountry(tt.substring(0,6),ie,q,ke)||ne,Ge=!1),me=b.formatNumber(tt,he),he=he.dialCode?he:ne}var Je=G.target.selectionStart,at=G.target.selectionStart,lt=b.state.formattedNumber,vt=me.length-lt.length;b.setState({formattedNumber:me,freezeSelection:Ge,selectedCountry:he},function(){vt>0&&(at-=vt),me.charAt(me.length-1)==")"?b.numberInputRef.setSelectionRange(me.length-1,me.length-1):at>0&<.length>=me.length?b.numberInputRef.setSelectionRange(at,at):Je<lt.length&&b.numberInputRef.setSelectionRange(Je,Je),oe&&oe(me.replace(/[^0-9]+/g,""),b.getCountryData(),G,me)})}},b.handleInputClick=function(G){b.setState({showDropdown:!1}),b.props.onClick&&b.props.onClick(G,b.getCountryData())},b.handleDoubleClick=function(G){var j=G.target.value.length;G.target.setSelectionRange(0,j)},b.handleFlagItemClick=function(G,j){var Q=b.state.selectedCountry,ge=b.state.onlyCountries.find(function(Ge){return Ge==G});if(ge){var oe=b.state.formattedNumber.replace(" ","").replace("(","").replace(")","").replace("-",""),me=oe.length>1?oe.replace(Q.dialCode,ge.dialCode):ge.dialCode,he=b.formatNumber(me.replace(/\D/g,""),ge);b.setState({showDropdown:!1,selectedCountry:ge,freezeSelection:!0,formattedNumber:he,searchValue:""},function(){b.cursorToEnd(),b.props.onChange&&b.props.onChange(he.replace(/[^0-9]+/g,""),b.getCountryData(),j,he)})}},b.handleInputFocus=function(G){b.numberInputRef&&b.numberInputRef.value===b.props.prefix&&b.state.selectedCountry&&!b.props.disableCountryCode&&b.setState({formattedNumber:b.props.prefix+b.state.selectedCountry.dialCode},function(){b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)}),b.setState({placeholder:""}),b.props.onFocus&&b.props.onFocus(G,b.getCountryData()),b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)},b.handleInputBlur=function(G){G.target.value||b.setState({placeholder:b.props.placeholder}),b.props.onBlur&&b.props.onBlur(G,b.getCountryData())},b.handleInputCopy=function(G){if(b.props.copyNumbersOnly){var j=window.getSelection().toString().replace(/[^0-9]+/g,"");G.clipboardData.setData("text/plain",j),G.preventDefault()}},b.getHighlightCountryIndex=function(G){var j=b.state.highlightCountryIndex+G;return j<0||j>=b.state.onlyCountries.length+b.state.preferredCountries.length?j-G:b.props.enableSearch&&j>b.getSearchFilteredCountries().length?0:j},b.searchCountry=function(){var G=b.getProbableCandidate(b.state.queryString)||b.state.onlyCountries[0],j=b.state.onlyCountries.findIndex(function(Q){return Q==G})+b.state.preferredCountries.length;b.scrollTo(b.getElement(j),!0),b.setState({queryString:"",highlightCountryIndex:j})},b.handleKeydown=function(G){var j=b.props.keys,Q=G.target.className;if(Q.includes("selected-flag")&&G.which===j.ENTER&&!b.state.showDropdown)return b.handleFlagDropdownClick(G);if(Q.includes("form-control")&&(G.which===j.ENTER||G.which===j.ESC))return G.target.blur();if(b.state.showDropdown&&!b.props.disabled&&(!Q.includes("search-box")||G.which===j.UP||G.which===j.DOWN||G.which===j.ENTER||G.which===j.ESC&&G.target.value==="")){G.preventDefault?G.preventDefault():G.returnValue=!1;var ge=function(oe){b.setState({highlightCountryIndex:b.getHighlightCountryIndex(oe)},function(){b.scrollTo(b.getElement(b.state.highlightCountryIndex),!0)})};switch(G.which){case j.DOWN:ge(1);break;case j.UP:ge(-1);break;case j.ENTER:b.props.enableSearch?b.handleFlagItemClick(b.getSearchFilteredCountries()[b.state.highlightCountryIndex]||b.getSearchFilteredCountries()[0],G):b.handleFlagItemClick([].concat(o(b.state.preferredCountries),o(b.state.onlyCountries))[b.state.highlightCountryIndex],G);break;case j.ESC:case j.TAB:b.setState({showDropdown:!1},b.cursorToEnd);break;default:(G.which>=j.A&&G.which<=j.Z||G.which===j.SPACE)&&b.setState({queryString:b.state.queryString+String.fromCharCode(G.which)},b.state.debouncedQueryStingSearcher)}}},b.handleInputKeyDown=function(G){var j=b.props,Q=j.keys,ge=j.onEnterKeyPress,oe=j.onKeyDown;G.which===Q.ENTER&&ge&&ge(G),oe&&oe(G)},b.handleClickOutside=function(G){b.dropdownRef&&!b.dropdownContainerRef.contains(G.target)&&b.state.showDropdown&&b.setState({showDropdown:!1})},b.handleSearchChange=function(G){var j=G.currentTarget.value,Q=b.state,ge=Q.preferredCountries,oe=Q.selectedCountry,me=0;if(j===""&&oe){var he=b.state.onlyCountries;me=b.concatPreferredCountries(ge,he).findIndex(function(Ge){return Ge==oe}),setTimeout(function(){return b.scrollTo(b.getElement(me))},100)}b.setState({searchValue:j,highlightCountryIndex:me})},b.concatPreferredCountries=function(G,j){return G.length>0?o(new Set(G.concat(j))):j},b.getDropdownCountryName=function(G){return G.localName||G.name},b.getSearchFilteredCountries=function(){var G=b.state,j=G.preferredCountries,Q=G.onlyCountries,ge=G.searchValue,oe=b.props.enableSearch,me=b.concatPreferredCountries(j,Q),he=ge.trim().toLowerCase().replace("+","");if(oe&&he){if(/^\d+$/.test(he))return me.filter(function(ie){var Ce=ie.dialCode;return["".concat(Ce)].some(function(q){return q.toLowerCase().includes(he)})});var Ge=me.filter(function(ie){var Ce=ie.iso2;return["".concat(Ce)].some(function(q){return q.toLowerCase().includes(he)})}),K=me.filter(function(ie){var Ce=ie.name,q=ie.localName;return ie.iso2,["".concat(Ce),"".concat(q||"")].some(function(ne){return ne.toLowerCase().includes(he)})});return b.scrollToTop(),o(new Set([].concat(Ge,K)))}return me},b.getCountryDropdownList=function(){var G=b.state,j=G.preferredCountries,Q=G.highlightCountryIndex,ge=G.showDropdown,oe=G.searchValue,me=b.props,he=me.disableDropdown,Ge=me.prefix,K=b.props,ie=K.enableSearch,Ce=K.searchNotFound,q=K.disableSearchIcon,ne=K.searchClass,ke=K.searchStyle,tt=K.searchPlaceholder,Je=K.autocompleteSearch,at=b.getSearchFilteredCountries().map(function(ze,Rt){var Wt=Q===Rt,nn=J()({country:!0,preferred:ze.iso2==="us"||ze.iso2==="gb",active:ze.iso2==="us",highlight:Wt}),ht="flag ".concat(ze.iso2);return p.a.createElement("li",Object.assign({ref:function(Gt){return b["flag_no_".concat(Rt)]=Gt},key:"flag_no_".concat(Rt),"data-flag-key":"flag_no_".concat(Rt),className:nn,"data-dial-code":"1",tabIndex:he?"-1":"0","data-country-code":ze.iso2,onClick:function(Gt){return b.handleFlagItemClick(ze,Gt)},role:"option"},Wt?{"aria-selected":!0}:{}),p.a.createElement("div",{className:ht}),p.a.createElement("span",{className:"country-name"},b.getDropdownCountryName(ze)),p.a.createElement("span",{className:"dial-code"},ze.format?b.formatNumber(ze.dialCode,ze):Ge+ze.dialCode))}),lt=p.a.createElement("li",{key:"dashes",className:"divider"});j.length>0&&(!ie||ie&&!oe.trim())&&at.splice(j.length,0,lt);var vt=J()(a({"country-list":!0,hide:!ge},b.props.dropdownClass,!0));return p.a.createElement("ul",{ref:function(ze){return!ie&&ze&&ze.focus(),b.dropdownRef=ze},className:vt,style:b.props.dropdownStyle,role:"listbox",tabIndex:"0"},ie&&p.a.createElement("li",{className:J()(a({search:!0},ne,ne))},!q&&p.a.createElement("span",{className:J()(a({"search-emoji":!0},"".concat(ne,"-emoji"),ne)),role:"img","aria-label":"Magnifying glass"},"🔎"),p.a.createElement("input",{className:J()(a({"search-box":!0},"".concat(ne,"-box"),ne)),style:ke,type:"search",placeholder:tt,autoFocus:!0,autoComplete:Je?"on":"off",value:oe,onChange:b.handleSearchChange})),at.length>0?at:p.a.createElement("li",{className:"no-entries-message"},p.a.createElement("span",null,Ce)))};var fe,de=new te(X.enableAreaCodes,X.enableTerritories,X.regions,X.onlyCountries,X.preferredCountries,X.excludeCountries,X.preserveOrder,X.masks,X.priority,X.areaCodes,X.localization,X.prefix,X.defaultMask,X.alwaysDefaultMask),le=de.onlyCountries,Ae=de.preferredCountries,we=de.hiddenAreaCodes,Pe=X.value?X.value.replace(/\D/g,""):"";fe=X.disableInitialCountryGuess?0:Pe.length>1?b.guessSelectedCountry(Pe.substring(0,6),X.country,le,we)||0:X.country&&le.find(function(G){return G.iso2==X.country})||0;var Z,De=Pe.length<2&&fe&&!B()(Pe,fe.dialCode)?fe.dialCode:"";Z=Pe===""&&fe===0?"":b.formatNumber((X.disableCountryCode?"":De)+Pe,fe.name?fe:void 0);var Re=le.findIndex(function(G){return G==fe});return b.state={showDropdown:X.showDropdown,formattedNumber:Z,onlyCountries:le,preferredCountries:Ae,hiddenAreaCodes:we,selectedCountry:fe,highlightCountryIndex:Re,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:E()(b.searchCountry,250),searchValue:""},b}var _,ae;return function(X,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");X.prototype=Object.create(b&&b.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),b&&A(X,b)}(O,H),_=O,(ae=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(X,b,fe){X.country!==this.props.country?this.updateCountry(this.props.country):X.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(X){if(X===null)return this.setState({selectedCountry:0,formattedNumber:""});var b=this.state,fe=b.onlyCountries,de=b.selectedCountry,le=b.hiddenAreaCodes,Ae=this.props,we=Ae.country,Pe=Ae.prefix;if(X==="")return this.setState({selectedCountry:de,formattedNumber:""});var Z,De,Re=X.replace(/\D/g,"");if(de&&B()(X,Pe+de.dialCode))De=this.formatNumber(Re,de),this.setState({formattedNumber:De});else{var G=(Z=this.props.disableCountryGuess?de:this.guessSelectedCountry(Re.substring(0,6),we,fe,le)||de)&&B()(Re,Pe+Z.dialCode)?Z.dialCode:"";De=this.formatNumber((this.props.disableCountryCode?"":G)+Re,Z||void 0),this.setState({selectedCountry:Z,formattedNumber:De})}}},{key:"render",value:function(){var X,b,fe,de=this,le=this.state,Ae=le.onlyCountries,we=le.selectedCountry,Pe=le.showDropdown,Z=le.formattedNumber,De=le.hiddenAreaCodes,Re=this.props,G=Re.disableDropdown,j=Re.renderStringAsFlag,Q=Re.isValid,ge=Re.defaultErrorMessage,oe=Re.specialLabel;if(typeof Q=="boolean")b=Q;else{var me=Q(Z.replace(/\D/g,""),we,Ae,De);typeof me=="boolean"?(b=me)===!1&&(fe=ge):(b=!1,fe=me)}var he=J()((a(X={},this.props.containerClass,!0),a(X,"react-tel-input",!0),X)),Ge=J()({arrow:!0,up:Pe}),K=J()(a({"form-control":!0,"invalid-number":!b,open:Pe},this.props.inputClass,!0)),ie=J()({"selected-flag":!0,open:Pe}),Ce=J()(a({"flag-dropdown":!0,"invalid-number":!b,open:Pe},this.props.buttonClass,!0)),q="flag ".concat(we&&we.iso2);return p.a.createElement("div",{className:"".concat(he," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},oe&&p.a.createElement("div",{className:"special-label"},oe),fe&&p.a.createElement("div",{className:"invalid-number-message"},fe),p.a.createElement("input",Object.assign({className:K,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:Z,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(ne){de.numberInputRef=ne,typeof de.props.inputProps.ref=="function"?de.props.inputProps.ref(ne):typeof de.props.inputProps.ref=="object"&&(de.props.inputProps.ref.current=ne)}})),p.a.createElement("div",{className:Ce,style:this.props.buttonStyle,ref:function(ne){return de.dropdownContainerRef=ne}},j?p.a.createElement("div",{className:ie},j):p.a.createElement("div",{onClick:G?void 0:this.handleFlagDropdownClick,className:ie,title:we?"".concat(we.localName||we.name,": + ").concat(we.dialCode):"",tabIndex:G?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!Pe||void 0},p.a.createElement("div",{className:q},!G&&p.a.createElement("div",{className:Ge}))),Pe&&this.getCountryDropdownList()))}}])&&u(_.prototype,ae),O}(p.a.Component);Ee.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t.default=Ee}]);const mb=Ws(gb),Os=({value:e,onChange:t,error:r,onBlur:a,id:n,name:o,required:i,defaultCountry:l="us",className:s,responsive:u=!1,enableSearch:c=!0,autoComplete:d})=>{const h=(y,A)=>{t("+"+y,A.countryCode)};return v.jsxs("div",{className:s,children:[v.jsx("div",{className:Me("movmo-phone-input flex items-center px-3.5 py-0 h-10 rounded-lg border",u&&"movmo-phone-input-responsive",r?"border-error-500 focus:ring-error-500":"border-grayWarm-300 focus-within:ring-2 focus-within:ring-grayWarm-950"),children:v.jsx(mb,{country:l,value:e.replace("+",""),onChange:h,inputProps:{onBlur:a,required:i,id:n,name:o,...d&&{autoComplete:d}},enableSearch:c,autoFormat:!0})}),r&&v.jsx("p",{className:"text-error-500 text-xs mt-1",children:r})]})},Fs=({email:e,phone:t,otpLength:r,otpAction:a,onVerify:n,onClose:o,externalError:i,title:l,description:s})=>{const[u,c]=F.useState("".padStart(r,"")),[d,h]=F.useState(null),y=(p,m)=>{if(!/^\d*$/.test(p))return;const E=u.split("");if(E[m]=p.slice(-1),c(E.join("")),d&&h(null),p&&m<r-1){const w=document.getElementById(`otp-input-${m+1}`);w&&w.focus()}},A=p=>{p.preventDefault();const E=p.clipboardData.getData("text/plain").replace(/\D/g,"");if(E.length>0){const w=u.split("");for(let T=0;T<Math.min(E.length,r);T++)w[T]=E[T];c(w.join("")),d&&h(null);const S=w.findIndex(T=>T===""),x=S!==-1?S:r-1,M=document.getElementById(`otp-input-${x}`);M&&M.focus()}},C=p=>{const m=u.split("");if(m[p]="",c(m.join("")),p>0){const E=document.getElementById(`otp-input-${p-1}`);E&&E.focus()}};return F.useEffect(()=>{u.length===r&&!u.includes(" ")&&u.trim().length===r&&n(u)},[u,r,n]),F.useEffect(()=>{const p=m=>{m.key==="Escape"&&o()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[o]),v.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[110] px-4",children:v.jsxs($r,{className:"w-full max-w-[400px] rounded-lg",children:[v.jsx(Qr,{className:"p-4 border-b border-grayWarm-200",children:v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("button",{onClick:o,className:"w-8 h-8 flex items-center justify-center bg-grayWarm-100 hover:bg-grayWarm-200 rounded-lg transition-colors","aria-label":"Close modal",children:v.jsx("svg",{className:"w-4 h-4 text-grayWarm-600",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),v.jsx("h2",{className:"text-xl md:text-lg font-bold text-center flex-1",children:l||"Verify Account"}),v.jsx("div",{className:"w-8"})]})}),v.jsxs(Kr,{className:"p-4 text-center",children:[v.jsxs("div",{className:"text-center mb-3",children:[v.jsx("p",{className:"text-sm md:text-md text-grayWarm-600",children:s||`Enter the ${r}-digit code we sent to`}),!s&&v.jsx("p",{className:"text-sm md:text-md text-grayWarm-600 mt-1",children:a===rt.OTPAction.EMAILED?e:t})]}),v.jsx("div",{className:"flex justify-center gap-2 mb-6",children:Array.from({length:r}).map((p,m)=>v.jsx("input",{type:"text",maxLength:1,className:"w-10 h-16 border border-grayWarm-300 shadow-xs rounded-md text-center text-lg focus:outline-none focus:ring-2 focus:ring-grayWarm-950",value:u[m]||"",onChange:E=>y(E.target.value,m),onPaste:A,id:`otp-input-${m}`,"data-testid":`otp-input-${m}`,onKeyDown:E=>{E.key==="Backspace"&&C(m)}},m))}),(d||i)&&v.jsx("p",{className:"text-error-500 text-center text-sm mb-4",children:i||d})]})]})})},Ms=e=>/^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/.test(e),vb={us:{dialCode:"1",lengths:[10]},ca:{dialCode:"1",lengths:[10]},gb:{dialCode:"44",lengths:[10]},au:{dialCode:"61",lengths:[9]},de:{dialCode:"49",lengths:[10,11]},fr:{dialCode:"33",lengths:[9]},it:{dialCode:"39",lengths:[9,10]},es:{dialCode:"34",lengths:[9]},jp:{dialCode:"81",lengths:[10,11]},kr:{dialCode:"82",lengths:[10,11]},in:{dialCode:"91",lengths:[10]},br:{dialCode:"55",lengths:[10,11]},mx:{dialCode:"52",lengths:[10]},cn:{dialCode:"86",lengths:[11]}};function Yr(e,t){if(!e||!e.startsWith("+"))return!1;const r=e.slice(1);if(!/^\d+$/.test(r))return!1;if(t){const a=vb[t.toLowerCase()];if(a){if(!r.startsWith(a.dialCode))return!1;const n=r.slice(a.dialCode.length);return a.lengths.includes(n.length)}}return r.length>=7&&r.length<=15}const hb=({isOpen:e,onClose:t,loginUser:r,verifyOTP:a,getCurrentUser:n,onLoginSuccess:o})=>{const[i,l]=F.useState(""),[s,u]=F.useState(null),[c,d]=F.useState(""),[h,y]=F.useState(null),[A,C]=F.useState(!1),[p,m]=F.useState(null),[E,w]=F.useState(6),[S,x]=F.useState(null),[M,T]=F.useState(!1),[B,$]=F.useState(""),[J,ue]=F.useState(rt.OTPAction.EMAILED),[V,ee]=F.useState("us"),N=O=>{const _=O.target.value;l(_),s&&u(null)},L=(O,_)=>{d(O),ee(_),h&&y(null)},W=()=>{c&&!Yr(c,V)&&y("Please enter a valid phone number")},U=async()=>{let O=!1;if((!i||!Ms(i))&&(u("Please enter a valid email address"),O=!0),Yr(c,V)||(y("Please enter a valid phone number"),O=!0),!O){T(!0);try{const _=await r(i,c,rt.AuthenticationUsernameType.EMAIL);m(_.session),$(_.username||i),_.challengeName&&(w(8),x(_.challengeName),ue(_.challengeName===rt.AuthenticationChallengeName.SMS_OTP?rt.OTPAction.TEXTED:rt.OTPAction.EMAILED)),C(!0),t()}catch(_){console.error("Error sending OTP:",_),u("An error occurred. Please try again.")}finally{T(!1)}}},te=async O=>{if(p)try{await a(B,O,p,S);const _=await n();o(_),C(!1),l(""),$(""),m(null),w(6),ue(rt.OTPAction.EMAILED),x(null)}catch(_){console.error("Error verifying OTP:",_)}},Ee=()=>{C(!1),l(""),$(""),d(""),y(null),m(null),w(6),ue(rt.OTPAction.EMAILED),x(null)},H=()=>{u(null),y(null),A||(l(""),d("")),t()};return v.jsxs(v.Fragment,{children:[v.jsx(pr,{isOpen:e,onClose:H,title:"Sign in to Movmo",maxWidthPx:398,children:v.jsxs("form",{onSubmit:O=>{O.preventDefault(),U()},className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx(At,{id:"sign-in-email",type:"email",placeholder:"Email",required:!0,value:i,onChange:N,className:`w-full ${s?"border-error-500 focus:ring-error-500":""} autofill:bg-white autofill:shadow-[inset_0_0_0px_1000px_white]`,autoFocus:!0}),s&&v.jsx("p",{className:"text-error-500 text-xs mt-1",children:s})]}),v.jsx(Os,{value:c,onChange:L,onBlur:W,error:h,required:!0,id:"sign-in-phone",name:"sign-in-phone"}),v.jsx("button",{type:"submit",disabled:M,className:"w-full py-3 px-4 bg-gradient-to-r from-[#E91E63] to-[#E91E63] hover:from-[#D81B60] hover:to-[#D81B60] text-white font-semibold rounded-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:M?"Loading...":"Continue"})]})}),A&&v.jsx(Fs,{email:i,phone:c,otpLength:E,otpAction:J,onVerify:te,onClose:Ee})]})};exports.Avatar=_i;exports.AvatarFallback=Zi;exports.AvatarImage=Xi;exports.Badge=Oi;exports.Button=Ao;exports.COUNTRY_OPTIONS=zr;exports.CURRENCY_OPTIONS=gr;exports.Card=$r;exports.CardContent=Kr;exports.CardDescription=Po;exports.CardFooter=Oo;exports.CardHeader=Qr;exports.CardTitle=To;exports.Checkbox=Pi;exports.Chip=vs;exports.CurrencyModal=bb;exports.DEFAULT_LOCALE=Ts;exports.DateDropdowns=Hr;exports.IconButton=Fi;exports.Input=At;exports.LOCALE_OPTIONS=br;exports.LOCALE_STORAGE_KEY=sb;exports.LocaleModal=db;exports.Modal=pr;exports.OTPModal=Fs;exports.Pagination=gs;exports.PassengerForm=rb;exports.PassengerFormSkeleton=ib;exports.PhoneInput=Os;exports.SearchInput=ms;exports.SelectDropdown=Cn;exports.Separator=No;exports.SignInModal=hb;exports.Textarea=bs;exports.Toggle=$i;exports.ToggleGroup=fs;exports.ToggleGroupItem=ps;exports.findCurrencyOption=pb;exports.findLocaleOption=lb;exports.getCurrencyDisplayText=Ps;exports.getLanguageDisplayName=ub;exports.validateEmail=Ms;exports.validatePhoneNumber=Yr;
|
|
115
115
|
//# sourceMappingURL=index.cjs.js.map
|