1"use strict";(self.rspackChunkvagaro_websitebuilder_consumer=self.rspackChunkvagaro_websitebuilder_consumer||[]).push([[1439],{99162(){},22495(e,t,r){r.d(t,{S:()=>l,W:()=>u});var n=r(47016);let o=null,a=null,l=e=>{if(!e)throw Error("EnvironmentUrl is required. Please pass EnvironmentUrl prop to the component.");return o?Promise.resolve(o):(a||(a=new Promise((t,r)=>{n.A.Get(e,"countrylist/countrylistdetails","",e=>{let r=e?.data?.data||[];o=r,t(r)},e=>{r(e)})})),a)},i=new Map;function u(e,t){let r=i.get(e);if(r)return r;let n=t().finally(()=>i.delete(e));return i.set(e,n),n}},15624(e,t,r){r.r(t),r.d(t,{default:()=>s});var n=r(74848),o=r(96540),a=r(67247),l=r(7247);let i=a.Wp.CheckIsFromProAppWithoutState(),u=a.Wp.CheckIsFromIpadAndroidTabWithoutParm(),s=({NotificationTitle:e,Icon:t=!1,types:r="positive",Duration:a=0,show:s=!1,TopMessage:c=!1,OnClose:d,UsePortal:f=!1,RenderOnTop:p=""})=>{let[y,g]=(0,o.useState)(!1),v=(0,o.useRef)(`PassiveNotification-${Math.random().toString(36).substr(2,9)}`),m=p?{top:p}:void 0,b="positive"===r?"vg-banner-success-master":"warning"===r?"vg-banner-warning-master":"vg-banner-fail-master";(0,o.useEffect)(()=>{let t;return s||c?(g(!0),t=setTimeout(()=>{g(!1),setTimeout(()=>{d&&d()},300)},a>0?a:e?e.length<50?2e3:e.length<100?3e3:e.length<200?4e3:7e3:3e3)):g(!1),()=>{t&&clearTimeout(t)}},[s,e,a,c,d]);let C=()=>y&&(0,n.jsx)("div",{className:`${i||u?"vg-passinvmessage-pro":""} passinvmessageblock`,children:(0,n.jsxs)("div",{className:`${b} ${y&&c?"showmsgTop":""}`,style:m,children:[t&&(0,n.jsx)("div",{className:"icon-banner"}),(0,n.jsx)("div",{className:"text-block-28",children:e})]})});return(0,n.jsx)(n.Fragment,{children:f?(0,n.jsx)(l.A,{wrapperElementId:v.current,wrapperElement:"div",children:C()}):C()})}},31234(e,t,r){r.r(t),r.d(t,{default:()=>eu});var n=r(74848),o=r(96540);r(99162),r(29060);var a=r(22056),l=r(15117),i=r(74779),u=r(85378);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var f=r(20770);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(g())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&v(o,r.prototype),o}(e,arguments,m(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),v(r,e)})(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function v(e,t){return(v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){function t(e){var r,n,o;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return n=t,o=[e],n=m(n),Object.setPrototypeOf(r=function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var r=e;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,g()?Reflect.construct(n,o||[],m(this).constructor):n.apply(this,o)),t.prototype),r.name=r.constructor.name,r}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(y(Error)),C=r(9962),h=function(e){return"([".concat(f.OA,"]{1,").concat(e,"})")};function O(e){var t="[  \\t,]*",r="[:\\.ï¼]?[  \\t,-]*",n="[  \\t]*";return";ext="+h("20")+"|"+(t+"(?:e?xt(?:ensi(?:oÌ?|ó))?n?|ï½
?ï½ï½ï½?|доб|anexo)"+r+h("20"))+"#?|"+(t+"(?:[xï½#ï¼~ï½]|int|ï½ï½ï½)"+r+h("9"))+"#?|"+("[- ]+"+h("6"))+"#|"+(n+"(?:,{2}|;)"+r+h("15"))+"#?|"+(n+"(?:,)+"+r+h("9"))+"#?"}var w="["+f.OA+"]{"+f.c7+"}",x="["+f.tz+"]{0,1}(?:["+f.uD+"]*["+f.OA+"]){3,}["+f.uD+f.OA+"]*",j=RegExp("^["+f.tz+"]{0,1}(?:["+f.uD+"]*["+f.OA+"]){1,2}$","i"),S=RegExp("^"+w+"$|^"+(x+"(?:"+O())+")?$","i"),N=RegExp("(?:"+O()+")$","i"),P=r(61560);function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function A(e){for(var t,r="",n=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return $(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=n()).done;){var o=t.value;r+=function(e,t){if("+"===e){if(t)return;return"+"}return(0,P.ZW)(e)}(o,r)||""}return r}var D=r(8016),T=r(45626),E=r(58982),I=r(62179),k=r(29123),R=r(46937),L="(["+f.OA+"]|[\\-\\.\\(\\)]?)",F=RegExp("^\\+"+L+"*["+f.OA+"]"+L+"*$","g"),_=f.OA,M=RegExp("^("+("["+_+"]+((\\-)*[")+_+"])*\\.)*[a-zA-Z]+((\\-)*["+_+"])*\\.?$","g"),U="tel:",B=";phone-context=",V=RegExp("["+f.tz+f.OA+"]"),W=RegExp("[^"+f.OA+"#]+$");function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?q(Object(r),!0).forEach(function(t){var n,o,a;n=e,o=t,a=r[t],(o=function(e){var t=function(e,t){if("object"!=H(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=H(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==H(t)?t:t+""}(o))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach(function(t){var n,o,a;n=e,o=t,a=r[t],(o=function(e){var t=function(e,t){if("object"!=K(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=K(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==K(t)?t:t+""}(o))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function J(){var e,t=function(e){var t,r,n,o,a=function(e){if(Array.isArray(e))return e}(t=Array.prototype.slice.call(e))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,a,l=[],i=!0,u=!1;try{o=(t=t.call(e)).next,!1;for(;!(i=(r=o.call(t)).done)&&(l.push(r.value),4!==l.length);i=!0);}catch(e){u=!0,n=e}finally{try{if(!i&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw n}}return l}}(t)||function(e){if(e){if("string"==typeof e)return d(e,4);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d(e,4):void 0}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=a[0],i=a[1],f=a[2],p=a[3];if("string"==typeof l)r=l;else throw TypeError("A text for parsing must be a string.");if(i&&"string"!=typeof i)if((0,u.A)(i))f?(n=i,o=f):o=i;else throw Error("Invalid second argument: ".concat(i));else p?(n=f,o=p):(n=void 0,o=f),i&&(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){var n,o,a;n=e,o=t,a=r[t],(o=function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}(o))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({defaultCountry:i},n));return{text:r,options:n,metadata:o}}(arguments),r=t.text,n=t.options,o=t.metadata,a=n;a&&a.defaultCountry&&!(0,C.J_)(a.defaultCountry,o)&&(a=G(G({},a),{},{defaultCountry:void 0}));try{return e=a,function(e,t,r){t=t||{};var n,o,a,l,i=new C.Ay(r);if(t.defaultCountry&&!i.hasCountry(t.defaultCountry)){if(t.v2)throw new b("INVALID_COUNTRY");throw Error("Unknown country: ".concat(t.defaultCountry))}var u=function(e,t,r){var n=function(e,t){var r=t.extractFormattedPhoneNumber,n=function(e){var t=e.indexOf(B);if(t<0)return null;var r=t+B.length;if(r>=e.length)return"";var n=e.indexOf(";",r);return n>=0?e.substring(r,n):e.substring(r)}(e);if(!(null===n||0!==n.length&&(F.test(n)||M.test(n))))throw new b("NOT_A_NUMBER");if(null===n)o=r(e)||"";else{o="","+"===n.charAt(0)&&(o+=n);var o,a,l=e.indexOf(U);a=l>=0?l+U.length:0;var i=e.indexOf(B);o+=e.substring(a,i)}var u=o.indexOf(";isub=");if(u>0&&(o=o.substring(0,u)),""!==o)return o}(e,{extractFormattedPhoneNumber:function(e){if(e){if(e.length>250){if(t)throw new b("TOO_LONG");return}if(!1===r)return e;var n=e.search(V);return n<0?void 0:e.slice(n).replace(W,"")}}});if(!n)return{};if(!(n.length>=f.c7&&S.test(n)))return j.test(n)?{error:"TOO_SHORT"}:{};var o=function(e){var t=e.search(N);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(N),o=1;o<n.length;){if(n[o])return{number:r,ext:n[o]};o++}}(n);return o.ext?o:{number:n}}(e,t.v2,t.extract),s=u.number,c=u.ext,d=u.error;
1if(!s){if(t.v2){if("TOO_SHORT"===d)throw new b("TOO_SHORT");throw new b("NOT_A_NUMBER")}return{}}var p=function(e,t,r,n){var o,a=(0,I.A)(A(e),void 0,t,r,n.metadata),l=a.countryCallingCodeSource,i=a.countryCallingCode,u=a.number;if(i)n.selectNumberingPlan(i);else{if(!u||!t&&!r)return{};t?(o=t,n.selectNumberingPlan(t),i=n.numberingPlan.callingCode()):(n.selectNumberingPlan(r),i=r)}if(!u)return{countryCallingCodeSource:l,countryCallingCode:i};var s=(0,k.A)(A(u),void 0,n),c=s.nationalNumber,d=s.carrierCode,f=(0,R.A)(i,{nationalNumber:c,metadata:n});return f&&(o=f,"001"===f||n.selectNumberingPlan(o)),{country:o,countryCallingCode:i,countryCallingCodeSource:l,nationalNumber:c,carrierCode:d}}(s,t.defaultCountry,t.defaultCallingCode,i),y=p.country,g=p.nationalNumber,v=p.countryCallingCode,m=p.countryCallingCodeSource,h=p.carrierCode;if(!i.hasSelectedNumberingPlan()){if(t.v2)throw new b("INVALID_COUNTRY");return{}}if(!g||g.length<f.c7){if(t.v2)throw new b("TOO_SHORT");return{}}if(g.length>f.Cb){if(t.v2)throw new b("TOO_LONG");return{}}if(t.v2){var O=new T.A(v,g,i.metadata);return y&&(O.country=y),h&&(O.carrierCode=h),c&&(O.ext=c),O.__countryCallingCodeSource=m,O}var w=(t.extended?!!i.hasSelectedNumberingPlan():!!y)&&(0,E.A)(g,i.nationalNumberPattern());return t.extended?{country:y,countryCallingCode:v,carrierCode:h,valid:w,possible:!!w||!!(!0===t.extended&&i.possibleLengths()&&(0,D.x)(g,i)),phone:g,ext:c}:w?(n=y,o=g,a=c,l={country:n,phone:o},a&&(l.ext=a),l):{}}(r,Z(Z({},e),{},{v2:!0}),o)}catch(e){if(e instanceof b);else throw e}}function Y(){return function(e,t){var r=Array.prototype.slice.call(t);return r.push(i.A),e.apply(this,r)}(J,arguments)}var Q=r(15624),X=r(67247),ee=r(7247),et=r(22495),er=r(94089);let en=[{countryCode:"US",countryID:1,countryName:"United States of America",cssClass:"us-f",dialingCode:"1",isBusinessUseOnly:!0},{countryCode:"GB",countryID:2,countryName:"United Kingdom",cssClass:"uk-f",dialingCode:"44",isBusinessUseOnly:!0},{countryCode:"CA",countryID:3,countryName:"Canada",cssClass:"canada-f",dialingCode:"1",isBusinessUseOnly:!0},{countryCode:"AU",countryID:4,countryName:"Australia",cssClass:"aus-f",dialingCode:"61",isBusinessUseOnly:!0}],eo=e=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"vg-remove-icon",style:{display:0===e.selectProps.inputValue.length?"none":"block"},children:(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M0 8.00098C0 3.59473 3.5625 0.000976562 8 0.000976562C12.4062 0.000976562 16 3.59473 16 8.00098C16 12.4385 12.4062 16.001 8 16.001C3.5625 16.001 0 12.4385 0 8.00098ZM5.46875 6.53223L6.9375 8.00098L5.46875 9.46973C5.15625 9.78223 5.15625 10.251 5.46875 10.5322C5.75 10.8447 6.21875 10.8447 6.5 10.5322L7.96875 9.06348L9.46875 10.5322C9.75 10.8447 10.2188 10.8447 10.5 10.5322C10.8125 10.251 10.8125 9.78223 10.5 9.46973L9.03125 8.00098L10.5 6.53223C10.8125 6.25098 10.8125 5.78223 10.5 5.46973C10.2188 5.18848 9.75 5.18848 9.46875 5.46973L7.96875 6.96973L6.5 5.46973C6.21875 5.18848 5.75 5.18848 5.46875 5.46973C5.15625 5.78223 5.15625 6.25098 5.46875 6.53223Z"})})})}),ea=e=>{let{isCountrylable:t,closeCallback:r,...o}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:`all-country-flag-react cmn-select-dropdown ${t?"vg-country-lable-show":""}`,style:{width:"328px",backgroundColor:"white",borderRadius:4,zIndex:2},...o}),(0,n.jsx)("input",{type:"hidden",id:"PhoneControlId"}),(0,n.jsx)("input",{type:"hidden",onClick:r,id:"Vg-Phone-close"})]})},el=e=>(0,n.jsx)("div",{style:{bottom:0,left:0,top:0,right:0,position:"fixed",zIndex:1},...e}),ei=({children:e,isOpen:t,target:r,onClose:o,id:a,isDisabled:l,countryInputRef:i,CountryDropdown:u,isCountrylable:s,FullScreenCountryDropdown:c=!0})=>(0,n.jsxs)("div",{className:`custome-select-wrap countrydropdown ${t&&!l?"show-select":""} ${l?"vg-phone-control-disabled":""}`,ref:i,children:[r,t&&!l?(0,n.jsx)(ee.A,{wrapperElementId:"phonecountry",inputRef:i,type:10,children:(0,n.jsx)("div",{className:`vg-reacttk-country-dropdown-wrap ${!c?"vg-default-dropdown":""}`,"data-identity":c?"vg-phone-full-width":"",children:(0,n.jsx)(ea,{id:a,isCountrylable:s,closeCallback:o,children:e})})}):null,t?(0,n.jsx)(el,{onClick:o}):null,(0,n.jsx)("div",{className:"select-backdrop",onClick:o})]}),eu=(0,o.forwardRef)(({CurrentCountry:e,Validation:t,CustomErrorMessage:r,CustomValidationMessage:i,Required:u=!1,FocusBorder:s,Title:c,PlaceHolder:d,Disable:f,PhoneControlId:p="",NativeActionVal:y=0,Footer:g=0,TimerCount:v=0,FullLength:m=!1,CloseBackTitle:b,VagaroToolkit:C=0,MaximumLength:h,SetValue:O,CountryDropdown:w=!1,OnBlur:x,OnClick:j,ShowRequiredFieldMark:S=!1,Name:N="vg-phone-control",AutoFocus:P=!1,AllCountry:$=!1,OnChange:A=()=>{},OnKeyUp:D=()=>{},CheckPhoneControl:T,OnValidation:E,OnCountryChange:I,SearchCountry:k=!1,isCountrylable:R=!1,FailedContact:L,EnvironmentUrl:F,CountryDropdownData:_=[],FullScreenCountryDropdown:M=!0,EnableConditionalUkLeadingZero:U=!1},B)=>{let V,[W,H]=(0,o.useState)(!1),[q,Z]=(0,o.useState)({cssClass:"",value:0,label:"",dialingCo
1de:"",countryCode:""}),[K,z]=(0,o.useState)([]),[G,J]=(0,o.useState)({}),[ee,ea]=(0,o.useState)(),[el,eu]=(0,o.useState)(""),[es,ec]=(0,o.useState)({message:"",type:0}),[ed,ef]=(0,o.useState)(!1),[ep,ey]=(0,o.useState)(!1),eg=(0,o.useRef)(!1),ev=(0,o.useRef)(!1),em=(0,o.useRef)(void 0),eb=(0,o.useRef)(G),eC=(0,o.useRef)(q),eh=(0,o.useRef)(void 0),eO=(0,o.useRef)(null),ew=X.Wp.CheckIsFromProAppWithoutState(),[ex,ej]=(0,o.useState)(""),eS=_.length>0?_:en;(0,o.useEffect)(()=>{!1===w&&H(!1)},[w,W]),(0,o.useEffect)(()=>{ea(O)},[O]),(0,o.useEffect)(()=>{ee&&eP({})},[ee]),(0,o.useEffect)(()=>{let t=K.flatMap(e=>e.options).find(t=>t.value===e);t&&Z({cssClass:t?.cssClass,value:t?.value,label:`${t?.label}`,dialingCode:t?.dialingCode,countryCode:t?.countryCode})},[e,K]),(0,o.useEffect)(()=>{$&&!eg.current?(eg.current=!0,(0,et.S)(F).then(t=>{var r;let n;Array.isArray(t)&&0!==t.length?z((r=e||1,[{label:"Current Location",options:(n=t.find(e=>e.countryID===r))?[{value:n.countryID,label:`${n.countryName} +${n.dialingCode}`,dialingCode:n.dialingCode,countryCode:n.countryCode,cssClass:n.cssClass}]:[]},{label:"Other Locations",options:t.filter(e=>e.countryID!==r).map(e=>({value:e.countryID,label:`${e.countryName} +${e.dialingCode}`,dialingCode:e.dialingCode,countryCode:e.countryCode,cssClass:e.cssClass}))}])):z([])}).catch(e=>{z([])})):z([])},[$]),(0,o.useEffect)(()=>{eC.current=q},[q]),(0,o.useEffect)(()=>{eb.current=G},[G]),(0,o.useEffect)(()=>{("None"===t&&t||""===ee)&&eu("")},[t,ee]),(0,o.useEffect)(()=>(e$(),document.addEventListener("mousedown",eN),()=>{document.removeEventListener("mousedown",eN)}),[]),(0,o.useEffect)(()=>{eS.length&&e?eA(eS):$&&eA(K)},[eS,$]),(0,o.useEffect)(()=>{(0,X._A)(P,em)},[P]),(0,o.useEffect)(()=>{ey(L?.FailedContact??!1)},[L?.FailedContact]);let eN=e=>{if(!W)return;let t=e.target,r=document.getElementById("s2id_autogen4_search");if(r&&r.contains(t))return;let n=document.querySelector(".vg-reacttk-country-dropdown-wrap");n&&n.contains(t)||!(eh.current&&eh.current.contains(t))&&(H(!1),ew&&eR())},eP=({e,selectedDataOnLoad:t})=>{var r;if(void 0!==e&&null!=e&&(!0!==e.shiftKey||9!==e.keyCode)&&(!0!==e.ctrlKey||90!==e.keyCode)&&(!0!==e.ctrlKey||65!==e.keyCode)&&(!0===e.shiftKey||e.keyCode>=65&&e.keyCode<=90||e.keyCode>=106)&&(e.preventDefault(),e.stopPropagation()),null==q&&void 0===t)return;let n=q?q?.value?.toString():t?.value?.toString();if(void 0===(r=em?.current?.value)||void 0===r||""===r||null===r)em.current.value="";else{let e=em.current.value;q?.dialingCode||t?.dialingCode;let r=q?.countryCode||t?.countryCode,o=e.replace(/[^\d]/g,"").trim();if(null!=n&&""!==n){let e=o.length;if(e<=0){em.current.value="";return}if(11===e&&"0"===o[0]&&4>=parseInt(n)&&(("2"===n||"105"===n)&&U&&("44"===(q?.dialingCode||t?.dialingCode)||"353"===(q?.dialingCode||t?.dialingCode))||(e=(o=o.substring(1)).length)),"1"===n||"3"===n)10===e?(V="3"===n?o.replace(/(\d{3})\-?(\d{3})\-?(\d{4})/,"$1-$2-$3"):"6"===n?o.replace(/(\d{5})\-?(\d{5})/,"$1-$2"):o.replace(/(\d{3})\-?(\d{3})\-?(\d{4})/,"($1) $2-$3"),em.current.value=V):e>10&&(em.current.value=o);else if(("2"===n||"105"===n)&&U&&("44"===(q?.dialingCode||t?.dialingCode)||"353"===(q?.dialingCode||t?.dialingCode)))10===e&&"0"!==o[0]?e=(o="0"+o).length:(e<=10||12===e)&&"0"===o[0]&&(e=(o=o.substring(1)).length),10===e||11===e?(V="01"===o.substring(0,2)?o.replace(/(\d{5})(\d{6})/,"$1 $2"):"02"===o.substring(0,2)?o.replace(/(\d{3})(\d{4})(\d{4})/,"$1 $2 $3"):"07"===o.substring(0,2)?o.replace(/(\d{5})(\d{3})(\d{3})/,"$1 $2 $3"):o.replace(/(\d{3})(\d{4})(\d{4})/,"$1 $2 $3"),em.current.value=V):em.current.value=o;else if("2"===n||"4"===n)if(e>=9&&e<=11){let t;"4"===n?9===e?t=o.replace(/(\d{1})\-?(\d{4})\-?(\d{4})/,"($1) $2 $3"):10===e?t=o.replace(/(\d{2})\-?(\d{4})\-?(\d{4})/,"($1) $2 $3"):11===e&&(t=o.replace(/(\d{1})\-?(\d{4})\-?(\d{6})/,"($1) $2 $3")):9===e?t=o.replace(/(\d{3})\-?(\d{3})\-?(\d{3})/,"$1 $2 $3"):10===e?t=o.replace(/(\d{3})\-?(\d{3})\-?(\d{4})/,"$1 $2 $3"):11===e&&(t=o.replace(/(\d{3})\-?(\d{3})\-?(\d{4})/,"$1 $2 $3")),em.current.value=t}else em.current.value=o;else try{let e=Y(o,r);if(e&&e.isValid()){let t=e.format("INTERNATIONAL"),r=e.countryCallingCode,n=t.replace(RegExp(`^\\+${r}\\s*`),"");em.current.value=n}else em.current.value=o}catch(e){em.current.value=o}}else{let e=o.replace(/(\d{3})\-?(\d{3})\-?(\d{4})/,"($1)-$2-$3");em.current.value=e}}J(em?.current),ea(em.current.value),null!=e&&(e.target.value=em.current.value,A&&U&&A(e),
1V&&D&&D(e))},e$=()=>{eA(eS)},eA=t=>{let r=e||1;r||(r=1);let n=t.find(e=>e.countryID===r),o={};n&&(o={cssClass:n.cssClass,value:n.countryID,label:`${n.countryName} +${n.dialingCode}`,dialingCode:n.dialingCode,countryCode:n.countryCode}),Z(o),O&&(em.current.value=O,eP(o));let a=t.filter(e=>!0===e.isBusinessUseOnly).filter(e=>e.countryID!==o.value).map(e=>({cssClass:e.cssClass,value:e.countryID,label:`${e.countryName} +${e.dialingCode}`,dialingCode:e.dialingCode,countryCode:e.countryCode}));z([{label:"Current Location",options:o?[o]:[]},{label:"Other Locations",options:a}])},eD=(e,t)=>{ec({type:e,message:t}),setTimeout(()=>{ec({type:e,message:""})},4e3)},eT=({txtCell:e,CountryID:t,countryCode:r,isBanner:n=!1})=>{let o=!0,a="";if(e?.value?.length>0){if(t<=4||6===t||U||105===t)if(4===t||2===t||105===t){let t=U?10:9;""===e.value.replace(/[^0-9.]/g,"").trim()?(a="Please enter phone number.",o=!1):e.value.trim().match(/\d/g).length<t||e.value.trim().match(/\d/g).length>11?(o=!1,a=`Phone number must be of ${t} to 11 digits.`):o=!0}else(1===t||3===t||6===t)&&(""===e.value.replace(/[^0-9.]/g,"").trim()?(a="Please enter phone number.",o=!1):e.value.trim().match(/\d/g).length<10||e.value.trim().match(/\d/g).length>10?(o=!1,a="Phone number must be of 10 digits."):o=!0);else try{let t=Y(e.value,r);t&&t.isValid()||(o=!1,a=" ")}catch{o=!1,a=" "}o?n||eu(""):(a=i||a,n?(eu(""),eD(3,a)):eu(a))}else n||eu("");return o?(e.classList.remove("errorInput"),n&&eD(1,"")):e.classList.add("errorInput"),{isSuccess:o,WarningMessage:a}};(0,o.useEffect)(()=>{ee&&"Default"===t&&(eT({txtCell:em?.current,CountryID:q?.value,countryCode:q?.countryCode}),eP({}),U&&ev.current&&A&&em?.current&&(A({target:em.current,currentTarget:em.current}),ev.current=!1))},[q]);let eE=()=>{let e=ek(),t=u&&!ee,r=e&&!t;return"function"==typeof E&&E(r,r?"":el),r},eI=["vg-input-control",(el||r||es.message||ed&&!ee&&u)&&"vg-input-control-error",s&&"vg-input-control-focus",f&&"vg-input-control-disabled",ep&&"vg-failed-contact"].filter(Boolean).join(" "),ek=()=>{if(!ee)return ef(!0),!1;{let{isSuccess:e}=eT({txtCell:em?.current,CountryID:q?.value,countryCode:q?.countryCode});return ef(e),e}},eR=()=>{if(ew){var e={};e.message="",e.messageType=0,e.screenTitle=b,e.screenType=0,e.navType=0,e.action="53|~|"+JSON.stringify({NativeAction:y,Footer:1,FullLength:m,callFromLocation:p,VagaroToolkit:C}),X.Wp.ToolkitSendCallbacktoMobile(5006,JSON.stringify(e))}},eL=()=>{!0===W&&(H(!1),eR())};return(0,o.useImperativeHandle)(B,()=>({validate:()=>(()=>{let e=ek();u&&!ee&&ef(!0);let t=eT({txtCell:em?.current,CountryID:q?.value,countryCode:q?.countryCode}).WarningMessage||el;if("function"==typeof E){let r=u&&!ee,n=e&&!r;E(n,n?"":t)}let r={[p]:ee,IsValidate:e,Required:!ee&&!!u,countryDetails:q,errorMessage:t.trim(),id:p,checkcontrol:"PhoneControl"};return(0,X._A)(P&&!e,em),r})(),closeDropdown:()=>eL()})),(0,n.jsxs)(n.Fragment,{children:[es.message&&(0,n.jsx)(Q.default,{Duration:4e3,NotificationTitle:es.message,types:"error",UsePortal:!0}),(0,n.jsxs)("div",{className:`vg-reacttk-country-dropdown-wrap ${!M?"vg-default-dropdown":""}`,children:[c?.length>0&&(0,n.jsx)("div",{className:"vg-input-label-container",children:(0,n.jsxs)("label",{className:"vg-input-label",children:[S&&u?(0,n.jsx)("span",{className:"required-input-mark",children:"*"}):"",c,ep&&(0,n.jsx)("span",{className:"vg-add-required-svg",children:(0,n.jsx)(er.default,{TooltipText:L?.FailedContactText||"",BeakPoint:"Down",BeakPosition:"Auto",Duration:0,ShowHover:!0,TooltipRender:"portal",FullWidth:!0,Html:!0,MaxWidth:L?.TooltipMaxWidth,Children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"var(--text_alert_default)",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M15.3242 12.0918C15.793 12.9121 15.207 13.9375 14.2402 13.9375H1.73047C0.763672 13.9375 0.177734 12.9121 0.646484 12.0918L6.91602 1.42773C7.38477 0.607422 8.58594 0.607422 9.08398 1.42773L15.3242 12.0918ZM7.29688 4.79688V8.54688C7.29688 8.95703 7.64844 9.25 8 9.25C8.38086 9.25 8.70312 8.95703 8.70312 8.54688V4.79688C8.70312 4.41602 8.38086 4.09375 8 4.09375C7.58984 4.09375 7.29688 4.41602 7.29688 4.79688ZM8 12.0625C8.49805 12.0625 8.9082 11.6523 8.9082 11.1543C8.9082 10.6562 8.49805 10.2461 8 10.2461C7.47266 10.2461 7.0625 10.6562 7.0625 11.1543C7.0625 11.6523 7.47266 12.0625 8 12.0625Z"})})})})})]})}),(0,n.jsx)("div",{className:"vg-country-flag-dropdown",children:(0,n.jsxs)("div",{id:"dvWrapoff",className:`vg-addresswithcountry address-phone-plugin ${!w?"disable-country":""}`,ref:eO,children:[(0,n.jsxs)(ei,{id:"off",isOpen:W,onClose:()=>{H(!1),ew&&eR()},isDisabled:f,countryInputRef:eh,isCountrylable:R,target:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:`selectedcountry ${q?.cssClass} ${f?"vg-phone-control-disabled":""}`,onClick:()=>(()=>
1{if(H(e=>!e),ew){X.Wp.CallBackGivenToMobileApp(y,c,g,v,m);var e={};e.message="",e.messageType=0,e.screenTitle=c,e.screenType=0,e.navType=0,e.action="53|~|"+JSON.stringify({NativeAction:y,Footer:g,FullLength:m,callFromLocation:p,VagaroToolkit:C}),X.Wp.ToolkitSendCallbacktoMobile(5006,JSON.stringify(e))}})()}),(0,n.jsx)("div",{id:"dvDialingCodeoff",className:`country-code ${ep?"vg-failed-contact":""}`,children:q?`+${q.dialingCode}`:"+1"})]}),FullScreenCountryDropdown:M,children:[k&&(0,n.jsxs)("div",{className:"select2-search",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("label",{htmlFor:"off",className:"select2-offscreen"}),(0,n.jsx)("input",{type:"text",autoComplete:"false",className:"select2-input text-primary",id:"off",placeholder:"Search for a Country",value:ex,onChange:e=>{ej(e.target.value)},onClick:e=>e.stopPropagation(),autoFocus:!0})]}),(0,n.jsx)(a.Ay,{classNamePrefix:"vg-country-dropdown-search",components:{DropdownIndicator:eo,IndicatorSeparator:null,Option:e=>(0,n.jsx)(l.c.Option,{...e,children:(0,n.jsxs)("div",{className:`select2-result-label countrys-Code ${e.data.cssClass}`,children:[(0,n.jsx)("span",{className:e.data.cssClass,children:e.data.label?.split("+")[0]}),(0,n.jsx)("span",{className:"country-code-text",children:`+${e.data.dialingCode}`})]})})},controlShouldRenderValue:!1,hideSelectedOptions:!1,isClearable:!1,isSearchable:!1,value:q,defaultValue:q,onChange:e=>{ev.current=!0,H(!1),Z(e),eP(e),ej(""),eL(),I&&I(e?.value,e),em?.current?.focus()},options:ex.trim()?[{label:"Filtered Results",options:K.flatMap(e=>e.options).filter(e=>e.label.toLowerCase().includes(ex.toLowerCase()))}]:K,menuIsOpen:W&&!f,getOptionLabel:e=>e.label})]}),(0,n.jsxs)("div",{className:`select-country-mar vg-select-icon-mar input-focus-relative ${q?.cssClass}`,children:[(0,n.jsx)("input",{id:"off",type:"text",autoComplete:"off",ref:em,pattern:"[0-9]*",inputMode:"numeric",className:eI,onBlur:e=>{x&&x(e),u||ef(!1),u&&!ee&&ef(!0),eE(),"Default"===t&&eT({txtCell:em?.current,CountryID:q?.value,countryCode:q?.countryCode}),"Passive"===t&&eT({txtCell:em?.current,CountryID:q?.value,countryCode:q?.countryCode,isBanner:!0})},disabled:f,onKeyUp:e=>eP({e}),onChange:e=>{let t;return t=e.target.value,void((null==T||""==T)&&(t=t.replace(/[^0-9.]/g,""))!==e.target.value&&(e.target.value=t,e.preventDefault()),t.length>h&&(e.target.value=t.substring(0,h)),ea(e?.target?.value),ep&&ey(!1),E&&eE(),A&&!U&&A(e))},placeholder:d,maxLength:h+4,value:ee,name:N,autoFocus:P}),ed&&!ee&&u&&(0,n.jsx)("span",{className:"vg-input-control-error-msg",children:"required"}),(el||r)&&(0,n.jsx)("span",{className:"vg-input-control-error-msg",children:el||r})]})]})})]}),(0,n.jsx)("input",{type:"hidden",onClick:()=>eL(),id:p})]})})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.